From: Oliver Kurth Date: Wed, 13 Sep 2017 23:24:53 +0000 (-0700) Subject: clobber to create a starting point for the development branch X-Git-Tag: stable-10.2.0~755 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a00e4e76c6deb863cfba4adb6aeca4608fafaac;p=thirdparty%2Fopen-vm-tools.git clobber to create a starting point for the development branch --- diff --git a/open-vm-tools/.gitignore b/open-vm-tools/.gitignore deleted file mode 100644 index dfc1a5a6b..000000000 --- a/open-vm-tools/.gitignore +++ /dev/null @@ -1,52 +0,0 @@ -*~ -*.swp -*.o -*.ko - -# autoconf generated files -*.cache -.deps -.libs -INSTALL -Makefile -Makefile.in -aclocal.m4 -config -config.log -config.status -configure -libtool -m4 - -# project generated files -*.la -*.lo -checkvm/vmware-checkvm -docs/api/build -docs/api/doxygen.parsed.conf -docs/api/warnings.log -hgfsclient/vmware-hgfsclient -hgfsmounter/mount.vmhgfs -lib/guestRpc/nicinfo.h -lib/guestRpc/nicinfo_xdr.c -lib/include/guestrpc -libguestlib/guestlibIoctl.h -libguestlib/guestlibIoctl_xdr.c -libguestlib/guestlibV3.h -libguestlib/guestlibV3_xdr.c -libguestlib/vmguestlib.pc -rpctool/vmware-rpctool -scripts/build/rpcgen_wrapper.sh -scripts/poweroff-vm-default -scripts/poweron-vm-default -scripts/resume-vm-default -scripts/suspend-vm-default -services/plugins/vmbackup/vmBackupSignals.c -services/plugins/vmbackup/vmBackupSignals.h -services/vmtoolsd/svcSignals.c -services/vmtoolsd/svcSignals.h -services/vmtoolsd/vmtoolsd -toolbox/vmware-toolbox-cmd -vmware-user-suid-wrapper/vmware-user-suid-wrapper -vmware-user-suid-wrapper/vmware-user.desktop -xferlogs/vmware-xferlogs diff --git a/open-vm-tools/ChangeLog b/open-vm-tools/ChangeLog index 0f1c10278..5902cdb6a 100644 --- a/open-vm-tools/ChangeLog +++ b/open-vm-tools/ChangeLog @@ -1,801 +1,3092 @@ -open-vm-tools-10.0.5 build 3227882 -* ae82fa6 [Bug 1526360] fix timestamp check -* b510107 [Bug 1531545] Add an error handler to X11 resolutionSet -* adab9c5 [Bug 1503195] Kill tasklet when unloading vmci module -* 35bcc69 [Bug 1519223] Avoid warning message when logging group is missing. -* 581f2d0 [Bug 1473600] Skip freezing autofs mounts. -* 8184e92 [Bug 1507819] Workaround fix to avoid rpc warning messages flooding by changing log level to debug. -* eb47321 [Bug 1526327] make vmhgfs compatible with Linux kernel 4.2 +2013.04.16 Dmitry Torokhov + This release tag contains commits up to the following id: + 867ea989d5e6889abcac77b4c7dae7db2651df58 -open-vm-tools-10.0.0 build 3000743 -* Common versioning +2012.12.26 Dmitry Torokhov + This release tag contains commits up to the following id: + 530ef7f26ed041ab1b6655f2cdc79f3af97fc50b -* Quiesced snapshots -* hgfs-fuse +2012.10.14 Dmitry Torokhov + This release tag contains commits up to the following id: + d85408321c66c927bffdb05106a26581244edd4a -* Logging changes +2012.05.21 Dmitry Torokhov + This release tag contains commits up to the following id: + 482332b8d4282df09838df5ea4c58df9cdb4faf3 -* AsyncSocket changes -* Change ASSERT macros to VERIFY +2012.03.13 Dmitry Torokhov + This release tag contains commits up to the following id: + 0114aabd54bf2db4556563b7149c4fbbdec3d87b -* Additional locking fixes and optimizations -* Unicode type and macro cleanup +2011.12.20 Marcelo Vanzin + This release tag contains commits up to the following id: + dfca5cf9d1c2335c5d001deedd9266c84956b508 -* Change glib logging in RpcChannel to use Debug/Warning/Panic. -* Clean up HGFS server unpack file name V3 arguments +2011.11.20 Marcelo Vanzin + This release tag contains commits up to the following id: + 6c197b8e5eccf32bfee0e2452d8926968182aada -* Fix nested logging for VmxLogger with vsocket channel. -* Compile mac-rdpvcbridge from cart-dev +2011.10.26 Marcelo Vanzin + This release tag contains commits up to the following id: + 6271fde90248a4fd49e38aa61498db9e1dbf37c3 -* Implement VMware Tools for ESXi 6.0 guests. -* Get rid of ASSERT_ALWAYS_AVAILABLE +2011.09.23 Marcelo Vanzin + This release tag contains commits up to the following id: + 05baddbed1c5e47e9789a44d30bb217d7184232a -* Get rid of ASSERT_LENGTH. -* Move ASSERT_OR_IN_PANIC() from public/vm_assert.h to vmkernel. +2011.08.21 Marcelo Vanzin + This release tag contains commits up to the following id: + 2b3d76ba776f55d06fb5b62499b189ebd6bc1c75 -* Make lib/location product-agnostic -* desktopEvents: Leave libICE rug firmly under libSM. +2011.07.19 Marcelo Vanzin + This release tag contains commits up to the following id: + 5bed6f1369ca6e9c2c7fbaf4205d86e50f219c5f -* Remove SLPv2 -* Provide a kill-switch for using vsocket in RpcChannel. +2011.06.27 Marcelo Vanzin + This release tag contains commits up to the following id: + 166bbe1d28da4dab763b9568f163c8dca99ced9c -* Use binary search tree to map guest os string to guest os enum. -* codeset: use icuDir instead of libDir +2011.05.27 Marcelo Vanzin + This release tag contains commits up to the following id: + 3793ddc9c9b5facf376a2625d4c2252aa9bd3daa -* Remove NR_MPNS_PER_PAGE -* Make FileIO_AtomicUpdate fail gracefully when File_FullPath fails. +2011.04.25 Marcelo Vanzin + This release tag contains commits up to the following id: + 3112c27981074deb53e86e30e1c168d55e42220c -* Merge atomic FetchAndAdd64 with ReadAdd64. -* Rename Atomic_FetchAdd, part 1. +2011.03.28 Marcelo Vanzin + This release tag contains commits up to the following id: + ec43520f5f3a50f5a980a73d22ae231380f97555 -* AsyncSocket: Remove UDP socket support. -* Introduce Id_IsSetUGid for detecting setuid/setgid binaries. +2011.02.23 Marcelo Vanzin + This release tag contains commits up to the following id: + 96cf4718ac0aff1743e50a2165599306ba442fe1 -* Update WS, player version numbers on *-main branch. -* Integrate all VIX changes from hosted13-pd-rel to vmcore-main. +2011.01.24 Marcelo Vanzin + This release tag contains commits up to the following id: + 60c470337c8932a6d9564130dcaf06c7a1a3df53 -* Rename Atomic_FetchAnd*, part 5. -* Cache Tools conf path. +2010.12.19 Marcelo Vanzin + This release tag contains commits up to the following id: + 5aef2b20a519788613350752575bcba0ac71df79 -* No more Atomic_Fetch. -* Add configuring of the Windows core dump flags for the tools service +2010.11.17 Marcelo Vanzin + This release tag contains commits up to the following id: + 11c0273ed4269f6f7a92f82f6c822df7da4c8720 -* Temporary fix for PR 1111448. -* Add surface logging to basicOps +2010.10.18 Marcelo Vanzin + This release tag contains commits up to the following id: + 2162c5d770cdac3b0e275907a1a5d22ece8ce23c -* Id_IsSetUGid fails to compile on Android. -* Add devel backdoor command to run replays inside frobos tests. +2010.09.19 Marcelo Vanzin + This release tag contains commits up to the following id: + c92a8bfbb406a906bcd2fb9ef6801f92c5b64d1f -* Save registers earlier during Panic. -* Prepare the HGFS Windows client to use VMCI transport header version 2 +2010.08.24 Marcelo Vanzin + This release tag contains commits up to the following id: + 94e63742d734b41638d37580602de4232da5ece6 -* Get Mac OS system version from (Server|System)Version.plist -* WebMKS plumbing: vmx side +2010.07.25 Marcelo Vanzin + This release tag contains commits up to the following id: + b15cffc7961b97129d0b77643db42b4d4d8e3da7 -* Create new V2 of VMCI transport header -* Minor logging cleanup in vmware-vprobe +2010.06.16 Marcelo Vanzin + This release tag contains commits up to the following id: + ec87703fccdd0f954a118640c0b097e383994391 -* Notify VMX when Toolsd is going down -* Remove ovftool temporary fix. +2010.04.25 Marcelo Vanzin + This release tag contains commits up to the following id: + 6fafd672e006208c1e479b297e19618170ff19bd -* Add /proc/interrupts and /proc/irq/* to vm-support -* Remove HGFS from FreeBSD builds and packaging +2010.03.20 Marcelo Vanzin + This release tag contains commits up to the following id: + 7cdbb623125729b41bf54068568dfbcc2dd58733 -* Split DR6_ONES into DR6_DEFAULT and DR6_ONES -* Add utilMem to Frobos +2010.02.23 Marcelo Vanzin + This release tag contains commits up to the following id: + 8baa8588d5fd4cf64efb17164cb70c86c758d0c6 -* Support Intel RTM Debug behavior in VT mode. -* MSG: Skip errno localization on unknown platforms. +2010.01.19 Marcelo Vanzin + This release tag contains commits up to the following id: + 8ee82a5774ae7badeb98ecf4dc629c7e9aac7077 -* Replace CPU_MemBarrier with Atomic_MFence -* Prevent low privileged user from writable access to tools conf data +2009.12.16 Marcelo Vanzin + This release tag contains commits up to the following id: + 0d28106da5684dc31ea52ebb5a2dc6a0af5c1d61 -* Change shutdown notification RPC failure message to debug. -* Eliminate some "legacy IPC baggage". +2009.11.16 Marcelo Vanzin + This release tag contains commits up to the following id: + 6f4cdd0f38be020d722f2393c0b78d7cd13f04d2 -* Fix tools_obj_linux64 build (license file mismatch) -* Convert the HGFS uses of ASSERT_DEVEL into ASSERT or remove +2009.10.15 Marcelo Vanzin + This release tag contains commits up to the following id: + d2f1b83daab1d7882fd651ad1cc77c729bbd9760 -* arm64 support in vm_basic_{types,defs}.h -* Add an error function hook to PollDefault +2009.09.18 Marcelo Vanzin + This release tag contains commits up to the following id: + 8bb94fbfbdf65b53b87279cf81529756dba7a2ca -* arm64 support in vm_[basic_]asm.h + Other changes not captured in the git logs: -* asyncWebSocket: improve rmks warning message when WebSocket connection fails due to bad SSL cert. + * Resync with internal dev branch (2009.08.24) -* Implement MXUser semaphores on Mac OS with lib dispatch semaphores + * hgfsmounter/hgfsmounter.c: allow hgfs users to set ttl to 0 at mount time. -* Replace 3-clause BSD license template with 2-clause BSD license + * lib/guestApp/guestApp.c, lib/include/conf.h, lib/include/netutil.h, + lib/include/procMgr.h, lib/include/system.h, lib/vixTools/vixTools.c, + lib/vmCheck/vmcheck.c: remove (now unused) Netware checks. -* vm_basic_{types,asm}.h: cleanup architecture #ifdefs + * lib/message/*, modules/freebsd/vmhgfs/Makefile, + modules/linux/vmhgfs/Makefile.*, modules/solaris/vmhgfs/Makefile: remove + unused message transport abstraction. The rpcChannel library is now used to + do RPC abstraction. -* Add a surface flag for 16-byte image alignment in mobs + * modules/*/vmmemctl/*: refactor of the vmmemctl module as part of adding + support for Mac OS guests. -* Change config.version from String to Long. + * modules/linux/pvscsi/pvscsi.c: don't clobber RESERVATION_CONFLICT sdstat + up from linux pvscsi driver. -* Fix HGFS server change notification packet handling. + * modules/linux/shared/*: VMCI changes unrelated to the guest driver. -* Cleanup "vm_basic_defs.h" + * modules/linux/vmhgfs/fsutil.c, modules/linux/vmhgfs/inode.c: fix the case + where two directories refer to the same inode. -* vm_atomic: add ARM64 atomic operations. + * scripts/linux/*: support older versions of NetworkManager. -* Enable the HGFS VMCI VMX and HGFS server use the V2 header +2009-08-24 Marcelo Vanzin + * Resync with internal trunk (2009.08.19) -* Implement Devel ScreenShot command + * configure.ac: remove support for Linux kernels < 2.6.9. -* Fix the HGFS protocol opcode to differentiate headers + * lib/include/vmtools.h, libvmtools/vmtoolsLog.c, doc/api/services/util.txt: + add new log handled that allows appending to existing log files, and fix + an issue where old log files would be "rotated" whenever the config file + was reloaded. -* vmkBoot: refactor serial, arm64 serial & panic. + * lib/appUtil/appUtilX11.c, lib/ghIntegration/ghIntegrationX11.c, + lib/include/appUtil.h: fix compilation issues on FreeBSD when unity + was enabled. -* vm_atomic: fix arm64 ReadIfWriteEqual atomics. + * lib/dnd/dndLinux.c, lib/include/vmblock_user.h, tests/testVmblock/*: add + vmblock tests and, as part of the change, do some refactoring of vmblock + related functions. -* arm: bug fixes for uint*set implementations. + * lib/guestInfo/guestInfo.c, lib/include/wiper.h, lib/wiper/*, + toolbox/toolboxcmd-shrink.c, toolbox/toolboxShrink.c: refactor the wiper + structures so that they behave the same on Win32 and other platforms, and + also reuse data structures already in use by other parts of the code. This + fixes an "use after free" issue that toolbox-cmd had on Win32. -* Rework the tools heartbeat code in the VMX. + * lib/guestInfo/guestInfo.c, lib/guestInfo/guestInfoInt.h, + lib/guestInfo/guestInfoPosix.c, lib/guestRpc/nicinfo.x, + lib/include/guestInfo.h, lib/include/netutil.h, lib/include/slashProc.h, + lib/netutil/netUtilLinux.c, lib/slashProc/*, + services/plugins/guestInfo/guestInfoServer.c: add support for sending more + network-related information to the host, such as routing tables and name + servers. -* vm_atomic: eliminate non-ASCII chars in comment. + * lib/hgfsBd/hgfsBd.c: don't log RPC errors when HGFS is disabled. -* Remove the incorrect immediate constraint from 64-bit atomic ops + * lib/hgfsHelper/*, lib/include/hgfsHelper.h, lib/vixTools/vixTools.c: new + library with functions to query information about HGFS; expose some HGFS + properties through VIX. -* Refactor code under guestinfo/getlib. + * lib/hgfsServer/*, lib/hgfsServerPolicyGuest/hgfsServerPolicyGuest.c, + lib/include/hgfsServerPolicy.h: fix checking of whether an object belongs + to a particular share; this was causing issues with invalid information + being returned in certain cases. -* Remove __builtin_*_address(N) compile checks. + * lib/hgfsServer/*, lib/include/hgfsProto.h: changes to support new VIX API + calls (mostly affecting Win32 only). -* boot: misc. vmkernel changes to allow arm64 boot.c compile. + * lib/include/guestCaps.h, lib/include/unityCommon.h: add boilerplate for new + RPCs for setting windows as sticky / non-sticky (not yet implemented). -* debug: move debug to main/x86, arm64 stubs. + * lib/include/hgfsProto.h: new definitions for the next version of the HGFS + protocol. -* prda/specialstack: refactor to split out arch deps, arm64 support. + * lib/include/xdrutil.h: make XDRUTIL_ARRAYAPPEND() more type-safe when using + GCC. -* Cleanup guestinfo plugin header dependency. + * lib/misc/codesetOld.c: fix some issues with UTF16 -> UTF8 conversion. -* Change WSAAddressToString to WSAAddressToStringA + * lib/rpcChannel/rpcChannel.c, libvmtools/signalSource.c, + libvmtools/vmtools.c, libvmtools/vmtoolsConfig.c: g_assert -> ASSERT. -* Handle EINVAL for preadv and pwritev. + * lib/unityWindowTracker/unityWindowTracker.c: fix issue with z-ordering of + modal dialogs. -* Change GET_CURRENT_LOCATION definition. + * libvmtools/vmtoolsConfig.c: fix some old config translation issues. -* Check if __GLIBC_PREREQ is defined before using it. + * modules/freebsd/shared/*, modules/freebsd/vmblock/*: make vmblock work on + FreeBSD 8. -* Add support for IOMMU guest addresses > 16TB. + * modules/freebsd/vmmemctl/*, modules/linux/vmmemctl/*, + modules/solaris/vmmemctl/*, : refactoring and code changes to support the + driver on Mac OS X. -* + * modules/linux/vmblock/*, modules/linux/vmci/*, modules/linux/vsock/linux/*: + remove compatibility code for older kernels. -* Fix Atomic_Read on ARMv7. + * modules/linux/vmhgfs/*: fix memory leak in HgfsAccessInt(). -* Create a trivial view when both the texture and the view are R24G8 class. + * modules/linux/vmxnet3/*: fix kunmap usage in vmxnet3_shm, and reset the + shared pages when the char device is closed. -* vm_atomic: fix ARM 32/64-bit Atomic_Read. + * modules/linux/vsock/linux/af_vsock.{c,h}, modules/linux/vsock/linux/util.c: + add vsock protocol negotiation for notifyOn ops. This allows the driver to + negotiate with the remove end which version of the notification protocol to + use. -* OvhdMem refactor + pull from vmioplugin branch + * modules/linux/vsock/linux/notify.c, modules/linux/vsock/linux/notify.h, + modules/linux/vsock/linux/notifyQState.c, + modules/linux/vsock/linux/vsockPacket.h: add pktOn protocol. This new + protocol improves performance by detecting changes in the queue state + instead of sending WAITING_READ and WAITING_WRITE packets. -* cpuset/vm_basic_asm: use standard clr/ctz primitives. + * services/plugins/hgfsServer/hgfsPlugin.c, + services/plugins/resolutionSet/resolutionSet.c, + services/vmtoolsd/mainLoop.c, services/vmtoolsd/pluginMgr.c, + services/vmtoolsd/toolsRpc.c: load plugins even when an RPC channel cannot + be instantiated (i.e., when running outside of a virtual machine); this + allows plugins to perform actions (at load time) also when running outside + virtual machines (e.g., to undo some configuration done when the OS was run + in a VM). -* vm_basic_asm: fix windows build breakage. + * services/vmtoolsd/mainLoop.c, services/vmtoolsd/mainPosix.c, + services/vmtoolsd/toolsCoreInt.h: handle SIGHUP differently; instead of + stopping the service, just re-load the config data. This should make it + easier to integrate the tools service with other tools such as logrotate. -* vSock: Rename "VMCI Sockets". + * toolbox/toolbox-cmd.c, toolbox/toolboxcmd-stat.c: remove memory info query, + which didn't really return useful information. -* Disable nullDriver by default and add a config switch to enable it. + * vmware-user/copyPasteUI.cpp: if the clipboard/primary with most recent + timestamp has no data on it, try the other before giving up during + copy/paste. -* First submit of the VDTI PCI Device. +2009-07-22 Marcelo Vanzin + * Resync with internal trunk (2009.07.17) -* Cleanup/Rationalize coreDump + * configure.ac: fix detection of "dot" and its usage in the doxygen config + file. -* vSock VMX: Introduce a separate sendCb field + * configure.ac, libguestlib/Makefile.am, libguestlib/vmguestlib.pc.in: + install vmguestlib headers and add new pkgconfig script. -* Don't define g_info if it is available. + * lib/dndGuest/dnd.{cc,hh}, lib/include/dndBase.h, vmware-user/dndUI.{cpp,h}: + fix an issue where the DnD code would prevent drops to other windows in + Unity mode, instead of just intercepting drops to the desktop. -* A virtual USB video device backend. + * lib/dndGuest/dnd.{cc,hh}, lib/dndGuest/dndRpc.hh, lib/dndGuest/dndRpcV3.cc, + lib/include/dndBase.h, vmware-user/dndUI.{cpp,h}: fix an issue where the + host Unity code would cause an undesired drop event. -* A virtual video device backend. + * lib/dndGuest/dnd.{cc,hh}, lib/dndGuest/dndRpc.hh, lib/dndGuest/dndRpcV3.cc, + lib/include/dndBase.h: cleanup mouse simulation code, and fix an issue + where a drag would be canceled if the contents were dragged out of a guest + and then back in. -* Skip freezing remote mounts. + * lib/dndGuest/dndRpcV3.cc, vmware-user/copyPasteDnDWrapper.cpp, + vmware-user/dndUI.cpp, vmware-user/dndUI.h, vmware-user/dragDetWnd.cpp, + vmware-user/dragDetWnd.h: several DnD fixes; make the DnD code behave + more like other GTK applications (based on analysing the flow of signals + on a test widget), and get rid of one of the detection windows, merging + both the Unity and non-Unity windows. Also, some code refactoring. -* lib/file: Various fixes to FileIOP(read|write)vInternal and FileIO_(Readv|Writev). + * lib/ghIntegration/*, lib/guestRpc/*, lib/include/guestCaps.h, + lib/include/unityCommon.h: add stubs for a few new GHI functions (setting + window focus, tray icon updates and enhanced app info) - currently only + implemented on Win32. -* Use int 31 instruction to trigger an assert in the VMKernel + * lib/ghIntegration/ghIntegrationX11.c: examine WM_CLASS when determining + which DE Tools are running in. The previous code was failing to show a + few entries set as "OnlyShowIn=xxx" because checking WM_NAME wasn't enough + to properly detect the desktop environment in certain cases. -* vm_basic_asm: fix uint32set for arm64. + * lib/guestApp/guestAppPosixX11.c: use gconftool-2 to detect the user's + browser, since gnome-open fails to open "file://" URLs which contain query + strings. Also, use "kde-open" when running under KDE. -* Clean up of APIs used by the HGFS server library + * lib/guestInfo/guestInfo.c, lib/include/wiper.h, lib/wiper/wiperPosix.c: + allow shrinking LVM partitions. -* Clean up the HGFS server shares interface to the HGFS server part II + * lib/include/appUtil.h: partial refactoring of icon retrieval code. -* Ignore disk UUIDs from the paths to be frozen. + * lib/include/dbllnklst.h, lib/misc/dbllnklst.c: inline linked list + functions. -* Clean up the HGFS server use of the policy share enumeraton APIs + * lib/include/guest_os.h, lib/misc/hostinfoPosix.c: add a couple of + distros to the known distro list. -* fix HostinfoGetOSShortName to support Debian 7.x + * lib/include/netutil.h, lib/netUtil/netUtilLinux.c: add Linux interface + name, index lookup routines. -* remove unnecessary constraints for ABSOLUTELY_NOINLINE define + * lib/include/system.h, lib/system/systemLinux.c, + services/plugins/timeSync/timeSync.c: fixes a few bugs in the backwards + time sync code, mostly due to unit mismatches. -* More clean up the HGFS server manager, policy manager APIs + * lib/include/unityWindowTracker.h, lib/unity/unity.c, + lib/unity/unityPlatform.h, lib/unity/unityPlatformX11Window.c, + lib/unityWindowTracker/unityWindowTracker.c: expose two new properties in + the window tracker to save an RPC to retrieve those properties. -* Remove MPN32 related macros. + * lib/include/vmtoolsApp.h, services/vmtoolsd/mainLoop.c, + services/vmtoolsd/pluginMgr.c, services/vmtoolsd/toolsCoreInt.h: add + support for "application providers", which allow plugins to add support to + new kinds of application frameworks through vmtoolsd. -* lib/uuid: Add CreateRandomEFI, and cleanup + * lib/unity/unityPlatformX11.c: only enable GIO channels when Unity is + actually active. -* Fix buffer overflow in perfMonLinux + * lib/unity/*: cleanup old GTK1 code. -* AsyncSocket: hostname/IP string connection functions should attempt both IPv4 and IPv6 connections. + * libvmtools/vmtoolsConfig.c: don't complain if config file is empty. -* lib/lock: lock tracking tree optimization + * modules/linux/dkms.conf, modules/linux/dkms.sh: fix dkms.conf, and provide + a script to create a dkms tree from open-vm-tools. -* Fast send on the asynNamedPipe if Write completes synchronously. + * modules/linux/shared/vmci_queue_pair.h, modules/linux/vmci/vmciKernelIf.c: + remove two (now) unneeded functions. -* increase MAX_MPN to 38 bits + * modules/linux/vmhgfs/*: code cleanups, properly initialize the list head, + and allow receives to timeout so that hibernation works. -* finish conversion of invalid_mpn64 and max_mpn64 + * modules/linux/vmxnet/vmxnet.c, modules/linux/vmxnet3/vmxnet3_drv.c: fix + drivers for kernels 2.6.29+. -* Change Mul64x3264 family of functions to round instead of truncating + * modules/linux/vmxnet3/*: add shared memory support for faster communication + between user space and the device backend; this doesn't affect the regular + driver functionality, but is used by some VMware code not part of Tools. -* Add CACHELINE_SIZE to vm_basic_defs.h. + * modules/linux/vsock/*: fix an issue where it was possible for users to send + VMCI datagrams directly to the hypervisor. -* Memory is accessed after being freed in function + * scripts/common/vmware-user.desktop: work around a bug in KDE where desktop + files with "NoDisplay" fail to autostart. -* Add some debug noise to RPCs received in guest. + * scripts/freebsd/suspend-vm-default: use netif to bring down interfaces, + since dhclient doesn't understand "-r" in the default install. -* Add SMAP support to MMU page walkers and MonTLB + * services/plugins/vmbackup/*: add some new code used by enhancements being + done in the Win32 version of the plugin. -* lib/file: File_Rotate needs some protection + * services/vmtoolsd/mainPosix.c: fix running in background when executing + vmtoolsd while relying on PATH. -* Hgfs VMCI: move packet max size to the correct location + * services/vmtoolsd/Makefile.am: point to the correct plugin install + directory. -* Hgfs Server: remove transport only header file from the server. + * toolbox/*: better command line handling in the CLI utility, plus some code + cleanup. -* Log errors in RandomBytesWin32. + * vmware-user/copyPaste.c, vmware-user/copyPasteDnDWrapper.cpp, + vmware-user/copyPasteDnDWrapper.h, vmware-user/dnd.c: properly unregister + RPCs to avoid multiple registrations (and the ensuing ASSERT) in certain + cases. -* Defer the RunScript cleanup when VIX commands are restricted. + * vmware-user/copyPasteUI.{cpp,h}: change way data is retrieved from the + clipboard, using the gtk+ clipboard wait APIs (which turn out to be more + reliable than the previous approach). -* Add support in resolution set to log multiple sessions in RDSH. +2009-06-18 Marcelo Vanzin + * Resync with internal trunk (2009.06.15) -* Make Clamped_SAdd32 more robust against compiler options + * docs/api/Makefile.am: replace all variables in the doxygen conf file with + the correct values. -* Compare the remote FS type strings the right way. + * lib/appUtil/appUtilX11.c: try alternate file extensions during icon search. + Sometimes a package lists its icon as icon-foo.png, but the package didn't + include icon-foo.png. Instead, it included icon-foo.xpm. Ex: Ubuntu + 8.04's hwtest. -* VIX plugin under vmusr should not register for TOOLS_CORE_SIG_IO_FREEZE. + * lib/guestApp/guestAppPosixX11.c: change detection of the default browser so + that the new help system works; the help files are not yet available in + open-vm-tools. -* Add runtime macros to check type of tools service. + * lib/hgfs/*, lib/include/cpName.h, lib/include/cpNameLite.h, + lib/include/hgfsUtil.h: avoid compiling certain parts of the source in + kernel modules. -* vm_atomic: remove unfenced atomic operations. + * lib/hgfsServer/*: return correct error when files / directories don't + exist. -* vm_atomic: LOCK-like semantics for arm64 atomics. + * lib/include/hgfsChannel.h, modules/linux/vmhgfs/*: added support for vsock + channel for HGFS. -* refcount/vm_basic_asm: multi-architecture memory barriers. + * lib/include/util.h, lib/misc/utilMem.c: un-inline a bunch of functions to + reduce the size of binaries. -* Hgfs Server: Fix unpacking of protocol header unused fields + * lib/include/vm_tools_version.h: bumped Tools version. -* Enlarge MAX_IFACES to ensure vmtools could get a valid GOS IP throguh NetUtil_GetPrimaryIP(). + * lib/resolution/resolutionX11.c: fix for issue where the host would send + a "topology set" command with a top-left corner that was not (0, 0) and + cause the screen to be reconfigured in the wrong way. -* Change BPN to be a 64 bit type. + * lib/unity/unityPlatformX11Window.c: check for errors in calls to + XQueryTree. -* lib/lock: MXUser_Control* -> typed functions [trivial?] + * lib/wiper/wiperPosix.c: check return of fgets() to avoid compiler warnings. -* fix bad error + * libvmtools/vmtools.c: fix initialization of wiper library on Win32. -* ARM64: Add more basic assembler support + * modules/Makefile.am: install vsock header file on Linux. -* Guest Tools: Add memNeeded for Windows and Linux and handle versioning + * modules/freebsd/vmhgfs/*, modules/linux/vmci/*, modules/linux/vsock/*: + changes related to 64-bit Mac drivers, don't affect either the FreeBSD + or Linux drivers. -* Fix incorrect LRU file accounting for memNeeded on Linux + * modules/linux/vmhgfs/hgfs.h: removed duplicate file. -* Change the bit representation of BPN to make way for NVM. + * modules/linux/vmhgfs/fsutil.c, modules/linux/vmhgfs/inode.c, + modules/linux/vmhgfs/module.h: fix issue where two files would get the + same inode number in some situations. -* tools perf mon: collect more stats from /proc/meminfo + * modules/linux/vmxnet/vmxnet.c: re-probe vmxnet2 device features on resume + from hibernate, to cover the case where a VM is resumed on a platform with + a different version of the device backend (bug #2209565). -* Remove vmxwifi.sys and macWireless_defs.h + * scripts/resume-vm-default, scripts/suspend-vm-default: use NetworkManager + to handle networking where it is available. -* tools perf mon: refactor + * services/plugins/hgfsServer/Makefile.am, services/plugins/vix/Makefile.am: + fix installation of vmusr plugins that are shared with vmsvc. -* tools data collection: Collect all of the new Linux data + * services/plugins/timeSync/timeSync.c: fix backwards time sync. -* Guest stats: fix the time base + * services/vmtoolsd/cmdLine.c, toolbox/toolbox-cmd.c: print build number as + part of "-v" output. -* gos tables: Table must be sorted; reinsert "coreos-64" accordingly + * toolbox/toolboxcmd-shrink.c: correctly ignore unsupported partitions when + shrinking. -* guest performance data: no need to have a maximum RPC transfer size + * toolbox/toolbox-gtk.c: changes for the new help system, not yet available + for open-vm-tools. -* guest perf stats: replumb GuestInfo_PerfMon + * toolbox/toolboxInt.{c,h}, toolbox/toolboxScripts.c: some code refactoring. -* guest perf stats: GuestInfo_PerfMon builds the RPC data itself + * vmware-user/Makefile.am: fix linking when compiling without gtkmm. -* guest perf data: collect the Linux data +2009-05-22 Marcelo Vanzin + * Resync with internal trunk (2009.05.18) -* guest perf data: return the new protocol + * configure.ac, m4/vmtools.m4: check for PAM and enable PAM support when + available. -* guest perf stats: ice the cake (add some polish) + * configure.ac, services/plugins/*/Makefile.am, tests/*/Makefile.am: avoid + the "-rpath" hack to create plugins, using plugin_LTLIBRARIES instead (and + manually fixing things when necessary). Thanks to Dominique Leuenberger for + the suggestion (and sample patch). -* guest perf stats: Linux goes to the new format + * docs/api/Makefile.am: fix doc target directories. -* Hgfs Posix Server: fix the writes to not exceed max file size + * configure.ac, lib/Makefile.am, lib/deployPkg/*, lib/include/deployPkg.h: + remove the deployPkg code, which depends on some VMware code that is not + yet open source. -* Stick backdoor behavior after vSocket connection failure. + * lib/backdoor/*, lib/hgfs/*, lib/hgfsBd/*, lib/include/*, + lib/include/compat/*, lib/message/*, lib/misc/dbllnklst.c, + lib/rpcOut/rpcout.c: as part of sharing code between user-level code and + kernel modules, some files have been tagged with more than one license. -* Hgfs Posix Server: fix Solaris tools obj builds for log statements + * lib/dndGuest/*, lib/include/dndBase.h, lib/include/dndMsg.h, + lib/include/unity*, lib/unity/unityPlatformX11.c: implement mouse movement + from within the guest; this avoids a dependency on "unofficial" mouse APIs + in the VMware host code, making DnD more reliable, and makes a few things + (such as cancelling an ongoing DnD operation) easier. -* Fix memory leak in hgfs server. + * lib/file/filePosix.c: make File_FullPath()'s behavior consistent when the + input path starts with a '/'. -* Implement QuadBlit for DX11Renderer. + * lib/ghIntegration/ghIntegration.c: send more info about the "start menu" + contents to the host (only usable for Windows guests). -* Add feature-specific RDE Dev Targets - folderRedirection, tsmmr, viewMP + * lib/ghIntegration/ghIntegrationX11.c: prettify the category names of menu + items. This is a temporary solution before actually reading this + information from .desktop files. -* MX_Lock should not use HLE on unpatched Haswell systems + * lib/guestApp/guestApp.c, libguestlib/vmGuestLib.c, lib/include/guestApp.h, + toolbox/toolbox-gtk.c, vmware-user/foreignVM*, vmware-user/vmware-user.cpp, + configure.ac, lib/Makefile.am, lib/include/socketMgr.h, lib/socketMgr.*: + remove code related to "foreign VM" support, which was never really used. -* Hgfs Posix Server: add some useful logging for symlink names + * lib/guestInfo/guestInfo.c, lib/include/wiper.h, lib/wiper/wiperPosix.c: + properly report disk info for LVM volumes. -* lib/file: Don't leak a filename in FileRotateByRenumber. + * lib/hgfsServer/hgfsDirNotify*, lib/hgfsServer/hgfsServer.c: add support + for directory / file monitoring. It's currently only implemented on + Mac OS X. -* Hgfs Posix Server: add more useful logging to open + * lib/hgfsServer/hgfsServer*: fix issue where it was possible to + create a file on a read-only share on Windows hosts. -* Hgfs Posix Server: fix open requests failing EAGAIN (EWOULDBLOCK) + * lib/hgfsServer/hgfsServer*, lib/hgfsServerManagerGuest/*, + lib/include/hgfs*.h, services/plugins/hgfsServer/hgfsPlugin.c, + services/plugins/vix/foundryToolsDaemon.c: some refactoring caused by the + work to make HGFS support pluggable transports. -* Sometimes channel can be NULL, this will make vmtools panic. + * lib/include/procMgr.h, lib/procMgr/procMgrPosix.c: + remove ProcMgr_GetAsyncStatus(). -* lib: misc/sig support for arm64 (redux). + * lib/include/vmsupport.h, scripts/vm-support, xferlogs/xferlogs.c, + services/plugins/guestInfo/guestInfoServer.c: new feature to automatically + collect support data from the guest from the VMware UI. -* HostType: stop using sysctl + * lib/panicDefault/*, lib/user/*: change file names to avoid clash with + another file (Mac OS linker doesn't really like that). -* authPosix: use getspent when using shadow password, but not PAM + * lib/rpcChannel/rpcChannel.c: try to reinitialize the outbound channel on + failure. -* Added protocol selection to bora AsyncWebSocket.- Changed VNC Client offer 'vmware-vvc' protocol as an additional protocol. + * lib/vixTools/vixTools.c, lib/include/vixCommands.h, + lib/include/vixOpenSource.h: add backend for new VIX API call to list the + guest's filesystems. -* Enable 3D with DX11Renderer and port over the existing PROTOTYPE RenderOps functions. + * libvmtools/vmtoolsLog.c: lazily open the log file, instead of opening it + during configuration of the log system. This way two processes can use the + same conf file and not overwrite each other's log files (assuming the conf + data is sane). -* Create the support dir under /tmp instead of CWD. + * modules/Makefile.am, modules/linux/vmci/Makefile.kernel, + modules/linux/vsock/Makefile.kernel: don't store VMCI module symbols in + /tmp during build; this avoids a possible symlink attack that could cause + data to be overwritten when building open-vm-tools. -* Disable NullDriver backend only for forceQuiece case. + * modules/*/*, vmblock-fuse/*: remove a lot of duplicated files by either + moving them to a shared location or reusing files that were already + available elsewhere. -* Hgfs Server: fix malformed symlink creation requests + * modules/freebsd/vmblock/subr.c, modules/freebsd/vmblock/vmblock_k.h, + modules/freebsd/vmblock/vnoops.c: fix a possible kernel crash caused by + trying to read / write to the mount point (something vmware-user does to + detect whether it's using fuse or non-fuse vmblock). -* Hgfs Server: fix check malformed read packets + * modules/linux/pvscsi/*: adds support for a generic msg framework that is + currently used to deliver hot-plug/unplug notifications; get rid of a few + divisions; fix a bug where pvscsi_probe could return 0 (aka success) if + a call to kmalloc() failed; remove a few unused fields. -* Fix Ubuntu errors in the vm-support script. + * modules/linux/shared/vmci*: mostly changes related to the host VMCI drivers + (removed user-level queue-pair daemon, added support for trusted VMCI + endpoints) to keep binary compatibility between the host and guest VMCI + drivers. -* Expose BDOOR_CMD_VCPU_MMIO_HONORS_PAT to guest. + * modules/linux/hgfs/inode.c: check host's access rights when checking file + permissions, so that permissions are correctly checked when the guest's + user id is different from the host's user id. -* Add optional websocket protocols parameter to AsyncSocket_ListenWebSocketUDS. If NULL then default (legacy) protocols are used. + * modules/linux/bdhandler.*, modules/linux/filesystem.c; modules/linux/tcp.*, + modules/linux/transport.*,: postpone opening the channels so that module + can load successfully even if shared folders are disabled on the host; + fix a synchronization problem between recv and close/open; allow + hibernation to work by timing out the recv thread; correctly handle + failures in recv, including injecting a dummy error to the pending + requests when the recv thread exits; move the recv code to the channel's + implementation so that it can be simpler. -* Allow the network script to bring each individual interface up/down. + * modules/linux/vmxnet3/vmxnet3.c, modules/linux/shared/compat_pci.h: fix + Wake-On-LAN for 2.6.27 and newer Linux guests. -* deployPkg plugin: make deployPkg.cpp build as C or C++ + * modules/linux/vsock/linux/*: changes to support trusted VMCI host apps; + pull out notification and stats logging code into their own files. -* GOSTable: Plumb vmkernel6 as a separate bit + * modules/solaris/vmhgfs/vnode.c: do not substitute errors returned by + uiomove() calls with EIO, propagate returned error code (which is EFAULT) + up the stack. -* add deployPkg files to open-vm-tools + * services/vmtoolsd/Makefile.am, scripts/common/linux/pam.d/vmtoolsd-x64, + scripts/common/linux/pam.d/64/vmtoolsd: install the 64-bit PAM config + file with the correct name. -* Introduce mkfsPmem, libpmem for managing pmem resources via the kernel from user-space. + * services/plugins/powerOps/powerOps.c: fix running default scripts by + making sure the path to the script is absolute. -* Allow to queue MCE requests form the kernel to the VMM. + * services/vmtoolsd/Makefile.am, services/vmtoolsd/pluginMgr.c: use info + from the configure step to define the plugin path; this avoids requiring + a symlink to be placed in /etc/vmware-tools for vmtoolsd to be able to + find the plugins. -* HGFS: Remove R/R + * services/vmtoolsd/toolsRpc.c: send the build information to the host so + it's logged in the VM's logs. -* Replace PUSHF/POPF with STAC/NOP when setting EFLAGS.AC + * toolbox/toolbox-cmd.c, toolbox/toolboxcmd-*, toolbox/toolboxCmdInt.h: + make string comparison case-insensitive on Win32. -* lib/file: hostd crashes in assertion failure due to file list + * toolbox/toolboxcmd-shrink.c: properly finish the shrinking process by + sending the "disk.shrink" RPC to the host. -* Tools: Create GuestInfo_GetPrimaryIP as a IPv6 compliant version of NetUtil_GetPrimaryIP + * toolbox/toolboxScripts.c: fix showing default settings for power ops + scripts (should show default script enabled, not script disabled). -* Remove memNeeded calculation from the guest tools + * vmblock-fuse/Makefile.am: fix compilation on FreeBSD. -* Move SIZE_xxBITS to common architecture file. + * vmware-user/copyPasteUI.cpp: disallow copy-paste text of size greater than + 4MB, instead of truncating the data. -* GOSTable: Windows 10 as a unique guest + * vmware-user/dndUI.*, lib/dndGuest/dnd.cc, lib/include/dndBase.h: remove + drag timeout callback (which was not needed), and add new signal to + indicate that a GH DnD was cancelled. -* Set _FILE_OFFSET_BITS=64 for Solaris + * vmware-user/Makefile.am: remove C++ link hack (not needed now since + vmware-user has C++ code already). -* Plumbing to expose (whitelisted) vsi-based stats in guest +2009-04-23 Marcelo Vanzin + * Resync with internal trunk (2009.04.17) -* Assorted _FILE_OFFSET_BITS=64 / _LARGEFILE64_SOURCE fixups + * configure.ac, Makefile.am, docs/*: build API docs for vmtools; the + documentation files are provided under a BSD-style license. -* Serial: [2/16] Serial8250 - refactor into generic and platform parts. + * configure.ac, Makefile.am, guestd/*, lib/Makefile.am, lib/guestInfo/*, + lib/include/vmbackup_def.h, lib/include/vmBackup.h, lib/vmBackupLib/*, + libvmtools/Makefile.am, services/plugins/vmbackup/vmbackup_def.h: remove + guestd from open-vm-tools, and clean up code in other places that was only + there because of guestd. -* lib/log: Improve the level filtering implementation and documentation + * configure.ac, modules/solaris/vmblock/*, modules/solaris/vmmemctl/*: add + Solaris vmblock and vmmemctl driver sources. The vmmemctl module also + includes a user-level daemon (vmmemctld.c). -* lib/log: no need to "blip" the lock + * lib/conf/conf.c, lib/include/conf.h, libvmtools/vmtoolsConfig.c: remove + unused config options. -* lib/misc: header clean up + * lib/deployPkg/toolsDeployPkg.h: code refactoring. -* Add 16 bits atomics to vm_atomic.h. + * lib/dnd/dndClipboard.c: if size of clipboard exceeds the maximum backdoor + packet size, only keep text data (dropping the RTF data). -* Add 16 bits atomics for arm64 + * lib/dnd/dndLinux.c, lib/include/dnd.h, lib/include/vmblock.h, + vmware-user/copyPaste.c, vmware-user/dnd.c, vmware-user/vmware-user.cpp, + vmware-user/vmwareuserint.h, vmware-user-suid-wrapper/main.c: detect + whether plain vmblock or vmblock-fuse is being used, allowing the same + executable to be used with either. -* Clean up some file headers + * lib/dndGuest/*, vmware-user/copyPaseDnDWrapper.{cpp,h}, + vmware-user/dndUI.{cpp,h}, vmware-user/dragDetWnd.{cpp,h}: + vmware-user/vmware-user.cpp: more DnD V3 protocol work. -* Begin plumbing guest mks stats out to the host. + * lib/ghIntegration/*, lib/include/guestCaps.h, lib/include/unityCommon.h: + work related to mapping Outlook folders over HGFS and exposing the Windows + Recycle Bin to the host (doesn't really affect open-vm-tools). -* lib/log: improved documentation in log.h + * lib/ghIntegration/ghIntegrationX11.c: restore the native environment when + launching external applications. This doesn't really affect open-vm-tools. -* Converting MPN to MPN32. + * lib/guestRpc/*, vmware-user/copyPasteUI.{cpp,h}: implement RTF and file + contents copy & paste. -* Reimplement guestproxycerttool.pl in C. + * lib/include/circList.h, lib/include/vm_basic_math.h, + lib/include/vm_device_version.h, modules/linux/*, modules/Makefile.am: + changes to share files between the user space code and the kernel code, + instead of duplicating the same source files in different places. -* Atomic Boolean support + * lib/include/rpcChannel.h, lib/rpcChannel/*, tests/testDebug/testDebug.c, + test/vmrpcdbg/debugChannel.c: some code cleanup, and fix crash when dealing + with multiple reset messages. -* Add grabbitmqProxy plugin to open-vm-tools. + * lib/include/system.h, lib/system/systemLinux.c, + services/vmtoolsd/mainPosix.c: remove System_Daemon() (replaced with + Hostinfo_Daemonize()). -* Windows 10: an all Windows 10 macro + * lib/include/unityCommon.h, lib/unity/*: ressurrect UNITY_RPC_WINDOW_SHOW + and UNITY_RPC_WINDOW_HIDE RPCs. -* Remove some vacuous FileIO usage + * lib/procMgr/procMgrPosix.c: fix ProcMgr_IsProcessRunning(). -* Introducing 64-bit MPN type. + * lib/system/systemLinux.c: fix shutdown / reboot commands on Solaris; fix + rebuilding of native environment from variables set by VMware scripts (this + last one doesn't really affect open-vm-tools). -* mks: add shared-secret authentication for Blast websocket connections + * lib/unicode/unicodeSimpleTypes.c: speed up UnicodeIANALookup, and fix case + where C++ constructors could call UnicodeIANALookup before Unicode_Init() + was called by lazily creating the internal cache. -* Windows 10: add macros for all 32 and all 64 bit + * libguestlib/*: link libguestlib against libvmtools. This avoids having + two definitions of certain symbols (like Debug()) when an application + links to both libraries. -* Add guestproxycerttool (C-implementation) to open-vm-tools and OSPs. + * modules/linux/vmblock/linux/control.c: only set directory entry owner when + needed. -* cleanup app balloon in vmm, vmx, and parts of vmkernel + * modules/linux/vmhgfs/bdhandler.{c,h}, modules/linux/vmhgfs/dir.c, + modules/linux/vmhgfs/file.c, modules/linux/vmhgfs/filesystem.c, + modules/linux/vmhgfs/fsutil.c, modules/linux/vmhgfs/inode.c, + modules/linux/vmhgfs/module.{c,h}, modules/linux/vmhgfs/page.c, + modules/linux/vmhgfs/request.{c,h}, modules/linux/vmhgfs/super.c, + modules/linux/vmhgfs/tcp.{c,h}, modules/linux/vmhgfs/transport.{c,h}: + cleanup use of atomic variables in HGFS; add a transport abstraction layer, + and add an initial version of a socket-based transport (not yet stable and + not yet supported by any released VMware product). -* Honour panic.breakOnPanic on Posix. + * modules/linux/vmxnet3/vmxnet3.c: fix build on kernel 2.6.29. -* hashTable: free function work like our other free functions + * modules/linux/vsock/af_vsock.c: export more functions to other kernel + modules; some changes to statistics gathering code. -* Introduce certificate hash verification in blast native clients. + * modules/solaris/vmhgfs/filesystem.c: make module loadable on Solaris 9. -* Forward declare sslverifyparam in ssldirect.h + * modules/solaris/vmhgfs/vnode.c: unify mapping of HGFS to Solaris error + codes. -* asyncWebsocket: move WebSocketHandshakeState into asyncWebSocket.c + * scripts/*: restart network before running user scripts in resume scripts. -* RecordReplayRemoval: make RR go away from automation tools. + * services/plugin/powerOps/powerOps.c: fix running default power scripts. -* tools: improved memNeeded + * services/vmtoolsd/pluginMgr.c: better error logging. -* guest stats: Use DynBufs + * toolbox/toolbox-cmd.c: fix help string. -* guest tools: a bit of consolidation + * vmblock-fuse/block.c: fix vmblock-fuse compilation on FreeBSD. -* guest stats: rates in pages per second +2009-03-18 Marcelo Vanzin + * Resync with internal trunk (2009.03.13) -* Guest stats: Dynamically capture stats in Linux + * configure.ac: check for FreeBSD kernel tree when building modules; warn + about which version of make to use when building kernel modules on FreeBSD + and Solaris; add compiler defines for identifying Solaris 9 and 11. -* guestStats: optimize memory allocation + * configure.ac, modules/Makefile.am: handle SYSDIR on FreeBSD. -* guest stats: Linux deals with overflow + * guestd/main.c, modules/solaris/vmhgfs/Makefile: remove HGFS-related that + is now obsolete with the recent changes to the HGFS module on Solaris. -* guest stats: consistent open file failure messages + * guestd/toolsDaemon.c: default to the configuration dir when the power + script path is not absolute. -* GuestStat: improve function header + * guestd/toolsDaemon.c, lib/include/guestInfo.h, lib/netUtil/netUtilLinux.c: + handle case when all network interfaces have been disabled and send an + "unknown" IP address to the host. -* GuestStat: more function header cleanup + * guestd/toolsDaemon.c, services/vmtoolsd/toolsRpc.c: always send + TOOLS_VERSION_UNMANAGED from an open-vm-tools build, so there's no need for + a config file option anymore. -* Stop publishing guest stats from VSI/GuestMemInfo structure. + * hgfsclient/*: make it link to libvmtools to avoid code duplication. -* Guest Stats: extensible reporting + * lib/appUtil/appUtil.c: update list of "skippable" apps when figuring out + an application's path. -* Use new #define _DEFAULT_SOURCE to build open-vm-tools. + * lib/auth/authPosix.c, scripts/linux/pam.d/*, guestd/Makefile.am, + services/vmtoolsd/Makefile.am : change the name of the PAM application to + "vmtoolsd" to reflect the new service name. -* Publish Windows guest stats via V5 format + * lib/dnd/dndFileContentsUtil.h, lib/dnd/dndInt.h, lib/dndGuest/*.hh, and + corresponding files in lib/include: relocate private headers. -* Guest stats: Only populate Linux legacy values that have been consumed + * lib/ghIntegration/ghIntegration.c, lib/ghIntegration/ghIntegrationInt.h, + lib/ghIntegration/ghIntegrationX11.c, lib/include/unityCommon.h: glue code + for Outlook mirrored folder, which does not affect open-vm-tools. -* guest stats: Linux publish names as defines + * lib/guestRpc/guestlibV3.x, lib/include/vmGuestLib.h, + libguestlib/vmGuestLib.c: add new guestlib counters. -* Windows stat code cleanup + * lib/include/conf.h, toolbox/toolbox-gtk.c: remove the need for the + "helpdir" config option; this doesn't really affect open-vm-tools since the + help files are not yet included. -* GuestStat: official registed the build in names + * lib/include/guest_os.h, lib/misc/hostinfoPosix.c: more guest OS names; fix + name used to identify Solaris to match what VMware's host code expects. -* Adjust lock ranks for IO filters. + * lib/include/guestStats.h: documentation changes. -* asyncWebSocket: remove hybi designator and consolidate code + * lib/include/hostinfo.h, lib/user/hostinfoPosix.c: add a new function that + behaves like daemon(3), but is more Mac OS-friendly. -* asyncWebSocket: simplify protocol lists and framing + * lib/include/toolsLogger.h, lib/Makefile.am, lib/toolsLogger/*: removed + library, which is not used anymore. -* asyncSocket: simplify the interface for specifying websocket protocols + * lib/include/vm_basic_types.h, lib/misc/timeutil.c: fixes to compile under + (Open) Solaris 11. -* GuestStat: Name data is properly name string + * lib/include/vmtoolsApp.h, services/plugins/vmbackup/stateMachine.c, + services/vmtoolsd/mainLoop.c, services/vmtoolsd/mainPosix.c, + services/vmtoolsd/serviceObj.c, services/vmtoolsd/toolsCoreInt.h: add new + signal handler to gather debugging information from a running vmtoolsd + instance. -* lib/misc: Support Util_IsAbsolutePath on Solaris and FreeBSD + * lib/misc/posixPosix.c: fix off-by-one error. -* Hgfs Server: fix unpack of file name args for directory open + * lib/unity/unity.c, lib/unity/unityPlatform.h, lib/unity/unityPlatformX11.c, + lib/unity/unityPlatformX11Settings.c: always send Unity updates using RPCI; + this avoids a possible race between replying to an incoming RPC and sending + an Unity update from a different thread; also, API documentation updates. -* Minor updates to windows stat code + * lib/unity/unityPlatformX11.c: verify the DnD detection window was + initialized before actually using it. -* GuestStats: Better data validation and names + * lib/unity/unityPlatformX11Settings.c, lib/unity/unityPlatformX11Window.c: + reset _NET_WM_DESKTOP as necessary before exiting Unity; this could cause + guest taskbars to disappear when in Unity mode. -* Debug log messages and minor fixes. + * lib/unity/unityPlatformX11.c, lib/unity/unityPlatformX11Window.c, + lib/unity/unityX11.h: examine WM_CLIENT_LEADER when gathering application + information; certain applications use this property to define the window + where the WM_COMMAND property should be. -* Add TLS caching for gettid calls on Linux + * lib/vixTools/vixTools.c: do not follow symlinks when deleting files in the + guest using the VIX API. -* Add File_DeleteDirectoryContent. + * libvmtools/vmtools.c, libvmtools/vmtoolsLog.c: allow the logging subsystem + to be re-configured, and clean up the logging data when unloading the + library; allow ${USER} and ${PID} to be used in log file paths. -* Allow vm-support script execution only for root user. + * modules/freebsd/vmblock/subr.c, modules/freebsd/vmblock/vnops.c: fix kernel + panic on FreeBSD 7. -* GuestStats: rationalize the stat datum bits + * modules/linux/*/Makefile: remove GCC version check. -* No more MPN64 type. + * modules/linux/*/compat_wait.h: fix COMPAT_DEFINE_WAIT for "vanilla" 2.4 + kernels. -* Gettid TLS: fix coredumping + * modules/linux/vmhgfs/Makefile.normal: fix build of HGFS module on 2.4 + kernels. -* sigPosix scrub: more consistent self-signal behavior and remove unused code + * modules/linux/vmxnet/*, modules/linux/vmxnet3/*: avoid using compat + functions when they're not needed; add compatibility functions for + newer Linux kernels. -* Guest Stats: fix alphabetization + * modules/linux/vsock/linux/af_vsock.c: fix two races; one when the socket + state changed between calls to VSockVmciRecvStreamCB and + VSockVmciRecvPktWork, and another when trying to read from the socket after + a RST arrived after the socket got a detach notification. -* Publish stats for Windows pagefile size and used subset in KB + * modules/solaris/vmxnet3/*: add Solaris vmxnet3 driver. -* GuestOps: Set file ownership before setting file permissions. + * rpctool/*: add "rpctool", a simple, stand-alone tool to send RPC commands + to the host software. -* GuestStats: no time units. + * services/plugins/guestInfo/guestInfoServer.c: don't cache configuration + data. -* GuestSDK: remove vmtools.dll/so dependency + * services/plugins/guestInfo/perfMonLinux.c: fix problem with overwriting + flags after GuestInfoMonitorReadMeminfo() was called. (Same as fix to + lib/guestInfo on previous release.) -* Use new generic way to collect guest stats and remove unused legacy guest stats. + * services/plugins/powerOps/powerOps.c: handle power ops-related options + sent from the host. -* Remove vmioplugin. + * services/vmtoolsd/mainLoop.c: handle re-loading the configuration file. -* Use GOnce in pollGtk instead of a static mutex. + * services/vmtoolsd/mainPosix.c: exec after forking on Mac OS, since + CoreFoundation classes don't work after a fork. -* Update hgfsServer alias code. + * services/vmtoolsd/pluginMgr.c: allow both 32 and 64 bit plugins to be + installed on Solaris by loading them from the appropriate directory; + add library loading code that is not really needed (nor used) in + open-vm-tools. -* Inline ASM for rotate left/right instruction + * services/vmtoolsd/toolsRpc.c: send another "capability" the host expects + from Tools. -* Add backdoor command to restrict vmmouse + * toolbox/toolbox-gtk.c: add F1 shortcut to invoke help. -* Add Posix File to hgfsURI + * toolbox/toolboxScripts.c: fix issue with freeing data that should not be + freed. -* lib/file: FileSleeper must really sleep + * vmware-user/*: implement the new DnD protocol (V3). -* Fix unnecessary cast -* Add LIKELY/UNLIKELY into MXUserRec +2009-02-18 Marcelo Vanzin + * Resync with internal trunk (2009.02.13) -* Fix argument order for InterlockedCompareExchange8 + * configure.ac, m4/vmtools.m4: clean up a lot of the library detection code. -* rmks/ssl: change SSL verification for View/Blast RMKS connections to reject mismatched thumbprint always + * configure.ac: remove support for gtk+ 1.2 (code already depended on it in + any case); enforce need for glib 2.6.0 or later due to new code being + added; add detection for gtkmm; check for C++ compiler when it's needed; + reorder the include path to avoid clashing with system headers in some + situations. -* GuestStats: Linux active/inactive anon buffers + * guestd/foundryToolsDaemon.*, vmware-user/foundryToolsDaemon.*, + guestd/Makefile.am, vmware-user/Makefile.am: moved shared source files to + a new place to avoid duplication. -* GuestStats: order the linux stats + * hgfsmounter/hgfsmounter.c: add support for Solaris. -* GuestStats: Clean up include file + * lib/appUtil/appUtilX11.c: fix loading of icons when the name has a period. -* Hgfs Server: enhance logging for packet request ID + * lib/dnd/dndClipboard.c, lib/dnd/dndInt.h, lib/dnd/dndMsg.c, + lib/dnd/Makefile.am, lib/dndGuest/*, lib/include/copyPasteBase.h, + lib/include/copyPaste.hh, lib/include/copyPasteRpc.hh, + lib/include/copyPasteRpcV3.hh, lib/include/dndBase.h, + lib/include/dndClipboard.h, lib/include/dndFileContentsUtil.h, + lib/include/dndFileList.hh, lib/include/dnd.h, lib/include/dnd.hh, + lib/include/dndInt.h, lib/include/dndMsg.h, lib/include/dndRpc.hh, + lib/include/dndRpcV3.hh, lib/include/dndTransportGuestRpc.hh, + lib/include/dndTransport.hh, lib/include/libExport.hh, + vmware-user/copyPaste.cpp, vmware-user/copyPasteUI.{cpp,h}, + vmware-user/copyPasteV3.h, vmware-user/copyPasteWrapper.{cpp,h}, + vmware-user/dnd.cpp, vmware-user/Makefile.am, + vmware-user/vmware-user.{c,cpp}, vmware-user/vmwareuserInt.h, + vmware-user/stringxx/string.{cc,hh}, vmware-user/stringxx/ubstr_t.hh: add + support for new version of the DnD protocol. -* Allow RpcVMX_LogV to run without calling malloc. + * lib/guestInfo/guestInfoPerfMonLinux.c: fix problem with overwriting flags + after GuestInfoMonitorReadMeminfo() was called. -* Update the stat IDs list. + * lib/guestRpc/guestlibV3.x, lib/include/vmGuestLib.h, + libguestlib/vmGuestLib.c: add new host stats. -* Don't mount alias target volumes while resolving HGFS file attributes + * lib/guestRpc/Makefile.am: fix a few compatibility issues with non-GNU + versions of make. -* Remove the executable bit from various source files + * lib/hgfsServer/hgfsServer.c, lib/hgfsServer/hgfsServerInt.h, + lib/hgfsServer/hgfsServerLinux.c, */hgfsProto.h, + modules/freebsd/vmhgfs/vnops.c, modules/freebsd/vmhgfs/vnopscommon.{c,h}: + don't trust the local VFS layer, check the HGFS server to see if an + operation would succeed. -* add some improved cert debug noise + * lib/include/rpcChannel.h, lib/rpcChannel/*: add new Guest RPC channel + abstraction library used by the new "core services" code. -* Basic infrastructure support for guestIntegrity backdoor calls. + * lib/include/vmrpcdbg.h, tests/*: add test code from the "core services" + project. -* Implement MXUser semaphores on Mac OS with lib dispatch semaphores + * lib/include/vmtoolsApp.h, lib/include/vmtoolsd_version.h, + services/vmtoolsd/*: add "vmtoolsd", the new service "shell" used in the + "core services" project. -* Add a backdoor command for mksStats snapshots. + * lib/unity/unityPlatformX11Window.c: don't send initial "region" updates for + shaped windows. This works around an issue where resizing a shaped window + would not work as expected in Unity mode. -* add vmhgfs-fuse to open-vm-tools + * lib/wiper/wiperPosix.c: fix major number detection for disks on newer Linux + kernels. -* vm_basic_defs/gdb: use non-builtin offsetof for vmk gdb macros. + * libvmtools/Makefile.am: link more libraries needed by vmtoolsd and the new + plugins. -* Implement MXUserEvent + * modules/linux/pvscsi/pvscsi.c, modules/linux/pvscsi/pvscsi_version.h: use + PCI-specific memory allocation functions and update driver version. -* Remove updateAgent code. + * modules/linux/vmci/vmciKernelIf.c: disable queue pair support in the host + version of the driver on older Linux kernels. This doesn't affect the + guest driver. -* Change default sampling rate for guest stats to 20 seconds. + * modules/linux/vmci/vmci_queue_pair.h: implement MSG_PEEK support on + Linux driver. -* Include cstring to avoid 'memset not in scope' error. + * modules/linux/vmhgfs/bdhandler.c, modules/linux/vmhgfs/compat_sched.h, + modules/linux/vmmemctl/os.c: fix issue with HGFS module interfering with + suspend / hibernation on newer Linux kernels (bug #2523263). -* Remove guestStats that are beyond 60u1 scope. + * modules/linux/vmhgfs/compat_cred.h, modules/linux/vmhgfs/file.c, + modules/linux/vmhgfs/filesystem.c, modules/linux/vmhgfs/inode.c: changes + for compatibility with newer Linux kernels, where it's not possible to + change fsuid/capabilities directly anymore. -* Fixes for use_after_free, double_free and double_close. + * modules/linux/vmhgfs/compat_pagemap.h, modules/linux/vmhgfs/page.c: + fix warning, and compatibility changes for newer Linux kernels + (2.6.28.1 and newer; bug #2530616). -* Use a global lock for protecting gLoggingStopped. + * modules/linux/vmhgfs/inode.c: fix creation of symlinks (bug #2531303). -* change default debugging level and location + * modules/linux/vmxnet/vmxnet.c: use PCI-specific memory allocation + functions. -* adjust logging noise for vmtoolsd + * modules/linux/vmxnet/vmxnet.c, modules/linux/vmxnet3/vmxnet3.c: add option + to disable LRO. -* clean up debug & warning messages in guestInfo plugin + * modules/linux/vsock/af_inet.{c,h}, modules/linux/vsock/util.{c,h}: add + MSG_PEEK support; remove ifdefs that were disabling support for queue + pairs on the host kernel module; fix compilation with certain versions + of gcc (bug #2531283). -* clean up logging in vix plugin + * modules/solaris/vmhgfs/*: move backdoor handling code to the HGFS driver; + this makes the user-level code to handle the driver (currently in + vmware-guestd) obsolete. -* recategorize powerOps logging messages + * modules/solaris/vmxnet/*: add vmxnet driver for Solaris, under the CDDL. -* gather new default Tools logs with vm-support + * services/plugins/*: add all currently available "core services" plugins. + The current set of plugins provide the functionality available in + vmware-guestd; there are a few plugins that replace functionality from + vmware-user, but not all features are ported yet (and vmtoolsd - with + vmware-user plugins - and vmware-user cannot run at the same time). -* add toolbox-cmd support for log` + * toolbox/toolboxAbout.c: fix the copyright character. -open-vm-tools-9.10.2 build 2822639 + * toolbox/toolbox-cmd.c: reword a few messages, fix typos. -* Use new #define _DEFAULT_SOURCE to build OVT. - - glibc-2.20 has deprecated the _BSD_SOURCE and _SVID_SOURCE - macros. Starting with glibc-2.19 _DEFAULT_SOURCE is - recommended. Keep the old macros because someone might - want to build open-vm-tools with an older glibc version. - - With glibc-2.20 VGAuthLog.c was picking the POSIX - definition for strerror_r that returns int type. - That does not work with glibc-2.2, which has only one - definition with return type char *. For better - compatibility with various glibc versions, use the - _GNU_SOURCE definition of strerror_r that returns char *. - -* Fix a compilation error in toolboxcmd-shrink.c with gcc 5.0.1. + * toolbox/toolboxCmdInt.h, toolbox/toolboxcmd-record.c, + toolbox/toolbox-gtk.c, toolbox/toolboxRecord.c: remove the "record" + functionality from tools (due to internal request). - Building open-vm-tools for Fedora 22 hit a compilation - error with gcc 5.0.1. + * toolbox/toolboxInt.c, toolbox/toolboxScripts.c, toolbox/toolbox-scripts.c: + changes to use the new config file format used by the "core services" code. - Also remove some redundant code. ShrinkGetMountPoints() - calls ShrinkGetWiperState() and handles the - WIPER_UNAVAILABLE and WIPER_DISABLED cases. The call to - ShrinkGetWiperState() is redundant because wiper state - will always be WIPER_ENABLED. - -* Fix the compiler version check and include mul64.h. - - The compiler check was intended to be >= GCC 4.4, but it - was insisting that the major and minor version numbers - of GCC both be >= 4, so it was breaking on Fedora 22, - which has GCC 5.1.1, and for a user who was building with - GCC 4.3. - - For old compilers we need to provide mul64.h, so include - it in open-vm-tools. - -* Retry sending vmbackup event with elevated privileges. - - A privilege check on the host side was implemented in - ESXi 5.5. Due to this change, once guest/Toolsd sends - iopl_elevation capability (RPC msg - "tools.capability.iopl_elevation") to an ESXi 5.5 host, - it requires guest to elevate the privileges before the - guest sends vmbackup event. Linux Tools version 9.4.x - sends this capability and enables this behavior on the - host. Tools version 9.10.0 does not send iopl_elevation - capability and does not require privilege elevation. - Therefore, in order to workaround the host behavior, we - retry sending the vmbackup event after elevating the guest - privileges. To avoid doubling the RPC messages from - Toolsd, we also cache the last failure result from the - unprivileged attempt for the duration of current vmbackup - operation. - -* vSock changes to prepare for FreeBSD - - Add support to header files for FreeBSD. For now just - add some stubs that return errors. - -* add a -h option to vgauth + * */Makefile.am: make sure 'rm' and 'mv' are being used instead of $(RM) and + $(MV) (which are not defined by automake; bug #2492040). - vgauth is not normally run from a command line, but - add a -h option to provide minimal documentation. - -* Bump Tools version to 9.10.2 for open-vm-tools release. - -* Workaround NFS open bug by retrying on ESTALE - - RFC 1341775 uncovered an NFS client open race which causes - open to fail with ESTALE if there is another host trying to - atomically swap the file at the same time. This causes the file to - be unlinked which might cause the thread trying to open it (for - acquiring lock) to fail with ESTALE. - - Implement a very simple fix which retries for 3 seconds - upon getting ESTALE. - -* Fix the HGFS protocol opcode to differentiate headers - - For differentiating the older HgfsRequest and the new - HgfsHeader structures sent in an HGFS packet, the old - header opcode is set to 0xff using HGFS_V4_LEGACY_OPCODE. - - This should have been made a specific value of the HGFS - opcode enum and named for what it really means, but the - enum type could clash with the HGFS_V4_LEGACY_OPCODE by - accident if enough values are added. +2009-01-21 Marcelo Vanzin + * Resync with internal trunk (2009.01.19) + + * configure.ac: detect the presence of FUSE libraries. + + * configure.ac, Makefile.am: compile kernel modules for Solaris, and + vmblock-fuse module if FUSE is available. + + * lib/ghIntegration/ghIntegrationX11.c: retrieved localized application + names. + + * lib/guestInfo/guestInfo.c, lib/guestInfo/guestInfoPosix.c, + lib/include/hostinfo.h, lib/misc/hostinfo_misc.c, lib/misc/hostinfoPosic.c, + lib/vixTools/vixTools.c: refactoring to move code shared with other VMware + products to a common library. + + * lib/guestRpc/guestlibV3.x, lib/guestRpc/Makefile.am, + lib/include/vmGuestLib.h, libguestlib/*: add new iteration of the + "guestlib" protocol. This is a more extensible solution than the current + protocol, and should make it easier to add new information when needed. + + * lib/include/dynarray.h, lib/include/dynbuf.h, lib/misc/dynarray.c, + lib/misc/dynbuf.c: make some DynArray/DynBuf functions inline for speed. + + * lib/include/unityCommon.h: more documentation about the Unity protocol. + + * lib/unity/unityPlatformX11.c: fix Unity<->guest desktop ID mappings. + + * libvmtools/vmtoolsLog.c: change the way log domains are configured; now + sub-domains inherit the default handler for the app if no handler is + specified. + + * modules/freebsd/vmhgfs/state.c, modules/freebsd/vmhgfs/state.h, + modules/freebsd/vmhgfs/vnopscommon.{c,h}: implement support for mmap on + the Mac OS driver, which allows running executables from an HGFS + share. The FreeBSD module still does not support this functionality. + + * modules/freebsd/vmhgfs/transport.{c,h}: refactoring for sharing structure + definitions. + + * modules/linux/pvscsi/pvscsi.c, modules/linux/vmblock/linux/module.c, + modules/linux/vmci/vmci_drv.c, modules/linux/hgfs/module.c, + modules/linux/vmmemctl/os.c, modules/linux/vmsync/sync.c, + modules/linux/vmxnet/vmxnet.c, modules/linux/vmxnet3/vmxnet3.c: add support + for Novell's proprietary module info tag ("supported"). + + * modules/linux/vmci/vmciKernelIf.c: add support for VMCI queue pairs on + the host. This does not affect the driver when it runs inside virtual + machines. + + * modules/linux/vmci/*.h, modules/linux/vsock/*.h: some changes in the common + code to support Mac OS X, and also queue pairs on the Solaris VMCI module. + + * modules/linux/vsock/af_vsock.{c,h}: add functions for registering with + the vsock driver from within the kernel. + + * modules/linux/*/Makefile: add $(LINUXINCLUDE) to the compiler flags; this + allows compiling the modules against recent kernels which removed that + from $(KBUILD_CPPFLAGS). + + * modules/Makefile.am: add support for compiling Solaris kernel modules. + + * modules/solaris/vmhgfs/*: initial release of the Solaris HGFS driver in + open-vm-tools. Driver is licensed under the CDDL 1.0. + + * vmblock-fuse/*: add the user-level implementation of the vmblock driver, + which is build on top of FUSE, to open-vm-tools. vmware-user hasn't yet + been modified to use this version of vmblock. + + * vmware-user/copyPaseV3.h: new header introduced during development of the + next version of copy paste / DnD for X11 platforms. + + +2008-11-23 Marcelo Vanzin + * Resync with internal trunk (2008.12.19) + + * configure.ac, */Makefile.am: standardize on using libtool archives for + the libraries. This also means several makefiles were removed, since + there's no need to build two archives of the same library anymore. + + * configure.ac: add logic to detect glib 2.6; this is the minimum version + required by the "Core Services" project. Currently it's an optional + dependency. + + * configure.ac: disable Unity when user specifies --disable-multimon. + + * configure.ac: actually build the pvscsi modules if the detected kernel + version supports it. + + * configure.ac, Makefile.am, lib/guestInfo/Makefile.am, + lib/stubs/Makefile.am, libvmtools/*, lib/include/vmtools.h: add the + "vmtools" shared library used in the "Core Services" project. The library + is a collection of a lot of other libraries used by most VMware Tools + programs, and adds some functionality on top of glib that is used in the + "Core Services" project. Currently no other components from that project + are available as part of open-vm-tools. + + * lib/deployPkg/deployPkgLog.h, lib/deployPkg/toolsDeployPkg.h: moved private + headers out of the public header directory. + + * lib/guestRpc/Makefile.am, modules/Makefile.am: fix the makefiles so that + it's possible to build open-vm-tools from a directory different from the + source dir. + + * lib/hgfsServer/hgfsServer.c: changes to support aliases on Mac OS hosts. + + * lib/hgfsServer/hgfsServerLinux.c: changes to map Windows attributes to + Mac OS FileInfo. + + * lib/include/circList.h: removed unused file. + + * lib/include/unityCommon.h, lib/unity/unity.c: changes to add documentation + to various application RPCs used in Tools. + + * lib/misc/posixPosix.c, toolbox/toolboxScripts.c: fix include path for + syslimits.h on FreeBSD. + + * lib/unity/unityPlatformX11.c: better detection of the guest's work area + boundaries; fixes a problem when dragging a Window in Unity mode with + the host's task bar on the left/right of screen would result in weird + behavior. + + * lib/unity/unityPlatformX11Settings.c, lib/unity/unityPlatformX11Window.c, + lib/unity/unityX11.h: preserve the _NET_WM_DESKTOP setting when hiding + windows; this fixes a problem where hiding a panel and later restoring it + would result in the wrong _NET_WM_DESKTOP property being set for the panel, + causing it to only display on the first virtual desktop. + + * modules/linux/vmci/*: minor changes related to internal development of the + Mac OS drivers. + + * modules/linux/vmhgfs/page.c: fix HGFS driver for kernel 2.6.28. + + * modules/linux/vsock/linux/af_vsock.c: added code to gather some performance + statistics for the driver. + + * toolbox/toolbox-gtk.c: a few fixes to the help functionality. + + * vmware-user/vmware-user.c, vmware-user-suid-wrapper/main.c: change the + "blockFd" argument to have an extra dash so it follows the convention of + common command line parsing libraries. + + * Other bug fixes and changes in shared code that don't affect open-vm-tools. + +2008-11-18 Marcelo Vanzin + * Resync with internal trunk (2008.11.14) + + * lib/include/vm_version.h: Bumped TOOLS_VERSION. + + * guestd/toolsDaemon.c, lib/include/vm_app.h: changes related to host-side + configuration of power operations. + + * hgfsclient/hgfsclient.c, lib/dnd/dndCommon.c, lib/dnd/dndLinux.c, + lib/hgfs/*, lib/hgfsServer/*, lib/include/cpName.h, lib/include/dnd.h, + lib/include/hgfsEscape.h, lib/include/staticEscape.h, modules/*/vmhgfs/*, + vmware-user/dnd.c: refactor the HGFS character escaping code; escape + invalid characters when the sender allows characters in the file name that + the receiver does not allow. + + * lib/hgfsServer/hgfsServerLinux.c: return proper error code when the + remote path points to a non-existent directory. + + * lib/deployPkg/deployPkg.c, lib/deployPkg/deployPkgLog.c, + lib/include/deployPkg.h, lib/include/rpcin.h, lib/rpcin/rpcin.c: + refactoring for the Tools Core Services project. + + * lib/dnd/dndCommon.c: don't ASSERT if the staging directory is not + actually a directory. + + * lib/dynxdr/xdrutil.c, lib/include/xdrutil.h: more XDR-related utility + functions. + + * lib/file/file.c, lib/file/fileLockPrimitive.c, lib/include/vm_basic_defs.h: + replace use of strtok with strtok_r. + + * lib/guestApp/guestApp.c, lib/include/guestApp.h: more utility functions. + + * lib/guestApp/guestApp.c, lib/include/backdoor_def.h, vmware-user/pointer.c: + add the ability to detect whether the mouse hardware can be used in + absolute mode, which allows for auto grab / auto ungrab to work. + + * lib/guestInfo/guestInfo.c, lib/guestInfo/guestInfoPosix.c, + lib/guestRpc/nicinfo.x: provide the prefix length of an IPv6 address in a + separate field of the NicInfo struct. + + * lib/guestInfo/guestInfoPerfMonLinux.c: reduce log spew. + + * lib/guestInfo/guestInfoServer.c, lib/include/guestInfo.h: changes related + to how the VMware code in the host handles Tools version information. + + * lib/include/unityCommon.h: changes related to documenting the Unity API. + + * lib/include/unity.h, lib/unity/*: remove a few unused RPCs, add a new + function used to notify the host of the status of Unity. + + * modules/freebsd/vmhgfs/state.c, modules/vmhgfs/freebsd/vnops.c, + modules/vmhgfs/freebsd/vnopscommon.*: support symlinks on FreeBSD and + Mac OS. + + * modules/freebsd/vmhgfs/worker.c: fix mutex not being unlocked in some + error paths. + + * modules/linux/dkms.conf: add rudimentary dkms support. + + * modules/linux/pvscsi/*: add a driver for VMware's paravirtualized SCSI + device. + + * modules/linux/*/Makefile, modules/linux/vmci/Makefile.kernel, + modules/linux/vsock/Makefile.kernel: add support for exporing symbols, + needed for dependent modules to load if a kernel >= 2.6.26 is compiled + with CONFIG_MODVERSIONS. Make the vsock module reference the vmci module's + symbols. + + * modules/vmmemctl/freebsd/os.c: add sysctl to get driver status. Information + can be retrieved with "sysctl vm.vmmemctl". + + * modules/linux/vmci/vmci_defs.h, modules/linux/vmci/vmci_call_defs.h, + modules/linux/vsock/vmciHostKernelAPI.h: changes related to VMCI work + on VMware ESX. + + * modules/linux/vsock/linux/*: improve performance of some applications by + improving the poll behavior and sending less packets when waiting + for a response. + + * modules/linux/vmsnc/sync.c: fix panic on kernels < 2.6.20. + + * modules/linux/vmxnet3/vmxnet3.c, modules/linux/vmxnet3/vmxnet3_int.h, + modules/linux/vmxnet3/vmxnet3_version.h: inherit net device features to + avoid having the kernel setting the PSH flag on every TCP packet (among + other issues). + + * modules/*/*/*: Reflected changes from elsewhere. + + * scripts/common/vmware-user.desktop: add missing "Type" information; fixes + auto-start of vmware-user on Ubuntu 8.10. + + * toolbox/*: fix a GTK+ warning caused when trying to unref a dialog + instance from a signal callback. + + * vmware-user/copyPaste.c: work around an issue when OpenOffice's "cut" + command is used; it sets the timestamp of both the clipboard and the + primary selection, but only puts data in the clipboard. + + * Other files: minor refactorings, and changes unrelated to open-vm-tools. + +2008-10-13 Adar Dembo + * Resync with internal trunk (2008.10.09) + + * configure.ac, modules/Makefile.am: Added a command-line option to + skip privileged operations during make install (requested by Dennis + Leroy). Integrated new vmxnet3 kernel module. + + * configure.ac, lib/guestInfo/Makefile.am, + lib/guestInfo/guestInfoPerfMonLinux.c, lib/include/vm_procps.h: + Removed open-vm-tools dependency on libproc-dev by providing some procps + bits and pieces in our own vm_procps.h (Sourceforge bug 1960947). + + * hgfsmounter/Makefile.am: Removed chown calls. Only call chmod + if we're running as root (requested by Dennis Leroy). + + * */foreignVMToolsDaemon.c, */foundryToolsDaemon.[ch], + lib/guestInfo/guestInfo.c, lib/guestInfo/guestInfoServer.c, + lib/include/guestInfoServer.h, lib/include/vixTools.h, + lib/rpcin/rpcin.c, lib/vixTools/vixTools.c, vmware-user/copyPaste.c, + vmware-user/vmware-user.c: More refactoring from the Tools core + services project. + + * */foundryToolsDaemon.c: Changed HGFS mounting behavior such that the + global HGFS share is mounted at /mnt/hgfs instead of relying on + "mount -a". + + * guestd/toolsDaemon.[ch], lib/include/backdoor_def.h, + lib/include/system.h, lib/include/vm_app.h, lib/system/systemLinux.c: + Added backwards time synchronization functionality. Moved Tools scripts + checking from VMX to guestd. + + * hgfsmounter/hgfsmounter.c: Added handling for multiple "-o" flags on + the command line. + + * lib/dynxdr/dynxdr.c: Fixed x_putint32 behavior on 64-bit Solaris. + + * lib/file/*, lib/include/codeset.h, lib/include/file.h, + lib/include/fileIO.h, lib/include/hostinfo.h, + lib/include/loglevel_user.h, lib/include/productState.h, + lib/include/timeutil.h, lib/include/unicodeTypes.h, + lib/include/vixCommands.h, lib/include/vix.h, + lib/include/vm_basic_asm.h, lib/include/vm_basic_types.h, + lib/include/vm_legal.h, lib/include/vm_product.h, + lib/include/win32util.h, lib/include/x86cpuid.h, lib/misc/codeset.c, + lib/misc/codesetOld.[ch], lib/misc/posixPosix.c, lib/misc/timeutil.c, + lib/region/region.c, lib/string/bsd_vsnprintf.c, lib/unicode/*, + lib/user/hostinfoPosix.c, modules/freebsd/vmhgfs/sha1.c, + modules/*/*/vm_device_version.h, modules/linux/*/vmci_iocontrols.h, + modules/linux/*/vmci_version.h, modules/linux/vmhgfs/hgfsEscape.h: + Changes from work unrelated to open-vm-tools on internal trunk. + + * lib/ghIntegration/ghIntegrationX11.c: Fixed some bugs in menu-spec and + desktop-entry-spec support in Linux guests. + + * lib/guestApp/guestApp.c, lib/include/guestApp.h, + lib/include/statelogger_backdoor_def.h, toolbox/Makefile.am, + toolbox/toolbox-cmd.c, toolbox/toolbox-gtk.c, toolbox/toolboxCmdInt.h, + toolbox/toolboxGtkInt.h, toolbox/toolboxInt.h, toolbox/toolboxRecord.c, + toolbox/toolboxcmd-record.c: Patches from Yiwen Zhang to add basic + record/replay controls to the gtk and command-line toolbox apps. + + * lib/guestInfo/guestInfoPosix.c: Fixed a bug where we assumed the + primary interface's addresses were all IPv4 addresses. + + * lib/guestInfo/guestInfoServer.c: Fixed a memory leak. + + * lib/guestRpc/Makefile.am, lib/guestRpc/unityActive.x, + lib/include/guestCaps.h, lib/include/unityCommon.h, lib/unity/unity.c, + vmware-user/Makefile.am: Added new unityActive xdr protocol, used for + tracking whether Unity is enabled or not. + + * lib/hgfsServer/hgfsServer.c, lib/hgfsServer/hgfsServerLinux.c, + lib/hgfsServerPolicyGuest/hgfsServerPolicyGuest.c, + lib/include/hgfsProto.h: Fixed bug where we were invalidating HGFS + handles on the share of entire drive ("/"). Added optional symlink + following behavior to HGFS server. Fixed a UTF-8 validation issue. + Added volume ID field to attribute fields. + + * lib/include/vm_tools_version.h: Bumped internal Tools backdoor + version. + + * lib/include/vm_version.h: Bumped TOOLS_VERSION. + + * lib/procMgr/progMgrPosix.c: Fixed impersonation behavior so that + uids are passed to setresuid instead of gids. Added alternate way to + list processes in situations where a process lacks a command line. + + * lib/region/region.c: Reforked xorg miregion.c and apply open-vm-tools + specific patches. + + * lib/unity/*, lib/unityWindowTracker/unityWindowTracker.c: Fixed an + overflow that lead to a panic when a window title exceeded 1024 bytes. + Fixed some initialization assumptions when using virtual desktops. + + * lib/unity/unityPlatformX11Window.c: Fixed an issue with restacking + windows above non-existent windows. Other minor fixes. + + * modules/*/*/*: Reflected changes from elsewhere. + + * modules/linux/*/Makefile.kernel: Changed clean target to remove + Module.markers and modules.order. + + * modules/linux/vsock/include/compat_sock.h, + modules/linux/vsock/*: Fixed several issues in vsock. + +2008-09-03 Adar Dembo + * Resync with internal trunk (2008.08.29) + + * Makefile.am, aclocal.m4, m4/*: Moved macros to 'm4' subdir. + + * compile, config.guess, config.sub, config/*, depcomp, install-sh, + ltmain.sh, missing: Moved auxiliary build tools to 'config' subdir. + + * configure.ac: Moved macros and auxiliary build tools into separate + subdirectories. Added command line option to force the use of gtk1 over + gtk2. Cosmetic fixes. Reworked libicu detection. Switched over to + libtool-2.2. Added library check for new gdk symbol. Added library + check for libnotify. Reworked use of macros from AC_PATH_XTRA and + some X11 library checks. + + * */foundryToolsDaemon.c, toolbox/toolbox-cmd.c, guestd/main.c, + lib/guestInfo/guestInfoPerfMonLinux.c, lib/guestInfo/guestInfoPosix.c, + lib/misc/posixPosix.c, lib/panic/panic.c, lib/system/systemLinux.c, + modules/linux/vsock/linux/util.c, xferlogs/xferlogs.c: Added checks for + return codes of certain functions and passed %s to formatted string + functions where appropriate (needed to compile on Ubuntu Intrepid). + + * lib/appUtil/appUtilX11.c: Fixed command line skipping logic and added + more icon paths. Removed unnecessary chdir(2) canonicalization logic. + + * lib/deployPkg/runDeployPkgPosix.c, lib/file/fileIO.c, + lib/file/fileIOPosix.c, lib/file/fileLockPrimitive.c, + lib/file/filePosix.c, lib/hgfsServer/hgfsServerLinux.c, + lib/include/bsdfmt.h, lib/include/file.h, lib/include/fileIO.h, + lib/include/iovector.h, lib/include/msgfmt.h, lib/include/str.h, + lib/include/vm_basic_defs.h, lib/include/vm_basic_types.h, + lib/misc/hostname.c, lib/misc/idLinux.c, lib/misc/posixPosix.c, + lib/SLPv2Parser/*.c, lib/wiper/wiperPosix.c, toolbox/toolboxScripts.c: + Added FreeBSD compatibility glue. + + * guestd/toolsDaemon.c, lib/file/file.c, + lib/foundryMsg/foundryPropertyListCommon.c, lib/image/imageUtilPng.c, + lib/include/appUtil.h, lib/include/backdoor_def.h, lib/include/conf.h, + lib/include/cpuid_info.h, lib/include/guest_os.h, + lib/include/hostinfo.h, lib/include/imageUtil.h, + lib/include/imageUtilTypes.h, lib/include/log.h, + lib/include/loglevel_user.h, lib/include/netutil.h, + lib/include/posix.h, lib/include/timeutil.h, lib/include/util.h, + lib/include/uuid.h, lib/include/vix.h, lib/include/vixOpenSource.h, + lib/include/vm_atomic.h, lib/include/vm_legal.h, + lib/include/vm_version.h, lib/include/x86cpuid.h, + lib/misc/codesetOld.c, lib/misc/timeutil.c, lib/string/bsd_vsnprintf.c, + lib/user/util.c, lib/user/utilPosix.c, lib/vixTools/vixTools.c, + modules/linux/*/vmci_kernel_if.h, modules/linux/vmxnet/compat_timer.h, + toolbox/toolboxCmdInt.h, toolbox/toolboxcmd-*.c: + Changes from work unrelated to open-vm-tools on internal trunk. + + * lib/ghIntegration/ghIntegration.c, + lib/guestRpc/ghiGetBinaryHandlers.x: Don't send oversized messages. + Increased maximum number of binary handlers. + + * lib/ghIntegration/ghIntegrationX11.c, lib/guestApp/guestAppPosix.c, + lib/include/guestApp.h, lib/include/system.h, lib/system/systemLinux.c, + toolbox/toolbox-gtk.c: Improved "run program" functionality by + restoring program environment and stripping any VMware wrapper script + changes to LD_LIBRARY_PATH. + + * lib/guestApp/guestAppPosixX11.c: Now using glib to open URLs instead + of system(3). Improved gnome and kde session detection. + + * lib/guestApp/Makefile.am: This library needed GTK_CPPFLAGS too. + + * lib/guestInfo/guestInfoInt.h, lib/guestInfo/guestInfoPosix.c, + lib/guestInfo/guestInfoServer.c: Added logic to optionally convert + subnet mask to an ASCII string. + + * lib/guestRpc/Makefile.am: Cleaned up generated xdr headers better. + + * lib/hgfsServer/hgfsServer.c, lib/hgfsServer/hgfsServerInt.h, + lib/hgfsServer/hgfsServerLinux.c: Fixed problems when packing V3 + replies. + + * lib/hgfsServer/hgfsServerLinux.c: Fixed UTF-8 normal form D/C + conversions on the root directory. + + * lib/include/dndGuest.h: Changed preprocessor usage to allow gtk1 to + access UnityDnD. + + * lib/include/dnd.h, vmware-user/copyPaste.c: Code motion. + + * lib/include/guestCaps.h: Resort the capabilities table. + + * lib/include/rpcin.h, lib/rpcIn/rpcin.c, : Beginnings of the Tools + core services. This is a full-fledged refactoring of the Tools + userlevel apps to a "service" vs. "plugin" programming model. + + * lib/include/vmblock.h, modules/*/vmblock/block.c, + modules/*/vmblock/stubs.c, modules/*/vmblock/stubs.h: Changes needed + to support the fuse-based implementation of vmblock (coming soon). + + * lib/include/vm_tools_version.h: Some Tools version bumps. - There is a potential issue with the newer HgfsHeader - object where it overlays the old HgfsRequest op field. - The new header tries to break the field into the first - byte and save the remaining 3 bytes for a different use. - However, this cannot be done as the current and shipping - HGFS server code uses the HgfsRequest and op field - (4 bytes) to verify the value is 0xFF. If this is a match - then it is deemed that the packet has the new header. If - the client tried to use any of the new header's reserved2 - fields (overlayed with part of the old header op field) - then the HGFS server test for a new header would fail to - match. + * modules/*/*/*: Reflected changes from elsewhere. + + * modules/*/*/compat/compat_stdarg.h: Added compatibility wrappers for + stdarg features. + + * modules/freebsd/vmhgfs/debug.*: Cosmetic fixes. + + * modules/freebsd/vmhgfs/*: Make driver compliant with HGFSv3. + + * modules/*/vmmemctl/vmballoon.c: Allow module to yield the processor + when allocating many pages. + + * modules/linux/*/autoconf/cachector1.c, + modules/linux/*/include/compat_sched.h, + modules/linux/*/include/compat_semaphore.h, + modules/linux/*/include/compat_slab.h, + modules/linux/vmblock/linux/filesystem.c, + modules/linux/*/Makefile.kernel, + modules/linux/vmhgfs/bdhandler.c, modules/linux/vmhgfs/filesystem.c, + modules/linux/vmhgfs/module.h, modules/linux/vmhgfs/request.c, + modules/linux/vmsync/sync.c, modules/linux/vsock/linux/af_vsock.c: Fix + modules for 2.6.27 kernels. + + * modules/linux/*/Makefile: Fixed DRIVER target. + + * modules/linux/vmci/vmci_drv.c: Moved interrupt registration to be + after driver initialization. + + * modules/linux/vsock/linux/af_vsock.c, + modules/linux/vsock/linux/af_vsock.c: Added optimized flow control + protocol. + + * toolbox/toolboxScripts.c, toolbox/toolboxShrink.c: Cosmetic fixes. + + * vmware-user/copyPaste.c, vmware-user/dnd.c: Fixed edge case behavior + with file copy paste and DnD. + + * vmware-user/modconfig.c, vmware-user/notify.c, + vmware-user/vmware-user.c, vmware-user/vmwareuserInt.h: Added stubbed + modconfig module out-of-date notification framework. Not useful for + open-vm-tools, hence the stubs. + +2008-08-08 Adar Dembo + * Resync with internal trunk (2008.07.24) + + * configure.ac, */Makefile.am: Landed support for command line Toolbox, + Unity, vsock, and vmci. Refactored and reformatted a few things. + Improved portability by using $(SED) and AC_PROG_SED instead of "sed", + $(MKDIR_P) and AC_PROG_MKDIR_P instead of "mkdir -p", $(LN_S) and + AC_PROG_LN_S instead of "ln -s". Changed icu feature detection and + linking to rely on C++ linker instead of C linker. Fixed module + compilation checks on FreeBSD. Fixed $(DESTDIR) handling (patch by Mike + Auty). Refactored lib/strUtil into lib/misc. Changed hgfsmounter + install hook to symlink mount.vmhgfs. Renamed libghIntegrationStub to + libGhIntegrationStub. Fixed compilation of lib/guestApp when using + --without-x (reported by Martin Preishuber). Renamed libunityStub to + libUnityStub. Fix build on FreeBSD by using ":=" instead of "=" when + exporting module directories. The vmware-user desktop link now executes + vmware-user-suid-wrapper. Properly install vmware-user-suid-wrapper. + + * */foundryToolsDaemon.c, lib/vixTools/vixTools.c: Use a larger result + packet when handling impersonated HGFS requests (since HGFSv3 uses + larger packets). + + * guestd/main.c: Moved foreign VM check. + + * guestd/toolsDaemon.*: Added plumbing for HGFS usability library + calls. + + * hgfsmounter/hgfsmounter.c: Added support for passing options to + the MacOS HGFS driver. + + * lib/appUtil/*, lib/include/appUtil.h: New library for Unity support. + + * lib/auth/authPosix.c: Don't try using PAM from the Tools. - Fixed the HgfsHeader opcode fields to actually be the - correct HgfsOp type. + * lib/dnd/dndCommon.c, lib/dnd/dndLinux.c, lib/file/file.c, + lib/file/fileIOPosix.c, lib/file/filePosix.c, lib/include/dnd.h, + lib/include/loglevel_user.h, lib/include/panic.h, lib/include/posix.h, + lib/include/strutil.h, lib/unicode/unicodeBase.h, + lib/include/unicodeOperations.h, lib/include/vix.h, + lib/include/vm_app.h, lib/include/vm_assert.h, + lib/include/vm_product.h, lib/include/x86cpuid.h, lib/misc/codeset.c, + lib/misc/hashTable.c, lib/misc/strutil.c, lib/misc/timeutil.c, + lib/panic/panic.c, lib/string/bsd_vsnprintf.c, lib/strUtil/*, + lib/unicode/unicodeCommon.c, lib/unicode/unicodeSimpleBase.c, + lib/unicode/unicodeStatic.c, lib/user/hostinfoPosix.c, + lib/user/util.c, lib/user/utilPosix.c: Changes from work unrelated to + open-vm-tools on the internal trunk. + + * lib/backdoor/backdoorInt.h, lib/deployPkg/runDeployPkgInt.h, + lib/dnd/dndInt.h, lib/file/fileInt.h, lib/guestInfo/guestInfoInt.h, + lib/hgfs/cpNameInt.h, lib/hgfsServer/hgfsServerInt.h, + lib/impersonate/impersonateInt.h, lib/include/backdoorInt.h, + lib/include/bsd_output_int.h, lib/include/cpNameInt.h, + lib/include/dndInt.h, lib/include/fileInt.h, + lib/include/guestInfoInt.h, lib/hgfsServer/hgfsServerInt.h, + lib/include/impersonateInt.h, lib/include/runDeployPkgInt.h, + lib/include/toolsLoggerInt.h, lib/include/unicodeInt.h, + lib/string/bsd_output_int.h, lib/toolsLogger/toolsLoggerInt.h, + lib/unicode/unicodeInt.h: Moved some internal header files out of + the general include directory and into the appropriate libraries. + + * lib/ghIntegration/*: New library for Unity support. + + * lib/guestApp/guestAppPosixX11.c: Reset the value of LD_LIBRARY_PATH + before running the web browser. + + * lib/guestInfo/guestInfoPosix.c, lib/include/guest_os.h: Fixed a typo + in Mandriva guest detection. Added Asianux. + + * lib/guestInfo/guestInfoServer.c: Fixed behavior for sending nicInfo + updates to the host (patch by Jason Lunz). + + * lib/guestRpc/ghi*.*: New xdr protocol for Unity support. + + * lib/guestRpc/nicinfo.x: Correctly applied LGPL to file. - Removed the define for HGFS_V4_LEGACY_OPCODE and made it - part of the opcode enum to ensure correct type checking. + * lib/hgfs/cpNameLinux.c: Allow building for versions of Solaris newer + than 10. - Added an assert on compile to ensure that the HGFS opcode - values don't encroach on the invalid opcode used to - determine the header type. + * lib/hgfsServer/hgfsServer.c, + lib/hgfsServerPolicyGuest/hgfsServerPolicyGuest.c, + lib/include/hgfsServerPolicy.h: Provide an override setting for + disabling case conversion during file lookups. - Renamed the HGFS_V4_LEGACY_OPCODE to conform with the - existing enum values and state exactly what its meaning - is: HGFS_OP_NEW_HEADER. + * lib/hgfsServer/hgfsServerLinux.c: Only perform case insensitive + file lookups if a case sensitive lookup fails. + + * lib/image/imageUtilPng.c, lib/include/imageUtil.h, + lib/include/imageUtilTypes.h: New library for + Unity support. + + * lib/include/conf.h, toolbox/toolbox-gtk.c: Robustified the help page + discovery mechanism. + + * lib/include/dndGuest.h: Allow inclusion of header into source files + without GTK2 support. + + * lib/unity/*, lib/include/guestCaps.h, lib/include/unityCommon.h: New + library for Unity support. + + * lib/include/hgfsUtil.h: Fixed a precedence issue in a macro. + + * lib/raster/*, lib/include/rasterConv.h: New library for Unity support. + + * lib/region/*, lib/include/region.h: New library for Unity support. + + * lib/include/system.h: Added new OS type for WinXP 64-bit, reformatted + enums. + + * lib/unityWindowTracker/*, lib/include/unityWindowTracker.h: New + library for Unity support. + + * lib/include/vm_version.h: Bumped TOOLS_VERSION. + + * lib/wiper/wiperPosix.c: Replaced BSD_VERSION with __FreeBSD_version. + + * modules/*/*/*: Reflected changes from elsewhere. + + * modules/freebsd/vmhgfs/*: Reflected changes from MacOS HGFS work, and + fixed file permissions so that they're not all owned by root. + + * modules/linux/vmblock/linux/dentry.c: Changed d_revalidate to + properly invalidate negative dentries. + + * modules/linux/vmci/*: Landed the Virtual Machine Communication + Interface guest module. + + * modules/linux/vmmemctl/os.c: Fixed vmmemctl to build on 2.6.26 + (reported by Pavol Rusnak). + + * modules/linux/vmsync/sync.c: Fixed vmsync to build on 2.6.26 + (reported by Pavol Rusnak). + + * modules/linux/vsock/*: Landed the VMCI sockets interface module. + + * modules/linux/vmxnet/vmxnet.c, modules/linux/vmxnet/vmxnet2_def.h, + modules/linux/vmxnet/vmxnetInt.h: Increased rx ring size for enhanced + vmxnet2. + + * toolbox/*: Refactored pieces of GTK Toolbox and landed the command + line Toolbox. Fixed mnemonic collisions in the GTK Toolbox. + + * vmware-user/copyPaste.c: Fixed several bugs with file copy paste + behavior. + + * vmware-user/notify.c, vmware-user/vmware-user.c, + vmware-user/vmwareuserInt.h: Added stubs for notification framework. + + * vmware-user/pointer.c: Reverted fix for bug with clipboard retry + behavior. + + * vmware-user/vmware-user.c: Fixed build with gtk 1.2 (reported by + Stephen Duncan). Added signal handlers for SIGUSR1/SIGUSR2 used by + VMware Tools installer to reload vmware-user cleanly during a Tools + upgrader. Reload vmware-user on a fatal X I/O error. Don't panic if + run outside of a VM. Don't leave Unity mode on a Tools reset. - Now the 4 bytes cannot be used for anything but the - protocol opcode new header value. This also corrects any - strict typing by compilers for building open vm tools in - newer guest operating systems. +2008-07-01 Adar Dembo + * Resync with internal trunk (2008.06.30) + + * configure.ac, lib/guestApp/*, toolbox/Makefile.am, + vmware-user/Makefile.am: Split lib/guestApp into two libraries, one + with X11 functionality, and one without. Improved detection of + gnome-open. + + * guestd/*, lib/netUtil/netUtilLinux.c: guestd now compiles for MacOS + guests. -* Thaw filesystems when the snapshot commit message to VMX fails. + * guestd/main.c, lib/include/system.h, lib/system/systemLinux.c: + Refactored GuestdWritePidfile into System_Daemon. + + * guestd/toolsDaemon.c: Fixed a backwards time synchronization issue. + Thanks to Eric Castan for reporting the bug. + + * lib/conf/conf.c, lib/include/conf.h: Removed obsolete configuration + keys and values. + + * lib/file/*, lib/dict/*, lib/foundryMsg/*, lib/include/backdoor_def.h, + lib/include/codeset.h, lib/include/config.h, + lib/include/file_extensions.h, lib/include/fileInt.h, + lib/include/loglevel_user.h, lib/include/msg.h, lib/include/msgid.h, + lib/include/posix.h, lib/include/preference.h, lib/include/unity.h, + lib/include/vixCommands.h, lib/include/vix.h, + lib/include/vmbackup_def.h, lib/include/vmBackup.h, + lib/include/vm_basic_defs.h, lib/include/vm_basic_types.h, + lib/include/vm_product.h, lib/include/win32util.h, + lib/include/x86cpuid.h, lib/misc/codeset.c, lib/misc/codesetOld.c, + lib/misc/codesetOld.h, lib/misc/posixPosix.c, lib/strUtil/strutil.c, + lib/user/hostinfoPosix.c, lib/user/util.c, + lib/vmBackupLib/stateMachine.c, modules/*/vmxnet/net.h: Changes from + work unrelated to open-vm-tools on the internal trunk. + + * lib/guestRpc/Makefile.am: Added comment about misuse of CFLAGS. + + * lib/hgfsServer/hgfsServer.c: Corrected pointer arithmetic so that + new node and search allocation works consistently in 64-bit apps. + + * lib/hgfsServer/hgfsServerLinux.c, lib/include/hgfsProto.h: Added + HGFS_ATTR_HIDDEN_FORCED and set it when returning hidden files. - If it takes a long time to freeze filesystems, VMX may - timeout the snapshot operation so the commit fails. - After this happens, thaw the frozen filesystems. + * lib/hgfsServer/*, lib/hgfsServerPolicy/hgfsServerPolicyGuest.c, + lib/include/hgfsServerInt.h, lib/include/hgfsServerPolicy.h: + Refactored and cleaned up some code. + + * lib/include/resolution.h, lib/resolution/*, + vmware-user/vmware-user.c: Refactored some functions. + + * lib/include/vm_legal.h: Added another patent to the patent string. + + * lib/include/vm_tools_version.h: Added a pair of Tools version macros. + + * lib/include/vm_version.h: Bumped Tools product version. + + * lib/Makefile.am: Included a fix for compilation --without-x. Thanks to + Mark Foster for reporting the issue. + + * lib/misc/Makefile.am, lib/misc/shared/Makefile.am: Realphabetized + some sources and added missing source files. + + * lib/misc/posixWin32.c: Removed unneeded file from tree. + + * lib/procMgr/procMgrPosix.c: Made safe for -fPIC and for MacOS. + + * modules/*/*/*: Reflected changes from elsewhere. + + * modules/freebsd/vmhgfs/*: Added some code to handle codeset + conversions between UTF-8 precomposed and decomposed strings. + + * modules/linux/vmhgfs/*: Refactored string escaping/unescaping code. + + * toolbox/*: Added mnemonics for some buttons. + + * vmware-user/pointer.c: Fixed bug in clipboard retry behavior. + + * vmware-user/vmware-user.c: Added handlers for SIGUSR1 and SIGUSR2 + to facilitate smooth vmware-user upgrades with respect to the vmblock + kernel module. -* open-vm-tools: fixes to build on FreeBSD 10 +2008-06-20 Elliot Lee + + * Resync with internal trunk (2008.06.13) + + * FreeBSD 7/8 fixes from Martin Blapp. + + * Fix getpwnam_r etc. on FreeBSD & Solaris. + + * configure.ac: Add --without-kernel-modules, + --with-linux-release, and --with-linuxdir (gissa). + + * configure.ac, lib/guestRpc/*, lib/guestInfo/guestInfo.c, + lib/guestInfo/guestInfoServer.c, lib/dynxdr/*, + {vmware-user,guestd}/foreignVMToolsNetworking.c, guestd/Makefile.am, + {vmware-user,guestd}/foundryToolsDaemon.c, lib/include/dynxdr.h, + lib/include/guestInfo.h, lib/include/vmxrpc.h, + lib/include/xdrutil.h, lib/Makefile.am, lib/netUtil/*, + lib/vixTools/Makefile.am: Add support for XDR encoding of RPC + values, including the NicInfoV2 structure. + + * guestd/stub.c, hgfsclient/Makefile.am, hgfsclient/stub.c, + hgfsclient/stub-user-util.c, hgfsmounter/Makefile.am, + hgfsmounter/stub.c, lib/stubs/*, libguestlib/Makefile.am, + libguestlib/stubs.c, toolbox/Makefile.am, toolbox/stub.c, + vmware-user/stub.c: Centralize stubs. + + * lib/guestInfo/guestInfoPerfMonLinux.c: Convert ioInRate and + ioOutRate to be in terms of KB instead of pages. + + * lib/hgfsBd/hgfsBd.c, lib/hgfsServer/hgfsServer.c, + lib/hgfsServer/hgfsServerLinux.c: Large packet support, and + additional case-insensitivity fixes. + + * lib/include/hgfsBd.h, lib/include/hgfs.h, + lib/include/hgfsProto.h: Add HGFS error code. - Various fixes to make open-vm-tools build on FreeBSD: - - - disable vsock for OSes other than Linux - - define CheckSanity only ifdef VMX86_DEBUG - - make build of hgfsUriPosix depend on having gtkmm, - and enable on FreeBSD - - xferlogs.c does not need wchar.h - - Instructions for building on FreeBSD: - - 1. Install gcc48 with 'pkg install gcc' - 2. Install build dependencies: - glib libdnet libXinerama libXrandr gtk2 gtkmm24 - 3. autoreconf -i --force - 4. env CC=gcc48 CFLAGS=-Wl,-rpath=/usr/local/lib/gcc48 - CPPFLAGS="-I/usr/local/include/" - LIBS="-L/usr/local/lib" - ./configure --without-kernel-modules - --without-xmlsecurity --without-icu - --disable-vgauth --disable-grabbitmqproxy - --disable-deploypkg - 5. make - -* Don't build vmxnet driver for Linux >= 3.3 - - The vmxnet driver does not build for Linux kernel - versions >= 3.3. - -* Don't build HGFS kernel driver for Linux >= 3.17.0 - - The HGFS kernel component is old and has many changes missing - to support newer Linux kernel releases. There will be a newer - update coming which will include all of the changes necessary - for newer Linux kernels to be supported. - - For now, we are limiting the building of the current HGFS - kernel client to Linux kernels 3.17.0 and earlier for this - release of open-vm-tools. This will allow the build of the - open-vm-tools package to complete on newer kernel versions. + * lib/hgfs/hgfsUtil.c, lib/guestInfo/Makefile.am, + lib/guestInfo/guestInfoPosix.c, lib/guestApp/guestApp.c, + lib/foundryMsg/foundryMsg.c, lib/file/fileLockPrimitive.c, + lib/file/fileIOPosix.c, lib/file/fileLockPosix.c, + guestd/toolsDaemon.c, guestd/debugStdio.c, guestd/main.c, + lib/hgfsServerManagerGuest/hgfsServerManagerGuest.c, + lib/include/codeset.h, lib/include/cpuid_info.h, + lib/include/dnd.h, lib/include/file_extensions.h, + lib/include/fileInt.h, lib/include/ghIntegration.h, + lib/include/guestApp.h, lib/include/guestStats.h, + lib/include/hgfsServerInt.h, lib/include/hgfsUtil.h, + lib/include/hostinfo.h, lib/include/loglevel_user.h, + lib/include/netutil.h, lib/include/panic.h, lib/include/posix.h, + lib/include/unicode*.h, lib/include/util.h, lib/include/vix.h, + lib/include/vixTools.h, lib/include/vm_app.h, + lib/include/vm_basic_defs.h, lib/include/vm_product.h, + lib/include/vm_tools_version.h, lib/include/vm_version.h, + lib/include/x86cpuid.h, lib/misc/codeset.c, lib/misc/codesetOld.c, + lib/misc/codesetOld.h, lib/misc/hashTable.c, lib/misc/hostname.c, + lib/misc/timeutil.c, lib/panic/panic.c, lib/string/str.c, + lib/sync/syncMutex.c, lib/system/systemLinux.c, lib/unicode/*.c, + lib/unityStub/*, lib/user/hostinfo.c, lib/user/hostinfoPosix.c, + lib/vixTools/*, modules/linux/vmxnet/*, toolbox/debugStdio.c, + vmware-user/debugStdio.c, vmware-user/dnd.c, vmware-user/main.c: + Bug fixes. + + * modules/linux/vmxnet/*: Remove unused BPF code. Add ethtool + callbacks to get & set driver settings. + + * lib/user/util.c: Add function for getting backtraces. + + * lib/resolution/*, vmware-user/*, lib/Makefile.am, configure.ac: + Move resolution-changing code into separate library. + + * guestd/main.c, lib/include/tools.h: Allow disabling tools + version reporting to the host, via config file. + + * lib/rpcIn/*, lib/include/rpcin.h, guestd/toolsDaemon.c, + toolbox/toolbox-gtk.c: Updated RPC API + + * lib/include/dndGuest.h: Helper API for DnD code + + * modules/freebsd/vmhgfs/*, modules/freebsd/vmmemctl/*, + modules/freebsd/vmblock/*, modules/linux/vmhgfs/*, + modules/linux/vmmemctl/*: Reflect changes from main source tree. + + * vmware-user/copyPaste.c: Copy/paste cleanup. + + * vmware-user/vmware-user.c: Updated locking code to use X11 + display instead of lockfiles. + +2008-06-03 Adar Dembo + * Resync with internal trunk (2008.05.28). + + * configure.ac, Makefile.am, */Makefile.am: Added rudimentary + `make install` support. Fixes Sourceforge bug 1839981. + + * configure.ac, Makefile.am, vmware-user-suid-wrapper/*: Added + vmware-user-suid-wrapper to help autostart vmware-user. Added some + informational tags to AC_DEFINE macros. + + * */debugStdio.c: Fixed a format string vulnerability + in Debug. Allocate fd on the stack in DebugToFile. + + * lib/auth/authPosix.c, lib/dnd/dndCommon.c, lib/dnd/dndLinux.c + lib/impersonate/impersonate.c: Add inclusion of vmware.h and refactor + some include statements. + + * lib/file/file.c, lib/include/file.h: Added File_UnlinkNoFollow + function. + + * lib/file/fileIO.c, lib/file/fileLockPrimitive.c, + lib/include/fileIO.h: Added error case for ENAMETOOLONG to FileIO_Lock. + Constified 'buf' in FileIO_Pwrite. + + * lib/file/fileIOPosix.c: Removed coalescing and decoalescing code. + Consolidated some Unicode calls. + + * lib/file/filePosix.c: Reworked some error handling logic. + + * lib/foundryMsg/foundryMsg.c: Refactored buffer encoding and decoding + logic into a single pair of functions. + + * lib/foundryMsg/foundryThreads.c, lib/include/foundryThreads.h + lib/include/util.h, lib/misc/util_misc.c: Changed generic thread type + from uintptr_t to Util_ThreadID. + + * lib/hgfsServer/*, lib/hgfs/hgfsProto.h, modules/linux/vmhgfs/*: + Additional HGFSv3 fixes and refactoring. + + * lib/include/dbllnklst.h, lib/misc/dbllnklst.c: Constified argument to + DblLnkLst_IsLinked. + + * lib/include/dnd.h: Added support for DnD of RTF. + + * lib/include/fileInt.h: Removed prototype of FileLockFileSize. + + * lib/include/hashTable.h, lib/misc/hashTable.c: Cosmetic changes. + Added HashTable_ReplaceIfEqual. + + * lib/include/loglevel_user.h: Added hpet loglevel. + + * lib/include/msg.h: Removed prototype of MsgSetPostStderrBlock. + + * lib/include/posix.h: Removed certain includeCheck allowances. + + * lib/include/productState.h: Added VDM client product. + + * lib/include/unicode*, lib/unicode/*: Ongoing i18n work. + + * lib/include/vixCommands.h: Added command to set snapshot information. + + * lib/include/vix.h: Added more errors and a new flag. + + * lib/include/vixOpenSource.h: Reworked asserts and added VIX_ASSERT. + + * lib/include/vm_app.h: Added Tools tray app. + + * lib/include/vm_product.h: Reworked VMRC product definitions and added + VDM client product definitions. + + * lib/include/vm_tools_version.h: Added WS65 Tools version. + + * lib/include/vm_version.h: Bumped Tools version. Added logic for VMRC + product. + + * lib/include/x86cpuid.h: Modified a flag and trimmed an unneeded macro. + + * lib/misc/codesetOld.c: Implement UTF-16 codest conversion to UTF-8 + for CURRENT_IS_UTF8. + + * lib/misc/dynbuf.c: Modified dynbuf growing behavior. + + * lib/misc/posixDlopen.c, lib/misc/posixInt.h, lib/misc/posixPosix.h: + Refactored codeset conversion code into PosixConvertToCurrent. + + * lib/misc/posixWin32.c: Added some path checks. + + * lib/misc/timeutil.c: Win32-wrappified TimeUtil_GetTimeFormat. + + * lib/misc/vmstdio.c: Reduce virtual memory usage and add '\r' as a line + ending in StdIO_ReadNextLine. + + * lib/rpcout/rpcout.c: Added comments. + + * lib/str/str.c: Cosmetic changes. + + * lib/vixTools/vixTools.c: Added unlink(2) logic to avoid deleting + symlink targets. Cosmetic changes. + + * modules/*/*/*: Reflect changes from elsewhere in the source tree. + + * modules/linux/vmhgfs/super.c: Fix vmhgfs to properly report the + available space on the host (Sourceforge bug 1924246). + + * vmware-user/vmware-user.c: Add advisory locking code to help maintain + only one vmware-user instance per X session. + + * xferlogs/xferlogs.c: Fix a formatted string vulnerability. + +2008-05-12 Elliot Lee + + * Resync with internal trunk (2008.05.08). + + * configure.ac, **/Makefile.am: Use CPPFLAGS instead of + CFLAGS to eliminate warning about proc/sysinfo.h. + + * guestd/foreignVMToolsNetworking.c, + vmware-user/foreignVMToolsNetworking.c + lib/hgfsServer/hgfsServerLinux.c, lib/include/hgfsServerInt.h, + modules/linux/vmhgfs/bdhandler.c, modules/linux/vmhgfs/dir.c, + modules/linux/vmhgfs/file.c, modules/linux/vmhgfs/filesystem.h, + modules/linux/vmhgfs/fsutil.h, modules/linux/vmhgfs/inode.c, + modules/linux/vmhgfs/link.c, modules/linux/vmhgfs/module.h, + modules/linux/vmhgfs/page.c, modules/linux/vmhgfs/request.c, + modules/linux/vmhgfs/request.h: Whitespace cleanups. + + * guestd/main.c: Removed "blessed app" code for starting + vmware-user. Hooray! + + * lib/deployPkg/deployPkg.c: Remove unneeded Utf8 conversion for + Windows. + + * lib/file/filePosix.c: Use new Posix_RealPath implementation. + + * lib/guestApp/guestApp.c, lib/include/guestApp.h: Remove/cleanup + UTF-8 related RPC functions. + + * lib/guestInfo/guestInfoPerfMonLinux.c, + lib/guestInfo/guestInfoPosix.c, lib/include/guestInfo.h, + lib/include/guestInfoInt.h, lib/include/guestStats.h: Rename + structures to GuestMemInfo, GuestNicInfo, and GuestDiskInfo. + + * lib/guestInfo/guestInfoServer.c, lib/include/guest_msg_def.h: As + above, and also GUESTMSG_MAX_IN_SIZE moved to guest_msg_def.h, and + misc locking updates. Also add GuestInfoServer_Main(), and cleanup + whitespace. + + * lib/hgfsServer/hgfsServer.c: Cleanup UTF-8 handling. + + * lib/include/codeset.h: Update defines that indicate whether the + current platform is using UTF-8. + + * lib/include/dnd.h: Add prototypes for a couple of string + conversion functions. + + * lib/include/file_extensions.h: Add OVF and Archived OVF file extensions. + + * lib/include/file.h: C++ guard thingies. Update a couple of + function prototypes to work on file descriptors instead of + filenames. + + * lib/include/hashTable.h, lib/include/guest_os.h, + lib/include/loglevel_defs.h, lib/include/stats_user_defs.h, + lib/include/stats_user_setup.h, lib/include/str.h, + lib/include/unicodeTypes.h, lib/include/util.h: Allow inclusion in + kernel modules... + + * lib/include/loglevel_user.h: As above, and add a couple of + loglevel variables. + + * lib/include/util.h, lib/misc/util_misc.c: Allow inclusion in + kernel modules as above, and add some utility functions on Windows + for manipulating canonical paths. + + * lib/include/hgfsProto.h, lib/include/hgfsUtil.h: Move + request/reply payload macros to hgfsProto.h. + + * lib/include/hgfsServerPolicy.h: Add ShareList management + prototypes and structure members. + + * lib/include/msg.h: Add function prototypes for creating and + posting lists of messages. + + * lib/include/system.h: Add types & functions related to desktop + switch monitoring on Windows. + + * lib/include/unicodeOperations.h: Add/update inline unicode operations. + + * lib/include/vixCommands.h: Add VIX requests and events. + + * lib/include/vmbackup_def.h, lib/vmBackupLib/stateMachine.c: Move + backup status enum to public header. + + * lib/include/vm_basic_asm_x86_64.h: Div643232 now also works on MSC. + + * lib/include/vm_basic_defs.h: Add debug output macros for Windows drivers. + + * lib/include/vm_basic_types.h: Update the FMTPD macro, add + SCANF_DECL macro for arg checking on scanf-like functions. + + * lib/include/x86cpuid.h: Defines for AMD L2/L3 cache separately, and CPUID for Nehalem. + + * lib/misc/codesetOld.c: Bug fixes and general unicode handling updates. + + * lib/system/systemLinux.c: Use Posix_Getenv/Posix_Setenv impls. + + * lib/vixTools/vixTools.c, lib/vmBackupLib/scriptOps.c: Bug fixes. + + * modules/freebsd/*, modules/linux/*: Updates to correspond to + updates of files in main tree. + + * modules/freebsd/vmhgfs/hgfs_kernel.h: Bug fixes. + + * modules/freebsd/vmxnet/vm_device_version: Add + SCSI_IDE_HOSTED_CHANNEL define, update SCSI_MAX_CHANNELS. + + * modules/freebsd/vmxnet/vmnet.def: Add capabilities for IPv6 + checksumming and TSO, and large packet TSO. + + * lib/include/vmblock.h, modules/linux/vmblock/linux/control.c, + modules/linux/vmblock/linux/vmblockInt.h: Use a macro to better + abstract the vmblock mount point & device. + + * vmware-user/vmware-user.c: Add SIGPIPE to the list of signals + that vmware-user handles. + +2008-05-02 Adar Dembo + + * Resync with internal trunk (2008.04.19). + + * configure.ac, guestd/Makefile.am, hgfsclient/Makefile.am, + lib/misc/*/Makefile.am, lib/string/*/Makefile.am, toolbox/Makefile.am, + vmware-user/Makefile.am, xferlogs/Makefile.am: Added libicu support for + codeset conversions. This includes some makefile logic as well as + autoconf arguments for controlling libicu behavior at compile-time. + + * */foreignVMToolsNetworking.c, lib/vixTools/vixTools.c: Unicode fixes. + + * */foundryToolsDaemon.c, lib/foundryMsg/vixTranslateErrOpenSource.c, + lib/panic/panic.c, lib/printer/printer.c: Added calls to Win32 Unicode + wrappers. + + * guestd/main.c: Cleaned up guestInfo server when guestd shuts down. + + * guestd/toolsDaemon.c, vmware-user/resolution.c: Disabled multi-mon + advertisement for Win2k. + + * lib/auth/authPosix.c, lib/dnd/dndLinux.c, lib/file/*, + lib/impersonate/impersonatePosix.c, lib/include/mntinfo.h, + lib/sync/syncWaitQPosix.c, lib/user/hostinfoPosix.c, lib/user/util.c, + lib/user/utilPosix.c, lib/wiper/wiperPosix.c: Added calls to POSIX + Unicode wrappers. + + * lib/file/*: Replaced calls to string functions with calls to + the "safe" family of string functions. + + * lib/dict/dictll.c, lib/include/dictll.h: Detect and tolerate UTF-8 + dictionary files that contain the UTF-8 BOM. + + * lib/err/*, lib/include/err.h, lib/include/msgfmt.h, + lib/include/msg.h: Added support for localization of error strings. + + * lib/foundryMsg/foundryThreads.c, lib/include/foundryThreads.h, + lib/misc/util_misc.c: Added opaque type for threads/process IDs. + + * lib/guestInfo/guestInfoServer.c: Removed separate thread context. + + * lib/hgfsServer/*, lib/include/hgfs*.h: Additional HGFSv3 cleanup. + + * lib/hgfsServer/hgfsServerLinux.c: Added calls to POSIX Unicode + wrappers. Fixed some alias detection code for MacOS. + + * lib/include/backdoor_def.h: Added backdoor call for debugging events. + + * lib/include/bsdfmt.h, lib/string/bsd_vsnprintf.c, + lib/string/bsd_vsnprintfw.c: Replaced BSDFmt_WCSonv with + BSDFmt_WChartoUTF8. + + * lib/include/codeset.h, lib/include/codesetOld.h, lib/misc/codeset.c, + lib/misc/codesetOld.c, lib/string/convertutf.h: Implemented + libicu-backed codeset layer. When building without libicu, fallback on + codesetOld. + + * lib/include/guestApp.h: Added wide versions of dictionary functions. + + * lib/include/loglevel_user.h: Added two new loglevels. + + * lib/include/posix.h, lib/misc/posixPosix.c: Added new POSIX wrappers. + + * lib/include/str.h: Clarified the use of some functions. + + * lib/include/syncMutex.h, lib/include/syncWaitQ.h: Removed unneeded + macros. + + * lib/include/unicode*.h, lib/unicode/*: Ongoing Unicode work. + + * lib/include/util.h: Added Util_FreeStringList, removed Util_FreeList. + + * lib/include/uuid.h: Added new UUID creation scheme. + + * lib/include/vix*.h: Tweaked some VIX commands, errors, and properties. + + * lib/include/vmBackup.h, lib/vmBackupLib/scriptOps.c, + lib/vmBackupLib/stateMachine.c: Moved disabled targets logic from + library to Windows VSS provider. + + * lib/include/vm_basic_asm_x86*.h: Allow emitted FX functions to + modify main memory as a side effect. + + * lib/include/vm_tools_version.h: Bump Tools version. + + * lib/include/vm_version.h: Added several product versions. + + * modules/linux/vmhgfs/*: Additional cleanup for HGFSv3. Use new kthread + wrapper when possible. Bump module version. + + * modules/linux/vmmemctl/*: Use new kthread wrapper when possible. + Remove dead delayed work code. Bump module version. + + * modules/linux/*/compat_kthread.c: Added kthread wrapper implementation + for modules that use kernel threads. + + * modules/*/*/*: Reflect header file changes from elsewhere in the + source code tree. + + * vmware-user/copyPaste.c, vmware-user/pointer.c, + vmware-user/vmwareuserInt.h: Stop wastefully polling for pointer + updates if the VMX is new enough. + + * xferlogs/xferlogs.c: Fixed a warning in the call to fwrite. + (Thanks to Denis Leroy for reporting this bug.) + + +2008-04-14 Elliot Lee + + * Resync with internal trunk (2008.04.01). + + * Fixed legal header on all LGPL-licensed files. + + * vmware-user/resolution.c: Normalize the display topology that + comes in from the host, and report 'global_offset' capability. + + * toolbox/Makefile.am, vmware-user/Makefile.am, + lib/misc/Makefile.am, lib/misc/atomic.c, lib/Makefile.am, + lib/atomic/*, hgfsclient/Makefile.am: Move libAtomic stuff into libmisc + + * vmware-user/foundryToolsDaemon.c, lib/vixTools/vixTools.c, + lib/include/hgfsServerInt.h, guestd/toolsDaemon.c, + guestd/foundryToolsDaemon.c: Remove WIN9XCOMPAT, and some + SOCKET_MGR code. + + * vmware-user/copyPaste.c: Copy/paste fixes for cross-platform + operation. + + * modules/linux/vmxnet/vmnet_def.h: Add SG_SPAN_PAGES capability. + + * modules/linux/vmxnet/vm_device_version.h: Update some device limits. + + * modules/linux/*/compat_sched.h: Add TASK_COMM_LEN define. + + * modules/linux/*/compat_kernel.h, + modules/linux/*/kernelStubsLinux.c: Add vsnprintf define. + + * modules/linux/*/x86cpuid.h: Add new CPUs. + + * modules/linux/vmhgfs/vmhgfs_version.h: Bump HGFS version. + + * modules/linux/*/vm_basic_asm_x86.h, + modules/linux/*/vm_basic_asm_x86_64.h, + lib/include/vm_basic_asm_x86.h, lib/include/vm_basic_asm_x86_64.h: + Formatting fixes, and change asm directives used. + + * modules/linux/vmhgfs/module.h, + modules/linux/vmhgfs/filesystem.c, + modules/linux/vmhgfs/bdhandler.c, + modules/linux/*/compat_kthread.h: compat_kthread fixes. + + * modules/freebsd/vmxnet/net_compat.h, + modules/freebsd/vmxnet/if_vxn.c: Updates for FreeBSD 7.0. + (Thanks to Martin Blapp for contributing to these changes.) + + * lib/misc/util_misc.c, lib/include/loglevel_user.h, + lib/user/hostinfoPosix.c, lib/misc/hostname.c: Bugfix. + + * lib/unityStub/unityStub.c, lib/include/unity.h: Add stub and enums + related to DnD support. + + * lib/unicode/unicodeSimpleTypes.c, + lib/unicode/unicodeSimpleTransforms.c, + lib/unicode/unicodeSimpleBase.c, lib/unicode/unicodeCommon.c, + lib/include/unicodeTypes.h, + lib/include/unicodeTransforms.h, + lib/include/unicodeBase.h, lib/include/unicodeCommon.h: Add + additional Unicode-related functions. + + * lib/sync/syncMutex.c, lib/include/syncMutex.h: Add TryLock method. + + * lib/strUtil/strutil.c: Add int64-related functions. + + * lib/string/str.c: Compile fix + + * lib/string/bsd_output_shared.c: Better handling of floating + point on Windows. + + * lib/include/progMgr.h, lib/procMgr/procMgrPosix.c: Clarify that + the strings are in UTF-8, do conversion as needed. + + * lib/include/posix.h, lib/misc/posixPosix.c, + lib/misc/posixWin32.c, lib/file/filePosix.c: Add new Posix_ + function implementations, and unicodify existing ones. + + * lib/misc/hashTable.c, lib/include/hashTable.h: Add lock-less hash + table functions. + + * lib/misc/util_misc.c, lib/include/w32util.h: Add a couple of + Win32 utility functions. + + * lib/include/vm_version.h: Add WS5 config version. + + * lib/include/vm_atomic.h: Add typecasts to atomic operations to + make compilers stop complaining, and expand the AtomicUseFence option. + + * lib/include/vm_app.h: Add a couple of HGFS-related options. + + * lib/include/vix.h: Update a few errors and other macros. + + * lib/include/vixCommands.h, lib/foundry/foundryMsg.c: Change a + bunch of structure members from int32 to uint32, and add a parsing + function. + + * lib/include/msgfmt.h, lib/include/msg.h: Additional + message-handling prototypes. + + * lib/include/guestInfoInt.h, lib/include/guestInfo.h, + lib/guestInfo/Makefile.am, lib/guestInfo/guestInfoServer.c, + lib/guestInfo/guestInfoPosix.c, + lib/guestInfo/guestInfoPerfMonLinux.c: Add IPv6 support, and the + ability to read mem stats on Linux. + + * lib/include/fileIO.h, lib/file/fileIOPosix.c: Add MacOS function + related to Time Machine. + + * lib/guestApp/guestApp.c: Use Posix_ variants of functions. + + * lib/ghIntegrationStub/ghIntegrationStub.c: Add GHI capabilities + stubs. + + * lib/dnd/dndCommon.c, lib/file/file.c: Use new Unicode_Format() + function, bugfix. + + * guestd/main.c: Fix a security bug. + + * configure.ac: Allow calling libdnet 'dumbnet' for Debian + systems. Detect libprocps. + +2008-03-19 Adar Dembo + + * Resync with internal trunk (2008.03.13). + + * vm_version.h: Updated Tools version. + + * configure.ac: Added dynamic dnet detection and --without-dnet flag. + + * guestd/debugStdio.c, lib/include/system.h, lib/system/systemLinux.c: + Modified debugging to file behavior to prepend debug strings with human + readable timestamps. + + * guestd/main.c, guestd/toolsDaemon.c, lib/conf/conf.c, + lib/guestApp/guestApp.c, lib/include/guestApp.h: Internationalized + GuestApp_GetInstallPath and GuestApp_GetconfPath. + + * lib/auth/authPosix.c, lib/dnd/dndLinux.c, lib/file/*, + lib/impersonate/impersonatePosix.c, lib/include/fileInt.h, + lib/include/posix.h, lib/misc/posix*.c: Refactored, extended, and made + use of the set of POSIX internationalization-safe function wrappers. + + * lib/dnd/dndCommon.c, lib/include/dnd.h, lib/include/dndInt.h, + vmware-user/copyPaste.c, vmware-user/dnd.c: Replaced some duplicated + UTF-8 formatting code with calls to lib/unicode. + + * lib/guestInfo/guestInfoPosix.c: Replaced the old syscall-based + implementation of nicinfo with a simpler implementation that uses dnet. + + * lib/guestInfo/guestInfoServer.c, lib/include/guestInfo.h, + lib/include/guestInfoInt.h: Added Win32 implementation of + meminfo. POSIX implementation to follow. + + * lib/hgfsServer/hgfsServerLinux.c: Replaced a direct readlink(3) call + with a call to the POSIX wrapper for readlink(3). Relax an overeager + ASSERT in symlink checking when using the special empty share. + + * lib/include/codeset.h, lib/string/bsd_vsnprintf.c, lib/string/str.c, + lib/unicode/unicodeSimpleOperations.c, lib/unicode/unicodeSimpleUTF16.h: + Refactored ICU routines from unicodeSimpleUtf16.h to codeset.h, which + is now licensed under the ICU license (BSD variant). + + * lib/include/file.h, lib/file/file.c: Added function File_StripSlashes. + + * lib/include/hgfsProto.h: Removed an A acute from a comment to allow + the file to be built on Windows systems where the default language isn't + English. + + * lib/include/hostinfo.h, lib/include/util.h, lib/user/hostinfoPosix.c, + lib/user/util.c, lib/user/utilPosix.c: More conversions to + lib/unicode. Added Util_ZeroFreeStringW function for Windows in util.h. + + * lib/include/msg.h: Removed obsolete NO_MSGFMT macro. + + * lib/include/unicodeBase.h, lib/unicode/unicodeCommon.c, + lib/unicode/unicodeSimpleBase.c: Added some more encoding functions. + + * lib/include/vixCommands.h, lib/include/vixOpenSource.h: Added another + user credential type, some command flags, some command layouts, some + error codes, some properties, and tweaked existing commands. + + * lib/include/vixTools.h: Added VixToolsUserIsMemberOfAdministratorGroup + function. + + * lib/include/vm_assert.h, lib/include/vm_basic_defs.h: Move IMPLIES to + vm_basic_defs.h. Removed some vprobes definitions. + + * lib/include/vmBackup.h, lib/vmBackupLib/scriptOps.c, + lib/vmBackupLib/stateMachine.c: Added infrastructure to disable + quiescing targets from a config file. + + * lib/include/vm_basic_asm.h: Changed __GET_CPUID2 handling for Windows. + + * lib/include/vm_produt.h: Added VDM product. + + * lib/include/vm_tools_version.h: Bumped internal Tools version. + + * lib/include/win32util.h, lib/misc/hostname.c, lib/misc/util_misc: + Refactored functions to separate set of Win32 wrappers (next to the + POSIX wrappers mentioned earlier). + + * lib/misc/codeset.c: Made CodeSetGetCurrentCodeSet non-static. + + * lib/misc/*/Makefile.am: Added POSIX wrappers to build system. + + * lib/strUtil/strutil.c: Fixed bug in StrUtil_EndsWith function. + + * lib/include/unicodeTypes.h, lib/unicode/unicodeSimpleTypes.c: Removed + ISO-8859-11 encoding. Added cross-reference of IANA character set + names, windows code pages, and ICU encodings. + + * lib/vixTools/vixTools.c: Impersonation tweaks. + + * modules/*/*/*: Reflect header file changes from elsewhere in the + source code tree. + +2008-03-11 Adar Dembo + + * vm_version.h: Updated Tools version. + + * modules/vmblock/linux/*: Make vmblock build under 2.6.25-rc2. + The dentry and mount objects have been moved out of struct + nameidata and into the new struct path. Also, path_release() is + now path_put(). + + * modules/vmsync/linux/*: Make vmsync build under 2.6.25-rc2. + The same changes were needed here as in vmblock above. + +2008-03-10 Adar Dembo + + * vm_version.h: Updated Tools version. + + * modules/vmhgfs/linux/*: Make vmhgfs build under 2.6.25-rc1. + The iget() function has been removed and filesystems are now + expected to implement it themselves using iget_locked(). + +2008-02-27 Elliot Lee + + * configure.ac, guestd/Makefile.am, toolbox/Makefile.am, + vmware-user/Makefile.am: Allow passing custom LDFLAGS in to + build process (patch by Mike Auty). + + * Resync with internal trunk (2008.02.27). + + * guestd/foundryToolsDaemon.c, lib/vixTools/vixTools.c, + vmware-user/foundryToolsDaemon.c: Win9x compat changes. + + * guestd/toolsDaemon.c: Style fixes. + + * hgfsmounter/hgfsmounter.c: Bug fixes. + + * lib/dnd/dndLinux.c, lib/dnd/dndCommon.c: Move some code to the + platform-independant file, some DnDv3 support. + + * lib/include/dnd.h, lib/include/dndInt.h: DnDv3 support. + + * lib/file/file.c, lib/file/fileIO.c, lib/file/fileIOPosix.c, + lib/file/fileLockPrimitive.c, lib/file/filePosix.c, + lib/include/file_extensions.h, lib/include/fileInt.h, + lib/include/fileIO.h: Move functions around, Unicode fixes, misc + fixes. + + * lib/foundryMsg/foundryPropertyListCommon.c: Error handling fixes. + + * lib/hgfsServer/*.c, lib/include/hgfs*.h, + modules/freebsd/vmhgfs/*, modules/linux/vmhgfs/*: HGFS v3 support, + updates to improve code re-use between the FreeBSD and MacOS X + ports, and updates to make the Linux port build on 2.6.25-rc1 (but + not rc2, yet). + + * lib/include/auth.h, lib/include/codeset.h, + lib/include/hostinfo.h, lib/include/str.h, lib/include/unicode*.h, + lib/include/vm_basic_types.h, lib/misc/hostname.c, + lib/unicode/*.c, lib/user/hostinfoPosix.c: Unicode fixes. + + * lib/include/backdoor_def.h: Add a new command for use by the + BIOS in checking the GuestOS against Darwin. + + * lib/include/dynarray.h, lib/misc/dynarray.c, + lib/misc/Makefile.am, lib/misc/shared/Makefile.am: Add Dynarray + implementation. + + * lib/include/bsdfmt.h, lib/include/bsd_output_int.h, + lib/string/bsd_output_shared.c, lib/string/bs_vsnprintf.c, + lib/string/bsd_vsnwprintf.c, lib/string/str.c: Rework built-in + printf implementation, esp. for Unicode fixes. + + * lib/include/ghIntegration.h: Shuffle types around. + + * lib/include/loglevel_user.h, lib/include/unity.h, + lib/syncDriver/syncDriverPosix.c, lib/user/util.c, + toolbox/toolbox-gtk.c: Misc fixes. + + * lib/include/vmBackup.h, lib/vmBackupLib/scriptOps.c, + lib/vmBackupLib/stateMachine.c, lib/vmBackupLib/vmBackupInt.h: + Rework scripts for freeze & thaw operations. + + * lib/include/vm_product.h, lib/include/vm_version.h: Add new + product defs (VMRC). + + * lib/include/vm_tools_version.h: Add ESX 3.5U1 product. + + * lib/include/vixCommands.h, lib/include/vix.h: Add new VIX + commands and error code. + + * lib/include/win32util.h: Add misc Win32 utilities. + + * modules/*/*/*: Reflect header file changes from elsewhere in the + source code tree. + +2008-02-13 Adar Dembo + + * Resync with internal trunk (2008.02.12). + + * configure.ac, lib/unityStub/*, lib/ghIntegrationStub/*, + lib/Makefile.am, vmware-user/Makefile.am, vmware-user/vmware-user.c: + Added lib/unityStub and lib/ghIntegrationStub. Unity and guest-host + integration features for X11 guests are on the way. + + * configure.ac, guestd/Makefile.am, lib/fileUtf8/*, + lib/vixTools/vixTools.c, vmare-user/Makefile.am: lib/file is now fully + internationalized. Removed unneeded lib/fileUtf8. + + * foundryToolsDaemon.c: Fixed a leak of the sync driver handle. + + * guestd/toolsDaemon.c: Send guestd's "config directory" to the VMX for + publishing. + + * hgfsmounter/hgfsmounter.c: Port to MacOS. + + * lib/dnd/*, lib/err/err.c, lib/file/*, lib/include/dnd*, + lib/include/file*, lib/include/unicode*, lib/include/util.h, + lib/unicode/*, lib/user/utilPosix.c: More Unicodification. + + * lib/file/file.c, lib/include/file.h: Added File_EnsureDirectory. + + * lib/foundryMsg/foundryMsg.c, lib/guestInfo/guestInfoServer.c, + lib/misc/codeset.c, lib/misc/vmstdio.c, + lib/SLPv2Parser/SLPv2MsgAssembler.c, lib/user/util.c: Removed some + unneeded casts. + + * lib/foundryMsg/foundryThreads.c, lib/include/foundryThreads.h: Added + FoundryThreads_Free. + + * lib/guestInfo/*, lib/include/guest_os.h, lib/include/guestInfo.h: + Refactored GetSystemBitness. Removed osNames.h. + + * lib/hgfsServer/hgfsServerLinux.c: Modified MacOS alias resolution code + so as not to mount volumes. Made HGFS query volume code more resilient + to failures. + + * lib/include/backdoor_def.h: Added commands for VAssert. + + * lib/include/escape.h, lib/misc/escape.c: Escape_Do is no longer + declared inline. + + * lib/include/hashTable.h, lib/misc/hashTable.c, lib/misc/Makefile.am, + lib/misc/shared/Makefile.am: Renamed from hash.[ch]. + + * lib/include/iovector.h, lib/include/vm_basic_types.h: Added + SectorType definition. + + * lib/include/loglevel_user.h: Added additional log levels. + + * lib/include/msgfmt.h: Modified for use in VMKERNEL. Added + MsgFmt_GetArgswithBuf. + + * lib/include/msg.h: Added Msg_AppendVob for ESX. + + * lib/include/stats_user*: Modified some preprocessing steps. Added + SETUP_WANT_GETVAL to retrieve named stat counter values. + + * lib/include/str.h: Modified behavior Str_* family of functions for + Windows. + + * lib/include/strutil.h, lib/strUtil/strutil.c: Removed Split, Grep, + GrepFd, and GrepFree. Added EndsWith and DecimalStrToUint. + + * lib/include/syncWaitQ.h, lib/sync/*: Modified SyncWaitQ_Add and + SyncWaitQ_Remove to use PollDevHandle fd types instead of int fd types. + + * lib/include/timeutil.h, lib/misc/timeutil.c: Added + TimeUtil_GetLocalWindowsTimeZoneIndex and some helper functions. + + * lib/include/util.h, lib/user/utilPosix.c: Added Util_BumpNoFds. + + * lib/include/vixCommands.h: Added commands for device hotplug and + remote debugging. + + * lib/include/vix.h, lib/include/vixOpenSource.h: Added some new errors + and properties. Added more VM manipulation functions. + + * lib/include/vm_atomic.h: Comment cleanup and added VMKERNEL-specific + calls for fencing. + + * lib/include/vm_basic_asm_x86_64.h: Added inline routines to save and + restore ES1. + + * lib/include/vm_basic_types.h: Added some types and cleaned up a bit. + + * lib/include/vm_legal.h: Updated COPYRIGHT_YEARS. + + * lib/include/vm_product.h: Added hostd service name. + + * lib/include/x86cpuid.h: Cleaned up the file and added some definitions + for Penryn processors. + + * lib/misc/codeset.c: Added new UTF-16 --> UTF-8 conversion routine. + + * lib/misc/util_misc.c, lib/user/util.c: Moved Util_GetCurrentThreadId + and friends to util_misc.c. + + * lib/procMgr/procMgrPosix.c: Cleaned up some code and reworked + asynchronous process execution so as to properly track the grandchild's + pid instead of the child's pid. + + * lib/string/bsd*: Reorganized BSD formatter. + + * lib/string/str.c: Updated unit tests. Added some Windows corner case + behavior for Str_Vsnwprintf. + + * lib/strUtil/strutil.c: Fixed some corner cases in existing functions + that call strtoul. + + * lib/vixTools/vixTools.c: Changed signature of VixToolsImpersonateUser. + Changed error code handling in a few places. + + * modules/freebsd/vmhgfs/*: Refactored a lot of code so that it can be + safely reused within the MacOS vmhgfs module. + + * modules/*/*/kernelStubs*: Removed dead System_Uptime function. + + * modules/linux/*/compat_wait.h: Reworked VMW_HAVE_EPOLL macro. Added + waitqueue helper macros for older kernels. + + * modules/linux/vmhgfs/file.c, modules/linux/vmhgfs/fsutil.*, + modules/linux/vmhgfs/inode.c: Added HgfsSetUidGid function and used it + to preserve uid/gid after creating a directory. + + * modules/linux/vmhgfs/vmhgfs_version.h: Bumped driver version. + + * modules/linux/vmsync/compat_workqueue.h: Basic implementation of + work queues and delayed work queues (using taskqueues and timers) for + older kernels. + + * modules/linux/vmsync/sync.c: Modified internal state to use new + compatible work queue implementation. + + * modules/linux/vmxnet/compat_ioport.h, + modules/linux/vmxnet/compat_netdevice.h, + modules/linux/vmxnet/compat_pci.h, + modules/linux/vmxnet/compat_skbuff.h, + modules/linux/vmxnet/vmxnetInt.h: Added and refactored + compatibility macros for use in vmxnet3 and vmci sockets modules. + + * modules/linux/vmxnet/vmxnet.c: Hide some kernel functions behind + compatibility macros. + +2008-01-23 Adar Dembo + + * Resync with internal trunk (2008.01.08). + + * configure.ac, guestd/Makefile.am, hgfsclient/Makefile.am, + lib/Makefile.am, toolbox/Makefile.am, vmware-user/Makefile.am: + integrated lib/unicode for internationalizing strings. + + * guestd/main.c: Stopped using pgrep for finding existing instances + of guestd. Removed ancient bandwidth test code. + + * guestd/toolsDaemon.c: Moved initial send of the guest's uptime from + when guestd sends its version to when guestd registers its + capabilities. + + * lib/file/*, lib/include/file*.h : Massive overhaul of lib/file to + integrate the new unicode strings that are i18n-safe. Quite a bit of + cleanup and refactoring as well. + + * lib/file/file.c: Addition of File_PrependToPath function. + + * lib/file/fileIOPosix.c: Addition of FileIO_SetExcludedFromTimeMachine + and FileIO_PrivilegedPosixOpen functions. + + * lib/fileUTF8/fileUTF8Linux.c, lib/include/fileUTF8.h: Removal of some + casts and addition of FileUTF8_GetSize function. + + * lib/foundryMsg/foundryMsg.c, lib/misc/vmstdio.c, + lib/SLPv2Parser/SLPv2MsgAssembler.c: Addition of some casts. + + * lib/foundryMsg/foundryPropertyListCommon.c: Robustified some error + cases. + + * lib/foundryMsg/vixTranslateErrOpenSource.c, + lib/include/vixOpenSource.h: Added VIX_E_OUT_OF_MEMORY error code. + Added Vix_TranslateCOMError function. ADded VIX_DEBUG macro. + + * lib/guestInfo/guestInfoServer.c, lib/include/guestInfo.h: Added some + casts and refactored some functions. Also fixed a crash that hinders + backwards compatibility. + + * lib/hgfs/cpNameUtil.c, lib/hgfs/cpNameUtilLinux.c, + lib/hgfsBd/hgfsBd.c, lib/include/cpName.h, lib/include/cpNameLite.h, + lib/include/escBitvector.h, lib/include/hgfsUtil.h, + lib/message/messageBackdoor.c, lib/message/message.c, + lib/message/messageStub.c, lib/rpcout/rpcout.c, + modules/freebsd/vmhgfs/kernelStubs.h: Made safe for inclusion in MacOS + kernel module code. + + * lib/include/backdoor.h: Refactored some type definitions. + + * lib/include/bsd_output_int.h, lib/include/safetime.h, + lib/string/bsd_output_shared.c: Made safe for Win64 builds. + + * lib/include/dynbuf.h: Added DynBuf_AppendString function. + + * lib/include/err.h: Assorted cleanup. + + * lib/include/escape.h, lib/misc/escape.c: Converted Escape_Do to be + inline. Some cleanup. + + * lib/include/guest_os.h: Assorted cleanup. + + * lib/include/hash.h, lib/misc/hash.c, lib/misc/Makefile.am, + lib/misc/shared/Makefile.am: Added basic hash table implementation. + + * lib/include/hostinfo.h, lib/user/hostinfoPosix.c: Refactored and + added several timekeeping functions. + + * lib/include/localconfig.h, lib/include/util_shared.h: Modified + statements for include check. + + * lib/include/log.h: Changed the value of some macros when debugging. + + * lib/include/loglevel_defs.h: Refactoed some code, added macros for + use in the VMM. + + * lib/include/loglevel_user.h: Added loglevels for some new components. + + * lib/include/msgfmt.h: Added new functions. + + * lib/include/msg.h: Added new Msg_LocalizeList function. + + * lib/include/netutil.h: Modified prototypes for two Windows-only + functions. + + * lib/include/preference.h: Added new Preference_GetInt64 and + Preference_SetFromString functions. + + * lib/include/strutil.h, lib/strUtil/strutil.c: Cleaned up and added + some new functions. + + * lib/include/su.h: Cleanup. + + * lib/include/syncMutex.h, lib/sync/syncMutex.c: Added NetWare + implementation of some synchronization primitives. + + * lib/include/unicode*, lib/unicode/*: New library for handling + Unicode-aware strings. + + * lib/include/util.h, lib/user/util.c: Assorted refactoring and + addition of some new functions, one related to backtracing. + + * lib/include/vixCommands.h: New commands for vprobes, replay, message + dialogs, and others, plus cleanup of some existing commands. + + * lib/include/vm_assert.h: Added IMPLIES macro. + + * lib/include/vm_atomic.h, lib/include/vm_basic_asm.h: Refactored for + safe Win64 builds. + + * lib/include/vm_basic_defs.h: Added compatibility code for __va_copy. + + * lib/include/vm_basic_types.h: Added FMTH for printing the value of + handles. Set a new #pragma to ignore size_t truncation warnings on + Windows. Added several other macros, as well as a ssize_t definition + for some versions of BSD. + + * lib/include/vm_legal.h: Added more patents to the patent string. + + * lib/include/vm_product.h: Added new macros for some products. + + * lib/include/vm_tools_version.h: Added macros for certain older Tools + versions and for PRODUCT_BUILD_NUMBER refactoring. + + * lib/include/vm_version.h: Tweaked some product expiration dates and + versions. Refactored many uses of BUILD_NUMBER to PRODUCT_BUILD_NUMBER. + + * lib/include/x86cpuid.h: Tweaked definition of RDTSCP flag. Refactored + BIT_MASK macro to VMW_BIT_MASK. + + * lib/misc/base64.c: Modified calling contract for Base64_EasyEncode. + + * lib/misc/codeset.c: Tweaked casts and preprocessor conditioning. + + * lib/misc/idLinux.c: Added IdAuthCreateWithFork and reworked several + other functions to work around a bug in Apple's detection of GUI + processes. + + * lib/misc/util_misc.c: Moved W32Util_GetLongPathName and + W32UTil_LookupSidForAccount elsewhere. + + * lib/rpcin/rpcin.c: Addition of a ping GuestRPC callback. + + * lib/string/str.c: Removed a comment. + + * lib/sync/syncWaitQPosix.c: Added code to disable a workaround for a + MacOS bug when appropriate (it was fixed in Leopard). + + * lib/vixTools/vixTools.c: Refactored some code, added code to modify + the guest's networking configuration, added some casts, and added + code to prevent renaming a file to itself. + + * modules/freebsd/*/Makefile, modules/linux/*/Makefile.normal: Set a + make variable so the module file will be build in the parent directory. + Removed some unused rules. + + * modules/freebsd/vmhgfs/kernelStubsBSD.c, + modules/linux/vmhgfs/kernelStubsLinux.c: Removed unused function. + + * modules/linux/*/include/driver-config.h: Added check to prevent + uintptr_t from being declared twice. + + * modules/linux/vmblock/linux/filesystem.c, + modules/linux/vmblock/Makefile.kernel: Added check for newer kernels + where the slab allocator's constructor function expects three + arguments. Makes it work with 2.6.25-rc1 (but not rc2, yet). + + * modules/linux/vmblock/linux/vmblock_version.h: Bumped module version. + + * modules/linux/vmhgfs/filesystem.c, modules/linux/vmhgfs/inode.c, + modules/linux/vmhgfs/module.h, modules/linux/vmhgfs/page.c: Added + support for writeback caching in conformant kernels. + + * modules/linux/vmhgfs/vmhgfs_version.h: Bumped module version. + + * modules/linux/vmxnet/vmxnetInt.h: Renamed a type and removed the + inclusion of unnecessary headers. Pruned said headers from codebase. + +2007-11-15 Elliot Lee + + * Bandsaw release (2007.11.15). + + * configure.ac: Handle building modules for multiple OS's. Improve + X detection to allow building --without-x. Improve Gtk+ + detection. Detect libdnet on Solaris. Detect which -Wwarning flags + the compiler can handle. + + * vmware-user/foreignVMToolsNetworking.c, lib/vixTools/vixTools.c, + guestd/foreignVMToolsNetworking.c, lib/include/netutil.h, + lib/include/guestInfo.h, lib/netUtil/netUtilLinux.c, + lib/include/guestInfoInt.h, lib/guestInfo/guestInfoPosix.c, + lib/guestInfo/guestInfoServer.c: Move to new NicInfo structures. + + * vmware-user/foundryToolsDaemon.c, guestd/foundryToolsDaemon.c: + Make sure requestMsg is not NULL before looking inside it. + + * guestd/main.c: Cleanup of HGFS pserver and mounting code. Check + for some type of signal when sending an RPC. + + * guestd/toolsDaemon.c, vmware-user/resolution.c: Have the guest + tell the host whether screen resolution changes should be sent, + instead of having the host guess it based on the OS type set in + the .vmx file. Better timeout checking to avoid problems when + host & guest time diverge. + + * hgfsmounter/hgfsmounter.c: FreeBSD support. Fixes to compile on + old systems. + + * lib/backdoor/backdoor.c: Tweak for FreeBSD kernel modules. + + * lib/include/mntinfo.h, lib/dnd/dndLinux.c, + lib/wiper/wiperPosix.c, lib/syncDriver/syncDriverPosix.c: Fixes to + compile on new systems w/gcc 4.2. + + * lib/err/err.c, lib/err/errPosix.c, lib/err/Makefile.am: Move + Err_Errno2String function into POSIX-specific source file. + + * lib/file/fileIOPosix.c: Handle EDQUOT if applicable. Fixes to + compile on new systems where SYS__llseek may not be + available. Better reporting of errors, by translating errno into + FILEIO_* error codes. + + * lib/file/fileLockPosix.c: Fixes to compile on old systems. Add a + bunch of functions to the FileLock* API. + + * lib/file/fileLockPrimitive.c, lib/include/fileInt.h: Bunch of + file locking cleanups and bug fixes. + + * lib/file/filePosix.c: Bunch of MacOS-related fixes. Add + File_GetTimes(), FilePosixGetParent(), FilePosixGetBlockDevice(), + etc. + + * lib/fileUtf8/fileUTF8Linux.c: Add FileUTF8_GetTimes() function. + + * lib/foundry/foundryMsg.c, lib/include/vixCommands.h: Add + VIX_USER_CREDENTIAL_HOST_CONFIG_HASHED_SECRET credential type, and + a bunch of VIX commands relating to record-replay. + + * lib/foundryMsg/vixTranslateErrOpenSource.c: Translate a couple + more error codes. + + * lib/guestInfo/guestInfoPosix.c, lib/guestInfo/Makefile.am: Use + libdnet on Solaris to retrieve networking info. + + * lib/hgfs/cpNameUtil.c, lib/hgfs/cpNameUtilInt.h, + lib/hgfs/cpNameUtilLinux.c: Couple more CPName <-> UTF8 conversion + routines. Some MacOS changes as well. + + * lib/hgfs/hgfsUtil.c, lib/include/hgfs.h, + modules/linux/vmhgfs/fsutil.c: Handle ENAMETOOLONG. + + * lib/hgfs/staticEscape.c, lib/hgfs/hgfsBd.c: Handle FreeBSD as + well. + + * lib/hgfsServer/hgfsServer.c: Tie in the cpNameUtil UTF8 changes + on MacOS. + + * lib/hgfsServer/hgfsServerLinux.c: Make the getdents() wrapper + work on a wider range of Linux systems. Add "alias" resolution on + MacOS, and tie in the cpNameUtil UTF8 changes on MacOS. + + * lib/hgfsServer/hgfsServerPolicyGuest.c: Handle FreeBSD. + + * lib/include/backdoor_def.h: Add BDOOR_CMD_LAZYTIMEREMULATION and + BDOOR_CMD_BIOSBBS. + + * lib/include/str.h, lib/include/bsd_output.h, + lib/include/bsd_output_int.h: include compat_stdarg.h, change + vsnwprintf prototype, add HAVE_BSD_WPRINTF define, other compat + fixups. + + * lib/include/cpNameUtil.h, lib/include/codeset.h, + lib/misc/codeset.c: Changes to correspond to cpNameUtil UTF8 + changes. + + * lib/include/compat/compat_stdarg.h: New header for doing stdarg + easily across platforms. + + * lib/include/cpName.h: FreeBSD fixes. + + * lib/include/dnd.h: Add Dnd_SetClipboard and Dnd_GetFileList(). + + * lib/include/escBitvector.h: FreeBSD fixes. + + * lib/include/file.h, lib/include/fileUTF8.h: Add new MacOS + routines and File_GetTimes/FileUTF8_GetTimes. + + * lib/include/hgfsProto.h: Explanation of the whole cpNameUtil and + codeset UTF8 changes and how they tie in with HGFS. + + * lib/include/hgfsUtil.h: Random compatibility changes. + + * lib/include/loglevel_user.h: Add a few LOGLEVEL_VAR definitions. + + * lib/include/msg.h: s/USE_MSGFMT/NO_MSGFMT/ + + * lib/include/osNames.h: Add Windows 2003 Datacenter Edition, and + user-visible 64bit suffix macro. + + * lib/misc/random.c, lib/include/random.h: Add Random_Quick() and + Random_QuickSeed() routines. + + * lib/misc/idLinux.c, lib/include/su.h: Add Id_AuthGetLocal() and + Id_GetAuthExternal() routines, and compat fixes. + + * lib/misc/timeutil.c, lib/include/timeutil.h: Add + TimeUtil_UnixTimeToNtTime() routine. + + * lib/include/util.h: Add a couple of MacOS routines. + + * lib/include/vmBackup.h, lib/vmBackupLib/stateMachine.c: add a + couple of structure elements for Windows backup fixes. + + * lib/include/vm_basic_asm.h: fixes for reading TSC on 64-bit + platforms. + + * lib/include/vm_basic_defs.h: Add other va_copy macros. + + * lib/include/vm_basic_types.h: Fixes for compiling on a wide + range of systems. + + * lib/include/vm_legal.h: Change the PATENTS_STRING + + * lib/include/vm_product.h: Add "License Infrastructure" product. + + * lib/include/vm_tools_version.h: Change tools versions listed for + various upcoming product releases. + + * lib/include/vm_version.h: Update the versions. + + * lib/include/x86cpuid.h: Define more CPU flags & fields, add new + CPU models. Fixes for fully writable TSC detection. + + * lib/message/message.c, lib/message/messageBackdoor.c: Fixes for + FreeBSD. + + * lib/misc/util_misc.c: Handle MacOS. + + * lib/rpcIn/rpcin.c: Fail a badly-formed RPC instead of + ASSERT()'ing into oblivion. + + * lib/string/bsd_vsnprintf.c: Various fixes to synchronize with + bsd_vsnwprintf.c. + + * lib/string/Makefile.am, lib/string/shared/Makefile.am, + lib/string/str.c lib/string/bsd_vsnwprintf.c: New file to + implement vsnwprintf() for compat purposes. + + * lib/vixTools/vixTools.c: New FileUTF8 routines. + + * Makefile.am, modules/Makefile.am: --without-x fixes, add + xferlogs, move kernel module building into separate Makefile.am + + * modules/freebsd/*: Add FreeBSD kernel modules (vmblock, vmhgfs, + vmmemctl, vmxnet). + + * modules/linux/*/include/compat_*.h, + modules/linux/*/autoconf/cachector.c, + modules/linux/*/autoconf/cachecreate.c, + modules/linux/*/backdoor.c, modules/linux/vmhgfs/filesystem.c, + modules/linux/vmhgfs/hgfsBd.c, lib/procMgr/procMgrPosix.c, + lib/rpcOut/rpcout.c, lib/user/util.c, lib/vmCheck/vmcheck.c, + libguestlib/Makefile.am, lib/deployPkg/runDeployPkgPosix.c, + lib/include/vm_atomic.h: Compat fixes. + + * modules/linux/*/kernelStubs.h: Update for FreeBSD. + + * modules/linux/*/include/*.h, modules/linux/*/backdoor_def.h, + modules/linux/*/cpName.h, modules/linux/*/hgfs.h, + modules/linux/*/hgfsProto.h, modules/linux/*/hgfsUtil.[ch], + modules/linux/*/kernelStubsLinux.c, + modules/linux/*/messageBackdoor.c, modules/linux/*/message.c, + modules/linux/*/rpcout.c, modules/linux/*/rpcin.c, + modules/linux/*/staticEscape.c, modules/linux/*/vm_basic_asm.h, + modules/linux/*/vm_basic_defs.h, modules/linux/*/vm_basic_types.h, + modules/linux/*/x86cpuid.h, modules/linux/*/compat_*.h: Pull in + updated files from main source tree. + + * modules/linux/*/Makefile.kernel: Remove CC_WARNINGS/CC_OPTS + gunk. + + * modules/linux/*/README, modules/linux/*/Makefile.normal: Build + foo.o driver by default on systems with VM_KBUILD=no. + + * modules/linux/vmhgfs/vmhgfs_version.h: Updated VMHGFS driver + version. + + * modules/linux/vmmemctl/os.[ch], + modules/linux/vmmemctl/vmballoon.c: Implement and use os_yield() + to deprioritize the Balloon_Deallocate operation. + + * modules/linux/vmsync/*: New sync driver to make VM snapshots + consistent. + + * modules/linux/vmxnet/bpf_meta.h: New file. + + * modules/linux/vmxnet/net_dist.h: Update NET_MAX_IMPL_PKT_OVHD + value. + + * modules/linux/vmxnet/vm_device_version.h: Mention VMXNET3 + + * modules/linux/vmxnet/vmkapi_status.h: Updated VMK_ERR codes. + + * modules/linux/vmxnet/vmkapi_types.h: Add VMK_CONST64(U) macros. + + * modules/linux/vmxnet/vmxnet2_def.h, + modules/linux/vmxnet/vmnet_def.h, + modules/linux/vmxnet/vmxnet_def.h, + modules/linux/vmxnet/vmxnetInt.h, modules/linux/vmxnet/vmxnet.c: + Add (optional) BPF support. + + * modules/linux/vmxnet/vmxnetInt.h, modules/linux/vmxnet/vmxnet.c: + Add vmxnet_link_check to propagate device link status to netdev. + + * common/vm-support: New script to gather support info from a VM. + + * scripts/*/*-default: New poweron/poweroff/suspend/resume scripts + for a VM. Add support for dropping user-provided scripts into a + subdirectory. + + * toolbox/toolboxAbout.c: Eliminate warnings about unused + variables. + + * toolbox/toolboxShrink.c: Update wording of message. + + * toolbox/copyPaste.c: Try cutting & pasting UTF8 text if we can. + + * xferlogs/*: New log transfer utility. + +2007-10-26 Elliot Lee + + * Initial import of 2007.09.04-56574 code ("Axe" release). + * Import 2007.10.08 snapshot, which includes patches to fix the + --without-x flag, and compilation with gcc 4.2. diff --git a/open-vm-tools/INSTALL b/open-vm-tools/INSTALL deleted file mode 100644 index 5458714e1..000000000 --- a/open-vm-tools/INSTALL +++ /dev/null @@ -1,234 +0,0 @@ -Installation Instructions -************************* - -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, -2006 Free Software Foundation, Inc. - -This file is free documentation; the Free Software Foundation gives -unlimited permission to copy, distribute and modify it. - -Basic Installation -================== - -Briefly, the shell commands `./configure; make; make install' should -configure, build, and install this package. The following -more-detailed instructions are generic; see the `README' file for -instructions specific to this package. - - The `configure' shell script attempts to guess correct values for -various system-dependent variables used during compilation. It uses -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, and a -file `config.log' containing compiler output (useful mainly for -debugging `configure'). - - It can also use an optional file (typically called `config.cache' -and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. Caching is -disabled by default to prevent problems with accidental use of stale -cache files. - - If you need to do unusual things to compile the package, please try -to figure out how `configure' could check whether to do them, and mail -diffs or instructions to the address given in the `README' so they can -be considered for the next release. If you are using the cache, and at -some point `config.cache' contains results you don't want to keep, you -may remove or edit it. - - The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You need `configure.ac' if -you want to change it or regenerate `configure' using a newer version -of `autoconf'. - -The simplest way to compile this package is: - - 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. - - Running `configure' might take a while. While running, it prints - some messages telling which features it is checking for. - - 2. Type `make' to compile the package. - - 3. Optionally, type `make check' to run any self-tests that come with - the package. - - 4. Type `make install' to install the programs and any data files and - documentation. - - 5. You can remove the program binaries and object files from the - source code directory by typing `make clean'. To also remove the - files that `configure' created (so you can compile the package for - a different kind of computer), type `make distclean'. There is - also a `make maintainer-clean' target, but that is intended mainly - for the package's developers. If you use it, you may have to get - all sorts of other programs in order to regenerate files that came - with the distribution. - -Compilers and Options -===================== - -Some systems require unusual options for compilation or linking that the -`configure' script does not know about. Run `./configure --help' for -details on some of the pertinent environment variables. - - You can give `configure' initial values for configuration parameters -by setting variables in the command line or in the environment. Here -is an example: - - ./configure CC=c99 CFLAGS=-g LIBS=-lposix - - *Note Defining Variables::, for more details. - -Compiling For Multiple Architectures -==================================== - -You can compile the package for more than one kind of computer at the -same time, by placing the object files for each architecture in their -own directory. To do this, you can use GNU `make'. `cd' to the -directory where you want the object files and executables to go and run -the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. - - With a non-GNU `make', it is safer to compile the package for one -architecture at a time in the source code directory. After you have -installed the package for one architecture, use `make distclean' before -reconfiguring for another architecture. - -Installation Names -================== - -By default, `make install' installs the package's commands under -`/usr/local/bin', include files under `/usr/local/include', etc. You -can specify an installation prefix other than `/usr/local' by giving -`configure' the option `--prefix=PREFIX'. - - You can specify separate installation prefixes for -architecture-specific files and architecture-independent files. If you -pass the option `--exec-prefix=PREFIX' to `configure', the package uses -PREFIX as the prefix for installing programs and libraries. -Documentation and other data files still use the regular prefix. - - In addition, if you use an unusual directory layout you can give -options like `--bindir=DIR' to specify different values for particular -kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. - - If the package supports it, you can cause programs to be installed -with an extra prefix or suffix on their names by giving `configure' the -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. - -Optional Features -================= - -Some packages pay attention to `--enable-FEATURE' options to -`configure', where FEATURE indicates an optional part of the package. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE -is something like `gnu-as' or `x' (for the X Window System). The -`README' should mention any `--enable-' and `--with-' options that the -package recognizes. - - For packages that use the X Window System, `configure' can usually -find the X include and library files automatically, but if it doesn't, -you can use the `configure' options `--x-includes=DIR' and -`--x-libraries=DIR' to specify their locations. - -Specifying the System Type -========================== - -There may be some features `configure' cannot figure out automatically, -but needs to determine by the type of machine the package will run on. -Usually, assuming the package is built to be run on the _same_ -architectures, `configure' can figure that out, but if it prints a -message saying it cannot guess the machine type, give it the -`--build=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name which has the form: - - CPU-COMPANY-SYSTEM - -where SYSTEM can have one of these forms: - - OS KERNEL-OS - - See the file `config.sub' for the possible values of each field. If -`config.sub' isn't included in this package, then this package doesn't -need to know the machine type. - - If you are _building_ compiler tools for cross-compiling, you should -use the option `--target=TYPE' to select the type of system they will -produce code for. - - If you want to _use_ a cross compiler, that generates code for a -platform different from the build platform, you should specify the -"host" platform (i.e., that on which the generated programs will -eventually be run) with `--host=TYPE'. - -Sharing Defaults -================ - -If you want to set default values for `configure' scripts to share, you -can create a site shell script called `config.site' that gives default -values for variables like `CC', `cache_file', and `prefix'. -`configure' looks for `PREFIX/share/config.site' if it exists, then -`PREFIX/etc/config.site' if it exists. Or, you can set the -`CONFIG_SITE' environment variable to the location of the site script. -A warning: not all `configure' scripts look for a site script. - -Defining Variables -================== - -Variables not defined in a site shell script can be set in the -environment passed to `configure'. However, some packages may run -configure again during the build, and the customized values of these -variables may be lost. In order to avoid this problem, you should set -them in the `configure' command line, using `VAR=value'. For example: - - ./configure CC=/usr/local2/bin/gcc - -causes the specified `gcc' to be used as the C compiler (unless it is -overridden in the site shell script). - -Unfortunately, this technique does not work for `CONFIG_SHELL' due to -an Autoconf bug. Until the bug is fixed you can use this workaround: - - CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash - -`configure' Invocation -====================== - -`configure' recognizes the following options to control how it operates. - -`--help' -`-h' - Print a summary of the options to `configure', and exit. - -`--version' -`-V' - Print the version of Autoconf used to generate the `configure' - script, and exit. - -`--cache-file=FILE' - Enable the cache: use and save the results of the tests in FILE, - traditionally `config.cache'. FILE defaults to `/dev/null' to - disable caching. - -`--config-cache' -`-C' - Alias for `--cache-file=config.cache'. - -`--quiet' -`--silent' -`-q' - Do not print messages saying which checks are being made. To - suppress all normal output, redirect it to `/dev/null' (any error - messages will still be shown). - -`--srcdir=DIR' - Look for the package's source code in directory DIR. Usually - `configure' can determine that directory automatically. - -`configure' also accepts some other, not widely useful, options. Run -`configure --help' for more details. - diff --git a/open-vm-tools/Makefile.am b/open-vm-tools/Makefile.am index dfb7cd234..d2c54cc64 100644 --- a/open-vm-tools/Makefile.am +++ b/open-vm-tools/Makefile.am @@ -39,6 +39,7 @@ if ENABLE_DEPLOYPKG SUBDIRS += libDeployPkg endif SUBDIRS += rpctool +SUBDIRS += namespacetool if ENABLE_GRABBITMQPROXY SUBDIRS += guestproxycerttool endif @@ -64,3 +65,13 @@ if WITH_KERNEL_MODULES endif SUBDIRS += docs +if ENABLE_CAF + SUBDIRS += common-agent/Cpp/Framework + SUBDIRS += common-agent/Cpp/ManagementAgent + SUBDIRS += common-agent/Cpp/Communication + SUBDIRS += common-agent/Cpp/ProviderFx + SUBDIRS += common-agent/Cpp/InternalProviders + SUBDIRS += common-agent/input + SUBDIRS += common-agent/etc +endif + diff --git a/open-vm-tools/Makefile.in b/open-vm-tools/Makefile.in deleted file mode 100644 index c382a181d..000000000 --- a/open-vm-tools/Makefile.in +++ /dev/null @@ -1,735 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### Top-level Makefile for building the VMware OSS Tools. -### -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@BUILD_HGFSMOUNTER_TRUE@am__append_1 = hgfsmounter -@ENABLE_VGAUTH_TRUE@am__append_2 = vgauth -@ENABLE_DEPLOYPKG_TRUE@am__append_3 = libDeployPkg -@ENABLE_GRABBITMQPROXY_TRUE@am__append_4 = guestproxycerttool -@HAVE_X11_TRUE@am__append_5 = vmware-user-suid-wrapper -@HAVE_FUSE_TRUE@am__append_6 = vmblock-fuse vmhgfs-fuse -@LINUX_FALSE@am__append_7 = vmblockmounter -@ENABLE_TESTS_TRUE@am__append_8 = tests -@WITH_KERNEL_MODULES_TRUE@am__append_9 = modules -subdir = . -DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(top_srcdir)/configure \ - $(top_srcdir)/scripts/build/rpcgen_wrapper.sh.in AUTHORS \ - COPYING ChangeLog INSTALL NEWS config/compile \ - config/config.guess config/config.sub config/depcomp \ - config/install-sh config/ltmain.sh config/missing -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno config.status.lineno -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = scripts/build/rpcgen_wrapper.sh -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = lib libvmtools libhgfs hgfsclient hgfsmounter vgauth \ - checkvm libguestlib libDeployPkg rpctool guestproxycerttool \ - scripts services toolbox vmware-user-suid-wrapper vmblock-fuse \ - vmhgfs-fuse vmblockmounter xferlogs tests modules docs -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) -am__remove_distdir = \ - { test ! -d $(distdir) \ - || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr $(distdir); }; } -DIST_ARCHIVES = $(distdir).tar.gz -GZIP_ENV = --best -distuninstallcheck_listfiles = find . -type f -print -distcleancheck_listfiles = find . -type f -print -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ - -# These flags get passed to aclocal when autoreconf calls it, and tell aclocal -# that all of our macros are in the 'm4' subdirectory. -ACLOCAL_AMFLAGS = -I m4 -SUBDIRS = lib libvmtools libhgfs hgfsclient $(am__append_1) \ - $(am__append_2) checkvm libguestlib $(am__append_3) rpctool \ - $(am__append_4) scripts services toolbox $(am__append_5) \ - $(am__append_6) $(am__append_7) xferlogs $(am__append_8) \ - $(am__append_9) docs -all: all-recursive - -.SUFFIXES: -am--refresh: - @: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ - cd $(srcdir) && $(AUTOMAKE) --gnu \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - echo ' $(SHELL) ./config.status'; \ - $(SHELL) ./config.status;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) -scripts/build/rpcgen_wrapper.sh: $(top_builddir)/config.status $(top_srcdir)/scripts/build/rpcgen_wrapper.sh.in - cd $(top_builddir) && $(SHELL) ./config.status $@ - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - $(am__remove_distdir) - test -d $(distdir) || mkdir $(distdir) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - distdir) \ - || exit 1; \ - fi; \ - done - -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r $(distdir) -dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) - -dist-tarZ: distdir - tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) - -dist-shar: distdir - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) - -dist-zip: distdir - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) - -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -# This target untars the dist file and tries a VPATH configuration. Then -# it guarantees that the distribution is self-contained by making another -# tarfile. -distcheck: dist - case '$(DIST_ARCHIVES)' in \ - *.tar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ - *.tar.bz2*) \ - bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ - *.shar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ - *.zip*) \ - unzip $(distdir).zip ;;\ - esac - chmod -R a-w $(distdir); chmod a+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst - chmod a-w $(distdir) - dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ - && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && cd $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ - $(DISTCHECK_CONFIGURE_FLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ - distuninstallcheck \ - && chmod -R a-w "$$dc_install_base" \ - && ({ \ - (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ - distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ - } || { rm -rf "$$dc_destdir"; exit 1; }) \ - && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist \ - && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck - $(am__remove_distdir) - @(echo "$(distdir) archives ready for distribution: "; \ - list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' -distuninstallcheck: - @cd $(distuninstallcheck_dir) \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ - || { echo "ERROR: files left after uninstall:" ; \ - if test -n "$(DESTDIR)"; then \ - echo " (check DESTDIR support)"; \ - fi ; \ - $(distuninstallcheck_listfiles) ; \ - exit 1; } >&2 -distcleancheck: distclean - @if test '$(srcdir)' = . ; then \ - echo "ERROR: distcleancheck can only run from a VPATH build" ; \ - exit 1 ; \ - fi - @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left in build directory after distclean:" ; \ - $(distcleancheck_listfiles) ; \ - exit 1; } >&2 -check-am: all-am -check: check-recursive -all-am: Makefile -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool \ - distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-exec-am: - -install-html: install-html-recursive - -install-info: install-info-recursive - -install-man: - -install-pdf: install-pdf-recursive - -install-ps: install-ps-recursive - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf $(top_srcdir)/autom4te.cache - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ - install-strip - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am am--refresh check check-am clean clean-generic \ - clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ - dist-gzip dist-shar dist-tarZ dist-zip distcheck distclean \ - distclean-generic distclean-libtool distclean-tags \ - distcleancheck distdir distuninstallcheck dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/NEWS b/open-vm-tools/NEWS index 08871d41e..ee99cd99c 100644 --- a/open-vm-tools/NEWS +++ b/open-vm-tools/NEWS @@ -1,53 +1,3 @@ -open-vm-tools 2015.11.10 changes: - * [vgauth] fix timestamp check - * [libresolutionSet.so] Add an error handler to X11 resolutionSet - * [vmci.ko] Kill tasklet when unloading vmci module - * [libvmbackup.so] Quiesced snapshots Skip freezing autofs mounts. - * [vmhgfs.ko] make vmhgfs compatible with Linux kernel 4.2 - -open-vm-tools 2015.08.28 changes: - * Common versioning: Infrastructure changes to enable reporting of - true versions for operating system specific packages. This feature - is dependant on host support. - - * Quiesced snapshots enhancements for Linux guests running IO - workload: Robustness related enhancements in quiesced snapshot - operation. vmtoolsd service supports caching of log messages when - guest IO has been quiesced. Enhancements in vmbackup plugin to use - a separate thread to quiesce the guest OS to avoid timeout issuesxi - due to heavy I/O in the guest. - - * Shared Folders: For Linux distributions with kernel version 4.0.0 - and higher, there is a new FUSE based Shared Folders client which - is used as a replacement for the kernel mode client. - - * ESXi Serviceability: Default tools logging directed to a file instead - of syslog or event viewer. toolbox command line interface using - vmware-toolbox-cmd on Linux to change tools logging levels. - - * GuestInfo enhancements: Plugin enhancements to report more than 64 IP - addresses from the guest. These enhancements will be available only - after upgrading the host because the guest IP addresses limit exists - on host side. - -open-vm-tools 2015.06.15 changes: - * Various compilation fixes. - - * vmxnet is disabled for kernels 3.3 and above. - - * vmhgfs is disabled for kernels 3.17 and above. - - * Fixes for building on FreeBSD, see build instructions - in ChangeLog. - - * Added a "-h" option to vgauth. - - * Work around an NFS bug by retrying on ESTALE. - - * Retry sending vmbackup event with elevated privileges. - - * Thaw frozen file systems when snapshot commit fails. - open-vm-tools 2013.04.16 changes: * VMCI/VMSOCK Linux kernel modules are disabled for kernels 3.9 and above. diff --git a/open-vm-tools/aclocal.m4 b/open-vm-tools/aclocal.m4 deleted file mode 100644 index 78d92fdb9..000000000 --- a/open-vm-tools/aclocal.m4 +++ /dev/null @@ -1,902 +0,0 @@ -# generated automatically by aclocal 1.10 -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -m4_if(m4_PACKAGE_VERSION, [2.61],, -[m4_fatal([this file was generated for autoconf 2.61. -You have another version of autoconf. If you want to use that, -you should regenerate the build system entirely.], [63])]) - -# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_AUTOMAKE_VERSION(VERSION) -# ---------------------------- -# Automake X.Y traces this macro to ensure aclocal.m4 has been -# generated from the m4 files accompanying Automake X.Y. -# (This private macro should not be called outside this file.) -AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.10' -dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to -dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.10], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl -]) - -# _AM_AUTOCONF_VERSION(VERSION) -# ----------------------------- -# aclocal traces this macro to find the Autoconf version. -# This is a private macro too. Using m4_define simplifies -# the logic in aclocal, which can simply ignore this definition. -m4_define([_AM_AUTOCONF_VERSION], []) - -# AM_SET_CURRENT_AUTOMAKE_VERSION -# ------------------------------- -# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. -# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. -AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.10])dnl -_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)]) - -# AM_AUX_DIR_EXPAND -*- Autoconf -*- - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. -# -# Of course, Automake must honor this variable whenever it calls a -# tool from the auxiliary directory. The problem is that $srcdir (and -# therefore $ac_aux_dir as well) can be either absolute or relative, -# depending on how configure is run. This is pretty annoying, since -# it makes $ac_aux_dir quite unusable in subdirectories: in the top -# source directory, any form will work fine, but in subdirectories a -# relative path needs to be adjusted first. -# -# $ac_aux_dir/missing -# fails when called from a subdirectory if $ac_aux_dir is relative -# $top_srcdir/$ac_aux_dir/missing -# fails if $ac_aux_dir is absolute, -# fails when called from a subdirectory in a VPATH build with -# a relative $ac_aux_dir -# -# The reason of the latter failure is that $top_srcdir and $ac_aux_dir -# are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you -# start a VPATH build or use an absolute $srcdir. -# -# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, -# iff we strip the leading $srcdir from $ac_aux_dir. That would be: -# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` -# and then we would define $MISSING as -# MISSING="\${SHELL} $am_aux_dir/missing" -# This will work as long as MISSING is not called from configure, because -# unfortunately $(top_srcdir) has no meaning in configure. -# However there are other variables, like CC, which are often used in -# configure, and could therefore not use this "fixed" $ac_aux_dir. -# -# Another solution, used here, is to always expand $ac_aux_dir to an -# absolute PATH. The drawback is that using absolute paths prevent a -# configured tree to be moved without reconfiguration. - -AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` -]) - -# AM_CONDITIONAL -*- Autoconf -*- - -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 8 - -# AM_CONDITIONAL(NAME, SHELL-CONDITION) -# ------------------------------------- -# Define a conditional. -AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE])dnl -AC_SUBST([$1_FALSE])dnl -_AM_SUBST_NOTMAKE([$1_TRUE])dnl -_AM_SUBST_NOTMAKE([$1_FALSE])dnl -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([[conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]]) -fi])]) - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 9 - -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be -# written in clear, in which case automake, when reading aclocal.m4, -# will think it sees a *use*, and therefore will trigger all it's -# C support machinery. Also note that it means that autoscan, seeing -# CC etc. in the Makefile, will ask for an AC_PROG_CC use... - - -# _AM_DEPENDENCIES(NAME) -# ---------------------- -# See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". -# We try a few techniques and use that to set a single cache variable. -# -# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was -# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular -# dependency, and given that the user is not expected to run this macro, -# just rely on AC_PROG_CC. -AC_DEFUN([_AM_DEPENDENCIES], -[AC_REQUIRE([AM_SET_DEPDIR])dnl -AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl -AC_REQUIRE([AM_MAKE_INCLUDE])dnl -AC_REQUIRE([AM_DEP_TRACK])dnl - -ifelse([$1], CC, [depcc="$CC" am_compiler_list=], - [$1], CXX, [depcc="$CXX" am_compiler_list=], - [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], UPC, [depcc="$UPC" am_compiler_list=], - [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) - -AC_CACHE_CHECK([dependency style of $depcc], - [am_cv_$1_dependencies_compiler_type], -[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_$1_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` - fi - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - case $depmode in - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - none) break ;; - esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. - if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_$1_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_$1_dependencies_compiler_type=none -fi -]) -AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) -AM_CONDITIONAL([am__fastdep$1], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) -]) - - -# AM_SET_DEPDIR -# ------------- -# Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES -AC_DEFUN([AM_SET_DEPDIR], -[AC_REQUIRE([AM_SET_LEADING_DOT])dnl -AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl -]) - - -# AM_DEP_TRACK -# ------------ -AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors]) -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi -AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH])dnl -_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl -]) - -# Generate code to set up dependency tracking. -*- Autoconf -*- - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -#serial 3 - -# _AM_OUTPUT_DEPENDENCY_COMMANDS -# ------------------------------ -AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[for mf in $CONFIG_FILES; do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done -done -])# _AM_OUTPUT_DEPENDENCY_COMMANDS - - -# AM_OUTPUT_DEPENDENCY_COMMANDS -# ----------------------------- -# This macro should only be invoked once -- use via AC_REQUIRE. -# -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each `.P' file that we will -# need in order to bootstrap the dependency handling code. -AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], -[AC_CONFIG_COMMANDS([depfiles], - [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) - -# Do all the work for Automake. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 12 - -# This macro actually does too much. Some checks are only needed if -# your package does certain things. But this isn't really a big deal. - -# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) -# AM_INIT_AUTOMAKE([OPTIONS]) -# ----------------------------------------------- -# The call with PACKAGE and VERSION arguments is the old style -# call (pre autoconf-2.50), which is being phased out. PACKAGE -# and VERSION should now be passed to AC_INIT and removed from -# the call to AM_INIT_AUTOMAKE. -# We support both call styles for the transition. After -# the next Automake release, Autoconf can make the AC_INIT -# arguments mandatory, and then we can depend on a new Autoconf -# release and drop the old call support. -AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.60])dnl -dnl Autoconf wants to disallow AM_ names. We explicitly allow -dnl the ones we care about. -m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl -AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl -AC_REQUIRE([AC_PROG_INSTALL])dnl -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi -AC_SUBST([CYGPATH_W]) - -# Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl - AC_SUBST([PACKAGE], [$1])dnl - AC_SUBST([VERSION], [$2])], -[_AM_SET_OPTIONS([$1])dnl -dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, - [m4_fatal([AC_INIT should be called with package and version arguments])])dnl - AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl - AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl - -_AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl - -# Some tools Automake needs. -AC_REQUIRE([AM_SANITY_CHECK])dnl -AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) -AM_PROG_INSTALL_SH -AM_PROG_INSTALL_STRIP -AC_REQUIRE([AM_PROG_MKDIR_P])dnl -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([AC_PROG_MAKE_SET])dnl -AC_REQUIRE([AM_SET_LEADING_DOT])dnl -_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) -_AM_IF_OPTION([no-dependencies],, -[AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES(OBJC)], - [define([AC_PROG_OBJC], - defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl -]) -]) - - -# When config.status generates a header, we must update the stamp-h file. -# This file resides in the same directory as the config header -# that is generated. The stamp files are numbered to have different names. - -# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the -# loop where config.status creates the headers, so we can generate -# our stamp files there. -AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], -[# Compute $1's index in $config_headers. -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $1 | $1:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_SH -# ------------------ -# Define $install_sh. -AC_DEFUN([AM_PROG_INSTALL_SH], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} -AC_SUBST(install_sh)]) - -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# Check whether the underlying file-system supports filenames -# with a leading dot. For instance MS-DOS doesn't. -AC_DEFUN([AM_SET_LEADING_DOT], -[rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null -AC_SUBST([am__leading_dot])]) - -# Check to see how 'make' treats includes. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 3 - -# AM_MAKE_INCLUDE() -# ----------------- -# Check to see how make treats includes. -AC_DEFUN([AM_MAKE_INCLUDE], -[am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo done -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) - -# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 5 - -# AM_PROG_CC_C_O -# -------------- -# Like AC_PROG_CC_C_O, but changed for automake. -AC_DEFUN([AM_PROG_CC_C_O], -[AC_REQUIRE([AC_PROG_CC_C_O])dnl -AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([compile])dnl -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` -if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -dnl Make sure AC_PROG_CC is never called again, or it will override our -dnl setting of CC. -m4_define([AC_PROG_CC], - [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) -]) - -# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- - -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 5 - -# AM_MISSING_PROG(NAME, PROGRAM) -# ------------------------------ -AC_DEFUN([AM_MISSING_PROG], -[AC_REQUIRE([AM_MISSING_HAS_RUN]) -$1=${$1-"${am_missing_run}$2"} -AC_SUBST($1)]) - - -# AM_MISSING_HAS_RUN -# ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. -AC_DEFUN([AM_MISSING_HAS_RUN], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([missing])dnl -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) -fi -]) - -# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_MKDIR_P -# --------------- -# Check for `mkdir -p'. -AC_DEFUN([AM_PROG_MKDIR_P], -[AC_PREREQ([2.60])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, -dnl while keeping a definition of mkdir_p for backward compatibility. -dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. -dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of -dnl Makefile.ins that do not define MKDIR_P, so we do our own -dnl adjustment using top_builddir (which is defined more often than -dnl MKDIR_P). -AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl -case $mkdir_p in - [[\\/$]]* | ?:[[\\/]]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac -]) - -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 3 - -# _AM_MANGLE_OPTION(NAME) -# ----------------------- -AC_DEFUN([_AM_MANGLE_OPTION], -[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) - -# _AM_SET_OPTION(NAME) -# ------------------------------ -# Set option NAME. Presently that only means defining a flag for this option. -AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) - -# _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- -# OPTIONS is a space-separated list of Automake options. -AC_DEFUN([_AM_SET_OPTIONS], -[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) - -# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) -# ------------------------------------------- -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -AC_DEFUN([_AM_IF_OPTION], -[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) - -# Check to make sure that the build environment is sane. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 4 - -# AM_SANITY_CHECK -# --------------- -AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t $srcdir/configure conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi - - test "$[2]" = conftest.file - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -AC_MSG_RESULT(yes)]) - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_STRIP -# --------------------- -# One issue with vendor `install' (even GNU) is that you can't -# specify the program used to strip binaries. This is especially -# annoying in cross-compiling environments, where the build's strip -# is unlikely to handle the host's binaries. -# Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize -# STRIPPROG with the value of the STRIP variable (set by the user). -AC_DEFUN([AM_PROG_INSTALL_STRIP], -[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. -if test "$cross_compiling" != no; then - AC_CHECK_TOOL([STRIP], [strip], :) -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -AC_SUBST([INSTALL_STRIP_PROGRAM])]) - -# Copyright (C) 2006 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# _AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in. -# This macro is traced by Automake. -AC_DEFUN([_AM_SUBST_NOTMAKE]) - -# Check how to create a tarball. -*- Autoconf -*- - -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# _AM_PROG_TAR(FORMAT) -# -------------------- -# Check how to create a tarball in format FORMAT. -# FORMAT should be one of `v7', `ustar', or `pax'. -# -# Substitute a variable $(am__tar) that is a command -# writing to stdout a FORMAT-tarball containing the directory -# $tardir. -# tardir=directory && $(am__tar) > result.tar -# -# Substitute a variable $(am__untar) that extract such -# a tarball read from stdin. -# $(am__untar) < result.tar -AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. -AM_MISSING_PROG([AMTAR], [tar]) -m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. -_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break - - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi -done -rm -rf conftest.dir - -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) -AC_SUBST([am__tar]) -AC_SUBST([am__untar]) -]) # _AM_PROG_TAR - -m4_include([m4/libtool.m4]) -m4_include([m4/ltoptions.m4]) -m4_include([m4/ltsugar.m4]) -m4_include([m4/ltversion.m4]) -m4_include([m4/lt~obsolete.m4]) -m4_include([m4/vmtools.m4]) diff --git a/open-vm-tools/checkvm/Makefile.in b/open-vm-tools/checkvm/Makefile.in deleted file mode 100644 index 61dd77cbb..000000000 --- a/open-vm-tools/checkvm/Makefile.in +++ /dev/null @@ -1,566 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -bin_PROGRAMS = vmware-checkvm$(EXEEXT) -@HAVE_ICU_TRUE@am__append_1 = @ICU_LIBS@ -subdir = checkvm -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) -PROGRAMS = $(bin_PROGRAMS) -am_vmware_checkvm_OBJECTS = checkvm.$(OBJEXT) -vmware_checkvm_OBJECTS = $(am_vmware_checkvm_OBJECTS) -am__DEPENDENCIES_1 = -vmware_checkvm_DEPENDENCIES = $(am__DEPENDENCIES_1) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(vmware_checkvm_SOURCES) -DIST_SOURCES = $(vmware_checkvm_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -vmware_checkvm_SOURCES = checkvm.c -vmware_checkvm_LDADD = @VMTOOLS_LIBS@ $(am__append_1) -@HAVE_ICU_FALSE@vmware_checkvm_LINK = $(LINK) -@HAVE_ICU_TRUE@vmware_checkvm_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ -@HAVE_ICU_TRUE@ $(LIBTOOLFLAGS) --mode=link $(CXX) \ -@HAVE_ICU_TRUE@ $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ -@HAVE_ICU_TRUE@ $(LDFLAGS) -o $@ - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu checkvm/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu checkvm/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ - else :; fi; \ - done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -vmware-checkvm$(EXEEXT): $(vmware_checkvm_OBJECTS) $(vmware_checkvm_DEPENDENCIES) - @rm -f vmware-checkvm$(EXEEXT) - $(vmware_checkvm_LINK) $(vmware_checkvm_OBJECTS) $(vmware_checkvm_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/checkvm.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: - for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: install-binPROGRAMS - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-binPROGRAMS - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/common-agent/Cpp/Communication/Makefile.am b/open-vm-tools/common-agent/Cpp/Communication/Makefile.am new file mode 100644 index 000000000..e0de605e2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Makefile.am @@ -0,0 +1,236 @@ +################################################################################ +### Copyright (C) 2015 VMware, Inc. All rights reserved. +### +### This program is free software; you can redistribute it and/or modify +### it under the terms of version 2 of the GNU General Public License as +### published by the Free Software Foundation. +### +### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +################################################################################ + +AUTOMAKE_OPTIONS = subdir-objects +subsysdir = @CAF_SUBSYS_DIR@ +subsys_LTLIBRARIES = +cafbindir = @CAF_PME_BIN_DIR@ +cafbin_PROGRAMS = +caflibdir = @CAF_PME_LIB_DIR@ +caflib_LTLIBRARIES = +caflib_LTLIBRARIES += libCommAmqpIntegration.la + +libCommAmqpIntegration_la_SOURCES= +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/AMQExceptions.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/AmqpClientImpl.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/AmqpContentHeadersImpl.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/AMQPImpl.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/BasicAckMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/BasicCancelMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/BasicCancelOkMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/BasicConsumeMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/BasicConsumeOkMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/BasicDeliverMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/BasicGetEmptyMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/BasicGetMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/BasicGetOkMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/BasicProperties.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/BasicPublishMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/BasicQosMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/BasicQosOkMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/BasicRecoverMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/BasicRecoverOkMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/BasicRejectMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/BasicReturnMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/ChannelCloseMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/ChannelCloseOkFromServerMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/ChannelCloseOkMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/ChannelOpenOkMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/EnvelopeImpl.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/ExchangeDeclareMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/ExchangeDeclareOkMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/ExchangeDeleteMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/ExchangeDeleteOkMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/FieldImpl.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/GetResponseImpl.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/QueueBindMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/QueueBindOkMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/QueueDeclareMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/QueueDeclareOkMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/QueueDeleteMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/QueueDeleteOkMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/QueuePurgeMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/QueuePurgeOkMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/QueueUnbindMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/QueueUnbindOkMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/Address.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/AMQChannel.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/AMQChannelManager.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/AMQCommand.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/AMQConnection.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/AmqpAuthPlain.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/AmqpChannel.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpClient.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/AmqpCommon.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/AmqpConnection.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/AmqpUtil.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/AMQUtil.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/BlockingRpcContinuation.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/CAmqpAuthMechanism.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/CAmqpChannel.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/CAmqpConnection.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/CAmqpFrame.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/CertInfo.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/CommandAssembler.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/ConnectionFactoryImpl.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/ConnectionWeakReference.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/ConsumerDispatcher.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/ConsumerWorkService.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpCore/AbstractConnectionFactory.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpCore/AmqpHeaderMapper.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpCore/AmqpIntegrationExceptions.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpCore/AmqpMessageListenerSource.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpCore/AmqpOutboundEndpoint.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpCore/AutoChannelClose.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpCore/BindingImpl.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpCore/BlockingQueueConsumer.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpCore/CachedChannelHandler.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpCore/CachingConnectionFactory.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpCore/ChannelCachingConnectionProxy.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpCore/CompositeConnectionListener.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpCore/DefaultAmqpHeaderMapper.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpCore/ExchangeImpl.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpCore/HeaderUtils.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpCore/QueueImpl.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpCore/RabbitAdmin.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpCore/RabbitTemplate.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpCore/SimpleConnection.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpCore/SimpleMessageListenerContainer.cpp + +libCommAmqpIntegration_la_CPPFLAGS = +libCommAmqpIntegration_la_CPPFLAGS += @GLIB2_CPPFLAGS@ +libCommAmqpIntegration_la_CPPFLAGS += @LOG4CPP_CPPFLAGS@ +libCommAmqpIntegration_la_CPPFLAGS += @SSL_CPPFLAGS@ +libCommAmqpIntegration_la_CPPFLAGS += @LIBRABBITMQ_CPPFLAGS@ + +libCommAmqpIntegration_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include +libCommAmqpIntegration_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include/Contracts +libCommAmqpIntegration_la_LIBADD = +libCommAmqpIntegration_la_LIBADD += @GLIB2_LIBS@ +libCommAmqpIntegration_la_LIBADD += @LOG4CPP_LIBS@ +libCommAmqpIntegration_la_LIBADD += @SSL_LIBS@ +libCommAmqpIntegration_la_LIBADD += -ldl +libCommAmqpIntegration_la_LIBADD += @LIBRABBITMQ_LIBS@ +libCommAmqpIntegration_la_LIBADD += ../Framework/libFramework.la + +libCommAmqpIntegration_la_LDFLAGS = -shared + +subsys_LTLIBRARIES += libCommAmqpIntegrationSubsys.la +libCommAmqpIntegrationSubsys_la_LDFLAGS = @CAF_SUBSYS_LDFLAGS@ + +libCommAmqpIntegrationSubsys_la_SOURCES= +libCommAmqpIntegrationSubsys_la_SOURCES += Subsystems/amqpIntegration/src/AmqpInboundChannelAdapterInstance.cpp +libCommAmqpIntegrationSubsys_la_SOURCES += Subsystems/amqpIntegration/src/amqpIntegration.cpp +libCommAmqpIntegrationSubsys_la_SOURCES += Subsystems/amqpIntegration/src/AmqpOutboundEndpointInstance.cpp +libCommAmqpIntegrationSubsys_la_SOURCES += Subsystems/amqpIntegration/src/BindingInstance.cpp +libCommAmqpIntegrationSubsys_la_SOURCES += Subsystems/amqpIntegration/src/CachingConnectionFactoryObj.cpp +libCommAmqpIntegrationSubsys_la_SOURCES += Subsystems/amqpIntegration/src/ExchangeInstance.cpp +libCommAmqpIntegrationSubsys_la_SOURCES += Subsystems/amqpIntegration/src/IntegrationObjects.cpp +libCommAmqpIntegrationSubsys_la_SOURCES += Subsystems/amqpIntegration/src/QueueInstance.cpp +libCommAmqpIntegrationSubsys_la_SOURCES += Subsystems/amqpIntegration/src/RabbitAdminInstance.cpp +libCommAmqpIntegrationSubsys_la_SOURCES += Subsystems/amqpIntegration/src/RabbitTemplateInstance.cpp +libCommAmqpIntegrationSubsys_la_SOURCES += Subsystems/amqpIntegration/src/SecureCachingConnectionFactoryObj.cpp + +libCommAmqpIntegrationSubsys_la_CPPFLAGS = +libCommAmqpIntegrationSubsys_la_CPPFLAGS += @GLIB2_CPPFLAGS@ +libCommAmqpIntegrationSubsys_la_CPPFLAGS += @LOG4CPP_CPPFLAGS@ +libCommAmqpIntegrationSubsys_la_CPPFLAGS += @SSL_CPPFLAGS@ +libCommAmqpIntegrationSubsys_la_CPPFLAGS += @LIBRABBITMQ_CPPFLAGS@ + +libCommAmqpIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include +libCommAmqpIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include/Contracts +libCommAmqpIntegrationSubsys_la_LIBADD = +libCommAmqpIntegrationSubsys_la_LIBADD += @GLIB2_LIBS@ +libCommAmqpIntegrationSubsys_la_LIBADD += @LOG4CPP_LIBS@ +libCommAmqpIntegrationSubsys_la_LIBADD += @SSL_LIBS@ +libCommAmqpIntegrationSubsys_la_LIBADD += -ldl +libCommAmqpIntegrationSubsys_la_LIBADD += @LIBRABBITMQ_LIBS@ +libCommAmqpIntegrationSubsys_la_LIBADD += ../Framework/libFramework.la +libCommAmqpIntegrationSubsys_la_LIBADD += ../Communication/libCommAmqpIntegration.la + +libCommAmqpIntegrationSubsys_la_LDFLAGS += -shared + +cafbin_PROGRAMS += CommAmqpListener + +CommAmqpListener_SOURCES= +CommAmqpListener_SOURCES += amqpListener/src/amqpListenerMain.cpp +CommAmqpListener_SOURCES += amqpListener/src/AmqpListenerWorker.cpp + +CommAmqpListener_CPPFLAGS = +CommAmqpListener_CPPFLAGS += @GLIB2_CPPFLAGS@ +CommAmqpListener_CPPFLAGS += @LOG4CPP_CPPFLAGS@ +CommAmqpListener_CPPFLAGS += @SSL_CPPFLAGS@ +CommAmqpListener_CPPFLAGS += @LIBRABBITMQ_CPPFLAGS@ + +CommAmqpListener_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include +CommAmqpListener_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include/Contracts +CommAmqpListener_LDADD = +CommAmqpListener_LDADD += @GLIB2_LIBS@ +CommAmqpListener_LDADD += @LOG4CPP_LIBS@ +CommAmqpListener_LDADD += @SSL_LIBS@ +CommAmqpListener_LDADD += -ldl +CommAmqpListener_LDADD += @LIBRABBITMQ_LIBS@ +CommAmqpListener_LDADD += ../Framework/libFramework.la +CommAmqpListener_LDADD += ../Communication/libCommAmqpIntegration.la + +subsys_LTLIBRARIES += libCommIntegrationSubsys.la +libCommIntegrationSubsys_la_LDFLAGS = @CAF_SUBSYS_LDFLAGS@ + +libCommIntegrationSubsys_la_SOURCES= +libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CCmsMessageAttachments.cpp +libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CCmsMessage.cpp +libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CCmsMessageTransformer.cpp +libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CCmsMessageTransformerInstance.cpp +libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CCmsMessageUtils.cpp +libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CEventTopicCalculatorInstance.cpp +libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CIncomingMessageHandler.cpp +libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CIncomingMessageHandlerInstance.cpp +libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CMessageDeliveryRecord.cpp +libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CMessagePartDescriptorCalculator.cpp +libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CMessagePartDescriptor.cpp +libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CMessagePartDescriptorSourceRecord.cpp +libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CMessagePartRecord.cpp +libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CMessagePartsBuilder.cpp +libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CMessagePartsHeader.cpp +libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CMessagePartsParser.cpp +libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/commIntegration.cpp +libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/COutgoingMessageHandler.cpp +libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CProtocolHeaderEnricher.cpp +libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CProtocolHeaderEnricherInstance.cpp +libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CReplyToCacher.cpp +libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CReplyToCacherInstance.cpp +libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CReplyToResolverInstance.cpp + +libCommIntegrationSubsys_la_CPPFLAGS = +libCommIntegrationSubsys_la_CPPFLAGS += @GLIB2_CPPFLAGS@ +libCommIntegrationSubsys_la_CPPFLAGS += @LOG4CPP_CPPFLAGS@ +libCommIntegrationSubsys_la_CPPFLAGS += @SSL_CPPFLAGS@ +libCommIntegrationSubsys_la_CPPFLAGS += @LIBRABBITMQ_CPPFLAGS@ + +libCommIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include +libCommIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include/Contracts +libCommIntegrationSubsys_la_LIBADD = +libCommIntegrationSubsys_la_LIBADD += @GLIB2_LIBS@ +libCommIntegrationSubsys_la_LIBADD += @LOG4CPP_LIBS@ +libCommIntegrationSubsys_la_LIBADD += @SSL_LIBS@ +libCommIntegrationSubsys_la_LIBADD += -ldl +libCommIntegrationSubsys_la_LIBADD += @LIBRABBITMQ_LIBS@ +libCommIntegrationSubsys_la_LIBADD += ../Framework/libFramework.la +libCommIntegrationSubsys_la_LIBADD += ../Communication/libCommAmqpIntegration.la + +libCommIntegrationSubsys_la_LDFLAGS += -shared + diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/AmqpInboundChannelAdapterInstance.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/AmqpInboundChannelAdapterInstance.cpp new file mode 100644 index 000000000..0d6f414bd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/AmqpInboundChannelAdapterInstance.cpp @@ -0,0 +1,257 @@ +/* + * Created on: Aug 7, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "AmqpInboundChannelAdapterInstance.h" + +using namespace Caf::AmqpIntegration; + +AmqpInboundChannelAdapterInstance::AmqpInboundChannelAdapterInstance() : + _isInitialized(false), + _isRunning(false), + _ackModeProp(ACKNOWLEDGEMODE_AUTO), + _connectionFactoryProp("connectionFactory"), + _autoStartupProp(true), + _phaseProp(G_MAXINT32), + _prefetchCountProp(1), + _receiveTimeoutProp(1000), + _recoveryIntervalProp(5000), + _txSizeProp(1), + CAF_CM_INIT_LOG("AmqpInboundChannelAdapterInstance") { +} + +AmqpInboundChannelAdapterInstance::~AmqpInboundChannelAdapterInstance() { +} + +void AmqpInboundChannelAdapterInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + std::string prop = configSection->findOptionalAttribute("id"); + if (prop.length()) { + _idProp = prop; + } else { + _idProp = "AmqpInboundChannelAdapter-"; + _idProp += CStringUtils::createRandomUuid(); + } + _channelProp = configSection->findRequiredAttribute("channel"); + _queueProp = configSection->findRequiredAttribute("queue-name"); + prop = configSection->findOptionalAttribute("acknowledge-mode"); + if (prop.length()) { + if (prop == "NONE") { + _ackModeProp = ACKNOWLEDGEMODE_NONE; + } else if (prop == "AUTO") { + _ackModeProp = ACKNOWLEDGEMODE_AUTO; + } else if (prop == "MANUAL") { + CAF_CM_EXCEPTIONEX_VA0( + InvalidArgumentException, + 0, + "acknowledge-mode MANUAL is not supported"); + //_ackModeProp = ACKNOWLEDGEMODE_MANUAL; + } else { + CAF_CM_EXCEPTIONEX_VA1( + InvalidArgumentException, + 0, + "invalid acknowledge-mode '%s'", + prop.c_str()); + } + } + prop = configSection->findOptionalAttribute("connection-factory"); + if (prop.length()) { + _connectionFactoryProp = prop; + } + _errorChannelProp = configSection->findRequiredAttribute("error-channel"); + _mappedRequestHeadersProp = configSection->findOptionalAttribute("mapped-request-headers"); + prop = configSection->findOptionalAttribute("auto-startup"); + if (prop.length()) { + if (prop == "true") { + _autoStartupProp = true; + } else if (prop == "false") { + _autoStartupProp = false; + } else { + CAF_CM_EXCEPTIONEX_VA1( + InvalidArgumentException, + 0, + "invalid auto-startup '%s'", + prop.c_str()); + } + } + prop = configSection->findOptionalAttribute("phase"); + if (prop.length()) { + _phaseProp = CStringConv::fromString(prop); + } + prop = configSection->findOptionalAttribute("prefetch-count"); + if (prop.length()) { + _prefetchCountProp = CStringConv::fromString(prop); + } + prop = configSection->findOptionalAttribute("receive-timeout"); + if (prop.length()) { + _receiveTimeoutProp = CStringConv::fromString(prop); + } + prop = configSection->findOptionalAttribute("recovery-interval"); + if (prop.length()) { + _recoveryIntervalProp = CStringConv::fromString(prop); + } + prop = configSection->findOptionalAttribute("tx-size"); + if (prop.length()) { + _txSizeProp = CStringConv::fromString(prop); + } + + _isInitialized = true; +} + +std::string AmqpInboundChannelAdapterInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _idProp; +} + +void AmqpInboundChannelAdapterInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME("wire"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + + CCafRegex qRegEx; + qRegEx.initialize("^\\#\\{(?P.+)\\}$"); + Cdeqstr matchName = qRegEx.matchName(_queueProp, "name"); + if (matchName.size()) { + std::string queueRef = matchName.front(); + CAF_CM_LOG_DEBUG_VA1("Resolving queue object reference '%s'", queueRef.c_str()); + SmartPtrIIntegrationObject obj = _intAppContext->getIntegrationObject(queueRef); + SmartPtrQueue queueObj; + queueObj.QueryInterface(obj, false); + if (queueObj) { + _queueProp = queueObj->getName(); + CAF_CM_LOG_DEBUG_VA2( + "Queue object reference '%s' resolved to AMQP queue name '%s'", + queueRef.c_str(), + _queueProp.c_str()); + } else { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchInterfaceException, + 0, + "Integration object '%s' is not of type Queue.", + queueRef.c_str()); + } + } + + SmartPtrAmqpHeaderMapper headerMapper; + if (_mappedRequestHeadersProp.length()) { + SmartPtrDefaultAmqpHeaderMapper defaultHeaderMapper; + defaultHeaderMapper.CreateInstance(); + defaultHeaderMapper->init(_mappedRequestHeadersProp); + headerMapper = defaultHeaderMapper; + } + + SmartPtrCPollerMetadata pollerMetadata; + pollerMetadata.CreateInstance(); + pollerMetadata->putMaxMessagesPerPoll(_txSizeProp); + pollerMetadata->putFixedRate(50); + + SmartPtrAmqpMessageListenerSource listenerSource; + listenerSource.CreateInstance(); + listenerSource->init(headerMapper, pollerMetadata); + + _listenerContainer.CreateInstance(); + _listenerContainer->setAcknowledgeMode(_ackModeProp); + SmartPtrIBean bean = appContext->getBean(_connectionFactoryProp); + SmartPtrConnectionFactory connectionFactory; + connectionFactory.QueryInterface(bean, false); + if (!connectionFactory) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchInterfaceException, + 0, + "Bean '%s' is not a ConnectionFactory", + _connectionFactoryProp.c_str()); + } + _listenerContainer->setConnectionFactory(connectionFactory); + _listenerContainer->setPrefetchCount(_prefetchCountProp); + _listenerContainer->setQueue(_queueProp); + _listenerContainer->setReceiveTimeout(_receiveTimeoutProp); + _listenerContainer->setRecoveryInterval(_recoveryIntervalProp); + _listenerContainer->setTxSize(_txSizeProp); + _listenerContainer->setMessagerListener(listenerSource); + _listenerContainer->init(); + + SmartPtrCErrorHandler errorHandler; + errorHandler.CreateInstance(); + errorHandler->initialize( + channelResolver, + channelResolver->resolveChannelName(_errorChannelProp)); + + SmartPtrCMessageHandler messageHandler; + messageHandler.CreateInstance(); + messageHandler->initialize( + _idProp, + channelResolver->resolveChannelName(_channelProp), + SmartPtrICafObject()); + + SmartPtrCSourcePollingChannelAdapter sourcePollingChannelAdapter; + sourcePollingChannelAdapter.CreateInstance(); + sourcePollingChannelAdapter->initialize( + messageHandler, + listenerSource, + errorHandler); + + SmartPtrCSimpleAsyncTaskExecutor simpleAsyncTaskExecutor; + simpleAsyncTaskExecutor.CreateInstance(); + simpleAsyncTaskExecutor->initialize( + sourcePollingChannelAdapter, + errorHandler); + _taskExecutor = simpleAsyncTaskExecutor; + + _intAppContext = NULL; +} + +void AmqpInboundChannelAdapterInstance::setIntegrationAppContext( + SmartPtrIIntegrationAppContext context) { + CAF_CM_FUNCNAME_VALIDATE("setIntegrationAppContext"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(context); + _intAppContext = context; +} + +bool AmqpInboundChannelAdapterInstance::isAutoStartup() const { + CAF_CM_FUNCNAME_VALIDATE("isAutoStartup"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _autoStartupProp; +} + +void AmqpInboundChannelAdapterInstance::start(const uint32 timeoutMs) { + CAF_CM_FUNCNAME_VALIDATE("start"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _listenerContainer->start(timeoutMs); + _taskExecutor->execute(timeoutMs); + _isRunning = true; +} + +void AmqpInboundChannelAdapterInstance::stop(const uint32 timeoutMs) { + CAF_CM_FUNCNAME_VALIDATE("stop"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _listenerContainer->stop(timeoutMs); + _taskExecutor->cancel(timeoutMs); +} + +bool AmqpInboundChannelAdapterInstance::isRunning() const { + CAF_CM_FUNCNAME_VALIDATE("isRunning"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _isRunning; +} + +int32 AmqpInboundChannelAdapterInstance::getPhase() const { + CAF_CM_FUNCNAME_VALIDATE("getPhase"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _phaseProp; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/AmqpInboundChannelAdapterInstance.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/AmqpInboundChannelAdapterInstance.h new file mode 100644 index 000000000..4f30d9e8a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/AmqpInboundChannelAdapterInstance.h @@ -0,0 +1,147 @@ +/* + * Created on: Aug 7, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AmqpInboundChannelAdapterInstance_h +#define AmqpInboundChannelAdapterInstance_h + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObj + * @brief Adapter that receives messages from an AMQP queue, converts them into + * integration messages, and sends the results to a Message Channel. + *

+ *

+ * Example context file declaration:
+ *
+ * 
+ *
+ * 
+ * 
+ *
+ * 
+ *
+ *	
+ *

+ * XML attribute definitions: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
AttributeDescription
idoptional Unique id for this adapter.
channelrequired The channel to which messages should be sent.
queue-namerequired The AMQP queue from which messaged should be consumed.
acknowledge-modeoptional Acknowledgment mode (NONE, AUTO, MANUAL). Defaults to AUTO.
connection-factoryoptional Bean reference to the RabbitMQ ConnectionFactory. Defaults to 'connectionFactory'
error-channelrequired Message channel to which error messages should be sent.
mapped-request-headersoptional A regular expression indicating which AMQP headers will be mapped into message headers.
auto-startupoptional Specifies if the adapter is to start automatically. If 'false', the adapter must be started programatically. Defaults to 'true'.
phaseoptional Specifies the phase in which the adapter should be started. By default this value is G_MAXINT32 meaning that this adapter will start as late as possible.
prefetch-countoptional Tells the AMQP broker how many messages to send to the the consumer in a single request. Defaults to 1.
receive-timeoutoptional Receive timeout in milliseconds. Defaults to 1000.
recovery-intervaloptional Specifies the interval between broker connection recovery attempts in milliseconds. Defaults to 5000.
tx-sizeoptional Tells the adapter how many messages to process in a single batch. This should be less than or equal to to prefetch-count. Defaults to 1.
+ */ +class AmqpInboundChannelAdapterInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public IIntegrationAppContextAware, + public ISmartLifecycle, + public IPhased { + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(IIntegrationAppContextAware) + CAF_QI_ENTRY(ILifecycle) + CAF_QI_ENTRY(ISmartLifecycle) + CAF_QI_ENTRY(IPhased) + CAF_END_QI() +public: + AmqpInboundChannelAdapterInstance(); + virtual ~AmqpInboundChannelAdapterInstance(); + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // IIntegrationAppContextAware + void setIntegrationAppContext( + SmartPtrIIntegrationAppContext context); + +public: // ISmartLifecycle + bool isAutoStartup() const; + +public: // ILifecycle + void start(const uint32 timeoutMs); + void stop(const uint32 timeoutMs); + bool isRunning() const; + +public: // IPhased + int32 getPhase() const; + +private: + bool _isInitialized; + bool _isRunning; + SmartPtrIIntegrationAppContext _intAppContext; + SmartPtrSimpleMessageListenerContainer _listenerContainer; + SmartPtrITaskExecutor _taskExecutor; + + std::string _idProp; + std::string _channelProp; + std::string _queueProp; + AcknowledgeMode _ackModeProp; + std::string _connectionFactoryProp; + std::string _errorChannelProp; + std::string _mappedRequestHeadersProp; + bool _autoStartupProp; + int32 _phaseProp; + uint32 _prefetchCountProp; + uint32 _receiveTimeoutProp; + uint32 _recoveryIntervalProp; + uint32 _txSizeProp; + + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(AmqpInboundChannelAdapterInstance); +}; +CAF_DECLARE_SMART_QI_POINTER(AmqpInboundChannelAdapterInstance); + +}} + +#endif /* AmqpInboundChannelAdapterInstance_h */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/AmqpOutboundEndpointInstance.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/AmqpOutboundEndpointInstance.cpp new file mode 100644 index 000000000..adf7952b5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/AmqpOutboundEndpointInstance.cpp @@ -0,0 +1,121 @@ +/* + * Created on: Jul 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "AmqpOutboundEndpointInstance.h" + +using namespace Caf::AmqpIntegration; + +AmqpOutboundEndpointInstance::AmqpOutboundEndpointInstance() : + _isInitialized(false), + _isRunning(false), + CAF_CM_INIT_LOG("AmqpOutboundEndpointInstance") { +} + +AmqpOutboundEndpointInstance::~AmqpOutboundEndpointInstance() { +} + +void AmqpOutboundEndpointInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + _id = configSection->findOptionalAttribute("id"); + if (!_id.length()) { + _id = CStringUtils::createRandomUuid(); + } + _configSection = configSection; + _isInitialized = true; +} + +std::string AmqpOutboundEndpointInstance::getId() const { + return _id; +} + +void AmqpOutboundEndpointInstance::setIntegrationAppContext( + SmartPtrIIntegrationAppContext context) { + _context = context; +} + + +void AmqpOutboundEndpointInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME("wire"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const SmartPtrIMessageChannel errorMessageChannel = + channelResolver->resolveChannelName("errorChannel"); + + std::string elementVal = _configSection->findOptionalAttribute("amqp-template"); + if (!elementVal.length()) { + elementVal = "amqpTemplate"; + CAF_CM_LOG_DEBUG_VA0("Using default amqp-template reference value 'amqpTemplate'"); + } + SmartPtrIIntegrationObject amqpTemplateObj = _context->getIntegrationObject(elementVal); + SmartPtrAmqpTemplate amqpTemplate; + amqpTemplate.QueryInterface(amqpTemplateObj, false); + if (!amqpTemplate) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchInterfaceException, + 0, + "Bean '%s' is not of type AmqpTemplate", + elementVal.c_str()); + } + + SmartPtrIAppConfig appConfig = getAppConfig(); + SmartPtrAmqpOutboundEndpoint outboundEndpoint; + outboundEndpoint.CreateInstance(); + elementVal = _configSection->findOptionalAttribute("exchange-name"); + outboundEndpoint->setExchangeName(appConfig->resolveValue(elementVal)); + elementVal = _configSection->findOptionalAttribute("exchange-name-expression"); + outboundEndpoint->setExchangeNameExpression(elementVal); + elementVal = _configSection->findOptionalAttribute("routing-key"); + outboundEndpoint->setRoutingKey(appConfig->resolveValue(elementVal)); + elementVal = _configSection->findOptionalAttribute("routing-key-expression"); + outboundEndpoint->setRoutingKeyExpression(elementVal); + elementVal = _configSection->findOptionalAttribute("mapped-request-headers"); + outboundEndpoint->setMappedRequestHeadersExpression(appConfig->resolveValue(elementVal)); + outboundEndpoint->init( + amqpTemplate, + appConfig, + appContext); + + elementVal = _configSection->findRequiredAttribute("channel"); + SmartPtrIMessageChannel inputChannel = channelResolver->resolveChannelName(elementVal); + SmartPtrIIntegrationObject inputChannelObj; + inputChannelObj.QueryInterface(inputChannel); + + + _messagingTemplate.CreateInstance(); + _messagingTemplate->initialize( + channelResolver, + inputChannelObj, + errorMessageChannel, + SmartPtrIMessageChannel(), + outboundEndpoint); +} + +void AmqpOutboundEndpointInstance::start(const uint32 timeoutMs) { + CAF_CM_FUNCNAME("start"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_ASSERT(!_isRunning); + _isRunning = true; + _messagingTemplate->start(0); +} + +void AmqpOutboundEndpointInstance::stop(const uint32 timeoutMs) { + CAF_CM_FUNCNAME("stop"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_ASSERT(_isRunning); + _isRunning = false; + _messagingTemplate->stop(0); +} + +bool AmqpOutboundEndpointInstance::isRunning() const { + return _isRunning; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/AmqpOutboundEndpointInstance.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/AmqpOutboundEndpointInstance.h new file mode 100644 index 000000000..7b641c590 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/AmqpOutboundEndpointInstance.h @@ -0,0 +1,108 @@ +/* + * Created on: Jul 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPOUTBOUNDENDPOINTINSTANCE_H_ +#define AMQPOUTBOUNDENDPOINTINSTANCE_H_ + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObj + * @brief An Integration Object implementing Caf::AmqpIntegration::AmqpOutboundEndpoint + *

+ *

+ * Example context file declaration:
+ *
+ * 
+ *
+ * 
+ *
+ * 
+ *	
+ *

+ * XML attribute definitions: + * + * + * + * + * + * + * + * + * + *
AttributeDescription
channelrequired The channel supplying messages to be sent.
exchange-nameThe name of the exchange to publish to. + * Either exchange-name or exchange-name-expression must be specified.
exchange-name-expressionThe name of the exchange to publish to resolved by calling an IExpressionInvoker object. + * Either exchange-name or exchange-name-expression must be specified.
routing-keyThe routing key for the message. + * Either routing-key or routing-key-expression must be specified.
routing-key-expressionThe routing key for the message resolved by calling an IExpressionInvoker object. + * Either routing-key or routing-key-expression must be specified.
mapped-request-headersoptional A regular expression used to transmit user-defined headers along with the message. + *
+ */ +class AmqpOutboundEndpointInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public IIntegrationAppContextAware, + public ILifecycle { + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(IIntegrationAppContextAware) + CAF_QI_ENTRY(ILifecycle) + CAF_END_QI() + +public: + AmqpOutboundEndpointInstance(); + virtual ~AmqpOutboundEndpointInstance(); + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // IIntegrationAppContextAware + void setIntegrationAppContext( + SmartPtrIIntegrationAppContext context); + +public: // ILifecycle + void start(const uint32 timeoutMs); + void stop(const uint32 timeoutMs); + bool isRunning() const; + +private: + bool _isInitialized; + bool _isRunning; + std::string _id; + SmartPtrIDocument _configSection; + SmartPtrCMessagingTemplate _messagingTemplate; + SmartPtrIIntegrationAppContext _context; + + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(AmqpOutboundEndpointInstance); +}; +CAF_DECLARE_SMART_QI_POINTER(AmqpOutboundEndpointInstance); + +}} +#endif /* AMQPOUTBOUNDENDPOINTINSTANCE_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/BindingInstance.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/BindingInstance.cpp new file mode 100644 index 000000000..d043c7602 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/BindingInstance.cpp @@ -0,0 +1,51 @@ +/* + * Created on: Jun 15, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "BindingInstance.h" + +using namespace Caf::AmqpIntegration; + +BindingInstance::BindingInstance() : + CAF_CM_INIT("BindingInstance") { + _id = CStringUtils::createRandomUuid(); +} + +BindingInstance::~BindingInstance() { +} + +void BindingInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME("initialize"); + CAF_CM_EXCEPTIONEX_VA0( + UnsupportedOperationException, + 0, + "Binding init from xml not supported"); +} + +std::string BindingInstance::getId() const { + return _id; +} + +void BindingInstance::setBindingInternal(SmartPtrBinding binding) { + _binding = binding; +} + +std::string BindingInstance::getQueue() const { + return _binding->getQueue(); +} + +std::string BindingInstance::getExchange() const { + return _binding->getExchange(); +} + +std::string BindingInstance::getRoutingKey() const { + return _binding->getRoutingKey(); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/BindingInstance.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/BindingInstance.h new file mode 100644 index 000000000..9a0eaff2f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/BindingInstance.h @@ -0,0 +1,62 @@ +/* + * Created on: Jun 15, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef BINDINGINSTANCE_H_ +#define BINDINGINSTANCE_H_ + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObj + * @brief An Integration Object implementing Caf::AmqpIntegration::Binding + *

+ * Currently this object is only created indirectly through rabbit-binding + * declarations in exchange declarations. + */ +class BindingInstance : + public IIntegrationObject, + public BindingInternal, + public Binding { + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(BindingInternal) + CAF_QI_ENTRY(Binding) + CAF_END_QI() + +public: + BindingInstance(); + virtual ~BindingInstance(); + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // BindingInternal + void setBindingInternal(SmartPtrBinding binding); + +public: // Binding + std::string getQueue() const; + std::string getExchange() const; + std::string getRoutingKey() const; + +private: + std::string _id; + SmartPtrBinding _binding; + + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(BindingInstance); +}; +CAF_DECLARE_SMART_QI_POINTER(BindingInstance); + +}} + +#endif /* BINDINGINSTANCE_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/CachingConnectionFactoryObj.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/CachingConnectionFactoryObj.cpp new file mode 100644 index 000000000..a58ca5734 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/CachingConnectionFactoryObj.cpp @@ -0,0 +1,173 @@ +/* + * Created on: Jun 4, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CachingConnectionFactoryObj.h" + +using namespace Caf::AmqpIntegration; + +CachingConnectionFactoryObj::CachingConnectionFactoryObj() : + CAF_CM_INIT_LOG("CachingConnectionFactoryObj") { +} + +CachingConnectionFactoryObj::~CachingConnectionFactoryObj() { +} + +void CachingConnectionFactoryObj::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_factory); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + + const std::string persistenceDir = AppConfigUtils::getRequiredString( + "persistence_dir"); + const SmartPtrCAmqpBrokerDoc amqpBroker = CPersistenceUtils::loadAmqpBroker( + persistenceDir); + + UriUtils::SUriRecord uri; + UriUtils::parseUriString(amqpBroker->getUri(), uri); + + const std::string vhost = UriUtils::findOptParameter(uri, "vhost", + AppConfigUtils::getOptionalString("vhost")); + const std::string connectionTimeout = UriUtils::findOptParameter(uri, + "connection_timeout", AppConfigUtils::getOptionalString("connection_timeout")); + const std::string connectionRetries = UriUtils::findOptParameter(uri, + "connection_retries", AppConfigUtils::getOptionalString("connection_retries")); + const std::string connectionSecondsToWait = UriUtils::findOptParameter(uri, + "connection_seconds_to_wait", + AppConfigUtils::getOptionalString("connection_seconds_to_wait")); + const std::string channelCacheSize = UriUtils::findOptParameter(uri, + "channel_cache_size", AppConfigUtils::getOptionalString("channel_cache_size")); + + CAF_CM_VALIDATE_STRING(uri.protocol); + CAF_CM_VALIDATE_STRING(uri.host); + CAF_CM_VALIDATE_STRING(uri.portStr); + CAF_CM_VALIDATE_STRING(vhost); + + SmartPtrCachingConnectionFactory factory; + factory.CreateInstance(); + factory->init(); + factory->setProtocol(uri.protocol); + factory->setHost(uri.host); + factory->setPort(uri.port); + factory->setVirtualHost(vhost); + if (!uri.username.empty()) { + factory->setUsername(uri.username); + } + if (!uri.password.empty()) { + factory->setPassword(uri.password); + } + if (!connectionTimeout.empty()) { + factory->setConnectionTimeout(CStringConv::fromString(connectionTimeout)); + } + if (!connectionRetries.empty()) { + factory->setRetries(CStringConv::fromString(connectionRetries)); + } + if (!connectionSecondsToWait.empty()) { + factory->setSecondsToWait( + CStringConv::fromString(connectionSecondsToWait)); + } + if (!channelCacheSize.empty()) { + factory->setChannelCacheSize(CStringConv::fromString(channelCacheSize)); + } + + _factory = factory; +} + +void CachingConnectionFactoryObj::terminateBean() { + CAF_CM_FUNCNAME("terminateBean"); + try { + if (_factory) { + _factory->destroy(); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION + ; + CAF_CM_CLEAREXCEPTION; +} + +SmartPtrConnection CachingConnectionFactoryObj::createConnection() { + CAF_CM_FUNCNAME_VALIDATE("createConnection"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->createConnection(); +} + +std::string CachingConnectionFactoryObj::getProtocol() { + CAF_CM_FUNCNAME_VALIDATE("getProtocol"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->getProtocol(); +} + +std::string CachingConnectionFactoryObj::getHost() { + CAF_CM_FUNCNAME_VALIDATE("getHost"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->getHost(); +} + +uint32 CachingConnectionFactoryObj::getPort() { + CAF_CM_FUNCNAME_VALIDATE("getPort"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->getPort(); +} + +std::string CachingConnectionFactoryObj::getVirtualHost() { + CAF_CM_FUNCNAME_VALIDATE("getVirtualHost"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->getVirtualHost(); +} + +std::string CachingConnectionFactoryObj::getUsername() { + CAF_CM_FUNCNAME_VALIDATE("getUsername"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->getUsername(); +} + +std::string CachingConnectionFactoryObj::getPassword() { + CAF_CM_FUNCNAME_VALIDATE("getPassword"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->getPassword(); +} + +std::string CachingConnectionFactoryObj::getCaCertPath() { + CAF_CM_FUNCNAME_VALIDATE("getCaCertPath"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->getCaCertPath(); +} + +std::string CachingConnectionFactoryObj::getClientCertPath() { + CAF_CM_FUNCNAME_VALIDATE("getClientCertPath"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->getClientCertPath(); +} + +std::string CachingConnectionFactoryObj::getClientKeyPath() { + CAF_CM_FUNCNAME_VALIDATE("getClientKeyPath"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->getClientKeyPath(); +} + +uint16 CachingConnectionFactoryObj::getRetries() { + CAF_CM_FUNCNAME_VALIDATE("getRetries"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->getRetries(); +} + +uint16 CachingConnectionFactoryObj::getSecondsToWait() { + CAF_CM_FUNCNAME_VALIDATE("getSecondsToWait"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->getSecondsToWait(); +} + +void CachingConnectionFactoryObj::addConnectionListener( + const SmartPtrConnectionListener& listener) { + CAF_CM_FUNCNAME_VALIDATE("addConnectionListener"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + _factory->addConnectionListener(listener); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/CachingConnectionFactoryObj.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/CachingConnectionFactoryObj.h new file mode 100644 index 000000000..435e87453 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/CachingConnectionFactoryObj.h @@ -0,0 +1,103 @@ +/* + * Created on: Jun 4, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CACHINGCONNECTIONFACTORYOBJ_H_ +#define CACHINGCONNECTIONFACTORYOBJ_H_ + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObj + * @brief An implementation of Caf::AmqpIntegration::ConnectionFactory that returns + * the same connections from all calls, ignores calls to + * Caf::AmqpClient::Connection::close and caches Caf::AmqpClient::Channel. + *

+ * By default, only one channel will be cached, with additional requested channels + * being created and disposed on demand. Consider raising the cache size in + * high-concurrency environments. + *

+ * NOTE: This factory requires explicit closing of all channels obtained from its + * shared connection. Failure to close channels will disable channel reuse. + *

+ * CachingConnectionFactory objects are created by inserting the following into + * the application context: + *

+ *
+ * \
+ * 	\
+ * 	\
+ * 	\
+ * \
+ * 
+ * Properties: + * + * + * + * + * + * + * + * + * + * + * + * + *
PropertyDescription
hostThe broker host. By default the machine's host name (or localhost + * if the host name cannot be determined).
portThe broker port. By default AmqpClient::DEFAULT_AMQP_PORT
virtualHostThe virtual host on the broker. By default AmqpClient::DEFAULT_VHOST
connectionTimeoutThe connection timeout in milliseconds. A value of zero means + * to wait indefinitely. By default 10 seconds.
channelCacheSizeThe number of channels to cache. By default 1.
+ */ +class CachingConnectionFactoryObj : + public TCafSubSystemObjectRoot, + public IBean, + public ConnectionFactory + { + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdAmqpCachingConnectionFactory) + + CAF_BEGIN_INTERFACE_MAP(CachingConnectionFactoryObj) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(ConnectionFactory) + CAF_END_INTERFACE_MAP() + +public: + CachingConnectionFactoryObj(); + virtual ~CachingConnectionFactoryObj(); + +public: // IBean + void initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties); + + void terminateBean(); + +public: // ConnectionFactory + SmartPtrConnection createConnection(); + std::string getProtocol(); + std::string getHost(); + uint32 getPort(); + std::string getVirtualHost(); + std::string getUsername(); + std::string getPassword(); + std::string getCaCertPath(); + std::string getClientCertPath(); + std::string getClientKeyPath(); + uint16 getRetries(); + uint16 getSecondsToWait(); + void addConnectionListener(const SmartPtrConnectionListener& listener); + +private: + SmartPtrCachingConnectionFactory _factory; + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CachingConnectionFactoryObj); +}; + +}} + +#endif /* CACHINGCONNECTIONFACTORYOBJ_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/Doxyfile b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/Doxyfile new file mode 100644 index 000000000..0a125140a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/Doxyfile @@ -0,0 +1,1757 @@ +# Doxyfile 1.7.5.1 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" "). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# http://www.gnu.org/software/libiconv for the list of possible encodings. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or sequence of words) that should +# identify the project. Note that if you do not use Doxywizard you need +# to put quotes around the project name if it contains spaces. + +PROJECT_NAME = "CAF AMQP Integration Library" + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = 1.0 + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer +# a quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = "INTERNAL LIBRARY DEVELOPMENT DOCUMENTATION" + +# With the PROJECT_LOGO tag one can specify an logo or icon that is +# included in the documentation. The maximum height of the logo should not +# exceed 55 pixels and the maximum width should not exceed 200 pixels. +# Doxygen will copy the logo to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, +# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English +# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, +# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, +# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = YES + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful if your file system +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 3 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified +# scopes will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for +# Fortran. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for +# VHDL. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given extension. +# Doxygen has a built-in mapping, but you can override or extend it using this +# tag. The format is ext=language, where ext is a file extension, and language +# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, +# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make +# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C +# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions +# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also makes the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the +# methods anyway, you should set this option to NO. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and +# unions are shown inside the group in which they are included (e.g. using +# @ingroup) instead of on a separate page (for HTML and Man pages) or +# section (for LaTeX and RTF). + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and +# unions with only public data fields will be shown inline in the documentation +# of the scope in which they are defined (i.e. file, namespace, or group +# documentation), provided this scope is documented. If set to NO (the default), +# structs, classes, and unions are shown on a separate page (for HTML and Man +# pages) or section (for LaTeX and RTF). + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. + +TYPEDEF_HIDES_STRUCT = NO + +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penalty. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will roughly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols + +SYMBOL_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespaces are hidden. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = YES + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = YES + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = NO + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = NO + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen +# will list include files with double quotes in the documentation +# rather than with sharp brackets. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = YES + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen +# will sort the (brief and detailed) documentation of class members so that +# constructors and destructors are listed first. If set to NO (the default) +# the constructors will appear in the respective orders defined by +# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. +# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO +# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. + +SORT_MEMBERS_CTORS_1ST = YES + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) +# the group names will appear in their defined order. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to +# do proper type resolution of all parameters of a function it will reject a +# match between the prototype and the implementation of a member function even +# if there is only one candidate or it is obvious which candidate to choose +# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen +# will still accept a match between prototype and implementation in such cases. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST = YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or macro consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and macros in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = NO + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the +# Folder Tree View (if specified). The default is YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. +# This will remove the Namespaces entry from the Quick Index +# and from the Folder Tree View (if specified). The default is YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. The create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. +# You can optionally specify a file name after the option, if omitted +# DoxygenLayout.xml will be used as the name of the layout file. + +LAYOUT_FILE = DoxygenLayout.xml + +# The CITE_BIB_FILES tag can be used to specify one or more bib files +# containing the references data. This must be a list of .bib files. The +# .bib extension is automatically appended if omitted. Using this command +# requires the bibtex tool to be installed. See also +# http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style +# of the bibliography can be controlled using LATEX_BIB_STYLE. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = NO + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# The WARN_NO_PARAMDOC option can be enabled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = ../amqpClient/api ../amqpIntegrationCore . + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# the list of possible encodings. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh +# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py +# *.f90 *.f *.for *.vhd *.vhdl + +FILE_PATTERNS = + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# Note that relative paths are relative to directory from which doxygen is run. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. +# If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. +# Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. +# The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty or if +# non of the patterns match the file name, INPUT_FILTER is applied. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) +# and it is also possible to disable source filtering for a specific pattern +# using *.ext= (so without naming a filter). This option only has effect when +# FILTER_SOURCE_FILES is enabled. + +FILTER_SOURCE_PATTERNS = + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. +# Otherwise they will link to the documentation. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = YES + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 2 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. Note that when using a custom header you are responsible +# for the proper inclusion of any scripts and style sheets that doxygen +# needs, which is dependent on the configuration options used. +# It is adviced to generate a default header using "doxygen -w html +# header.html footer.html stylesheet.css YourConfigFile" and then modify +# that header. Note that the header is subject to change so you typically +# have to redo this when upgrading to a newer version of doxygen or when +# changing the value of configuration settings such as GENERATE_TREEVIEW! + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that +# the files will be copied as-is; there are no commands or markers available. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. +# Doxygen will adjust the colors in the stylesheet and background images +# according to this color. Hue is specified as an angle on a colorwheel, +# see http://en.wikipedia.org/wiki/Hue for more information. +# For instance the value 0 represents red, 60 is yellow, 120 is green, +# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. +# The allowed range is 0 to 359. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of +# the colors in the HTML output. For a value of 0 the output will use +# grayscales only. A value of 255 will produce the most vivid colors. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to +# the luminance component of the colors in the HTML output. Values below +# 100 gradually make the output lighter, whereas values above 100 make +# the output darker. The value divided by 100 is the actual gamma applied, +# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, +# and 100 does not change the gamma. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting +# this to NO can help when comparing the output of multiple runs. + +HTML_TIMESTAMP = YES + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). + +HTML_DYNAMIC_SECTIONS = NO + +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. + +GENERATE_DOCSET = NO + +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) +# can be grouped. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# will append .docset to the name. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# content. + +CHM_INDEX_ENCODING = + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated +# that can be used as input for Qt's qhelpgenerator to generate a +# Qt Compressed Help (.qch) of the generated HTML documentation. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#namespace + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#virtual-folders + +QHP_VIRTUAL_FOLDER = doc + +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to +# add. For more information please see +# http://doc.trolltech.com/qthelpproject.html#custom-filters + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see +# +# Qt Help Project / Custom Filters. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's +# filter section matches. +# +# Qt Help Project / Filter Attributes. + +QHP_SECT_FILTER_ATTRS = + +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files +# will be generated, which together with the HTML files, form an Eclipse help +# plugin. To install this plugin and make it available under the help contents +# menu in Eclipse, the contents of the directory containing the HTML and XML +# files needs to be copied into the plugins directory of eclipse. The name of +# the directory within the plugins directory should be the same as +# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before +# the help appears. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have +# this name. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = NO + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values +# (range [0,1..20]) that doxygen will group on one line in the generated HTML +# documentation. Note that a value of 0 will completely suppress the enum +# values from appearing in the overview section. + +ENUM_VALUES_PER_LINE = 4 + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. +# If the tag value is set to YES, a side panel will be generated +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). +# Windows users are probably better off using the HTML help feature. + +GENERATE_TREEVIEW = NO + +# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, +# and Class Hierarchy pages using a tree view instead of an ordered list. + +USE_INLINE_TREES = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open +# links to external symbols imported via tag files in a separate window. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory +# to force them to be regenerated. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are +# not supported properly for IE 6.0, but are supported on all modern browsers. +# Note that when changing this option you need to delete any form_*.png files +# in the HTML output before the changes have effect. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax +# (see http://www.mathjax.org) which uses client side Javascript for the +# rendering instead of using prerendered bitmaps. Use this if you do not +# have LaTeX installed or if you want to formulas look prettier in the HTML +# output. When enabled you also need to install MathJax separately and +# configure the path to it using the MATHJAX_RELPATH option. + +USE_MATHJAX = NO + +# When MathJax is enabled you need to specify the location relative to the +# HTML output directory using the MATHJAX_RELPATH option. The destination +# directory should contain the MathJax.js script. For instance, if the mathjax +# directory is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the +# mathjax.org site, so you can quickly see the result without installing +# MathJax, but it is strongly recommended to install a local copy of MathJax +# before deployment. + +MATHJAX_RELPATH = http://www.mathjax.org/mathjax + +# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension +# names that should be enabled during MathJax rendering. + +MATHJAX_EXTENSIONS = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box +# for the HTML output. The underlying search engine uses javascript +# and DHTML and should work on any modern browser. Note that when using +# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets +# (GENERATE_DOCSET) there is already a search function so this one should +# typically be disabled. For large projects the javascript based search engine +# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. + +SEARCHENGINE = YES + +# When the SERVER_BASED_SEARCH tag is enabled the search engine will be +# implemented using a PHP enabled web server instead of at the web client +# using Javascript. Doxygen will generate the search PHP script and index +# file to put on the web server. The advantage of the server +# based approach is that it scales better to large projects and allows +# full text search. The disadvantages are that it is more difficult to setup +# and does not have live searching capabilities. + +SERVER_BASED_SEARCH = NO + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = NO + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. +# Note that when enabling USE_PDFLATEX this option is only used for +# generating bitmaps for formulas in the HTML output, but not in the +# Makefile that is written to the output directory. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4wide + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for +# the generated latex document. The footer should contain everything after +# the last chapter. If it is left blank doxygen will generate a +# standard footer. Notice: only use this tag if you know what you are doing! + +LATEX_FOOTER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = YES + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = YES + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +# If LATEX_SOURCE_CODE is set to YES then doxygen will include +# source code with syntax highlighting in the LaTeX output. +# Note that which sources are shown also depends on other settings +# such as SOURCE_BROWSER. + +LATEX_SOURCE_CODE = NO + +# The LATEX_BIB_STYLE tag can be used to specify the style to use for the +# bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See +# http://en.wikipedia.org/wiki/BibTeX for more info. + +LATEX_BIB_STYLE = plain + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. +# This is useful +# if you want to understand what is going on. +# On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = YES + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + +EXPAND_ONLY_PREDEF = YES + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# pointed to by INCLUDE_PATH will be searched when a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = __declspec(x)= AMQPCLIENT_LINKAGE= AMQPINTEGRATIONSUPPORT_LINKAGE= + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition that +# overrules the definition found in the source code. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all references to function-like macros +# that are alone on a line, have an all uppercase name, and do not end with a +# semicolon, because these will confuse the parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option also works with HAVE_DOT disabled, but it is recommended to +# install and use dot, since it yields more powerful graphs. + +CLASS_DIAGRAMS = YES + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = NO + +# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is +# allowed to run in parallel. When set to 0 (the default) doxygen will +# base this on the number of processors available in the system. You can set it +# explicitly to a value larger than 0 to get control over the balance +# between CPU load and processing speed. + +DOT_NUM_THREADS = 0 + +# By default doxygen will use the Helvetica font for all dot files that +# doxygen generates. When you want a differently looking font you can specify +# the font name using DOT_FONTNAME. You need to make sure dot is able to find +# the font, which can be done by putting it in a standard location or by setting +# the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the +# directory containing the font. + +DOT_FONTNAME = Helvetica + +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The default size is 10pt. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the Helvetica font. +# If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to +# set the path where dot can find it. + +DOT_FONTPATH = + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = YES + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = NO + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs +# for selected functions only using the \callgraph command. + +CALL_GRAPH = NO + +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller +# graphs for selected functions only using the \callergraph command. + +CALLER_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will generate a graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = YES + +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are svg, png, jpg, or gif. +# If left blank png will be used. If you choose svg you need to set +# HTML_FILE_EXTENSION to xhtml in order to make the SVG files +# visible in IE 9+ (other browsers do not have this requirement). + +DOT_IMAGE_FORMAT = png + +# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to +# enable generation of interactive SVG images that allow zooming and panning. +# Note that this requires a modern browser other than Internet Explorer. +# Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you +# need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files +# visible. Older versions of IE do not have SVG support. + +INTERACTIVE_SVG = NO + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The MSCFILE_DIRS tag can be used to specify one or more directories that +# contain msc files that are included in the documentation (see the +# \mscfile command). + +MSCFILE_DIRS = + +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. + +DOT_GRAPH_MAX_NODES = 50 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of +# a graph (i.e. they become hard to read). + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = NO + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/DoxygenLayout.xml b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/DoxygenLayout.xml new file mode 100644 index 000000000..c359b0f12 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/DoxygenLayout.xml @@ -0,0 +1,188 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/ExchangeInstance.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/ExchangeInstance.cpp new file mode 100644 index 000000000..2f70de094 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/ExchangeInstance.cpp @@ -0,0 +1,113 @@ +/* + * Created on: Jun 14, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "ExchangeInstance.h" +#include "BindingInstance.h" + +using namespace Caf::AmqpIntegration; + +ExchangeInstance::ExchangeInstance() : + CAF_CM_INIT_LOG("ExchangeInstance") { +} + +ExchangeInstance::~ExchangeInstance() { +} + +void ExchangeInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME("initialize"); + + _id = CStringUtils::createRandomUuid(); + + SmartPtrIAppConfig appConfig = getAppConfig(); + + const std::string exchange = appConfig->resolveValue(configSection->findRequiredAttribute("name")); + const std::string durableStr = configSection->findOptionalAttribute("durable"); + if (durableStr.length()) { + if ((durableStr != "true") && (durableStr != "false")) { + CAF_CM_EXCEPTIONEX_VA3( + InvalidArgumentException, + 0, + "Invalid 'durable' value (%s) for %s '%s'. " + "Value must be either 'true' or 'false'.", + durableStr.c_str(), + configSection->getName().c_str(), + exchange.c_str()); + } + } + const bool durable = !durableStr.length() || (durableStr == "true"); + + if (configSection->getName() == "rabbit-direct-exchange") { + _exchange = createDirectExchange(exchange, durable); + } else if (configSection->getName() == "rabbit-topic-exchange") { + _exchange = createTopicExchange(exchange, durable); + } else if (configSection->getName() == "rabbit-headers-exchange") { + _exchange = createHeadersExchange(exchange, durable); + } else if (configSection->getName() == "rabbit-fanout-exchange") { + _exchange = createFanoutExchange(exchange, durable); + } else { + CAF_CM_EXCEPTIONEX_VA1( + InvalidArgumentException, + 0, + "Invalid exchange type (%s)", + configSection->getName().c_str()); + } + + SmartPtrIDocument bindingsSection = configSection->findOptionalChild("rabbit-bindings"); + if (bindingsSection) { + IDocument::SmartPtrCChildCollection bindingSections = + bindingsSection->getAllChildren(); + for (TSmartConstMapIterator bindingSection(*bindingSections); + bindingSection; + bindingSection++) { + if (bindingSection->getName() != "rabbit-binding") { + CAF_CM_EXCEPTIONEX_VA2( + InvalidArgumentException, + 0, + "Invalid tag (%s) found in bindings section of " + "exchange declaration (name=%s)", + bindingSection->getName().c_str(), + exchange.c_str()); + } + const std::string queue = appConfig->resolveValue(bindingSection->findRequiredAttribute("queue")); + const std::string key = appConfig->resolveValue(bindingSection->findRequiredAttribute("key")); + CAF_CM_LOG_DEBUG_VA3( + "Adding binding declaration [queue id=%s][exchange name=%s][key=%s]", + queue.c_str(), + exchange.c_str(), + key.c_str()); + SmartPtrBindingInstance binding; + binding.CreateInstance(); + binding->setBindingInternal(createBinding(queue, exchange, key)); + _bindings.push_back(binding); + } + } +} + +std::string ExchangeInstance::getId() const { + return _id; +} + +std::string ExchangeInstance::getName() const { + return _exchange->getName(); +} + +std::string ExchangeInstance::getType() const { + return _exchange->getType(); +} + +bool ExchangeInstance::isDurable() const { + return _exchange->isDurable(); +} + +std::deque ExchangeInstance::getEmbeddedBindings() const { + return _bindings; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/ExchangeInstance.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/ExchangeInstance.h new file mode 100644 index 000000000..511007415 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/ExchangeInstance.h @@ -0,0 +1,112 @@ +/* + * Created on: Jun 14, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef EXCHANGEINSTANCE_H_ +#define EXCHANGEINSTANCE_H_ + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObj + * @brief An Integration Object implementing Caf::AmqpIntegration::Exchange + *

+ * %Exchange to queue bindings are also declared as part of an exchange declaration. + *

+ * Example context file declarations: + *

+ * Direct exchange: + *

+ * 
+ *    
+ *    
+ * 
+ * 
+ * Topic exchange: + *
+ * 
+ *    
+ *    
+ * 
+ * 
+ * Other exchange types are rabbit-headers-exchange and + * rabbit-fanout-exchange. + *

+ * %Exchange XML attribute definitions: + * + * + * + * + * + * + *
AttributeDescription
namerequired The AMQP name of the exchange. This is the name that + * will be sent in the Exchange.Declare AMQP method.
durableoptional true to declare a durable exchange else false.
+ * %Binding XML attribute definitions: + * + * + * + * + * + * + *
AttributeDescription
queuerequired The id of the queue integration object to bind to the exchange.
keyrequired The routing key for the binding. + * The format is specific to the type of exchange.
+ */ +class ExchangeInstance : + public IIntegrationObject, + public ExchangeInternal, + public Exchange +{ + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(ExchangeInternal) + CAF_QI_ENTRY(Exchange) + CAF_END_QI() + +public: + ExchangeInstance(); + virtual ~ExchangeInstance(); + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // Exchange + std::string getName() const; + std::string getType() const; + bool isDurable() const; + +public: // ExchangeInternal + std::deque getEmbeddedBindings() const; + +private: + std::string _id; + SmartPtrIIntegrationAppContext _integrationAppContext; + SmartPtrExchange _exchange; + std::deque _bindings; + + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(ExchangeInstance); +}; +CAF_DECLARE_SMART_QI_POINTER(ExchangeInstance); + +}} + +#endif /* EXCHANGEINSTANCE_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/IntegrationObjects.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/IntegrationObjects.cpp new file mode 100644 index 000000000..c2fff35ad --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/IntegrationObjects.cpp @@ -0,0 +1,97 @@ +/* + * Created on: Jun 14, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "IntegrationObjects.h" +#include "RabbitTemplateInstance.h" +#include "RabbitAdminInstance.h" +#include "ExchangeInstance.h" +#include "QueueInstance.h" +#include "AmqpOutboundEndpointInstance.h" +#include "AmqpInboundChannelAdapterInstance.h" + +using namespace Caf::AmqpIntegration; + +IntegrationObjects::IntegrationObjects() : + CAF_CM_INIT("IntegrationObjects") { +} + +IntegrationObjects::~IntegrationObjects() { +} + +void IntegrationObjects::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + CAF_CM_VALIDATE_STL_EMPTY(properties); + _ctorArgs = ctorArgs; + _properties = properties; +} + +void IntegrationObjects::terminateBean() { +} + +bool IntegrationObjects::isResponsible( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("isResponsible"); + CAF_CM_VALIDATE_INTERFACE(configSection); + + const std::string name = configSection->getName(); + return (name.compare("rabbit-template") == 0) + || (name.compare("rabbit-admin") == 0) + || (name.compare("rabbit-direct-exchange") == 0) + || (name.compare("rabbit-topic-exchange") == 0) + || (name.compare("rabbit-headers-exchange") == 0) + || (name.compare("rabbit-fanout-exchange") == 0) + || (name.compare("rabbit-queue") == 0) + || (name.compare("rabbit-outbound-channel-adapter") == 0) + || (name.compare("rabbit-inbound-channel-adapter") == 0); +} + +SmartPtrIIntegrationObject IntegrationObjects::createObject( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME("createObject"); + CAF_CM_VALIDATE_INTERFACE(configSection); + + SmartPtrIIntegrationObject rc; + const std::string name = configSection->getName(); + if (name.compare("rabbit-template") == 0) { + SmartPtrRabbitTemplateInstance object; + object.CreateInstance(); + rc = object; + } else if (name.compare("rabbit-admin") == 0) { + SmartPtrRabbitAdminInstance object; + object.CreateInstance(); + rc = object; + } else if ((name.compare("rabbit-direct-exchange") == 0) + || (name.compare("rabbit-topic-exchange") == 0) + || (name.compare("rabbit-headers-exchange") == 0) + || (name.compare("rabbit-fanout-exchange") == 0)) { + SmartPtrExchangeInstance object; + object.CreateInstance(); + rc = object; + } else if (name.compare("rabbit-queue") == 0) { + SmartPtrQueueInstance object; + object.CreateInstance(); + rc = object; + } else if (name.compare("rabbit-outbound-channel-adapter") == 0) { + SmartPtrAmqpOutboundEndpointInstance object; + object.CreateInstance(); + rc = object; + } else if (name.compare("rabbit-inbound-channel-adapter") == 0) { + SmartPtrAmqpInboundChannelAdapterInstance object; + object.CreateInstance(); + rc = object; + } else { + CAF_CM_EXCEPTION_VA1(E_INVALIDARG, "Unknown name - %s", name.c_str()); + } + + rc->initialize(_ctorArgs, _properties, configSection); + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/IntegrationObjects.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/IntegrationObjects.h new file mode 100644 index 000000000..dfd267327 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/IntegrationObjects.h @@ -0,0 +1,67 @@ +/* + * Created on: Jun 14, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef INTEGRATIONOBJECTS_H_ +#define INTEGRATIONOBJECTS_H_ + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObjImpl + * @brief The bean responsible for creating all of the AMQP integration objects. + *

+ * All applications using AMQP integration must include this definition in the + * application context: + *

+ * \
+ * 
+ */ +class IntegrationObjects : + public TCafSubSystemObjectRoot, + public IBean, + public IIntegrationComponent { +public: + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdIntegrationObjects) + + CAF_BEGIN_INTERFACE_MAP(IntegrationObjects) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IIntegrationComponent) + CAF_END_INTERFACE_MAP() + +public: + IntegrationObjects(); + virtual ~IntegrationObjects(); + +public: // IBean + void initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties); + + void terminateBean(); + +public: // IIntegrationComponent + bool isResponsible( + const SmartPtrIDocument& configSection) const; + + SmartPtrIIntegrationObject createObject( + const SmartPtrIDocument& configSection) const; + +private: + IBean::Cargs _ctorArgs; + IBean::Cprops _properties; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(IntegrationObjects); +}; + +}} + +#endif /* INTEGRATIONOBJECTS_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/QueueInstance.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/QueueInstance.cpp new file mode 100644 index 000000000..0b1c5865a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/QueueInstance.cpp @@ -0,0 +1,98 @@ +/* + * Created on: Jun 14, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "QueueInstance.h" + +using namespace Caf::AmqpIntegration; + +QueueInstance::QueueInstance() : + CAF_CM_INIT("QueueInstance") { +} + +QueueInstance::~QueueInstance() { +} + +void QueueInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME("initialize"); + _id = configSection->findRequiredAttribute("id"); + SmartPtrIAppConfig appConfig = getAppConfig(); + const std::string name = appConfig->resolveValue(configSection->findOptionalAttribute("name")); + const std::string durable = configSection->findOptionalAttribute("durable"); + const std::string exclusive = configSection->findOptionalAttribute("exclusive"); + const std::string autoDelete = configSection->findOptionalAttribute("auto-delete"); + + if (durable.length() && ((durable != "true") && (durable != "false"))) { + CAF_CM_EXCEPTIONEX_VA2( + InvalidArgumentException, + 0, + "queue id (%s): 'durable' must be 'true' or 'false', not '%s'", + _id.c_str(), + durable.c_str()); + } + if (exclusive.length() && ((exclusive != "true") && (exclusive != "false"))) { + CAF_CM_EXCEPTIONEX_VA2( + InvalidArgumentException, + 0, + "queue id (%s): 'exclusive' must be 'true' or 'false', not '%s'", + _id.c_str(), + exclusive.c_str()); + } + if (autoDelete.length() && ((autoDelete != "true") && (autoDelete != "false"))) { + CAF_CM_EXCEPTIONEX_VA2( + InvalidArgumentException, + 0, + "queue id (%s): 'auto-delete' must be 'true' or 'false', not '%s'", + _id.c_str(), + autoDelete.c_str()); + } + + if (name.length()) { + const bool durableFlag = durable.length() ? durable == "true" : false; + const bool exclusiveFlag = exclusive.length() ? exclusive == "true" : false; + const bool autoDeleteFlag = autoDelete.length() ? autoDelete == "true" : false; + _queue = createQueue(name, durableFlag, exclusiveFlag, autoDeleteFlag); + } else { + if ((durable == "true") || (exclusive == "false") || (autoDelete == "false")) { + CAF_CM_EXCEPTIONEX_VA1( + InvalidArgumentException, + 0, + "Anonymous queue (%s) cannot specify durable='true', exclusive='false', " + "or auto-delete='false'", + _id.c_str()); + } + _queue = createQueue("", false, true, true); + } +} + +std::string QueueInstance::getId() const { + return _id; +} + +void QueueInstance::setQueueInternal(SmartPtrQueue queue) { + _queue = queue; +} + +std::string QueueInstance::getName() const { + return _queue->getName(); +} + +bool QueueInstance::isDurable() const { + return _queue->isDurable(); +} + +bool QueueInstance::isExclusive() const { + return _queue->isExclusive(); +} + +bool QueueInstance::isAutoDelete() const { + return _queue->isAutoDelete(); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/QueueInstance.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/QueueInstance.h new file mode 100644 index 000000000..c9f265e7f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/QueueInstance.h @@ -0,0 +1,97 @@ +/* + * Created on: Jun 14, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef QUEUEINSTANCE_H_ +#define QUEUEINSTANCE_H_ + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObj + * @brief An Integration Object implementing Caf::AmqpIntegration::Queue + *

+ * Example context file declarations: + *

+ * Named queue: + *

+ * 
+ * 
+ * Anonymous queue: + *
+ * 
+ * 
+ *

+ * XML attribute definitions: + * + * + * + * + * + * + * + * + * + * + * + *
AttributeDescription
idrequired The id of the integration object. + * All integration objects that reference queues must do so by their id.
nameoptional The AMQP name of the queue. This is the name that + * will be sent in the Queue.Declare AMQP method. It does not need to match the + * id. To declare an anonymous (server-named) queue, leave this attribute + * out of the declaration. Do not set name to blank.
durableoptional true to declare a durable queue else false.
exclusiveoptional true to declare the queue exclusive to the connection + * else false.
auto-deleteoptional true to declare that the queue be deleted when it is no + * longer in use else false.
+ * NOTE: Anonymous queues are automatically declared as non-durable, exclusive + * and auto-delete. They cannot be declared otherwise. + */ +class QueueInstance : + public IIntegrationObject, + public QueueInternal, + public Queue +{ + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(QueueInternal) + CAF_QI_ENTRY(Queue) + CAF_END_QI() + +public: + QueueInstance(); + virtual ~QueueInstance(); + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // QueueInternal + void setQueueInternal(SmartPtrQueue queue); + +public: // Queue + std::string getName() const; + bool isDurable() const; + bool isExclusive() const; + bool isAutoDelete() const; + +private: + std::string _id; + SmartPtrQueue _queue; + + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(QueueInstance); +}; +CAF_DECLARE_SMART_QI_POINTER(QueueInstance); + +}} + +#endif /* QUEUEINSTANCE_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/RabbitAdminInstance.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/RabbitAdminInstance.cpp new file mode 100644 index 000000000..6b9e23edf --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/RabbitAdminInstance.cpp @@ -0,0 +1,222 @@ +/* + * Created on: Jun 12, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "RabbitAdminInstance.h" + +using namespace Caf::AmqpIntegration; + +RabbitAdminInstance::RabbitAdminInstance() : + _isRunning(false), + CAF_CM_INIT_LOG("RabbitAdminInstance") { +} + +RabbitAdminInstance::~RabbitAdminInstance() { +} + +void RabbitAdminInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + _id = configSection->findOptionalAttribute("id"); + if (!_id.length()) { + _id = "RabbitAdminInstance-"; + _id += CStringUtils::createRandomUuid(); + } + _connectionFactoryId = configSection->findRequiredAttribute("connection-factory"); + _admin.CreateInstance(); +} + +std::string RabbitAdminInstance::getId() const { + return _id; +} + +void RabbitAdminInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + CAF_CM_VALIDATE_INTERFACE(appContext); + _appContext = appContext; +} + +void RabbitAdminInstance::setIntegrationAppContext(SmartPtrIIntegrationAppContext context) { + CAF_CM_FUNCNAME_VALIDATE("setIntegrationAppContext"); + CAF_CM_VALIDATE_INTERFACE(context); + _integrationAppContext = context; +} + +void RabbitAdminInstance::start(const uint32 timeoutMs) { + CAF_CM_FUNCNAME("start"); + + SmartPtrIBean factoryBean = _appContext->getBean(_connectionFactoryId); + SmartPtrConnectionFactory connectionFactory; + connectionFactory.QueryInterface(factoryBean, true); + _admin->init(connectionFactory); + + try { + CAF_CM_VALIDATE_INTERFACE(_integrationAppContext); + CAF_CM_LOG_DEBUG_VA0("Initializing exchange/queue/binding declarations"); + + std::deque queues; + IIntegrationAppContext::SmartPtrCObjectCollection objs = + _integrationAppContext->getIntegrationObjects(Queue::IIDOF()); + CAF_CM_LOG_DEBUG_VA1("Declaring %d queues", objs->size()); + if (objs->size()) { + for (TSmartConstIterator obj(*objs); + obj; + obj++) { + SmartPtrQueue queue; + queue.QueryInterface(*obj); + if (queue->getName().length()) { + CAF_CM_LOG_DEBUG_VA1("Declaring queue - %s", queue->getName().c_str()); + _admin->declareQueue(queue); + } else { + CAF_CM_LOG_DEBUG_VA0("Declaring anonymous queue"); + SmartPtrQueue anonQueue = _admin->declareQueue(); + SmartPtrQueueInternal queueInt; + queueInt.QueryInterface(queue); + queueInt->setQueueInternal(anonQueue); + } + queues.push_back(queue); + } + } + + std::deque exchanges; + std::deque bindings; + objs = _integrationAppContext->getIntegrationObjects(Exchange::IIDOF()); + CAF_CM_LOG_DEBUG_VA1("Declaring %d exchanges", objs->size()); + if (objs->size()) { + for (TSmartConstIterator obj(*objs); + obj; + obj++) { + SmartPtrExchange exchange; + exchange.QueryInterface(*obj); + _admin->declareExchange(exchange); + exchanges.push_back(exchange); + + SmartPtrExchangeInternal exchangeInternal; + exchangeInternal.QueryInterface(exchange); + std::deque embeddedBindings = exchangeInternal->getEmbeddedBindings(); + + bindings.insert( + bindings.end(), + embeddedBindings.begin(), + embeddedBindings.end()); + } + } + + objs = _integrationAppContext->getIntegrationObjects(Binding::IIDOF()); + if (objs->size()) { + for (TSmartConstIterator obj(*objs); + obj; + obj++) { + SmartPtrBinding binding; + binding.QueryInterface(*obj); + bindings.push_back(binding); + } + } + + CAF_CM_LOG_DEBUG_VA1("Declaring %d bindings", bindings.size()); + for (TSmartConstIterator > binding(bindings); + binding; + binding++) { + SmartPtrIIntegrationObject obj = + _integrationAppContext->getIntegrationObject(binding->getQueue()); + + // resolve the queue id to a queue name and replace the binding object + SmartPtrQueue queue; + queue.QueryInterface(obj); + SmartPtrBindingInternal bindingInternal; + bindingInternal.QueryInterface(*binding); + bindingInternal->setBindingInternal( + createBinding( + queue->getName(), + binding->getExchange(), + binding->getRoutingKey())); + + // declare the binding + _admin->declareBinding(*binding); + } + } + CAF_CM_CATCH_ALL; + if (CAF_CM_ISEXCEPTION) { + _admin->term(); + _admin = NULL; + } + CAF_CM_THROWEXCEPTION; + _isRunning = true; +} + +void RabbitAdminInstance::stop(const uint32 timeoutMs) { + if (_isRunning) { + _isRunning = false; + _admin->term(); + } + _admin = NULL; +} + +bool RabbitAdminInstance::isRunning() const { + return _isRunning; +} + +void RabbitAdminInstance::declareExchange(SmartPtrExchange exchange) { + CAF_CM_FUNCNAME_VALIDATE("declareExchange"); + CAF_CM_VALIDATE_BOOL(isRunning()); + _admin->declareExchange(exchange); +} + +bool RabbitAdminInstance::deleteExchange(const std::string& exchange) { + CAF_CM_FUNCNAME_VALIDATE("deleteExchange"); + CAF_CM_VALIDATE_BOOL(isRunning()); + return _admin->deleteExchange(exchange); +} + +SmartPtrQueue RabbitAdminInstance::declareQueue() { + CAF_CM_FUNCNAME_VALIDATE("declareQueue"); + CAF_CM_VALIDATE_BOOL(isRunning()); + return _admin->declareQueue(); +} + +void RabbitAdminInstance::declareQueue(SmartPtrQueue queue) { + CAF_CM_FUNCNAME_VALIDATE("declareQueue"); + CAF_CM_VALIDATE_BOOL(isRunning()); + _admin->declareQueue(queue); +} + +bool RabbitAdminInstance::deleteQueue(const std::string& queue) { + CAF_CM_FUNCNAME_VALIDATE("deleteQueue"); + CAF_CM_VALIDATE_BOOL(isRunning()); + return _admin->deleteQueue(queue); +} + +void RabbitAdminInstance::deleteQueue( + const std::string& queue, + const bool unused, + const bool empty) { + CAF_CM_FUNCNAME_VALIDATE("deleteQueue"); + CAF_CM_VALIDATE_BOOL(isRunning()); + return _admin->deleteQueue(queue, unused, empty); +} + +void RabbitAdminInstance::purgeQueue(const std::string& queue) { + CAF_CM_FUNCNAME_VALIDATE("purgeQueue"); + CAF_CM_VALIDATE_BOOL(isRunning()); + return _admin->purgeQueue(queue); +} + +void RabbitAdminInstance::declareBinding(SmartPtrBinding binding) { + CAF_CM_FUNCNAME_VALIDATE("declareBinding"); + CAF_CM_VALIDATE_BOOL(isRunning()); + return _admin->declareBinding(binding); +} + +void RabbitAdminInstance::removeBinding(SmartPtrBinding binding) { + CAF_CM_FUNCNAME_VALIDATE("removeBinding"); + CAF_CM_VALIDATE_BOOL(isRunning()); + return _admin->removeBinding(binding); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/RabbitAdminInstance.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/RabbitAdminInstance.h new file mode 100644 index 000000000..f9cf6d1dd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/RabbitAdminInstance.h @@ -0,0 +1,113 @@ +/* + * Created on: Jun 12, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef RABBITADMININSTANCE_H_ +#define RABBITADMININSTANCE_H_ + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObj + * @brief An Integration Object implementing Caf::AmqpIntegration::AmqpAdmin + *

+ *

+ * Example context file declaration:
+ *
+ * 
+ * 
+ *

+ * XML attribute definitions: + * + * + * + * + * + *
AttributeDescription
idoptional The id of the integration object
connection-factoryrequired The id of the ConnectionFactory bean
+ */ +class RabbitAdminInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public ILifecycle, + public IIntegrationAppContextAware, + public AmqpAdmin +{ + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(ILifecycle) + CAF_QI_ENTRY(IIntegrationAppContextAware) + CAF_QI_ENTRY(AmqpAdmin) + CAF_END_QI() + +public: + RabbitAdminInstance(); + virtual ~RabbitAdminInstance(); + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ILifecycle + void start(const uint32 timeoutMs); + void stop(const uint32 timeoutMs); + bool isRunning() const; + +public: // IIntegrationAppContextAware + void setIntegrationAppContext( + SmartPtrIIntegrationAppContext context); + +public: // AmqpAdmin + void declareExchange(SmartPtrExchange exchange); + + bool deleteExchange(const std::string& exchange); + + SmartPtrQueue declareQueue(); + + void declareQueue(SmartPtrQueue queue); + + bool deleteQueue(const std::string& queue); + + void deleteQueue( + const std::string& queue, + const bool unused, + const bool empty); + + void purgeQueue(const std::string& queue); + + void declareBinding(SmartPtrBinding binding); + + void removeBinding(SmartPtrBinding binding); + +private: + bool _isRunning; + std::string _id; + std::string _connectionFactoryId; + SmartPtrRabbitAdmin _admin; + SmartPtrIAppContext _appContext; + SmartPtrIIntegrationAppContext _integrationAppContext; + + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(RabbitAdminInstance); +}; +CAF_DECLARE_SMART_QI_POINTER(RabbitAdminInstance); + +}} + +#endif /* RABBITADMININSTANCE_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/RabbitTemplateInstance.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/RabbitTemplateInstance.cpp new file mode 100644 index 000000000..ca5bee21e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/RabbitTemplateInstance.cpp @@ -0,0 +1,182 @@ +/* + * Created on: Jun 12, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "RabbitTemplateInstance.h" + +using namespace Caf::AmqpIntegration; + +RabbitTemplateInstance::RabbitTemplateInstance() : + _isWired(false), + CAF_CM_INIT_LOG("RabbitTemplateInstance") { +} + +RabbitTemplateInstance::~RabbitTemplateInstance() { +} + +void RabbitTemplateInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + _id = configSection->findOptionalAttribute("id"); + if (!_id.length()) { + _id = CStringUtils::createRandomUuid(); + } + _configSection = configSection; +} + +std::string RabbitTemplateInstance::getId() const { + return _id; +} + +void RabbitTemplateInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + CAF_CM_VALIDATE_INTERFACE(_configSection); + + const std::string connectionFactoryId = _configSection->findRequiredAttribute("connection-factory"); + SmartPtrIBean factoryBean = appContext->getBean(connectionFactoryId); + SmartPtrConnectionFactory connectionFactory; + connectionFactory.QueryInterface(factoryBean, true); + + SmartPtrIAppConfig appConfig = getAppConfig(); + + _template.CreateInstance(); + std::string param = _configSection->findOptionalAttribute("exchange"); + if (param.length()) { + CAF_CM_LOG_DEBUG_VA1("Setting exchange='%s'", param.c_str()); + _template->setExchange(appConfig->resolveValue(param)); + } + param = _configSection->findOptionalAttribute("queue"); + if (param.length()) { + CAF_CM_LOG_DEBUG_VA1("Setting queue='%s'", param.c_str()); + _template->setQueue(appConfig->resolveValue(param)); + } + param = _configSection->findOptionalAttribute("routing-key"); + if (param.length()) { + CAF_CM_LOG_DEBUG_VA1("Setting routing-key='%s'", param.c_str()); + _template->setRoutingKey(appConfig->resolveValue(param)); + } + param = _configSection->findOptionalAttribute("reply_timeout"); + if (param.length()) { + param = appConfig->resolveValue(param); + uint32 timeout = CStringConv::fromString(param); + CAF_CM_LOG_DEBUG_VA1("Setting reply_timeout=%d", timeout); + _template->setReplyTimeout(timeout); + } + + _template->init(connectionFactory); + _isWired = true; + _configSection = NULL; +} + +void RabbitTemplateInstance::start(const uint32 timeoutMs) { +} + +void RabbitTemplateInstance::stop(const uint32 timeoutMs) { + if (_isWired) { + _template->term(); + } + _template = NULL; + _isWired = false; +} + +bool RabbitTemplateInstance::isRunning() const { + return (_isWired && !_template.IsNull()); +} + +void RabbitTemplateInstance::send( + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper headerMapper) { + CAF_CM_FUNCNAME_VALIDATE("send"); + CAF_CM_VALIDATE_BOOL(isRunning()); + _template->send(message, headerMapper); +} + +void RabbitTemplateInstance::send( + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper headerMapper) { + CAF_CM_FUNCNAME_VALIDATE("send"); + CAF_CM_VALIDATE_BOOL(isRunning()); + _template->send(routingKey, message, headerMapper); +} + +void RabbitTemplateInstance::send( + const std::string& exchange, + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper headerMapper) { + CAF_CM_FUNCNAME_VALIDATE("send"); + CAF_CM_VALIDATE_BOOL(isRunning()); + _template->send(exchange, routingKey, message, headerMapper); +} + +SmartPtrIIntMessage RabbitTemplateInstance::receive( + SmartPtrAmqpHeaderMapper headerMapper) { + CAF_CM_FUNCNAME_VALIDATE("receive"); + CAF_CM_VALIDATE_BOOL(isRunning()); + return _template->receive(headerMapper); +} + +SmartPtrIIntMessage RabbitTemplateInstance::receive( + const std::string& queueName, + SmartPtrAmqpHeaderMapper headerMapper) { + CAF_CM_FUNCNAME_VALIDATE("receive"); + CAF_CM_VALIDATE_BOOL(isRunning()); + return _template->receive(queueName, headerMapper); +} + +SmartPtrIIntMessage RabbitTemplateInstance::sendAndReceive( + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper requestHeaderMapper, + SmartPtrAmqpHeaderMapper responseHeaderMapper) { + CAF_CM_FUNCNAME_VALIDATE("sendAndReceive"); + CAF_CM_VALIDATE_BOOL(isRunning()); + return _template->sendAndReceive( + message, + requestHeaderMapper, + responseHeaderMapper); +} + +SmartPtrIIntMessage RabbitTemplateInstance::sendAndReceive( + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper requestHeaderMapper, + SmartPtrAmqpHeaderMapper responseHeaderMapper) { + CAF_CM_FUNCNAME_VALIDATE("sendAndReceive"); + CAF_CM_VALIDATE_BOOL(isRunning()); + return _template->sendAndReceive( + routingKey, + message, + requestHeaderMapper, + responseHeaderMapper); +} + +SmartPtrIIntMessage RabbitTemplateInstance::sendAndReceive( + const std::string& exchange, + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper requestHeaderMapper, + SmartPtrAmqpHeaderMapper responseHeaderMapper) { + CAF_CM_FUNCNAME_VALIDATE("sendAndReceive"); + CAF_CM_VALIDATE_BOOL(isRunning()); + return _template->sendAndReceive( + exchange, + routingKey, + message, + requestHeaderMapper, + responseHeaderMapper); +} + +gpointer RabbitTemplateInstance::execute(SmartPtrExecutor executor, gpointer data) { + CAF_CM_FUNCNAME_VALIDATE("execute"); + CAF_CM_VALIDATE_BOOL(isRunning()); + return _template->execute(executor, data); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/RabbitTemplateInstance.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/RabbitTemplateInstance.h new file mode 100644 index 000000000..d57664e07 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/RabbitTemplateInstance.h @@ -0,0 +1,137 @@ +/* + * Created on: Jun 12, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef RABBITTEMPLATEINSTANCE_H_ +#define RABBITTEMPLATEINSTANCE_H_ + +namespace Caf { namespace AmqpIntegration { + +CAF_DECLARE_CLASS_AND_IMPQI_POINTER(RabbitTemplateInstance); + +/** + * @ingroup IntObj + * @brief An Integration Object implementing Caf::AmqpIntegration::AmqpTemplate + *

+ *

+ * Example context file declaration:
+ *
+ * 
+ * 
+ *

+ * XML attribute definitions: + * + * + * + * + * + * + * + * + * + * + * + *
AttributeDescription
idoptional The id of the integration object
connection-factoryrequired The id of the ConnectionFactory bean
exchangeoptional The name of the exchange to use by default
queueoptional The id of the queue to use by default. The queue name comes from + * the queue object with the given id.
routing-keyoptional The routing-key to use by default
reply_timeoutoptional The number of milliseconds to wait for a response when using + * sendAndReceive methods. This is an unsigned value. A value of zero indicates + * wait indefinitely.
+ */ +class RabbitTemplateInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public ILifecycle, + public AmqpTemplate +{ + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(ILifecycle) + CAF_QI_ENTRY(AmqpTemplate) + CAF_END_QI() + +public: + RabbitTemplateInstance(); + virtual ~RabbitTemplateInstance(); + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ILifecycle + void start(const uint32 timeoutMs); + void stop(const uint32 timeoutMs); + bool isRunning() const; + +public: // AmqpTemplate + void send( + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper headerMapper = SmartPtrAmqpHeaderMapper()); + + void send( + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper headerMapper = SmartPtrAmqpHeaderMapper()); + + void send( + const std::string& exchange, + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper headerMapper = SmartPtrAmqpHeaderMapper()); + + SmartPtrIIntMessage receive( + SmartPtrAmqpHeaderMapper headerMapper = SmartPtrAmqpHeaderMapper()); + + SmartPtrIIntMessage receive( + const std::string& queueName, + SmartPtrAmqpHeaderMapper headerMapper = SmartPtrAmqpHeaderMapper()); + + SmartPtrIIntMessage sendAndReceive( + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper requestHeaderMapper = SmartPtrAmqpHeaderMapper(), + SmartPtrAmqpHeaderMapper responseHeaderMapper = SmartPtrAmqpHeaderMapper()); + + SmartPtrIIntMessage sendAndReceive( + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper requestHeaderMapper = SmartPtrAmqpHeaderMapper(), + SmartPtrAmqpHeaderMapper responseHeaderMapper = SmartPtrAmqpHeaderMapper()); + + SmartPtrIIntMessage sendAndReceive( + const std::string& exchange, + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper requestHeaderMapper = SmartPtrAmqpHeaderMapper(), + SmartPtrAmqpHeaderMapper responseHeaderMapper = SmartPtrAmqpHeaderMapper()); + + gpointer execute(SmartPtrExecutor executor, gpointer data); + +private: + bool _isWired; + std::string _id; + SmartPtrIDocument _configSection; + SmartPtrRabbitTemplate _template; + + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(RabbitTemplateInstance); +}; + +}} + +#endif /* RABBITTEMPLATEINSTANCE_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/SecureCachingConnectionFactoryObj.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/SecureCachingConnectionFactoryObj.cpp new file mode 100644 index 000000000..3ab94a0a1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/SecureCachingConnectionFactoryObj.cpp @@ -0,0 +1,193 @@ +/* + * Created on: Jun 4, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "SecureCachingConnectionFactoryObj.h" + +using namespace Caf::AmqpIntegration; + +SecureCachingConnectionFactoryObj::SecureCachingConnectionFactoryObj() : + CAF_CM_INIT_LOG("SecureCachingConnectionFactoryObj") { +} + +SecureCachingConnectionFactoryObj::~SecureCachingConnectionFactoryObj() { +} + +void SecureCachingConnectionFactoryObj::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_factory); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + + const std::string persistenceDir = + AppConfigUtils::getRequiredString("persistence_dir"); + + const SmartPtrCPersistenceDoc persistence = + CPersistenceUtils::loadPersistence(persistenceDir); + CAF_CM_VALIDATE_SMARTPTR(persistence); + + const SmartPtrCAmqpBrokerDoc amqpBroker = + CPersistenceUtils::loadAmqpBroker(persistence->getPersistenceProtocol()); + CAF_CM_VALIDATE_SMARTPTR(amqpBroker); + + const SmartPtrCCertPathCollectionDoc tlsCertPathCollection = amqpBroker->getTlsCertPathCollection(); + CAF_CM_VALIDATE_SMARTPTR(tlsCertPathCollection); + + const SmartPtrCLocalSecurityDoc localSecurity = persistence->getLocalSecurity(); + CAF_CM_VALIDATE_SMARTPTR(localSecurity); + + UriUtils::SUriRecord uri; + UriUtils::parseUriString(amqpBroker->getUri(), uri); + + const std::string vhost = UriUtils::findOptParameter( + uri, "vhost", AppConfigUtils::getOptionalString("vhost")); + const std::string connectionTimeout = UriUtils::findOptParameter( + uri, "connection_timeout", AppConfigUtils::getOptionalString("connection_timeout")); + const std::string connectionRetries = UriUtils::findOptParameter( + uri, "connection_retries", AppConfigUtils::getOptionalString("connection_retries")); + const std::string connectionSecondsToWait = UriUtils::findOptParameter( + uri, "connection_seconds_to_wait", AppConfigUtils::getOptionalString("connection_seconds_to_wait")); + const std::string channelCacheSize = UriUtils::findOptParameter( + uri, "channel_cache_size", AppConfigUtils::getOptionalString("channel_cache_size")); + + const std::deque tlsCertPathCollectionInner = tlsCertPathCollection->getCertPath(); + CAF_CM_VALIDATE_STL(tlsCertPathCollectionInner); + CAF_CM_VALIDATE_BOOL(tlsCertPathCollectionInner.size() == 1); + const std::string caCertPath = tlsCertPathCollectionInner.front(); + + CAF_CM_VALIDATE_STRING(uri.protocol); + CAF_CM_VALIDATE_STRING(uri.host); + CAF_CM_VALIDATE_STRING(uri.portStr); + CAF_CM_VALIDATE_STRING(vhost); + + CAF_CM_VALIDATE_STRING(caCertPath); + CAF_CM_VALIDATE_STRING(localSecurity->getCertPath()); + CAF_CM_VALIDATE_STRING(localSecurity->getPrivateKeyPath()); + + SmartPtrCachingConnectionFactory factory; + factory.CreateInstance(); + factory->init(); + factory->setProtocol(uri.protocol); + factory->setHost(uri.host); + factory->setPort(uri.port); + factory->setVirtualHost(vhost); + factory->setCaCertPath(caCertPath); + factory->setClientCertPath(localSecurity->getCertPath()); + factory->setClientKeyPath(localSecurity->getPrivateKeyPath()); + if (! uri.username.empty()) { + factory->setUsername(uri.username); + } + if (! uri.password.empty()) { + factory->setPassword(uri.password); + } + if (! connectionTimeout.empty()) { + factory->setConnectionTimeout(CStringConv::fromString(connectionTimeout)); + } + if (! connectionRetries.empty()) { + factory->setRetries(CStringConv::fromString(connectionRetries)); + } + if (! connectionSecondsToWait.empty()) { + factory->setSecondsToWait(CStringConv::fromString(connectionSecondsToWait)); + } + if (! channelCacheSize.empty()) { + factory->setChannelCacheSize(CStringConv::fromString(channelCacheSize)); + } + + _factory = factory; +} + +void SecureCachingConnectionFactoryObj::terminateBean() { + CAF_CM_FUNCNAME("terminateBean"); + try { + if (_factory) { + _factory->destroy(); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; +} + +SmartPtrConnection SecureCachingConnectionFactoryObj::createConnection() { + CAF_CM_FUNCNAME_VALIDATE("createConnection"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->createConnection(); +} + +std::string SecureCachingConnectionFactoryObj::getProtocol() { + CAF_CM_FUNCNAME_VALIDATE("getProtocol"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->getProtocol(); +} + +std::string SecureCachingConnectionFactoryObj::getHost() { + CAF_CM_FUNCNAME_VALIDATE("getHost"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->getHost(); +} + +uint32 SecureCachingConnectionFactoryObj::getPort() { + CAF_CM_FUNCNAME_VALIDATE("getPort"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->getPort(); +} + +std::string SecureCachingConnectionFactoryObj::getVirtualHost() { + CAF_CM_FUNCNAME_VALIDATE("getVirtualHost"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->getVirtualHost(); +} + +std::string SecureCachingConnectionFactoryObj::getUsername() { + CAF_CM_FUNCNAME_VALIDATE("getUsername"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->getUsername(); +} + +std::string SecureCachingConnectionFactoryObj::getPassword() { + CAF_CM_FUNCNAME_VALIDATE("getPassword"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->getPassword(); +} + +std::string SecureCachingConnectionFactoryObj::getCaCertPath() { + CAF_CM_FUNCNAME_VALIDATE("getCaCertPath"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->getCaCertPath(); +} + +std::string SecureCachingConnectionFactoryObj::getClientCertPath() { + CAF_CM_FUNCNAME_VALIDATE("getClientCertPath"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->getClientCertPath(); +} + +std::string SecureCachingConnectionFactoryObj::getClientKeyPath() { + CAF_CM_FUNCNAME_VALIDATE("getClientKeyPath"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->getClientKeyPath(); +} + +uint16 SecureCachingConnectionFactoryObj::getRetries() { + CAF_CM_FUNCNAME_VALIDATE("getRetries"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->getRetries(); +} + +uint16 SecureCachingConnectionFactoryObj::getSecondsToWait() { + CAF_CM_FUNCNAME_VALIDATE("getSecondsToWait"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->getSecondsToWait(); +} + +void SecureCachingConnectionFactoryObj::addConnectionListener(const SmartPtrConnectionListener& listener) { + CAF_CM_FUNCNAME_VALIDATE("addConnectionListener"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + _factory->addConnectionListener(listener); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/SecureCachingConnectionFactoryObj.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/SecureCachingConnectionFactoryObj.h new file mode 100644 index 000000000..e9262ae92 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/SecureCachingConnectionFactoryObj.h @@ -0,0 +1,103 @@ +/* + * Created on: Jun 4, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef SECURECACHINGCONNECTIONFACTORYOBJ_H_ +#define SECURECACHINGCONNECTIONFACTORYOBJ_H_ + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObj + * @brief An implementation of Caf::AmqpIntegration::SecureConnectionFactory that returns + * the same connections from all calls, ignores calls to + * Caf::AmqpClient::Connection::close and caches Caf::AmqpClient::Channel. + *

+ * By default, only one channel will be cached, with additional requested channels + * being created and disposed on demand. Consider raising the cache size in + * high-concurrency environments. + *

+ * NOTE: This factory requires explicit closing of all channels obtained from its + * shared connection. Failure to close channels will disable channel reuse. + *

+ * SecureCachingConnectionFactory objects are created by inserting the following into + * the application context: + *

+ *
+ * \
+ * 	\
+ * 	\
+ * 	\
+ * \
+ * 
+ * Properties: + * + * + * + * + * + * + * + * + * + * + * + * + *
PropertyDescription
hostThe broker host. By default the machine's host name (or localhost + * if the host name cannot be determined).
portThe broker port. By default AmqpClient::DEFAULT_AMQP_PORT
virtualHostThe virtual host on the broker. By default AmqpClient::DEFAULT_VHOST
connectionTimeoutThe connection timeout in milliseconds. A value of zero means + * to wait indefinitely. By default 10 seconds.
channelCacheSizeThe number of channels to cache. By default 1.
+ */ +class SecureCachingConnectionFactoryObj : + public TCafSubSystemObjectRoot, + public IBean, + public ConnectionFactory + { + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdAmqpSecureCachingConnectionFactory) + + CAF_BEGIN_INTERFACE_MAP(SecureCachingConnectionFactoryObj) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(ConnectionFactory) + CAF_END_INTERFACE_MAP() + +public: + SecureCachingConnectionFactoryObj(); + virtual ~SecureCachingConnectionFactoryObj(); + +public: // IBean + void initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties); + + void terminateBean(); + +public: // ConnectionFactory + SmartPtrConnection createConnection(); + std::string getProtocol(); + std::string getHost(); + uint32 getPort(); + std::string getVirtualHost(); + std::string getUsername(); + std::string getPassword(); + std::string getCaCertPath(); + std::string getClientCertPath(); + std::string getClientKeyPath(); + uint16 getRetries(); + uint16 getSecondsToWait(); + void addConnectionListener(const SmartPtrConnectionListener& listener); + +private: + SmartPtrCachingConnectionFactory _factory; + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(SecureCachingConnectionFactoryObj); +}; + +}} + +#endif /* SECURECACHINGCONNECTIONFACTORYOBJ_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/amqpIntegration.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/amqpIntegration.cpp new file mode 100644 index 000000000..f05cd0ad7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/amqpIntegration.cpp @@ -0,0 +1,55 @@ +/* + * Created on: May 24, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CachingConnectionFactoryObj.h" +#include "SecureCachingConnectionFactoryObj.h" +#include "IntegrationObjects.h" + +namespace Caf { + +/** @brief CAF AMQP Integration */ +namespace AmqpIntegration { + const char* _sObjIdAmqpCachingConnectionFactory = "com.vmware.caf.comm.integration.amqp.caching.connection.factory"; + const char* _sObjIdAmqpSecureCachingConnectionFactory = "com.vmware.caf.comm.integration.amqp.secure.caching.connection.factory"; + const char* _sObjIdIntegrationObjects = "com.vmware.caf.comm.integration.objects"; +}} + +CEcmSubSystemModule _Module; + +using namespace Caf::AmqpIntegration; + +CAF_BEGIN_OBJECT_MAP(ObjectMap) + CAF_OBJECT_ENTRY(CachingConnectionFactoryObj) + CAF_OBJECT_ENTRY(SecureCachingConnectionFactoryObj) + CAF_OBJECT_ENTRY(IntegrationObjects) +CAF_END_OBJECT_MAP() + +CAF_DECLARE_SUBSYSTEM_EXPORTS() + +extern "C" BOOL APIENTRY DllMain(HINSTANCE hModule, uint32 dwReason, LPVOID) +{ + try { + if (DLL_PROCESS_ATTACH == dwReason) + { + // initialize the sub-system module + _Module.Init(ObjectMap, hModule); + } + else if (DLL_PROCESS_DETACH == dwReason) + { + // Terminate the sub-system module + _Module.Term(); + } + } catch (std::runtime_error) { + ::exit(2); + } catch (...) { + ::exit(2); + } + + return TRUE; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/amqpIntegrationDefines.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/amqpIntegrationDefines.h new file mode 100644 index 000000000..04c61f845 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/amqpIntegrationDefines.h @@ -0,0 +1,26 @@ +/* + * Created on: May 25, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONDEFINES_H_ +#define AMQPINTEGRATIONDEFINES_H_ + +namespace Caf { + +/** @brief CAF AMQP Integration */ +namespace AmqpIntegration { + /** @brief CachingConnectionFactory bean subsystem id */ + extern const char* _sObjIdAmqpCachingConnectionFactory; + + /** @brief CachingConnectionFactory bean subsystem id */ + extern const char* _sObjIdAmqpSecureCachingConnectionFactory; + + /** @brief Integration object aggregator bean subsystem id */ + extern const char* _sObjIdIntegrationObjects; +}} + +#endif /* AMQPINTEGRATIONDEFINES_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/doxy-publish.sh b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/doxy-publish.sh new file mode 100644 index 000000000..6cdc4957b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/doxy-publish.sh @@ -0,0 +1,11 @@ +#!/bin/sh +set -e +if [ "" = "$CAF_WEB_SERVER" ]; then + CAFWEBSVR=10.25.57.32 + echo 'Using default CAFWEBSVR address' +fi +echo 'CAFWEBSVR='${CAFWEBSVR} +doxygen Doxyfile +ssh autodb@$CAFWEBSVR mkdir -p caf-downloads/doxy/communication/amqpIntegration +ssh autodb@$CAFWEBSVR rm -rf caf-downloads/doxy/communication/amqpIntegration/* +scp -r html/* autodb@$CAFWEBSVR:caf-downloads/doxy/communication/amqpIntegration diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/stdafx.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/stdafx.h new file mode 100644 index 000000000..d63cc1cf8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/stdafx.h @@ -0,0 +1,53 @@ +/* + * Created on: May 24, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#include +#include +#include "../../../amqpCore/src/amqpClient/api/amqpClient.h" +#include "../../../amqpCore/src/amqpCore/amqpIntegrationCoreLink.h" +#include "amqpIntegrationDefines.h" + +/** + * @defgroup IntObj Integration Objects + * Documentation for the Integration Objects that can be declare in an + * application context file. + *

+ * The #Caf::AmqpIntegration::CachingConnectionFactoryObj bean has it's own bean definition in the + * application context: + *

+ * \
+ * 
+ *

+ * All other integration objects are accessed through the IntegrationObjects bean: + *

+ * \
+ * 
+ */ + +/** + * @defgroup IntObjImpl Integration Object Implementation + * Documentation for the implementation of the integration objects. + *

+ * These classes and methods cannot be used directly by application code. + */ + +/** + * @mainpage + * The CAF AMQP Integration Library provides integration components that enable + * AMQP message channels, endpoints and gateways to be wired into integration-enabled + * applications. + */ + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessage.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessage.cpp new file mode 100644 index 000000000..03c609a6b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessage.cpp @@ -0,0 +1,913 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CCmsMessageUtils.h" +#include "CCmsMessage.h" +#include + +using namespace Caf; + +CCmsMessage::CCmsMessage() : + _isInitialized(false), + _cipher(NULL), + _checkCrlf(false), + CAF_CM_INIT_LOG("CCmsMessage") { +} + +CCmsMessage::~CCmsMessage() { +} + +void CCmsMessage::initialize( + const std::string& appId, + const std::string& pmeId) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(appId); + CAF_CM_VALIDATE_STRING(pmeId); + + SSL_library_init(); + SSL_load_error_strings(); + + _persistenceDir = AppConfigUtils::getRequiredString("persistence_dir"); + + const std::string locDir = getReqDirPath(_persistenceDir, "local"); + const std::string locPublicKeyPath = getReqFilePath(locDir, "cert.pem"); + const std::string locPrivateKeyPath = getReqFilePath(locDir, "privateKey.pem"); + + const std::string rmtCertsDir = getReqRmtCertsDir(appId, pmeId); + const std::string rmtPublicKeyPath = getReqFilePath(rmtCertsDir, "cmsCert.pem"); + const std::string rmtCmsCipherNamePath = getReqFilePath(rmtCertsDir, "cmsCipherName.txt"); + const std::string rmtCipherName = FileSystemUtils::loadTextFile(rmtCmsCipherNamePath); + + _caCertificatePaths = getReqFilePaths(rmtCertsDir, "cmsCertCollection"); + + _cipher = const_cast(EVP_get_cipherbyname(rmtCipherName.c_str())); + CAF_CM_VALIDATE_PTR(_cipher); + + _encryptPublicKeyPath = rmtPublicKeyPath; + _decryptPublicKeyPath = rmtPublicKeyPath; + _decryptPrivateKeyPath = locPrivateKeyPath; + _signPublicKeyPath = locPublicKeyPath; + _signPrivateKeyPath = locPrivateKeyPath; + + CAF_CM_LOG_DEBUG_VA1("Initializing - rmtCipherName: %s", rmtCipherName.c_str()); + CAF_CM_LOG_DEBUG_VA1("Initializing - encryptPublicKeyPath: %s", _encryptPublicKeyPath.c_str()); + CAF_CM_LOG_DEBUG_VA1("Initializing - decryptPublicKeyPath: %s", _decryptPublicKeyPath.c_str()); + CAF_CM_LOG_DEBUG_VA1("Initializing - decryptPrivateKeyPath: %s", _decryptPrivateKeyPath.c_str()); + CAF_CM_LOG_DEBUG_VA1("Initializing - signPublicKeyPath: %s", _signPublicKeyPath.c_str()); + CAF_CM_LOG_DEBUG_VA1("Initializing - signPrivateKeyPath: %s", _signPrivateKeyPath.c_str()); + CAF_CM_LOG_DEBUG_VA2("Initializing - caCertificatePath: %s, %s", rmtCertsDir.c_str(), "cmsCertCollection"); + + _checkCrlf = AppConfigUtils::getOptionalBoolean("security", "check_crlf"); + + _isInitialized = true; +} + +void CCmsMessage::signBufferToBuffer( + const SmartPtrCDynamicByteArray& inputBuffer, + SmartPtrCDynamicByteArray& outputBuffer) const { + CAF_CM_FUNCNAME_VALIDATE("signBufferToBuffer"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(inputBuffer); + + CAF_CM_LOG_DEBUG_VA1("%s", CAF_CM_GET_FUNCNAME); + + outputBuffer.CreateInstance(); + sign(inputBuffer, _nullPath, outputBuffer, _nullPath); +} + +void CCmsMessage::verifyBufferToBuffer( + const SmartPtrCDynamicByteArray& inputBuffer, + SmartPtrCDynamicByteArray& outputBuffer) const { + CAF_CM_FUNCNAME_VALIDATE("verifyBufferToBuffer"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(inputBuffer); + + CAF_CM_LOG_DEBUG_VA1("%s", CAF_CM_GET_FUNCNAME); + + outputBuffer.CreateInstance(); + verify(inputBuffer, _nullPath, outputBuffer, _nullPath); +} + +void CCmsMessage::encryptBufferToBuffer( + const SmartPtrCDynamicByteArray& inputBuffer, + SmartPtrCDynamicByteArray& outputBuffer) const { + CAF_CM_FUNCNAME_VALIDATE("encryptBufferToBuffer"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(inputBuffer); + + CAF_CM_LOG_DEBUG_VA1("%s", CAF_CM_GET_FUNCNAME); + + outputBuffer.CreateInstance(); + encrypt(inputBuffer, _nullPath, outputBuffer, _nullPath); +} + +void CCmsMessage::decryptBufferToBuffer( + const SmartPtrCDynamicByteArray& inputBuffer, + SmartPtrCDynamicByteArray& outputBuffer) const { + CAF_CM_FUNCNAME_VALIDATE("decryptBufferToBuffer"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(inputBuffer); + + CAF_CM_LOG_DEBUG_VA1("%s", CAF_CM_GET_FUNCNAME); + + outputBuffer.CreateInstance(); + decrypt(inputBuffer, _nullPath, outputBuffer, _nullPath); +} + +void CCmsMessage::compressBufferToBuffer( + const SmartPtrCDynamicByteArray& inputBuffer, + SmartPtrCDynamicByteArray& outputBuffer) const { + CAF_CM_FUNCNAME_VALIDATE("compressBufferToBuffer"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(inputBuffer); + + CAF_CM_LOG_DEBUG_VA1("%s", CAF_CM_GET_FUNCNAME); + + outputBuffer.CreateInstance(); + compress(inputBuffer, _nullPath, outputBuffer, _nullPath); +} + +void CCmsMessage::uncompressBufferToBuffer( + const SmartPtrCDynamicByteArray& inputBuffer, + SmartPtrCDynamicByteArray& outputBuffer) const { + CAF_CM_FUNCNAME_VALIDATE("uncompressBufferToBuffer"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(inputBuffer); + + CAF_CM_LOG_DEBUG_VA1("%s", CAF_CM_GET_FUNCNAME); + + outputBuffer.CreateInstance(); + uncompress(inputBuffer, _nullPath, outputBuffer, _nullPath); +} + +void CCmsMessage::signBufferToFile( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& outputPath) const { + CAF_CM_FUNCNAME_VALIDATE("signBufferToFile"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(inputBuffer); + CAF_CM_VALIDATE_STRING(outputPath); + + CAF_CM_LOG_DEBUG_VA2("%s - %s", CAF_CM_GET_FUNCNAME, outputPath.c_str()); + + SmartPtrCDynamicByteArray nullBuffer; + sign(inputBuffer, _nullPath, nullBuffer, outputPath); +} + +void CCmsMessage::verifyBufferToFile( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& outputPath) const { + CAF_CM_FUNCNAME_VALIDATE("verifyBufferToFile"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(inputBuffer); + CAF_CM_VALIDATE_STRING(outputPath); + + CAF_CM_LOG_DEBUG_VA2("%s - %s", CAF_CM_GET_FUNCNAME, outputPath.c_str()); + + SmartPtrCDynamicByteArray nullBuffer; + verify(inputBuffer, _nullPath, nullBuffer, outputPath); +} + +void CCmsMessage::encryptBufferToFile( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& outputPath) const { + CAF_CM_FUNCNAME_VALIDATE("encryptBufferToFile"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(inputBuffer); + CAF_CM_VALIDATE_STRING(outputPath); + + CAF_CM_LOG_DEBUG_VA2("%s - %s", CAF_CM_GET_FUNCNAME, outputPath.c_str()); + + SmartPtrCDynamicByteArray nullBuffer; + encrypt(inputBuffer, _nullPath, nullBuffer, outputPath); +} + +void CCmsMessage::decryptBufferToFile( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& outputPath) const { + CAF_CM_FUNCNAME_VALIDATE("decryptBufferToFile"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(inputBuffer); + CAF_CM_VALIDATE_STRING(outputPath); + + CAF_CM_LOG_DEBUG_VA2("%s - %s", CAF_CM_GET_FUNCNAME, outputPath.c_str()); + + SmartPtrCDynamicByteArray nullBuffer; + decrypt(inputBuffer, _nullPath, nullBuffer, outputPath); +} + +void CCmsMessage::compressBufferToFile( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& outputPath) const { + CAF_CM_FUNCNAME_VALIDATE("compressBufferToFile"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(inputBuffer); + CAF_CM_VALIDATE_STRING(outputPath); + + CAF_CM_LOG_DEBUG_VA2("%s - %s", CAF_CM_GET_FUNCNAME, outputPath.c_str()); + + SmartPtrCDynamicByteArray nullBuffer; + compress(inputBuffer, _nullPath, nullBuffer, outputPath); +} + +void CCmsMessage::uncompressBufferToFile( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& outputPath) const { + CAF_CM_FUNCNAME_VALIDATE("uncompressBufferToFile"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(inputBuffer); + CAF_CM_VALIDATE_STRING(outputPath); + + CAF_CM_LOG_DEBUG_VA2("%s - %s", CAF_CM_GET_FUNCNAME, outputPath.c_str()); + + SmartPtrCDynamicByteArray nullBuffer; + uncompress(inputBuffer, _nullPath, nullBuffer, outputPath); +} + +void CCmsMessage::signFileToBuffer( + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer) const { + CAF_CM_FUNCNAME_VALIDATE("signFileToBuffer"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(inputPath); + + CAF_CM_LOG_DEBUG_VA2("%s - %s", CAF_CM_GET_FUNCNAME, inputPath.c_str()); + + outputBuffer.CreateInstance(); + sign(_nullBuffer, inputPath, outputBuffer, _nullPath); +} + +void CCmsMessage::verifyFileToBuffer( + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer) const { + CAF_CM_FUNCNAME_VALIDATE("verifyFileToBuffer"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(inputPath); + + CAF_CM_LOG_DEBUG_VA2("%s - %s", CAF_CM_GET_FUNCNAME, inputPath.c_str()); + + outputBuffer.CreateInstance(); + verify(_nullBuffer, inputPath, outputBuffer, _nullPath); +} + +void CCmsMessage::encryptFileToBuffer( + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer) const { + CAF_CM_FUNCNAME_VALIDATE("encryptFileToBuffer"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(inputPath); + + CAF_CM_LOG_DEBUG_VA2("%s - %s", CAF_CM_GET_FUNCNAME, inputPath.c_str()); + + outputBuffer.CreateInstance(); + encrypt(_nullBuffer, inputPath, outputBuffer, _nullPath); +} + +void CCmsMessage::decryptFileToBuffer( + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer) const { + CAF_CM_FUNCNAME_VALIDATE("decryptFileToBuffer"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(inputPath); + + CAF_CM_LOG_DEBUG_VA2("%s - %s", CAF_CM_GET_FUNCNAME, inputPath.c_str()); + + outputBuffer.CreateInstance(); + decrypt(_nullBuffer, inputPath, outputBuffer, _nullPath); +} + +void CCmsMessage::compressFileToBuffer( + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer) const { + CAF_CM_FUNCNAME_VALIDATE("compressFileToBuffer"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(inputPath); + + CAF_CM_LOG_DEBUG_VA2("%s - %s", CAF_CM_GET_FUNCNAME, inputPath.c_str()); + + outputBuffer.CreateInstance(); + compress(_nullBuffer, inputPath, outputBuffer, _nullPath); +} + +void CCmsMessage::uncompressFileToBuffer( + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer) const { + CAF_CM_FUNCNAME_VALIDATE("uncompressFileToBuffer"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(inputPath); + + CAF_CM_LOG_DEBUG_VA2("%s - %s", CAF_CM_GET_FUNCNAME, inputPath.c_str()); + + outputBuffer.CreateInstance(); + uncompress(_nullBuffer, inputPath, outputBuffer, _nullPath); +} + +void CCmsMessage::signFileToFile( + const std::string& inputPath, + const std::string& outputPath) const { + CAF_CM_FUNCNAME_VALIDATE("signFileToFile"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(inputPath); + CAF_CM_VALIDATE_STRING(outputPath); + + CAF_CM_LOG_DEBUG_VA3("%s - %s, %s", CAF_CM_GET_FUNCNAME, inputPath.c_str(), + outputPath.c_str()); + + SmartPtrCDynamicByteArray nullBuffer; + sign(_nullBuffer, inputPath, nullBuffer, outputPath); +} + +void CCmsMessage::verifyFileToFile( + const std::string& inputPath, + const std::string& outputPath) const { + CAF_CM_FUNCNAME_VALIDATE("verifyFileToFile"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(inputPath); + CAF_CM_VALIDATE_STRING(outputPath); + + CAF_CM_LOG_DEBUG_VA3("%s - %s, %s", CAF_CM_GET_FUNCNAME, inputPath.c_str(), + outputPath.c_str()); + + SmartPtrCDynamicByteArray nullBuffer; + verify(_nullBuffer, inputPath, nullBuffer, outputPath); +} + +void CCmsMessage::encryptFileToFile( + const std::string& inputPath, + const std::string& outputPath) const { + CAF_CM_FUNCNAME_VALIDATE("encryptFileToFile"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(inputPath); + CAF_CM_VALIDATE_STRING(outputPath); + + CAF_CM_LOG_DEBUG_VA3("%s - %s, %s", CAF_CM_GET_FUNCNAME, inputPath.c_str(), + outputPath.c_str()); + + SmartPtrCDynamicByteArray nullBuffer; + encrypt(_nullBuffer, inputPath, nullBuffer, outputPath); +} + +void CCmsMessage::decryptFileToFile( + const std::string& inputPath, + const std::string& outputPath) const { + CAF_CM_FUNCNAME_VALIDATE("decryptFileToFile"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(inputPath); + CAF_CM_VALIDATE_STRING(outputPath); + + CAF_CM_LOG_DEBUG_VA3("%s - %s, %s", CAF_CM_GET_FUNCNAME, inputPath.c_str(), + outputPath.c_str()); + + SmartPtrCDynamicByteArray nullBuffer; + decrypt(_nullBuffer, inputPath, nullBuffer, outputPath); +} + +void CCmsMessage::compressFileToFile( + const std::string& inputPath, + const std::string& outputPath) const { + CAF_CM_FUNCNAME_VALIDATE("compressFileToFile"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(inputPath); + CAF_CM_VALIDATE_STRING(outputPath); + + CAF_CM_LOG_DEBUG_VA3("%s - %s, %s", CAF_CM_GET_FUNCNAME, inputPath.c_str(), + outputPath.c_str()); + + SmartPtrCDynamicByteArray nullBuffer; + compress(_nullBuffer, inputPath, nullBuffer, outputPath); +} + +void CCmsMessage::uncompressFileToFile( + const std::string& inputPath, + const std::string& outputPath) const { + CAF_CM_FUNCNAME_VALIDATE("uncompressFileToFile"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(inputPath); + CAF_CM_VALIDATE_STRING(outputPath); + + CAF_CM_LOG_DEBUG_VA3("%s - %s, %s", CAF_CM_GET_FUNCNAME, inputPath.c_str(), + outputPath.c_str()); + + SmartPtrCDynamicByteArray nullBuffer; + uncompress(_nullBuffer, inputPath, nullBuffer, outputPath); +} + +void CCmsMessage::sign( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer, + const std::string& outputPath) const { + CAF_CM_FUNCNAME("sign"); + + checkCrlf(CAF_CM_GET_FUNCNAME, "input", inputBuffer, inputPath); + + const uint32 flags = CMS_STREAM | CMS_BINARY; + + BIO* signPublicKeyBio = NULL; + BIO* signPrivateKeyBio = NULL; + X509* signPublicKey = NULL; + EVP_PKEY* signPrivateKey = NULL; + + BIO* outputBio = NULL; + BIO* inputBufferBio = NULL; + CMS_ContentInfo* contentInfo = NULL; + try { + signPublicKeyBio = CCmsMessageUtils::inputFileToBio(_signPublicKeyPath); + signPrivateKeyBio = CCmsMessageUtils::inputFileToBio(_signPrivateKeyPath); + + signPublicKey = CCmsMessageUtils::bioToX509(signPublicKeyBio); + // Casting to void to ignore return value and eliminate compiler warning + (void) BIO_reset(signPublicKeyBio); + signPrivateKey = CCmsMessageUtils::bioToPrivateKey(signPrivateKeyBio); + + inputBufferBio = CCmsMessageUtils::inputToBio(inputBuffer, inputPath); + + contentInfo = CMS_sign(signPublicKey, signPrivateKey, NULL, inputBufferBio, + flags); + if (! contentInfo) { + CCmsMessageUtils::logSslErrors(); + CAF_CM_EXCEPTION_VA0(E_FAIL, "CMS_sign Failed"); + } + + outputBio = CCmsMessageUtils::outputToBio(outputBuffer, outputPath); + + /* Write out S/MIME message */ + if (! SMIME_write_CMS(outputBio, contentInfo, inputBufferBio, flags)) { + CCmsMessageUtils::logSslErrors(); + CAF_CM_EXCEPTION_VA1(E_FAIL, + "SMIME_write_CMS Failed - %s", outputPath.c_str()); + } + + CCmsMessageUtils::bioToOutput(outputBio, outputBuffer, outputPath); + } + CAF_CM_CATCH_CAF + CAF_CM_CATCH_DEFAULT; + + CCmsMessageUtils::free(contentInfo); + CCmsMessageUtils::free(signPublicKey); + CCmsMessageUtils::free(signPrivateKey); + CCmsMessageUtils::free(inputBufferBio); + CCmsMessageUtils::free(outputBio); + CCmsMessageUtils::free(signPublicKeyBio); + CCmsMessageUtils::free(signPrivateKeyBio); + + CAF_CM_THROWEXCEPTION; + + checkCrlf(CAF_CM_GET_FUNCNAME, "output", outputBuffer, outputPath); +} + +void CCmsMessage::verify( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer, + const std::string& outputPath) const { + CAF_CM_FUNCNAME("verify"); + + checkCrlf(CAF_CM_GET_FUNCNAME, "input", inputBuffer, inputPath); + + std::deque caCertBios; + std::deque caCertX509s; + X509_STORE* caCertStore = NULL; + + BIO* inputBufferBio = NULL; + BIO* inputParsedBio = NULL; + BIO* outputBio = NULL; + CMS_ContentInfo* contentInfo = NULL; + try { + caCertBios = CCmsMessageUtils::inputFilesToBio(_caCertificatePaths); + caCertX509s = CCmsMessageUtils::biosToX509(caCertBios); + caCertStore = CCmsMessageUtils::createX509Store(caCertX509s); + + /* + * X509_STORE_free will free up recipient Store and its contents so set + * caCerts to NULL so it isn't freed up twice. + */ + caCertX509s.clear(); + + inputBufferBio = CCmsMessageUtils::inputToBio(inputBuffer, inputPath); + + /* parse message */ + contentInfo = SMIME_read_CMS(inputBufferBio, &inputParsedBio); + if (! contentInfo) { + CCmsMessageUtils::logSslErrors(); + CAF_CM_EXCEPTION_VA0(E_FAIL, "SMIME_read_CMS Failed"); + } + + outputBio = CCmsMessageUtils::outputToBio(outputBuffer, outputPath); + + if (! CMS_verify(contentInfo, NULL, caCertStore, inputParsedBio, outputBio, 0)) { + CCmsMessageUtils::logSslErrors(); + CAF_CM_EXCEPTION_VA0(E_FAIL, "CMS_verify Failed"); + } + + CCmsMessageUtils::bioToOutput(outputBio, outputBuffer, outputPath); + } + CAF_CM_CATCH_CAF + CAF_CM_CATCH_DEFAULT; + + CCmsMessageUtils::free(contentInfo); + CCmsMessageUtils::free(caCertX509s); + CCmsMessageUtils::free(caCertStore); + CCmsMessageUtils::free(inputBufferBio); + CCmsMessageUtils::free(outputBio); + CCmsMessageUtils::free(inputParsedBio); + CCmsMessageUtils::free(caCertBios); + + CAF_CM_THROWEXCEPTION; + + checkCrlf(CAF_CM_GET_FUNCNAME, "output", outputBuffer, outputPath); +} + +void CCmsMessage::encrypt( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer, + const std::string& outputPath) const { + CAF_CM_FUNCNAME("encrypt"); + + checkCrlf(CAF_CM_GET_FUNCNAME, "input", inputBuffer, inputPath); + + const uint32 flags = CMS_STREAM | CMS_BINARY; + + BIO* encryptPublicKeyBio = NULL; + X509* encryptPublicKey = NULL; + STACK_OF(X509)* encryptPublicKeyStack = NULL; + + BIO* outputBio = NULL; + BIO* inputBufferBio = NULL; + CMS_ContentInfo* contentInfo = NULL; + try { + encryptPublicKeyBio = CCmsMessageUtils::inputFileToBio(_encryptPublicKeyPath); + encryptPublicKey = CCmsMessageUtils::bioToX509(encryptPublicKeyBio); + encryptPublicKeyStack = CCmsMessageUtils::createX509Stack(encryptPublicKey); + + /* + * sk_X509_pop_free will CCmsMessageUtils::free up recipient STACK and its contents so set + * encryptPublicKey to NULL so it isn't freed up twice. + */ + encryptPublicKey = NULL; + + inputBufferBio = CCmsMessageUtils::inputToBio(inputBuffer, inputPath); + + /* encrypt content */ + contentInfo = CMS_encrypt(encryptPublicKeyStack, inputBufferBio, _cipher, flags); + if (! contentInfo) { + CCmsMessageUtils::logSslErrors(); + CAF_CM_EXCEPTION_VA0(E_FAIL, "CMS_encrypt Failed"); + } + + outputBio = CCmsMessageUtils::outputToBio(outputBuffer, outputPath); + + /* Write out S/MIME message */ + if (! SMIME_write_CMS(outputBio, contentInfo, inputBufferBio, flags)) { + CCmsMessageUtils::logSslErrors(); + CAF_CM_EXCEPTION_VA0(E_FAIL, "SMIME_write_CMS Failed"); + } + + CCmsMessageUtils::bioToOutput(outputBio, outputBuffer, outputPath); + } + CAF_CM_CATCH_CAF + CAF_CM_CATCH_DEFAULT; + + CCmsMessageUtils::free(contentInfo); + CCmsMessageUtils::free(encryptPublicKey); + CCmsMessageUtils::free(encryptPublicKeyStack); + CCmsMessageUtils::free(inputBufferBio); + CCmsMessageUtils::free(outputBio); + CCmsMessageUtils::free(encryptPublicKeyBio); + + CAF_CM_THROWEXCEPTION; + + checkCrlf(CAF_CM_GET_FUNCNAME, "output", outputBuffer, outputPath); +} + +void CCmsMessage::decrypt( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer, + const std::string& outputPath) const { + CAF_CM_FUNCNAME("decrypt"); + + checkCrlf(CAF_CM_GET_FUNCNAME, "input", inputBuffer, inputPath); + + BIO* decryptPublicKeyBio = NULL; + BIO* decryptPrivateKeyBio = NULL; + X509* decryptPublicKey = NULL; + EVP_PKEY* decryptPrivateKey = NULL; + + BIO* outputBio = NULL; + BIO* inputBufferBio = NULL; + CMS_ContentInfo* contentInfo = NULL; + try { + decryptPublicKeyBio = CCmsMessageUtils::inputFileToBio(_decryptPublicKeyPath); + decryptPrivateKeyBio = CCmsMessageUtils::inputFileToBio(_decryptPrivateKeyPath); + + decryptPublicKey = CCmsMessageUtils::bioToX509(decryptPublicKeyBio); + decryptPrivateKey = CCmsMessageUtils::bioToPrivateKey(decryptPrivateKeyBio); + + inputBufferBio = CCmsMessageUtils::inputToBio(inputBuffer, inputPath); + + contentInfo = SMIME_read_CMS(inputBufferBio, NULL); + if (! contentInfo) { + CCmsMessageUtils::logSslErrors(); + CAF_CM_EXCEPTION_VA0(E_FAIL, "SMIME_read_CMS Failed"); + } + + outputBio = CCmsMessageUtils::outputToBio(outputBuffer, outputPath); + + if (!CMS_decrypt(contentInfo, decryptPrivateKey, decryptPublicKey, + NULL, outputBio, 0)) { + CCmsMessageUtils::logSslErrors(); + CAF_CM_EXCEPTION_VA0(E_FAIL, "CMS_decrypt Failed"); + } + + CCmsMessageUtils::bioToOutput(outputBio, outputBuffer, outputPath); + } + CAF_CM_CATCH_CAF + CAF_CM_CATCH_DEFAULT; + + CCmsMessageUtils::free(contentInfo); + CCmsMessageUtils::free(decryptPublicKey); + CCmsMessageUtils::free(decryptPrivateKey); + CCmsMessageUtils::free(inputBufferBio); + CCmsMessageUtils::free(outputBio); + CCmsMessageUtils::free(decryptPublicKeyBio); + CCmsMessageUtils::free(decryptPrivateKeyBio); + + CAF_CM_THROWEXCEPTION; + + checkCrlf(CAF_CM_GET_FUNCNAME, "output", outputBuffer, outputPath); +} + +void CCmsMessage::compress( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer, + const std::string& outputPath) const { + CAF_CM_FUNCNAME("compress"); + + checkCrlf(CAF_CM_GET_FUNCNAME, "input", inputBuffer, inputPath); + + BIO* inputBufferBio = NULL; + BIO* outputBio = NULL; + CMS_ContentInfo* contentInfo = NULL; + try { + inputBufferBio = CCmsMessageUtils::inputToBio(inputBuffer, inputPath); + + /* parse message */ + contentInfo = CMS_compress(inputBufferBio, NID_zlib_compression, + CMS_STREAM | CMS_BINARY); + if (! contentInfo) { + CCmsMessageUtils::logSslErrors(); + CAF_CM_EXCEPTION_VA0(E_FAIL, "CMS_compress Failed"); + } + + outputBio = CCmsMessageUtils::outputToBio(outputBuffer, outputPath); + + /* Write out S/MIME message */ + if (! SMIME_write_CMS(outputBio, contentInfo, inputBufferBio, CMS_STREAM)) { + CCmsMessageUtils::logSslErrors(); + CAF_CM_EXCEPTION_VA0(E_FAIL, "SMIME_write_CMS Failed"); + } + + CCmsMessageUtils::bioToOutput(outputBio, outputBuffer, outputPath); + } + CAF_CM_CATCH_CAF + CAF_CM_CATCH_DEFAULT; + + CCmsMessageUtils::free(contentInfo); + CCmsMessageUtils::free(inputBufferBio); + CCmsMessageUtils::free(outputBio); + + CAF_CM_THROWEXCEPTION; + + checkCrlf(CAF_CM_GET_FUNCNAME, "output", outputBuffer, outputPath); +} + +void CCmsMessage::uncompress( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer, + const std::string& outputPath) const { + CAF_CM_FUNCNAME("uncompress"); + + checkCrlf(CAF_CM_GET_FUNCNAME, "input", inputBuffer, inputPath); + + BIO* inputBufferBio = NULL; + BIO* outputBio = NULL; + CMS_ContentInfo* contentInfo = NULL; + try { + inputBufferBio = CCmsMessageUtils::inputToBio(inputBuffer, inputPath); + + /* parse message */ + contentInfo = SMIME_read_CMS(inputBufferBio, NULL); + if (! contentInfo) { + CCmsMessageUtils::logSslErrors(); + CAF_CM_EXCEPTION_VA0(E_FAIL, "SMIME_read_CMS Failed"); + } + + outputBio = CCmsMessageUtils::outputToBio(outputBuffer, outputPath); + + if (! CMS_uncompress(contentInfo, outputBio, NULL, 0)) { + CCmsMessageUtils::logSslErrors(); + CAF_CM_EXCEPTION_VA0(E_FAIL, "CMS_uncompress Failed"); + } + + CCmsMessageUtils::bioToOutput(outputBio, outputBuffer, outputPath); + } + CAF_CM_CATCH_CAF + CAF_CM_CATCH_DEFAULT; + + CCmsMessageUtils::free(contentInfo); + CCmsMessageUtils::free(inputBufferBio); + CCmsMessageUtils::free(outputBio); + + CAF_CM_THROWEXCEPTION; + + checkCrlf(CAF_CM_GET_FUNCNAME, "output", outputBuffer, outputPath); +} + +void CCmsMessage::checkCrlf( + const std::string& funcName, + const std::string& direction, + const SmartPtrCDynamicByteArray& buffer, + const std::string& path) const { + CAF_CM_FUNCNAME("checkCrlf"); + CAF_CM_VALIDATE_STRING(funcName); + CAF_CM_VALIDATE_STRING(direction); + + if (_checkCrlf) { + if (! buffer.IsNull()) { + checkCrlf(funcName, direction, buffer); + } else if (! path.empty()) { + checkCrlf(funcName, direction, path); + } else { + CAF_CM_EXCEPTION_VA0(E_FAIL, "Must provide buffer or path"); + } + } +} + +void CCmsMessage::checkCrlf( + const std::string& funcName, + const std::string& direction, + const SmartPtrCDynamicByteArray& buffer) const { + CAF_CM_FUNCNAME("checkCrlf(buffer)"); + CAF_CM_VALIDATE_STRING(funcName); + CAF_CM_VALIDATE_STRING(direction); + CAF_CM_VALIDATE_SMARTPTR(buffer); + + bool isFnd = false; + for (uint32 i = 0; ! isFnd && (i < buffer->getElementCount()); i++) { + if (buffer->getAt(i) == '\r') { + CAF_CM_EXCEPTION_VA2(E_FAIL, "Found CRLF - func: %s, dir: %s", + funcName.c_str(), direction.c_str()); + } + } +} + +void CCmsMessage::checkCrlf( + const std::string& funcName, + const std::string& direction, + const std::string& path) const { + CAF_CM_FUNCNAME("checkCrlf(path)"); + CAF_CM_VALIDATE_STRING(funcName); + CAF_CM_VALIDATE_STRING(direction); + CAF_CM_VALIDATE_STRING(path); + + std::ifstream ifs(path.c_str()); + if(!ifs) { + CAF_CM_EXCEPTION_VA1(E_FAIL, "Failed to open file - %s", path.c_str()); + } + + std::istream::sentry se(ifs, true); + std::streambuf* sb = ifs.rdbuf(); + + char c = '\0'; + bool isFnd = false; + while (! isFnd && ! ifs.eof() && (c != EOF)) { + c = sb->sbumpc(); + if (c == '\r') { + CAF_CM_EXCEPTION_VA3(E_FAIL, "Found CRLF - func: %s, dir: %s, path: %s", + funcName.c_str(), direction.c_str(), path.c_str()); + } + } +} + +std::string CCmsMessage::getReqDirPath( + const std::string& directory, + const std::string& subdir, + const std::string& subdir1) const { + CAF_CM_FUNCNAME("getReqFilePath"); + CAF_CM_VALIDATE_STRING(directory); + CAF_CM_VALIDATE_STRING(subdir); + + std::string rc; + if (subdir1.empty()) { + rc = FileSystemUtils::buildPath(directory, subdir); + } else { + rc = FileSystemUtils::buildPath(directory, subdir, subdir1); + } + + if (! FileSystemUtils::doesDirectoryExist(rc)) { + CAF_CM_EXCEPTION_VA1(ERROR_FILE_NOT_FOUND, + "Directory does not exist - %s", rc.c_str()); + } + + return rc; +} + +std::string CCmsMessage::getReqFilePath( + const std::string& directory, + const std::string& filename) const { + CAF_CM_FUNCNAME("getReqFilePath"); + CAF_CM_VALIDATE_STRING(directory); + CAF_CM_VALIDATE_STRING(filename); + + const std::string rc = FileSystemUtils::buildPath(directory, filename); + if (! FileSystemUtils::doesFileExist(rc)) { + CAF_CM_EXCEPTION_VA1(ERROR_FILE_NOT_FOUND, + "File does not exist - %s", rc.c_str()); + } + + return rc; +} + +Cdeqstr CCmsMessage::getReqFilePaths( + const std::string& directory, + const std::string& subdir) const { + CAF_CM_FUNCNAME_VALIDATE("getReqFilePaths"); + CAF_CM_VALIDATE_STRING(directory); + CAF_CM_VALIDATE_STRING(subdir); + + const std::string dirPath = getReqDirPath(directory, subdir); + + FileSystemUtils::DirectoryItems dirItems = FileSystemUtils::itemsInDirectory( + dirPath, FileSystemUtils::REGEX_MATCH_ALL); + + Cdeqstr rc; + const FileSystemUtils::Files files = dirItems.files; + for (TConstIterator fileIter(files); fileIter; fileIter++) { + const std::string filename = *fileIter; + const std::string filePath = FileSystemUtils::buildPath( + dirPath, filename); + + rc.push_back(filePath); + } + + return rc; +} + +std::string CCmsMessage::getReqRmtCertsDir( + const std::string& appId, + const std::string& pmeId) const { + CAF_CM_FUNCNAME("getReqRmtCertsDir"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(appId); + CAF_CM_VALIDATE_STRING(pmeId); + + const std::string rmtCertsDir = getReqDirPath(_persistenceDir, "remote"); + const std::string pmeIdLower = CStringUtils::toLower(pmeId); + const std::string appIdLower = CStringUtils::toLower(appId); + const std::string pmeIdUpper = CStringUtils::toUpper(pmeId); + const std::string appIdUpper = CStringUtils::toUpper(appId); + + std::string rc; + std::string errDirs; + getExistingDir(rmtCertsDir, pmeIdLower, rc, errDirs); + getExistingDir(rmtCertsDir, appIdLower, rc, errDirs); + getExistingDir(rmtCertsDir, pmeIdUpper, rc, errDirs); + getExistingDir(rmtCertsDir, appIdUpper, rc, errDirs); + getExistingDir(rmtCertsDir, "remote_default", rc, errDirs); + + if (rc.empty()) { + CAF_CM_EXCEPTION_VA1(ERROR_FILE_NOT_FOUND, + "Remote directories do not exist - %s", errDirs.c_str()); + } + + return rc; +} + +void CCmsMessage::getExistingDir( + const std::string& parentDir, + const std::string& childDir, + std::string& result, + std::string& errDirs) const { + CAF_CM_FUNCNAME_VALIDATE("getExistingDir"); + CAF_CM_VALIDATE_STRING(parentDir); + CAF_CM_VALIDATE_STRING(childDir); + + if (result.empty()) { + const std::string finalDir = FileSystemUtils::buildPath(parentDir, childDir); + errDirs += finalDir + ", "; + if (FileSystemUtils::doesDirectoryExist(finalDir)) { + result = finalDir; + } + } +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessage.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessage.h new file mode 100644 index 000000000..1d470dccf --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessage.h @@ -0,0 +1,232 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CCmsMessage_h_ +#define CCmsMessage_h_ + +#include + +namespace Caf { + +class CCmsMessage { +public: + CCmsMessage(); + virtual ~CCmsMessage(); + +public: + void initialize( + const std::string& appId, + const std::string& pmeId); + +public: + void signBufferToBuffer( + const SmartPtrCDynamicByteArray& inputBuffer, + SmartPtrCDynamicByteArray& outputBuffer) const; + + void verifyBufferToBuffer( + const SmartPtrCDynamicByteArray& inputBuffer, + SmartPtrCDynamicByteArray& outputBuffer) const; + + void encryptBufferToBuffer( + const SmartPtrCDynamicByteArray& inputBuffer, + SmartPtrCDynamicByteArray& outputBuffer) const; + + void decryptBufferToBuffer( + const SmartPtrCDynamicByteArray& inputBuffer, + SmartPtrCDynamicByteArray& outputBuffer) const; + + void compressBufferToBuffer( + const SmartPtrCDynamicByteArray& inputBuffer, + SmartPtrCDynamicByteArray& outputBuffer) const; + + void uncompressBufferToBuffer( + const SmartPtrCDynamicByteArray& inputBuffer, + SmartPtrCDynamicByteArray& outputBuffer) const; + +public: + void signBufferToFile( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& outputPath) const; + + void verifyBufferToFile( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& outputPath) const; + + void encryptBufferToFile( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& outputPath) const; + + void decryptBufferToFile( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& outputPath) const; + + void compressBufferToFile( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& outputPath) const; + + void uncompressBufferToFile( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& outputPath) const; + +public: + void signFileToBuffer( + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer) const; + + void verifyFileToBuffer( + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer) const; + + void encryptFileToBuffer( + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer) const; + + void decryptFileToBuffer( + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer) const; + + void compressFileToBuffer( + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer) const; + + void uncompressFileToBuffer( + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer) const; + +public: + void signFileToFile( + const std::string& inputPath, + const std::string& outputPath) const; + + void verifyFileToFile( + const std::string& inputPath, + const std::string& outputPath) const; + + void encryptFileToFile( + const std::string& inputPath, + const std::string& outputPath) const; + + void decryptFileToFile( + const std::string& inputPath, + const std::string& outputPath) const; + + void compressFileToFile( + const std::string& inputPath, + const std::string& outputPath) const; + + void uncompressFileToFile( + const std::string& inputPath, + const std::string& outputPath) const; + +private: + void sign( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer, + const std::string& outputPath) const; + + void verify( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer, + const std::string& outputPath) const; + + void encrypt( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer, + const std::string& outputPath) const; + + void decrypt( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer, + const std::string& outputPath) const; + + void compress( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer, + const std::string& outputPath) const; + + void uncompress( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer, + const std::string& outputPath) const; + +private: + void checkCrlf( + const std::string& funcName, + const std::string& direction, + const SmartPtrCDynamicByteArray& buffer, + const std::string& path) const; + + void checkCrlf( + const std::string& funcName, + const std::string& direction, + const SmartPtrCDynamicByteArray& buffer) const; + + void checkCrlf( + const std::string& funcName, + const std::string& direction, + const std::string& path) const; + +private: + std::string getReqDirPath( + const std::string& directory, + const std::string& subdir, + const std::string& subdir1 = std::string()) const; + + std::string getReqFilePath( + const std::string& directory, + const std::string& filename) const; + + Cdeqstr getReqFilePaths( + const std::string& directory, + const std::string& subdir) const; + + std::string getReqRmtCertsDir( + const std::string& appId, + const std::string& pmeId) const; + + void getExistingDir( + const std::string& parentDir, + const std::string& childDir, + std::string& result, + std::string& errDirs) const; + +private: + bool _isInitialized; + + EVP_CIPHER* _cipher; + std::string _persistenceDir; + + std::string _nullPath; + SmartPtrCDynamicByteArray _nullBuffer; + + std::string _encryptPublicKeyPath; + std::string _decryptPublicKeyPath; + std::string _decryptPrivateKeyPath; + std::string _signPublicKeyPath; + std::string _signPrivateKeyPath; + Cdeqstr _caCertificatePaths; + + bool _checkCrlf; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CCmsMessage); +}; + +CAF_DECLARE_SMART_POINTER(CCmsMessage); + +} + +#endif // #ifndef CCmsMessage_h_ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageAttachments.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageAttachments.cpp new file mode 100644 index 000000000..5418b3e96 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageAttachments.cpp @@ -0,0 +1,370 @@ +/* + * Author: bwilliams + * Created: July 3, 2015 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CCmsMessageAttachments.h" + +using namespace Caf; + +CCmsMessageAttachments::CCmsMessageAttachments() : + _isInitialized(false), + CAF_CM_INIT_LOG("CCmsMessageAttachments") { +} + +CCmsMessageAttachments::~CCmsMessageAttachments() { +} + +void CCmsMessageAttachments::initialize( + const SmartPtrCCmsMessage& cmsMessage) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(cmsMessage); + + _cmsMessage = cmsMessage; + + _isInitialized = true; +} + +std::deque CCmsMessageAttachments::encryptAndSignAttachments( + const std::deque& sourceAttachmentCollection) const { + CAF_CM_FUNCNAME("encryptAndSignAttachments"); + // sourceAttachmentCollection is optional + + std::deque rc; + for (TConstIterator > sourceAttachmentIter(sourceAttachmentCollection); + sourceAttachmentIter; sourceAttachmentIter++) { + const SmartPtrCAttachmentDoc sourceAttachment = *sourceAttachmentIter; + + UriUtils::SUriRecord sourceUriRecord; + UriUtils::parseUriString(sourceAttachment->getUri(), sourceUriRecord); + + if ((sourceUriRecord.protocol.compare("file") == 0) + && !sourceAttachment->getIsReference()) { + UriUtils::SFileUriRecord sourceFileUriRecord; + UriUtils::parseFileAddress(sourceUriRecord.address, sourceFileUriRecord); + const std::string sourceAttachmentPath = sourceFileUriRecord.path; + + if (!FileSystemUtils::doesFileExist(sourceAttachmentPath)) { + CAF_CM_EXCEPTION_VA1(ERROR_FILE_NOT_FOUND, + "File not found - %s", sourceAttachmentPath.c_str()); + } + + const SmartPtrCAttachmentDoc destAttachment = encryptAndSignAttachment( + sourceAttachmentPath, sourceAttachment, sourceUriRecord.parameters); + + rc.push_back(destAttachment); + } else { + rc.push_back(sourceAttachment); + } + } + + return rc; +} + +void CCmsMessageAttachments::enforceSecurityOnAttachments( + const std::deque& attachmentCollection, + const bool isSigningEnforced, + const bool isEncryptionEnforced) const { + CAF_CM_FUNCNAME("enforceSecurityOnAttachments"); + + for (TConstIterator > attachmentIter(attachmentCollection); + attachmentIter; attachmentIter++) { + const SmartPtrCAttachmentDoc attachment = *attachmentIter; + + const CMS_POLICY cmsPolicy = attachment->getCmsPolicy(); + switch(cmsPolicy) { + case CMS_POLICY_NONE: + enforceSigning(isSigningEnforced, attachment); + enforceEncryption(isEncryptionEnforced, attachment); + break; + case CMS_POLICY_CAF_ENCRYPTED: + enforceSigning(isSigningEnforced, attachment); + break; + case CMS_POLICY_CAF_SIGNED: + enforceEncryption(isEncryptionEnforced, attachment); + break; + case CMS_POLICY_APP_ENCRYPTED: + enforceSigning(isSigningEnforced, attachment); + break; + case CMS_POLICY_APP_SIGNED: + enforceEncryption(isEncryptionEnforced, attachment); + break; + case CMS_POLICY_CAF_ENCRYPTED_AND_SIGNED: + case CMS_POLICY_APP_ENCRYPTED_AND_SIGNED: + break; + default: + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Unknown CMS Policy - %d", static_cast(cmsPolicy)); + } + } +} + +SmartPtrCAttachmentDoc CCmsMessageAttachments::encryptAndSignAttachment( + const std::string& sourceAttachmentPath, + const SmartPtrCAttachmentDoc& sourceAttachment, + const std::map& uriParameters) const { + CAF_CM_FUNCNAME("encryptAndSignAttachment"); + CAF_CM_VALIDATE_STRING(sourceAttachmentPath); + CAF_CM_VALIDATE_SMARTPTR(sourceAttachment); + + SmartPtrCAttachmentDoc destAttachment = sourceAttachment; + + std::string destAttachmentPath; + std::string sourceAttachmentPathTmp = sourceAttachmentPath; + SmartPtrCAttachmentDoc sourceAttachmentTmp = sourceAttachment; + + const CMS_POLICY cmsPolicy = sourceAttachmentTmp->getCmsPolicy(); + switch(cmsPolicy) { + case CMS_POLICY_CAF_ENCRYPTED: + encryptAttachment(sourceAttachmentPathTmp, sourceAttachmentTmp, + uriParameters, destAttachmentPath, destAttachment); + break; + case CMS_POLICY_CAF_SIGNED: + signAttachment(sourceAttachmentPathTmp, sourceAttachmentTmp, + uriParameters, destAttachmentPath, destAttachment); + break; + case CMS_POLICY_CAF_ENCRYPTED_AND_SIGNED: + encryptAttachment(sourceAttachmentPathTmp, sourceAttachmentTmp, + uriParameters, destAttachmentPath, destAttachment); + + sourceAttachmentPathTmp = destAttachmentPath; + sourceAttachmentTmp = destAttachment; + + signAttachment(sourceAttachmentPathTmp, sourceAttachmentTmp, + uriParameters, destAttachmentPath, destAttachment); + break; + case CMS_POLICY_NONE: + case CMS_POLICY_APP_ENCRYPTED: + case CMS_POLICY_APP_SIGNED: + case CMS_POLICY_APP_ENCRYPTED_AND_SIGNED: + CAF_CM_LOG_DEBUG_VA1("Passthrough CMS Policy - %s", + EnumConvertersXml::convertCmsPolicyToString(cmsPolicy).c_str()) + break; + default: + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Unknown CMS Policy - %d", static_cast(cmsPolicy)); + } + + return destAttachment; +} + +std::deque CCmsMessageAttachments::decryptAndVerifyAttachments( + const std::deque& sourceAttachmentCollection) const { + CAF_CM_FUNCNAME("decryptAndVerifyAttachments"); + // sourceAttachmentCollection is optional + + std::deque rc; + for (TConstIterator > sourceAttachmentIter(sourceAttachmentCollection); + sourceAttachmentIter; sourceAttachmentIter++) { + const SmartPtrCAttachmentDoc sourceAttachment = *sourceAttachmentIter; + + UriUtils::SUriRecord sourceUriRecord; + UriUtils::parseUriString(sourceAttachment->getUri(), sourceUriRecord); + + if ((sourceUriRecord.protocol.compare("file") == 0) + && !sourceAttachment->getIsReference()) { + UriUtils::SFileUriRecord sourceFileUriRecord; + UriUtils::parseFileAddress(sourceUriRecord.address, sourceFileUriRecord); + const std::string sourceAttachmentPath = sourceFileUriRecord.path; + + if (!FileSystemUtils::doesFileExist(sourceAttachmentPath)) { + CAF_CM_EXCEPTION_VA1(ERROR_FILE_NOT_FOUND, + "File not found - %s", sourceAttachmentPath.c_str()); + } + + const SmartPtrCAttachmentDoc destAttachment = decryptAndVerifyAttachment( + sourceAttachmentPath, sourceAttachment, sourceUriRecord.parameters); + + rc.push_back(destAttachment); + } else { + rc.push_back(sourceAttachment); + } + } + + return rc; +} + +SmartPtrCAttachmentDoc CCmsMessageAttachments::decryptAndVerifyAttachment( + const std::string& sourceAttachmentPath, + const SmartPtrCAttachmentDoc& sourceAttachment, + const std::map& uriParameters) const { + CAF_CM_FUNCNAME("decryptAndVerifyAttachment"); + CAF_CM_VALIDATE_STRING(sourceAttachmentPath); + CAF_CM_VALIDATE_SMARTPTR(sourceAttachment); + + SmartPtrCAttachmentDoc destAttachment = sourceAttachment; + + std::string destAttachmentPath; + std::string sourceAttachmentPathTmp = sourceAttachmentPath; + SmartPtrCAttachmentDoc sourceAttachmentTmp = sourceAttachment; + + const CMS_POLICY cmsPolicy = sourceAttachmentTmp->getCmsPolicy(); + switch(cmsPolicy) { + case CMS_POLICY_CAF_ENCRYPTED: + decryptAttachment(sourceAttachmentPathTmp, sourceAttachmentTmp, + uriParameters, destAttachmentPath, destAttachment); + break; + case CMS_POLICY_CAF_SIGNED: + verifyAttachment(sourceAttachmentPathTmp, sourceAttachmentTmp, + uriParameters, destAttachmentPath, destAttachment); + break; + case CMS_POLICY_CAF_ENCRYPTED_AND_SIGNED: + verifyAttachment(sourceAttachmentPathTmp, sourceAttachmentTmp, + uriParameters, destAttachmentPath, destAttachment); + + sourceAttachmentPathTmp = destAttachmentPath; + sourceAttachmentTmp = destAttachment; + + decryptAttachment(sourceAttachmentPathTmp, sourceAttachmentTmp, + uriParameters, destAttachmentPath, destAttachment); + break; + case CMS_POLICY_NONE: + case CMS_POLICY_APP_ENCRYPTED: + case CMS_POLICY_APP_SIGNED: + case CMS_POLICY_APP_ENCRYPTED_AND_SIGNED: + CAF_CM_LOG_DEBUG_VA1("Passthrough CMS Policy - %s", + EnumConvertersXml::convertCmsPolicyToString(cmsPolicy).c_str()) + break; + default: + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Unknown CMS Policy - %d", static_cast(cmsPolicy)); + } + + return destAttachment; +} + +void CCmsMessageAttachments::signAttachment( + const std::string& sourceAttachmentPath, + const SmartPtrCAttachmentDoc& sourceAttachment, + const std::map& uriParameters, + std::string& destAttachmentPath, + SmartPtrCAttachmentDoc& destAttachment) const { + CAF_CM_FUNCNAME_VALIDATE("signAttachment"); + CAF_CM_VALIDATE_STRING(sourceAttachmentPath); + CAF_CM_VALIDATE_SMARTPTR(sourceAttachment); + + destAttachmentPath = sourceAttachmentPath + "_signed"; + _cmsMessage->signFileToFile(sourceAttachmentPath, destAttachmentPath); + + const std::string attachmentUri = UriUtils::appendParameters( + destAttachmentPath, uriParameters); + + destAttachment.CreateInstance(); + destAttachment->initialize(sourceAttachment->getName(), sourceAttachment->getType(), + "file:///" + attachmentUri, sourceAttachment->getIsReference(), + sourceAttachment->getCmsPolicy()); +} + +void CCmsMessageAttachments::verifyAttachment( + const std::string& sourceAttachmentPath, + const SmartPtrCAttachmentDoc& sourceAttachment, + const std::map& uriParameters, + std::string& destAttachmentPath, + SmartPtrCAttachmentDoc& destAttachment) const { + CAF_CM_FUNCNAME_VALIDATE("verifyAttachment"); + CAF_CM_VALIDATE_STRING(sourceAttachmentPath); + CAF_CM_VALIDATE_SMARTPTR(sourceAttachment); + + destAttachmentPath = sourceAttachmentPath + "_verified"; + removeStr(destAttachmentPath, "_signed"); + + _cmsMessage->verifyFileToFile(sourceAttachmentPath, destAttachmentPath); + + const std::string attachmentUri = UriUtils::appendParameters( + destAttachmentPath, uriParameters); + + destAttachment.CreateInstance(); + destAttachment->initialize(sourceAttachment->getName(), sourceAttachment->getType(), + "file:///" + attachmentUri, sourceAttachment->getIsReference(), + sourceAttachment->getCmsPolicy()); +} + +void CCmsMessageAttachments::encryptAttachment( + const std::string& sourceAttachmentPath, + const SmartPtrCAttachmentDoc& sourceAttachment, + const std::map& uriParameters, + std::string& destAttachmentPath, + SmartPtrCAttachmentDoc& destAttachment) const { + CAF_CM_FUNCNAME_VALIDATE("encryptAttachment"); + CAF_CM_VALIDATE_STRING(sourceAttachmentPath); + CAF_CM_VALIDATE_SMARTPTR(sourceAttachment); + + destAttachmentPath = sourceAttachmentPath + "_encrypted"; + _cmsMessage->encryptFileToFile(sourceAttachmentPath, destAttachmentPath); + + const std::string attachmentUri = UriUtils::appendParameters( + destAttachmentPath, uriParameters); + + destAttachment.CreateInstance(); + destAttachment->initialize(sourceAttachment->getName(), sourceAttachment->getType(), + "file:///" + attachmentUri, sourceAttachment->getIsReference(), + sourceAttachment->getCmsPolicy()); +} + +void CCmsMessageAttachments::decryptAttachment( + const std::string& sourceAttachmentPath, + const SmartPtrCAttachmentDoc& sourceAttachment, + const std::map& uriParameters, + std::string& destAttachmentPath, + SmartPtrCAttachmentDoc& destAttachment) const { + CAF_CM_FUNCNAME_VALIDATE("decryptAttachment"); + CAF_CM_VALIDATE_STRING(sourceAttachmentPath); + CAF_CM_VALIDATE_SMARTPTR(sourceAttachment); + + destAttachmentPath = sourceAttachmentPath + "_decrypted"; + removeStr(destAttachmentPath, "_encrypted"); + + _cmsMessage->decryptFileToFile(sourceAttachmentPath, destAttachmentPath); + + const std::string attachmentUri = UriUtils::appendParameters( + destAttachmentPath, uriParameters); + + destAttachment.CreateInstance(); + destAttachment->initialize(sourceAttachment->getName(), sourceAttachment->getType(), + "file:///" + attachmentUri, sourceAttachment->getIsReference(), + sourceAttachment->getCmsPolicy()); +} + +void CCmsMessageAttachments::removeStr( + std::string& sourceStr, + const std::string& strToRemove) const { + CAF_CM_FUNCNAME_VALIDATE("removeStr"); + CAF_CM_VALIDATE_STRING(sourceStr); + CAF_CM_VALIDATE_STRING(strToRemove); + + const size_t index = sourceStr.find(strToRemove); + if (index != std::string::npos) { + sourceStr.erase(index, strToRemove.length()); + } +} + +void CCmsMessageAttachments::enforceSigning( + const bool isSigningEnforced, + const SmartPtrCAttachmentDoc& attachment) const { + CAF_CM_FUNCNAME("enforceSigning"); + CAF_CM_VALIDATE_SMARTPTR(attachment); + + if (isSigningEnforced) { + CAF_CM_EXCEPTION_VA2(E_FAIL, + "Attachment must be signed - name: %s, uri: %s", + attachment->getName().c_str(), attachment->getUri().c_str()); + } +} + +void CCmsMessageAttachments::enforceEncryption( + const bool isEncryptionEnforced, + const SmartPtrCAttachmentDoc& attachment) const { + CAF_CM_FUNCNAME("enforceEncryption"); + CAF_CM_VALIDATE_SMARTPTR(attachment); + + if (isEncryptionEnforced) { + CAF_CM_EXCEPTION_VA2(E_FAIL, + "Attachment must be encrypted - name: %s, uri: %s", + attachment->getName().c_str(), attachment->getUri().c_str()); + } +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageAttachments.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageAttachments.h new file mode 100644 index 000000000..3e8c15c16 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageAttachments.h @@ -0,0 +1,104 @@ +/* + * Author: bwilliams + * Created: July 3, 2015 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CCmsMessageAttachments_h_ +#define CCmsMessageAttachments_h_ + +#include "CCmsMessage.h" + +namespace Caf { + +class CCmsMessageAttachments { +public: + CCmsMessageAttachments(); + virtual ~CCmsMessageAttachments(); + +public: + void initialize( + const SmartPtrCCmsMessage& cmsMessage); + +public: + void enforceSecurityOnAttachments( + const std::deque& attachmentCollection, + const bool isSigningEnforced, + const bool isEncryptionEnforced) const; + + std::deque encryptAndSignAttachments( + const std::deque& sourceAttachmentCollection) const; + + SmartPtrCAttachmentDoc encryptAndSignAttachment( + const std::string& sourceAttachmentPath, + const SmartPtrCAttachmentDoc& sourceAttachment, + const std::map& uriParameters = std::map()) const; + + std::deque decryptAndVerifyAttachments( + const std::deque& sourceAttachmentCollection) const; + + SmartPtrCAttachmentDoc decryptAndVerifyAttachment( + const std::string& sourceAttachmentPath, + const SmartPtrCAttachmentDoc& sourceAttachment, + const std::map& uriParameters) const; + +private: + void signAttachment( + const std::string& sourceAttachmentPath, + const SmartPtrCAttachmentDoc& sourceAttachment, + const std::map& uriParameters, + std::string& destAttachmentPath, + SmartPtrCAttachmentDoc& destAttachment) const; + + void verifyAttachment( + const std::string& sourceAttachmentPath, + const SmartPtrCAttachmentDoc& sourceAttachment, + const std::map& uriParameters, + std::string& destAttachmentPath, + SmartPtrCAttachmentDoc& destAttachment) const; + + void encryptAttachment( + const std::string& sourceAttachmentPath, + const SmartPtrCAttachmentDoc& sourceAttachment, + const std::map& uriParameters, + std::string& destAttachmentPath, + SmartPtrCAttachmentDoc& destAttachment) const; + + void decryptAttachment( + const std::string& sourceAttachmentPath, + const SmartPtrCAttachmentDoc& sourceAttachment, + const std::map& uriParameters, + std::string& destAttachmentPath, + SmartPtrCAttachmentDoc& destAttachment) const; + +private: + void removeStr( + std::string& sourceStr, + const std::string& strToRemove) const; + + void enforceSigning( + const bool isSigningEnforced, + const SmartPtrCAttachmentDoc& attachment) const; + + void enforceEncryption( + const bool isEncryptionEnforced, + const SmartPtrCAttachmentDoc& attachment) const; + +private: + bool _isInitialized; + + SmartPtrCCmsMessage _cmsMessage; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CCmsMessageAttachments); +}; + +CAF_DECLARE_SMART_POINTER(CCmsMessageAttachments); + +} + +#endif // #ifndef CCmsMessageAttachments_h_ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageTransformer.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageTransformer.cpp new file mode 100644 index 000000000..9d2110262 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageTransformer.cpp @@ -0,0 +1,63 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CCmsMessageTransformer.h" + +using namespace Caf; + +CCmsMessageTransformer::CCmsMessageTransformer() : + _isInitialized(false), + CAF_CM_INIT("CCmsMessageTransformer") { +} + +CCmsMessageTransformer::~CCmsMessageTransformer() { +} + +void CCmsMessageTransformer::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + + _ctorArgs = ctorArgs; + _properties = properties; + initialize(); +} + +void CCmsMessageTransformer::terminateBean() { +} + +void CCmsMessageTransformer::initialize() { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _isInitialized = true; +} + +bool CCmsMessageTransformer::isResponsible( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("isResponsible"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + return false; +} + +SmartPtrIIntegrationObject CCmsMessageTransformer::createObject( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("createObject"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + SmartPtrIIntegrationObject rc; + rc.CreateInstance(_sObjIdCommIntegrationCmsMessageTransformerInstance); + rc->initialize(_ctorArgs, _properties, configSection); + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageTransformer.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageTransformer.h new file mode 100644 index 000000000..4bc3e54d7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageTransformer.h @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CCmsMessageTransformer_h_ +#define CCmsMessageTransformer_h_ + +namespace Caf { + +/// Sends responses/errors back to the client. +class CCmsMessageTransformer : + public TCafSubSystemObjectRoot, + public IBean, + public IIntegrationComponent { +public: + CCmsMessageTransformer(); + virtual ~CCmsMessageTransformer(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdCommIntegrationCmsMessageTransformer) + + CAF_BEGIN_INTERFACE_MAP(CCmsMessageTransformer) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IIntegrationComponent) + CAF_END_INTERFACE_MAP() + +public: + virtual void initialize(); + +public: // IBean + virtual void initializeBean(const IBean::Cargs& ctorArgs, const IBean::Cprops& properties); + + virtual void terminateBean(); + +public: // IIntegrationComponent + bool isResponsible( + const SmartPtrIDocument& configSection) const; + + SmartPtrIIntegrationObject createObject( + const SmartPtrIDocument& configSection) const; + +private: + bool _isInitialized; + IBean::Cargs _ctorArgs; + IBean::Cprops _properties; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CCmsMessageTransformer); +}; + +} + +#endif // #ifndef CCmsMessageTransformer_h_ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageTransformerInstance.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageTransformerInstance.cpp new file mode 100644 index 000000000..8a70b3f4d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageTransformerInstance.cpp @@ -0,0 +1,140 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CCmsMessageTransformerInstance.h" + +using namespace Caf; + +CCmsMessageTransformerInstance::CCmsMessageTransformerInstance() : + _isInitialized(false), + _isSigningEnforced(true), + _isEncryptionEnforced(true), + CAF_CM_INIT("CCmsMessageTransformerInstance") { +} + +CCmsMessageTransformerInstance::~CCmsMessageTransformerInstance() { +} + +void CCmsMessageTransformerInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + const SmartPtrCBeanPropertiesHelper beanProperties = + CBeanPropertiesHelper::create(properties); + + _id = configSection->findRequiredAttribute("id"); + const std::string cmsPolicyStr = beanProperties->getRequiredString("cmsPolicy"); + + _isSigningEnforced = beanProperties->getRequiredBool("isSigningEnforced"); + _isEncryptionEnforced = beanProperties->getRequiredBool("isEncryptionEnforced"); + + _workingDirectory = AppConfigUtils::getRequiredString("communication_amqp", + _sConfigWorkingDir); + + _isInitialized = true; +} + +std::string CCmsMessageTransformerInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _id; +} + +void CCmsMessageTransformerInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); +} + +SmartPtrIIntMessage CCmsMessageTransformerInstance::transformMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME("transformMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(message); + + SmartPtrCCafMessageHeaders cafMessageHeaders = + CCafMessageHeaders::create(message->getHeaders()); + const std::string msgFlow = cafMessageHeaders->getFlowDirection(); + + const SmartPtrCPayloadEnvelopeDoc payloadEnvelope = + CCafMessagePayloadParser::getPayloadEnvelope(message->getPayload()); + + SmartPtrCCmsMessage cmsMessage; + cmsMessage.CreateInstance(); + cmsMessage->initialize( + BasePlatform::UuidToString(payloadEnvelope->getClientId()), + payloadEnvelope->getPmeId()); + + SmartPtrCCmsMessageAttachments cmsMessageAttachments; + cmsMessageAttachments.CreateInstance(); + cmsMessageAttachments->initialize(cmsMessage); + + SmartPtrIIntMessage rc; + if (msgFlow.compare("OUTGOING") == 0) { + rc = createOutgoingPayload(message->getHeaders(), payloadEnvelope, cmsMessageAttachments); + } else if (msgFlow.compare("INCOMING") == 0) { + rc = createIncomingPayload(message->getHeaders(), payloadEnvelope, cmsMessageAttachments); + } else { + CAF_CM_EXCEPTION_VA1(E_FAIL, + "Invalid msgflow header value: %s", msgFlow.c_str()); + } + + return rc; +} + +SmartPtrIIntMessage CCmsMessageTransformerInstance::createOutgoingPayload( + const IIntMessage::SmartPtrCHeaders& headers, + const SmartPtrCPayloadEnvelopeDoc& payloadEnvelope, + const SmartPtrCCmsMessageAttachments& cmsMessageAttachments) const { + CAF_CM_FUNCNAME_VALIDATE("createOutgoingPayload"); + CAF_CM_VALIDATE_SMARTPTR(headers); + CAF_CM_VALIDATE_SMARTPTR(payloadEnvelope); + CAF_CM_VALIDATE_SMARTPTR(cmsMessageAttachments); + + const std::deque attachmentCollection = + payloadEnvelope->getAttachmentCollection()->getAttachment(); + const std::deque attachmentCollectionCms = + cmsMessageAttachments->encryptAndSignAttachments(attachmentCollection); + + return CCafMessageCreator::createPayloadEnvelope( + payloadEnvelope, attachmentCollectionCms, headers); +} + +SmartPtrIIntMessage CCmsMessageTransformerInstance::createIncomingPayload( + const IIntMessage::SmartPtrCHeaders& headers, + const SmartPtrCPayloadEnvelopeDoc& payloadEnvelope, + const SmartPtrCCmsMessageAttachments& cmsMessageAttachments) const { + CAF_CM_FUNCNAME_VALIDATE("createIncomingPayload"); + CAF_CM_VALIDATE_SMARTPTR(headers); + CAF_CM_VALIDATE_SMARTPTR(payloadEnvelope); + CAF_CM_VALIDATE_SMARTPTR(cmsMessageAttachments); + + // Get the attachment collection out of the payload. + const std::deque attachmentCollectionCms = + payloadEnvelope->getAttachmentCollection()->getAttachment(); + + // Make sure the attachments meet the minimum security bar. + cmsMessageAttachments->enforceSecurityOnAttachments(attachmentCollectionCms, + _isSigningEnforced, _isEncryptionEnforced); + + // Decrypt/verify the attachments. + const std::deque attachmentCollection = + cmsMessageAttachments->decryptAndVerifyAttachments(attachmentCollectionCms); + + return CCafMessageCreator::createPayloadEnvelope( + payloadEnvelope, attachmentCollection, headers); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageTransformerInstance.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageTransformerInstance.h new file mode 100644 index 000000000..19e92e5ea --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageTransformerInstance.h @@ -0,0 +1,76 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CCmsMessageTransformerInstance_h_ +#define CCmsMessageTransformerInstance_h_ + +#include + +namespace Caf { + +class CCmsMessageTransformerInstance : + public TCafSubSystemObjectRoot, + public IIntegrationObject, + public IIntegrationComponentInstance, + public ITransformer { +public: + CCmsMessageTransformerInstance(); + virtual ~CCmsMessageTransformerInstance(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdCommIntegrationCmsMessageTransformerInstance) + + CAF_BEGIN_INTERFACE_MAP(CCmsMessageTransformerInstance) + CAF_INTERFACE_ENTRY(IIntegrationObject) + CAF_INTERFACE_ENTRY(IIntegrationComponentInstance) + CAF_INTERFACE_ENTRY(ITransformer) + CAF_END_INTERFACE_MAP() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ITransformer + SmartPtrIIntMessage transformMessage( + const SmartPtrIIntMessage& message); + +private: + SmartPtrIIntMessage createOutgoingPayload( + const IIntMessage::SmartPtrCHeaders& headers, + const SmartPtrCPayloadEnvelopeDoc& payloadEnvelope, + const SmartPtrCCmsMessageAttachments& cmsMessageAttachments) const; + + SmartPtrIIntMessage createIncomingPayload( + const IIntMessage::SmartPtrCHeaders& headers, + const SmartPtrCPayloadEnvelopeDoc& payloadEnvelope, + const SmartPtrCCmsMessageAttachments& cmsMessageAttachments) const; + +private: + bool _isInitialized; + std::string _id; + + std::string _workingDirectory; + bool _isSigningEnforced; + bool _isEncryptionEnforced; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CCmsMessageTransformerInstance); +}; + +} + +#endif // #ifndef CCmsMessageTransformerInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageUtils.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageUtils.cpp new file mode 100644 index 000000000..09d3a5875 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageUtils.cpp @@ -0,0 +1,371 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CCmsMessageUtils.h" + +using namespace Caf; + +BIO* CCmsMessageUtils::inputBufferToBio( + const SmartPtrCDynamicByteArray& inputBuffer) { + CAF_CM_STATIC_FUNC("CCmsMessageUtils", "inputBufferToBio"); + CAF_CM_VALIDATE_SMARTPTR(inputBuffer); + + BIO* rc = BIO_new_mem_buf( + inputBuffer->getNonConstPtr(), static_cast(inputBuffer->getByteCount())); + if (! rc) { + logSslErrors(); + CAF_CM_EXCEPTION_VA0(E_FAIL, "BIO_new_mem_buf Failed"); + } + + return rc; +} + +std::deque CCmsMessageUtils::inputFilesToBio( + const Cdeqstr& inputFileCollection) { + CAF_CM_STATIC_FUNC_VALIDATE("CCmsMessageUtils", "inputFilesToBio"); + CAF_CM_VALIDATE_STL(inputFileCollection); + + std::deque rc; + for (TConstIterator elemIter(inputFileCollection); elemIter; elemIter++) { + const std::string elem = *elemIter; + rc.push_back(inputFileToBio(elem)); + } + + return rc; +} + +BIO* CCmsMessageUtils::inputFileToBio( + const std::string& inputFile) { + CAF_CM_STATIC_FUNC("CCmsMessageUtils", "inputFileToBio"); + CAF_CM_VALIDATE_STRING(inputFile); + + BIO* rc = BIO_new_file(inputFile.c_str(), "r"); + if (! rc) { + logSslErrors(); + CAF_CM_EXCEPTION_VA1(E_FAIL, + "BIO_new_file Failed - %s", inputFile.c_str()); + } + + return rc; +} + +BIO* CCmsMessageUtils::inputToBio( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& inputPath) { + CAF_CM_STATIC_FUNC("CCmsMessageUtils", "inputToBio"); + + BIO* rc = NULL; + if (! inputBuffer.IsNull()) { + rc = inputBufferToBio(inputBuffer); + } else if (! inputPath.empty()) { + rc = inputFileToBio(inputPath); + } else { + CAF_CM_EXCEPTION_VA0(E_FAIL, "Must provide buffer or filename"); + } + + return rc; +} + +BIO* CCmsMessageUtils::outputPathToBio( + const std::string& outputPath) { + CAF_CM_STATIC_FUNC("CCmsMessageUtils", "outputPathToBio"); + CAF_CM_VALIDATE_STRING(outputPath); + + BIO* rc = BIO_new_file(outputPath.c_str(), "w"); + if (! rc) { + logSslErrors(); + CAF_CM_EXCEPTION_VA1(E_FAIL, + "BIO_new_file Failed - %s", outputPath.c_str()); + } + + return rc; +} + +BIO* CCmsMessageUtils::outputToBio( + const SmartPtrCDynamicByteArray& outputBuffer, + const std::string& outputPath) { + CAF_CM_STATIC_FUNC("CCmsMessageUtils", "outputToBio"); + + BIO* rc = NULL; + if (! outputBuffer.IsNull()) { + rc = createWriteBio(); + } else if (! outputPath.empty()) { + rc = outputPathToBio(outputPath); + } else { + CAF_CM_EXCEPTION_VA0(E_FAIL, "Must provide buffer or filename"); + } + + return rc; +} + +void CCmsMessageUtils::bioToOutput( + BIO* bio, + SmartPtrCDynamicByteArray& outputBuffer, + const std::string& outputPath) { + CAF_CM_STATIC_FUNC("CCmsMessageUtils", "bioToOutput"); + CAF_CM_VALIDATE_PTR(bio); + + if (! outputBuffer.IsNull()) { + bioToOutputBuffer(bio, outputBuffer); + } else if (! outputPath.empty()) { + bioToOutputFile(bio, outputPath); + } else { + CAF_CM_EXCEPTION_VA0(E_FAIL, "Must provide buffer or filename"); + } +} + +void CCmsMessageUtils::bioToOutputBuffer( + BIO* bio, + SmartPtrCDynamicByteArray& outputBuffer) { + CAF_CM_STATIC_FUNC_VALIDATE("CCmsMessageUtils", "bioToOutputBuffer"); + CAF_CM_VALIDATE_PTR(bio); + + BUF_MEM* bptr = NULL; + BIO_get_mem_ptr(bio, &bptr); + + // Casting to void to ignore return value and eliminate compiler warning + (void) BIO_set_close(bio, BIO_NOCLOSE); /* So BIO_free() leaves BUF_MEM alone */ + + outputBuffer.CreateInstance(); + outputBuffer->allocateBytes(bptr->length); + outputBuffer->memCpy(bptr->data, bptr->length); +} + +void CCmsMessageUtils::bioToOutputFile( + BIO* bio, + const std::string& outputPath) { + CAF_CM_STATIC_FUNC_VALIDATE("CCmsMessageUtils", "bioToOutputFile"); + CAF_CM_VALIDATE_PTR(bio); + CAF_CM_VALIDATE_STRING(outputPath); +} + +std::deque CCmsMessageUtils::biosToX509( + std::deque bioCollection) { + CAF_CM_STATIC_FUNC_VALIDATE("CCmsMessageUtils", "biosToX509"); + CAF_CM_VALIDATE_STL(bioCollection); + + std::deque rc; + for (TConstIterator > elemIter(bioCollection); elemIter; elemIter++) { + BIO* elem = *elemIter; + rc.push_back(bioToX509(elem)); + } + + return rc; +} + +X509* CCmsMessageUtils::bioToX509( + BIO* bio) { + CAF_CM_STATIC_FUNC("CCmsMessageUtils", "bioToX509"); + CAF_CM_VALIDATE_PTR(bio); + + X509* rc = PEM_read_bio_X509(bio, NULL, 0, NULL); + if (! rc) { + logSslErrors(); + CAF_CM_EXCEPTION_VA0(E_FAIL, "PEM_read_bio_X509 Failed"); + } + + return rc; +} + +EVP_PKEY* CCmsMessageUtils::bioToPrivateKey( + BIO* bio) { + CAF_CM_STATIC_FUNC("CCmsMessageUtils", "bioToPrivateKey"); + CAF_CM_VALIDATE_PTR(bio); + + EVP_PKEY* rc = PEM_read_bio_PrivateKey(bio, NULL, 0, NULL); + if (! rc) { + logSslErrors(); + CAF_CM_EXCEPTION_VA0(E_FAIL, "PEM_read_bio_PrivateKey Failed"); + } + + return rc; +} + +const SSL_METHOD* CCmsMessageUtils::protocolToSslMethod( + const std::string& protocol) { + CAF_CM_STATIC_FUNC("CCmsMessageUtils", "protocolToSslMethod"); + CAF_CM_VALIDATE_STRING(protocol); + + const SSL_METHOD* rc; + if (protocol.compare("TLSv1") == 0) { + rc = TLSv1_method(); + } else if (protocol.compare("TLSv1_1") == 0) { + rc = TLSv1_1_method(); + } else if (protocol.compare("TLSv1_2") == 0) { + rc = TLSv1_2_method(); +#ifndef OPENSSL_NO_SSL2 + } else if (protocol.compare("SSLv2") == 0) { + rc = SSLv2_method(); +#endif + } else if (protocol.compare("SSLv3") == 0) { + rc = SSLv3_method(); + } else if (protocol.compare("SSLv23") == 0) { + rc = SSLv23_method(); + } else { + CAF_CM_EXCEPTION_VA1(E_FAIL, + "Unknown protocol - %s", protocol.c_str()); + } + + return rc; +} + +BIO* CCmsMessageUtils::createWriteBio() { + CAF_CM_STATIC_FUNC("CCmsMessageUtils", "createWriteBio"); + + BIO* rc = BIO_new(BIO_s_mem()); + if (! rc) { + logSslErrors(); + CAF_CM_EXCEPTION_VA0(E_FAIL, "BIO_new Failed"); + } + + return rc; +} + +STACK_OF(X509)* CCmsMessageUtils::createX509Stack( + X509* x509, + X509* x5091, + X509* x5092) { + CAF_CM_STATIC_FUNC("CCmsMessageUtils", "createX509Stack"); + CAF_CM_VALIDATE_PTR(x509); + + /* Create recipient STACK and add recipient cert to it */ + STACK_OF(X509)* rc = sk_X509_new_null(); + if (! rc) { + logSslErrors(); + CAF_CM_EXCEPTION_VA0(E_FAIL, "sk_X509_new_nuss Failed"); + } + + if (!sk_X509_push(rc, x509)) { + logSslErrors(); + CAF_CM_EXCEPTION_VA0(E_FAIL, "sk_X509_push Failed"); + } + + if (x5091) { + if (!sk_X509_push(rc, x5091)) { + logSslErrors(); + CAF_CM_EXCEPTION_VA0(E_FAIL, "sk_X509_push Failed"); + } + } + + if (x5092) { + if (!sk_X509_push(rc, x5092)) { + logSslErrors(); + CAF_CM_EXCEPTION_VA0(E_FAIL, "sk_X509_push Failed"); + } + } + + return rc; +} + +X509_STORE* CCmsMessageUtils::createX509Store( + std::deque x509Collection) { + CAF_CM_STATIC_FUNC("CCmsMessageUtils", "createX509Store"); + CAF_CM_VALIDATE_STL(x509Collection); + + X509_STORE* rc = X509_STORE_new(); + if (! rc) { + logSslErrors(); + CAF_CM_EXCEPTION_VA0(E_FAIL, "X509_STORE_new Failed"); + } + + for (TConstIterator > elemIter(x509Collection); elemIter; elemIter++) { + X509* elem = *elemIter; + if (!X509_STORE_add_cert(rc, elem)) { + logSslErrors(); + CAF_CM_EXCEPTION_VA0(E_FAIL, "X509_STORE_add_cert Failed"); + } + } + + return rc; +} + +void CCmsMessageUtils::free( + CMS_ContentInfo* contentInfo) { + if (contentInfo) { + CMS_ContentInfo_free(contentInfo); + } +} + +void CCmsMessageUtils::free( + std::deque x509Collection) { + for (TConstIterator > elemIter(x509Collection); elemIter; elemIter++) { + X509* elem = *elemIter; + free(elem); + } +} + +void CCmsMessageUtils::free( + X509* x509) { + if (x509) { + X509_free(x509); + } +} + +void CCmsMessageUtils::free( + STACK_OF(X509)* x509Stack) { + if (x509Stack) { + sk_X509_pop_free(x509Stack, X509_free); + } +} + +void CCmsMessageUtils::free( + std::deque bioCollection) { + for (TConstIterator > elemIter(bioCollection); elemIter; elemIter++) { + BIO* elem = *elemIter; + free(elem); + } +} + +void CCmsMessageUtils::free( + BIO* bio) { + if (bio) { + BIO_vfree(bio); + } +} + +void CCmsMessageUtils::free( + X509_STORE* x509Store) { + if (x509Store) { + X509_STORE_free(x509Store); + } +} + +void CCmsMessageUtils::free( + EVP_PKEY* privateKey) { + if (privateKey) { + EVP_PKEY_free(privateKey); + } +} + +void CCmsMessageUtils::logSslErrors() { + CAF_CM_STATIC_FUNC_LOG_ONLY("CCmsMessageUtils", "logSslErrors"); + + int32 sslErrorCode = ERR_get_error(); + while (sslErrorCode != 0) { + const char* sslErrorStr = ERR_error_string(sslErrorCode, NULL); + CAF_CM_LOG_WARN_VA2("SSL Error - code: %d, str: %s", sslErrorCode, sslErrorStr); + sslErrorCode = ERR_get_error(); + } +} + +void CCmsMessageUtils::logCiphers( + const std::string& prefix, + const SSL* ssl) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CCmsMessageUtils", "logCiphers"); + CAF_CM_VALIDATE_STRING(prefix); + CAF_CM_VALIDATE_PTR(ssl); + + int32 index = 0; + const char* cipher = SSL_get_cipher_list(ssl, index); + while (cipher != NULL) { + CAF_CM_LOG_DEBUG_VA3( + "%s - index: %d, str: %s", prefix.c_str(), index, cipher); + cipher = SSL_get_cipher_list(ssl, index++); + } +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageUtils.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageUtils.h new file mode 100644 index 000000000..f93a624a7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageUtils.h @@ -0,0 +1,119 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CCmsMessageUtil_h_ +#define CCmsMessageUtil_h_ + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace Caf { + +class CCmsMessageUtils { +public: // Convert + static BIO* inputBufferToBio( + const SmartPtrCDynamicByteArray& inputBuffer); + + static std::deque inputFilesToBio( + const Cdeqstr& inputFileCollection); + + static BIO* inputFileToBio( + const std::string& inputFile); + + static BIO* inputToBio( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& inputPath); + + static BIO* outputPathToBio( + const std::string& outputPath); + + static BIO* outputToBio( + const SmartPtrCDynamicByteArray& outputBuffer, + const std::string& outputPath); + + static void bioToOutput( + BIO* bio, + SmartPtrCDynamicByteArray& outputBuffer, + const std::string& outputPath); + + static void bioToOutputBuffer( + BIO* bio, + SmartPtrCDynamicByteArray& outputBuffer); + + static void bioToOutputFile( + BIO* bio, + const std::string& outputPath); + + static std::deque biosToX509( + std::deque bioCollection); + + static X509* bioToX509( + BIO* bio); + + static EVP_PKEY* bioToPrivateKey( + BIO* bio); + + static const SSL_METHOD* protocolToSslMethod( + const std::string& protocol); + +public: // Create + static BIO* createWriteBio(); + + static STACK_OF(X509)* createX509Stack( + X509* x509, + X509* x5091 = NULL, + X509* x5092 = NULL); + + static X509_STORE* createX509Store( + std::deque x509Collection); + +public: // Free + static void free( + CMS_ContentInfo* contentInfo); + + static void free( + X509* x509); + + static void free( + std::deque x509Collection); + + static void free( + STACK_OF(X509)* x509Stack); + + static void free( + BIO* bio); + + static void free( + std::deque bioCollection); + + static void free( + X509_STORE* x509Store); + + static void free( + EVP_PKEY* privateKey); + +public: // Log + static void logSslErrors(); + + static void logCiphers( + const std::string& prefix, + const SSL* ssl); + +private: + CAF_CM_DECLARE_NOCREATE(CCmsMessageUtils); +}; + +} + +#endif // #ifndef CCmsMessageUtil_h_ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CEventTopicCalculatorInstance.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CEventTopicCalculatorInstance.cpp new file mode 100644 index 000000000..519c50a1d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CEventTopicCalculatorInstance.cpp @@ -0,0 +1,85 @@ +/* + * Created on: Aug 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CEventTopicCalculatorInstance.h" + +using namespace Caf; + +CEventTopicCalculatorInstance::CEventTopicCalculatorInstance() : + _isInitialized(false), + CAF_CM_INIT("CEventTopicCalculatorInstance") { + CAF_CM_INIT_THREADSAFE; +} + +CEventTopicCalculatorInstance::~CEventTopicCalculatorInstance() { +} + +void CEventTopicCalculatorInstance::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _isInitialized = true; +} + +void CEventTopicCalculatorInstance::terminateBean() { +} + +SmartPtrIVariant CEventTopicCalculatorInstance::invokeExpression( + const std::string& methodName, + const Cdeqstr& methodParams, + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME("invokeEspression"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_ASSERT(!methodParams.size()); + SmartPtrIVariant result; + + if (methodName == "getTopic") { + result = getTopic(message); + } else { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchMethodException, + 0, + "Method '%s' is not supported by this invoker", + methodName.c_str()); + } + return result; +} + +SmartPtrIVariant CEventTopicCalculatorInstance::getTopic( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("getTopic"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const SmartPtrCCafMessagePayload cafMessagePayload = + CCafMessagePayload::create(message->getPayload()); + + const SmartPtrCManifestDoc manifest = cafMessagePayload->getManifest(); + + const std::deque eventKeyCollection = + cafMessagePayload->getEventKeyCollection(); + + CCafRegex replaceDots; + replaceDots.initialize("\\."); + + std::stringstream topicBld; + topicBld << "caf.event." + << replaceDots.replaceLiteral(manifest->getClassName(), "_") + << '.' + << replaceDots.replaceLiteral(manifest->getClassNamespace(), "_") + << '.' + << replaceDots.replaceLiteral(manifest->getClassVersion(), "_"); + for (TConstIterator > key(eventKeyCollection); key; key++) { + const SmartPtrCEventKeyDoc eventKey = *key; + topicBld << '.' << replaceDots.replaceLiteral(eventKey->getValue(), "_"); + } + + return CVariant::createString(topicBld.str()); +} + diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CEventTopicCalculatorInstance.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CEventTopicCalculatorInstance.h new file mode 100644 index 000000000..dc33a8acd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CEventTopicCalculatorInstance.h @@ -0,0 +1,55 @@ +/* + * Created on: Aug 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CEventTopicCalculatorInstance_h +#define CEventTopicCalculatorInstance_h + +namespace Caf { + +class CEventTopicCalculatorInstance : + public TCafSubSystemObjectRoot, + public IBean, + public IExpressionInvoker { +public: + CEventTopicCalculatorInstance(); + virtual ~CEventTopicCalculatorInstance(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdCommIntegrationEventTopicCalculator) + + CAF_BEGIN_INTERFACE_MAP(CEventTopicCalculatorInstance) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IExpressionInvoker) + CAF_END_INTERFACE_MAP() + +public: // IBean + void initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties); + + void terminateBean(); + +public: // IExpressionInvoker + SmartPtrIVariant invokeExpression( + const std::string& methodName, + const Cdeqstr& methodParams, + const SmartPtrIIntMessage& message); + +private: + SmartPtrIVariant getTopic( + const SmartPtrIIntMessage& message); + +private: + bool _isInitialized; + CAF_CM_CREATE; + CAF_CM_CREATE_THREADSAFE; + CAF_CM_DECLARE_NOCOPY(CEventTopicCalculatorInstance); +}; + +} + +#endif /* CEventTopicCalculatorInstance_h */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CIncomingMessageHandler.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CIncomingMessageHandler.cpp new file mode 100644 index 000000000..685f26d38 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CIncomingMessageHandler.cpp @@ -0,0 +1,64 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CIncomingMessageHandler.h" + +using namespace Caf; + +CIncomingMessageHandler::CIncomingMessageHandler() : + _isInitialized(false), + CAF_CM_INIT("CIncomingMessageHandler") { +} + +CIncomingMessageHandler::~CIncomingMessageHandler() { +} + +void CIncomingMessageHandler::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + CAF_CM_VALIDATE_STL_EMPTY(properties); + + _ctorArgs = ctorArgs; + _properties = properties; + initialize(); +} + +void CIncomingMessageHandler::terminateBean() { +} + +void CIncomingMessageHandler::initialize() { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _isInitialized = true; +} + +bool CIncomingMessageHandler::isResponsible( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("isResponsible"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + return false; +} + +SmartPtrIIntegrationObject CIncomingMessageHandler::createObject( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("createObject"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + SmartPtrIIntegrationObject rc; + rc.CreateInstance(_sObjIdCommIntegrationIncomingMessageHandlerInstance); + rc->initialize(_ctorArgs, _properties, configSection); + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CIncomingMessageHandler.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CIncomingMessageHandler.h new file mode 100644 index 000000000..3dd2b918c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CIncomingMessageHandler.h @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CIncomingMessageHandler_h_ +#define CIncomingMessageHandler_h_ + +namespace Caf { + +/// Sends responses/errors back to the client. +class CIncomingMessageHandler : + public TCafSubSystemObjectRoot, + public IBean, + public IIntegrationComponent { +public: + CIncomingMessageHandler(); + virtual ~CIncomingMessageHandler(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdCommIntegrationIncomingMessageHandler) + + CAF_BEGIN_INTERFACE_MAP(CIncomingMessageHandler) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IIntegrationComponent) + CAF_END_INTERFACE_MAP() + +public: + virtual void initialize(); + +public: // IBean + virtual void initializeBean(const IBean::Cargs& ctorArgs, const IBean::Cprops& properties); + + virtual void terminateBean(); + +public: // IIntegrationComponent + bool isResponsible( + const SmartPtrIDocument& configSection) const; + + SmartPtrIIntegrationObject createObject( + const SmartPtrIDocument& configSection) const; + +private: + bool _isInitialized; + IBean::Cargs _ctorArgs; + IBean::Cprops _properties; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CIncomingMessageHandler); +}; + +} + +#endif // #ifndef CIncomingMessageHandler_h_ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CIncomingMessageHandlerInstance.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CIncomingMessageHandlerInstance.cpp new file mode 100644 index 000000000..d603f8e52 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CIncomingMessageHandlerInstance.cpp @@ -0,0 +1,246 @@ +/* + * Created on: Aug 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CIncomingMessageHandlerInstance.h" + +using namespace Caf; + +CIncomingMessageHandlerInstance::CIncomingMessageHandlerInstance() : + _isInitialized(false), + CAF_CM_INIT_LOG("CIncomingMessageHandlerInstance") { +} + +CIncomingMessageHandlerInstance::~CIncomingMessageHandlerInstance() { +} + +void CIncomingMessageHandlerInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + _id = configSection->findRequiredAttribute("id"); + _isInitialized = true; +} + +std::string CIncomingMessageHandlerInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _id; +} + +void CIncomingMessageHandlerInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); +} + +SmartPtrIIntMessage CIncomingMessageHandlerInstance::transformMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("transformMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + SmartPtrIIntMessage newMessage = handleMessage(message); + + return newMessage; +} +/** + * Processes an incoming message + *

+ * Pre-processes an incoming message and:
+ * (1) determines if it is a duplicate message
+ * (2) determines if it is a stand-alone message or part of a larger message + * (chunking)
+ * (3) enhances the message headers with internal information
+ * (4) caches the message's replyTo information
+ *

+ * This method will return null if the message cannot be processed as + * is. This is the case if the message is a chunk of a larger message. When + * all of the chunks are assembled then the assembled message will be + * returned. + *

+ * This component interacts with the MessageDeliveryStateRecorder in the + * case of message receipts. If a message receipt needs to be generated, a + * record will be added to the MessageDeliveryStateRecorder which will + * produce and send the receipt. + *

+ * If the message is a duplicate it will be marked as such and returned so + * that logic in the context file can do something with it if desired. + * + * @param message incoming message + * @return the incoming message if it can be processed on its own or null if + * not + */ +SmartPtrIIntMessage CIncomingMessageHandlerInstance::handleMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_STATIC_FUNC_VALIDATE("CIncomingMessageHandlerInstance", "handleMessage"); + CAF_CM_VALIDATE_INTERFACE(message); + + const std::string workingDir = + AppConfigUtils::getRequiredString("communication_amqp", _sConfigWorkingDir); + + CMessageHeaderUtils::log(message->getHeaders()); + + SmartPtrIIntMessage rc; + if (CMessageHeaderUtils::getBoolOpt( + message->getHeaders(), MessageHeaders::_sMULTIPART)) { + rc = getAssembledMessage(message, workingDir); + } else { + rc = message; + } + return rc; +} + +SmartPtrIIntMessage CIncomingMessageHandlerInstance::getAssembledMessage( + const SmartPtrIIntMessage& message, + const std::string& workingDir) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CIncomingMessageHandlerInstance", "getAssembledMessage"); + CAF_CM_VALIDATE_INTERFACE(message); + CAF_CM_VALIDATE_STRING(workingDir); + + const std::string correlationId = processMessage(message, workingDir); + + const std::string messageDir = FileSystemUtils::buildPath( + workingDir, correlationId); + const std::string manifestFile = FileSystemUtils::buildPath(messageDir, "0.part"); + CAF_CM_LOG_DEBUG_VA1("Reconstructing manifest - %s", manifestFile.c_str()); + + const SmartPtrCDynamicByteArray payload = + CCafMessagePayload::createBufferFromFile(manifestFile); + const SmartPtrCPayloadEnvelopeDoc payloadEnvelope = + CCafMessagePayloadParser::getPayloadEnvelope(payload); + + const std::deque attachmentDocs = + payloadEnvelope->getAttachmentCollection()->getAttachment(); + + // refactor the local attachments to point to the transferred + // attachments + std::deque refactoredAttachments; + if (!attachmentDocs.empty()) { + if (!attachmentDocs.empty()) { + CAF_CM_LOG_DEBUG_VA2( + "Refactoring attachments - correlationId: %s, numAttachments: %d", + correlationId.c_str(), attachmentDocs.size()); + for (TConstIterator > attachmentIter(attachmentDocs); + attachmentIter; attachmentIter++) { + const SmartPtrCAttachmentDoc attachment = *attachmentIter; + const std::string attachmentName = attachment->getName(); + const std::string attachmentUri = attachment->getUri(); + + UriUtils::SUriRecord uriRecord; + UriUtils::parseUriString(attachmentUri, uriRecord); + + CAF_CM_LOG_DEBUG_VA3("Parsed URI - Uri: %s, protocol: %s, address: %s", + attachmentUri.c_str(), uriRecord.protocol.c_str(), + uriRecord.address.c_str()); + + if(uriRecord.protocol.compare("attachment") == 0) { + const std::string uriPath = uriRecord.address; + const std::string::size_type slashPos = uriPath.find('/'); + const std::string attNumStr = uriPath.substr(slashPos + 1); + + const std::string attFile = FileSystemUtils::buildPath( + messageDir, attNumStr + ".part"); + const std::string attUri = UriUtils::appendParameters( + attFile, uriRecord.parameters); + + SmartPtrCAttachmentDoc refactoredAttachment; + refactoredAttachment.CreateInstance(); + refactoredAttachment->initialize(attachment->getName(), + attachment->getType(), "file:///" + attUri, false, + attachment->getCmsPolicy()); + refactoredAttachments.push_back(refactoredAttachment); + + CAF_CM_LOG_DEBUG_VA3( + "Adding refactored attachment - name: %s, type: %s, uri: %s", + refactoredAttachment->getName().c_str(), + refactoredAttachment->getType().c_str(), + refactoredAttachment->getUri().c_str()); + } else { + refactoredAttachments.push_back(attachment); + } + } + } + } + + SmartPtrIIntMessage newMessage; + if (refactoredAttachments.empty()) { + newMessage = CCafMessageCreator::create( + payload, refactoredAttachments, message->getHeaders()); + } else { + const SmartPtrCCafMessageHeadersWriter cafMessageHeadersWriter = + CCafMessageHeadersWriter::create(); + cafMessageHeadersWriter->insertString( + MessageHeaders::_sMULTIPART_WORKING_DIR, messageDir); + + newMessage = CCafMessageCreator::createPayloadEnvelope( + payloadEnvelope, refactoredAttachments, + cafMessageHeadersWriter->getHeaders(), message->getHeaders()); + } + + return newMessage; +} + +std::string CIncomingMessageHandlerInstance::processMessage( + const SmartPtrIIntMessage& message, + const std::string& workingDir) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CIncomingMessageHandlerInstance", "processMessage"); + CAF_CM_VALIDATE_INTERFACE(message); + CAF_CM_VALIDATE_STRING(workingDir); + + SmartPtrCDynamicByteArray payload = message->getPayload(); + payload->resetCurrentPos(); + + CAF_CM_LOG_DEBUG_VA1("Processing payload - byteCount: %d", + payload->getByteCount()); + + const std::string payloadPath = FileSystemUtils::buildPath(FileSystemUtils::getTmpDir(), "payload.out"); + FileSystemUtils::saveByteFile(payloadPath, payload->getPtr(), payload->getByteCount()); + + SmartPtrCMessagePartsHeader header = + CMessagePartsHeader::fromByteBuffer(payload); + CAF_CM_LOG_DEBUG_VA3( + "Processing message parts - version: %d, correlationId: %s, numberOfParts: %d", + CMessagePartsHeader::CAF_MSG_VERSION, header->getCorrelationIdStr().c_str(), + header->getNumberOfParts()); + + const std::string messageDir = FileSystemUtils::buildPath( + workingDir, header->getCorrelationIdStr()); + if (!FileSystemUtils::doesFileExist(messageDir)) { + CAF_CM_LOG_DEBUG_VA1("Creating directory - %s", messageDir.c_str()); + FileSystemUtils::createDirectory(messageDir); + } + + while (payload->getByteCountFromCurrentPos() > 0) { + SmartPtrCMessagePartDescriptor partDescriptor = CMessagePartDescriptor::fromByteBuffer(payload); + CAF_CM_LOG_DEBUG_VA5( + "Processing message parts descriptor - version: %d, attachmentNumber: %d, partNumber: %d, dataSize: %d, dataOffset: %d", + CMessagePartDescriptor::CAF_MSG_VERSION, partDescriptor->getAttachmentNumber(), + partDescriptor->getPartNumber(), partDescriptor->getDataSize(), partDescriptor->getDataOffset()); + + const std::string attachmentFile = FileSystemUtils::buildPath( + messageDir, partDescriptor->getAttachmentNumberStr() + ".part"); + + SmartPtrCDynamicByteArray partBuffer; + partBuffer.CreateInstance(); + partBuffer->allocateBytes(partDescriptor->getDataSize()); + partBuffer->memCpy(payload->getPtrAtCurrentPos(), partDescriptor->getDataSize()); + partBuffer->incrementCurrentPos(static_cast(partDescriptor->getDataOffset())); + + payload->incrementCurrentPos(partDescriptor->getDataSize()); + + FileSystemUtils::saveByteFile(attachmentFile, partBuffer->getPtrAtCurrentPos(), partBuffer->getByteCountFromCurrentPos()); + } + + return header->getCorrelationIdStr(); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CIncomingMessageHandlerInstance.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CIncomingMessageHandlerInstance.h new file mode 100644 index 000000000..3a8a2df14 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CIncomingMessageHandlerInstance.h @@ -0,0 +1,74 @@ +/* + * Created on: Aug 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CIncomingMessageHandlerInstance_h +#define CIncomingMessageHandlerInstance_h + +#include "ReplyToResolver.h" + +namespace Caf { + +class CIncomingMessageHandlerInstance : + public TCafSubSystemObjectRoot, + public IIntegrationObject, + public IIntegrationComponentInstance, + public ITransformer { +public: + CIncomingMessageHandlerInstance(); + virtual ~CIncomingMessageHandlerInstance(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdCommIntegrationIncomingMessageHandlerInstance) + + CAF_BEGIN_INTERFACE_MAP(CIncomingMessageHandlerInstance) + CAF_INTERFACE_ENTRY(IIntegrationObject) + CAF_INTERFACE_ENTRY(IIntegrationComponentInstance) + CAF_INTERFACE_ENTRY(ITransformer) + CAF_END_INTERFACE_MAP() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ITransformer + SmartPtrIIntMessage transformMessage( + const SmartPtrIIntMessage& message); + +private: + static SmartPtrIIntMessage handleMessage( + const SmartPtrIIntMessage& message); + + static SmartPtrIIntMessage getAssembledMessage( + const SmartPtrIIntMessage& message, + const std::string& workingDir); + + static std::string processMessage( + const SmartPtrIIntMessage& message, + const std::string& workingDir); + +private: + bool _isInitialized; + std::string _id; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CIncomingMessageHandlerInstance); +}; +CAF_DECLARE_SMART_QI_POINTER(CIncomingMessageHandlerInstance); +} + +#endif /* CIncomingMessageHandlerInstance_h */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessageDeliveryRecord.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessageDeliveryRecord.cpp new file mode 100644 index 000000000..1e606e18a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessageDeliveryRecord.cpp @@ -0,0 +1,83 @@ +/* + * Created on: Nov 26, 2014 + * Author: bwilliams + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CMessageDeliveryRecord.h" + +using namespace Caf; + +CMessageDeliveryRecord::CMessageDeliveryRecord() : + _isInitialized(false), + _correlationId(CAFCOMMON_GUID_NULL), + _numberOfParts(0), + _startingPartNumber(0), + CAF_CM_INIT("CMessageDeliveryRecord") { +} + +CMessageDeliveryRecord::~CMessageDeliveryRecord() { +} + +void CMessageDeliveryRecord::initialize( + const UUID& correlationId, + const uint32 numberOfParts, + const uint32 startingPartNumber, + const std::deque& messagePartSources, + const IIntMessage::SmartPtrCHeaders& messageHeaders) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _correlationId = correlationId; + _numberOfParts = numberOfParts; + _startingPartNumber = startingPartNumber; + _messagePartSources = messagePartSources; + _messageHeaders = messageHeaders; + + _isInitialized = true; +} + +UUID CMessageDeliveryRecord::getCorrelationId() const { + CAF_CM_FUNCNAME_VALIDATE("getCorrelationId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _correlationId; +} + +std::string CMessageDeliveryRecord::getCorrelationIdStr() const { + CAF_CM_FUNCNAME_VALIDATE("getCorrelationId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return BasePlatform::UuidToString(_correlationId); +} + +uint32 CMessageDeliveryRecord::getNumberOfParts() const { + CAF_CM_FUNCNAME_VALIDATE("getNumberOfParts"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _numberOfParts; +} + +uint32 CMessageDeliveryRecord::getStartingPartNumber() const { + CAF_CM_FUNCNAME_VALIDATE("getStartingPartNumber"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _startingPartNumber; +} + +std::deque CMessageDeliveryRecord::getMessagePartSources() const { + CAF_CM_FUNCNAME_VALIDATE("getMessagePartSources"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _messagePartSources; +} + +IIntMessage::SmartPtrCHeaders CMessageDeliveryRecord::getMessageHeaders() const { + CAF_CM_FUNCNAME_VALIDATE("getMessageHeaders"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _messageHeaders; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessageDeliveryRecord.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessageDeliveryRecord.h new file mode 100644 index 000000000..9f432d903 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessageDeliveryRecord.h @@ -0,0 +1,57 @@ +/* + * Created on: Nov 26, 2014 + * Author: bwilliams + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CMessageDeliveryRecord_h +#define CMessageDeliveryRecord_h + +namespace Caf { + +class CMessageDeliveryRecord { +public: + CMessageDeliveryRecord(); + virtual ~CMessageDeliveryRecord(); + +public: + void initialize( + const UUID& correlationId, + const uint32 numberOfParts, + const uint32 startingPartNumber, + const std::deque& messagePartSources, + const IIntMessage::SmartPtrCHeaders& messageHeaders); + +public: + UUID getCorrelationId() const; + + std::string getCorrelationIdStr() const; + + uint32 getNumberOfParts() const; + + uint32 getStartingPartNumber() const; + + std::deque getMessagePartSources() const; + + IIntMessage::SmartPtrCHeaders getMessageHeaders() const; + +private: + bool _isInitialized; + UUID _correlationId; + uint32 _numberOfParts; + uint32 _startingPartNumber; + std::deque _messagePartSources; + IIntMessage::SmartPtrCHeaders _messageHeaders; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CMessageDeliveryRecord); +}; + +CAF_DECLARE_SMART_POINTER(CMessageDeliveryRecord); + +} + +#endif /* CMessageDeliveryRecord_h */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartDescriptor.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartDescriptor.cpp new file mode 100644 index 000000000..5ef1f1d0b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartDescriptor.cpp @@ -0,0 +1,170 @@ +/* Created on: Nov 19, 2014 + * Author: bwilliams + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CMessagePartDescriptor.h" + +using namespace Caf; + +/** + * Converts the BLOCK_SIZE data in a ByteBuffer into a MessagePartsDescriptor + *

+ * The incoming ByteBuffer position will be modified. + * @param buffer ByteBuffer to convert + * @return a MessagePartsDescriptor + */ +SmartPtrCMessagePartDescriptor CMessagePartDescriptor::fromByteBuffer( + SmartPtrCDynamicByteArray& buffer) { + CAF_CM_STATIC_FUNC("CMessagePartDescriptor", "fromByteBuffer"); + CAF_CM_VALIDATE_SMARTPTR(buffer); + + if (buffer->getByteCountFromCurrentPos() < BLOCK_SIZE) { + CAF_CM_EXCEPTION_VA2(E_INVALIDARG, + "Input data block is too small - rem: %d, tot: %d", + buffer->getByteCountFromCurrentPos(), buffer->getByteCount()); + } + + SmartPtrCDynamicByteArray data; + data.CreateInstance(); + data->allocateBytes(BLOCK_SIZE); + data->memCpy(buffer->getPtrAtCurrentPos(), BLOCK_SIZE); + + buffer->incrementCurrentPos(BLOCK_SIZE); + return fromArray(data); +} + +/** + * Converts a byte array into a MessagePartsDescriptor + * @param blockData byte array to convert + * @return a MessagePartsDescriptor + */ +SmartPtrCMessagePartDescriptor CMessagePartDescriptor::fromArray( + SmartPtrCDynamicByteArray& buffer) { + CAF_CM_STATIC_FUNC("CMessagePartDescriptor", "fromArray"); + CAF_CM_VALIDATE_SMARTPTR(buffer); + + if (buffer->getByteCount() < BLOCK_SIZE) { + CAF_CM_EXCEPTION_VA1(E_INVALIDARG, "Input data block is too small - %d", + buffer->getByteCount()); + } + + if (CMessagePartsParser::getByte(buffer) != CAF_MSG_VERSION) { + CAF_CM_EXCEPTION_VA0(E_INVALIDARG, "Input data block version is incorrect"); + } + + const byte resvd = CMessagePartsParser::getByte(buffer); + if (resvd != RESERVED) { + CAF_CM_EXCEPTION_VA0(E_INVALIDARG, "Input data block reserved bits are incorrect"); + } + + const uint16 attachmentNumber = CMessagePartsParser::getUint16(buffer); + const uint32 partNumber = CMessagePartsParser::getUint32(buffer); + const uint32 dataSize = CMessagePartsParser::getUint32(buffer); + const uint32 dataOffset = CMessagePartsParser::getUint32(buffer); + buffer->verify(); + + SmartPtrCMessagePartDescriptor messagePartsDescriptor; + messagePartsDescriptor.CreateInstance(); + messagePartsDescriptor->initialize( + attachmentNumber, partNumber, dataSize, dataOffset); + + return messagePartsDescriptor; +} + +SmartPtrCDynamicByteArray CMessagePartDescriptor::toArray( + const uint16 attachmentNumber, + const uint32 partNumber, + const uint32 dataSize, + const uint32 dataOffset) { + SmartPtrCDynamicByteArray buffer; + buffer.CreateInstance(); + buffer->allocateBytes(BLOCK_SIZE); + + CMessagePartsBuilder::put(CAF_MSG_VERSION, buffer); + CMessagePartsBuilder::put(RESERVED, buffer); + CMessagePartsBuilder::put(attachmentNumber, buffer); + CMessagePartsBuilder::put(partNumber, buffer); + CMessagePartsBuilder::put(dataSize, buffer); + CMessagePartsBuilder::put(dataOffset, buffer); + buffer->verify(); + + return buffer; +} + +CMessagePartDescriptor::CMessagePartDescriptor() : + _isInitialized(false), + _attachmentNumber(0), + _partNumber(0), + _dataSize(0), + _dataOffset(0), + CAF_CM_INIT("CMessagePartDescriptor") { +} + +CMessagePartDescriptor::~CMessagePartDescriptor() { +} + +void CMessagePartDescriptor::initialize( + const uint16 attachmentNumber, + const uint32 partNumber, + const uint32 dataSize, + const uint32 dataOffset) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + this->_attachmentNumber = attachmentNumber; + this->_partNumber = partNumber; + this->_dataSize = dataSize; + this->_dataOffset = dataOffset; + _isInitialized = true; +} + +/** + * @return the attachmentNumber + */ +uint16 CMessagePartDescriptor::getAttachmentNumber() const { + CAF_CM_FUNCNAME_VALIDATE("getAttachmentNumber"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _attachmentNumber; +} + +std::string CMessagePartDescriptor::getAttachmentNumberStr() const { + CAF_CM_FUNCNAME_VALIDATE("getAttachmentNumber"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return CStringConv::toString(_attachmentNumber); +} + +/** + * @return the partNumber + */ +uint32 CMessagePartDescriptor::getPartNumber() const { + CAF_CM_FUNCNAME_VALIDATE("getPartNumber"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _partNumber; +} + +/** + * @return the dataSize + */ +uint32 CMessagePartDescriptor::getDataSize() const { + CAF_CM_FUNCNAME_VALIDATE("getDataSize"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _dataSize; +} + +/** + * @return the dataOffset + */ +uint32 CMessagePartDescriptor::getDataOffset() const { + CAF_CM_FUNCNAME_VALIDATE("getDataOffset"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _dataOffset; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartDescriptor.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartDescriptor.h new file mode 100644 index 000000000..17853f4a1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartDescriptor.h @@ -0,0 +1,101 @@ +/* + * Created on: Nov 19, 2014 + * Author: bwilliams + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CMessagePartDescriptor_h +#define CMessagePartDescriptor_h + +namespace Caf { + +class CMessagePartDescriptor; +CAF_DECLARE_SMART_POINTER(CMessagePartDescriptor); + +/** + * Class that emits and parses message parts header blocks.
+ */ +class CMessagePartDescriptor { +public: + /** + * Converts the BLOCK_SIZE data in a ByteBuffer into a MessagePartsHeader + *

+ * The incoming ByteBuffer position will be modified. + * @param buffer ByteBuffer to convert + * @return a MessagePartsHeader + */ + static SmartPtrCMessagePartDescriptor fromByteBuffer(SmartPtrCDynamicByteArray& buffer); + + /** + * Converts a byte array into a MessagePartsHeader + * @param blockData byte array to convert + * @return a MessagePartsHeader + */ + static SmartPtrCMessagePartDescriptor fromArray(SmartPtrCDynamicByteArray& blockData); + + static SmartPtrCDynamicByteArray toArray(const uint16 attachmentNumber, + const uint32 partNumber, const uint32 dataSize, const uint32 dataOffset); + +public: + CMessagePartDescriptor(); + virtual ~CMessagePartDescriptor(); + +public: + /** + * @param correlationId the correlation id + * @param numberOfParts the total number of parts + */ + void initialize( + const uint16 attachmentNumber, + const uint32 partNumber, + const uint32 dataSize, + const uint32 dataOffset); + + /** + * @return the attachmentNumber + */ + uint16 getAttachmentNumber() const; + std::string getAttachmentNumberStr() const; + + /** + * @return the partNumber + */ + uint32 getPartNumber() const; + + /** + * @return the dataSize + */ + uint32 getDataSize() const; + + /** + * @return the dataOffset + */ + uint32 getDataOffset() const; + +public: + /** + * The BLOCK_SIZE field stores the size of a MessagePartsHeader in byte array form.
+ */ + static const uint32 BLOCK_SIZE = 20; + static const byte CAF_MSG_VERSION = 1; + +private: + static const byte RESERVED = (byte)0xcd; + +private: + bool _isInitialized; + uint16 _attachmentNumber; + uint32 _partNumber; + uint32 _dataSize; + uint32 _dataOffset; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CMessagePartDescriptor); +}; + +} + +#endif /* CMessagePartDescriptor_h */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartDescriptorCalculator.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartDescriptorCalculator.cpp new file mode 100644 index 000000000..30b9f6f03 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartDescriptorCalculator.cpp @@ -0,0 +1,209 @@ +/* + * Created on: Nov 19, 2014 + * Author: bwilliams + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CMessagePartDescriptorCalculator.h" + +using namespace Caf; + +uint32 CMessagePartDescriptorCalculator::getMaxPartSize() { + return AppConfigUtils::getRequiredUint32("communication_amqp", "max_part_size"); +} + +std::deque CMessagePartDescriptorCalculator::calculateSourcePartRecords( + const SmartPtrCDynamicByteArray& payload) { + CAF_CM_STATIC_FUNC_VALIDATE("CMessagePartDescriptorCalculator", "calculateSourcePartRecords"); + CAF_CM_VALIDATE_SMARTPTR(payload); + + const std::string workingDirectory = AppConfigUtils::getRequiredString("communication_amqp", + _sConfigWorkingDir); + + return refactorMessageIntoPartRecords(workingDirectory, payload); +} + +/* + * Parse the local file attachments and message body into records + * reflecting the full size of each part. + */ +std::deque CMessagePartDescriptorCalculator::refactorMessageIntoPartRecords( + const std::string& workingDirectory, + const SmartPtrCDynamicByteArray& payload) { + CAF_CM_STATIC_FUNC_LOG("CMessagePartDescriptorCalculator", "refactorMessageIntoPartRecords"); + CAF_CM_VALIDATE_STRING(workingDirectory); + CAF_CM_VALIDATE_SMARTPTR(payload); + // attachmentCollectionDoc is optional + + const SmartPtrCPayloadEnvelopeDoc payloadEnvelope = + CCafMessagePayloadParser::getPayloadEnvelope(payload); + + const std::deque sourceAttachments = + payloadEnvelope->getAttachmentCollection()->getAttachment(); + + // Scan the attachment collection and create part records for + // any local file attachments that need to be transmitted. + std::deque messageParts; + std::deque refactoredAttachments; + if (!sourceAttachments.empty()) { + int16 attachmentNumber = 1; + for (TConstIterator > sourceAttachmentIter(sourceAttachments); + sourceAttachmentIter; sourceAttachmentIter++) { + const SmartPtrCAttachmentDoc attachment = *sourceAttachmentIter; + + UriUtils::SUriRecord uriRecord; + UriUtils::parseUriString(attachment->getUri(), uriRecord); + + if ((uriRecord.protocol.compare("file") == 0) && !attachment->getIsReference()) { + CAF_CM_LOG_DEBUG_VA1("Processing local file attachment - uri: %s", + attachment->getUri().c_str()); + + UriUtils::SFileUriRecord fileUriRecord; + UriUtils::parseFileAddress(uriRecord.address, fileUriRecord); + const std::string attachmentPath = fileUriRecord.path; + + if (!FileSystemUtils::doesFileExist(attachmentPath)) { + CAF_CM_EXCEPTION_VA1(ERROR_FILE_NOT_FOUND, + "File not found - %s", attachmentPath.c_str()); + } + + const int64 fileSize = FileSystemUtils::getFileSize(attachmentPath); + CAF_CM_LOG_DEBUG_VA2("Processing local file attachment - file: %s, size: %d", + attachmentPath.c_str(), fileSize); + + SmartPtrCMessagePartRecord messagePart; + messagePart.CreateInstance(); + messagePart->initialize(attachmentNumber, attachmentPath, 0, fileSize); + messageParts.push_back(messagePart); + + const std::string newAttachmentUri = UriUtils::appendParameters( + "attachment:/" + CStringConv::toString(attachmentNumber), + uriRecord.parameters); + + CAF_CM_LOG_DEBUG_VA1("New attachment URI - %s", newAttachmentUri.c_str()); + + SmartPtrCAttachmentDoc attachmentNew; + attachmentNew.CreateInstance(); + attachmentNew->initialize(attachment->getName(), attachment->getType(), + newAttachmentUri, attachment->getIsReference(), + attachment->getCmsPolicy()); + + refactoredAttachments.push_back(attachmentNew); + ++attachmentNumber; + } else { + refactoredAttachments.push_back(attachment); + } + } + } + + // If there are local file attachments to send then rebuild the message + // with the refactored attribute collection. + SmartPtrCDynamicByteArray payloadNew = payload; + if (!messageParts.empty()) { + payloadNew = CCafMessageCreator::createPayloadEnvelope( + payloadEnvelope, refactoredAttachments)->getPayload(); + } + + // Does the payload itself need to be split? + // If it is larger than max_part_size OR if there are transmitted attachments then 'yes' + const std::string newPayload = + CStringUtils::trim(CCafMessagePayload::saveToStr(payloadNew)); + if ((newPayload.length() > getMaxPartSize()) || ! messageParts.empty()) { + // Save the new payload to a file + const std::string requestIdStr = + BasePlatform::UuidToString(payloadEnvelope->getRequestId()); + const std::string payloadFileName = requestIdStr + "-payload.xml"; + const std::string payloadFile = FileSystemUtils::buildPath( + workingDirectory, payloadFileName); + FileSystemUtils::saveTextFile(payloadFile, newPayload); + + SmartPtrCMessagePartRecord messagePart; + messagePart.CreateInstance(); + messagePart->initialize(0, payloadFile, 0, newPayload.length()); + + messageParts.push_back(messagePart); + } + + // If there are MessagePartRecords then split them apart into + // MessagePartSourceRecords and return them else there is no + // splitting required. + if (!messageParts.empty()) { + return splitMessagePartRecords(messageParts); + } else { + return std::deque(); + } +} + +/* + * Split the message part records such that all parts will contain + * at most max_part_size bytes. + */ +std::deque CMessagePartDescriptorCalculator::splitMessagePartRecords( + std::deque& messageParts) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CMessagePartDescriptorCalculator", "splitMessagePartRecords"); + CAF_CM_VALIDATE_STL(messageParts); + + if (CAF_CM_IS_LOG_DEBUG_ENABLED) { + CAF_CM_LOG_DEBUG_VA0("Message part records"); + for (TConstIterator > messagePartIter(messageParts); + messagePartIter; messagePartIter++) { + const SmartPtrCMessagePartRecord messagePart = *messagePartIter; + CAF_CM_LOG_DEBUG_VA4( + "Message part - attachmentNumber: %d, filePath: %s, dataLength: %d, dataOffset: %d", + messagePart->getAttachmentNumber(), messagePart->getFilePath().c_str(), + messagePart->getDataLength(), messagePart->getDataOffset()); + } + } + + std::deque packedSourceRecords; + + uint64 currentPartSize = 0; + std::deque::iterator messagePartIter = messageParts.begin(); + while (messagePartIter != messageParts.end()) { + const SmartPtrCMessagePartRecord messagePart = *messagePartIter; + + const uint64 availablePartBytes = + messagePart->getDataLength() > LONG_MAX + ? LONG_MAX : messagePart->getDataLength(); + const uint64 fillBytes = MIN(getMaxPartSize() - currentPartSize, availablePartBytes); + + SmartPtrCMessagePartDescriptorSourceRecord sourceRecord; + sourceRecord.CreateInstance(); + sourceRecord->initialize(messagePart->getAttachmentNumber(), + messagePart->getFilePath(), static_cast(messagePart->getDataOffset()), static_cast(fillBytes)); + + packedSourceRecords.push_back(sourceRecord); + + currentPartSize += fillBytes; + messagePart->setDataOffset(messagePart->getDataOffset() + fillBytes); + messagePart->setDataLength(messagePart->getDataLength() - fillBytes); + if (messagePart->getDataLength() == 0) { + messagePartIter = messageParts.erase(messagePartIter); + } else { + ++messagePartIter; + } + + if (currentPartSize == getMaxPartSize()) { + currentPartSize = 0; + } + } + + if (CAF_CM_IS_LOG_DEBUG_ENABLED) { + CAF_CM_LOG_DEBUG_VA0("Split message part descriptor source records"); + for (TConstIterator > packedSourceRecordIter(packedSourceRecords); + packedSourceRecordIter; packedSourceRecordIter++) { + const SmartPtrCMessagePartDescriptorSourceRecord packedSourceRecord = + *packedSourceRecordIter; + CAF_CM_LOG_DEBUG_VA4( + "Packed source - attachmentNumber: %d, filePath: %s, dataLength: %d, dataOffset: %d", + packedSourceRecord->getAttachmentNumber(), + packedSourceRecord->getFilePath().c_str(), + packedSourceRecord->getDataLength(), packedSourceRecord->getDataOffset()); + } + } + + return packedSourceRecords; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartDescriptorCalculator.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartDescriptorCalculator.h new file mode 100644 index 000000000..6144225f4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartDescriptorCalculator.h @@ -0,0 +1,35 @@ +/* + * Created on: Nov 19, 2014 + * Author: bwilliams + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CMessagePartDescriptorCalculator_h +#define CMessagePartDescriptorCalculator_h + +namespace Caf { + +class CMessagePartDescriptorCalculator { +public: + static uint32 getMaxPartSize(); + + static std::deque calculateSourcePartRecords( + const SmartPtrCDynamicByteArray& payload); + +private: + static std::deque refactorMessageIntoPartRecords( + const std::string& workingDirectory, + const SmartPtrCDynamicByteArray& payload); + + static std::deque splitMessagePartRecords( + std::deque& messageParts); + +private: + CAF_CM_DECLARE_NOCREATE(CMessagePartDescriptorCalculator); +}; + +} + +#endif /* CMessagePartDescriptorCalculator_h */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartDescriptorSourceRecord.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartDescriptorSourceRecord.cpp new file mode 100644 index 000000000..8f7d1a37d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartDescriptorSourceRecord.cpp @@ -0,0 +1,66 @@ +/* + * Created on: Nov 26, 2014 + * Author: bwilliams + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CMessagePartDescriptorSourceRecord.h" + +using namespace Caf; + +CMessagePartDescriptorSourceRecord::CMessagePartDescriptorSourceRecord() : + _isInitialized(false), + _attachmentNumber(0), + _dataOffset(0), + _dataLength(0), + CAF_CM_INIT("CMessagePartDescriptorSourceRecord") { +} + +CMessagePartDescriptorSourceRecord::~CMessagePartDescriptorSourceRecord() { +} + +void CMessagePartDescriptorSourceRecord::initialize( + const uint16 attachmentNumber, + const std::string filePath, + const uint32 dataOffset, + const uint32 dataLength) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _attachmentNumber = attachmentNumber; + _filePath = filePath; + _dataOffset = dataOffset; + _dataLength = dataLength; + _isInitialized = true; +} + +uint16 CMessagePartDescriptorSourceRecord::getAttachmentNumber() const { + CAF_CM_FUNCNAME_VALIDATE("getAttachmentNumber"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _attachmentNumber; +} + +std::string CMessagePartDescriptorSourceRecord::getFilePath() const { + CAF_CM_FUNCNAME_VALIDATE("getFilePath"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _filePath; +} + +uint32 CMessagePartDescriptorSourceRecord::getDataOffset() const { + CAF_CM_FUNCNAME_VALIDATE("getDataOffset"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _dataOffset; +} + +uint32 CMessagePartDescriptorSourceRecord::getDataLength() const { + CAF_CM_FUNCNAME_VALIDATE("getDataLength"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _dataLength; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartDescriptorSourceRecord.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartDescriptorSourceRecord.h new file mode 100644 index 000000000..6055746e7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartDescriptorSourceRecord.h @@ -0,0 +1,51 @@ +/* + * Created on: Nov 26, 2014 + * Author: bwilliams + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CMessagePartDescriptorSourceRecord_h +#define CMessagePartDescriptorSourceRecord_h + +namespace Caf { + +class CMessagePartDescriptorSourceRecord { +public: + CMessagePartDescriptorSourceRecord(); + virtual ~CMessagePartDescriptorSourceRecord(); + +public: + void initialize( + const uint16 attachmentNumber, + const std::string filePath, + const uint32 dataOffset, + const uint32 dataLength); + +public: + uint16 getAttachmentNumber() const; + + std::string getFilePath() const; + + uint32 getDataOffset() const; + + uint32 getDataLength() const; + +private: + bool _isInitialized; + uint16 _attachmentNumber; + std::string _filePath; + uint32 _dataOffset; + uint32 _dataLength; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CMessagePartDescriptorSourceRecord); +}; + +CAF_DECLARE_SMART_POINTER(CMessagePartDescriptorSourceRecord); + +} + +#endif /* CMessagePartDescriptorSourceRecord_h */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartRecord.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartRecord.cpp new file mode 100644 index 000000000..0dde3c8ad --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartRecord.cpp @@ -0,0 +1,94 @@ +/* + * Created on: Nov 26, 2014 + * Author: bwilliams + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CMessagePartRecord.h" + +using namespace Caf; + +CMessagePartRecord::CMessagePartRecord() : + _isInitialized(false), + _attachmentNumber(0), + _dataOffset(0), + _dataLength(0), + CAF_CM_INIT("CMessagePartRecord") { +} + +CMessagePartRecord::~CMessagePartRecord() { +} + +void CMessagePartRecord::initialize( + const uint16 attachmentNumber, + const std::string filePath, + const uint64 dataOffset, + const uint64 dataLength) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _attachmentNumber = attachmentNumber; + _filePath = filePath; + _dataOffset = dataOffset; + _dataLength = dataLength; + _isInitialized = true; +} + +uint16 CMessagePartRecord::getAttachmentNumber() const { + CAF_CM_FUNCNAME_VALIDATE("getAttachmentNumber"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _attachmentNumber; +} + +std::string CMessagePartRecord::getFilePath() const { + CAF_CM_FUNCNAME_VALIDATE("getFilePath"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _filePath; +} + +uint64 CMessagePartRecord::getDataOffset() const { + CAF_CM_FUNCNAME_VALIDATE("getDataOffset"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _dataOffset; +} + +uint64 CMessagePartRecord::getDataLength() const { + CAF_CM_FUNCNAME_VALIDATE("getDataLength"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _dataLength; +} + +void CMessagePartRecord::setAttachmentNumber(const uint16 attachmentNumber) { + CAF_CM_FUNCNAME_VALIDATE("setAttachmentNumber"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + _attachmentNumber = attachmentNumber; +} + +void CMessagePartRecord::setFilePath(const std::string& filePath) { + CAF_CM_FUNCNAME_VALIDATE("setFilePath"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + _filePath = filePath; +} + +void CMessagePartRecord::setDataOffset(const uint64 dataOffset) { + CAF_CM_FUNCNAME_VALIDATE("setDataOffset"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + _dataOffset = dataOffset; +} + +void CMessagePartRecord::setDataLength(const uint64 dataLength) { + CAF_CM_FUNCNAME_VALIDATE("setDataLength"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + _dataLength = dataLength; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartRecord.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartRecord.h new file mode 100644 index 000000000..837a37ebf --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartRecord.h @@ -0,0 +1,59 @@ +/* + * Created on: Nov 26, 2014 + * Author: bwilliams + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CMessagePartRecord_h +#define CMessagePartRecord_h + +namespace Caf { + +class CMessagePartRecord { +public: + CMessagePartRecord(); + virtual ~CMessagePartRecord(); + +public: + void initialize( + const uint16 attachmentNumber, + const std::string filePath, + const uint64 dataOffset, + const uint64 dataLength); + +public: + uint16 getAttachmentNumber() const; + + std::string getFilePath() const; + + uint64 getDataOffset() const; + + uint64 getDataLength() const; + + void setAttachmentNumber(const uint16 attachmentNumber); + + void setFilePath(const std::string& filePath); + + void setDataOffset(const uint64 dataOffset); + + void setDataLength(const uint64 dataLength); + +private: + bool _isInitialized; + uint16 _attachmentNumber; + std::string _filePath; + uint64 _dataOffset; + uint64 _dataLength; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CMessagePartRecord); +}; + +CAF_DECLARE_SMART_POINTER(CMessagePartRecord); + +} + +#endif /* CMessagePartRecord_h */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartsBuilder.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartsBuilder.cpp new file mode 100644 index 000000000..469cd9ec2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartsBuilder.cpp @@ -0,0 +1,113 @@ +/* Created on: Nov 19, 2014 + * Author: bwilliams + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CMessagePartsBuilder.h" + +using namespace Caf; + +void CMessagePartsBuilder::put( + const byte value, + SmartPtrCDynamicByteArray& buffer) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CMessagePartsBuilder", "put(byte)"); + CAF_CM_VALIDATE_SMARTPTR(buffer); + +// const size_t currentPos = buffer->getByteCount() - buffer->getByteCountFromCurrentPos(); + + buffer->memAppend(&value, sizeof(value)); + +// CAF_CM_LOG_DEBUG_VA2("buffer - pos: %d, val: %02x", currentPos, value); +} + +void CMessagePartsBuilder::put( + const uint16 value, + SmartPtrCDynamicByteArray& buffer) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CMessagePartsBuilder", "put(uint16)"); + CAF_CM_VALIDATE_SMARTPTR(buffer); + +// const size_t currentPos = buffer->getByteCount() - buffer->getByteCountFromCurrentPos(); + + byte buf[2]; + buf[0] = value >> 8; + buf[1] = value >> 0; + putBytes(buf, 2, buffer); + +// CAF_CM_LOG_DEBUG_VA4("buffer - pos: %d, val: %04x, buf: %02x %02x", currentPos, value, buf[0], buf[1]); +} + +void CMessagePartsBuilder::put( + const uint32 value, + SmartPtrCDynamicByteArray& buffer) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CMessagePartsBuilder", "put(uint32)"); + CAF_CM_VALIDATE_SMARTPTR(buffer); + +// const size_t currentPos = buffer->getByteCount() - buffer->getByteCountFromCurrentPos(); + + byte buf[4]; + buf[0] = value >> 24; + buf[1] = value >> 16; + buf[2] = value >> 8; + buf[3] = value >> 0; + putBytes(buf, 4, buffer); + +// CAF_CM_LOG_DEBUG_VA6("buffer - pos: %d, val: %08x, buf: %02x %02x %02x %02x", currentPos, value, buf[0], buf[1], buf[2], buf[3]); +} + +void CMessagePartsBuilder::put( + const uint64 value, + SmartPtrCDynamicByteArray& buffer) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CMessagePartsBuilder", "put(uint64)"); + CAF_CM_VALIDATE_SMARTPTR(buffer); + +// const size_t currentPos = buffer->getByteCount() - buffer->getByteCountFromCurrentPos(); + + byte buf[8]; +#ifdef WIN32 +#pragma warning(push) +#pragma warning(disable: 4244) +#endif + buf[0] = value >> 56; + buf[1] = value >> 48; + buf[2] = value >> 40; + buf[3] = value >> 32; + buf[4] = value >> 24; + buf[5] = value >> 16; + buf[6] = value >> 8; + buf[7] = value >> 0; +#ifdef WIN32 +#pragma warning(pop) +#endif + putBytes(buf, 8, buffer); + +// CAF_CM_LOG_DEBUG_VA6("buffer - pos: %d, val: %016x, buf: %02x %02x %02x %02x", currentPos, value, buf[0], buf[1], buf[2], buf[3]); +// CAF_CM_LOG_DEBUG_VA6("buffer - pos: %d, val: %016x, buf: %02x %02x %02x %02x", currentPos, value, buf[4], buf[5], buf[6], buf[7]); +} + +void CMessagePartsBuilder::put( + const UUID value, + SmartPtrCDynamicByteArray& buffer) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CMessagePartsBuilder", "put(UUID)"); + CAF_CM_VALIDATE_SMARTPTR(buffer); + + put(static_cast(value.Data1), buffer); + put(static_cast(value.Data2), buffer); + put(static_cast(value.Data3), buffer); + putBytes(value.Data4, 8, buffer); +} + +void CMessagePartsBuilder::putBytes( + const byte* buf, + const uint32 bufLen, + SmartPtrCDynamicByteArray& buffer) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CMessagePartsBuilder", "putBytes"); + CAF_CM_VALIDATE_PTR(buf); + CAF_CM_VALIDATE_SMARTPTR(buffer); + + for (uint32 index = 0; index < bufLen; index++) { + buffer->memAppend(&buf[index], sizeof(buf[index])); + } +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartsBuilder.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartsBuilder.h new file mode 100644 index 000000000..9cd77931c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartsBuilder.h @@ -0,0 +1,35 @@ +/* + * Created on: Nov 19, 2014 + * Author: bwilliams + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CMessagePartsBuilder_h +#define CMessagePartsBuilder_h + +namespace Caf { + +/** + * Class that emits and parses message parts header blocks.
+ */ +class CMessagePartsBuilder { +public: + static void put(const byte value, SmartPtrCDynamicByteArray& buffer); + static void put(const uint16 value, SmartPtrCDynamicByteArray& buffer); + static void put(const uint32 value, SmartPtrCDynamicByteArray& buffer); + static void put(const uint64 value, SmartPtrCDynamicByteArray& buffer); + static void put(const GUID value, SmartPtrCDynamicByteArray& buffer); + +private: + static void putBytes(const byte* buf, const uint32 bufLen, + SmartPtrCDynamicByteArray& buffer); + +private: + CAF_CM_DECLARE_NOCREATE(CMessagePartsBuilder); +}; + +} + +#endif /* CMessagePartsBuilder_h */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartsHeader.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartsHeader.cpp new file mode 100644 index 000000000..0b2d215b5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartsHeader.cpp @@ -0,0 +1,152 @@ +/* Created on: Nov 19, 2014 + * Author: bwilliams + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CMessagePartsHeader.h" + +using namespace Caf; + +/** + * Converts the BLOCK_SIZE data in a ByteBuffer into a MessagePartsHeader + *

+ * The incoming ByteBuffer position will be modified. + * @param buffer ByteBuffer to convert + * @return a MessagePartsHeader + */ +SmartPtrCMessagePartsHeader CMessagePartsHeader::fromByteBuffer( + SmartPtrCDynamicByteArray& buffer) { + CAF_CM_STATIC_FUNC_LOG("CMessagePartsHeader", "fromByteBuffer"); + CAF_CM_VALIDATE_SMARTPTR(buffer); + + if (buffer->getByteCountFromCurrentPos() < BLOCK_SIZE) { + CAF_CM_EXCEPTION_VA2(E_INVALIDARG, + "Input data block is too small - rem: %d, tot: %d", + buffer->getByteCountFromCurrentPos(), buffer->getByteCount()); + } + + SmartPtrCDynamicByteArray data; + data.CreateInstance(); + data->allocateBytes(BLOCK_SIZE); + data->memCpy(buffer->getPtrAtCurrentPos(), BLOCK_SIZE); + + buffer->incrementCurrentPos(BLOCK_SIZE); + + return fromArray(data); +} + +/** + * Converts a byte array into a MessagePartsHeader + * @param blockData byte array to convert + * @return a MessagePartsHeader + */ +SmartPtrCMessagePartsHeader CMessagePartsHeader::fromArray( + SmartPtrCDynamicByteArray& buffer) { + CAF_CM_STATIC_FUNC_LOG("CMessagePartsHeader", "fromArray"); + CAF_CM_VALIDATE_SMARTPTR(buffer); + + if (buffer->getByteCount() < BLOCK_SIZE) { + CAF_CM_EXCEPTION_VA1(E_INVALIDARG, "Input data block is too small - %d", + buffer->getByteCount()); + } + + const int32 version = CMessagePartsParser::getByte(buffer); + if (version != CAF_MSG_VERSION) { + CAF_CM_EXCEPTION_VA2(E_INVALIDARG, "Input data block version is incorrect: %d != %d", version, CAF_MSG_VERSION); + } + + const byte resvd1 = CMessagePartsParser::getByte(buffer); + const byte resvd2 = CMessagePartsParser::getByte(buffer); + const byte resvd3 = CMessagePartsParser::getByte(buffer); + if (resvd1 != RESERVED1 || resvd2 != RESERVED2 || resvd3 != RESERVED3) { + CAF_CM_EXCEPTION_VA0(E_INVALIDARG, "Input data block reserved bits are incorrect"); + } + + const UUID correlationId = CMessagePartsParser::getGuid(buffer); + const uint32 numberOfParts = CMessagePartsParser::getUint32(buffer); + buffer->verify(); + + SmartPtrCMessagePartsHeader messagePartsHeader; + messagePartsHeader.CreateInstance(); + messagePartsHeader->initialize(correlationId, numberOfParts); + + return messagePartsHeader; +} + +/** + * Create a byte array representation of a descriptor block + * @param correlationId the correlation id + * @param numberOfParts the number of message parts + * @return the byte array containing the encoded data + */ +SmartPtrCDynamicByteArray CMessagePartsHeader::toArray( + const UUID correlationId, + const uint32 numberOfParts) { + SmartPtrCDynamicByteArray buffer; + buffer.CreateInstance(); + buffer->allocateBytes(BLOCK_SIZE); + + CMessagePartsBuilder::put(CAF_MSG_VERSION, buffer); + CMessagePartsBuilder::put(RESERVED1, buffer); + CMessagePartsBuilder::put(RESERVED2, buffer); + CMessagePartsBuilder::put(RESERVED3, buffer); + CMessagePartsBuilder::put(correlationId, buffer); + CMessagePartsBuilder::put(numberOfParts, buffer); + buffer->verify(); + + return buffer; +} + +CMessagePartsHeader::CMessagePartsHeader() : + _isInitialized(false), + _correlationId(CAFCOMMON_GUID_NULL), + _numberOfParts(0), + CAF_CM_INIT("CMessagePartsHeader") { +} + +CMessagePartsHeader::~CMessagePartsHeader() { +} + +void CMessagePartsHeader::initialize( + const UUID correlationId, + const uint32 numberOfParts) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + this->_correlationId = correlationId; + this->_numberOfParts = numberOfParts; + _isInitialized = true; +} + +/** + * @return the correlationId + */ +UUID CMessagePartsHeader::getCorrelationId() const { + CAF_CM_FUNCNAME_VALIDATE("getCorrelationId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _correlationId; +} + +/** + * @return the correlationId + */ +std::string CMessagePartsHeader::getCorrelationIdStr() const { + CAF_CM_FUNCNAME_VALIDATE("getCorrelationId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return BasePlatform::UuidToString(_correlationId); +} + +/** + * @return the numberOfParts + */ +uint32 CMessagePartsHeader::getNumberOfParts() const { + CAF_CM_FUNCNAME_VALIDATE("getNumberOfParts"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _numberOfParts; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartsHeader.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartsHeader.h new file mode 100644 index 000000000..3b3adce94 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartsHeader.h @@ -0,0 +1,89 @@ +/* + * Created on: Nov 19, 2014 + * Author: bwilliams + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CMessagePartsHeader_h +#define CMessagePartsHeader_h + +namespace Caf { + +class CMessagePartsHeader; +CAF_DECLARE_SMART_POINTER(CMessagePartsHeader); + +/** + * Class that emits and parses message parts header blocks.
+ */ +class CMessagePartsHeader { +public: + /** + * Converts the BLOCK_SIZE data in a ByteBuffer into a MessagePartsHeader + *

+ * The incoming ByteBuffer position will be modified. + * @param buffer ByteBuffer to convert + * @return a MessagePartsHeader + */ + static SmartPtrCMessagePartsHeader fromByteBuffer(SmartPtrCDynamicByteArray& buffer); + + /** + * Converts a byte array into a MessagePartsHeader + * @param blockData byte array to convert + * @return a MessagePartsHeader + */ + static SmartPtrCMessagePartsHeader fromArray(SmartPtrCDynamicByteArray& blockData); + + static SmartPtrCDynamicByteArray toArray(const UUID correlationId, + const uint32 numberOfParts); + +public: + CMessagePartsHeader(); + virtual ~CMessagePartsHeader(); + +public: + /** + * @param correlationId the correlation id + * @param numberOfParts the total number of parts + */ + void initialize( + const UUID correlationId, + const uint32 numberOfParts); + + /** + * @return the correlationId + */ + UUID getCorrelationId() const; + std::string getCorrelationIdStr() const; + + /** + * @return the numberOfParts + */ + uint32 getNumberOfParts() const; + +public: + /** + * The BLOCK_SIZE field stores the size of a MessagePartsHeader in byte array form.
+ */ + static const uint32 BLOCK_SIZE = 24; + static const byte CAF_MSG_VERSION = 1; + +private: + static const byte RESERVED1 = (byte)0xcd; + static const byte RESERVED2 = (byte)0xcd; + static const byte RESERVED3 = (byte)0xcd; + +private: + bool _isInitialized; + UUID _correlationId; + uint32 _numberOfParts; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CMessagePartsHeader); +}; + +} + +#endif /* CMessagePartsHeader_h */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartsParser.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartsParser.cpp new file mode 100644 index 000000000..b79d80883 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartsParser.cpp @@ -0,0 +1,163 @@ +/* Created on: Nov 19, 2014 + * Author: bwilliams + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CMessagePartsParser.h" + +using namespace Caf; + +byte CMessagePartsParser::getByte(SmartPtrCDynamicByteArray& buffer) { + CAF_CM_STATIC_FUNC_VALIDATE("CMessagePartsParser", "getByte"); + CAF_CM_VALIDATE_SMARTPTR(buffer); + +// const size_t currentPos = buffer->getByteCount() - buffer->getByteCountFromCurrentPos(); + + const byte rc = buffer->getAtCurrentPos(); + buffer->incrementCurrentPos(1); + +// CAF_CM_LOG_DEBUG_VA2("buffer - pos: %d, val: %02x", currentPos, rc); + + return rc; +} + +uint16 CMessagePartsParser::getUint16(SmartPtrCDynamicByteArray& buffer) { + CAF_CM_STATIC_FUNC_VALIDATE("CMessagePartsParser", "getUint16"); + CAF_CM_VALIDATE_SMARTPTR(buffer); + +// const size_t currentPos = buffer->getByteCount() - buffer->getByteCountFromCurrentPos(); + + byte buf[2]; + buf[0] = buffer->getAtCurrentPos(); + buffer->incrementCurrentPos(1); + buf[1] = buffer->getAtCurrentPos(); + buffer->incrementCurrentPos(1); + + // Little and Big Endian + //const uint16 val = (buf[0]<<0) | (buf[1]<<8); + const uint16 val = (buf[0]<<8) | (buf[1]<<0); + +// CAF_CM_LOG_DEBUG_VA4("buffer - pos: %d, val: %04x, buf: %02x %02x", currentPos, val, buf[0], buf[1]); + + return val; +} + +uint32 CMessagePartsParser::getUint32(SmartPtrCDynamicByteArray& buffer) { + CAF_CM_STATIC_FUNC_VALIDATE("CMessagePartsParser", "getUint32"); + CAF_CM_VALIDATE_SMARTPTR(buffer); + +// const size_t currentPos = buffer->getByteCount() - buffer->getByteCountFromCurrentPos(); + + byte buf[4]; + buf[0] = buffer->getAtCurrentPos(); + buffer->incrementCurrentPos(1); + buf[1] = buffer->getAtCurrentPos(); + buffer->incrementCurrentPos(1); + buf[2] = buffer->getAtCurrentPos(); + buffer->incrementCurrentPos(1); + buf[3] = buffer->getAtCurrentPos(); + buffer->incrementCurrentPos(1); + + // Little and Big Endian + //const uint32 val = (buf[0]<<0) | (buf[1]<<8) | (buf[2]<<16) | (buf[3]<<24); + const uint32 val = (buf[0]<<24) | (buf[1]<<16) | (buf[2]<<8) | (buf[3]<<0); + +// CAF_CM_LOG_DEBUG_VA6("buffer - pos: %d, val: %08x, buf: %02x %02x %02x %02x", currentPos, val, buf[0], buf[1], buf[2], buf[3]); + + return val; +} + +uint64 CMessagePartsParser::getUint64(SmartPtrCDynamicByteArray& buffer) { + CAF_CM_STATIC_FUNC_VALIDATE("CMessagePartsParser", "getUint64"); + CAF_CM_VALIDATE_SMARTPTR(buffer); + +// const size_t currentPos = buffer->getByteCount() - buffer->getByteCountFromCurrentPos(); + + byte buf[8]; + buf[0] = buffer->getAtCurrentPos(); + buffer->incrementCurrentPos(1); + buf[1] = buffer->getAtCurrentPos(); + buffer->incrementCurrentPos(1); + buf[2] = buffer->getAtCurrentPos(); + buffer->incrementCurrentPos(1); + buf[3] = buffer->getAtCurrentPos(); + buffer->incrementCurrentPos(1); + buf[4] = buffer->getAtCurrentPos(); + buffer->incrementCurrentPos(1); + buf[5] = buffer->getAtCurrentPos(); + buffer->incrementCurrentPos(1); + buf[6] = buffer->getAtCurrentPos(); + buffer->incrementCurrentPos(1); + buf[7] = buffer->getAtCurrentPos(); + buffer->incrementCurrentPos(1); + + // Little and Big Endian +// const uint64 val = +// (buf[0]<<0) +// | (buf[1]<<8) +// | (buf[2]<<16) +// | (buf[3]<<24) +// | (static_cast(buf[4])<<32) +// | (static_cast(buf[5])<<40) +// | (static_cast(buf[6])<<48) +// | (static_cast(buf[7])<<56); + const uint64 val = + (static_cast(buf[0])<<56) + | (static_cast(buf[1])<<48) + | (static_cast(buf[2])<<40) + | (static_cast(buf[3])<<32) + | (buf[4]<<24) + | (buf[5]<<16) + | (buf[6]<<8) + | (buf[7]<<0); + +// CAF_CM_LOG_DEBUG_VA6("buffer - pos: %d, val: %016x, buf: %02x %02x %02x %02x", currentPos, val, buf[0], buf[1], buf[2], buf[3]); +// CAF_CM_LOG_DEBUG_VA6("buffer - pos: %d, val: %016x, buf: %02x %02x %02x %02x", currentPos, val, buf[4], buf[5], buf[6], buf[7]); + + return val; +} + +UUID CMessagePartsParser::getGuid(SmartPtrCDynamicByteArray& buffer) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CMessagePartsParser", "getGuid"); + CAF_CM_VALIDATE_SMARTPTR(buffer); + + UUID guid; + guid.Data1 = getUint32(buffer); + guid.Data2 = getUint16(buffer); + guid.Data3 = getUint16(buffer); + get8Bytes(buffer, guid.Data4); + + CAF_CM_LOG_DEBUG_VA1("guid - %s", BasePlatform::UuidToString(guid).c_str()); + + return guid; +} + +void CMessagePartsParser::get8Bytes(SmartPtrCDynamicByteArray& buffer, byte* buf) { + CAF_CM_STATIC_FUNC_VALIDATE("CMessagePartsParser", "get8Bytes"); + CAF_CM_VALIDATE_SMARTPTR(buffer); + +// const size_t currentPos = buffer->getByteCount() - buffer->getByteCountFromCurrentPos(); + + buf[0] = buffer->getAtCurrentPos(); + buffer->incrementCurrentPos(1); + buf[1] = buffer->getAtCurrentPos(); + buffer->incrementCurrentPos(1); + buf[2] = buffer->getAtCurrentPos(); + buffer->incrementCurrentPos(1); + buf[3] = buffer->getAtCurrentPos(); + buffer->incrementCurrentPos(1); + buf[4] = buffer->getAtCurrentPos(); + buffer->incrementCurrentPos(1); + buf[5] = buffer->getAtCurrentPos(); + buffer->incrementCurrentPos(1); + buf[6] = buffer->getAtCurrentPos(); + buffer->incrementCurrentPos(1); + buf[7] = buffer->getAtCurrentPos(); + buffer->incrementCurrentPos(1); + +// CAF_CM_LOG_DEBUG_VA5("buffer - pos: %d, buf: %02x %02x %02x %02x", currentPos, buf[0], buf[1], buf[2], buf[3]); +// CAF_CM_LOG_DEBUG_VA5("buffer - pos: %d, buf: %02x %02x %02x %02x", currentPos, buf[4], buf[5], buf[6], buf[7]); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartsParser.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartsParser.h new file mode 100644 index 000000000..936335f57 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartsParser.h @@ -0,0 +1,32 @@ +/* + * Created on: Nov 19, 2014 + * Author: bwilliams + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CMessagePartsParser_h +#define CMessagePartsParser_h + +namespace Caf { + +/** + * Class that emits and parses message parts header blocks.
+ */ +class CMessagePartsParser { +public: + static byte getByte(SmartPtrCDynamicByteArray& buffer); + static uint16 getUint16(SmartPtrCDynamicByteArray& buffer); + static uint32 getUint32(SmartPtrCDynamicByteArray& buffer); + static uint64 getUint64(SmartPtrCDynamicByteArray& buffer); + static UUID getGuid(SmartPtrCDynamicByteArray& buffer); + static void get8Bytes(SmartPtrCDynamicByteArray& buffer, byte* data); + +private: + CAF_CM_DECLARE_NOCREATE(CMessagePartsParser); +}; + +} + +#endif /* CMessagePartsParser_h */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/COutgoingMessageHandler.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/COutgoingMessageHandler.cpp new file mode 100644 index 000000000..429653cce --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/COutgoingMessageHandler.cpp @@ -0,0 +1,245 @@ +/* + * Created on: Nov 25, 2014 + * Author: bwilliams + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "COutgoingMessageHandler.h" + +#include + +using namespace Caf; + +COutgoingMessageHandler::COutgoingMessageHandler() : + _isInitialized(false), + CAF_CM_INIT_LOG("COutgoingMessageHandler") { +} + +COutgoingMessageHandler::~COutgoingMessageHandler() { +} + +void COutgoingMessageHandler::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + CAF_CM_VALIDATE_STL_EMPTY(properties); + + _isInitialized = true; +} + +void COutgoingMessageHandler::terminateBean() { +} + +/** + * Handles the incoming management request message + *

+ * Incoming messages are checked for local attachments that need to be transmitted. + * If the resulting message would be too large to transmit then multiple message + * records are created and stored for the {@link OutgoingMessageProducer} to handle. If the + * message is small enough to fit in a single transmission then it will be returned + * from this handler if a message receipt is not requested. + * + * @param message the incoming management request message + * @return null if the message must be transmitted as multiple parts or the message itself if it can be transmitted as is + */ +SmartPtrIIntMessage COutgoingMessageHandler::processMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME("processMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + SmartPtrIIntMessage rc; + + const SmartPtrCPayloadEnvelopeDoc payloadEnvelope = + CCafMessagePayloadParser::getPayloadEnvelope(message->getPayload()); + + // Touch up the outgoing message headers first so that they are + // preserved through the rest of the system. + IIntMessage::SmartPtrCHeaders headers = message->getHeaders(); + + std::deque messagePartSourceRecords = + CMessagePartDescriptorCalculator::calculateSourcePartRecords(message->getPayload()); + if (messagePartSourceRecords.empty()) { + rc = augmentHeaders(false, message); + } else { + // Message splitting required. Iterate the message parts and group them + // such that each group of parts will fill maxPartSize bytes when transmitted. + std::deque deliveryRecords; + const uint32 maxPartSize = CMessagePartDescriptorCalculator::getMaxPartSize(); + const std::string correlationIdStr = CStringUtils::createRandomUuid(); + + UUID correlationId; + BasePlatform::UuidFromString(correlationIdStr.c_str(), correlationId); + + uint32 startPartNumber = 1; + uint32 currentPartSize = 0; + std::deque deliveryParts; + for (TConstIterator > sourceRecordIter(messagePartSourceRecords); + sourceRecordIter; sourceRecordIter++) { + const SmartPtrCMessagePartDescriptorSourceRecord sourceRecord = *sourceRecordIter; + deliveryParts.push_back(sourceRecord); + currentPartSize += sourceRecord->getDataLength(); + if (currentPartSize == maxPartSize) { + if (CAF_CM_IS_LOG_DEBUG_ENABLED) { + CAF_CM_LOG_DEBUG_VA5( + "Adding message delivery record [size=%d][totalNumParts=%d][startPartNum=%d][parts=%d][correlationId=%s]", + currentPartSize, messagePartSourceRecords.size(), + startPartNumber, deliveryParts.size(), correlationIdStr.c_str()); + } + + SmartPtrCMessageDeliveryRecord deliveryRecord; + deliveryRecord.CreateInstance(); + deliveryRecord->initialize(correlationId, + static_cast(messagePartSourceRecords.size()), + startPartNumber, deliveryParts, message->getHeaders()); + + deliveryRecords.push_back(deliveryRecord); + + startPartNumber += static_cast(deliveryParts.size()); + deliveryParts.clear(); + currentPartSize = 0; + } else if (currentPartSize > maxPartSize) { + CAF_CM_EXCEPTION_VA2(ERROR_BUFFER_OVERFLOW, + "Buffer overflow - currentPartSize: %d, maxPartSize: %d", + currentPartSize, maxPartSize); + } + } + + if (currentPartSize > 0) { + if (CAF_CM_IS_LOG_DEBUG_ENABLED) { + CAF_CM_LOG_DEBUG_VA5( + "Adding message delivery record [size=%d][totalNumParts=%d][startPartNum=%d][parts=%d][correlationId=%s]", + currentPartSize, messagePartSourceRecords.size(), + startPartNumber, deliveryParts.size(), correlationIdStr.c_str()); + } + + SmartPtrCMessageDeliveryRecord deliveryRecord; + deliveryRecord.CreateInstance(); + deliveryRecord->initialize(correlationId, + static_cast(messagePartSourceRecords.size()), + startPartNumber, deliveryParts, message->getHeaders()); + + deliveryRecords.push_back(deliveryRecord); + } + + if (deliveryRecords.size() != 1) { + CAF_CM_EXCEPTION_VA1(ERROR_NOT_SUPPORTED, + "Currently supports only one delivery record (i.e. no chunking) - size: %d", + deliveryRecords.size()); + } + + const SmartPtrIIntMessage newMessage = rehydrateMultiPartMessage( + deliveryRecords.back(), IIntMessage::SmartPtrCHeaders()); + rc = augmentHeaders(true, newMessage); + } + + CMessageHeaderUtils::log(rc->getHeaders()); + + return rc; +} + +SmartPtrIIntMessage COutgoingMessageHandler::rehydrateMultiPartMessage( + const SmartPtrCMessageDeliveryRecord& deliveryRecord, + const IIntMessage::SmartPtrCHeaders& addlHeaders) { + CAF_CM_STATIC_FUNC_LOG("COutgoingMessageHandler", "rehydrateMultiPartMessage"); + CAF_CM_VALIDATE_SMARTPTR(deliveryRecord); + // addlHeaders are optional + + uint32 payloadSize = CMessagePartsHeader::BLOCK_SIZE; + const std::deque sourceRecords = deliveryRecord->getMessagePartSources(); + for (TConstIterator > sourceRecordIter(sourceRecords); + sourceRecordIter; sourceRecordIter++) { + const SmartPtrCMessagePartDescriptorSourceRecord sourceRecord = *sourceRecordIter; + payloadSize += CMessagePartDescriptor::BLOCK_SIZE + sourceRecord->getDataLength(); + } + + SmartPtrCDynamicByteArray payload; + payload.CreateInstance(); + payload->allocateBytes(payloadSize); + + const SmartPtrCDynamicByteArray partsHeader = CMessagePartsHeader::toArray( + deliveryRecord->getCorrelationId(), deliveryRecord->getNumberOfParts()); + payload->memAppend(partsHeader->getPtr(), partsHeader->getByteCount()); + + uint32 partNumber = deliveryRecord->getStartingPartNumber(); + if (CAF_CM_IS_LOG_DEBUG_ENABLED) { + CAF_CM_LOG_DEBUG_VA3("[# sourceRecords=%d][payloadSize=%d][startingPartNumber=%d]", + sourceRecords.size(), payloadSize, partNumber); + } + + for (TConstIterator > sourceRecordIter(sourceRecords); + sourceRecordIter; sourceRecordIter++) { + const SmartPtrCMessagePartDescriptorSourceRecord sourceRecord = *sourceRecordIter; + + const SmartPtrCDynamicByteArray partDescriptor = CMessagePartDescriptor::toArray( + sourceRecord->getAttachmentNumber(), partNumber++, sourceRecord->getDataLength(), + sourceRecord->getDataOffset()); + payload->memAppend(partDescriptor->getPtr(), partDescriptor->getByteCount()); + + CAF_CM_LOG_DEBUG_VA3("Reading from file - file: %s, len: %d, offset: %d", + sourceRecord->getFilePath().c_str(), sourceRecord->getDataLength(), + sourceRecord->getDataOffset()); + + std::ifstream file(sourceRecord->getFilePath().c_str(), std::ios::binary); + try { + if (!file.is_open()) { + CAF_CM_EXCEPTION_VA1(ERROR_FILE_NOT_FOUND, + "Could not open binary file - %s", sourceRecord->getFilePath().c_str()); + } + + file.seekg(sourceRecord->getDataOffset(), std::ios::beg); + file.read(reinterpret_cast(payload->getNonConstPtrAtCurrentPos()), + sourceRecord->getDataLength()); + payload->verify(); + if (! file) { + CAF_CM_EXCEPTION_VA3(ERROR_BUFFER_OVERFLOW, + "Did not read full contents - file: %s, requested: %d, read: %d", + sourceRecord->getFilePath().c_str(), sourceRecord->getDataLength(), + file.gcount()); + } + + payload->incrementCurrentPos(sourceRecord->getDataLength()); + } + CAF_CM_CATCH_ALL; + file.close(); + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_THROWEXCEPTION; + } + + SmartPtrCIntMessage rc; + rc.CreateInstance(); + rc->initialize(payload, deliveryRecord->getMessageHeaders(), addlHeaders); + + return rc; +} + +SmartPtrIIntMessage COutgoingMessageHandler::augmentHeaders( + const bool isMultiPart, + const SmartPtrIIntMessage& message) { + CAF_CM_STATIC_FUNC_VALIDATE("COutgoingMessageHandler", "augmentHeaders"); + CAF_CM_VALIDATE_INTERFACE(message); + + std::string contentType; + if (isMultiPart) { + contentType = "application/octet-stream"; + } else { + contentType = "text/plain"; + } + + CIntMessageHeaders messageHeaders; + messageHeaders.insertBool(MessageHeaders::_sMULTIPART, isMultiPart); + messageHeaders.insertString(AmqpIntegration::DefaultAmqpHeaderMapper::CONTENT_TYPE, + contentType); + + SmartPtrCIntMessage messageImpl; + messageImpl.CreateInstance(); + messageImpl->initialize(message->getPayload(), messageHeaders.getHeaders(), + message->getHeaders()); + + return messageImpl; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/COutgoingMessageHandler.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/COutgoingMessageHandler.h new file mode 100644 index 000000000..9d9fa5343 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/COutgoingMessageHandler.h @@ -0,0 +1,59 @@ +/* + * Created on: Nov 25, 2014 + * Author: bwilliams + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef COutgoingMessageHandler_h +#define COutgoingMessageHandler_h + +using namespace Caf; + +class COutgoingMessageHandler : + public TCafSubSystemObjectRoot, + public IBean, + public IMessageProcessor { +public: + COutgoingMessageHandler(); + virtual ~COutgoingMessageHandler(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdCommIntegrationOutgoingMessageHandler) + + CAF_BEGIN_INTERFACE_MAP(COutgoingMessageHandler) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IMessageProcessor) + CAF_END_INTERFACE_MAP() + +public: // IBean + virtual void initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties); + + virtual void terminateBean(); + +public: // IMessageProcessor + SmartPtrIIntMessage processMessage( + const SmartPtrIIntMessage& message); + +private: + static SmartPtrIIntMessage rehydrateMultiPartMessage( + const SmartPtrCMessageDeliveryRecord& deliveryRecord, + const IIntMessage::SmartPtrCHeaders& addlHeaders); + + static SmartPtrIIntMessage augmentHeaders( + const bool isMultiPart, + const SmartPtrIIntMessage& message); + +private: + bool _isInitialized; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(COutgoingMessageHandler); +}; + +#endif /* COutgoingMessageHandler_h */ + diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CProtocolHeaderEnricher.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CProtocolHeaderEnricher.cpp new file mode 100644 index 000000000..2b8f6583e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CProtocolHeaderEnricher.cpp @@ -0,0 +1,63 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CProtocolHeaderEnricher.h" + +using namespace Caf; + +CProtocolHeaderEnricher::CProtocolHeaderEnricher() : + _isInitialized(false), + CAF_CM_INIT("CProtocolHeaderEnricher") { +} + +CProtocolHeaderEnricher::~CProtocolHeaderEnricher() { +} + +void CProtocolHeaderEnricher::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + + _ctorArgs = ctorArgs; + _properties = properties; + initialize(); +} + +void CProtocolHeaderEnricher::terminateBean() { +} + +void CProtocolHeaderEnricher::initialize() { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _isInitialized = true; +} + +bool CProtocolHeaderEnricher::isResponsible( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("isResponsible"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + return false; +} + +SmartPtrIIntegrationObject CProtocolHeaderEnricher::createObject( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("createObject"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + SmartPtrIIntegrationObject rc; + rc.CreateInstance(_sObjIdCommIntegrationProtocolHeaderEnricherInstance); + rc->initialize(_ctorArgs, _properties, configSection); + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CProtocolHeaderEnricher.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CProtocolHeaderEnricher.h new file mode 100644 index 000000000..61e1e5079 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CProtocolHeaderEnricher.h @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CProtocolHeaderEnricher_h_ +#define CProtocolHeaderEnricher_h_ + +namespace Caf { + +/// Sends responses/errors back to the client. +class CProtocolHeaderEnricher : + public TCafSubSystemObjectRoot, + public IBean, + public IIntegrationComponent { +public: + CProtocolHeaderEnricher(); + virtual ~CProtocolHeaderEnricher(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdCommIntegrationProtocolHeaderEnricher) + + CAF_BEGIN_INTERFACE_MAP(CProtocolHeaderEnricher) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IIntegrationComponent) + CAF_END_INTERFACE_MAP() + +public: + virtual void initialize(); + +public: // IBean + virtual void initializeBean(const IBean::Cargs& ctorArgs, const IBean::Cprops& properties); + + virtual void terminateBean(); + +public: // IIntegrationComponent + bool isResponsible( + const SmartPtrIDocument& configSection) const; + + SmartPtrIIntegrationObject createObject( + const SmartPtrIDocument& configSection) const; + +private: + bool _isInitialized; + IBean::Cargs _ctorArgs; + IBean::Cprops _properties; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CProtocolHeaderEnricher); +}; + +} + +#endif // #ifndef CProtocolHeaderEnricher_h_ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CProtocolHeaderEnricherInstance.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CProtocolHeaderEnricherInstance.cpp new file mode 100644 index 000000000..fb9e6487d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CProtocolHeaderEnricherInstance.cpp @@ -0,0 +1,97 @@ +/* + * Created on: Aug 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CProtocolHeaderEnricherInstance.h" + +using namespace Caf; + +CProtocolHeaderEnricherInstance::CProtocolHeaderEnricherInstance() : + _isInitialized(false), + CAF_CM_INIT_LOG("CProtocolHeaderEnricherInstance") { +} + +CProtocolHeaderEnricherInstance::~CProtocolHeaderEnricherInstance() { +} + +void CProtocolHeaderEnricherInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + _id = configSection->findRequiredAttribute("id"); + _isInitialized = true; +} + +std::string CProtocolHeaderEnricherInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _id; +} + +void CProtocolHeaderEnricherInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); +} + +SmartPtrIIntMessage CProtocolHeaderEnricherInstance::transformMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("transformMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const SmartPtrCPayloadEnvelopeDoc payloadEnvelope = + CCafMessagePayloadParser::getPayloadEnvelope(message->getPayload()); + + const SmartPtrCProtocolDoc protocol = findProtocol(payloadEnvelope); + + UriUtils::SUriRecord uriRecord; + UriUtils::parseUriString(protocol->getUri(), uriRecord); + + SmartPtrCCafMessageHeadersWriter messageHeadersWriter = + CCafMessageHeadersWriter::create(); + messageHeadersWriter->setProtocol(uriRecord.protocol); + messageHeadersWriter->setProtocolAddress(uriRecord.address); + + CAF_CM_LOG_DEBUG_VA2( + "Enhanced the headers - protocol: \"%s\", connStr: \"%s\"", + uriRecord.protocol.c_str(), uriRecord.address.c_str()); + + SmartPtrCIntMessage messageImpl; + messageImpl.CreateInstance(); + messageImpl->initialize(message->getPayload(), + messageHeadersWriter->getHeaders(), message->getHeaders()); + + return messageImpl; +} + +SmartPtrCProtocolDoc CProtocolHeaderEnricherInstance::findProtocol( + const SmartPtrCPayloadEnvelopeDoc& payloadEnvelope) const { + CAF_CM_FUNCNAME("findProtocol"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(payloadEnvelope); + + const SmartPtrCProtocolCollectionDoc protocolCollectionDoc = + payloadEnvelope->getProtocolCollection(); + CAF_CM_VALIDATE_SMARTPTR(protocolCollectionDoc); + + const std::deque protocolCollection = + protocolCollectionDoc->getProtocol(); + + if (protocolCollection.size() != 1) { + CAF_CM_EXCEPTION_VA1(E_NOTIMPL, + "Multiple protocols are not yet supported - %d", + protocolCollection.size()); + } + + return *(protocolCollection.begin()); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CProtocolHeaderEnricherInstance.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CProtocolHeaderEnricherInstance.h new file mode 100644 index 000000000..f0cf6bd21 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CProtocolHeaderEnricherInstance.h @@ -0,0 +1,66 @@ +/* + * Created on: Aug 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CProtocolHeaderEnricherInstance_h +#define CProtocolHeaderEnricherInstance_h + +#include "ReplyToResolver.h" + +namespace Caf { + +class CProtocolHeaderEnricherInstance : + public TCafSubSystemObjectRoot, + public IIntegrationObject, + public IIntegrationComponentInstance, + public ITransformer { +public: + CProtocolHeaderEnricherInstance(); + virtual ~CProtocolHeaderEnricherInstance(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdCommIntegrationProtocolHeaderEnricherInstance) + + CAF_BEGIN_INTERFACE_MAP(CProtocolHeaderEnricherInstance) + CAF_INTERFACE_ENTRY(IIntegrationObject) + CAF_INTERFACE_ENTRY(IIntegrationComponentInstance) + CAF_INTERFACE_ENTRY(ITransformer) + CAF_END_INTERFACE_MAP() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ITransformer + SmartPtrIIntMessage transformMessage( + const SmartPtrIIntMessage& message); + +private: + SmartPtrCProtocolDoc findProtocol( + const SmartPtrCPayloadEnvelopeDoc& payloadEnvelope) const; + +private: + bool _isInitialized; + std::string _id; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CProtocolHeaderEnricherInstance); +}; + +} + +#endif /* CProtocolHeaderEnricherInstance_h */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CReplyToCacher.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CReplyToCacher.cpp new file mode 100644 index 000000000..717a9593c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CReplyToCacher.cpp @@ -0,0 +1,64 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CReplyToCacher.h" + +using namespace Caf; + +CReplyToCacher::CReplyToCacher() : + _isInitialized(false), + CAF_CM_INIT("CReplyToCacher") { +} + +CReplyToCacher::~CReplyToCacher() { +} + +void CReplyToCacher::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + CAF_CM_VALIDATE_STL_EMPTY(properties); + + _ctorArgs = ctorArgs; + _properties = properties; + initialize(); +} + +void CReplyToCacher::terminateBean() { +} + +void CReplyToCacher::initialize() { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _isInitialized = true; +} + +bool CReplyToCacher::isResponsible( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("isResponsible"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + return false; +} + +SmartPtrIIntegrationObject CReplyToCacher::createObject( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("createObject"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + SmartPtrIIntegrationObject rc; + rc.CreateInstance(_sObjIdCommIntegrationReplyToCacherInstance); + rc->initialize(_ctorArgs, _properties, configSection); + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CReplyToCacher.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CReplyToCacher.h new file mode 100644 index 000000000..fb5a78e24 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CReplyToCacher.h @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CReplyToCacher_h_ +#define CReplyToCacher_h_ + +namespace Caf { + +/// Sends responses/errors back to the client. +class CReplyToCacher : + public TCafSubSystemObjectRoot, + public IBean, + public IIntegrationComponent { +public: + CReplyToCacher(); + virtual ~CReplyToCacher(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdCommIntegrationReplyToCacher) + + CAF_BEGIN_INTERFACE_MAP(CReplyToCacher) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IIntegrationComponent) + CAF_END_INTERFACE_MAP() + +public: + virtual void initialize(); + +public: // IBean + virtual void initializeBean(const IBean::Cargs& ctorArgs, const IBean::Cprops& properties); + + virtual void terminateBean(); + +public: // IIntegrationComponent + bool isResponsible( + const SmartPtrIDocument& configSection) const; + + SmartPtrIIntegrationObject createObject( + const SmartPtrIDocument& configSection) const; + +private: + bool _isInitialized; + IBean::Cargs _ctorArgs; + IBean::Cprops _properties; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CReplyToCacher); +}; + +} + +#endif // #ifndef CReplyToCacher_h_ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CReplyToCacherInstance.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CReplyToCacherInstance.cpp new file mode 100644 index 000000000..8c8d36b8d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CReplyToCacherInstance.cpp @@ -0,0 +1,63 @@ +/* + * Created on: Aug 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CReplyToCacherInstance.h" + +using namespace Caf; + +CReplyToCacherInstance::CReplyToCacherInstance() : + _isInitialized(false), + CAF_CM_INIT("CReplyToCacherInstance") { +} + +CReplyToCacherInstance::~CReplyToCacherInstance() { +} + +void CReplyToCacherInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + _id = configSection->findRequiredAttribute("id"); + _replyToResolverId = configSection->findRequiredAttribute("reply-to-resolver"); + _isInitialized = true; +} + +std::string CReplyToCacherInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _id; +} + +void CReplyToCacherInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME("wire"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + SmartPtrIBean replyToResolverBean = appContext->getBean(_replyToResolverId); + _replyToResolver.QueryInterface(replyToResolverBean, false); + if (!_replyToResolver) { + CAF_CM_EXCEPTIONEX_VA1(NoSuchInterfaceException, 0, + "Bean '%s' is not a ReplyToResolver", _replyToResolverId.c_str()); + } +} + +SmartPtrIIntMessage CReplyToCacherInstance::transformMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("transformMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + _replyToResolver->cacheReplyTo(message); + + return message; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CReplyToCacherInstance.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CReplyToCacherInstance.h new file mode 100644 index 000000000..3f7acba40 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CReplyToCacherInstance.h @@ -0,0 +1,63 @@ +/* + * Created on: Aug 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CReplyToCacherInstance_h +#define CReplyToCacherInstance_h + +#include "ReplyToResolver.h" + +namespace Caf { + +class CReplyToCacherInstance : + public TCafSubSystemObjectRoot, + public IIntegrationObject, + public IIntegrationComponentInstance, + public ITransformer { +public: + CReplyToCacherInstance(); + virtual ~CReplyToCacherInstance(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdCommIntegrationReplyToCacherInstance) + + CAF_BEGIN_INTERFACE_MAP(CReplyToCacherInstance) + CAF_INTERFACE_ENTRY(IIntegrationObject) + CAF_INTERFACE_ENTRY(IIntegrationComponentInstance) + CAF_INTERFACE_ENTRY(ITransformer) + CAF_END_INTERFACE_MAP() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ITransformer + SmartPtrIIntMessage transformMessage( + const SmartPtrIIntMessage& message); + +private: + bool _isInitialized; + std::string _id; + std::string _replyToResolverId; + SmartPtrReplyToResolver _replyToResolver; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CReplyToCacherInstance); +}; + +} + +#endif /* CReplyToCacherInstance_h */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CReplyToResolverInstance.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CReplyToResolverInstance.cpp new file mode 100644 index 000000000..1b362d181 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CReplyToResolverInstance.cpp @@ -0,0 +1,117 @@ +/* + * Created on: Aug 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CReplyToResolverInstance.h" + +using namespace Caf; + +CReplyToResolverInstance::CReplyToResolverInstance() : + _isInitialized(false), + CAF_CM_INIT_LOG("CReplyToResolverInstance") { + CAF_CM_INIT_THREADSAFE; +} + +CReplyToResolverInstance::~CReplyToResolverInstance() { +} + +void CReplyToResolverInstance::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _isInitialized = true; +} + +void CReplyToResolverInstance::terminateBean() { +} + +std::string CReplyToResolverInstance::cacheReplyTo( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME("cacheReplyTo"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const SmartPtrCPayloadEnvelopeDoc payloadEnvelope = + CCafMessagePayloadParser::getPayloadEnvelope(message->getPayload()); + + const SmartPtrCCafMessageHeaders cafMessageHeaders = + CCafMessageHeaders::create(message->getHeaders()); + const std::string replyTo = cafMessageHeaders->getOptionalStr( + AmqpIntegration::DefaultAmqpHeaderMapper::REPLY_TO); + + if (! replyTo.empty()) { + const UUID requestId = payloadEnvelope->getRequestId(); + const std::string requestIdStr = BasePlatform::UuidToString(requestId); + CAF_CM_LOG_DEBUG_VA2( + "Caching replyTo: [reqId=%s][replyTo=%s]", + requestIdStr.c_str(), + replyTo.c_str()); + _replyToAddresses.insert(std::make_pair(requestId, replyTo)); + } else { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchElementException, + 0, + "Message does not have a '%s' header.", + AmqpIntegration::DefaultAmqpHeaderMapper::REPLY_TO.c_str()); + } + return replyTo; +} + +std::string CReplyToResolverInstance::lookupReplyTo( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME("lookupReplyTo"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + std::string replyTo; + + const SmartPtrCPayloadEnvelopeDoc payloadEnvelope = + CCafMessagePayloadParser::getPayloadEnvelope(message->getPayload()); + + const SmartPtrCCafMessageHeaders cafMessageHeaders = + CCafMessageHeaders::create(message->getHeaders()); + + const UUID requestId = payloadEnvelope->getRequestId(); + AddressMap::iterator replyToIter = _replyToAddresses.find(requestId); + if (replyToIter != _replyToAddresses.end()) { + replyTo = replyToIter->second; + _replyToAddresses.erase(replyToIter); + } else { + const std::string requestIdStr = BasePlatform::UuidToString(requestId); + CAF_CM_EXCEPTIONEX_VA1( + NoSuchElementException, + 0, + "Request id %s was not found in the address collection.", + requestIdStr.c_str()); + } + return replyTo; +} + +SmartPtrIVariant CReplyToResolverInstance::invokeExpression( + const std::string& methodName, + const Cdeqstr& methodParams, + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME("lookupReplyTo"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_ASSERT(!methodParams.size()); + SmartPtrIVariant result; + + if (methodName == "lookupReplyTo") { + result = CVariant::createString(lookupReplyTo(message)); + } else { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchMethodException, + 0, + "Method '%s' is not supported by this invoker", + methodName.c_str()); + } + return result; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CReplyToResolverInstance.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CReplyToResolverInstance.h new file mode 100644 index 000000000..78b40f517 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CReplyToResolverInstance.h @@ -0,0 +1,62 @@ +/* + * Created on: Aug 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CReplyToResolverInstance_h +#define CReplyToResolverInstance_h + +#include "ReplyToResolver.h" + +namespace Caf { + +class CReplyToResolverInstance : + public TCafSubSystemObjectRoot, + public IBean, + public ReplyToResolver, + public IExpressionInvoker { +public: + CReplyToResolverInstance(); + virtual ~CReplyToResolverInstance(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdCommIntegrationReplyToResolver) + + CAF_BEGIN_INTERFACE_MAP(CReplyToResolverInstance) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(ReplyToResolver) + CAF_INTERFACE_ENTRY(IExpressionInvoker) + CAF_END_INTERFACE_MAP() + +public: // IBean + void initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties); + + void terminateBean(); + +public: // ReplyToResolver + std::string cacheReplyTo(const SmartPtrIIntMessage& message); + + std::string lookupReplyTo(const SmartPtrIIntMessage& message); + +public: // IExpressionInvoker + SmartPtrIVariant invokeExpression( + const std::string& methodName, + const Cdeqstr& methodParams, + const SmartPtrIIntMessage& message); + +private: + bool _isInitialized; + typedef std::map AddressMap; + AddressMap _replyToAddresses; + CAF_CM_CREATE; + CAF_CM_CREATE_THREADSAFE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CReplyToResolverInstance); +}; +} + +#endif /* CReplyToResolverInstance_h */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/ReplyToResolver.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/ReplyToResolver.h new file mode 100644 index 000000000..498381413 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/ReplyToResolver.h @@ -0,0 +1,22 @@ +/* + * Created on: Aug 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef ReplyToResolver_h +#define ReplyToResolver_h + +namespace Caf { +struct __declspec(novtable) ReplyToResolver : public ICafObject { + CAF_DECL_UUID("4D306795-4475-4D2C-BEF0-0ADE28843BBC") + + virtual std::string cacheReplyTo(const SmartPtrIIntMessage& message) = 0; + + virtual std::string lookupReplyTo(const SmartPtrIIntMessage& message) = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(ReplyToResolver); +} +#endif /* ReplyToResolver_h */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/commIntegration.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/commIntegration.cpp new file mode 100644 index 000000000..5668ac98a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/commIntegration.cpp @@ -0,0 +1,77 @@ +/* + * Created on: Aug 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" + +#include "CCmsMessageTransformer.h" +#include "CCmsMessageTransformerInstance.h" +#include "CEventTopicCalculatorInstance.h" +#include "CIncomingMessageHandler.h" +#include "CIncomingMessageHandlerInstance.h" +#include "COutgoingMessageHandler.h" +#include "CProtocolHeaderEnricher.h" +#include "CProtocolHeaderEnricherInstance.h" +#include "CReplyToCacher.h" +#include "CReplyToCacherInstance.h" +#include "CReplyToResolverInstance.h" + +namespace Caf { + const char* _sObjIdCommIntegrationCmsMessageTransformer = "com.vmware.caf.comm.integration.cmsmessagetransformer"; + const char* _sObjIdCommIntegrationCmsMessageTransformerInstance = "com.vmware.caf.comm.integration.cmsmessagetransformerinstance"; + const char* _sObjIdCommIntegrationEventTopicCalculator = "com.vmware.caf.comm.integration.eventtopiccalculator"; + const char* _sObjIdCommIntegrationIncomingMessageHandler = "com.vmware.caf.comm.integration.incomingmessagehandler"; + const char* _sObjIdCommIntegrationIncomingMessageHandlerInstance = "com.vmware.caf.comm.integration.incomingmessagehandlerinstance"; + const char* _sObjIdCommIntegrationOutgoingMessageHandler = "com.vmware.caf.comm.integration.outgoingmessagehandler"; + const char* _sObjIdCommIntegrationProtocolHeaderEnricher = "com.vmware.caf.comm.integration.protocolheaderenricher"; + const char* _sObjIdCommIntegrationProtocolHeaderEnricherInstance = "com.vmware.caf.comm.integration.protocolheaderenricherinstance"; + const char* _sObjIdCommIntegrationReplyToCacher = "com.vmware.caf.comm.integration.replytocacher"; + const char* _sObjIdCommIntegrationReplyToCacherInstance = "com.vmware.caf.comm.integration.replytocacherinstance"; + const char* _sObjIdCommIntegrationReplyToResolver = "com.vmware.caf.comm.integration.replytoresolver"; +} + +CEcmSubSystemModule _Module; + +using namespace Caf; + +CAF_BEGIN_OBJECT_MAP(ObjectMap) + CAF_OBJECT_ENTRY(CCmsMessageTransformer) + CAF_OBJECT_ENTRY(CCmsMessageTransformerInstance) + CAF_OBJECT_ENTRY(CEventTopicCalculatorInstance) + CAF_OBJECT_ENTRY(CIncomingMessageHandler) + CAF_OBJECT_ENTRY(CIncomingMessageHandlerInstance) + CAF_OBJECT_ENTRY(COutgoingMessageHandler) + CAF_OBJECT_ENTRY(CProtocolHeaderEnricher) + CAF_OBJECT_ENTRY(CProtocolHeaderEnricherInstance) + CAF_OBJECT_ENTRY(CReplyToCacher) + CAF_OBJECT_ENTRY(CReplyToCacherInstance) + CAF_OBJECT_ENTRY(CReplyToResolverInstance) +CAF_END_OBJECT_MAP() + +CAF_DECLARE_SUBSYSTEM_EXPORTS() + +extern "C" BOOL APIENTRY DllMain(HINSTANCE hModule, uint32 dwReason, LPVOID) +{ + try { + if (DLL_PROCESS_ATTACH == dwReason) + { + // initialize the sub-system module + _Module.Init(ObjectMap, hModule); + } + else if (DLL_PROCESS_DETACH == dwReason) + { + // Terminate the sub-system module + _Module.Term(); + } + } catch (std::runtime_error) { + ::exit(2); + } catch (...) { + ::exit(2); + } + + return TRUE; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/commIntegrationDefines.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/commIntegrationDefines.h new file mode 100644 index 000000000..189c96815 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/commIntegrationDefines.h @@ -0,0 +1,27 @@ +/* + * Created on: Aug 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef commIntegrationDefines_h +#define commIntegrationDefines_h + +namespace Caf { + + extern const char* _sObjIdCommIntegrationCmsMessageTransformer; + extern const char* _sObjIdCommIntegrationCmsMessageTransformerInstance; + extern const char* _sObjIdCommIntegrationEventTopicCalculator; + extern const char* _sObjIdCommIntegrationIncomingMessageHandler; + extern const char* _sObjIdCommIntegrationIncomingMessageHandlerInstance; + extern const char* _sObjIdCommIntegrationOutgoingMessageHandler; + extern const char* _sObjIdCommIntegrationProtocolHeaderEnricher; + extern const char* _sObjIdCommIntegrationProtocolHeaderEnricherInstance; + extern const char* _sObjIdCommIntegrationReplyToCacher; + extern const char* _sObjIdCommIntegrationReplyToCacherInstance; + extern const char* _sObjIdCommIntegrationReplyToResolver; +} + +#endif /* commIntegrationDefines_h */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/stdafx.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/stdafx.h new file mode 100644 index 000000000..04748ecb4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/stdafx.h @@ -0,0 +1,32 @@ +/* + * Created on: Aug 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef stdafx_h +#define stdafx_h + +#include +#include +#include "../../../amqpCore/src/amqpCore/amqpIntegrationCoreLink.h" +#include "commIntegrationDefines.h" + +#include +#include +#include +#include "CMessagePartRecord.h" +#include "CMessagePartDescriptorSourceRecord.h" +#include "CMessageDeliveryRecord.h" +#include "CMessagePartsParser.h" +#include "CMessagePartsBuilder.h" +#include "CMessagePartDescriptor.h" +#include "CMessagePartsHeader.h" +#include "CMessagePartDescriptorCalculator.h" +#include "CCmsMessageUtils.h" +#include "CCmsMessage.h" +#include "CCmsMessageAttachments.h" + +#endif /* stdafx_h */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQChannel.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQChannel.cpp new file mode 100644 index 000000000..f6985f4f4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQChannel.cpp @@ -0,0 +1,1212 @@ +/* + * Created on: May 2, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "AMQChannel.h" +#include "AMQUtil.h" +#include "BlockingRpcContinuation.h" + +using namespace Caf::AmqpClient; + +const uint8 AMQChannel::DEBUGLOG_FLAG_ENTRYEXIT = 0x01; +const uint8 AMQChannel::DEBUGLOG_FLAG_AMQP = 0x02; + +#define AMQCHANNEL_ENTRY \ + if (_debugLogFlags & DEBUGLOG_FLAG_ENTRYEXIT) { CAF_CM_LOG_DEBUG_VA0("entry"); } + +#define AMQCHANNEL_EXIT \ + if (_debugLogFlags & DEBUGLOG_FLAG_ENTRYEXIT) { CAF_CM_LOG_DEBUG_VA0("exit"); } + +#if (1) // init +AMQChannel::AMQChannel() : + _isInitialized(false), + _isOpen(false), + _debugLogFlags(0), + _channelNumber(0), + CAF_CM_INIT_LOG("AMQChannel") { + CAF_CM_INIT_THREADSAFE; + _channelMutex.CreateInstance(); + _channelMutex->initialize(); +} + +AMQChannel::~AMQChannel() { + if (_channelHandle) { + AmqpChannel::AMQP_ChannelClose(_channelHandle); + } +} + +void AMQChannel::init( + const SmartPtrIConnectionInt& connection, + const SmartPtrConsumerWorkService& workService) { + CAF_CM_FUNCNAME("init"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(connection); + CAF_CM_VALIDATE_SMARTPTR(workService); + + uint32 debugFlags = 0; + if (getAppConfig()->getUint32( + "AMQChannel", + "debugLogFlags", + debugFlags, + IConfigParams::PARAM_OPTIONAL)) { + _debugLogFlags = debugFlags; + } + + AMQCHANNEL_ENTRY; + _connection = connection; + _workService = workService; + _channelSignal.initialize("channelSignal"); + _dispatcher.CreateInstance(); + _dispatcher->init(_workService); + + // Sequence is important here. Once amqpConnectionOpenChannel is called the + // channel.open method will be sent. Therefore we must have an _activeRpc + // registered to handle the channel.open-ok response BEFORE activating the + // _channelTask. + + // Create the _activeRpc to listen for channel-open.ok + SmartPtrBlockingRpcContinuation continuation; + continuation.CreateInstance(); + continuation->init(); + _activeRpc = continuation; + + // Open the channel + AMQUtil::checkAmqpStatus( + _connection->amqpConnectionOpenChannel(_channelHandle), + "_connection->amqpConnectionOpenChannel"); + AMQUtil::checkAmqpStatus( + AmqpChannel::AMQP_ChannelGetId(_channelHandle, &_channelNumber), + "AmqpChannel::AMQP_ChannelGetId"); + + // Set up AMQP frame processing + _command.CreateInstance(); + _command->init(); + SmartPtrChannelTask channelTask; + channelTask.CreateInstance(); + channelTask->init(this); + _workService->addWork(channelTask); + + // Wait for the channel-open.ok response + SmartPtrAMQCommand command; + { + CAF_CM_UNLOCK_LOCK; + command = continuation->getReply(); + } + CAF_CM_VALIDATE_SMARTPTR(command); + AmqpMethods::Channel::SmartPtrOpenOk openOk; + openOk.QueryInterface(command->getMethod(), false); + if (!openOk) { + CAF_CM_EXCEPTIONEX_VA1( + IllegalStateException, + 0, + "Expected to receive channel.open-ok but received " + "%s instead. This channel cannot be used.", + command->getMethod()->getProtocolMethodName().c_str()); + } + + if (_debugLogFlags & DEBUGLOG_FLAG_AMQP) { + CAF_CM_LOG_DEBUG_VA1("channel #%d is open", _channelNumber); + } + _isOpen = true; + _isInitialized = true; + AMQCHANNEL_EXIT; +} + +uint16 AMQChannel::getChannelNumber() { + CAF_CM_FUNCNAME_VALIDATE("getChannelNumber"); + CAF_CM_LOCK_UNLOCK; + AMQCHANNEL_ENTRY; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + ensureIsOpen(); + AMQCHANNEL_EXIT; + return _channelNumber; +} + +bool AMQChannel::isOpen() { + CAF_CM_LOCK_UNLOCK; + return _isOpen; +} + +void AMQChannel::close() { + CAF_CM_FUNCNAME_VALIDATE("close"); + AMQCHANNEL_ENTRY; + _connection->channelCloseChannel(this); + AMQCHANNEL_EXIT; +} + +void AMQChannel::notifyConnectionClosed(SmartPtrCCafException& exception) { + CAF_CM_FUNCNAME_VALIDATE("notifyConnectionClosed"); + AMQCHANNEL_ENTRY + close(exception); + AMQCHANNEL_EXIT; +} + +void AMQChannel::close(SmartPtrCCafException& exception) { + CAF_CM_FUNCNAME_VALIDATE("close"); + CAF_CM_LOCK_UNLOCK; + AMQCHANNEL_ENTRY + if (_debugLogFlags & DEBUGLOG_FLAG_AMQP) { + CAF_CM_LOG_DEBUG_VA1("Closing channel #%d", _channelNumber); + } + if (_isOpen) { + _isOpen = false; + _dispatcher->quiesce(); + + SmartPtrIRpcContinuation activeRpc; + { + CAF_CM_UNLOCK_LOCK; + activeRpc = nextOutstandingRpc(); + } + if (activeRpc) { + activeRpc->handleAbort(exception); + } + if (_dispatcher) { + _dispatcher->handleShutdown(exception); + } + AMQPStatus status = AmqpChannel::AMQP_ChannelClose(_channelHandle); + if (status != AMQP_ERROR_OK) { + CAF_CM_LOG_WARN_VA2( + "channel #%d closed with API code %d", + _channelNumber, + status); + } + } + AMQCHANNEL_EXIT; +} +#endif + +#if (1) // basic +void AMQChannel::basicAck( + const uint64 deliveryTag, + const bool ackMultiple) { + CAF_CM_FUNCNAME_VALIDATE("basicAck"); + AMQCHANNEL_ENTRY; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + SmartPtrBasicAckMethod method; + method.CreateInstance(); + method->init(deliveryTag, ackMultiple); + transmit(method); + AMQCHANNEL_EXIT; +} + +SmartPtrGetResponse AMQChannel::basicGet( + const std::string& queue, + const bool noAck) { + CAF_CM_FUNCNAME("basicGet"); + AMQCHANNEL_ENTRY; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + SmartPtrBasicGetMethod method; + method.CreateInstance(); + method->init(queue, noAck); + SmartPtrAMQCommand reply = execRpc(method); + SmartPtrIMethod replyMethod = reply->getMethod(); + + SmartPtrGetResponseImpl getResponse; + AmqpMethods::Basic::SmartPtrGetOk getOk; + getOk.QueryInterface(replyMethod, false); + if (getOk) { + AmqpContentHeaders::SmartPtrBasicProperties properties; + SmartPtrIContentHeader contentHeader = reply->getContentHeader(); + if (contentHeader) { + properties.QueryInterface(contentHeader, false); + if (!properties) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchInterfaceException, + 0, + "Expected a basic properties content header. Received '%s'. " + "Please report this bug.", + contentHeader->getClassName().c_str()); + } + } + + SmartPtrEnvelopeImpl envelope; + envelope.CreateInstance(); + envelope->init( + getOk->getDeliveryTag(), + getOk->getRedelivered(), + getOk->getExchange(), + getOk->getRoutingKey()); + getResponse.CreateInstance(); + getResponse->init( + envelope, + properties, + reply->getContentBody(), + getOk->getMessageCount()); + } else { + AmqpMethods::Basic::SmartPtrGetEmpty getEmpty; + getEmpty.QueryInterface(replyMethod, false); + if(!getEmpty) { + CAF_CM_EXCEPTIONEX_VA2( + NoSuchInterfaceException, + 0, + "Expected a basic.get-ok or basic.get-empty response. Received '%s'. " + "Please report this bug.", + method->getMethodName().c_str(), + replyMethod->getProtocolMethodName().c_str()); + } + } + AMQCHANNEL_EXIT; + return getResponse; +} + +void AMQChannel::basicPublish( + const std::string& exchange, + const std::string& routingKey, + const AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body) { + basicPublish( + exchange, + routingKey, + false, + false, + properties, + body); +} + +void AMQChannel::basicPublish( + const std::string& exchange, + const std::string& routingKey, + const bool mandatory, + const bool immediate, + const AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body) { + CAF_CM_FUNCNAME_VALIDATE("basicPublish"); + AMQCHANNEL_ENTRY; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + SmartPtrBasicPublishMethod method; + method.CreateInstance(); + method->init( + exchange, + routingKey, + mandatory, + immediate, + properties, + body); + transmit(method); + AMQCHANNEL_EXIT; +} + +AmqpMethods::Basic::SmartPtrConsumeOk AMQChannel::basicConsume( + const std::string& queue, + const SmartPtrConsumer& consumer) { + return basicConsume(queue, false, consumer); +} + +AmqpMethods::Basic::SmartPtrConsumeOk AMQChannel::basicConsume( + const std::string& queue, + const bool noAck, + const SmartPtrConsumer& consumer) { + return basicConsume(queue, "", noAck, false, false, consumer); +} + +AmqpMethods::Basic::SmartPtrConsumeOk AMQChannel::basicConsume( + const std::string& queue, + const std::string& consumerTag, + const bool noAck, + const bool noLocal, + const bool exclusive, + const SmartPtrConsumer& consumer, + const SmartPtrTable& arguments) { + CAF_CM_FUNCNAME("basicConsume"); + AMQCHANNEL_ENTRY; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + AmqpMethods::Basic::SmartPtrConsumeOk consumeOk; + // Put a lock on the dispatcher. + // DO NOT FORGET TO UNLOCK IT NO MATTER WHAT! + _dispatcher->lock(); + try { + SmartPtrBasicConsumeMethod method; + method.CreateInstance(); + method->init(queue, consumerTag, noLocal, noAck, exclusive, arguments); + SmartPtrAMQCommand reply = execRpc(method); + SmartPtrIMethod replyMethod = reply->getMethod(); + consumeOk.QueryInterface(replyMethod, false); + if (consumeOk) { + const std::string& consumerTagActual = consumeOk->getConsumerTag(); + _dispatcher->addConsumer(consumerTagActual, consumer); + _dispatcher->handleConsumeOk(consumerTagActual); + } else { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchInterfaceException, + 0, + "Expected a basic.consume-ok response. Received '%s'. " + "Please report this bug.", + replyMethod->getProtocolMethodName().c_str()); + } + } + CAF_CM_CATCH_ALL; + _dispatcher->unlock(); + CAF_CM_THROWEXCEPTION; + AMQCHANNEL_EXIT; + return consumeOk; +} + +AmqpMethods::Basic::SmartPtrCancelOk AMQChannel::basicCancel( + const std::string& consumerTag) { + CAF_CM_FUNCNAME("basicCancel"); + AMQCHANNEL_ENTRY; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + AmqpMethods::Basic::SmartPtrCancelOk cancelOk; + SmartPtrConsumer originalConsumer = _dispatcher->getConsumer(consumerTag); + if (originalConsumer) { + SmartPtrBasicCancelMethod method; + method.CreateInstance(); + method->init(consumerTag); + SmartPtrAMQCommand reply = execRpc(method); + SmartPtrIMethod replyMethod = reply->getMethod(); + cancelOk.QueryInterface(replyMethod, false); + if (cancelOk) { + try { + _dispatcher->handleCancelOk(consumerTag); + } + CAF_CM_CATCH_ALL; + _dispatcher->removeConsumer(consumerTag); + CAF_CM_THROWEXCEPTION; + } else { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchInterfaceException, + 0, + "Expected a basic.cancel-ok response. Received '%s'. " + "Please report this bug.", + replyMethod->getProtocolMethodName().c_str()); + } + } else { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchElementException, + 0, + "No such consumer tag '%s'", + consumerTag.c_str()); + } + AMQCHANNEL_EXIT; + return cancelOk; +} + +AmqpMethods::Basic::SmartPtrRecoverOk AMQChannel::basicRecover( + const bool requeue) { + CAF_CM_FUNCNAME("basicRecover"); + AMQCHANNEL_ENTRY; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + AmqpMethods::Basic::SmartPtrRecoverOk recoverOk; + SmartPtrBasicRecoverMethod method; + method.CreateInstance(); + method->init(requeue); + SmartPtrAMQCommand reply = execRpc(method); + SmartPtrIMethod replyMethod = reply->getMethod(); + recoverOk.QueryInterface(replyMethod, false); + if (recoverOk) { + _dispatcher->handleRecoverOk(); + } else { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchInterfaceException, + 0, + "Expected a basic.recover-ok response. Received '%s'. " + "Please report this bug.", + replyMethod->getProtocolMethodName().c_str()); + } + AMQCHANNEL_EXIT; + return recoverOk; +} + +AmqpMethods::Basic::SmartPtrQosOk AMQChannel::basicQos( + const uint32 prefetchSize, + const uint32 prefetchCount, + const bool global) { + CAF_CM_FUNCNAME("basicQos"); + AMQCHANNEL_ENTRY; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + SmartPtrBasicQosMethod method; + method.CreateInstance(); + method->init(prefetchSize, prefetchCount, global); + SmartPtrAMQCommand reply = execRpc(method); + AmqpMethods::Basic::SmartPtrQosOk qosOk; + SmartPtrIMethod replyMethod = reply->getMethod(); + qosOk.QueryInterface(replyMethod, false); + if (!qosOk) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchInterfaceException, + 0, + "Expected a basic.qos-ok response. Received '%s'. " + "Please report this bug.", + replyMethod->getProtocolMethodName().c_str()); + } + AMQCHANNEL_EXIT; + return qosOk; +} + +void AMQChannel::basicReject( + const uint64 deliveryTag, + const bool requeue) { + CAF_CM_FUNCNAME_VALIDATE("basicReject"); + AMQCHANNEL_ENTRY; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + SmartPtrBasicRejectMethod method; + method.CreateInstance(); + method->init(deliveryTag, requeue); + transmit(method); + AMQCHANNEL_EXIT; +} +#endif + +#if (1) // exchange +AmqpMethods::Exchange::SmartPtrDeclareOk AMQChannel::exchangeDeclare( + const std::string& exchange, + const std::string& type, + const bool durable, + const SmartPtrTable& arguments) { + CAF_CM_FUNCNAME("exchangeDeclare"); + AMQCHANNEL_ENTRY; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + SmartPtrExchangeDeclareMethod method; + method.CreateInstance(); + method->init(exchange, type, false, durable, arguments); + SmartPtrAMQCommand reply = execRpc(method); + AmqpMethods::Exchange::SmartPtrDeclareOk declareOk; + SmartPtrIMethod replyMethod = reply->getMethod(); + declareOk.QueryInterface(replyMethod, false); + if (!declareOk) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchInterfaceException, + 0, + "Expected a exchange.declare-ok response. Received '%s'. " + "Please report this bug.", + replyMethod->getProtocolMethodName().c_str()); + } + AMQCHANNEL_EXIT; + return declareOk; +} + +AmqpMethods::Exchange::SmartPtrDeleteOk AMQChannel::exchangeDelete( + const std::string& exchange, + const bool ifUnused) { + CAF_CM_FUNCNAME("exchangeDelete"); + AMQCHANNEL_ENTRY; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + SmartPtrExchangeDeleteMethod method; + method.CreateInstance(); + method->init(exchange, ifUnused); + SmartPtrAMQCommand reply = execRpc(method); + AmqpMethods::Exchange::SmartPtrDeleteOk deleteOk; + SmartPtrIMethod replyMethod = reply->getMethod(); + deleteOk.QueryInterface(replyMethod, false); + if (!deleteOk) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchInterfaceException, + 0, + "Expected a exchange.delete-ok response. Received '%s'. " + "Please report this bug.", + replyMethod->getProtocolMethodName().c_str()); + } + AMQCHANNEL_EXIT; + return deleteOk; +} + +#endif + +#if (1) // queue +AmqpMethods::Queue::SmartPtrDeclareOk AMQChannel::queueDeclare() { + return queueDeclare( + "", + false, + true, + true); +} + +AmqpMethods::Queue::SmartPtrDeclareOk AMQChannel::queueDeclare( + const std::string& queue, + const bool durable, + const bool exclusive, + const bool autoDelete, + const SmartPtrTable& arguments) { + CAF_CM_FUNCNAME("queueDeclare"); + AMQCHANNEL_ENTRY; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + SmartPtrQueueDeclareMethod method; + method.CreateInstance(); + method->init(queue, durable, exclusive, autoDelete, arguments); + SmartPtrAMQCommand reply = execRpc(method); + AmqpMethods::Queue::SmartPtrDeclareOk declareOk; + SmartPtrIMethod replyMethod = reply->getMethod(); + declareOk.QueryInterface(replyMethod, false); + if (!declareOk) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchInterfaceException, + 0, + "Expected a queue.declare-ok response. Received '%s'. " + "Please report this bug.", + replyMethod->getProtocolMethodName().c_str()); + } + AMQCHANNEL_EXIT; + return declareOk; +} + +AmqpMethods::Queue::SmartPtrDeclareOk AMQChannel::queueDeclarePassive( + const std::string& queue) { + CAF_CM_FUNCNAME("queueDeclarePassive"); + AMQCHANNEL_ENTRY; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + SmartPtrQueueDeclareMethod method; + method.CreateInstance(); + method->initPassive(queue); + SmartPtrAMQCommand reply = execRpc(method); + AmqpMethods::Queue::SmartPtrDeclareOk declareOk; + SmartPtrIMethod replyMethod = reply->getMethod(); + declareOk.QueryInterface(replyMethod, false); + if (!declareOk) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchInterfaceException, + 0, + "Expected a queue.declare-ok response. Received '%s'. " + "Please report this bug.", + replyMethod->getProtocolMethodName().c_str()); + } + AMQCHANNEL_EXIT; + return declareOk; +} + +AmqpMethods::Queue::SmartPtrDeleteOk AMQChannel::queueDelete( + const std::string& queue, + const bool ifUnused, + const bool ifEmpty) { + CAF_CM_FUNCNAME("queueDelete"); + AMQCHANNEL_ENTRY; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + SmartPtrQueueDeleteMethod method; + method.CreateInstance(); + method->init(queue, ifUnused, ifEmpty); + SmartPtrAMQCommand reply = execRpc(method); + AmqpMethods::Queue::SmartPtrDeleteOk deleteOk; + SmartPtrIMethod replyMethod = reply->getMethod(); + deleteOk.QueryInterface(replyMethod, false); + if (!deleteOk) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchInterfaceException, + 0, + "Expected a queue.delete-ok response. Received '%s'. " + "Please report this bug.", + replyMethod->getProtocolMethodName().c_str()); + } + AMQCHANNEL_EXIT; + return deleteOk; +} + +AmqpMethods::Queue::SmartPtrPurgeOk AMQChannel::queuePurge( + const std::string& queue) { + CAF_CM_FUNCNAME("queuePurge"); + AMQCHANNEL_ENTRY; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + SmartPtrQueuePurgeMethod method; + method.CreateInstance(); + method->init(queue); + SmartPtrAMQCommand reply = execRpc(method); + AmqpMethods::Queue::SmartPtrPurgeOk purgeOk; + SmartPtrIMethod replyMethod = reply->getMethod(); + purgeOk.QueryInterface(replyMethod, false); + if (!purgeOk) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchInterfaceException, + 0, + "Expected a queue.purge-ok response. Received '%s'. " + "Please report this bug.", + replyMethod->getProtocolMethodName().c_str()); + } + AMQCHANNEL_EXIT; + return purgeOk; +} + +AmqpMethods::Queue::SmartPtrBindOk AMQChannel::queueBind( + const std::string& queue, + const std::string& exchange, + const std::string& routingKey, + const SmartPtrTable& arguments) { + CAF_CM_FUNCNAME("queueBind"); + AMQCHANNEL_ENTRY; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + SmartPtrQueueBindMethod method; + method.CreateInstance(); + method->init(queue, exchange, routingKey, arguments); + SmartPtrAMQCommand reply = execRpc(method); + AmqpMethods::Queue::SmartPtrBindOk bindOk; + SmartPtrIMethod replyMethod = reply->getMethod(); + bindOk.QueryInterface(replyMethod, false); + if (!bindOk) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchInterfaceException, + 0, + "Expected a queue.bind-ok response. Received '%s'. " + "Please report this bug.", + replyMethod->getProtocolMethodName().c_str()); + } + AMQCHANNEL_EXIT; + return bindOk; +} + +AmqpMethods::Queue::SmartPtrUnbindOk AMQChannel::queueUnbind( + const std::string& queue, + const std::string& exchange, + const std::string& routingKey, + const SmartPtrTable& arguments) { + CAF_CM_FUNCNAME("queueUnbind"); + AMQCHANNEL_ENTRY; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + SmartPtrQueueUnbindMethod method; + method.CreateInstance(); + method->init(queue, exchange, routingKey, arguments); + SmartPtrAMQCommand reply = execRpc(method); + AmqpMethods::Queue::SmartPtrUnbindOk unbindOk; + SmartPtrIMethod replyMethod = reply->getMethod(); + unbindOk.QueryInterface(replyMethod, false); + if (!unbindOk) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchInterfaceException, + 0, + "Expected a queue.unbind-ok response. Received '%s'. " + "Please report this bug.", + replyMethod->getProtocolMethodName().c_str()); + } + AMQCHANNEL_EXIT; + return unbindOk; +} +#endif +#if (1) // ReturnListener +void AMQChannel::addReturnListener( + const SmartPtrReturnListener& listener) { + CAF_CM_FUNCNAME_VALIDATE("addReturnListener"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_LOCK_UNLOCK; + _returnListeners.add(listener); +} + +bool AMQChannel::removeReturnListener( + const SmartPtrReturnListener& listener) { + CAF_CM_FUNCNAME_VALIDATE("removeReturnListener"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _returnListeners.remove(listener); +} +#endif + +#if (1) // processing +/* + * Worker thread execution callback. + * Check for an incoming frame and if one exists, process it. + * This method is also called during init() and it waiting for the + * channel.open-ok. While establishing the connection we may get timeout errors + * because the broker is down. In that case retry the connection for the allotted + * time before giving up. + */ +bool AMQChannel::taskHandler() { + CAF_CM_FUNCNAME("taskHandler"); + CAF_CM_LOCK_UNLOCK; + + try { + uint32 frameCount = 0; + AMQPStatus status = AMQP_ERROR_OK; + SmartPtrCAmqpFrame frame; + while (_channelHandle && (frameCount < 1000)) { + SmartPtrCAmqpChannel channelHandle = _channelHandle; + { + CAF_CM_UNLOCK_LOCK; + status = AmqpChannel::AMQP_ChannelReceive(channelHandle, frame, 0); + } + if (frame) { + ++frameCount; + try { + SmartPtrAMQCommand command = _command; + if (command->handleFrame(frame)) { + _command.CreateInstance(); + _command->init(); + handleCompleteInboundCommand(command); + } + } + CAF_CM_CATCH_ALL; + if (CAF_CM_ISEXCEPTION) { + CAF_CM_LOG_CRIT_VA1("channel #%d", _channelNumber); + CAF_CM_LOG_CRIT_CAFEXCEPTION; + + // Throw away the current command + _command.CreateInstance(); + _command->init(); + + // Abort any outstanding rpc + SmartPtrIRpcContinuation rpc; + { + CAF_CM_UNLOCK_LOCK; + rpc = nextOutstandingRpc(); + } + if (rpc) { + SmartPtrCCafException exception = CAF_CM_GETEXCEPTION; + rpc->handleAbort(exception); + } + CAF_CM_CLEAREXCEPTION; + } + } else if (status == AMQP_ERROR_TIMEOUT) { + break; + } else { + AMQUtil::checkAmqpStatus(status, "AmqpChannel::AMQP_ChannelReceive"); + } + } + } + CAF_CM_CATCH_ALL; + if (CAF_CM_ISEXCEPTION) { + CAF_CM_LOG_CRIT_VA1("channel #%d", _channelNumber); + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + } + + // If we get here and the _channelHandle is NULL then + // the channel is closed. If so, return 'true'. + // + // If the _channelHandle is still good, return 'false' and let + // this task run again. + return (_channelHandle == NULL); +} + +/* + * A complete inbound AMQP command is available for processing. + */ +void AMQChannel::handleCompleteInboundCommand(const SmartPtrAMQCommand& command) { + CAF_CM_FUNCNAME("handleCompleteInboundCommand"); + // No LOCK_UNLOCK because there aren't any members to protect and because + // this routine makes a blocking call. + AMQCHANNEL_ENTRY; + // Check with asyn processing first + if (!processAsync(command)) { + // Command was not handled so must be part of an outstanding + // RPC call. Get the outstanding RPC call and have it process + // it. + // + // The outstanding RPC call may have been aborted because we are + // closing. That is the only time the RPC object should be null + // when in this method + SmartPtrIRpcContinuation rpc = nextOutstandingRpc(); + if (rpc) { + rpc->handleCommand(command); + } else if (isOpen()) { + CAF_CM_EXCEPTIONEX_VA3( + NullPointerException, + 0, + "[command=%s, class_id: 0x%08x, method_id: 0x%08x] nextOutstandingRpc() returned NULL and the channel is open. " + "This should never happen. Please report this bug.", + command->getMethod()->getProtocolMethodName().c_str(), + command->getMethod()->getProtocolClassId(), + command->getMethod()->getProtocolMethodId()); + } + } + AMQCHANNEL_EXIT; +} + +/* + * First line of incomming command processing. This method handles + * non-RPC commands such as channel.close, basic.deliver, basic.recover, etc. + */ +bool AMQChannel::processAsync(const SmartPtrAMQCommand& command) { + CAF_CM_FUNCNAME("processAsync"); + CAF_CM_LOCK_UNLOCK; + AMQCHANNEL_ENTRY; + bool commandHandled = false; + const amqp_method_number_t amqpMethodId = + (command->getMethod()->getProtocolClassId() << 16) | + command->getMethod()->getProtocolMethodId(); + + if (_debugLogFlags & DEBUGLOG_FLAG_AMQP) { + CAF_CM_LOG_DEBUG_VA4( + "Method [channel=%d][class id=0x%04X][method id=0x%04X][name=%s]", + _channelNumber, + command->getMethod()->getProtocolClassId(), + command->getMethod()->getProtocolMethodId(), + command->getMethod()->getProtocolMethodName().c_str()); + } + + if (amqpMethodId == AMQP_CHANNEL_OPEN_OK_METHOD) { + // no-op. let it pass through + } + else if (amqpMethodId == AMQP_CHANNEL_CLOSE_METHOD) { + // first order of business - stop the dispatcher from handling incoming messages + _dispatcher->quiesce(); + + AmqpMethods::Channel::SmartPtrClose chClose; + chClose.QueryInterface(command->getMethod(), false); + if (chClose) { + if (_debugLogFlags & DEBUGLOG_FLAG_AMQP) { + CAF_CM_LOG_INFO_VA5( + "channel.close %s [channel=%d][code=0x%04X][class id=0x%04X][method id=0x%04X]", + chClose->getReplyText().c_str(), + _channelNumber, + chClose->getReplyCode(), + chClose->getClassId(), + chClose->getMethodId()); + } + } else { + // Okay - very weird but we need to keep on going... + CAF_CM_LOG_CRIT_VA0( + "Received AMQP_CHANNEL_CLOSE_METHOD but method object " + "is not a AmqpMethods::Channel::Close instance. Please report " + "this bug."); + } + { + CAF_CM_UNLOCK_LOCK; + channelCloseByServerShutdown(chClose); + } + commandHandled = true; + } else if (amqpMethodId == AMQP_CHANNEL_CLOSE_OK_METHOD) { + _channelHandle = AMQP_HANDLE_INVALID; + commandHandled = true; + } else if (isOpen()) { + try { + SmartPtrIMethod method = command->getMethod(); + SmartPtrIContentHeader contentHeader = command->getContentHeader(); + switch (amqpMethodId) { + case AMQP_BASIC_DELIVER_METHOD: + { + commandHandled = true; + AmqpMethods::Basic::SmartPtrDeliver deliverMethod; + deliverMethod.QueryInterface(method, false); + if (deliverMethod) { + SmartPtrEnvelopeImpl envelope; + envelope.CreateInstance(); + envelope->init( + deliverMethod->getDeliveryTag(), + deliverMethod->getRedelivered(), + deliverMethod->getExchange(), + deliverMethod->getRoutingKey()); + + AmqpContentHeaders::SmartPtrBasicProperties properties; + if (contentHeader) { + properties.QueryInterface(contentHeader, false); + if (!properties) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchInterfaceException, + 0, + "Expected a basic properties content header. Received '%s'. " + "Please report this bug.", + contentHeader->getClassName().c_str()); + } + } + _dispatcher->handleDelivery( + deliverMethod->getConsumerTag(), + envelope, + properties, + command->getContentBody()); + } else { + CAF_CM_EXCEPTIONEX_VA0( + IllegalStateException, + 0, + "Received AMQP_BASIC_DELIVER_METHOD but the method object " + "is not a AmqpClient::AmqpMethods::Basic::Deliver instance. " + "Please report this bug."); + } + } + break; + + case AMQP_BASIC_RETURN_METHOD: + callReturnListeners(command); + commandHandled = true; + break; + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + if (CAF_CM_ISEXCEPTION) { + // discard the command + commandHandled = true; + } + CAF_CM_CLEAREXCEPTION; + } else { + // We are shutting down so the inbound command should be + // discarded per spec. 'Consume' it by returning true. + if (_debugLogFlags & DEBUGLOG_FLAG_AMQP) { + CAF_CM_LOG_INFO_VA0("isOpen() is false. Discarding command."); + } + commandHandled = true; + } + AMQCHANNEL_EXIT; + return commandHandled; +} + +/* + * Checks the _isOpen flag and throws an exception if the + * channel is closed. + */ +void AMQChannel::ensureIsOpen() { + CAF_CM_FUNCNAME("ensureIsOpen"); + CAF_CM_LOCK_UNLOCK; + AMQCHANNEL_ENTRY; + if (!isOpen()) { + CAF_CM_EXCEPTIONEX_VA0( + AmqpExceptions::ChannelClosedException, + 0, + "Attempt to use closed channel"); + } + AMQCHANNEL_EXIT; +} + +/* + * Execute a synchronous call such as basic.get, queue.declare, exchange.delete, + * etc. The AMQP synchronous calls are all executed through this mechanism. + */ +SmartPtrAMQCommand AMQChannel::execRpc(const SmartPtrIServerMethod& method) { + CAF_CM_FUNCNAME("execRpc"); + AMQCHANNEL_ENTRY; + SmartPtrBlockingRpcContinuation rpc; + try { + CAF_CM_LOCK_UNLOCK1(_channelMutex); + CAF_CM_LOCK_UNLOCK; + + ensureIsOpen(); + + const std::string methodName = method->getMethodName(); + rpc.CreateInstance(); + rpc->init(); + + // Wait for the current rpc to finish + while (_activeRpc) { + { + CAF_CM_UNLOCK_LOCK; + _channelSignal.waitOrTimeout(_channelMutex, 0); + } + } + + // indicate the new active RPC call + _activeRpc = rpc; + + if (_debugLogFlags & DEBUGLOG_FLAG_AMQP) { + CAF_CM_LOG_DEBUG_VA2( + "[channel=%d] Sending AMQP method %s", + _channelNumber, + method->getMethodName().c_str()); + } + + // send the call to the server + AMQUtil::checkAmqpStatus( + method->send(_channelHandle), + methodName.c_str()); + } + CAF_CM_CATCH_ALL; + CAF_CM_THROWEXCEPTION; + + // Check the reply. If null there should be + // a reason (exception) explaining why the call failed. + // This getReply() doesn't need to be in a UNLOCK_LOCK because the LOCK_UNLOCK + // was scoped by the try. + SmartPtrAMQCommand reply = rpc->getReply(); + CAF_CM_LOG_DEBUG_VA1("RPC reply - %s", (reply.IsNull() ? "NULL" : reply->getMethod()->getProtocolMethodName().c_str())); + AMQCHANNEL_EXIT; + if (!reply) { + SmartPtrCCafException exception = rpc->getException(); + if (exception) { + exception->throwAddRefedSelf(); + } else { + CAF_CM_EXCEPTIONEX_VA0( + IllegalStateException, + 0, + "AMQP reply was not returned and no exception (reason) was provided."); + } + } + return reply; +} + +/* + * Retrieve the outstanding RPC call. This method interacts with the execRpc() + * method indirectly through the _channelMutex and _channelSignal. + * The execRpc() call blocks until the current RPC call is handled by the thread + * running the taskHandler (which eventually calls handleCompleteInboundCommand()) + * which calls this. + * + * When handleCompleteInboundCommand() gets the outstanding RPC to handle the command, + * the _activeRpc member is cleared and _channelSignal is signaled thus freeing + * the execRpc() call to execute its RPC. + */ +SmartPtrIRpcContinuation AMQChannel::nextOutstandingRpc() { + CAF_CM_FUNCNAME_VALIDATE("nextOutstandingRpc"); + + CAF_CM_LOCK_UNLOCK1(_channelMutex); + CAF_CM_LOCK_UNLOCK; + + SmartPtrIRpcContinuation result = _activeRpc; + _activeRpc = NULL; + _channelSignal.signal(); + AMQCHANNEL_EXIT; + return result; +} + +/* + * Transmit an AMQP method to the server + */ +void AMQChannel::transmit(const SmartPtrIServerMethod& method) { + CAF_CM_FUNCNAME_VALIDATE("transmit"); + CAF_CM_LOCK_UNLOCK; + AMQCHANNEL_ENTRY; + CAF_CM_VALIDATE_SMARTPTR(method); + if (_debugLogFlags & DEBUGLOG_FLAG_AMQP) { + CAF_CM_LOG_DEBUG_VA2( + "[channel=%d] Sending AMQP method %s", + _channelNumber, + method->getMethodName().c_str()); + } + AMQUtil::checkAmqpStatus(method->send(_channelHandle)); + AMQCHANNEL_EXIT; +} + +/* + * This method is called when we have received a channel.close method + * from the server. Respond with a channel.close-ok method then + * abort the outstanding RPC (if any) with the exception (reason) for the abort. + */ +void AMQChannel::channelCloseByServerShutdown( + const AmqpMethods::Channel::SmartPtrClose& closeMethod) { + CAF_CM_FUNCNAME("channelCloseByServerShutdown"); + AMQCHANNEL_ENTRY; + try { + CAF_CM_LOCK_UNLOCK1(_channelMutex); + CAF_CM_LOCK_UNLOCK; + + _isOpen = false; + _dispatcher->quiesce(); + + // Send channel.close-ok + SmartPtrChannelCloseOkMethod method; + method.CreateInstance(); + method->init(); + transmit(method); + + // Create the reason for the shutdown. + AmqpExceptions::SmartPtrChannelClosedByServerException exception; + try { + exception.CreateInstance(); + + // We *should* have received a Channel::Close method BUT you can + // never be too careful... + if (closeMethod) { + exception->populateVA( + closeMethod->getReplyCode(), + _cm_className_, + _cm_funcName_, + "channel.close %s [channel=%d][code=0x%04X][class id=0x%04X][method id=0x%04X]", + closeMethod->getReplyText().c_str(), + _channelNumber, + closeMethod->getReplyCode(), + closeMethod->getClassId(), + closeMethod->getMethodId()); + } else { + exception->populate( + "channel.close - no other information available", + 0, + _cm_className_, + _cm_funcName_); + } + + // Abort the outstanding rpc if any + if (_activeRpc) { + SmartPtrIRpcContinuation rpc = _activeRpc; + _activeRpc = NULL; + rpc->handleAbort(exception); + } + + // Notify the dispatcher + _dispatcher->handleShutdown(exception); + } + CAF_CM_CATCH_ALL; + + // Tear down + AmqpChannel::AMQP_ChannelClose(_channelHandle); + _channelHandle = AMQP_HANDLE_INVALID; + + // Remove this channel from management + _connection->notifyChannelClosedByServer(_channelNumber); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + AMQCHANNEL_EXIT; +} + +void AMQChannel::callReturnListeners(const SmartPtrAMQCommand& command) { + CAF_CM_FUNCNAME("callReturnListeners"); + CAF_CM_LOCK_UNLOCK; + try { + AmqpMethods::Basic::SmartPtrReturn basicReturn; + basicReturn.QueryInterface(command->getMethod(), false); + if (basicReturn) { + CowReturnListenerCollection::SmartPtrContainer listeners = + _returnListeners.getAll(); + AmqpContentHeaders::SmartPtrBasicProperties properties; + properties.QueryInterface(command->getContentHeader(), false); + if (properties) { + for (TSmartIterator listener(*listeners); + listener; + listener++) { + listener->handleReturn( + basicReturn->getReplyCode(), + basicReturn->getReplyText(), + basicReturn->getExchange(), + basicReturn->getRoutingKey(), + properties, + command->getContentBody()); + } + } else { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchInterfaceException, + 0, + "Expected content header to be a basic.properties object. Instead it is " + "a '%s' object. Please report this bug.", + command->getContentHeader()->getClassName().c_str()); + } + } else { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchInterfaceException, + 0, + "Expected command to be a basic.return command. Instead it is a " + "'%s' command. Please report this bug.", + command->getMethod()->getProtocolMethodName().c_str()); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; +} + +#endif + +#if (1) // ChannelTask +AMQChannel::ChannelTask::ChannelTask() : + CAF_CM_INIT("AMQChannel::ChannelTask") { +} + +AMQChannel::ChannelTask::~ChannelTask() { +} + +void AMQChannel::ChannelTask::init(SmartPtrAMQChannel channel) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_channel); + CAF_CM_VALIDATE_PTR(channel); + _channel = channel; +} + +bool AMQChannel::ChannelTask::run() { + CAF_CM_FUNCNAME_VALIDATE("run"); + CAF_CM_PRECOND_ISINITIALIZED(_channel); + return _channel->taskHandler(); +} +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQChannel.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQChannel.h new file mode 100644 index 000000000..8b775dce2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQChannel.h @@ -0,0 +1,252 @@ +/* + * Created on: May 2, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQCHANNEL_H_ +#define AMQCHANNEL_H_ + +#include "IConnectionInt.h" +#include "AMQCommand.h" +#include "IRpcContinuation.h" +#include "ConsumerDispatcher.h" +#include "TCopyOnWriteContainer.h" + +namespace Caf { namespace AmqpClient { + +class AMQChannel; +CAF_DECLARE_SMART_POINTER(AMQChannel); + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Concrete implementation of a Channel object representing an AMQP channel. + */ +class AMQChannel : public Channel { +public: + AMQChannel(); + virtual ~AMQChannel(); + + /** + * @brief Initializer + * @param connection the owning connection + * @param workService the work service to add channel tasks to + */ + void init( + const SmartPtrIConnectionInt& connection, + const SmartPtrConsumerWorkService& workService); + + /** + * @brief Notification of connection closure + *

+ * Called by the AMQChannelManager to notify the channel that the parent connect + * has closed for the supplied reason. + * @param exception the reason for the closure + */ + void notifyConnectionClosed(SmartPtrCCafException& exception); + + /** + * @brief Close the channel with the given reason + * @param exception reason for closure + */ + void close(SmartPtrCCafException& exception); + +public: // Channel + uint16 getChannelNumber(); + + void close(); + + bool isOpen(); + +public: // Basic + void basicAck( + const uint64 deliveryTag, + const bool ackMultiple); + + SmartPtrGetResponse basicGet( + const std::string& queue, + const bool noAck); + + void basicPublish( + const std::string& exchange, + const std::string& routingKey, + const AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body); + + void basicPublish( + const std::string& exchange, + const std::string& routingKey, + const bool mandatory, + const bool immediate, + const AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body); + + AmqpMethods::Basic::SmartPtrConsumeOk basicConsume( + const std::string& queue, + const SmartPtrConsumer& consumer); + + AmqpMethods::Basic::SmartPtrConsumeOk basicConsume( + const std::string& queue, + const bool noAck, + const SmartPtrConsumer& consumer); + + AmqpMethods::Basic::SmartPtrConsumeOk basicConsume( + const std::string& queue, + const std::string& consumerTag, + const bool noAck, + const bool noLocal, + const bool exclusive, + const SmartPtrConsumer& consumer, + const SmartPtrTable& arguments = SmartPtrTable()); + + AmqpMethods::Basic::SmartPtrCancelOk basicCancel( + const std::string& consumerTag); + + AmqpMethods::Basic::SmartPtrRecoverOk basicRecover( + const bool requeue); + + AmqpMethods::Basic::SmartPtrQosOk basicQos( + const uint32 prefetchSize, + const uint32 prefetchCount, + const bool global); + + void basicReject( + const uint64 deliveryTag, + const bool requeue); + +public: // Exchange + AmqpMethods::Exchange::SmartPtrDeclareOk exchangeDeclare( + const std::string& exchange, + const std::string& type, + const bool durable = false, + const SmartPtrTable& arguments = SmartPtrTable()); + + AmqpMethods::Exchange::SmartPtrDeleteOk exchangeDelete( + const std::string& exchange, + const bool ifUnused); + +public: // Queue + AmqpMethods::Queue::SmartPtrDeclareOk queueDeclare(); + + AmqpMethods::Queue::SmartPtrDeclareOk queueDeclare( + const std::string& queue, + const bool durable, + const bool exclusive, + const bool autoDelete, + const SmartPtrTable& arguments = SmartPtrTable()); + + AmqpMethods::Queue::SmartPtrDeclareOk queueDeclarePassive( + const std::string& queue); + + AmqpMethods::Queue::SmartPtrDeleteOk queueDelete( + const std::string& queue, + const bool ifUnused, + const bool ifEmpty); + + AmqpMethods::Queue::SmartPtrPurgeOk queuePurge( + const std::string& queue); + + AmqpMethods::Queue::SmartPtrBindOk queueBind( + const std::string& queue, + const std::string& exchange, + const std::string& routingKey, + const SmartPtrTable& arguments = SmartPtrTable()); + + AmqpMethods::Queue::SmartPtrUnbindOk queueUnbind( + const std::string& queue, + const std::string& exchange, + const std::string& routingKey, + const SmartPtrTable& arguments = SmartPtrTable()); + + void addReturnListener( + const SmartPtrReturnListener& listener); + + bool removeReturnListener( + const SmartPtrReturnListener& listener); + +private: + bool taskHandler(); + + void handleCompleteInboundCommand(const SmartPtrAMQCommand& command); + + bool processAsync(const SmartPtrAMQCommand& command); + + void ensureIsOpen(); + + SmartPtrAMQCommand execRpc(const SmartPtrIServerMethod& method); + + SmartPtrIRpcContinuation nextOutstandingRpc(); + + void transmit(const SmartPtrIServerMethod& method); + + void channelCloseByServerShutdown(const AmqpMethods::Channel::SmartPtrClose& closeMethod); + + void callReturnListeners(const SmartPtrAMQCommand& command); + +private: + /* + * This class hooks the channel into the worker service + * thread pool for channel inbound AMQP frame processing + */ + class ChannelTask : public CManagedThreadPool::IThreadTask { + public: + ChannelTask(); + + virtual ~ChannelTask(); + + /* + * Initialize the thread task + * channel is the pointer to the parent channel + */ + void init(SmartPtrAMQChannel channel); + + /* + * Thread pool task execution callback + * + * Calls through to the channel to do the actual work + * returns 'true' if the thread pool should remove this task + * returns 'false' if the thread pool should requeue this task + */ + bool run(); + + private: + SmartPtrAMQChannel _channel; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(ChannelTask); + }; + CAF_DECLARE_SMART_POINTER(ChannelTask); + +private: + static const uint8 DEBUGLOG_FLAG_ENTRYEXIT; + static const uint8 DEBUGLOG_FLAG_AMQP; + + bool _isInitialized; + volatile bool _isOpen; + uint8 _debugLogFlags; + SmartPtrIConnectionInt _connection; + SmartPtrConsumerWorkService _workService; + SmartPtrConsumerDispatcher _dispatcher; + uint16 _channelNumber; + SmartPtrCAmqpChannel _channelHandle; + SmartPtrAMQCommand _command; + SmartPtrIRpcContinuation _activeRpc; + SmartPtrCAutoMutex _channelMutex; + CThreadSignal _channelSignal; + + typedef std::deque ReturnListenerCollection; + typedef TCopyOnWriteContainer CowReturnListenerCollection; + CowReturnListenerCollection _returnListeners; + + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_CREATE_THREADSAFE; + CAF_CM_DECLARE_NOCOPY(AMQChannel); +}; + +}} + +#endif /* AMQCHANNEL_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQChannelManager.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQChannelManager.cpp new file mode 100644 index 000000000..81bc223e7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQChannelManager.cpp @@ -0,0 +1,142 @@ +/* + * Created on: May 7, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "AMQChannelManager.h" + +using namespace Caf::AmqpClient; + +AMQChannelManager::AMQChannelManager() : + _isInitialized(false), + CAF_CM_INIT_LOG("AMQChannelManager") { + CAF_CM_INIT_THREADSAFE; +} + +AMQChannelManager::~AMQChannelManager() { +} + +void AMQChannelManager::init(const SmartPtrConsumerWorkService& workService) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_PTR(workService); + _workService = workService; + _isInitialized = true; +} + +SmartPtrChannel AMQChannelManager::createChannel(const SmartPtrIConnectionInt& connection) { + CAF_CM_FUNCNAME("createChannel"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(connection); + SmartPtrAMQChannel channel; + + channel.CreateInstance(); + + SmartPtrConsumerWorkService workService = _workService; + { + CAF_CM_UNLOCK_LOCK; + channel->init(connection, workService); + } + + const uint16 channelNumber = channel->getChannelNumber(); + if (_channelMap.insert(ChannelMap::value_type(channelNumber, channel)).second) { + + } else { + CAF_CM_EXCEPTIONEX_VA1( + DuplicateElementException, + 0, + "Channel number %d is already in use. This should never happen. " + "Please report this as a bug.", + channelNumber); + } + return channel; +} + +SmartPtrChannel AMQChannelManager::getChannel(const uint16 channelNumber) { + CAF_CM_FUNCNAME("getChannel"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + SmartPtrChannel channel; + ChannelMap::const_iterator channelIter = _channelMap.find(channelNumber); + if (channelIter != _channelMap.end()) { + channel = (*channelIter).second; + } else { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchElementException, + 0, + "Channel #%d does not exist.", + channelNumber); + } + return channel; +} + +size_t AMQChannelManager::getOpenChannelCount() { + CAF_CM_FUNCNAME_VALIDATE("getOpenChannelCount"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _channelMap.size(); +} + +void AMQChannelManager::notifyConnectionClose(SmartPtrCCafException& shutdownException) { + CAF_CM_FUNCNAME("notifyConnectionClose"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + try { + _workService->notifyConnectionClosed(); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + + for (TSmartMapIterator channel(_channelMap); channel; channel++) { + try { + CAF_CM_UNLOCK_LOCK; + channel->notifyConnectionClosed(shutdownException); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + } + _channelMap.clear(); +} + +void AMQChannelManager::closeChannel(const uint16 channelNumber, SmartPtrCCafException& reason) { + CAF_CM_FUNCNAME("closeChannel"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + ChannelMap::iterator channel = _channelMap.find(channelNumber); + if (channel != _channelMap.end()) { + { + CAF_CM_UNLOCK_LOCK; + channel->second->close(reason); + } + _channelMap.erase(channel); + } else { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchElementException, + 0, + "Channel #%d is not in the channel manager", + channelNumber); + } +} + +void AMQChannelManager::removeChannel(const uint16 channelNumber) { + CAF_CM_FUNCNAME("removeChannel"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + ChannelMap::iterator channel = _channelMap.find(channelNumber); + if (channel != _channelMap.end()) { + _channelMap.erase(channel); + } else { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchElementException, + 0, + "Channel #%d is not in the channel manager", + channelNumber); + } +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQChannelManager.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQChannelManager.h new file mode 100644 index 000000000..1b4cf9a0c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQChannelManager.h @@ -0,0 +1,92 @@ +/* + * Created on: May 7, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQCHANNELMANAGER_H_ +#define AMQCHANNELMANAGER_H_ + +#include "AMQChannel.h" +#include "ConsumerWorkService.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Manages a set of channels for a connection. + * Channels are indexed by channel number (1.._channelMax). + */ +class AMQChannelManager { +public: + AMQChannelManager(); + virtual ~AMQChannelManager(); + +public: + /** + * @brief Initialize the manager to control channelMax channels. + * @param workService the service (thread pool) to run the channels in + */ + void init(const SmartPtrConsumerWorkService& workService); + + /** + * @brief Create a new channel + * @param connection The controlling #Caf::AmqpClient::IConnectionInt connection + * @return the new Channel + */ + SmartPtrChannel createChannel(const SmartPtrIConnectionInt& connection); + + /** + * @brief Return an existing channel on this connection. + * @param channelNumber the number of the required channel + * @return the #Caf::AmqpClient::Channel interface to the channel if it exists else + * throws an exception + */ + SmartPtrChannel getChannel(const uint16 channelNumber); + + /** + * @brief Return the number of open channels + * @return the number of open channels + */ + size_t getOpenChannelCount(); + + /** + * @brief Notify all channels that the connection is closed and the reason for it + * @param shutdownException the exception (reason) for the closure + */ + void notifyConnectionClose(SmartPtrCCafException& shutdownException); + + /** + * @brief Close achannel with the supplied reason + * @param channelNumber the channel to close + * @param reason the reason for closure + */ + void closeChannel(const uint16 channelNumber, SmartPtrCCafException& reason); + + /** + * @brief Remove a channel from management + * @param channelNumber channel number + */ + void removeChannel(const uint16 channelNumber); + +private: + typedef std::map ChannelMap; + + bool _isInitialized; + ChannelMap _channelMap; + SmartPtrConsumerWorkService _workService; + + CAF_CM_CREATE; + CAF_CM_CREATE_THREADSAFE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(AMQChannelManager); +}; +CAF_DECLARE_SMART_POINTER(AMQChannelManager); + +}} + +#endif /* AMQCHANNELMANAGER_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQCommand.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQCommand.cpp new file mode 100644 index 000000000..400dd0ed5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQCommand.cpp @@ -0,0 +1,50 @@ +/* + * Created on: May 9, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "AMQCommand.h" + +using namespace Caf::AmqpClient; + +AMQCommand::AMQCommand() : + CAF_CM_INIT("AMQCommand") { +} + +AMQCommand::~AMQCommand() { +} + +void AMQCommand::init() { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_assembler); + _assembler.CreateInstance(); + _assembler->init(); +} + +bool AMQCommand::handleFrame(const SmartPtrCAmqpFrame& frame) { + CAF_CM_FUNCNAME_VALIDATE("handleFrame"); + CAF_CM_PRECOND_ISINITIALIZED(_assembler); + return _assembler->handleFrame(frame); +} + +SmartPtrCDynamicByteArray AMQCommand::getContentBody() { + CAF_CM_FUNCNAME_VALIDATE("getContentBody"); + CAF_CM_PRECOND_ISINITIALIZED(_assembler); + return _assembler->getContentBody(); +} + +SmartPtrIContentHeader AMQCommand::getContentHeader() { + CAF_CM_FUNCNAME_VALIDATE("getContentHeader"); + CAF_CM_PRECOND_ISINITIALIZED(_assembler); + return _assembler->getContentHeader(); +} + +SmartPtrIMethod AMQCommand::getMethod() { + CAF_CM_FUNCNAME_VALIDATE("getMethod"); + CAF_CM_PRECOND_ISINITIALIZED(_assembler); + return _assembler->getMethod(); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQCommand.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQCommand.h new file mode 100644 index 000000000..f08ab0cec --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQCommand.h @@ -0,0 +1,70 @@ +/* + * Created on: May 9, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQCOMMAND_H_ +#define AMQCOMMAND_H_ + +#include "CommandAssembler.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief This class represents an AMQP command + *

+ * This class wraps up the method, content header and body information for an + * incoming AMQP command. + */ +class AMQCommand { +public: + AMQCommand(); + virtual ~AMQCommand(); + + /** + * @brief Prepare the object for frame processing + */ + void init(); + + /** + * @brief Process an AMQP frame + * @param frame amqp frame data + */ + bool handleFrame(const SmartPtrCAmqpFrame& frame); + + /** + * @brief Return the body if available + * @return the body's raw bytes if available or a null object + */ + SmartPtrCDynamicByteArray getContentBody(); + + /** + * @brief Return the content header if available + * @return the IContentHeader if available or a + * null object + */ + SmartPtrIContentHeader getContentHeader(); + + /** + * @brief Return the method + * @return the IMethod object interface representing the method. + * QueryInterface must be used to get to the actual method object + */ + SmartPtrIMethod getMethod(); + +private: + SmartPtrCommandAssembler _assembler; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(AMQCommand); +}; +CAF_DECLARE_SMART_POINTER(AMQCommand); + +}} + +#endif /* AMQCOMMAND_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQConnection.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQConnection.cpp new file mode 100644 index 000000000..fe0cb4ab6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQConnection.cpp @@ -0,0 +1,484 @@ +/* + * Created on: May 2, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "AMQConnection.h" +#include "AMQUtil.h" + +using namespace Caf::AmqpClient; + +AMQConnection::AMQConnection() : + _isInitialized(false), + _isRunning(false), + _shouldShutdown(false), + _wasCloseCalled(false), + _thread(NULL), + _connectionTimeout(0), + _requestedFrameMax(0), + _requestedChannelMax(0), + _requestedHeartbeat(0), + _retries(0), + _secondsToWait(0), + CAF_CM_INIT_LOG("AMQConnection") { + CAF_CM_FUNCNAME("AMQPConnection()"); + CAF_CM_INIT_THREADSAFE; + try { + CAF_THREADSIGNAL_INIT; + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; +} + +AMQConnection::~AMQConnection() { + CAF_CM_FUNCNAME_VALIDATE("~AMQConnection()"); + if (_weakReferenceSelf) { + _weakReferenceSelf->clearReference(); + _weakReferenceSelf = NULL; + } + + if (_connectionHandle && !_wasCloseCalled) { + CAF_CM_LOG_CRIT_VA0( + "close() has not been called on this connection. " + "You *** MUST *** call close() on a connection before releasing it."); + } + + if (_connectionHandle) { + AmqpConnection::AMQP_ConnectionClose(_connectionHandle); + } +} + +void AMQConnection::init( + const std::string username, + const std::string password, + const SmartPtrAddress& address, + const SmartPtrCertInfo& certInfo, + const uint32 requestedFrameMax, + const uint32 requestedChannelMax, + const uint32 requestedHeartbeat, + const uint32 connectionTimeout, + const uint32 consumerThreadCount, + const uint16 retries, + const uint16 secondsToWait) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(username); + // password is optional (e.g. AMQP Tunnel) + CAF_CM_VALIDATE_SMARTPTR(address); + // other parameters do not require validation + + CAF_CM_LOG_DEBUG_VA1( + "Creating AuthPlain credential for user %s", + username.c_str()); + AMQPStatus status = AmqpAuthPlain::AMQP_AuthPlainCreateClient( + _authMechanism, + username, + password); + AMQUtil::checkAmqpStatus(status, "AmqpAuthPlain::AMQP_AuthPlainCreateClient"); + + _address = address; + _certInfo = certInfo; + _requestedFrameMax = requestedFrameMax; + _requestedChannelMax = requestedChannelMax; + _requestedHeartbeat = requestedHeartbeat; + _retries = retries; + _secondsToWait = secondsToWait; + + initConnection(); + _connectionTimeout = connectionTimeout; + _connectionSignal.initialize("connectionSignal"); + _weakReferenceSelf.CreateInstance(); + _weakReferenceSelf->setReference(this); + + _threadPool.CreateInstance(); + _threadPool->init(address->toString(), consumerThreadCount, 100); + + _workService.CreateInstance(); + _workService->init(_threadPool); + _isInitialized = true; +} + +void AMQConnection::start() { + CAF_CM_FUNCNAME("start"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_BOOL(!_isRunning); + + bool rc = false; + GThread* thread = _thread; + uint32 connectionTimeout = _connectionTimeout; + { + CAF_CM_UNLOCK_LOCK; + CAF_THREADSIGNAL_LOCK_UNLOCK; + thread = CThreadUtils::startJoinable(threadFunc, this); + rc = _connectionSignal.waitOrTimeout(CAF_THREADSIGNAL_MUTEX, connectionTimeout); + } + _thread = thread; + + if (rc) { + try { + uint16 channelMax = 0; + AMQUtil::checkAmqpStatus( + AmqpConnection::AMQP_ConnectionGetMaxChannels(_connectionHandle, &channelMax), + "AmqpConnection::AMQP_ConnectionGetMaxChannels"); + uint32 frameMax = 0; + AMQUtil::checkAmqpStatus( + AmqpConnection::AMQP_ConnectionGetMaxFrameSize(_connectionHandle, &frameMax), + "AmqpConnection::AMQP_ConnectionGetMaxFrameSize"); + uint16 heartbeat = 0; + AMQUtil::checkAmqpStatus( + AmqpConnection::AMQP_ConnectionGetHeartbeatInterval(_connectionHandle, &heartbeat), + "AMQUtil::checkAmqpStatus"); + CAF_CM_LOG_DEBUG_VA3( + "Tuned connection [chMax=%d][frameMax=%d][hbeat=%d]", + channelMax, + frameMax, + heartbeat); + _channelManager.CreateInstance(); + _channelManager->init(_workService); + } + CAF_CM_CATCH_ALL + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_THROWEXCEPTION; + } else { + CAF_CM_LOG_DEBUG_VA1("Need to shutdown due to start issue: %d", rc); + _shouldShutdown = true; + + SmartPtrCCafException threadException; + GThread* thread = _thread; + { + CAF_CM_UNLOCK_LOCK; + threadException = + static_cast(g_thread_join(thread)); + } + + _thread = NULL; + + if (threadException) { + threadException->throwAddRefedSelf(); + } else { + CAF_CM_EXCEPTIONEX_VA1( + AmqpExceptions::AmqpTimeoutException, + 0, + "Timed out trying to connect to %s", + _address->toString().c_str()); + } + } +} + +SmartPtrChannel AMQConnection::createChannel() { + CAF_CM_FUNCNAME_VALIDATE("createChannel"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + bool isRunning; + SmartPtrAMQChannelManager channelManager; + SmartPtrConnectionWeakReference weakReferenceSelf; + { + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + isRunning = _isRunning; + channelManager = _channelManager; + weakReferenceSelf = _weakReferenceSelf; + } + + return createChannel(isRunning, channelManager, weakReferenceSelf); +} + +void AMQConnection::closeChannel(const SmartPtrChannel& channel) { + CAF_CM_FUNCNAME_VALIDATE("closeChannel"); + CAF_CM_VALIDATE_SMARTPTR(channel); + + bool isRunning; + SmartPtrAMQChannelManager channelManager; + { + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + isRunning = _isRunning; + channelManager = _channelManager; + } + + closeChannel(isRunning, channelManager, channel); +} + +void AMQConnection::close() { + CAF_CM_FUNCNAME_VALIDATE("close"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _wasCloseCalled = true; + if (_isRunning) { + CAF_CM_LOG_DEBUG_VA0("Need to shutdown becaue the connection is closing"); + _shouldShutdown = true; + _weakReferenceSelf->clearReference(); + _weakReferenceSelf = NULL; + + _workService->notifyConnectionClosed(); + + if (NULL != _thread) { + GThread* thread = _thread; + { + CAF_CM_UNLOCK_LOCK; + g_thread_join(thread); + } + + _thread = NULL; + } + + { + CAF_CM_UNLOCK_LOCK; + while (_channelManager->getOpenChannelCount()) { + CThreadUtils::sleep(100); + } + } + } +} + +bool AMQConnection::isOpen() { + CAF_CM_FUNCNAME_VALIDATE("isOpen"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return (_isRunning && !_shouldShutdown); +} + +AMQPStatus AMQConnection::amqpConnectionOpenChannel(SmartPtrCAmqpChannel& channel) { + CAF_CM_FUNCNAME_VALIDATE("amqpConnectionOpenChannel"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_LOG_DEBUG_VA0("calling AmqpConnection::AMQP_ConnectionOpenChannel"); + AMQPStatus status = AmqpConnection::AMQP_ConnectionOpenChannel(_connectionHandle, channel); + if (status == AMQP_ERROR_OK) { + uint16 id = 0; + AmqpChannel::AMQP_ChannelGetId(channel, &id); + CAF_CM_LOG_DEBUG_VA1("created channel #%d", id); + } else { + CAF_CM_LOG_DEBUG_VA1("failed to create channel. status=%d", status); + } + return status; +} + +void AMQConnection::notifyChannelClosedByServer(const uint16 channelNumber) { + CAF_CM_LOCK_UNLOCK; + _channelManager->removeChannel(channelNumber); +} + +void AMQConnection::channelCloseChannel(Channel *channel) { + CAF_CM_FUNCNAME_VALIDATE("channelCloseChannel"); + CAF_CM_VALIDATE_PTR(channel); + closeChannel(channel); +} + +void AMQConnection::initConnection() { + CAF_CM_FUNCNAME_VALIDATE("initConnection"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_LOG_DEBUG_VA3( + "Creating connection " + "[reqChMax=%d][reqFrameMax=%d][reqHB=%d]", + _requestedChannelMax, + _requestedFrameMax, + _requestedHeartbeat); + AMQPStatus status = AmqpConnection::AMQP_ConnectionCreate( + _connectionHandle, + _address, + _authMechanism, + _certInfo, + _requestedChannelMax, + _requestedFrameMax, + _requestedHeartbeat, + _retries, + _secondsToWait); + AMQUtil::checkAmqpStatus(status, "AmqpConnection::AMQP_ConnectionCreate"); +} + +void AMQConnection::closeChannel( + const bool isRunning, + const SmartPtrAMQChannelManager channelManager, + const SmartPtrChannel& channel) { + CAF_CM_STATIC_FUNC("AMQConnection", "closeChannel"); + CAF_CM_VALIDATE_SMARTPTR(channelManager); + CAF_CM_VALIDATE_SMARTPTR(channel); + + if (isRunning) { + if (channel->isOpen()) { + const uint16 channelNumber = channel->getChannelNumber(); + SmartPtrCCafException reason; + try { + AmqpExceptions::SmartPtrChannelClosedByUserException exception; + exception.CreateInstance(); + reason = exception.GetNonAddRefedInterface(); + reason->populate( + "Closed by user", + 0, + _cm_className_, + _cm_funcName_); + + channelManager->closeChannel(channelNumber, reason); + } + CAF_CM_CATCH_ALL; + } + } else { + CAF_CM_EXCEPTIONEX_VA0( + IllegalStateException, + 0, + "The connection is closed"); + } +} + +SmartPtrChannel AMQConnection::createChannel( + const bool isRunning, + const SmartPtrAMQChannelManager& channelManager, + const SmartPtrConnectionWeakReference& weakReferenceSelf) { + CAF_CM_STATIC_FUNC("AMQConnection", "createChannel"); + + if (!isRunning) { + CAF_CM_EXCEPTIONEX_VA0( + AmqpExceptions::ConnectionClosedException, + 0, + "The connection is closed"); + } + + return channelManager->createChannel(weakReferenceSelf); +} + +void* AMQConnection::threadFunc(void* context) { + CAF_CM_STATIC_FUNC("AMQConnection", "threadFunc"); + try { + CAF_CM_VALIDATE_PTR(context); + SmartPtrAMQConnection self = (AMQConnection*)context; + self->threadWorker(); + } + CAF_CM_CATCH_ALL; + + return CAF_CM_GETEXCEPTION; +} + +void AMQConnection::threadWorker() { + CAF_CM_FUNCNAME("threadWorker"); + CAF_CM_LOCK_UNLOCK; + + try { + CAF_CM_LOG_DEBUG_VA1( + "Connecting to %s", + _address->toString().c_str()); + + AMQPStatus status = AMQP_ERROR_OK; + SmartPtrCAmqpConnection connectionHandle = _connectionHandle; + { + CAF_CM_UNLOCK_LOCK; + status = AmqpConnection::AMQP_ConnectionConnect( + connectionHandle, + AMQP_CONNECTION_FLAG_CLOSE_SOCKET); + } + AMQUtil::checkAmqpStatus(status, "AmqpConnection::AMQP_ConnectionConnect"); + + AMQPConnectionState state; + status = AmqpConnection::AMQP_ConnectionGetState( + _connectionHandle, + &state); + AMQUtil::checkAmqpStatus(status, "AmqpConnection::AMQP_ConnectionGetState"); + + while (!_shouldShutdown && (AMQP_STATE_CONNECTED != state)) { + status = AmqpConnection::AMQP_ConnectionProcessIO(_connectionHandle); + switch (status) { + case AMQP_ERROR_OK: + break; + + case AMQP_ERROR_IO_ERROR: + { + const char *err = NULL; + AmqpConnection::AMQP_ConnectionGetLastError(_connectionHandle, &err); + CAF_CM_LOG_WARN_VA2( + "Connection to [%s] failed: %s", + _address->toString().c_str(), + err); + _connectionHandle = AMQP_HANDLE_INVALID; + CThreadUtils::sleep(250); + initConnection(); + AMQPStatus status = AmqpConnection::AMQP_ConnectionConnect( + _connectionHandle, + AMQP_CONNECTION_FLAG_CLOSE_SOCKET); + AMQUtil::checkAmqpStatus(status, "AmqpConnection::AMQP_ConnectionConnect"); + } + break; + + default: + { + const char *err = NULL; + AmqpConnection::AMQP_ConnectionGetLastError(_connectionHandle, &err); + AMQUtil::checkAmqpStatus(status, err); + } + break; + } + + status = AmqpConnection::AMQP_ConnectionGetState( + _connectionHandle, + &state); + AMQUtil::checkAmqpStatus( + status, + "AmqpConnection::AMQP_ConnectionGetState"); + } + + if (!_shouldShutdown && (AMQP_STATE_CONNECTED == state)) { + { + CAF_THREADSIGNAL_LOCK_UNLOCK; + _isRunning = true; + _connectionSignal.signal(); + } + + while (!_shouldShutdown && AMQP_STATE_CONNECTED == state) { + SmartPtrCAmqpConnection connectionHandle = _connectionHandle; + { + CAF_CM_UNLOCK_LOCK; + status = AmqpConnection::AMQP_ConnectionWaitForIO(connectionHandle, 200); + status = AmqpConnection::AMQP_ConnectionProcessIO(connectionHandle); + status = AmqpConnection::AMQP_ConnectionGetState(connectionHandle, &state); + } + } + + _isRunning = false; + CAF_CM_LOG_DEBUG_VA2( + "IO loop has stopped. " + "[_shouldShutdown=%d][state=%d]", + _shouldShutdown, + state); + + SmartPtrCCafException shutdownException; + try { + if (_shouldShutdown) { + AmqpExceptions::SmartPtrChannelClosedByShutdownException exception; + exception.CreateInstance(); + shutdownException = exception.GetNonAddRefedInterface(); + shutdownException->populate( + "Normal application shutdown", + 0, + _cm_className_, + _cm_funcName_); + } else { + const char* error = NULL; + AmqpConnection::AMQP_ConnectionGetLastError(_connectionHandle, &error); + AmqpExceptions::SmartPtrConnectionClosedByIOException exception; + exception.CreateInstance(); + shutdownException = exception.GetNonAddRefedInterface(); + shutdownException->populate( + error, + 0, + _cm_className_, + _cm_funcName_); + } + { + CAF_CM_UNLOCK_LOCK; + _channelManager->notifyConnectionClose(shutdownException); + } + AmqpConnection::AMQP_ConnectionClose(_connectionHandle); + _connectionHandle = AMQP_HANDLE_INVALID; + } + CAF_CM_CATCH_ALL; + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_THROWEXCEPTION; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQConnection.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQConnection.h new file mode 100644 index 000000000..83fa83828 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQConnection.h @@ -0,0 +1,130 @@ +/* + * Created on: May 2, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQCONNECTION_H_ +#define AMQCONNECTION_H_ + +#include "AMQChannelManager.h" +#include "ConnectionWeakReference.h" +#include "ConsumerWorkService.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Concrete class representing and managing an AMQP connection to a broker. + *

+ * To create a broker connection, use a ConnectionFactory created + * by calling #createConnectionFactory + */ +class AMQConnection : public Connection, public IConnectionInt { +public: + AMQConnection(); + virtual ~AMQConnection(); + +public: + /** + * @brief Initialize the connection. + * @param username name used to establish connection + * @param password for username + * @param address info needed to establish connection + * @param certInfo info needed to establish a secure connection + * @param requestedFrameMax max size of frame + * @param requestedChannelMax max number of channels + * @param requestedHeartbeat hearbeat in seconds + * @param connectionTimeout connection timeout in milliseconds + * @param consumerThreadCount number of consumer threads + */ + void init( + const std::string username, + const std::string password, + const SmartPtrAddress& address, + const SmartPtrCertInfo& certInfo, + const uint32 requestedFrameMax, + const uint32 requestedChannelMax, + const uint32 requestedHeartbeat, + const uint32 connectionTimeout, + const uint32 consumerThreadCount, + const uint16 retries, + const uint16 secondsToWait); + + /** + * @brief Start up the connection. + */ + void start(); + + +public: // Connection + SmartPtrChannel createChannel(); + + void closeChannel(const SmartPtrChannel& channel); + + void close(); + + bool isOpen(); + +public: // IConnectionInt + AMQPStatus amqpConnectionOpenChannel(SmartPtrCAmqpChannel& channel); + + void notifyChannelClosedByServer(const uint16 channelNumber); + + void channelCloseChannel(Channel *channel); + +private: + void initConnection(); + + static void closeChannel( + const bool isRunning, + const SmartPtrAMQChannelManager channelManager, + const SmartPtrChannel& channel); + + static SmartPtrChannel createChannel( + const bool isRunning, + const SmartPtrAMQChannelManager& channelManager, + const SmartPtrConnectionWeakReference& weakReferenceSelf); + + static void* threadFunc(void* context); + + void threadWorker(); + +private: + bool _isInitialized; + volatile bool _isRunning; + volatile bool _shouldShutdown; + bool _wasCloseCalled; + GThread* _thread; + CThreadSignal _connectionSignal; + SmartPtrAddress _address; + SmartPtrCertInfo _certInfo; + uint32 _connectionTimeout; + SmartPtrCAmqpConnection _connectionHandle; + uint32 _requestedFrameMax; + uint32 _requestedChannelMax; + uint32 _requestedHeartbeat; + uint16 _retries; + uint16 _secondsToWait; + SmartPtrCAmqpAuthMechanism _authMechanism; + SmartPtrAMQChannelManager _channelManager; + SmartPtrConnectionWeakReference _weakReferenceSelf; + SmartPtrCManagedThreadPool _threadPool; + SmartPtrConsumerWorkService _workService; + + CAF_CM_CREATE; + CAF_CM_CREATE_THREADSAFE; + CAF_CM_CREATE_LOG; + CAF_THREADSIGNAL_CREATE; + CAF_CM_DECLARE_NOCOPY(AMQConnection); +}; + +CAF_DECLARE_SMART_POINTER(AMQConnection); + +}} + +#endif /* AMQCONNECTION_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQUtil.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQUtil.cpp new file mode 100644 index 000000000..2c52716e8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQUtil.cpp @@ -0,0 +1,301 @@ +/* + * Created on: May 3, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "AMQUtil.h" + +using namespace Caf::AmqpClient; +using namespace Caf::AmqpClient::AmqpExceptions; + +void AMQUtil::checkAmqpStatus( + const AMQPStatus status, + const char* message) { + CAF_CM_STATIC_FUNC("AMQUtil", "checkAmqpStatus"); + + const char* exMsg = message ? message : ""; + + switch (status) { + case AMQP_ERROR_OK: + break; + case AMQP_ERROR_TIMEOUT: + CAF_CM_EXCEPTIONEX_VA0(AmqpTimeoutException, 0, exMsg); + break; + case AMQP_ERROR_NO_MEMORY: + CAF_CM_EXCEPTIONEX_VA0(AmqpNoMemoryException, 0, exMsg); + break; + case AMQP_ERROR_INVALID_HANDLE: + CAF_CM_EXCEPTIONEX_VA0(AmqpInvalidHandleException, 0, exMsg); + break; + case AMQP_ERROR_INVALID_ARGUMENT: + CAF_CM_EXCEPTIONEX_VA0(AmqpInvalidArgumentException, 0, exMsg); + break; + case AMQP_ERROR_WRONG_STATE: + CAF_CM_EXCEPTIONEX_VA0(AmqpWrongStateException, 0, exMsg); + break; + case AMQP_ERROR_TOO_MANY_CHANNELS: + CAF_CM_EXCEPTIONEX_VA0(AmqpTooManyChannelsException, 0, exMsg); + break; + case AMQP_ERROR_QUEUE_FULL: + CAF_CM_EXCEPTIONEX_VA0(AmqpQueueFullException, 0, exMsg); + break; + case AMQP_ERROR_FRAME_TOO_LARGE: + CAF_CM_EXCEPTIONEX_VA0(AmqpFrameTooLargeException, 0, exMsg); + break; + case AMQP_ERROR_IO_ERROR: + CAF_CM_EXCEPTIONEX_VA0(AmqpIoErrorException, 0, exMsg); + break; + case AMQP_ERROR_PROTOCOL_ERROR: + CAF_CM_EXCEPTIONEX_VA0(AmqpProtocolErrorException, 0, exMsg); + break; + case AMQP_ERROR_UNIMPLEMENTED: + CAF_CM_EXCEPTIONEX_VA0(AmqpUnimplementedException, 0, exMsg); + break; + case AMQP_ERROR_IO_INTERRUPTED: + CAF_CM_EXCEPTIONEX_VA0(AmqpIoInterruptedException, 0, exMsg); + break; + default: + CAF_CM_EXCEPTIONEX_VA0(AmqpException, status, exMsg); + break; + } +} + +std::string AMQUtil::amqpBytesToString(const amqp_bytes_t * const amqpBytes) { + CAF_CM_STATIC_FUNC_VALIDATE("AMQUtil", "amqpBytesToString"); + CAF_CM_VALIDATE_PTR(amqpBytes); + + CDynamicCharArray buf; + buf.allocateBytes(amqpBytes->len); + buf.memCpy(amqpBytes->bytes, amqpBytes->len); + return buf.getPtr(); +} + +SmartPtrTable AMQUtil::amqpApiTableToTableObj(const amqp_table_t * const amqpTable) { + CAF_CM_STATIC_FUNC_LOG("AMQUtil", "amqpApiTableToTableObj"); + CAF_CM_VALIDATE_PTR(amqpTable); + SmartPtrTable table; + table.CreateInstance(); + for (int32 idx = 0; idx < amqpTable->num_entries; ++idx) { + amqp_table_entry_t *entry = &amqpTable->entries[idx]; + CAF_CM_VALIDATE_PTR(entry); + std::string key = amqpBytesToString(&entry->key); + SmartPtrFieldImpl field; + field.CreateInstance(); + switch (entry->value.kind) { + case AMQP_FIELD_KIND_BOOLEAN: + field->setTypeAndValue( + Field::AMQP_FIELD_TYPE_BOOLEAN, + g_variant_new_boolean(entry->value.value.boolean)); + break; + case AMQP_FIELD_KIND_I8: + field->setTypeAndValue( + Field::AMQP_FIELD_TYPE_I8, + g_variant_new_byte(entry->value.value.i8)); + break; + case AMQP_FIELD_KIND_U8: + field->setTypeAndValue( + Field::AMQP_FIELD_TYPE_U8, + g_variant_new_byte(entry->value.value.i8)); + break; + case AMQP_FIELD_KIND_I16: + field->setTypeAndValue( + Field::AMQP_FIELD_TYPE_I16, + g_variant_new_int16(entry->value.value.i16)); + break; + case AMQP_FIELD_KIND_U16: + field->setTypeAndValue( + Field::AMQP_FIELD_TYPE_U16, + g_variant_new_uint16(entry->value.value.u16)); + break; + case AMQP_FIELD_KIND_I32: + field->setTypeAndValue( + Field::AMQP_FIELD_TYPE_I32, + g_variant_new_int32(entry->value.value.i32)); + break; + case AMQP_FIELD_KIND_U32: + field->setTypeAndValue( + Field::AMQP_FIELD_TYPE_U32, + g_variant_new_uint32(entry->value.value.u32)); + break; + case AMQP_FIELD_KIND_I64: + field->setTypeAndValue( + Field::AMQP_FIELD_TYPE_I64, + g_variant_new_int64(entry->value.value.i64)); + break; + case AMQP_FIELD_KIND_U64: + field->setTypeAndValue( + Field::AMQP_FIELD_TYPE_U64, + g_variant_new_uint64(entry->value.value.u64)); + break; + case AMQP_FIELD_KIND_F32: + field->setTypeAndValue( + Field::AMQP_FIELD_TYPE_F32, + g_variant_new_double(entry->value.value.f32)); + break; + case AMQP_FIELD_KIND_F64: + field->setTypeAndValue( + Field::AMQP_FIELD_TYPE_F32, + g_variant_new_double(entry->value.value.f64)); + break; + case AMQP_FIELD_KIND_UTF8: + { + const std::string value = amqpBytesToString(&entry->value.value.bytes); + field->setTypeAndValue( + Field::AMQP_FIELD_TYPE_UTF8, + g_variant_new_string(value.c_str())); + } + break; + case AMQP_FIELD_KIND_TIMESTAMP: + field->setTypeAndValue( + Field::AMQP_FIELD_TYPE_TIMESTAMP, + g_variant_new_uint64(entry->value.value.u64)); + break; + + // Type not currently supported + case AMQP_FIELD_KIND_ARRAY: + case AMQP_FIELD_KIND_BYTES: + case AMQP_FIELD_KIND_DECIMAL: + case AMQP_FIELD_KIND_TABLE: + case AMQP_FIELD_KIND_VOID: + field = NULL; + CAF_CM_LOG_ERROR_VA2( + "AMQP field %s type %d is not supported", + key.c_str(), + entry->value.kind); + break; + default: + field = NULL; + CAF_CM_LOG_ERROR_VA2( + "AMQP field %s type %d is unknown", + key.c_str(), + entry->value.kind); + break; + } + + if (field) { + if (!table->insert(std::make_pair(key, field)).second) { + CAF_CM_EXCEPTIONEX_VA1( + DuplicateElementException, + 0, + "Duplicate field '%s' detected", + key.c_str()); + } + } + } + return table; +} + +void AMQUtil::amqpTableObjToApiTable(const SmartPtrTable& table, amqp_table_t& apiTable) { + CAF_CM_STATIC_FUNC_LOG("AMQUtil", "amqpTableObjToApiTable"); + CAF_CM_VALIDATE_SMARTPTR(table); + + memset(&apiTable, 0, sizeof(apiTable)); + apiTable.num_entries = static_cast(table->size()); + apiTable.entries = + reinterpret_cast(AmqpCommon::AMQP_Calloc( + apiTable.num_entries, + sizeof(*apiTable.entries))); + CAF_CM_VALIDATE_PTR(apiTable.entries); + try { + int32 idx = 0; + for (TSmartConstMapIterator tableEntry(*table); + tableEntry; + tableEntry++, idx++) { + amqp_table_entry_t *apiEntry = &apiTable.entries[idx]; + apiEntry->key = amqp_cstring_bytes(tableEntry.getKey().c_str()); + const SmartPtrField& field = *tableEntry; + GVariant *variant = field->getValue(); + + switch (field->getAmqpType()) { + case Field::AMQP_FIELD_TYPE_NOTSET: + CAF_CM_EXCEPTIONEX_VA1( + IllegalStateException, + 0, + "Table entry '%s' has a value type of AMQP_FIELD_TYPE_NOTSET", + tableEntry.getKey().c_str()); + break; + case Field::AMQP_FIELD_TYPE_BOOLEAN: + apiEntry->value.kind = AMQP_FIELD_KIND_BOOLEAN; + apiEntry->value.value.boolean = g_variant_get_boolean(variant); + break; + case Field::AMQP_FIELD_TYPE_I8: + apiEntry->value.kind = AMQP_FIELD_KIND_I8; + apiEntry->value.value.i8 = g_variant_get_byte(variant); + break; + case Field::AMQP_FIELD_TYPE_U8: + apiEntry->value.kind = AMQP_FIELD_KIND_U8; + apiEntry->value.value.u8 = g_variant_get_byte(variant); + break; + case Field::AMQP_FIELD_TYPE_I16: + apiEntry->value.kind = AMQP_FIELD_KIND_I16; + apiEntry->value.value.i16 = g_variant_get_int16(variant); + break; + case Field::AMQP_FIELD_TYPE_U16: + apiEntry->value.kind = AMQP_FIELD_KIND_U16; + apiEntry->value.value.u16 = g_variant_get_uint16(variant); + break; + case Field::AMQP_FIELD_TYPE_I32: + apiEntry->value.kind = AMQP_FIELD_KIND_I32; + apiEntry->value.value.i32 = g_variant_get_int32(variant); + break; + case Field::AMQP_FIELD_TYPE_U32: + apiEntry->value.kind = AMQP_FIELD_KIND_U32; + apiEntry->value.value.u32 = g_variant_get_uint32(variant); + break; + case Field::AMQP_FIELD_TYPE_I64: + apiEntry->value.kind = AMQP_FIELD_KIND_I64; + apiEntry->value.value.i64 = g_variant_get_int64(variant); + break; + case Field::AMQP_FIELD_TYPE_U64: + apiEntry->value.kind = AMQP_FIELD_KIND_U64; + apiEntry->value.value.u64 = g_variant_get_uint64(variant); + break; + case Field::AMQP_FIELD_TYPE_F32: + apiEntry->value.kind = AMQP_FIELD_KIND_F32; + apiEntry->value.value.f32 = static_cast(g_variant_get_double(variant)); + break; + case Field::AMQP_FIELD_TYPE_F64: + apiEntry->value.kind = AMQP_FIELD_KIND_F64; + apiEntry->value.value.f64 = g_variant_get_double(variant); + break; + case Field::AMQP_FIELD_TYPE_UTF8: + apiEntry->value.kind = AMQP_FIELD_KIND_UTF8; + apiEntry->value.value.bytes = + amqp_cstring_bytes(g_variant_get_string(variant, NULL)); + break; + case Field::AMQP_FIELD_TYPE_TIMESTAMP: + apiEntry->value.kind = AMQP_FIELD_KIND_TIMESTAMP; + apiEntry->value.value.u64 = g_variant_get_uint64(variant); + break; + case Field::AMQP_FIELD_TYPE_ARRAY: + case Field::AMQP_FIELD_TYPE_BYTES: + case Field::AMQP_FIELD_TYPE_DECIMAL: + case Field::AMQP_FIELD_TYPE_TABLE: + case Field::AMQP_FIELD_TYPE_VOID: + default: + CAF_CM_LOG_ERROR_VA2( + "AMQP field %s type %d is not supported", + tableEntry.getKey().c_str(), + field->getAmqpType()); + break; + } + } + } + CAF_CM_CATCH_ALL; + if (CAF_CM_ISEXCEPTION) { + amqpFreeApiTable(&apiTable); + memset(&apiTable, 0, sizeof(apiTable)); + } + CAF_CM_THROWEXCEPTION; +} + +void AMQUtil::amqpFreeApiTable(amqp_table_t *table) { + if (table) { + AmqpCommon::AMQP_Free(table->entries); + memset(table, 0, sizeof(*table)); + } +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQUtil.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQUtil.h new file mode 100644 index 000000000..72f5007a9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQUtil.h @@ -0,0 +1,61 @@ +/* + * Created on: May 3, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQUTIL_H_ +#define AMQUTIL_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief A collection of helpers for dealing with AMQP and the underlying amqp library. + */ +namespace AMQUtil { + /** + * @brief Check an AMQPStatus and throw an exception if the status is not AMQP_ERROR_OK + * @param status AMQPStatus returned from amqp library calls + * @param message Optional message text to add to thrown exception + */ + void checkAmqpStatus( + const AMQPStatus status, + const char* message = NULL); + + /** + * @brief Convert an amqp_bytes_t array to a std::string + * @param amqpBytes Raw string bytes + * @return conversion to string + */ + std::string amqpBytesToString(const amqp_bytes_t * const amqpBytes); + + /** + * @brief Convert an amqp_table_t to a smart Table object + * @param amqpTable Raw table bytes + * @return convertion to a smart Table object + */ + SmartPtrTable amqpApiTableToTableObj(const amqp_table_t * const amqpTable); + + /** + * @brief Convert a smart Table object to an amqp_table_t struct + * The caller is responsible for cleaning up the table by calling amqpFreeApiTable() + * @param table smart Table object source + * @param apiTable amqp_table_t output struct + */ + void amqpTableObjToApiTable(const SmartPtrTable& table, amqp_table_t& apiTable); + + /** + * @brief Clean up the memory used by a amqp_table_t + * @param table table to free + */ + void amqpFreeApiTable(amqp_table_t *table); +} + +}} + +#endif /* AMQUTIL_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/Address.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/Address.cpp new file mode 100644 index 000000000..9d6e7f35c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/Address.cpp @@ -0,0 +1,128 @@ +/* + * Created on: May 2, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "api/Address.h" + +using namespace Caf::AmqpClient; + +Address::Address() : + _isInitialized(false), + _protocol(PROTOCOL_AMQP), + _port(UINT_MAX), + CAF_CM_INIT_LOG("Address") {} + +Address::~Address() {} + +void Address::initialize( + const std::string& protocol, + const std::string& host, + const uint32& port, + const std::string& virtualHost) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(protocol); + CAF_CM_VALIDATE_STRING(host); + + _protocol = translateProtocol(protocol, host); + + _protocolStr = protocol; + _host = host; + _port = port; + _virtualHost = virtualHost; + + std::stringstream builder; + builder << _protocolStr << ":" + << "host=" << _host << "," + << "port=" << _port << "," + << "virtualhost=" << _virtualHost; + _toString = builder.str(); + + _isInitialized = true; +} + +/** + * @return the protocol + */ +Protocol Address::getProtocol() const { + CAF_CM_FUNCNAME_VALIDATE("getProtocol"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _protocol; +} + +/** + * @return the protocol + */ +std::string Address::getProtocolStr() const { + CAF_CM_FUNCNAME_VALIDATE("getProtocol"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _protocolStr; +} + +/** + * @return the host name + */ +std::string Address::getHost() const { + CAF_CM_FUNCNAME_VALIDATE("getHost"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _host; +} + +/** + * @return the port number + */ +uint32 Address::getPort() const { + CAF_CM_FUNCNAME_VALIDATE("getPort"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _port; +} + +std::string Address::getVirtualHost() const { + CAF_CM_FUNCNAME_VALIDATE("getVirtualHost"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _virtualHost; +} + +std::string Address::toString() const { + CAF_CM_FUNCNAME_VALIDATE("toString"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _toString; +} + +Protocol Address::translateProtocol( + const std::string& protocol, + const std::string& host) const { + CAF_CM_FUNCNAME("translateProtocol"); + CAF_CM_VALIDATE_STRING(protocol); + CAF_CM_VALIDATE_STRING(host); + + Protocol rc = PROTOCOL_AMQP; + if (protocol.compare("amqp") == 0) { + rc = PROTOCOL_AMQP; + CAF_CM_LOG_DEBUG_VA1( + "Parsed amqp protocol - host: %s", host.c_str()); + } else if (protocol.compare("amqps") == 0) { + rc = PROTOCOL_AMQPS; + CAF_CM_EXCEPTION_VA0(E_FAIL, + "amqps protocol not yet supported"); + } else if (protocol.compare("tunnel") == 0) { + if ((host.compare("localhost") == 0) || (host.compare("127.0.0.1") == 0)) { + rc = PROTOCOL_TUNNEL; + CAF_CM_LOG_DEBUG_VA1( + "Parsed tunnel protocol - host: %s", host.c_str()); + } else { + CAF_CM_EXCEPTION_VA1(E_FAIL, + "Tunnel protocol only supports localhost - %s", host.c_str()); + } + } else { + CAF_CM_EXCEPTION_VA1(E_FAIL, + "Unknown protocol - %s", protocol.c_str()); + } + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpAuthPlain.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpAuthPlain.cpp new file mode 100644 index 000000000..e01698466 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpAuthPlain.cpp @@ -0,0 +1,24 @@ +/* + * Created on: May 2, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "AmqpUtil.h" + +using namespace Caf::AmqpClient; + +AMQPStatus AmqpAuthPlain::AMQP_AuthPlainCreateClient( + SmartPtrCAmqpAuthMechanism& mech, + const std::string& username, + const std::string& password) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpAuthPlain", "AMQP_AuthPlainCreateClient"); + CAF_CM_VALIDATE_STRING(username); + // password is optional + + mech.CreateInstance(); + return mech->createClient(username, password); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpAuthPlain.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpAuthPlain.h new file mode 100644 index 000000000..3b5dbf2c4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpAuthPlain.h @@ -0,0 +1,29 @@ +/* + * Created on: Oct 7, 2014 + * Author: bwilliams + * + * Copyright (c) 2014 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPCORE_AMQPAUTHPLAIN_H_ +#define AMQPCORE_AMQPAUTHPLAIN_H_ + +namespace Caf { namespace AmqpClient { + +#define SHA256_HASH_LEN 32 + +class AmqpAuthPlain { +public: + static AMQPStatus AMQP_AuthPlainCreateClient( + SmartPtrCAmqpAuthMechanism& pMech, + const std::string& username, + const std::string& password); + +private: + CAF_CM_DECLARE_NOCREATE (AmqpAuthPlain); +}; + +}} + +#endif /* AMQPCORE_AMQPAUTHPLAIN_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpChannel.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpChannel.cpp new file mode 100644 index 000000000..635582caf --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpChannel.cpp @@ -0,0 +1,48 @@ +/* + * Created on: May 2, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "AmqpUtil.h" + +using namespace Caf::AmqpClient; + +AMQPStatus AmqpChannel::AMQP_ChannelClose( + const SmartPtrCAmqpChannel& channel) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpChannel", "AMQP_ChannelClose"); + CAF_CM_VALIDATE_SMARTPTR(channel); + + return channel->close(); +} + +AMQPStatus AmqpChannel::AMQP_ChannelCloseOk( + const SmartPtrCAmqpChannel& channel) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpChannel", "AMQP_ChannelCloseOk"); + CAF_CM_VALIDATE_SMARTPTR(channel); + + return channel->closeOk(); +} + +AMQPStatus AmqpChannel::AMQP_ChannelReceive( + const SmartPtrCAmqpChannel& channel, + SmartPtrCAmqpFrame& frame, + const int32 timeout) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpChannel", "AMQP_ChannelReceive"); + CAF_CM_VALIDATE_SMARTPTR(channel); + + return channel->receive(frame, timeout); +} + +AMQPStatus AmqpChannel::AMQP_ChannelGetId( + const SmartPtrCAmqpChannel& channel, + uint16 *id) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpChannel", "AMQP_ChannelGetId"); + CAF_CM_VALIDATE_SMARTPTR(channel); + CAF_CM_VALIDATE_PTR(id); + + return channel->getId(id); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpChannel.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpChannel.h new file mode 100644 index 000000000..dcf245053 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpChannel.h @@ -0,0 +1,45 @@ +/* + * Created on: Oct 7, 2014 + * Author: bwilliams + * + * Copyright (c) 2014 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPCORE_AMQPCHANNEL_H_ +#define AMQPCORE_AMQPCHANNEL_H_ + +#include "AmqpCommon.h" + +namespace Caf { namespace AmqpClient { + +/** AMQP channel state. */ +typedef enum AMQPChannelState { + AMQP_CHANNEL_OPEN = 0, AMQP_CHANNEL_WAITING_FOR_CLOSE_OK, AMQP_CHANNEL_CLOSED +} AMQPChannelState; + +class AmqpChannel { +public: + static AMQPStatus AMQP_ChannelClose( + const SmartPtrCAmqpChannel& chan); + + static AMQPStatus AMQP_ChannelCloseOk( + const SmartPtrCAmqpChannel& chan); + + static AMQPStatus AMQP_ChannelReceive( + const SmartPtrCAmqpChannel& chan, + SmartPtrCAmqpFrame& frame, + const int32 timeout); + + static AMQPStatus AMQP_ChannelGetId( + const SmartPtrCAmqpChannel& chan, + uint16 *id); + +private: + CAF_CM_DECLARE_NOCREATE (AmqpChannel); +}; + +} +} + +#endif /* AMQPCORE_CHANNEL_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpClientLink.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpClientLink.h new file mode 100644 index 000000000..a7de5d9be --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpClientLink.h @@ -0,0 +1,24 @@ +/* + * Author: bwilliams + * Created: 10/19/2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQP_CLIENTLINK_H_ +#define AMQP_CLIENTLINK_H_ + +#ifndef AMQPCLIENT_LINKAGE + #ifdef WIN32 + #ifdef AMQP_CLIENT + #define AMQPCLIENT_LINKAGE __declspec(dllexport) + #else + #define AMQPCLIENT_LINKAGE __declspec(dllimport) + #endif + #else + #define AMQPCLIENT_LINKAGE + #endif +#endif + +#endif /* AMQP_CLIENTLINK_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpCommon.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpCommon.cpp new file mode 100644 index 000000000..0c77af728 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpCommon.cpp @@ -0,0 +1,275 @@ +/* + * Created on: May 2, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "AmqpCommon.h" + +using namespace Caf::AmqpClient; + +void* AmqpCommon::AMQP_Calloc( + size_t nmemb, + size_t size) { + return calloc(nmemb, size); +} + +void AmqpCommon::AMQP_Free( + void *ptr) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpCommon", "AMQP_Free"); + CAF_CM_VALIDATE_PTR(ptr); + free(ptr); +} + +int32 AmqpCommon::sendMethod( + const amqp_connection_state_t& connectionState, + const amqp_channel_t& channel, + const amqp_method_number_t& methodId, + void *decodedMethod) { + return validateStatus( + "amqp_send_method - " + CStringConv::toString(methodId), + amqp_send_method( + connectionState, + channel, + methodId, + decodedMethod)); +} + +int32 AmqpCommon::validateStatusRequired( + const std::string& msg, + const int32 status) { + CAF_CM_STATIC_FUNC_LOG("AmqpCommon", "validateStatus"); + CAF_CM_VALIDATE_STRING(msg); + + if (status < 0) { + CAF_CM_EXCEPTION_VA2(E_FAIL, "%s: %s", + msg.c_str(), amqp_error_string2(status)); + } + + return status; +} + +int32 AmqpCommon::validateStatus( + const std::string& msg, + const int32 status) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("AmqpCommon", "validateStatus"); + CAF_CM_VALIDATE_STRING(msg); + + if (status < 0) { + CAF_CM_LOG_WARN_VA2("%s: %s", + msg.c_str(), amqp_error_string2(status)); + } + + return status; +} + +int32 AmqpCommon::validateRpcReply( + const std::string& msg, + const amqp_rpc_reply_t& rpcReply) { + CAF_CM_STATIC_FUNC_LOG("AmqpCommon", "validateRpcReply"); + CAF_CM_VALIDATE_STRING(msg); + + int32 status = 0; + switch (rpcReply.reply_type) { + case AMQP_RESPONSE_NORMAL: + break; + + case AMQP_RESPONSE_NONE: + CAF_CM_EXCEPTION_VA1(E_FAIL, "%s: missing RPC reply type!", msg.c_str()); + break; + + case AMQP_RESPONSE_LIBRARY_EXCEPTION: + status = rpcReply.library_error; + CAF_CM_LOG_WARN_VA2("%s: %s", msg.c_str(), + amqp_error_string2(rpcReply.library_error)); + break; + + case AMQP_RESPONSE_SERVER_EXCEPTION: + switch (rpcReply.reply.id) { + case AMQP_CONNECTION_CLOSE_METHOD: { + amqp_connection_close_t *reply = + reinterpret_cast(rpcReply.reply.decoded); + + CAF_CM_EXCEPTION_VA4(E_FAIL, + "%s: server connection error %d, message: %.*s", msg.c_str(), + reply->reply_code, reply->reply_text.len, + static_cast(reply->reply_text.bytes)); + + break; + } + case AMQP_CHANNEL_CLOSE_METHOD: { + amqp_connection_close_t *reply = + reinterpret_cast(rpcReply.reply.decoded); + + CAF_CM_EXCEPTION_VA4(E_FAIL, + "%s: server channel error %d, message: %.*s", msg.c_str(), + reply->reply_code, reply->reply_text.len, + static_cast(reply->reply_text.bytes)); + break; + } + default: + CAF_CM_EXCEPTION_VA2(E_FAIL, + "%s: unknown server error, method id 0x%08X", msg.c_str(), + rpcReply.reply.id); + break; + } + break; + } + + return status; +} + +void AmqpCommon::strToAmqpBytes( + const std::string& src, + amqp_bytes_t& dest, + Csetstr& cachedStrings) { + if (src.empty()) { + dest.len = 0; + dest.bytes = NULL; + } else { + dest = amqp_cstring_bytes(getString(src, cachedStrings).c_str()); + } +} + +const std::string& AmqpCommon::getString( + const std::string& src, + Csetstr& cachedStrings) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("AmqpCommon", "getString"); + CAF_CM_VALIDATE_STRING(src); + + if (cachedStrings.end() == cachedStrings.find(src)) { + cachedStrings.insert(src); + } + + return *(cachedStrings.find(src)); +} + +void AmqpCommon::boolToAmqpBool( + const bool src, + amqp_boolean_t& dest) { + dest = src ? TRUE : FALSE; +} + +void AmqpCommon::cpTableSafely( + const amqp_table_t* src, + amqp_table_t& dest) { + dest = (NULL == src ? amqp_empty_table : *src); +} + +void AmqpCommon::dumpMessageBody( + const void *buffer, + const size_t bufferLen) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("AmqpCommon", "dumpMessageBody"); + CAF_CM_VALIDATE_PTR(buffer); + + unsigned char *buf = (unsigned char *) buffer; + int32 count = 0; + int32 numinrow = 0; + int32 chs[16]; + int32 oldchs[16] = {0}; + int32 showed_dots = 0; + size_t i; + + for (i = 0; i < bufferLen; i++) { + int32 ch = buf[i]; + + if (numinrow == 16) { + int32 i; + + if (rowsEqual(oldchs, chs)) { + if (!showed_dots) { + showed_dots = 1; + CAF_CM_LOG_DEBUG_VA0( + " .. .. .. .. .. .. .. .. : .. .. .. .. .. .. .. .."); + } + } else { + showed_dots = 0; + dumpRow(count, numinrow, chs); + } + + for (i=0; i<16; i++) { + oldchs[i] = chs[i]; + } + + numinrow = 0; + } + + count++; + chs[numinrow++] = ch; + } + + dumpRow(count, numinrow, chs); + + if (numinrow != 0) { + printf("%08dX:\n", count); + } +} + +bool AmqpCommon::rowsEqual( + int32 *row1, + int32 *row2) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("AmqpCommon", "rowsEqual"); + CAF_CM_VALIDATE_PTR(row1); + CAF_CM_VALIDATE_PTR(row2); + + int32 i = 0; + for (; (i < 16) && (row1[i] == row2[i]); i++) {} + return (i == 15); +} + +void AmqpCommon::dumpRow( + const int32 count, + const int32 numinrow, + const int32 *chs) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("AmqpCommon", "dumpRow"); + CAF_CM_VALIDATE_PTR(chs); + + static const int32 BUFF_SIZE = 100; + char buff[BUFF_SIZE]; + std::string msg; + +#ifdef WIN32 + sprintf_s(buff, BUFF_SIZE, "%08lX:", count - numinrow); +#else + snprintf(buff, BUFF_SIZE, "%08dX:", count - numinrow); +#endif + msg += buff; + + if (numinrow > 0) { + for (int32 i = 0; i < numinrow; i++) { + if (i == 8) { + msg += " :"; + } +#ifdef WIN32 + sprintf_s(buff, BUFF_SIZE, " %02X", chs[i]); +#else + snprintf(buff, BUFF_SIZE, " %02X", chs[i]); +#endif + msg += buff; + } + for (int32 i = numinrow; i < 16; i++) { + if (i == 8) { + msg += " :"; + } + msg += " "; + } + msg += " "; + for (int32 i = 0; i < numinrow; i++) { + if (isprint(chs[i])) { +#ifdef WIN32 + sprintf_s(buff, BUFF_SIZE, "%c", chs[i]); +#else + snprintf(buff, BUFF_SIZE, "%c", chs[i]); +#endif + msg += buff; + } else { + msg += "."; + } + } + } + + CAF_CM_LOG_DEBUG_VA1("row: %s", msg.c_str()); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpCommon.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpCommon.h new file mode 100644 index 000000000..904c2fdfb --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpCommon.h @@ -0,0 +1,94 @@ +/* + * Created on: Oct 7, 2014 + * Author: bwilliams + * + * Copyright (c) 2014 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPCORE_AMQPCOMMON_H_ +#define AMQPCORE_AMQPCOMMON_H_ + +namespace Caf { namespace AmqpClient { + +/** AMQP status codes. */ +typedef enum { + AMQP_ERROR_OK = 0, /**< AMQP_ERROR_OK */ + AMQP_ERROR_TIMEOUT, /**< AMQP_ERROR_TIMEOUT */ + AMQP_ERROR_NO_MEMORY, /**< AMQP_ERROR_NO_MEMORY */ + AMQP_ERROR_INVALID_HANDLE, /**< AMQP_ERROR_INVALID_HANDLE */ + AMQP_ERROR_INVALID_ARGUMENT, /**< AMQP_ERROR_INVALID_ARGUMENT */ + AMQP_ERROR_WRONG_STATE, /**< AMQP_ERROR_WRONG_STATE */ + AMQP_ERROR_TOO_MANY_CHANNELS, /**< AMQP_ERROR_TOO_MANY_CHANNELS */ + AMQP_ERROR_QUEUE_FULL, /**< AMQP_ERROR_QUEUE_FULL */ + AMQP_ERROR_FRAME_TOO_LARGE, /**< AMQP_ERROR_FRAME_TOO_LARGE */ + AMQP_ERROR_IO_ERROR, /**< AMQP_ERROR_IO_ERROR */ + AMQP_ERROR_PROTOCOL_ERROR, /**< AMQP_ERROR_PROTOCOL_ERROR */ + AMQP_ERROR_UNIMPLEMENTED, /**< AMQP_ERROR_UNIMPLEMENTED */ + AMQP_ERROR_IO_INTERRUPTED, /**< AMQP_ERROR_IO_INTERRUPTED */ + AMQP_ERROR_MAX, /**< AMQP_ERROR_MAX */ +} AMQPStatus; + +class AmqpCommon { +public: + static void *AMQP_Calloc( + size_t nmemb, size_t size); + + static void AMQP_Free(void *ptr); + + static int32 sendMethod( + const amqp_connection_state_t& connectionState, + const amqp_channel_t& channel, + const amqp_method_number_t& methodId, + void *decodedMethod); + + static int32 validateStatusRequired( + const std::string& msg, + const int32 status); + + static int32 validateStatus( + const std::string& msg, + const int32 status); + + static int32 validateRpcReply( + const std::string& msg, + const amqp_rpc_reply_t& rpcReply); + + static void strToAmqpBytes( + const std::string& src, + amqp_bytes_t& dest, + Csetstr& cachedStrings); + + static void boolToAmqpBool( + const bool src, + amqp_boolean_t& dest); + + static void cpTableSafely( + const amqp_table_t* src, + amqp_table_t& dest); + + static void dumpMessageBody( + const void *buffer, + const size_t bufferLen); + +private: + static bool rowsEqual( + int32 *row1, + int32 *row2); + + static void dumpRow( + const int32 count, + const int32 numinrow, + const int32 *chs); + + static const std::string& getString( + const std::string& src, + Csetstr& cachedStrings); + +private: + CAF_CM_DECLARE_NOCREATE (AmqpCommon); +}; + +}} + +#endif /* AMQPCORE_AMQPCOMMON_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpConnection.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpConnection.cpp new file mode 100644 index 000000000..3b6d03832 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpConnection.cpp @@ -0,0 +1,124 @@ +/* + * Created on: May 2, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "AmqpConnection.h" + +using namespace Caf::AmqpClient; + +AMQPStatus AmqpConnection::AMQP_ConnectionCreate( + SmartPtrCAmqpConnection& conn, + const SmartPtrAddress& address, + const SmartPtrCAmqpAuthMechanism& auth, + const SmartPtrCertInfo& certInfo, + const uint16 channelMax, + const uint32 frameMax, + const uint16 heartbeat, + const uint16 retries, + const uint16 secondsToWait) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpConnection", "AMQP_ConnectionCreate"); + CAF_CM_VALIDATE_SMARTPTR(address); + CAF_CM_VALIDATE_SMARTPTR(auth); + + conn.CreateInstance(); + return conn->connectionCreate(address, auth, certInfo, + channelMax, frameMax, heartbeat, retries, secondsToWait); +} + +AMQPStatus AmqpConnection::AMQP_ConnectionConnect( + const SmartPtrCAmqpConnection& conn, + const int32 flags) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpConnection", "AMQP_ConnectionConnect"); + CAF_CM_VALIDATE_SMARTPTR(conn); + + return conn->connectionConnect(flags); +} + +AMQPStatus AmqpConnection::AMQP_ConnectionOpenChannel( + const SmartPtrCAmqpConnection& conn, + SmartPtrCAmqpChannel& chan) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpConnection", "AMQP_ConnectionOpenChannel"); + CAF_CM_VALIDATE_SMARTPTR(conn); + + return conn->channelOpen(chan); +} + +AMQPStatus AmqpConnection::AMQP_ConnectionClose( + const SmartPtrCAmqpConnection& conn) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpConnection", "AMQP_ConnectionClose"); + CAF_CM_VALIDATE_SMARTPTR(conn); + + return conn->connectionClose(); +} + +AMQPStatus AmqpConnection::AMQP_ConnectionProcessIO( + const SmartPtrCAmqpConnection& conn) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpConnection", "AMQP_ConnectionProcessIO"); + CAF_CM_VALIDATE_SMARTPTR(conn); + + return conn->connectionProcessIO(); +} + +AMQPStatus AmqpConnection::AMQP_ConnectionWaitForIO( + const SmartPtrCAmqpConnection& conn, + const int32 timeout) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpConnection", "AMQP_ConnectionWaitForIO"); + CAF_CM_VALIDATE_SMARTPTR(conn); + + return conn->connectionWaitForIO(timeout); +} + +AMQPStatus AmqpConnection::AMQP_ConnectionGetState( + const SmartPtrCAmqpConnection& conn, + AMQPConnectionState *state) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpConnection", "AMQP_ConnectionGetState"); + CAF_CM_VALIDATE_SMARTPTR(conn); + CAF_CM_VALIDATE_PTR(state); + + return conn->connectionGetState(state); +} + +AMQPStatus AmqpConnection::AMQP_ConnectionGetMaxChannels( + const SmartPtrCAmqpConnection& conn, + uint16 *channels) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpConnection", "AMQP_ConnectionGetMaxChannels"); + CAF_CM_VALIDATE_SMARTPTR(conn); + CAF_CM_VALIDATE_PTR(channels); + + return conn->connectionGetMaxChannels(channels); +} + +AMQPStatus AmqpConnection::AMQP_ConnectionGetMaxFrameSize( + const SmartPtrCAmqpConnection& conn, + uint32 *frameSize) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpConnection", "AMQP_ConnectionGetMaxFrameSize"); + CAF_CM_VALIDATE_SMARTPTR(conn); + CAF_CM_VALIDATE_PTR(frameSize); + + return conn->connectionGetMaxFrameSize(frameSize); +} + +AMQPStatus AmqpConnection::AMQP_ConnectionGetHeartbeatInterval( + const SmartPtrCAmqpConnection& conn, + uint16 *interval) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpConnection", "AMQP_ConnectionGetHeartbeatInterval"); + CAF_CM_VALIDATE_SMARTPTR(conn); + CAF_CM_VALIDATE_PTR(interval); + + return conn->connectionGetHeartbeatInterval(interval); +} + +AMQPStatus AmqpConnection::AMQP_ConnectionGetLastError( + const SmartPtrCAmqpConnection& conn, + const char **error) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpConnection", "AMQP_ConnectionGetLastError"); + CAF_CM_VALIDATE_SMARTPTR(conn); + CAF_CM_VALIDATE_PTR(error); + + return conn->connectionGetLastError(error); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpConnection.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpConnection.h new file mode 100644 index 000000000..7969f8f95 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpConnection.h @@ -0,0 +1,109 @@ +/* + * Created on: Oct 7, 2014 + * Author: bwilliams + * + * Copyright (c) 2014 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPCORE_AMQPCONNECTION_H_ +#define AMQPCORE_AMQPCONNECTION_H_ + +namespace Caf { namespace AmqpClient { + +/** Default maximum number of channels. */ +static const uint16 AMQP_CHANNEL_MAX_DEFAULT = 0; /* Unlimited. */ + +/** Default maximum frame size. */ +static const uint32 AMQP_FRAME_MAX_DEFAULT = 131072; /* 128kB */ + +/** Default heartbeat frequency. */ +static const uint16 AMQP_HEARTBEAT_DEFAULT = 0; /* No heartbeat. */ + +/** AMQP connection internal state details. */ +typedef enum AMQPConnectionInternalState { + AMQP_CONNECTION_INITIALIZED = 0, + AMQP_CONNECTION_CONNECTING, + AMQP_CONNECTION_WAITING_FOR_START, + AMQP_CONNECTION_WAITING_FOR_SECURE, + AMQP_CONNECTION_WAITING_FOR_TUNE, + AMQP_CONNECTION_WAITING_FOR_OPEN_OK, + AMQP_CONNECTION_OPEN, + AMQP_CONNECTION_WAITING_FOR_CLOSE_OK, + AMQP_CONNECTION_SENT_CLOSE_OK, + AMQP_CONNECTION_CLOSED +} AMQPConnectionInternalState; + +/** Close the socket when the connection is closed. */ +#define AMQP_CONNECTION_FLAG_CLOSE_SOCKET (1 << 0) +/** Don't lock the connection against multi-threaded applications. */ +#define AMQP_CONNECTION_FLAG_NO_LOCK (1 << 1) +/** Don't retry I/O when interrupted by signals. */ +#define AMQP_CONNECTION_FLAG_NO_IO_RETRY (1 << 2) + +/** Mode to poll the socket. */ +typedef enum { + AMQP_WANT_READ = 0x1, /*!< Poll socket for readability. */ + AMQP_WANT_WRITE = 0x2, /*!< Poll socket for writability. */ + AMQP_POLL_NO_IO_RETRY = 0x4, /*!< Don't retry I/O on EINTR. */ +} AMQPPollFlags; + +class AmqpConnection { +public: + static AMQPStatus AMQP_ConnectionCreate( + SmartPtrCAmqpConnection& pConn, + const SmartPtrAddress& address, + const SmartPtrCAmqpAuthMechanism& auth, + const SmartPtrCertInfo& certInfo, + const uint16 channelMax, + const uint32 frameMax, + const uint16 heartbeat, + const uint16 retries, + const uint16 secondsToWait); + + static AMQPStatus AMQP_ConnectionConnect( + const SmartPtrCAmqpConnection& conn, + const int32 flags); + + static AMQPStatus AMQP_ConnectionOpenChannel( + const SmartPtrCAmqpConnection& conn, + SmartPtrCAmqpChannel& chan); + + static AMQPStatus AMQP_ConnectionClose( + const SmartPtrCAmqpConnection& conn); + + static AMQPStatus AMQP_ConnectionProcessIO( + const SmartPtrCAmqpConnection& conn); + + static AMQPStatus AMQP_ConnectionWaitForIO( + const SmartPtrCAmqpConnection& conn, + const int32 timeout); + + static AMQPStatus AMQP_ConnectionGetState( + const SmartPtrCAmqpConnection& conn, + AMQPConnectionState *state); + + static AMQPStatus AMQP_ConnectionGetMaxChannels( + const SmartPtrCAmqpConnection& conn, + uint16 *channels); + + static AMQPStatus AMQP_ConnectionGetMaxFrameSize( + const SmartPtrCAmqpConnection& conn, + uint32 *frameSize); + + static AMQPStatus AMQP_ConnectionGetHeartbeatInterval( + const SmartPtrCAmqpConnection& conn, + uint16 *interval); + + static AMQPStatus AMQP_ConnectionGetLastError( + const SmartPtrCAmqpConnection& conn, + const char **error); + +private: + CAF_CM_DECLARE_NOCREATE (AmqpConnection); +}; + +} +} + +#endif /* AMQPCORE_AMQPCONNECTION_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpUtil.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpUtil.cpp new file mode 100644 index 000000000..eb4d11282 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpUtil.cpp @@ -0,0 +1,201 @@ +/* + * Created on: May 2, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "AmqpUtil.h" + +using namespace Caf::AmqpClient; + +AMQPStatus AmqpUtil::AMQP_BasicAck( + const SmartPtrCAmqpChannel& channel, + const uint64 deliveryTag, + const bool multiple) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpUtil", "AMQP_BasicAck"); + CAF_CM_VALIDATE_SMARTPTR(channel); + + return channel->basicAck(deliveryTag, multiple); +} + +AMQPStatus AmqpUtil::AMQP_BasicCancel( + const SmartPtrCAmqpChannel& channel, + const std::string& consumerTag, + const bool noWait) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpUtil", "AMQP_BasicCancel"); + CAF_CM_VALIDATE_SMARTPTR(channel); + CAF_CM_VALIDATE_STRING(consumerTag); + + return channel->basicCancel(consumerTag, noWait); +} + +AMQPStatus AmqpUtil::AMQP_BasicConsume( + const SmartPtrCAmqpChannel& channel, + const std::string& queue, + const std::string& consumerTag, + const bool noLocal, + const bool noAck, + const bool exclusive, + const bool noWait, + const amqp_table_t *arguments) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpUtil", "AMQP_BasicConsume"); + CAF_CM_VALIDATE_SMARTPTR(channel); + CAF_CM_VALIDATE_STRING(queue); + + return channel->basicConsume(queue, consumerTag, noLocal, noAck, + exclusive, noWait, arguments); +} + +AMQPStatus AmqpUtil::AMQP_BasicGet( + const SmartPtrCAmqpChannel& channel, + const std::string& queue, + const bool noAck) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpUtil", "AMQP_BasicGet"); + CAF_CM_VALIDATE_SMARTPTR(channel); + CAF_CM_VALIDATE_STRING(queue); + + return channel->basicGet(queue, noAck); +} + +AMQPStatus AmqpUtil::AMQP_BasicPublish( + const SmartPtrCAmqpChannel& channel, + const std::string& exchange, + const std::string& routingKey, + const bool mandatory, + const bool immediate, + const amqp_basic_properties_t *basicProps, + const SmartPtrCDynamicByteArray& body) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpUtil", "AMQP_BasicPublish"); + CAF_CM_VALIDATE_SMARTPTR(channel); + CAF_CM_VALIDATE_STRING(exchange); + CAF_CM_VALIDATE_STRING(routingKey); + CAF_CM_VALIDATE_PTR(basicProps); + CAF_CM_VALIDATE_SMARTPTR(body); + + return channel->basicPublish(exchange, routingKey, mandatory, + immediate, basicProps, body); +} + +AMQPStatus AmqpUtil::AMQP_BasicRecover( + const SmartPtrCAmqpChannel& channel, + const bool requeue) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpUtil", "AMQP_BasicRecover"); + CAF_CM_VALIDATE_SMARTPTR(channel); + + return channel->basicRecover(requeue); +} + +AMQPStatus AmqpUtil::AMQP_BasicQos( + const SmartPtrCAmqpChannel& channel, + const uint32 prefetchSize, + const uint16 prefetchCount, + const bool global) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpUtil", "AMQP_BasicQos"); + CAF_CM_VALIDATE_SMARTPTR(channel); + + return channel->basicQos(prefetchSize, prefetchCount, global); +} + +AMQPStatus AmqpUtil::AMQP_ExchangeDeclare( + const SmartPtrCAmqpChannel& channel, + const std::string& exchange, + const std::string& type, + const bool passive, + const bool durable, + const bool noWait, + const amqp_table_t *arguments) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpUtil", "AMQP_ExchangeDeclare"); + CAF_CM_VALIDATE_SMARTPTR(channel); + CAF_CM_VALIDATE_STRING(exchange); + CAF_CM_VALIDATE_STRING(type); + + return channel->exchangeDeclare(exchange, type, passive, durable, + noWait, arguments); +} + +AMQPStatus AmqpUtil::AMQP_ExchangeDelete( + const SmartPtrCAmqpChannel& channel, + const std::string& exchange, + const bool ifUnused, + const bool noWait) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpUtil", "AMQP_ExchangeDelete"); + CAF_CM_VALIDATE_SMARTPTR(channel); + CAF_CM_VALIDATE_STRING(exchange); + + return channel->exchangeDelete(exchange, ifUnused, noWait); +} + +AMQPStatus AmqpUtil::AMQP_QueueBind( + const SmartPtrCAmqpChannel& channel, + const std::string& queue, + const std::string& exchange, + const std::string& routingKey, + const bool noWait, + const amqp_table_t *arguments) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpUtil", "AMQP_QueueBind"); + CAF_CM_VALIDATE_SMARTPTR(channel); + CAF_CM_VALIDATE_STRING(queue); + CAF_CM_VALIDATE_STRING(exchange); + CAF_CM_VALIDATE_STRING(routingKey); + + return channel->queueBind(queue, exchange, routingKey, noWait, arguments); +} + +AMQPStatus AmqpUtil::AMQP_QueueDeclare( + const SmartPtrCAmqpChannel& channel, + const std::string& queue, + const bool passive, + const bool durable, + const bool exclusive, + const bool autoDelete, + const bool noWait, + const amqp_table_t *arguments) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpUtil", "AMQP_QueueDeclare"); + CAF_CM_VALIDATE_SMARTPTR(channel); + CAF_CM_VALIDATE_STRING(queue); + + return channel->queueDeclare(queue, passive, durable, exclusive, + autoDelete, noWait, arguments); +} + +AMQPStatus AmqpUtil::AMQP_QueueDelete( + const SmartPtrCAmqpChannel& channel, + const std::string& queue, + const bool ifUnused, + const bool ifEmpty, + const bool noWait) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpUtil", "AMQP_QueueDelete"); + CAF_CM_VALIDATE_SMARTPTR(channel); + CAF_CM_VALIDATE_STRING(queue); + + return channel->queueDelete(queue, ifUnused, ifEmpty, noWait); +} + +AMQPStatus AmqpUtil::AMQP_QueuePurge( + const SmartPtrCAmqpChannel& channel, + const std::string& queue, + const bool noWait) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpUtil", "AMQP_QueuePurge"); + CAF_CM_VALIDATE_SMARTPTR(channel); + CAF_CM_VALIDATE_STRING(queue); + + return channel->queuePurge(queue, noWait); +} + +AMQPStatus AmqpUtil::AMQP_QueueUnbind( + const SmartPtrCAmqpChannel& channel, + const std::string& queue, + const std::string& exchange, + const std::string& bindingKey, + const amqp_table_t *arguments) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpUtil", "AMQP_QueueUnbind"); + CAF_CM_VALIDATE_SMARTPTR(channel); + CAF_CM_VALIDATE_STRING(queue); + CAF_CM_VALIDATE_STRING(exchange); + CAF_CM_VALIDATE_STRING(bindingKey); + + return channel->queueUnbind(queue, exchange, bindingKey, arguments); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpUtil.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpUtil.h new file mode 100644 index 000000000..3e7b12a17 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpUtil.h @@ -0,0 +1,118 @@ +/* + * Created on: Oct 7, 2014 + * Author: bwilliams + * + * Copyright (c) 2014 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPCORE_AMQPUTIL_H_ +#define AMQPCORE_AMQPUTIL_H_ + +namespace Caf { namespace AmqpClient { + +class AmqpUtil { +public: + static AMQPStatus AMQP_BasicAck( + const SmartPtrCAmqpChannel& channel, + const uint64 deliveryTag, + const bool multiple); + + static AMQPStatus AMQP_BasicCancel( + const SmartPtrCAmqpChannel& channel, + const std::string& consumerTag, + const bool noWait); + + static AMQPStatus AMQP_BasicConsume( + const SmartPtrCAmqpChannel& channel, + const std::string& queue, + const std::string& consumerTag, + const bool noLocal, + const bool noAck, + const bool exclusive, + const bool noWait, + const amqp_table_t *arguments); + + static AMQPStatus AMQP_BasicGet( + const SmartPtrCAmqpChannel& channel, + const std::string& queue, + const bool noAck); + + static AMQPStatus AMQP_BasicPublish( + const SmartPtrCAmqpChannel& channel, + const std::string& exchange, + const std::string& routingKey, + const bool mandatory, + const bool immediate, + const amqp_basic_properties_t *basicProps, + const SmartPtrCDynamicByteArray& body); + + static AMQPStatus AMQP_BasicRecover( + const SmartPtrCAmqpChannel& channel, + const bool requeue); + + static AMQPStatus AMQP_BasicQos( + const SmartPtrCAmqpChannel& channel, + const uint32 prefetchSize, + const uint16 prefetchCount, + bool global); + + static AMQPStatus AMQP_ExchangeDeclare( + const SmartPtrCAmqpChannel& channel, + const std::string& exchange, + const std::string& type, + const bool passive, + const bool durable, + const bool noWait, + const amqp_table_t *arguments); + + static AMQPStatus AMQP_ExchangeDelete( + const SmartPtrCAmqpChannel& channel, + const std::string& exchange, + const bool ifUnused, + const bool noWait); + + static AMQPStatus AMQP_QueueBind( + const SmartPtrCAmqpChannel& channel, + const std::string& queue, + const std::string& exchange, + const std::string& routingKey, + const bool noWait, + const amqp_table_t *arguments); + + static AMQPStatus AMQP_QueueDeclare( + const SmartPtrCAmqpChannel& channel, + const std::string& queue, + const bool passive, + const bool durable, + const bool exclusive, + const bool autoDelete, + const bool noWait, + const amqp_table_t *arguments); + + static AMQPStatus AMQP_QueueDelete( + const SmartPtrCAmqpChannel& channel, + const std::string& queue, + const bool ifUnused, + const bool ifEmpty, + const bool noWait); + + static AMQPStatus AMQP_QueuePurge( + const SmartPtrCAmqpChannel& channel, + const std::string& queue, + const bool noWait); + + static AMQPStatus AMQP_QueueUnbind( + const SmartPtrCAmqpChannel& channel, + const std::string& queue, + const std::string& exchange, + const std::string& bindingKey, + const amqp_table_t *arguments); + +private: + CAF_CM_DECLARE_NOCREATE (AmqpUtil); +}; + +}} + +#endif /* AMQPCORE_AMQPUTIL_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/BlockingRpcContinuation.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/BlockingRpcContinuation.cpp new file mode 100644 index 000000000..3111a8efd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/BlockingRpcContinuation.cpp @@ -0,0 +1,56 @@ +/* + * Created on: May 15, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "BlockingRpcContinuation.h" + +using namespace Caf::AmqpClient; + +BlockingRpcContinuation::BlockingRpcContinuation() : + _isInitialized(false), + CAF_CM_INIT("BlockingRpcContinuation") { +} + +BlockingRpcContinuation::~BlockingRpcContinuation() { +} + +void BlockingRpcContinuation::init() { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _isInitialized = true; +} + +SmartPtrAMQCommand BlockingRpcContinuation::getReply() { + CAF_CM_FUNCNAME_VALIDATE("getReply"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _blocker.get(); +} + +SmartPtrAMQCommand BlockingRpcContinuation::getReply(uint32 timeout) { + CAF_CM_FUNCNAME_VALIDATE("getReply"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _blocker.get(timeout); +} + +SmartPtrCCafException BlockingRpcContinuation::getException() { + CAF_CM_FUNCNAME_VALIDATE("getException"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _exception; +} +void BlockingRpcContinuation::handleCommand(const SmartPtrAMQCommand& command) { + CAF_CM_FUNCNAME_VALIDATE("handleCommand"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _blocker.set(command); +} + +void BlockingRpcContinuation::handleAbort(SmartPtrCCafException exception) { + CAF_CM_FUNCNAME_VALIDATE("handleAbort"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _exception = exception; + _blocker.set(NULL); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/BlockingRpcContinuation.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/BlockingRpcContinuation.h new file mode 100644 index 000000000..4d0aa4b19 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/BlockingRpcContinuation.h @@ -0,0 +1,70 @@ +/* + * Created on: May 15, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef BLOCKINGRPCCONTINUATION_H_ +#define BLOCKINGRPCCONTINUATION_H_ + +#include "AMQCommand.h" +#include "IRpcContinuation.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @brief A IRpcContinuation that blocks until the response is received. + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + */ +class BlockingRpcContinuation : public IRpcContinuation { +public: + BlockingRpcContinuation(); + virtual ~BlockingRpcContinuation(); + + /** + * @brief Initialize the object + */ + void init(); + + /** + * @brief Waits indefinately for a response to an AMQP method call + * @retval null if an error occured. In this case call getException to get the exception + * @retval non-null AMQCommand response + */ + SmartPtrAMQCommand getReply(); + + /** + * @brief Waits for a time for a response to an AMQP method call + * @param timeout time in milliseconds to wait for a response + * @retval null if an error occured. In this case call getException to get the exception + * @retval non-null AMQCommand response + */ + SmartPtrAMQCommand getReply(uint32 timeout); + + /** + * @brief Returns the exception that occured if getReply returns null. + * @return the exception. The returned exception will have its reference count increased. + */ + SmartPtrCCafException getException(); + +public: // IRpcContinuation + void handleCommand(const SmartPtrAMQCommand& command); + + void handleAbort(SmartPtrCCafException exception); + +private: + bool _isInitialized; + TBlockingCell _blocker; + SmartPtrCCafException _exception; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(BlockingRpcContinuation); +}; +CAF_DECLARE_SMART_POINTER(BlockingRpcContinuation); + +}} + +#endif /* BLOCKINGRPCCONTINUATION_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CAmqpAuthMechanism.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CAmqpAuthMechanism.cpp new file mode 100644 index 000000000..85cf1b094 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CAmqpAuthMechanism.cpp @@ -0,0 +1,44 @@ +/* + * Created on: May 7, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CAmqpAuthMechanism.h" + +using namespace Caf::AmqpClient; + +CAmqpAuthMechanism::CAmqpAuthMechanism() : + CAF_CM_INIT("CAmqpAuthMechanism") { + CAF_CM_INIT_THREADSAFE; +} + +CAmqpAuthMechanism::~CAmqpAuthMechanism() { +} + +AMQPStatus CAmqpAuthMechanism::createClient( + const std::string& username, + const std::string& password) { + CAF_CM_FUNCNAME_VALIDATE("createClient"); + CAF_CM_VALIDATE_STRING(username); + // password is optional + + _username = username; + _password = password; + + return AMQP_ERROR_OK; +} + +std::string CAmqpAuthMechanism::getUsername() const { + CAF_CM_FUNCNAME_VALIDATE("getUsername"); + CAF_CM_VALIDATE_STRING(_username); + return _username; +} + +std::string CAmqpAuthMechanism::getPassword() const { + // password is optional + return _password; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CAmqpAuthMechanism.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CAmqpAuthMechanism.h new file mode 100644 index 000000000..9d0759223 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CAmqpAuthMechanism.h @@ -0,0 +1,46 @@ +/* + * Created on: May 7, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPCLIENT_CAMQPAUTHMECHANISM_H_ +#define AMQPCLIENT_CAMQPAUTHMECHANISM_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Manages a set of channels for a connection. + * Channels are indexed by channel number (1.._channelMax). + */ +class CAmqpAuthMechanism { +public: + CAmqpAuthMechanism(); + virtual ~CAmqpAuthMechanism(); + +public: + AMQPStatus createClient( + const std::string& username, + const std::string& password); + + std::string getUsername() const; + std::string getPassword() const; + +private: + std::string _username; + std::string _password; + + CAF_CM_CREATE; + CAF_CM_CREATE_THREADSAFE; + CAF_CM_DECLARE_NOCOPY(CAmqpAuthMechanism); +}; +CAF_DECLARE_SMART_POINTER(CAmqpAuthMechanism); + +}} + +#endif /* AMQPCLIENT_CAMQPAUTHMECHANISM_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CAmqpChannel.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CAmqpChannel.cpp new file mode 100644 index 000000000..376d9a863 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CAmqpChannel.cpp @@ -0,0 +1,250 @@ +/* + * Created on: May 7, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CAmqpChannel.h" + +using namespace Caf::AmqpClient; + +CAmqpChannel::CAmqpChannel() : + _isInitialized(false), + _channel(0), + CAF_CM_INIT("CAmqpChannel") { + CAF_CM_INIT_THREADSAFE; +} + +CAmqpChannel::~CAmqpChannel() { +} + +void CAmqpChannel::initialize( + const SmartPtrCAmqpConnection& connection, + const amqp_channel_t& channel) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(connection); + + _connection = connection; + _channel = channel; + _isInitialized = true; +} + +AMQPStatus CAmqpChannel::close() { + AMQPStatus rc = AMQP_ERROR_OK; + if (_isInitialized) { + rc = _connection->channelClose(_channel); + + _connection = NULL; + _channel = 0; + _isInitialized = false; + } + + return rc; +} + +AMQPStatus CAmqpChannel::closeOk() { + CAF_CM_FUNCNAME_VALIDATE("closeOk"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _connection->channelCloseOk(_channel); +} + +AMQPStatus CAmqpChannel::receive( + SmartPtrCAmqpFrame& frame, + int32 timeout) { + CAF_CM_FUNCNAME_VALIDATE("receive"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _connection->receive(_channel, frame, timeout); +} + +AMQPStatus CAmqpChannel::getId( + uint16 *id) { + CAF_CM_FUNCNAME_VALIDATE("getId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_PTR(id); + + *id = _channel; + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpChannel::basicAck( + const uint64 deliveryTag, + const bool multiple) { + CAF_CM_FUNCNAME_VALIDATE("basicAck"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _connection->basicAck(_channel, deliveryTag, multiple); +} + +AMQPStatus CAmqpChannel::basicCancel( + const std::string& consumerTag, + const bool noWait) { + CAF_CM_FUNCNAME_VALIDATE("basicCancel"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(consumerTag); + + return _connection->basicCancel(_channel, consumerTag, noWait); +} + +AMQPStatus CAmqpChannel::basicConsume( + const std::string& queue, + const std::string& consumerTag, + const bool noLocal, + const bool noAck, + const bool exclusive, + const bool noWait, + const amqp_table_t *arguments) { + CAF_CM_FUNCNAME_VALIDATE("basicConsume"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(queue); + + return _connection->basicConsume(_channel, queue, consumerTag, + noLocal, noAck, exclusive, noWait, arguments); +} + +AMQPStatus CAmqpChannel::basicGet( + const std::string& queue, + const bool noAck) { + CAF_CM_FUNCNAME_VALIDATE("basicGet"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(queue); + + return _connection->basicGet(_channel, queue, noAck); +} + +AMQPStatus CAmqpChannel::basicPublish( + const std::string& exchange, + const std::string& routingKey, + const bool mandatory, + const bool immediate, + const amqp_basic_properties_t *basicProps, + const SmartPtrCDynamicByteArray& body) { + CAF_CM_FUNCNAME_VALIDATE("basicPublish"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(exchange); + CAF_CM_VALIDATE_STRING(routingKey); + CAF_CM_VALIDATE_PTR(basicProps); + CAF_CM_VALIDATE_SMARTPTR(body); + + return _connection->basicPublish(_channel, exchange, routingKey, + mandatory, immediate, basicProps, body); +} + +AMQPStatus CAmqpChannel::basicRecover( + const bool requeue) { + CAF_CM_FUNCNAME_VALIDATE("basicRecover"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _connection->basicRecover(_channel, requeue); +} + +AMQPStatus CAmqpChannel::basicQos( + const uint32 prefetchSize, + const uint16 prefetchCount, + const bool global) { + CAF_CM_FUNCNAME_VALIDATE("basicQos"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _connection->basicQos(_channel, prefetchSize, prefetchCount, global); +} + +AMQPStatus CAmqpChannel::exchangeDeclare( + const std::string& exchange, + const std::string& type, + const bool passive, + const bool durable, + const bool noWait, + const amqp_table_t *arguments) { + CAF_CM_FUNCNAME_VALIDATE("exchangeDeclare"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(exchange); + CAF_CM_VALIDATE_STRING(type); + + return _connection->exchangeDeclare(_channel, exchange, type, passive, + durable, noWait, arguments); +} + +AMQPStatus CAmqpChannel::exchangeDelete( + const std::string& exchange, + const bool ifUnused, + const bool noWait) { + CAF_CM_FUNCNAME_VALIDATE("exchangeDelete"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(exchange); + + return _connection->exchangeDelete(_channel, exchange, ifUnused, noWait); +} + +AMQPStatus CAmqpChannel::queueBind( + const std::string& queue, + const std::string& exchange, + const std::string& routingKey, + const bool noWait, + const amqp_table_t *arguments) { + CAF_CM_FUNCNAME_VALIDATE("queueBind"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(queue); + CAF_CM_VALIDATE_STRING(exchange); + CAF_CM_VALIDATE_STRING(routingKey); + + return _connection->queueBind(_channel, queue, exchange, routingKey, + noWait, arguments); +} + +AMQPStatus CAmqpChannel::queueDeclare( + const std::string& queue, + const bool passive, + const bool durable, + const bool exclusive, + const bool autoDelete, + const bool noWait, + const amqp_table_t *arguments) { + CAF_CM_FUNCNAME_VALIDATE("queueDeclare"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(queue); + + return _connection->queueDeclare(_channel, queue, passive, durable, + exclusive, autoDelete, noWait, arguments); +} + +AMQPStatus CAmqpChannel::queueDelete( + const std::string& queue, + const bool ifUnused, + const bool ifEmpty, + const bool noWait) { + CAF_CM_FUNCNAME_VALIDATE("queueDelete"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(queue); + + return _connection->queueDelete(_channel, queue, ifUnused, ifEmpty, noWait); +} + +AMQPStatus CAmqpChannel::queuePurge( + const std::string& queue, + const bool noWait) { + CAF_CM_FUNCNAME_VALIDATE("queuePurge"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(queue); + + return _connection->queuePurge(_channel, queue, noWait); +} + +AMQPStatus CAmqpChannel::queueUnbind( + const std::string& queue, + const std::string& exchange, + const std::string& bindingKey, + const amqp_table_t *arguments) { + CAF_CM_FUNCNAME_VALIDATE("queueUnbind"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(queue); + CAF_CM_VALIDATE_STRING(exchange); + CAF_CM_VALIDATE_STRING(bindingKey); + + return _connection->queueUnbind(_channel, queue, exchange, bindingKey, arguments); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CAmqpChannel.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CAmqpChannel.h new file mode 100644 index 000000000..59e293523 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CAmqpChannel.h @@ -0,0 +1,136 @@ +/* + * Created on: May 7, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPCLIENT_CAMQPCHANNEL_H_ +#define AMQPCLIENT_CAMQPCHANNEL_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Manages a set of channels for a connection. + * Channels are indexed by channel number (1.._channelMax). + */ +class CAmqpChannel { +public: + CAmqpChannel(); + virtual ~CAmqpChannel(); + + void initialize( + const SmartPtrCAmqpConnection& connection, + const amqp_channel_t& channel); + +public: + AMQPStatus close(); + + AMQPStatus closeOk(); + + AMQPStatus receive( + SmartPtrCAmqpFrame& frame, + int32 timeout); + + AMQPStatus getId( + uint16 *id); + + AMQPStatus basicAck( + const uint64 deliveryTag, + const bool multiple); + + AMQPStatus basicCancel( + const std::string& consumerTag, + const bool noWait); + + AMQPStatus basicConsume( + const std::string& queue, + const std::string& consumerTag, + const bool noLocal, + const bool noAck, + const bool exclusive, + const bool noWait, + const amqp_table_t *arguments); + + AMQPStatus basicGet( + const std::string& queue, + const bool noAck); + + AMQPStatus basicPublish( + const std::string& exchange, + const std::string& routingKey, + const bool mandatory, + const bool immediate, + const amqp_basic_properties_t *basicProps, + const SmartPtrCDynamicByteArray& body); + + AMQPStatus basicRecover( + const bool requeue); + + AMQPStatus basicQos( + const uint32 prefetchSize, + const uint16 prefetchCount, + bool global); + + AMQPStatus exchangeDeclare( + const std::string& exchange, + const std::string& type, + const bool passive, + const bool durable, + const bool noWait, + const amqp_table_t *arguments); + + AMQPStatus exchangeDelete( + const std::string& exchange, + const bool ifUnused, + const bool noWait); + + AMQPStatus queueBind( + const std::string& queue, + const std::string& exchange, + const std::string& routingKey, + const bool noWait, + const amqp_table_t *arguments); + + AMQPStatus queueDeclare( + const std::string& queue, + const bool passive, + const bool durable, + const bool exclusive, + const bool autoDelete, + const bool noWait, + const amqp_table_t *arguments); + + AMQPStatus queueDelete( + const std::string& queue, + const bool ifUnused, + const bool ifEmpty, + const bool noWait); + + AMQPStatus queuePurge( + const std::string& queue, + const bool noWait); + + AMQPStatus queueUnbind( + const std::string& queue, + const std::string& exchange, + const std::string& bindingKey, + const amqp_table_t *arguments); + +private: + bool _isInitialized; + SmartPtrCAmqpConnection _connection; + amqp_channel_t _channel; + + CAF_CM_CREATE; + CAF_CM_CREATE_THREADSAFE; + CAF_CM_DECLARE_NOCOPY(CAmqpChannel); +}; + +}} + +#endif /* AMQPCLIENT_CAMQPCHANNEL_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CAmqpConnection.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CAmqpConnection.cpp new file mode 100644 index 000000000..8f4af4dda --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CAmqpConnection.cpp @@ -0,0 +1,1011 @@ +/* + * Created on: May 7, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CAmqpConnection.h" + +using namespace Caf::AmqpClient; + +CAmqpConnection::CAmqpConnection() : + _connectionState(NULL), + _socket(NULL), + _curChannel(0), + _connectionStateEnum(AMQP_STATE_DISCONNECTED), + _lastStatus(0), + _channelMax(0), + _frameMax(0), + _heartbeat(0), + _retries(0), + _secondsToWait(0), + CAF_CM_INIT_LOG("CAmqpConnection") { + CAF_CM_INIT_THREADSAFE; +} + +CAmqpConnection::~CAmqpConnection() { + CAF_CM_LOCK_UNLOCK; + if (NULL != _connectionState) { + closeConnection(); + } +} + +AMQPStatus CAmqpConnection::connectionCreate( + const SmartPtrAddress& address, + const SmartPtrCAmqpAuthMechanism& auth, + const SmartPtrCertInfo& certInfo, + const uint16 channelMax, + const uint32 frameMax, + const uint16 heartbeat, + const uint16 retries, + const uint16 secondsToWait) { + CAF_CM_FUNCNAME("connectionCreate"); + CAF_CM_VALIDATE_SMARTPTR(address); + CAF_CM_VALIDATE_SMARTPTR(auth); + + CAF_CM_LOCK_UNLOCK; + + _address = address; + _auth = auth; + _certInfo = certInfo; + _channelMax = channelMax; + _frameMax = frameMax; + _heartbeat = heartbeat; + _channelFrames.CreateInstance(); + _retries = retries; + _secondsToWait = secondsToWait; + + AMQPStatus rc = AMQP_ERROR_OK; + switch(_address->getProtocol()) { + case PROTOCOL_AMQP: + rc = createConnection(); + break; + case PROTOCOL_AMQPS: + rc = createSslConnection(); + break; + case PROTOCOL_TUNNEL: + rc = createSslConnection(); + break; + default: + CAF_CM_EXCEPTION_VA1(E_FAIL, + "Unknown protocol - %d", _address->getProtocol()); + } + + return rc; +} + +AMQPStatus CAmqpConnection::connectionConnect( + const int32 flags) { + CAF_CM_LOCK_UNLOCK; + return connectConnection(); +} + +AMQPStatus CAmqpConnection::connectionClose() { + CAF_CM_LOCK_UNLOCK; + return closeConnection(); +} + +AMQPStatus CAmqpConnection::connectionProcessIO() { + //TODO: Is this call necessary anymore? + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::connectionWaitForIO( + int32 timeout) { + CAF_CM_FUNCNAME_VALIDATE("connectionWaitForIO"); + + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + + AMQPStatus rc = AMQP_ERROR_TIMEOUT; + if (isDataAvail(_connectionState)) { + rc = AMQP_ERROR_OK; + } else { + if (timeout > 0) { + { + CAF_CM_UNLOCK_LOCK; + CThreadUtils::sleep(timeout); + } + if (isDataAvail(_connectionState)) { + rc = AMQP_ERROR_OK; + } + } + } + + return rc; +} + +AMQPStatus CAmqpConnection::connectionGetState( + AMQPConnectionState *state) { + CAF_CM_FUNCNAME_VALIDATE("connectionGetState"); + CAF_CM_VALIDATE_PTR(state); + + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + + *state = _connectionStateEnum; + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::connectionGetMaxChannels( + uint16 *channels) { + CAF_CM_FUNCNAME_VALIDATE("connectionGetMaxChannels"); + CAF_CM_VALIDATE_PTR(channels); + + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + + *channels = amqp_get_channel_max(_connectionState); + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::connectionGetMaxFrameSize( + uint32 *frameSize) { + CAF_CM_FUNCNAME_VALIDATE("connectionGetMaxFrameSize"); + CAF_CM_VALIDATE_PTR(frameSize); + + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + + *frameSize = amqp_get_frame_max(_connectionState); + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::connectionGetHeartbeatInterval( + uint16 *interval) { + CAF_CM_FUNCNAME_VALIDATE("connectionGetHeartbeatInterval"); + CAF_CM_VALIDATE_PTR(interval); + + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + + *interval = amqp_get_heartbeat(_connectionState); + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::connectionGetLastError( + const char **error) { + CAF_CM_FUNCNAME_VALIDATE("connectionGetLastError"); + CAF_CM_VALIDATE_PTR(error); + + CAF_CM_LOCK_UNLOCK; + + *error = amqp_error_string2(_lastStatus); + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::channelClose( + const amqp_channel_t& channel) { + CAF_CM_FUNCNAME_VALIDATE("channelClose"); + + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + validateOpenChannel(channel); + + _openChannels.erase(channel); + + return closeChannel(channel); +} + +AMQPStatus CAmqpConnection::channelCloseOk( + const amqp_channel_t& channel) { + CAF_CM_FUNCNAME_VALIDATE("channelCloseOk"); + + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + validateOpenChannel(channel); + + amqp_channel_close_ok_t method = {}; + AmqpCommon::sendMethod(_connectionState, channel, + AMQP_CHANNEL_CLOSE_OK_METHOD, &method); + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::receive( + const amqp_channel_t& channel, + SmartPtrCAmqpFrame& frame, + const int32 timeout) { + CAF_CM_FUNCNAME_VALIDATE("receive"); + + frame = SmartPtrCAmqpFrame(); + AMQPStatus rc = AMQP_ERROR_OK; + + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + validateOpenChannel(channel); + + //amqp_maybe_release_buffers(_connectionState); + + int32 status = AMQP_STATUS_OK; + CChannelFrames::iterator iter = _channelFrames->find(channel); + if ((_channelFrames->end() == iter) || iter->second.empty()) { + CAmqpFrames frames; + SmartPtrCAmqpFrame frame; + int32 status = receiveFrame(_connectionState, frame); + if ((AMQP_STATUS_OK != status) && (timeout > 0)) { + CAF_CM_UNLOCK_LOCK; + CThreadUtils::sleep(timeout); + } + + while (AMQP_STATUS_OK == status) { + CAF_CM_VALIDATE_SMARTPTR(frame); + frames.push_back(frame); + status = receiveFrame(_connectionState, frame); + } + _lastStatus = status; + + addFrames(frames, _channelFrames); + } + + switch (status) { + case AMQP_STATUS_OK: + case AMQP_STATUS_TIMEOUT: { + iter = _channelFrames->find(channel); + if ((_channelFrames->end() == iter) || iter->second.empty()) { + rc = AMQP_ERROR_TIMEOUT; + } else { + frame = iter->second.front(); + iter->second.pop_front(); + } + } + break; + + default: { + CAF_CM_LOG_ERROR_VA1("amqp_simple_wait_frame_noblock: %s", + amqp_error_string2(status)); + closeConnection(); + } + break; + } + + if (! frame.IsNull()) { + frame->log("Returned"); + } + + return rc; +} + +AMQPStatus CAmqpConnection::channelOpen( + SmartPtrCAmqpChannel& chan) { + CAF_CM_FUNCNAME("channelOpen"); + + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + + _curChannel++; + const amqp_channel_t channel = _curChannel; + + CAF_CM_LOG_DEBUG_VA1("Calling amqp_channel_open - %d", channel); + + amqp_channel_open_t method = {}; + method.out_of_band = amqp_empty_bytes; + AmqpCommon::sendMethod(_connectionState, channel, + AMQP_CHANNEL_OPEN_METHOD, &method); + + chan.CreateInstance(); + chan->initialize(this, channel); + + if (! _openChannels.insert(channel).second) { + CAF_CM_EXCEPTION_VA1(E_FAIL, + "Inserted duplicated channel - %d", channel); + } + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::basicAck( + const amqp_channel_t& channel, + const uint64 deliveryTag, + const bool multiple) { + CAF_CM_FUNCNAME_VALIDATE("basicAck"); + + CAF_CM_LOG_DEBUG_VA1( + "Calling amqp_basic_ack - channel: %d", channel); + + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + validateOpenChannel(channel); + + _lastStatus = AmqpCommon::validateStatus( + "amqp_basic_ack", + amqp_basic_ack( + _connectionState, + channel, + deliveryTag, + multiple ? TRUE : FALSE)); + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::basicCancel( + const amqp_channel_t& channel, + const std::string& consumerTag, + const bool noWait) { + CAF_CM_FUNCNAME_VALIDATE("basicCancel"); + CAF_CM_VALIDATE_STRING(consumerTag); + + CAF_CM_LOG_DEBUG_VA2( + "Calling amqp_basic_cancel - channel: %d, consumerTag: %s", + channel, consumerTag.c_str()); + + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + validateOpenChannel(channel); + + amqp_basic_cancel_t method = {}; + AmqpCommon::strToAmqpBytes(consumerTag, method.consumer_tag, _cachedStrings); + AmqpCommon::boolToAmqpBool(noWait, method.nowait); + AmqpCommon::sendMethod(_connectionState, channel, + AMQP_BASIC_CANCEL_METHOD, &method); + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::basicConsume( + const amqp_channel_t& channel, + const std::string& queue, + const std::string& consumerTag, + const bool noLocal, + const bool noAck, + const bool exclusive, + const bool noWait, + const amqp_table_t *arguments) { + CAF_CM_FUNCNAME_VALIDATE("basicConsume"); + CAF_CM_VALIDATE_STRING(queue); + + CAF_CM_LOG_DEBUG_VA3( + "Calling amqp_basic_consume - channel: %d, queue: %s, consumerTag: %s", + channel, queue.c_str(), + (consumerTag.empty() ? "NULL" : consumerTag.c_str())); + + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + validateOpenChannel(channel); + + amqp_basic_consume_t method = {}; + AmqpCommon::strToAmqpBytes(queue, method.queue, _cachedStrings); + AmqpCommon::strToAmqpBytes(consumerTag, method.consumer_tag, _cachedStrings); + AmqpCommon::boolToAmqpBool(noLocal, method.no_local); + AmqpCommon::boolToAmqpBool(noAck, method.no_ack); + AmqpCommon::boolToAmqpBool(exclusive, method.exclusive); + AmqpCommon::boolToAmqpBool(noWait, method.nowait); + AmqpCommon::cpTableSafely(arguments, method.arguments); + AmqpCommon::sendMethod(_connectionState, channel, + AMQP_BASIC_CONSUME_METHOD, &method); + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::basicGet( + const amqp_channel_t& channel, + const std::string& queue, + const bool noAck) { + CAF_CM_FUNCNAME_VALIDATE("basicGet"); + CAF_CM_VALIDATE_STRING(queue); + + CAF_CM_LOG_DEBUG_VA2( + "Calling amqp_basic_get - channel: %d, queue: %s", + channel, queue.c_str()); + + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + validateOpenChannel(channel); + + AmqpCommon::validateRpcReply( + "amqp_basic_get", + amqp_basic_get( + _connectionState, + channel, + amqp_cstring_bytes(queue.c_str()), + noAck ? TRUE : FALSE)); + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::basicPublish( + const amqp_channel_t& channel, + const std::string& exchange, + const std::string& routingKey, + const bool mandatory, + const bool immediate, + const amqp_basic_properties_t *basicProps, + const SmartPtrCDynamicByteArray& body) { + CAF_CM_FUNCNAME_VALIDATE("basicPublish"); + CAF_CM_VALIDATE_STRING(exchange); + CAF_CM_VALIDATE_STRING(routingKey); + CAF_CM_VALIDATE_PTR(basicProps); + CAF_CM_VALIDATE_SMARTPTR(body); + + CAF_CM_LOG_DEBUG_VA3( + "Calling amqp_basic_publish - channel: %d, exchange: %s, routingKey: %s", + channel, exchange.c_str(), routingKey.c_str()); + + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + validateOpenChannel(channel); + + amqp_bytes_t bodyRaw; + bodyRaw.bytes = body->getNonConstPtr(); + bodyRaw.len = body->getByteCount(); + + _lastStatus = AmqpCommon::validateStatus( + "amqp_basic_publish", + amqp_basic_publish( + _connectionState, + channel, + amqp_cstring_bytes(exchange.c_str()), + amqp_cstring_bytes(routingKey.c_str()), + mandatory ? TRUE : FALSE, + immediate ? TRUE : FALSE, + basicProps, + bodyRaw)); + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::basicRecover( + const amqp_channel_t& channel, + const bool requeue) { + CAF_CM_FUNCNAME_VALIDATE("basicRecover"); + + CAF_CM_LOG_DEBUG_VA1( + "Calling amqp_basic_recover - channel: %d", channel); + + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + validateOpenChannel(channel); + + amqp_basic_recover_t method = {}; + AmqpCommon::boolToAmqpBool(requeue, method.requeue); + AmqpCommon::sendMethod(_connectionState, channel, + AMQP_BASIC_RECOVER_METHOD, &method); + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::basicQos( + const amqp_channel_t& channel, + const uint32 prefetchSize, + const uint16 prefetchCount, + const bool global) { + CAF_CM_FUNCNAME_VALIDATE("basicQos"); + + CAF_CM_LOG_DEBUG_VA1( + "Calling amqp_basic_qos - channel: %d", channel); + + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + validateOpenChannel(channel); + + amqp_basic_qos_t method = {}; + method.prefetch_size = prefetchSize; + method.prefetch_count = prefetchCount; + AmqpCommon::boolToAmqpBool(global, method.global); + AmqpCommon::sendMethod(_connectionState, channel, + AMQP_BASIC_QOS_METHOD, &method); + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::exchangeDeclare( + const amqp_channel_t& channel, + const std::string& exchange, + const std::string& type, + const bool passive, + const bool durable, + const bool noWait, + const amqp_table_t *arguments) { + CAF_CM_FUNCNAME_VALIDATE("exchangeDeclare"); + CAF_CM_VALIDATE_STRING(exchange); + CAF_CM_VALIDATE_STRING(type); + + CAF_CM_LOG_DEBUG_VA3( + "Calling amqp_exchange_declare - channel: %d, exchange: %s, type: %s", + channel, exchange.c_str(), type.c_str()); + + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + validateOpenChannel(channel); + + const bool autoDelete = false; + + amqp_exchange_declare_t method = {}; + AmqpCommon::strToAmqpBytes(exchange, method.exchange, _cachedStrings); + AmqpCommon::strToAmqpBytes(type, method.type, _cachedStrings); + AmqpCommon::boolToAmqpBool(passive, method.passive); + AmqpCommon::boolToAmqpBool(durable, method.durable); + AmqpCommon::boolToAmqpBool(noWait, method.nowait); + AmqpCommon::cpTableSafely(arguments, method.arguments); + AmqpCommon::boolToAmqpBool(autoDelete, method.auto_delete); + AmqpCommon::sendMethod(_connectionState, channel, + AMQP_EXCHANGE_DECLARE_METHOD, &method); + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::exchangeDelete( + const amqp_channel_t& channel, + const std::string& exchange, + const bool ifUnused, + const bool noWait) { + CAF_CM_FUNCNAME_VALIDATE("exchangeDelete"); + CAF_CM_VALIDATE_STRING(exchange); + + CAF_CM_LOG_DEBUG_VA2( + "Calling amqp_exchange_delete - channel: %d, exchange: %s", + channel, exchange.c_str()); + + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + validateOpenChannel(channel); + + amqp_exchange_delete_t method = {}; + AmqpCommon::strToAmqpBytes(exchange, method.exchange, _cachedStrings); + AmqpCommon::boolToAmqpBool(ifUnused, method.if_unused); + AmqpCommon::boolToAmqpBool(noWait, method.nowait); + AmqpCommon::sendMethod(_connectionState, channel, + AMQP_EXCHANGE_DELETE_METHOD, &method); + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::queueBind( + const amqp_channel_t& channel, + const std::string& queue, + const std::string& exchange, + const std::string& routingKey, + const bool noWait, + const amqp_table_t *arguments) { + CAF_CM_FUNCNAME_VALIDATE("queueBind"); + CAF_CM_VALIDATE_STRING(queue); + CAF_CM_VALIDATE_STRING(exchange); + CAF_CM_VALIDATE_STRING(routingKey); + + CAF_CM_LOG_DEBUG_VA4( + "Calling amqp_queue_bind - channel: %d, queue: %s, exchange: %s, routingKey: %s", + channel, queue.c_str(), exchange.c_str(), routingKey.c_str()); + + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + CAF_CM_VALIDATE_BOOL(_address->getProtocol() != PROTOCOL_TUNNEL); + validateOpenChannel(channel); + + amqp_queue_bind_t method = {}; + AmqpCommon::strToAmqpBytes(queue, method.queue, _cachedStrings); + AmqpCommon::strToAmqpBytes(exchange, method.exchange, _cachedStrings); + AmqpCommon::strToAmqpBytes(routingKey, method.routing_key, _cachedStrings); + AmqpCommon::boolToAmqpBool(noWait, method.nowait); + AmqpCommon::cpTableSafely(arguments, method.arguments); + AmqpCommon::sendMethod(_connectionState, channel, + AMQP_QUEUE_BIND_METHOD, &method); + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::queueDeclare( + const amqp_channel_t& channel, + const std::string& queue, + const bool passive, + const bool durable, + const bool exclusive, + const bool autoDelete, + const bool noWait, + const amqp_table_t *arguments) { + CAF_CM_FUNCNAME_VALIDATE("queueDeclare"); + CAF_CM_VALIDATE_STRING(queue); + + CAF_CM_LOG_DEBUG_VA2( + "Calling amqp_queue_declare - channel: %d, queue: %s", + channel, queue.c_str()); + + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + CAF_CM_VALIDATE_BOOL(_address->getProtocol() != PROTOCOL_TUNNEL); + validateOpenChannel(channel); + + amqp_queue_declare_t method = {}; + AmqpCommon::strToAmqpBytes(queue, method.queue, _cachedStrings); + AmqpCommon::boolToAmqpBool(passive, method.passive); + AmqpCommon::boolToAmqpBool(durable, method.durable); + AmqpCommon::boolToAmqpBool(exclusive, method.exclusive); + AmqpCommon::boolToAmqpBool(autoDelete, method.auto_delete); + AmqpCommon::boolToAmqpBool(noWait, method.nowait); + AmqpCommon::cpTableSafely(arguments, method.arguments); + AmqpCommon::sendMethod(_connectionState, channel, + AMQP_QUEUE_DECLARE_METHOD, &method); + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::queueDelete( + const amqp_channel_t& channel, + const std::string& queue, + const bool ifUnused, + const bool ifEmpty, + const bool noWait) { + CAF_CM_FUNCNAME_VALIDATE("queueDelete"); + CAF_CM_VALIDATE_STRING(queue); + + CAF_CM_LOG_DEBUG_VA2( + "Calling amqp_queue_delete - channel: %d, queue: %s", + channel, queue.c_str()); + + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + CAF_CM_VALIDATE_BOOL(_address->getProtocol() != PROTOCOL_TUNNEL); + validateOpenChannel(channel); + + amqp_queue_delete_t method = {}; + AmqpCommon::strToAmqpBytes(queue, method.queue, _cachedStrings); + AmqpCommon::boolToAmqpBool(ifUnused, method.if_unused); + AmqpCommon::boolToAmqpBool(ifEmpty, method.if_empty); + AmqpCommon::boolToAmqpBool(noWait, method.nowait); + AmqpCommon::sendMethod(_connectionState, channel, + AMQP_QUEUE_DELETE_METHOD, &method); + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::queuePurge( + const amqp_channel_t& channel, + const std::string& queue, + const bool noWait) { + CAF_CM_FUNCNAME_VALIDATE("queuePurge"); + CAF_CM_VALIDATE_STRING(queue); + + CAF_CM_LOG_DEBUG_VA2( + "Calling amqp_queue_purge - channel: %d, queue: %s", + channel, queue.c_str()); + + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + validateOpenChannel(channel); + + amqp_queue_purge_t method = {}; + AmqpCommon::strToAmqpBytes(queue, method.queue, _cachedStrings); + AmqpCommon::boolToAmqpBool(noWait, method.nowait); + AmqpCommon::sendMethod(_connectionState, channel, + AMQP_QUEUE_PURGE_METHOD, &method); + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::queueUnbind( + const amqp_channel_t& channel, + const std::string& queue, + const std::string& exchange, + const std::string& routingKey, + const amqp_table_t *arguments) { + CAF_CM_FUNCNAME_VALIDATE("queueUnbind"); + CAF_CM_VALIDATE_STRING(queue); + CAF_CM_VALIDATE_STRING(exchange); + CAF_CM_VALIDATE_STRING(routingKey); + + CAF_CM_LOG_DEBUG_VA4( + "Calling amqp_queue_unbind - channel: %d, queue: %s, exchange: %s, routingKey: %s", + channel, queue.c_str(), exchange.c_str(), routingKey.c_str()); + + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + CAF_CM_VALIDATE_BOOL(_address->getProtocol() != PROTOCOL_TUNNEL); + validateOpenChannel(channel); + + amqp_queue_unbind_t method = {}; + AmqpCommon::strToAmqpBytes(queue, method.queue, _cachedStrings); + AmqpCommon::strToAmqpBytes(exchange, method.exchange, _cachedStrings); + AmqpCommon::strToAmqpBytes(routingKey, method.routing_key, _cachedStrings); + AmqpCommon::cpTableSafely(arguments, method.arguments); + AmqpCommon::sendMethod(_connectionState, channel, + AMQP_QUEUE_UNBIND_METHOD, &method); + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::createConnection() { + CAF_CM_FUNCNAME_VALIDATE("createConnection"); + CAF_CM_VALIDATE_NULLPTR(_connectionState); + CAF_CM_VALIDATE_NULLPTR(_socket); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_DISCONNECTED); + + CAF_CM_LOG_DEBUG_VA0( + "Calling amqp_new_connection/amqp_tcp_socket_new"); + + _connectionState = amqp_new_connection(); + CAF_CM_VALIDATE_PTR(_connectionState); + + _socket = amqp_tcp_socket_new(_connectionState); + CAF_CM_VALIDATE_PTR(_socket); + + _connectionStateEnum = AMQP_STATE_INITIALIZED; + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::createSslConnection() { + CAF_CM_FUNCNAME_VALIDATE("createSslConnection"); + CAF_CM_VALIDATE_NULLPTR(_connectionState); + CAF_CM_VALIDATE_NULLPTR(_socket); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_DISCONNECTED); + CAF_CM_VALIDATE_SMARTPTR(_certInfo); + + CAF_CM_LOG_DEBUG_VA0( + "Calling amqp_new_connection/amqp_ssl_socket_new"); + + _connectionState = amqp_new_connection(); + CAF_CM_VALIDATE_PTR(_connectionState); + + _socket = amqp_ssl_socket_new(_connectionState); + CAF_CM_VALIDATE_PTR(_socket); + + CAF_CM_LOG_DEBUG_VA0( + "Disable peer verification (amqp_ssl_socket_set_verify)"); + +#ifdef USE_AMQP_0_8_0 + amqp_ssl_socket_set_verify_peer(_socket, false); + + CAF_CM_LOG_DEBUG_VA0( + "Disable hostname verification (amqp_ssl_socket_set_verify)"); + + amqp_ssl_socket_set_verify_hostname(_socket, false); +#else + amqp_ssl_socket_set_verify(_socket, false); +#endif + + CAF_CM_LOG_DEBUG_VA1( + "Calling amqp_ssl_socket_set_cacert - caCertPath: %s", + _certInfo->getCaCertPath().c_str()); + + _lastStatus = AmqpCommon::validateStatusRequired( + "amqp_ssl_socket_set_cacert", + amqp_ssl_socket_set_cacert( + _socket, + _certInfo->getCaCertPath().c_str())); + + CAF_CM_LOG_DEBUG_VA2( + "Calling amqp_ssl_socket_set_key - clientCert: %s, clientKey: %s", + _certInfo->getClientCertPath().c_str(), _certInfo->getClientKeyPath().c_str()); + + _lastStatus = AmqpCommon::validateStatusRequired( + "amqp_ssl_socket_set_key", + amqp_ssl_socket_set_key( + _socket, + _certInfo->getClientCertPath().c_str(), + _certInfo->getClientKeyPath().c_str())); + + _connectionStateEnum = AMQP_STATE_INITIALIZED; + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::connectConnection() { + CAF_CM_FUNCNAME("connectConnection"); + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_PTR(_socket); + CAF_CM_VALIDATE_SMARTPTR(_address); + CAF_CM_VALIDATE_SMARTPTR(_auth); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_INITIALIZED); + + CAF_CM_LOG_DEBUG_VA3( + "Calling amqp_socket_open_noblock - protocol: %s, host: %s, port: %d", + _address->getProtocolStr().c_str(), _address->getHost().c_str(), + _address->getPort()); + + struct timeval timeout; + struct timeval *pTimeout = NULL; + + if (_secondsToWait) { + memset(&timeout, 0, sizeof(timeval)); + timeout.tv_sec = _secondsToWait; + pTimeout = &timeout; + } + + uint16 retries = _retries; + do { + CAF_CM_LOG_DEBUG_VA2( + "Calling amqp_socket_open_noblock - retries: %d, wait: %d", + retries, _secondsToWait); + if (retries == 1 ) { + // Throw an exception if the last attempt fails + _lastStatus = AmqpCommon::validateStatusRequired( + "amqp_socket_open_noblock", + amqp_socket_open_noblock( + _socket, + _address->getHost().c_str(), + _address->getPort(), + pTimeout)); + } + else { + _lastStatus = AmqpCommon::validateStatus( + "amqp_socket_open_noblock", + amqp_socket_open_noblock( + _socket, + _address->getHost().c_str(), + _address->getPort(), + pTimeout)); + } + } while (_lastStatus != AMQP_STATUS_OK && --retries); + + CAF_CM_LOG_DEBUG_VA2( + "Calling amqp_login - virtualHost: %s, username: %s", + _address->getVirtualHost().c_str(), _auth->getUsername().c_str()); + + _lastStatus = AmqpCommon::validateRpcReply( + "amqp_login", + amqp_login( + _connectionState, + _address->getVirtualHost().c_str(), + _channelMax, + _frameMax, + _heartbeat, + AMQP_SASL_METHOD_PLAIN, + _auth->getUsername().c_str(), + _auth->getPassword().empty() ? "" :_auth->getPassword().c_str())); + + CAF_CM_LOG_DEBUG_VA2( + "Called amqp_login - virtualHost: %s, username: %s", + _address->getVirtualHost().c_str(), _auth->getUsername().c_str()); + + if (0 == _lastStatus) { + _connectionStateEnum = AMQP_STATE_CONNECTED; + } else { + CAF_CM_EXCEPTION_VA3(E_FAIL, + "Failed to login - error: %s, vhost: %s, username: %s", + amqp_error_string2(_lastStatus), + _address->getVirtualHost().c_str(), + _auth->getUsername().c_str()); + } + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::closeConnection() { + CAF_CM_FUNCNAME_VALIDATE("closeConnection"); + + if ((_connectionStateEnum == AMQP_STATE_INITIALIZED) || + (_connectionStateEnum == AMQP_STATE_CONNECTING) || + (_connectionStateEnum == AMQP_STATE_CONNECTED)) { + CAF_CM_VALIDATE_SMARTPTR(_address); + CAF_CM_VALIDATE_PTR(_connectionState); + + CAF_CM_LOG_DEBUG_VA4( + "Calling amqp_connection_close/amqp_destroy_connection - protocol: %s, host: %s, port: %d, virtualHost: %s", + _address->getProtocolStr().c_str(), _address->getHost().c_str(), + _address->getPort(), _address->getVirtualHost().c_str()); + + for (COpenChannels::const_iterator iter = _openChannels.begin(); + iter != _openChannels.end(); iter++) { + const amqp_channel_t channel = *iter; + closeChannel(channel); + } + + AmqpCommon::validateRpcReply( + "amqp_connection_close", + amqp_connection_close(_connectionState, AMQP_REPLY_SUCCESS)); + + _lastStatus = AmqpCommon::validateStatus( + "amqp_destroy_connection", + amqp_destroy_connection(_connectionState)); + } + + _connectionState = NULL; + _socket = NULL; + _curChannel = 0; + _connectionStateEnum = AMQP_STATE_DISCONNECTED; + _channelFrames = NULL; + _openChannels.clear(); + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::closeChannel( + const amqp_channel_t& channel) { + CAF_CM_FUNCNAME_VALIDATE("closeChannel"); + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + + CAF_CM_LOG_DEBUG_VA1("Calling amqp_channel_close - %d", channel); + + AmqpCommon::validateRpcReply( + "amqp_channel_close", + amqp_channel_close( + _connectionState, + channel, + AMQP_REPLY_SUCCESS)); + + return AMQP_ERROR_OK; +} + +int32 CAmqpConnection::receiveFrame( + const amqp_connection_state_t& connectionState, + SmartPtrCAmqpFrame& frame) const { + CAF_CM_FUNCNAME_VALIDATE("receiveFrame"); + CAF_CM_VALIDATE_PTR(connectionState); + + frame = SmartPtrCAmqpFrame(); + + timeval tv; + tv.tv_sec = 0; + tv.tv_usec = 0; + + amqp_frame_t decoded_frame; + int32 status = amqp_simple_wait_frame_noblock( + connectionState, + &decoded_frame, + &tv); + + if (AMQP_STATUS_OK == status) { + frame.CreateInstance(); + frame->initialize(decoded_frame); + frame->log("Received"); + } + + return status; +} + +void CAmqpConnection::addFrames( + const CAmqpFrames& frames, + const SmartPtrCChannelFrames& channelFrames) const { + for (CAmqpFrames::const_iterator iter = frames.begin(); + iter != frames.end(); iter++) { + const SmartPtrCAmqpFrame frame = *iter; + + CChannelFrames::iterator fndIter = channelFrames->find(frame->getChannel()); + if (channelFrames->end() == fndIter) { + channelFrames->insert(std::make_pair( + frame->getChannel(), CAmqpFrames())); + fndIter = channelFrames->find(frame->getChannel()); + } + fndIter->second.push_back(frame); + } +} + +void CAmqpConnection::validateOpenChannel( + const amqp_channel_t& channel) const { + CAF_CM_FUNCNAME("validateOpenChannel"); + + if (_openChannels.end() == _openChannels.find(channel)) { + CAF_CM_EXCEPTION_VA1(E_FAIL, + "Channel not found - %d", channel); + } +} + +bool CAmqpConnection::isDataAvail( + const amqp_connection_state_t& connectionState) const { + CAF_CM_FUNCNAME_VALIDATE("isDataAvail"); + CAF_CM_VALIDATE_PTR(connectionState); + + return (amqp_frames_enqueued(connectionState)) || + (amqp_data_in_buffer(connectionState)); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CAmqpConnection.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CAmqpConnection.h new file mode 100644 index 000000000..e86a158ee --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CAmqpConnection.h @@ -0,0 +1,243 @@ +/* + * Created on: May 7, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPCLIENT_CAMQPCONNECTION_H_ +#define AMQPCLIENT_CAMQPCONNECTION_H_ + +namespace Caf { namespace AmqpClient { + +/** Connection states. */ +typedef enum { + AMQP_STATE_INITIALIZED = 0, /*!< New connection. */ + AMQP_STATE_CONNECTING, /*!< Connection in progress. */ + AMQP_STATE_CONNECTED, /*!< Connected. */ + AMQP_STATE_DISCONNECTING, /*!< Disconnection in process. */ + AMQP_STATE_DISCONNECTED, /*!< Disconnected. */ +} AMQPConnectionState; + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Manages a set of channels for a connection. + * Channels are indexed by channel number (1.._channelMax). + */ +class CAmqpConnection { +private: + typedef std::deque CAmqpFrames; + typedef std::map CChannelFrames; + CAF_DECLARE_SMART_POINTER(CChannelFrames); + + typedef std::set COpenChannels; + CAF_DECLARE_SMART_POINTER(COpenChannels); + +public: + CAmqpConnection(); + virtual ~CAmqpConnection(); + +public: + AMQPStatus connectionCreate( + const SmartPtrAddress& address, + const SmartPtrCAmqpAuthMechanism& auth, + const SmartPtrCertInfo& certInfo, + const uint16 channelMax, + const uint32 frameMax, + const uint16 heartbeat, + const uint16 retries, + const uint16 secondsToWait); + + AMQPStatus connectionConnect( + const int32 flags); + + AMQPStatus connectionClose(); + + AMQPStatus connectionProcessIO(); + + AMQPStatus connectionWaitForIO( + const int32 timeout); + + AMQPStatus connectionGetState( + AMQPConnectionState *state); + + AMQPStatus connectionGetMaxChannels( + uint16 *channels); + + AMQPStatus connectionGetMaxFrameSize( + uint32 *frameSize); + + AMQPStatus connectionGetHeartbeatInterval( + uint16 *interval); + + AMQPStatus connectionGetLastError( + const char **error); + + AMQPStatus channelOpen( + SmartPtrCAmqpChannel& chan); + + AMQPStatus channelClose( + const amqp_channel_t& channel); + + AMQPStatus channelCloseOk( + const amqp_channel_t& channel); + + AMQPStatus receive( + const amqp_channel_t& channel, + SmartPtrCAmqpFrame& frame, + const int32 timeout); + + AMQPStatus basicAck( + const amqp_channel_t& channel, + const uint64 deliveryTag, + const bool multiple); + + AMQPStatus basicCancel( + const amqp_channel_t& channel, + const std::string& consumerTag, + const bool noWait); + + AMQPStatus basicConsume( + const amqp_channel_t& channel, + const std::string& queue, + const std::string& consumerTag, + const bool noLocal, + const bool noAck, + const bool exclusive, + const bool noWait, + const amqp_table_t *arguments); + + AMQPStatus basicGet( + const amqp_channel_t& channel, + const std::string& queue, + const bool noAck); + + AMQPStatus basicPublish( + const amqp_channel_t& channel, + const std::string& exchange, + const std::string& routingKey, + const bool mandatory, + const bool immediate, + const amqp_basic_properties_t *basicProps, + const SmartPtrCDynamicByteArray& body); + + AMQPStatus basicRecover( + const amqp_channel_t& channel, + const bool requeue); + + AMQPStatus basicQos( + const amqp_channel_t& channel, + const uint32 prefetchSize, + const uint16 prefetchCount, + const bool global); + + AMQPStatus exchangeDeclare( + const amqp_channel_t& channel, + const std::string& exchange, + const std::string& type, + const bool passive, + const bool durable, + const bool noWait, + const amqp_table_t *arguments); + + AMQPStatus exchangeDelete( + const amqp_channel_t& channel, + const std::string& exchange, + const bool ifUnused, + const bool noWait); + + AMQPStatus queueBind( + const amqp_channel_t& channel, + const std::string& queue, + const std::string& exchange, + const std::string& routingKey, + const bool noWait, + const amqp_table_t *arguments); + + AMQPStatus queueDeclare( + const amqp_channel_t& channel, + const std::string& queue, + const bool passive, + const bool durable, + const bool exclusive, + const bool autoDelete, + const bool noWait, + const amqp_table_t *arguments); + + AMQPStatus queueDelete( + const amqp_channel_t& channel, + const std::string& queue, + const bool ifUnused, + const bool ifEmpty, + const bool noWait); + + AMQPStatus queuePurge( + const amqp_channel_t& channel, + const std::string& queue, + const bool noWait); + + AMQPStatus queueUnbind( + const amqp_channel_t& channel, + const std::string& queue, + const std::string& exchange, + const std::string& routingKey, + const amqp_table_t *arguments); + +private: + AMQPStatus createConnection(); + AMQPStatus createSslConnection(); + + AMQPStatus connectConnection(); + + AMQPStatus closeConnection(); + + AMQPStatus closeChannel( + const amqp_channel_t& channel); + + int32 receiveFrame( + const amqp_connection_state_t& connectionState, + SmartPtrCAmqpFrame& frame) const; + + void addFrames( + const CAmqpFrames& frames, + const SmartPtrCChannelFrames& channelFrames) const; + + bool isDataAvail( + const amqp_connection_state_t& connectionState) const; + + void validateOpenChannel( + const amqp_channel_t& channel) const; + +private: + amqp_connection_state_t _connectionState; + amqp_socket_t* _socket; + amqp_channel_t _curChannel; + AMQPConnectionState _connectionStateEnum; + int32 _lastStatus; + + SmartPtrCAmqpAuthMechanism _auth; + uint16 _channelMax; + uint32 _frameMax; + uint16 _heartbeat; + uint16 _retries; + uint16 _secondsToWait; + SmartPtrAddress _address; + SmartPtrCertInfo _certInfo; + SmartPtrCChannelFrames _channelFrames; + + Csetstr _cachedStrings; + COpenChannels _openChannels; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_THREADSAFE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CAmqpConnection); +}; + +}} + +#endif /* AMQPCLIENT_CAMQPCONNECTION_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CAmqpFrame.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CAmqpFrame.cpp new file mode 100644 index 000000000..b39bfc322 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CAmqpFrame.cpp @@ -0,0 +1,145 @@ +/* + * Created on: May 7, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CAmqpFrame.h" + +using namespace Caf::AmqpClient; + +CAmqpFrame::CAmqpFrame() : + _isInitialized(false), + _frameType(0), + _channel(0), + _propertiesClassId(0), + _propertiesBodySize(0), + _propertiesDecoded(NULL), + CAF_CM_INIT_LOG("CAmqpFrame") { + _method.decoded = NULL; + _method.id = 0; + _bodyFragment.bytes = NULL; + _bodyFragment.len = 0; +} + +CAmqpFrame::~CAmqpFrame() { +} + +void CAmqpFrame::initialize( + const amqp_frame_t& frame) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _channel = frame.channel; + _frameType = frame.frame_type; + + switch (_frameType) { + case AMQP_FRAME_METHOD: { + _method = frame.payload.method; + } + break; + + case AMQP_FRAME_HEADER: { + _propertiesClassId = frame.payload.properties.class_id; + _propertiesBodySize = frame.payload.properties.body_size; + CAF_CM_VALIDATE_NOTZERO(static_cast(_propertiesBodySize)); + CAF_CM_VALIDATE_PTR(frame.payload.properties.decoded); + + _propertiesDecoded = static_cast( + frame.payload.properties.decoded); + } + break; + + case AMQP_FRAME_BODY: { + _bodyFragment = frame.payload.body_fragment; + } + break; + + default: + CAF_CM_LOG_ERROR_VA1("Unknown frame type - %d", frame.frame_type); + } + + _isInitialized = true; +} + +uint8_t CAmqpFrame::getFrameType() const { + CAF_CM_FUNCNAME_VALIDATE("getFrameType"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _frameType; +} + +amqp_channel_t CAmqpFrame::getChannel() const { + CAF_CM_FUNCNAME_VALIDATE("getChannel"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _channel; +} + +const amqp_method_t* const CAmqpFrame::getPayloadAsMethod() const { + CAF_CM_FUNCNAME_VALIDATE("getPayloadAsMethod"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_BOOL(_frameType == AMQP_FRAME_METHOD); + return &_method; +} + +uint16_t CAmqpFrame::getHeaderClassId() const { + CAF_CM_FUNCNAME_VALIDATE("getHeaderClassId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_BOOL(_frameType == AMQP_FRAME_HEADER); + return _propertiesClassId; +} + +uint64_t CAmqpFrame::getHeaderBodySize() const { + CAF_CM_FUNCNAME_VALIDATE("getHeaderBodySize"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_BOOL(_frameType == AMQP_FRAME_HEADER); + return _propertiesBodySize; +} + +const amqp_basic_properties_t* const CAmqpFrame::getHeaderProperties() const { + CAF_CM_FUNCNAME_VALIDATE("getPayloadAsMethod"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_BOOL(_frameType == AMQP_FRAME_HEADER); + return _propertiesDecoded; +} + +const amqp_bytes_t* const CAmqpFrame::getBodyFragment() const { + CAF_CM_FUNCNAME_VALIDATE("getBodyFragment"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_BOOL(_frameType == AMQP_FRAME_BODY); + return &_bodyFragment; +} + +void CAmqpFrame::log( + const std::string& prefix) const { + CAF_CM_FUNCNAME_VALIDATE("log"); + CAF_CM_VALIDATE_STRING(prefix); + + switch (_frameType) { + case AMQP_FRAME_METHOD: + CAF_CM_LOG_DEBUG_VA4( + "%s - type: AMQP_FRAME_METHOD, channel: %d, methodId: 0x%08x, methodName: %s", + prefix.c_str(), _channel, _method.id, + amqp_method_name(_method.id)); + break; + + case AMQP_FRAME_HEADER: + CAF_CM_LOG_DEBUG_VA4( + "%s - type: AMQP_FRAME_HEADER, channel: %d, classId: 0x%04x, bodySize: %d", + prefix.c_str(), _channel, _propertiesClassId, + _propertiesBodySize); + break; + + case AMQP_FRAME_BODY: + CAF_CM_LOG_DEBUG_VA3( + "%s - type: AMQP_FRAME_BODY, channel: %d, bodyLen: %d", + prefix.c_str(), _channel, _bodyFragment.len); +// AmqpCommon::dumpMessageBody(_bodyFragment.bytes, _bodyFragment.len); + break; + + default: + CAF_CM_LOG_ERROR_VA1("Unknown frame type - %d", _frameType); + } +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CAmqpFrame.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CAmqpFrame.h new file mode 100644 index 000000000..b1a8af076 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CAmqpFrame.h @@ -0,0 +1,66 @@ +/* + * Created on: May 7, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPCLIENT_CAMQPFRAME_H_ +#define AMQPCLIENT_CAMQPFRAME_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Manages a set of channels for a connection. + * Channels are indexed by channel number (1.._channelMax). + */ +class CAmqpFrame { +public: + CAmqpFrame(); + virtual ~CAmqpFrame(); + +public: + void initialize( + const amqp_frame_t& frame); + + uint8_t getFrameType() const; + amqp_channel_t getChannel() const; + + const amqp_method_t* const getPayloadAsMethod() const; + + uint16_t getHeaderClassId() const; + uint64_t getHeaderBodySize() const; + const amqp_basic_properties_t* const getHeaderProperties() const; + + const amqp_bytes_t* const getBodyFragment() const; + + void log(const std::string& prefix) const; + +private: + bool _isInitialized; + + uint8_t _frameType; + amqp_channel_t _channel; + + amqp_method_t _method; + + uint16_t _propertiesClassId; + uint64_t _propertiesBodySize; + amqp_basic_properties_t* _propertiesDecoded; + + amqp_bytes_t _bodyFragment; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CAmqpFrame); +}; +CAF_DECLARE_SMART_POINTER(CAmqpFrame); + +}} + +#endif /* AMQPCLIENT_CAMQPFRAME_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CertInfo.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CertInfo.cpp new file mode 100644 index 000000000..3b4b493a3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CertInfo.cpp @@ -0,0 +1,53 @@ +/* + * Created on: May 2, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "api/CertInfo.h" + +using namespace Caf::AmqpClient; + +CertInfo::CertInfo() : + _isInitialized(false), + CAF_CM_INIT_LOG("CertInfo") {} + +CertInfo::~CertInfo() {} + +void CertInfo::initialize( + const std::string& caCertPath, + const std::string& clientCertPath, + const std::string& clientKeyPath) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(caCertPath); + CAF_CM_VALIDATE_STRING(clientCertPath); + CAF_CM_VALIDATE_STRING(clientKeyPath); + + _caCertPath = caCertPath; + _clientCertPath = clientCertPath; + _clientKeyPath = clientKeyPath; + + _isInitialized = true; +} + +std::string CertInfo::getCaCertPath() const { + CAF_CM_FUNCNAME_VALIDATE("getCaCertPath"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _caCertPath; +} + +std::string CertInfo::getClientCertPath() const { + CAF_CM_FUNCNAME_VALIDATE("getClientCertPath"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _clientCertPath; +} + +std::string CertInfo::getClientKeyPath() const { + CAF_CM_FUNCNAME_VALIDATE("getClientKeyPath"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _clientKeyPath; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CommandAssembler.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CommandAssembler.cpp new file mode 100644 index 000000000..c0a170476 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CommandAssembler.cpp @@ -0,0 +1,163 @@ +/* + * Created on: May 9, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ +#include "stdafx.h" +#include "CommandAssembler.h" + +using namespace Caf::AmqpClient; + +CommandAssembler::CommandAssembler() : + _isInitialized(false), + _state(EXPECTING_METHOD), + _remainingBodyBytes(0), + _bodyLength(0), + CAF_CM_INIT("CommandAssembler") { +} + +CommandAssembler::~CommandAssembler() { +} + +void CommandAssembler::init() { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _isInitialized = true; +} + +bool CommandAssembler::handleFrame(const SmartPtrCAmqpFrame& frame) { + CAF_CM_FUNCNAME("handleFrame"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_PTR(frame); + + switch (_state) { + case EXPECTING_METHOD: + consumeMethodFrame(frame); + break; + + case EXPECTING_CONTENT_HEADER: + consumeHeaderFrame(frame); + break; + + case EXPECTING_CONTENT_BODY: + consumeBodyFrame(frame); + break; + + default: + CAF_CM_EXCEPTIONEX_VA2( + IllegalStateException, + 0, + "Bad command state [channel=%d][state=%d]", + frame->getChannel(), + _state); + break; + } + return isComplete(); +} + +bool CommandAssembler::isComplete() { + CAF_CM_FUNCNAME_VALIDATE("isComplete"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return (_state == COMPLETE); +} + +SmartPtrIMethod CommandAssembler::getMethod() { + CAF_CM_FUNCNAME_VALIDATE("getMethod"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _method; +} + +SmartPtrCDynamicByteArray CommandAssembler::getContentBody() { + CAF_CM_FUNCNAME_VALIDATE("getContentBody"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return coalesceContentBody(); +} + +SmartPtrIContentHeader CommandAssembler::getContentHeader() { + CAF_CM_FUNCNAME_VALIDATE("getContentHeader"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _contentHeader; +} + +void CommandAssembler::consumeBodyFrame(const SmartPtrCAmqpFrame& frame) { + CAF_CM_FUNCNAME("consumeBodyFrame"); + if (frame->getFrameType() == AMQP_FRAME_BODY) { + const amqp_bytes_t * const fragment = frame->getBodyFragment(); + _remainingBodyBytes -= static_cast(fragment->len); + updateContentBodyState(); + appendBodyFragment(fragment); + } else { + CAF_CM_EXCEPTIONEX_VA1( + AmqpExceptions::UnexpectedFrameException, + 0, + "Expected an AMQP body frame. Received type %d", + frame->getFrameType()); + } +} + +void CommandAssembler::consumeHeaderFrame(const SmartPtrCAmqpFrame& frame) { + CAF_CM_FUNCNAME("consumeHeaderFrame"); + if (frame->getFrameType() == AMQP_FRAME_HEADER) { + _contentHeader = AMQPImpl::headerFromFrame(frame); + _remainingBodyBytes = static_cast(_contentHeader->getBodySize()); + updateContentBodyState(); + } else { + CAF_CM_EXCEPTIONEX_VA1( + AmqpExceptions::UnexpectedFrameException, + 0, + "Expected an AMQP header frame. Received type %d", + frame->getFrameType()); + } +} + +void CommandAssembler::consumeMethodFrame(const SmartPtrCAmqpFrame& frame) { + CAF_CM_FUNCNAME("consumeMethodFrame"); + if (frame->getFrameType() == AMQP_FRAME_METHOD) { + _method = AMQPImpl::methodFromFrame(frame->getPayloadAsMethod()); + _state = _method->hasContent() ? EXPECTING_CONTENT_HEADER : COMPLETE; + } else { + CAF_CM_EXCEPTIONEX_VA1( + AmqpExceptions::UnexpectedFrameException, + 0, + "Expected an AMQP method frame. Received type %d", + frame->getFrameType()); + } +} + +void CommandAssembler::updateContentBodyState() { + _state = (_remainingBodyBytes > 0) ? EXPECTING_CONTENT_BODY : COMPLETE; +} + +void CommandAssembler::appendBodyFragment(const amqp_bytes_t * const fragment) { + if (fragment && fragment->len) { + SmartPtrCDynamicByteArray fragmentData; + fragmentData.CreateInstance(); + fragmentData->allocateBytes(fragment->len); + fragmentData->memCpy(fragment->bytes, fragment->len); + _bodyCollection.push_back(fragmentData); + _bodyLength += static_cast(fragment->len); + } +} + +SmartPtrCDynamicByteArray CommandAssembler::coalesceContentBody() { + SmartPtrCDynamicByteArray body; + body.CreateInstance(); + if (_bodyLength) { + if (_bodyCollection.size() == 1) { + body = _bodyCollection.front(); + } else { + body->allocateBytes(_bodyLength); + for (TSmartIterator fragment(_bodyCollection); + fragment; + fragment++) { + body->memAppend(fragment->getPtr(), fragment->getByteCount()); + *fragment = NULL; + } + } + _bodyCollection.clear(); + _bodyCollection.push_back(body); + } + return body; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CommandAssembler.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CommandAssembler.h new file mode 100644 index 000000000..f30f32336 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CommandAssembler.h @@ -0,0 +1,98 @@ +/* + * Created on: May 9, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef COMMANDASSEMBLER_H_ +#define COMMANDASSEMBLER_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief A class that manages the assembly of AMQP frames into a complete AMQP method + */ +class CommandAssembler { +public: + CommandAssembler(); + virtual ~CommandAssembler(); + + /** + * @brief Initialize the object + */ + void init(); + + /** + * @brief Process the AMQP frame + * @param frame AMQP frame + * @retval true all of the frames have been received and the AMQP method is complete + * @retval false more frames are required to complete the AMQP method + */ + bool handleFrame(const SmartPtrCAmqpFrame& frame); + + /** + * @brief Return the completion status of the method + * @retval true all frames have been received and the AMQP method is complete + * @retval false more frames are required to complete the AMQP method + */ + bool isComplete(); + + /** + * @brief Return the Method + * @return the interface to the Method. QueryInterface to the appropriate + * derived type based on the class ID and method ID. + */ + SmartPtrIMethod getMethod(); + + /** + * @brief Return the ContentHeader + * @return the interface to the ContentHeader. QueryInterface to the appropriate + * derived type based on the class ID. + */ + SmartPtrIContentHeader getContentHeader(); + + /** + * @brief Return the method body + * @return the method body data as raw bytes + */ + SmartPtrCDynamicByteArray getContentBody(); + +private: + typedef enum { + EXPECTING_METHOD, + EXPECTING_CONTENT_HEADER, + EXPECTING_CONTENT_BODY, + COMPLETE + } CAState; + + typedef std::deque CBodyCollection; + +private: + void consumeBodyFrame(const SmartPtrCAmqpFrame& frame); + void consumeHeaderFrame(const SmartPtrCAmqpFrame& frame); + void consumeMethodFrame(const SmartPtrCAmqpFrame& frame); + void updateContentBodyState(); + void appendBodyFragment(const amqp_bytes_t * const fragment); + SmartPtrCDynamicByteArray coalesceContentBody(); + +private: + bool _isInitialized; + CAState _state; + SmartPtrIMethod _method; + SmartPtrIContentHeader _contentHeader; + uint32 _remainingBodyBytes; + CBodyCollection _bodyCollection; + uint32 _bodyLength; + + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CommandAssembler); +}; +CAF_DECLARE_SMART_POINTER(CommandAssembler); + +}} +#endif /* COMMANDASSEMBLER_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/ConnectionFactoryImpl.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/ConnectionFactoryImpl.cpp new file mode 100644 index 000000000..cfcc705dd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/ConnectionFactoryImpl.cpp @@ -0,0 +1,210 @@ +/* + * Created on: May 2, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "ConnectionFactoryImpl.h" +#include "AMQConnection.h" + +using namespace Caf::AmqpClient; + +SmartPtrConnectionFactory AMQPCLIENT_LINKAGE Caf::AmqpClient::createConnectionFactory() { + SmartPtrConnectionFactoryImpl factory; + factory.CreateInstance(); + return factory; +} + +ConnectionFactoryImpl::ConnectionFactoryImpl() : + _protocol(DEFAULT_PROTOCOL), + _host(DEFAULT_HOST), + _port(USE_DEFAULT_PORT), + _virtualHost(DEFAULT_VHOST), + _username(DEFAULT_USER), + _password(DEFAULT_PASS), + _requestedChannelMax(DEFAULT_CHANNEL_MAX), + _requestedFrameMax(DEFAULT_FRAME_MAX), + _requestedHeartbeat(DEFAULT_HEARTBEAT), + _connectionTimeout(DEFAULT_CONNECTION_TIMEOUT), + _consumerThreadCount(DEFAULT_CONSUMER_THREAD_COUNT), + _retries(DEFAULT_CONNECTION_RETRIES), + _secondsToWait(DEFAULT_CONNECTION_SECONDS_TO_WAIT), + CAF_CM_INIT("ConnectionFactoryImpl") { +} + +ConnectionFactoryImpl::~ConnectionFactoryImpl() { +} + +std::string ConnectionFactoryImpl::getProtocol() const { + return _protocol; +} + +void ConnectionFactoryImpl::setProtocol(const std::string& protocol) { + _protocol = protocol; +} + +std::string ConnectionFactoryImpl::getHost() const { + return _host; +} + +void ConnectionFactoryImpl::setHost(const std::string& host) { + _host = host; +} + +uint32 ConnectionFactoryImpl::getPort() const { + return portOrDefault(_port); +} + +void ConnectionFactoryImpl::setPort(const uint32 port) { + _port = port; +} + +std::string ConnectionFactoryImpl::getVirtualHost() const { + return _virtualHost; +} + +void ConnectionFactoryImpl::setVirtualHost(const std::string& virtualHost) { + _virtualHost = virtualHost; +} + +std::string ConnectionFactoryImpl::getUsername() const { + return _username; +} + +void ConnectionFactoryImpl::setUsername(const std::string& username) { + _username = username; +} + +std::string ConnectionFactoryImpl::getPassword() const { + return _password; +} + +void ConnectionFactoryImpl::setPassword(const std::string& password) { + _password = password; +} + +std::string ConnectionFactoryImpl::getCaCertPath() const { + return _caCertPath; +} + +void ConnectionFactoryImpl::setCaCertPath(const std::string& caCertPath) { + _caCertPath = caCertPath; +} + +std::string ConnectionFactoryImpl::getClientCertPath() const { + return _clientCertPath; +} + +void ConnectionFactoryImpl::setClientCertPath(const std::string& clientCertPath) { + _clientCertPath = clientCertPath; +} + +std::string ConnectionFactoryImpl::getClientKeyPath() const { + return _clientKeyPath; +} + +void ConnectionFactoryImpl::setClientKeyPath(const std::string& clientKeyPath) { + _clientKeyPath = clientKeyPath; +} + +uint32 ConnectionFactoryImpl::getRequestedChannelMax() const { + return _requestedChannelMax; +} + +void ConnectionFactoryImpl::setRequestedChannelMax(const uint32 requestedChannelMax) { + _requestedChannelMax = requestedChannelMax; +} + +uint32 ConnectionFactoryImpl::getRequestedFrameMax() const { + return _requestedFrameMax; +} + +void ConnectionFactoryImpl::setRequestedFrameMax(const uint32 requestedFrameMax) { + _requestedFrameMax = requestedFrameMax; +} + +uint32 ConnectionFactoryImpl::getRequestedHeartbeat() const { + return _requestedHeartbeat; +} + +void ConnectionFactoryImpl::setRequestedHeartbeat(const uint32 requestedHeartbeat) { + _requestedHeartbeat = requestedHeartbeat; +} + +uint32 ConnectionFactoryImpl::getConnectionTimeout() const { + return _connectionTimeout; +} + +void ConnectionFactoryImpl::setConnectionTimeout(const uint32 connectionTimeout) { + _connectionTimeout = connectionTimeout; +} + +uint32 ConnectionFactoryImpl::getConsumerThreadCount() const { + return _consumerThreadCount; +} + +void ConnectionFactoryImpl::setConsumerThreadCount(const uint32 threadCount) { + CAF_CM_FUNCNAME_VALIDATE("setConsumerThreadCount"); + CAF_CM_VALIDATE_NOTZERO(threadCount); + _consumerThreadCount = threadCount; +} + +uint16 ConnectionFactoryImpl::getRetries() const { + return _retries; +} + +void ConnectionFactoryImpl::setRetries(const uint16 retries) { + _retries = retries; +} + +uint16 ConnectionFactoryImpl::getSecondsToWait() const { + return _secondsToWait; +} + +void ConnectionFactoryImpl::setSecondsToWait(const uint16 seconds) { + _secondsToWait = seconds; +} + +SmartPtrConnection ConnectionFactoryImpl::newConnection() { + SmartPtrAddress address; + address.CreateInstance(); + address->initialize(getProtocol(), getHost(), getPort(), getVirtualHost()); + + SmartPtrCertInfo certInfo; + if (! getCaCertPath().empty() && + ! getClientCertPath().empty() && + ! getClientKeyPath().empty()) { + certInfo.CreateInstance(); + certInfo->initialize(getCaCertPath(), getClientCertPath(), getClientKeyPath()); + } + + return newConnection(address, certInfo); +} + +SmartPtrConnection ConnectionFactoryImpl::newConnection( + const SmartPtrAddress& address, + const SmartPtrCertInfo& certInfo) { + SmartPtrAMQConnection conn; + conn.CreateInstance(); + conn->init( + _username, + _password, + address, + certInfo, + _requestedFrameMax, + _requestedChannelMax, + _requestedHeartbeat, + _connectionTimeout, + _consumerThreadCount, + _retries, + _secondsToWait); + conn->start(); + return conn; +} + +uint32 ConnectionFactoryImpl::portOrDefault(const uint32 port) const { + return (USE_DEFAULT_PORT == port) ? DEFAULT_AMQP_PORT : port; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/ConnectionFactoryImpl.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/ConnectionFactoryImpl.h new file mode 100644 index 000000000..3d1bb48c9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/ConnectionFactoryImpl.h @@ -0,0 +1,92 @@ +/* + * Created on: May 2, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CONNECTIONFACTORYIMPL_H_ +#define CONNECTIONFACTORYIMPL_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of ConnectionFactory + */ +class ConnectionFactoryImpl : public ConnectionFactory { +public: + ConnectionFactoryImpl(); + virtual ~ConnectionFactoryImpl(); + +public: // ConectionFactory + std::string getProtocol() const; + void setProtocol(const std::string& host); + std::string getHost() const; + void setHost(const std::string& host); + uint32 getPort() const; + void setPort(const uint32 port); + std::string getVirtualHost() const; + void setVirtualHost(const std::string& virtualHost); + std::string getUsername() const; + void setUsername(const std::string& username); + std::string getPassword() const; + void setPassword(const std::string& password); + std::string getCaCertPath() const; + void setCaCertPath(const std::string& caCertPath); + std::string getClientCertPath() const; + void setClientCertPath(const std::string& clientCertPath); + std::string getClientKeyPath() const; + void setClientKeyPath(const std::string& clientKeyPath); + uint32 getRequestedChannelMax() const; + void setRequestedChannelMax(const uint32 requestedChannelMax); + uint32 getRequestedFrameMax() const; + void setRequestedFrameMax(const uint32 requestedFrameMax); + uint32 getRequestedHeartbeat() const; + void setRequestedHeartbeat(const uint32 requestedHeartbeat); + uint32 getConnectionTimeout() const; + void setConnectionTimeout(const uint32 connectionTimeout); + uint32 getConsumerThreadCount() const; + void setConsumerThreadCount(const uint32 threadCount); + uint16 getRetries() const; + void setRetries(const uint16 retries); + uint16 getSecondsToWait() const; + void setSecondsToWait(const uint16 seconds); + + SmartPtrConnection newConnection(); + SmartPtrConnection newConnection( + const SmartPtrAddress& address, + const SmartPtrCertInfo& certInfo); + +private: + uint32 portOrDefault(const uint32 port) const; + +private: + std::string _protocol; + std::string _host; + uint32 _port; + std::string _virtualHost; + std::string _username; + std::string _password; + std::string _caCertPath; + std::string _clientCertPath; + std::string _clientKeyPath; + uint32 _requestedChannelMax; + uint32 _requestedFrameMax; + uint32 _requestedHeartbeat; + uint32 _connectionTimeout; + uint32 _consumerThreadCount; + uint16 _retries; + uint16 _secondsToWait; + + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(ConnectionFactoryImpl); +}; +CAF_DECLARE_SMART_POINTER(ConnectionFactoryImpl); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/ConnectionWeakReference.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/ConnectionWeakReference.cpp new file mode 100644 index 000000000..201b7e124 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/ConnectionWeakReference.cpp @@ -0,0 +1,68 @@ +/* + * Created on: May 7, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "ConnectionWeakReference.h" + +using namespace Caf::AmqpClient; + +ConnectionWeakReference::ConnectionWeakReference() : + _connection(NULL), + CAF_CM_INIT("ConnectionWeakReference") { + CAF_CM_INIT_THREADSAFE; +} + +ConnectionWeakReference::~ConnectionWeakReference() { +} + +void ConnectionWeakReference::setReference(IConnectionInt* connection) { + CAF_CM_FUNCNAME_VALIDATE("setReference"); + CAF_CM_VALIDATE_PTR(connection); + CAF_CM_LOCK_UNLOCK; + _connection = connection; +} + +void ConnectionWeakReference::clearReference() { + CAF_CM_LOCK_UNLOCK; + _connection = NULL; +} + +AMQPStatus ConnectionWeakReference::amqpConnectionOpenChannel(SmartPtrCAmqpChannel& channel) { + CAF_CM_FUNCNAME("amqpConnectionOpenChannel"); + CAF_CM_LOCK_UNLOCK; + AMQPStatus status = AMQP_ERROR_OK; + if (_connection) { + status = _connection->amqpConnectionOpenChannel(channel); + } else { + CAF_CM_EXCEPTIONEX_VA0( + NullPointerException, + 0, + "The weak reference is not set"); + } + return status; +} + +void ConnectionWeakReference::notifyChannelClosedByServer(const uint16 channelNumber) { + CAF_CM_FUNCNAME("notifyChannelClosedByServer"); + CAF_CM_LOCK_UNLOCK; + if (_connection) { + _connection->notifyChannelClosedByServer(channelNumber); + } else { + CAF_CM_EXCEPTIONEX_VA0( + NullPointerException, + 0, + "The weak reference is not set"); + } +} + +void ConnectionWeakReference::channelCloseChannel(Channel *channel) { + // It's okay for the weak reference to be unset in this call + if (_connection) { + _connection->channelCloseChannel(channel); + } +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/ConnectionWeakReference.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/ConnectionWeakReference.h new file mode 100644 index 000000000..4b7451b41 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/ConnectionWeakReference.h @@ -0,0 +1,63 @@ +/* + * Created on: May 7, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CONNECTIONWEAKREFERENCE_H_ +#define CONNECTIONWEAKREFERENCE_H_ + +#include "IConnectionInt.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief This class manages a weak reference to a IConnectionInt object. + *

+ * The channel manager needs a reference to its connection. The connection object + * has a reference to the channel manager. To break this reference cycle the channel + * manager will be handed weak references to the connection. + */ +class ConnectionWeakReference : public IConnectionInt { +public: + ConnectionWeakReference(); + virtual ~ConnectionWeakReference(); + +public: + /** + * @brief Sets the weakly referenced object + * @param connection the weakly referenced object + */ + void setReference(IConnectionInt* connection); + + /** + * @brief Clears the weakly referenced object. + * + * Calls to any Connection method on this object will result in a thrown + * exception after this method has been called. + */ + void clearReference(); + +public: // IConnectionInt + AMQPStatus amqpConnectionOpenChannel(SmartPtrCAmqpChannel& channel); + + void notifyChannelClosedByServer(const uint16 channelNumber); + + void channelCloseChannel(Channel *channel); + +private: + IConnectionInt* _connection; + CAF_CM_CREATE; + CAF_CM_CREATE_THREADSAFE; + CAF_CM_DECLARE_NOCOPY(ConnectionWeakReference); +}; +CAF_DECLARE_SMART_POINTER(ConnectionWeakReference); + +}} + +#endif /* CONNECTIONWEAKREFERENCE_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/ConsumerDispatcher.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/ConsumerDispatcher.cpp new file mode 100644 index 000000000..256392af6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/ConsumerDispatcher.cpp @@ -0,0 +1,335 @@ +/* + * Created on: May 21, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "ConsumerDispatcher.h" + +using namespace Caf::AmqpClient; + +ConsumerDispatcher::ConsumerDispatcher() : + _isInitialized(false), + _isShuttingDown(false), + CAF_CM_INIT_LOG("ConsumerDispatcher") { + CAF_CM_INIT_THREADSAFE; +} + +ConsumerDispatcher::~ConsumerDispatcher() { +} + +void ConsumerDispatcher::init(const SmartPtrConsumerWorkService& workService) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(workService); + _workService = workService; + _isInitialized = true; +} + +void ConsumerDispatcher::quiesce() { + CAF_CM_LOCK_UNLOCK; + _isShuttingDown = true; +} + +void ConsumerDispatcher::lock() { + CAF_CM_LOCK; +} + +void ConsumerDispatcher::unlock() { + CAF_CM_UNLOCK; +} + +void ConsumerDispatcher::addConsumer( + const std::string& consumerTag, + const SmartPtrConsumer& consumer) { + CAF_CM_FUNCNAME("addConsumer"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(consumerTag); + CAF_CM_VALIDATE_SMARTPTR(consumer); + + SmartPtrDispatcherTask consumerTask; + consumerTask.CreateInstance(); + consumerTask->init(consumerTag, consumer); + if (_consumers.insert( + ConsumerMap::value_type( + consumerTag, + ConsumerItem(consumer, consumerTask))).second) { + _workService->addWork(consumerTask); + } else { + CAF_CM_EXCEPTIONEX_VA1( + DuplicateElementException, + 0, + "A consumer with consumer tag '%s' is already registered", + consumerTag.c_str()); + } +} + +void ConsumerDispatcher::removeConsumer( + const std::string& consumerTag) { + CAF_CM_FUNCNAME_VALIDATE("removeConsumer"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(consumerTag); + + ConsumerMap::iterator consumer = _consumers.find(consumerTag); + if (consumer != _consumers.end()) { + (consumer->second).second->term(); + _consumers.erase(consumer); + } +} + +SmartPtrConsumer ConsumerDispatcher::getConsumer( + const std::string& consumerTag) { + CAF_CM_FUNCNAME_VALIDATE("getConsumer"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(consumerTag); + SmartPtrConsumer result; + ConsumerMap::iterator consumer = _consumers.find(consumerTag); + if (consumer != _consumers.end()) { + result = (consumer->second).first; + } + return result; +} + +void ConsumerDispatcher::handleShutdown(SmartPtrCCafException exception) { + CAF_CM_FUNCNAME("handleShutdown"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + for (TMapIterator consumerItem(_consumers); + consumerItem; + consumerItem++) { + try { + consumerItem->second->term(); + consumerItem->first->handleShutdown(consumerItem.getKey(), exception); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + } + _consumers.clear(); +} + +void ConsumerDispatcher::handleConsumeOk(const std::string& consumerTag) { + CAF_CM_FUNCNAME("handleConsumeOk"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + try { + if (!_isShuttingDown) { + SmartPtrDispatcherWorkItem workItem; + workItem.CreateInstance(); + workItem->init(DISPATCH_ITEM_METHOD_HANDLE_CONSUME_OK); + getConsumerItem(consumerTag).second->addWorkItem(workItem); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_THROWEXCEPTION; +} + +void ConsumerDispatcher::handleCancelOk(const std::string& consumerTag) { + CAF_CM_FUNCNAME("handleCancelOk"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + try { + if (!_isShuttingDown) { + SmartPtrDispatcherWorkItem workItem; + workItem.CreateInstance(); + workItem->init(DISPATCH_ITEM_METHOD_HANDLE_CANCEL_OK); + getConsumerItem(consumerTag).second->addWorkItem(workItem); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_THROWEXCEPTION; +} + +void ConsumerDispatcher::handleRecoverOk() { + CAF_CM_FUNCNAME("handleRecoverOk"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + try { + if (!_isShuttingDown) { + for (TMapIterator consumerItem(_consumers); + consumerItem; + consumerItem++) { + if (!_isShuttingDown) { + SmartPtrDispatcherWorkItem workItem; + workItem.CreateInstance(); + workItem->init(DISPATCH_ITEM_METHOD_HANDLE_RECOVER_OK); + consumerItem->second->addWorkItem(workItem); + } + } + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_THROWEXCEPTION; +} + +void ConsumerDispatcher::handleDelivery( + const std::string& consumerTag, + const SmartPtrEnvelope& envelope, + const AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body) { + CAF_CM_FUNCNAME("handleDelivery"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + try { + if (!_isShuttingDown) { + SmartPtrDispatcherWorkItem workItem; + workItem.CreateInstance(); + workItem->init( + DISPATCH_ITEM_METHOD_HANDLE_DELIVERY, + envelope, + properties, + body); + getConsumerItem(consumerTag).second->addWorkItem(workItem); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_THROWEXCEPTION; +} + +ConsumerDispatcher::ConsumerItem ConsumerDispatcher::getConsumerItem(const std::string& consumerTag) { + CAF_CM_FUNCNAME("getConsumerItem"); + ConsumerMap::const_iterator consumerItem = _consumers.find(consumerTag); + if (consumerItem == _consumers.end()) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchElementException, + 0, + "Consumer '%s' is not in the collection", + consumerTag.c_str()); + } + return consumerItem->second; +} + +#if (1) // DispatcherWorkItem +ConsumerDispatcher::DispatcherWorkItem::DispatcherWorkItem() : + _method(DISPATCH_ITEM_METHOD_TERMINATE) { +} + +void ConsumerDispatcher::DispatcherWorkItem::init( + const DispatchItemMethod method) { + _method = method; +} + +void ConsumerDispatcher::DispatcherWorkItem::init( + const DispatchItemMethod method, + const SmartPtrEnvelope& envelope, + const AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body) { + _method = method; + _envelope = envelope; + _properties = properties; + _body = body; +} + +ConsumerDispatcher::DispatchItemMethod ConsumerDispatcher::DispatcherWorkItem::getMethod() const { + return _method; +} + +SmartPtrEnvelope ConsumerDispatcher::DispatcherWorkItem::getEnvelope() const { + return _envelope; +} + +AmqpContentHeaders::SmartPtrBasicProperties ConsumerDispatcher::DispatcherWorkItem::getProperties() const { + return _properties; +} + +SmartPtrCDynamicByteArray ConsumerDispatcher::DispatcherWorkItem::getBody() const { + return _body; +} +#endif + +#if (1) // DispatcherTask +ConsumerDispatcher::DispatcherTask::DispatcherTask() : + _workItemQueue(NULL) { +} + +ConsumerDispatcher::DispatcherTask::~DispatcherTask() { + if (_workItemQueue) { + g_async_queue_unref(_workItemQueue); + } +} + +void ConsumerDispatcher::DispatcherTask::init( + const std::string& consumerTag, + const SmartPtrConsumer& consumer) { + _consumerTag = consumerTag; + _consumer = consumer; + _workItemQueue = g_async_queue_new_full(FreeWorkItem); +} + +void ConsumerDispatcher::DispatcherTask::term() { + SmartPtrDispatcherWorkItem workItem; + workItem.CreateInstance(); + workItem->init(DISPATCH_ITEM_METHOD_TERMINATE); + addWorkItem(workItem); +} + +void ConsumerDispatcher::DispatcherTask::addWorkItem( + const ConsumerDispatcher::SmartPtrDispatcherWorkItem& workItem) { + g_async_queue_push(_workItemQueue, workItem.GetAddRefedInterface()); +} + +bool ConsumerDispatcher::DispatcherTask::run() { + uint32 itemsProcessed = 0; + bool isTerminated = false; + + gpointer data = g_async_queue_try_pop(_workItemQueue); + while (data) { + DispatcherWorkItem *workItemPtr = + reinterpret_cast(data); + SmartPtrDispatcherWorkItem workItem(workItemPtr); + workItemPtr->Release(); + data = NULL; + + switch (workItem->getMethod()) { + case DISPATCH_ITEM_METHOD_HANDLE_CONSUME_OK: + _consumer->handleConsumeOk(_consumerTag); + break; + + case DISPATCH_ITEM_METHOD_HANDLE_CANCEL_OK: + _consumer->handleCancelOk(_consumerTag); + break; + + case DISPATCH_ITEM_METHOD_HANDLE_RECOVER_OK: + _consumer->handleRecoverOk(_consumerTag); + break; + + case DISPATCH_ITEM_METHOD_HANDLE_DELIVERY: + _consumer->handleDelivery( + _consumerTag, + workItemPtr->getEnvelope(), + workItemPtr->getProperties(), + workItemPtr->getBody()); + break; + + case DISPATCH_ITEM_METHOD_TERMINATE: + isTerminated = true; + break; + } + + if (!isTerminated && (++itemsProcessed < DEFAULT_CONSUMER_THREAD_MAX_DELIVERY_COUNT)) { + data = g_async_queue_try_pop(_workItemQueue); + } + } + + return isTerminated; +} + +void ConsumerDispatcher::DispatcherTask::FreeWorkItem(gpointer data) { + CAF_CM_STATIC_FUNC_LOG_ONLY("ConsumerDispatcher::DispatcherTask","FreeWorkItem"); + DispatcherWorkItem *workItemPtr = + reinterpret_cast(data); + CAF_CM_LOG_DEBUG_VA1("Clearing workItem [method=%d]", workItemPtr->getMethod()); + workItemPtr->Release(); +} +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/ConsumerDispatcher.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/ConsumerDispatcher.h new file mode 100644 index 000000000..0dff013a5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/ConsumerDispatcher.h @@ -0,0 +1,200 @@ +/* + * Created on: May 21, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CONSUMERDISPATCHER_H_ +#define CONSUMERDISPATCHER_H_ + +#include "ConsumerWorkService.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Dispatches notifications to a {@link Consumer} on an internally-managed work pool. + *

+ * Each {@link Channel} has a single {@link ConsumerDispatcher}, but the work pool may be + * shared with other channels, typically those on the name {@link AMQConnection}. + */ +class ConsumerDispatcher { +public: + ConsumerDispatcher(); + virtual ~ConsumerDispatcher(); + + /** + * @brief Initialize the object + * @param workService work service providing a work pool for dispatching notifications + */ + void init( + const SmartPtrConsumerWorkService& workService); + + /** + * @brief Prepare for shutdown of all consumers on this channel + */ + void quiesce(); + + /** + * @brief Lock the dispatcher + *

+ * Place a lock on the dispatcher. All threads attemping to call the dispatcher will + * be blocked until unlock is called. + */ + void lock(); + + /** + * @brief unlock the dispatcher + *

+ * Remove the lock on the dispatcher. + */ + void unlock(); + + /** + * @brief Adds a consumer to the dispatcher + * @param consumerTag consumer tag + * @param consumer consumer object + */ + void addConsumer( + const std::string& consumerTag, + const SmartPtrConsumer& consumer); + + /** + * @brief Removes a consumer from the dispatcher + * @param consumerTag consumer tag + */ + void removeConsumer( + const std::string& consumerTag); + + /** + * @brief Retrieves a consumer from the dispatcher + * @param consumerTag consumer tag + * @return the consumer or null if not found + */ + SmartPtrConsumer getConsumer( + const std::string& consumerTag); + + /** + * @brief Handle basic.consume-ok + * @param consumerTag consumer tag + */ + void handleConsumeOk( + const std::string& consumerTag); + + /** + * @brief Handle basic.cancel-ok + * @param consumerTag consumer tag + */ + void handleCancelOk( + const std::string& consumerTag); + + /** + * @brief Handle basic.recover-ok + */ + void handleRecoverOk(); + + /** + * @brief Handle basic.delivery + * @param consumerTag consumer tag + * @param envelope message envelope + * @param properties message properties and headers + * @param body message body + */ + void handleDelivery( + const std::string& consumerTag, + const SmartPtrEnvelope& envelope, + const AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body); + + /** + * @brief Handle a channel shutdown event + * @param exception reason for the shutdown + */ + void handleShutdown(SmartPtrCCafException exception); + +private: // Task support + typedef enum { + DISPATCH_ITEM_METHOD_HANDLE_CONSUME_OK, + DISPATCH_ITEM_METHOD_HANDLE_CANCEL_OK, + DISPATCH_ITEM_METHOD_HANDLE_RECOVER_OK, + DISPATCH_ITEM_METHOD_HANDLE_DELIVERY, + DISPATCH_ITEM_METHOD_TERMINATE + } DispatchItemMethod; + + class DispatcherWorkItem : public ICafObject { + public: + DispatcherWorkItem(); + + void init( + const DispatchItemMethod method); + + void init( + const DispatchItemMethod method, + const SmartPtrEnvelope& envelope, + const AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body); + + DispatchItemMethod getMethod() const; + SmartPtrEnvelope getEnvelope() const; + AmqpContentHeaders::SmartPtrBasicProperties getProperties() const; + SmartPtrCDynamicByteArray getBody() const; + + private: + DispatchItemMethod _method; + SmartPtrEnvelope _envelope; + AmqpContentHeaders::SmartPtrBasicProperties _properties; + SmartPtrCDynamicByteArray _body; + }; + CAF_DECLARE_SMART_POINTER(DispatcherWorkItem); + + class DispatcherTask : public CManagedThreadPool::IThreadTask { + public: + DispatcherTask(); + ~DispatcherTask(); + + void init( + const std::string& consumerTag, + const SmartPtrConsumer& consumer); + + void term(); + + void addWorkItem(const SmartPtrDispatcherWorkItem& workItem); + + bool run(); + + private: + static void FreeWorkItem(gpointer data); + + private: + std::string _consumerTag; + SmartPtrConsumer _consumer; + GAsyncQueue *_workItemQueue; + }; + CAF_DECLARE_SMART_POINTER(DispatcherTask); + +private: + typedef std::pair ConsumerItem; + typedef std::map ConsumerMap; + + ConsumerItem getConsumerItem(const std::string& consumerTag); + +private: + bool _isInitialized; + volatile bool _isShuttingDown; + SmartPtrConsumerWorkService _workService; + ConsumerMap _consumers; + + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_CREATE_THREADSAFE; + CAF_CM_DECLARE_NOCOPY(ConsumerDispatcher); +}; +CAF_DECLARE_SMART_POINTER(ConsumerDispatcher); + +}} + +#endif /* CONSUMERDISPATCHER_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/ConsumerWorkService.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/ConsumerWorkService.cpp new file mode 100644 index 000000000..0b1d7bf46 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/ConsumerWorkService.cpp @@ -0,0 +1,48 @@ +/* + * Created on: May 9, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "ConsumerWorkService.h" + +using namespace Caf::AmqpClient; + +ConsumerWorkService::ConsumerWorkService() : + _isInitialized(false), + CAF_CM_INIT_LOG("ConsumerWorkService") { +} + +ConsumerWorkService::~ConsumerWorkService() { + CAF_CM_FUNCNAME("~ConsumerWorkService"); + try { + if (_threadPool) { + _threadPool->term(); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; +} + +void ConsumerWorkService::init(const SmartPtrCManagedThreadPool& threadPool) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_threadPool); + _threadPool = threadPool; +} + +void ConsumerWorkService::addWork(const CManagedThreadPool::SmartPtrIThreadTask& task) { + CAF_CM_FUNCNAME_VALIDATE("addWork"); + CAF_CM_PRECOND_ISINITIALIZED(_threadPool); + _threadPool->enqueue(task); +} + +void ConsumerWorkService::notifyConnectionClosed() { + if (!_threadPool.IsNull()) { + _threadPool->term(); + _threadPool = NULL; + } +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/ConsumerWorkService.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/ConsumerWorkService.h new file mode 100644 index 000000000..6fa760707 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/ConsumerWorkService.h @@ -0,0 +1,53 @@ +/* + * Created on: May 9, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CONSUMERWORKSERVICE_H_ +#define CONSUMERWORKSERVICE_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief This class wraps a thread pool for executing channel worker threads + */ +class ConsumerWorkService { +public: + ConsumerWorkService(); + virtual ~ConsumerWorkService(); + + /** + * @brief Initializer + * @param threadPool the thread pool used to execute channel threads + */ + void init(const SmartPtrCManagedThreadPool& threadPool); + + /** + * @brief Add a worker thread to the pool + * @param task the task to add + */ + void addWork(const CManagedThreadPool::SmartPtrIThreadTask& task); + + /** + * @brief Respond to a connection-closed notification by terminating the thread pool + */ + void notifyConnectionClosed(); + +private: + bool _isInitialized; + SmartPtrCManagedThreadPool _threadPool; + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(ConsumerWorkService); +}; +CAF_DECLARE_SMART_POINTER(ConsumerWorkService); + +}} + +#endif /* CONSUMERWORKSERVICE_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/Doxyfile b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/Doxyfile new file mode 100644 index 000000000..7c0cdbd1c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/Doxyfile @@ -0,0 +1,1757 @@ +# Doxyfile 1.7.5.1 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" "). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# http://www.gnu.org/software/libiconv for the list of possible encodings. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or sequence of words) that should +# identify the project. Note that if you do not use Doxywizard you need +# to put quotes around the project name if it contains spaces. + +PROJECT_NAME = "CAF AMQP Client Library" + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = 1.0 + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer +# a quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = "INTERNAL LIBRARY DEVELOPMENT DOCUMENTATION" + +# With the PROJECT_LOGO tag one can specify an logo or icon that is +# included in the documentation. The maximum height of the logo should not +# exceed 55 pixels and the maximum width should not exceed 200 pixels. +# Doxygen will copy the logo to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, +# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English +# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, +# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, +# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = YES + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful if your file system +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 3 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified +# scopes will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for +# Fortran. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for +# VHDL. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given extension. +# Doxygen has a built-in mapping, but you can override or extend it using this +# tag. The format is ext=language, where ext is a file extension, and language +# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, +# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make +# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C +# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions +# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also makes the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the +# methods anyway, you should set this option to NO. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and +# unions are shown inside the group in which they are included (e.g. using +# @ingroup) instead of on a separate page (for HTML and Man pages) or +# section (for LaTeX and RTF). + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and +# unions with only public data fields will be shown inline in the documentation +# of the scope in which they are defined (i.e. file, namespace, or group +# documentation), provided this scope is documented. If set to NO (the default), +# structs, classes, and unions are shown on a separate page (for HTML and Man +# pages) or section (for LaTeX and RTF). + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. + +TYPEDEF_HIDES_STRUCT = NO + +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penalty. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will roughly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols + +SYMBOL_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespaces are hidden. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = YES + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = YES + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = NO + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = NO + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen +# will list include files with double quotes in the documentation +# rather than with sharp brackets. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = YES + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen +# will sort the (brief and detailed) documentation of class members so that +# constructors and destructors are listed first. If set to NO (the default) +# the constructors will appear in the respective orders defined by +# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. +# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO +# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. + +SORT_MEMBERS_CTORS_1ST = YES + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) +# the group names will appear in their defined order. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to +# do proper type resolution of all parameters of a function it will reject a +# match between the prototype and the implementation of a member function even +# if there is only one candidate or it is obvious which candidate to choose +# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen +# will still accept a match between prototype and implementation in such cases. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST = YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or macro consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and macros in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = NO + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the +# Folder Tree View (if specified). The default is YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. +# This will remove the Namespaces entry from the Quick Index +# and from the Folder Tree View (if specified). The default is YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. The create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. +# You can optionally specify a file name after the option, if omitted +# DoxygenLayout.xml will be used as the name of the layout file. + +LAYOUT_FILE = DoxygenLayout.xml + +# The CITE_BIB_FILES tag can be used to specify one or more bib files +# containing the references data. This must be a list of .bib files. The +# .bib extension is automatically appended if omitted. Using this command +# requires the bibtex tool to be installed. See also +# http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style +# of the bibliography can be controlled using LATEX_BIB_STYLE. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = NO + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# The WARN_NO_PARAMDOC option can be enabled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# the list of possible encodings. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh +# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py +# *.f90 *.f *.for *.vhd *.vhdl + +FILE_PATTERNS = + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# Note that relative paths are relative to directory from which doxygen is run. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. +# If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. +# Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. +# The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty or if +# non of the patterns match the file name, INPUT_FILTER is applied. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) +# and it is also possible to disable source filtering for a specific pattern +# using *.ext= (so without naming a filter). This option only has effect when +# FILTER_SOURCE_FILES is enabled. + +FILTER_SOURCE_PATTERNS = + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. +# Otherwise they will link to the documentation. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = YES + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 2 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. Note that when using a custom header you are responsible +# for the proper inclusion of any scripts and style sheets that doxygen +# needs, which is dependent on the configuration options used. +# It is adviced to generate a default header using "doxygen -w html +# header.html footer.html stylesheet.css YourConfigFile" and then modify +# that header. Note that the header is subject to change so you typically +# have to redo this when upgrading to a newer version of doxygen or when +# changing the value of configuration settings such as GENERATE_TREEVIEW! + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that +# the files will be copied as-is; there are no commands or markers available. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. +# Doxygen will adjust the colors in the stylesheet and background images +# according to this color. Hue is specified as an angle on a colorwheel, +# see http://en.wikipedia.org/wiki/Hue for more information. +# For instance the value 0 represents red, 60 is yellow, 120 is green, +# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. +# The allowed range is 0 to 359. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of +# the colors in the HTML output. For a value of 0 the output will use +# grayscales only. A value of 255 will produce the most vivid colors. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to +# the luminance component of the colors in the HTML output. Values below +# 100 gradually make the output lighter, whereas values above 100 make +# the output darker. The value divided by 100 is the actual gamma applied, +# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, +# and 100 does not change the gamma. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting +# this to NO can help when comparing the output of multiple runs. + +HTML_TIMESTAMP = YES + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). + +HTML_DYNAMIC_SECTIONS = NO + +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. + +GENERATE_DOCSET = NO + +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) +# can be grouped. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# will append .docset to the name. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# content. + +CHM_INDEX_ENCODING = + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated +# that can be used as input for Qt's qhelpgenerator to generate a +# Qt Compressed Help (.qch) of the generated HTML documentation. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#namespace + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#virtual-folders + +QHP_VIRTUAL_FOLDER = doc + +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to +# add. For more information please see +# http://doc.trolltech.com/qthelpproject.html#custom-filters + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see +# +# Qt Help Project / Custom Filters. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's +# filter section matches. +# +# Qt Help Project / Filter Attributes. + +QHP_SECT_FILTER_ATTRS = + +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files +# will be generated, which together with the HTML files, form an Eclipse help +# plugin. To install this plugin and make it available under the help contents +# menu in Eclipse, the contents of the directory containing the HTML and XML +# files needs to be copied into the plugins directory of eclipse. The name of +# the directory within the plugins directory should be the same as +# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before +# the help appears. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have +# this name. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = NO + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values +# (range [0,1..20]) that doxygen will group on one line in the generated HTML +# documentation. Note that a value of 0 will completely suppress the enum +# values from appearing in the overview section. + +ENUM_VALUES_PER_LINE = 4 + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. +# If the tag value is set to YES, a side panel will be generated +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). +# Windows users are probably better off using the HTML help feature. + +GENERATE_TREEVIEW = NO + +# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, +# and Class Hierarchy pages using a tree view instead of an ordered list. + +USE_INLINE_TREES = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open +# links to external symbols imported via tag files in a separate window. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory +# to force them to be regenerated. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are +# not supported properly for IE 6.0, but are supported on all modern browsers. +# Note that when changing this option you need to delete any form_*.png files +# in the HTML output before the changes have effect. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax +# (see http://www.mathjax.org) which uses client side Javascript for the +# rendering instead of using prerendered bitmaps. Use this if you do not +# have LaTeX installed or if you want to formulas look prettier in the HTML +# output. When enabled you also need to install MathJax separately and +# configure the path to it using the MATHJAX_RELPATH option. + +USE_MATHJAX = NO + +# When MathJax is enabled you need to specify the location relative to the +# HTML output directory using the MATHJAX_RELPATH option. The destination +# directory should contain the MathJax.js script. For instance, if the mathjax +# directory is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the +# mathjax.org site, so you can quickly see the result without installing +# MathJax, but it is strongly recommended to install a local copy of MathJax +# before deployment. + +MATHJAX_RELPATH = http://www.mathjax.org/mathjax + +# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension +# names that should be enabled during MathJax rendering. + +MATHJAX_EXTENSIONS = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box +# for the HTML output. The underlying search engine uses javascript +# and DHTML and should work on any modern browser. Note that when using +# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets +# (GENERATE_DOCSET) there is already a search function so this one should +# typically be disabled. For large projects the javascript based search engine +# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. + +SEARCHENGINE = YES + +# When the SERVER_BASED_SEARCH tag is enabled the search engine will be +# implemented using a PHP enabled web server instead of at the web client +# using Javascript. Doxygen will generate the search PHP script and index +# file to put on the web server. The advantage of the server +# based approach is that it scales better to large projects and allows +# full text search. The disadvantages are that it is more difficult to setup +# and does not have live searching capabilities. + +SERVER_BASED_SEARCH = NO + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = NO + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. +# Note that when enabling USE_PDFLATEX this option is only used for +# generating bitmaps for formulas in the HTML output, but not in the +# Makefile that is written to the output directory. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4wide + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for +# the generated latex document. The footer should contain everything after +# the last chapter. If it is left blank doxygen will generate a +# standard footer. Notice: only use this tag if you know what you are doing! + +LATEX_FOOTER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = YES + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = YES + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +# If LATEX_SOURCE_CODE is set to YES then doxygen will include +# source code with syntax highlighting in the LaTeX output. +# Note that which sources are shown also depends on other settings +# such as SOURCE_BROWSER. + +LATEX_SOURCE_CODE = NO + +# The LATEX_BIB_STYLE tag can be used to specify the style to use for the +# bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See +# http://en.wikipedia.org/wiki/BibTeX for more info. + +LATEX_BIB_STYLE = plain + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. +# This is useful +# if you want to understand what is going on. +# On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = YES + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + +EXPAND_ONLY_PREDEF = YES + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# pointed to by INCLUDE_PATH will be searched when a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = __declspec(x)= AMQPCLIENT_LINKAGE= METHOD_DECL= + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition that +# overrules the definition found in the source code. + +EXPAND_AS_DEFINED = AMQP_DECLARE_EXCEPTION_CLASS + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all references to function-like macros +# that are alone on a line, have an all uppercase name, and do not end with a +# semicolon, because these will confuse the parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option also works with HAVE_DOT disabled, but it is recommended to +# install and use dot, since it yields more powerful graphs. + +CLASS_DIAGRAMS = YES + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = NO + +# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is +# allowed to run in parallel. When set to 0 (the default) doxygen will +# base this on the number of processors available in the system. You can set it +# explicitly to a value larger than 0 to get control over the balance +# between CPU load and processing speed. + +DOT_NUM_THREADS = 0 + +# By default doxygen will use the Helvetica font for all dot files that +# doxygen generates. When you want a differently looking font you can specify +# the font name using DOT_FONTNAME. You need to make sure dot is able to find +# the font, which can be done by putting it in a standard location or by setting +# the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the +# directory containing the font. + +DOT_FONTNAME = Helvetica + +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The default size is 10pt. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the Helvetica font. +# If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to +# set the path where dot can find it. + +DOT_FONTPATH = + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = YES + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = NO + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs +# for selected functions only using the \callgraph command. + +CALL_GRAPH = NO + +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller +# graphs for selected functions only using the \callergraph command. + +CALLER_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will generate a graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = YES + +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are svg, png, jpg, or gif. +# If left blank png will be used. If you choose svg you need to set +# HTML_FILE_EXTENSION to xhtml in order to make the SVG files +# visible in IE 9+ (other browsers do not have this requirement). + +DOT_IMAGE_FORMAT = png + +# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to +# enable generation of interactive SVG images that allow zooming and panning. +# Note that this requires a modern browser other than Internet Explorer. +# Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you +# need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files +# visible. Older versions of IE do not have SVG support. + +INTERACTIVE_SVG = NO + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The MSCFILE_DIRS tag can be used to specify one or more directories that +# contain msc files that are included in the documentation (see the +# \mscfile command). + +MSCFILE_DIRS = + +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. + +DOT_GRAPH_MAX_NODES = 50 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of +# a graph (i.e. they become hard to read). + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = NO + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/DoxygenLayout.xml b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/DoxygenLayout.xml new file mode 100644 index 000000000..8a192f34d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/DoxygenLayout.xml @@ -0,0 +1,188 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/IConnectionInt.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/IConnectionInt.h new file mode 100644 index 000000000..278e808cd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/IConnectionInt.h @@ -0,0 +1,52 @@ +/* + * Created on: May 8, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef ICONNECTIONINT_H_ +#define ICONNECTIONINT_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief This interface abstracts the calls to AMQP_ConnectionXXX c-api calls + *

+ * AMQConnection objects pass weak references to themselves to AMQChannel objects + * allowing them to make calls against the channel that require the connection handle. + */ +struct __declspec(novtable) IConnectionInt : public ICafObject { + + /** + * @brief Pass-through for the AMQP_ConnectionOpenChannel call + * @param channel the channel handle to be returned + * @return the AMQPStatus of the call. If AMQP_ERROR_OK then + * channel will be set to a valid channel handle. + */ + virtual AMQPStatus amqpConnectionOpenChannel(SmartPtrCAmqpChannel& channel) = 0; + + /** + * @brief Callback to notify the connection that a channel has been closed. This + * is in reponse to the server sending a channel.close method. + * @param channelNumber the channel number + */ + virtual void notifyChannelClosedByServer(const uint16 channelNumber) = 0; + + /** + * @brief Callback to notify the connection that a channel is being + * requested to close. + * @param channel Channel to close + */ + virtual void channelCloseChannel(Channel *channel) = 0; + +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(IConnectionInt); + +}} + +#endif /* ICONNECTIONINT_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/IRpcContinuation.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/IRpcContinuation.h new file mode 100644 index 000000000..0b543f362 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/IRpcContinuation.h @@ -0,0 +1,42 @@ +/* + * Created on: May 15, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef IRPCCONTINUATION_H_ +#define IRPCCONTINUATION_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Interface for RPC worker objects + *

+ * The channel worker thread will assemble incoming AMQP frames an then process + * the compiled frames as an AMQCommand object. If the command object belongs + * to an outstanding RPC call, that call will receive the command for processing. + */ +struct __declspec(novtable) IRpcContinuation : public ICafObject { + /** + * @brief Process the received AMQP command + * @param command the AMQCommand command object + */ + virtual void handleCommand(const SmartPtrAMQCommand& command) = 0; + + /** + * @brief Abort the command for the reason supplied + * @param exception the reason as an exception + */ + virtual void handleAbort(SmartPtrCCafException exception) = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(IRpcContinuation); + +}} + + +#endif /* IRPCCONTINUATION_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/TCopyOnWriteContainer.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/TCopyOnWriteContainer.h new file mode 100644 index 000000000..d8e4821e1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/TCopyOnWriteContainer.h @@ -0,0 +1,74 @@ +/* + * Created on: May 21, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef TCOPYONWRITECONTAINER_H_ +#define TCOPYONWRITECONTAINER_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief An STL container wrapper that implements copy-on-write semantics + */ +template +class TCopyOnWriteContainer { +public: + typedef TCafSmartPtr > SmartPtrContainer; + + TCopyOnWriteContainer() { + _container.CreateInstance(); + } + + SmartPtrContainer getAll() { + return _container; + } + + void add(const ValueType& value) { + SmartPtrContainer newContainer; + newContainer.CreateInstance(); + newContainer->insert( + newContainer->begin(), + _container->begin(), + _container->end()); + newContainer->push_back(value); + _container = newContainer; + } + + bool remove(const ValueType& value) { + bool found = false; + SmartPtrContainer newContainer; + newContainer.CreateInstance(); + SmartPtrContainer currContainer = _container; + for (typename Container::const_iterator iter = currContainer->begin(); + iter != currContainer->end(); + ++iter) { + if (*iter == value) { + found = true; + } else { + newContainer->push_back(*iter); + } + } + + if (found) { + _container = newContainer; + } + return found; + } + + void clear() { + _container.CreateInstance(); + } + +private: + SmartPtrContainer _container; +}; + +}} + +#endif /* TCOPYONWRITECONTAINER_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpClient.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpClient.cpp new file mode 100644 index 000000000..71bfcf2aa --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpClient.cpp @@ -0,0 +1,34 @@ +/* + * Created on: May 2, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" + +namespace Caf { +namespace AmqpClient { + const char* DEFAULT_USER = "guest"; + const char* DEFAULT_PASS ="guest"; + const char* DEFAULT_VHOST = "/"; + const char* DEFAULT_PROTOCOL = "amqp"; + const char* DEFAULT_HOST = "localhost"; +}} + +#ifdef WIN32 +extern "C" BOOL APIENTRY DllMain(HINSTANCE hModule, uint32 dwReason, LPVOID) +{ + return TRUE; +} +#endif + +/** + * @todo Make number of frames processed per thread slice configurable + * @todo Make # threads in the connection thrad pool configurable + * @todo Make thread pool refresh rate configurable + * @todo Create stats module so we can figure out how to turn performance + */ +class amqpClientTodo { +}; diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/AMQExceptions.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/AMQExceptions.cpp new file mode 100644 index 000000000..5cef73cfc --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/AMQExceptions.cpp @@ -0,0 +1,35 @@ +/* + * Created on: May 3, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "../api/AMQExceptions.h" + +using namespace Caf::AmqpClient::AmqpExceptions; + +AMQP_CM_DEFINE_EXCEPTION_CLASS(AmqpException); +AMQP_CM_DEFINE_EXCEPTION_CLASS(AmqpTimeoutException); +AMQP_CM_DEFINE_EXCEPTION_CLASS(AmqpNoMemoryException); +AMQP_CM_DEFINE_EXCEPTION_CLASS(AmqpInvalidHandleException); +AMQP_CM_DEFINE_EXCEPTION_CLASS(AmqpInvalidArgumentException); +AMQP_CM_DEFINE_EXCEPTION_CLASS(AmqpWrongStateException); +AMQP_CM_DEFINE_EXCEPTION_CLASS(AmqpTooManyChannelsException); +AMQP_CM_DEFINE_EXCEPTION_CLASS(AmqpQueueFullException); +AMQP_CM_DEFINE_EXCEPTION_CLASS(AmqpFrameTooLargeException); +AMQP_CM_DEFINE_EXCEPTION_CLASS(AmqpIoErrorException); +AMQP_CM_DEFINE_EXCEPTION_CLASS(AmqpProtocolErrorException); +AMQP_CM_DEFINE_EXCEPTION_CLASS(AmqpUnimplementedException); +AMQP_CM_DEFINE_EXCEPTION_CLASS(AmqpIoInterruptedException); +AMQP_CM_DEFINE_EXCEPTION_CLASS(UnexpectedFrameException); +AMQP_CM_DEFINE_EXCEPTION_CLASS(UnknownClassOrMethodException); +AMQP_CM_DEFINE_EXCEPTION_CLASS(ConnectionClosedException); +AMQP_CM_DEFINE_EXCEPTION_CLASS(ChannelClosedException); +AMQP_CM_DEFINE_EXCEPTION_CLASS(ConnectionUnexpectedCloseException); +AMQP_CM_DEFINE_EXCEPTION_CLASS(ConnectionClosedByIOException); +AMQP_CM_DEFINE_EXCEPTION_CLASS(ChannelClosedByServerException); +AMQP_CM_DEFINE_EXCEPTION_CLASS(ChannelClosedByShutdownException); +AMQP_CM_DEFINE_EXCEPTION_CLASS(ChannelClosedByUserException); diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/AMQPImpl.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/AMQPImpl.cpp new file mode 100644 index 000000000..5f0929769 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/AMQPImpl.cpp @@ -0,0 +1,88 @@ +/* + * Created on: May 10, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "AMQPImpl.h" +#include "amqpImplInt.h" + +namespace Caf { namespace AmqpClient { +typedef Caf::AmqpClient::SmartPtrIMethod (*FN_CREATOR)(); +typedef std::map MethodCreatorMap; +typedef MethodCreatorMap::value_type creatorEntry; +}} + +using namespace Caf::AmqpClient; + +const creatorEntry creatorEntries[] = { + creatorEntry(AMQP_BASIC_GET_OK_METHOD, BasicGetOkMethod::Creator), + creatorEntry(AMQP_BASIC_GET_EMPTY_METHOD, BasicGetEmptyMethod::Creator), + creatorEntry(AMQP_BASIC_CONSUME_OK_METHOD, BasicConsumeOkMethod::Creator), + creatorEntry(AMQP_BASIC_DELIVER_METHOD, BasicDeliverMethod::Creator), + creatorEntry(AMQP_BASIC_CANCEL_OK_METHOD, BasicCancelOkMethod::Creator), + creatorEntry(AMQP_BASIC_RETURN_METHOD, BasicReturnMethod::Creator), + creatorEntry(AMQP_BASIC_RECOVER_OK_METHOD, BasicRecoverOkMethod::Creator), + creatorEntry(AMQP_BASIC_QOS_OK_METHOD, BasicQosOkMethod::Creator), + creatorEntry(AMQP_CHANNEL_OPEN_OK_METHOD, ChannelOpenOkMethod::Creator), + creatorEntry(AMQP_CHANNEL_CLOSE_OK_METHOD, ChannelCloseOkFromServerMethod::Creator), + creatorEntry(AMQP_CHANNEL_CLOSE_METHOD, ChannelCloseMethod::Creator), + creatorEntry(AMQP_EXCHANGE_DECLARE_OK_METHOD, ExchangeDeclareOkMethod::Creator), + creatorEntry(AMQP_EXCHANGE_DELETE_OK_METHOD, ExchangeDeleteOkMethod::Creator), + creatorEntry(AMQP_QUEUE_DECLARE_OK_METHOD, QueueDeclareOkMethod::Creator), + creatorEntry(AMQP_QUEUE_DELETE_OK_METHOD, QueueDeleteOkMethod::Creator), + creatorEntry(AMQP_QUEUE_PURGE_OK_METHOD, QueuePurgeOkMethod::Creator), + creatorEntry(AMQP_QUEUE_BIND_OK_METHOD, QueueBindOkMethod::Creator), + creatorEntry(AMQP_QUEUE_UNBIND_OK_METHOD, QueueUnbindOkMethod::Creator) + }; + +const MethodCreatorMap creatorMap( + creatorEntries, + creatorEntries + (sizeof(creatorEntries)/sizeof(creatorEntries[0]))); + +SmartPtrIMethod AMQPImpl::methodFromFrame(const amqp_method_t * const method) { + CAF_CM_STATIC_FUNC("AMQPImpl", "methodFromFrame"); + CAF_CM_VALIDATE_PTR(method); + + SmartPtrIMethod methodObj; + MethodCreatorMap::const_iterator methodCreator = creatorMap.find(method->id); + if (methodCreator != creatorMap.end()) { + methodObj = (*(methodCreator->second))(); + } else { + const uint16 classId = (uint16)((method->id & 0xffff0000) >> 16); + const uint16 methodId = (uint16)(method->id & 0x0000ffff); + CAF_CM_EXCEPTIONEX_VA2( + AmqpExceptions::UnknownClassOrMethodException, + 0, + "[class=0x%04X][id=0x%04X]", + classId, + methodId); + } + methodObj->init(method); + return methodObj; +} + +SmartPtrIContentHeader AMQPImpl::headerFromFrame( + const SmartPtrCAmqpFrame& frame) { + CAF_CM_STATIC_FUNC("AMQPImpl", "headerFromFrame"); + CAF_CM_VALIDATE_PTR(frame); + + SmartPtrIContentHeader header; + if (frame->getHeaderClassId() == AMQP_BASIC_CLASS) { + SmartPtrBasicProperties propsObj; + propsObj.CreateInstance(); + propsObj->init(frame); + header = propsObj; + } else { + CAF_CM_EXCEPTIONEX_VA1( + AmqpExceptions::UnknownClassOrMethodException, + 0, + "[class=0x%04X]", + frame->getHeaderClassId()); + } + + return header; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/AMQPImpl.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/AMQPImpl.h new file mode 100644 index 000000000..db34801d0 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/AMQPImpl.h @@ -0,0 +1,39 @@ +/* + * Created on: May 10, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPIMPL_H_ +#define AMQPIMPL_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief A set of helpers to convert c-api data structures into C++ objects + */ +class AMQPImpl { +public: + /** + * @brief Convert a c-api method structure into the appropriate IMethod object + * @param method c-api method data + * @return IMethod object + */ + static SmartPtrIMethod methodFromFrame(const amqp_method_t * const method); + + /** + * @brief Convert a c-api properties structure into the appropriate IContentHedaer object + * @param properties c-api properties data + * @return IContentHeader object + */ + static SmartPtrIContentHeader headerFromFrame(const SmartPtrCAmqpFrame& frame); +}; + +}} + +#endif /* AMQPIMPL_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/AmqpClientImpl.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/AmqpClientImpl.cpp new file mode 100644 index 000000000..41223c799 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/AmqpClientImpl.cpp @@ -0,0 +1,178 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" + +using namespace Caf; +using namespace Caf::AmqpClient; + +void tableAddField( + const std::string key, + const AmqpClient::Field::AmqpFieldType type, + GVariant* variant, + AmqpClient::SmartPtrTable& table) { + CAF_CM_STATIC_FUNC_LOG("AmqpClient", "tableAddField"); + CAF_CM_VALIDATE_STRING(key); + CAF_CM_VALIDATE_PTR(variant); + CAF_CM_VALIDATE_SMARTPTR(table); + + AmqpClient::SmartPtrFieldImpl field; + field.CreateInstance(); + field->setTypeAndValue(type, variant); + if (!table->insert(std::make_pair(key, field)).second) { + g_variant_unref(variant); + CAF_CM_EXCEPTIONEX_VA1( + DuplicateElementException, + 0, + "Duplicate table entry '%s'", + key.c_str()); + } +} + +void AmqpClient::tableAddBoolean( + const std::string key, + const bool val, + SmartPtrTable& table) { + tableAddField( + key, + AmqpClient::Field::AMQP_FIELD_TYPE_BOOLEAN, + g_variant_new_boolean(val), + table); +} + +void AmqpClient::tableAddInt8( + const std::string key, + const int8 val, + SmartPtrTable& table) { + tableAddField( + key, + AmqpClient::Field::AMQP_FIELD_TYPE_I8, + g_variant_new_byte(val), + table); +} + +void AmqpClient::tableAddUint8( + const std::string key, + const uint8 val, + SmartPtrTable& table) { + tableAddField( + key, + AmqpClient::Field::AMQP_FIELD_TYPE_U8, + g_variant_new_byte(val), + table); +} + +void AmqpClient::tableAddInt16( + const std::string key, + const int16 val, + SmartPtrTable& table) { + tableAddField( + key, + AmqpClient::Field::AMQP_FIELD_TYPE_I16, + g_variant_new_int16(val), + table); +} + +void AmqpClient::tableAddUint16( + const std::string key, + const uint16 val, + SmartPtrTable& table) { + tableAddField( + key, + AmqpClient::Field::AMQP_FIELD_TYPE_U16, + g_variant_new_uint16(val), + table); +} + +void AmqpClient::tableAddInt32( + const std::string key, + const int32 val, + SmartPtrTable& table) { + tableAddField( + key, + AmqpClient::Field::AMQP_FIELD_TYPE_I32, + g_variant_new_int32(val), + table); +} + +void AmqpClient::tableAddUint32( + const std::string key, + const uint32 val, + SmartPtrTable& table) { + tableAddField( + key, + AmqpClient::Field::AMQP_FIELD_TYPE_U32, + g_variant_new_uint32(val), + table); +} + +void AmqpClient::tableAddInt64( + const std::string key, + const int64 val, + SmartPtrTable& table) { + tableAddField( + key, + AmqpClient::Field::AMQP_FIELD_TYPE_I64, + g_variant_new_int64(val), + table); +} + +void AmqpClient::tableAddUint64( + const std::string key, + const uint64 val, + SmartPtrTable& table) { + tableAddField( + key, + AmqpClient::Field::AMQP_FIELD_TYPE_U64, + g_variant_new_uint64(val), + table); +} + +void AmqpClient::tableAddFloat( + const std::string key, + const float val, + SmartPtrTable& table) { + tableAddField( + key, + AmqpClient::Field::AMQP_FIELD_TYPE_F32, + g_variant_new_double(val), + table); +} + +void AmqpClient::tableAddDouble( + const std::string key, + const double val, + SmartPtrTable& table) { + tableAddField( + key, + AmqpClient::Field::AMQP_FIELD_TYPE_F64, + g_variant_new_double(val), + table); +} + +void AmqpClient::tableAddUtf8( + const std::string key, + const std::string& val, + SmartPtrTable& table) { + tableAddField( + key, + AmqpClient::Field::AMQP_FIELD_TYPE_UTF8, + g_variant_new_string(val.c_str()), + table); +} + +void AmqpClient::tableAddTimestamp( + const std::string key, + const uint64 val, + SmartPtrTable& table) { + tableAddField( + key, + AmqpClient::Field::AMQP_FIELD_TYPE_TIMESTAMP, + g_variant_new_uint64(val), + table); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/AmqpContentHeadersImpl.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/AmqpContentHeadersImpl.cpp new file mode 100644 index 000000000..304d2b9a5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/AmqpContentHeadersImpl.cpp @@ -0,0 +1,74 @@ +/* + * Created on: May 15, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" + +using namespace Caf::AmqpClient; + +const uint32 AmqpContentHeaders::BASIC_PROPERTY_CONTENT_TYPE_FLAG = 0x8000; +const uint32 AmqpContentHeaders::BASIC_PROPERTY_CONTENT_ENCODING_FLAG = 0x4000; +const uint32 AmqpContentHeaders::BASIC_PROPERTY_HEADERS_FLAG = 0x2000; +const uint32 AmqpContentHeaders::BASIC_PROPERTY_DEVLIVERY_MODE_FLAG = 0x1000; +const uint32 AmqpContentHeaders::BASIC_PROPERTY_PRIORITY_FLAG = 0x800; +const uint32 AmqpContentHeaders::BASIC_PROPERTY_CORRELATION_ID_FLAG = 0x400; +const uint32 AmqpContentHeaders::BASIC_PROPERTY_REPLY_TO_FLAG = 0x200; +const uint32 AmqpContentHeaders::BASIC_PROPERTY_EXPIRATION_FLAG = 0x100; +const uint32 AmqpContentHeaders::BASIC_PROPERTY_MESSAGE_ID_FLAG = 0x80; +const uint32 AmqpContentHeaders::BASIC_PROPERTY_TIMESTAMP_FLAG = 0x40; +const uint32 AmqpContentHeaders::BASIC_PROPERTY_TYPE_FLAG = 0x20; +const uint32 AmqpContentHeaders::BASIC_PROPERTY_USER_ID_FLAG = 0x10; +const uint32 AmqpContentHeaders::BASIC_PROPERTY_APP_ID_FLAG = 0x8; +const uint32 AmqpContentHeaders::BASIC_PROPERTY_CLUSTER_ID_FLAG = 0x4; + +AmqpContentHeaders::SmartPtrBasicProperties AmqpContentHeaders::createBasicProperties() { + Caf::AmqpClient::SmartPtrBasicProperties props; + props.CreateInstance(); + props->init(); + SmartPtrBasicProperties result; + result.QueryInterface(props); + return result; +} + +AmqpContentHeaders::SmartPtrBasicProperties AmqpContentHeaders::createBasicProperties( + const uint32 flags, + const std::string& contentType, + const std::string& contentEncoding, + const SmartPtrTable& headers, + const uint8 deliveryMode, + const uint8 priority, + const std::string& correlationId, + const std::string& replyTo, + const std::string& expiration, + const std::string& messageId, + const uint64 timestamp, + const std::string& type, + const std::string& userId, + const std::string& appId, + const std::string& clusterId) { + Caf::AmqpClient::SmartPtrBasicProperties props; + props.CreateInstance(); + props->init( + flags, + contentType, + contentEncoding, + headers, + deliveryMode, + priority, + correlationId, + replyTo, + expiration, + messageId, + timestamp, + type, + userId, + appId, + clusterId); + SmartPtrBasicProperties result; + result.QueryInterface(props); + return result; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicAckMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicAckMethod.cpp new file mode 100644 index 000000000..2e5f26b36 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicAckMethod.cpp @@ -0,0 +1,46 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "BasicAckMethod.h" + +using namespace Caf::AmqpClient; + +BasicAckMethod::BasicAckMethod() : + _isInitialized(false), + _deliveryTag(0), + _ackMultiple(false), + CAF_CM_INIT("BasicAckMethod") { +} + +BasicAckMethod::~BasicAckMethod() { +} + +void BasicAckMethod::init( + const uint64 deliveryTag, + const bool ackMultiple) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _deliveryTag = deliveryTag; + _ackMultiple = ackMultiple; + _isInitialized = true; +} + +std::string BasicAckMethod::getMethodName() const { + return "basic.ack"; +} + +AMQPStatus BasicAckMethod::send(const SmartPtrCAmqpChannel& channel) { + CAF_CM_FUNCNAME_VALIDATE("send"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return AmqpUtil::AMQP_BasicAck( + channel, + _deliveryTag, + _ackMultiple); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicAckMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicAckMethod.h new file mode 100644 index 000000000..fecf44fc8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicAckMethod.h @@ -0,0 +1,50 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef BASICACKMETHOD_H_ +#define BASICACKMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP basic.ack + */ +class BasicAckMethod :public IServerMethod { +public: + BasicAckMethod(); + virtual ~BasicAckMethod(); + + /** + * @brief Initialize the method + * @param deliveryTag delivery tag + * @param ackMultiple acknowledge multiple flag + */ + void init( + const uint64 deliveryTag, + const bool ackMultiple); + +public: // IServerMethod + std::string getMethodName() const; + + AMQPStatus send(const SmartPtrCAmqpChannel& channel); + +private: + bool _isInitialized; + uint64 _deliveryTag; + bool _ackMultiple; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(BasicAckMethod); +}; +CAF_DECLARE_SMART_POINTER(BasicAckMethod); + +}} + +#endif /* BASICACKMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicCancelMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicCancelMethod.cpp new file mode 100644 index 000000000..7b41501e7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicCancelMethod.cpp @@ -0,0 +1,40 @@ +/* + * Created on: May 21, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "BasicCancelMethod.h" + +using namespace Caf::AmqpClient; + +BasicCancelMethod::BasicCancelMethod() : + _isInitialized(false), + CAF_CM_INIT("BasicCancelMethod") { +} + +BasicCancelMethod::~BasicCancelMethod() { +} + +void BasicCancelMethod::init( + const std::string& consumerTag) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _consumerTag = consumerTag; + _isInitialized = true; +} + +std::string BasicCancelMethod::getMethodName() const { + return "basic.cancel"; +} + +AMQPStatus BasicCancelMethod::send(const SmartPtrCAmqpChannel& channel) { + CAF_CM_FUNCNAME_VALIDATE("send"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return AmqpUtil::AMQP_BasicCancel(channel, _consumerTag, false); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicCancelMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicCancelMethod.h new file mode 100644 index 000000000..bbc601aef --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicCancelMethod.h @@ -0,0 +1,48 @@ +/* + * Created on: May 21, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef BASICCANCELMETHOD_H_ +#define BASICCANCELMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP basic.cancel + */ +class BasicCancelMethod : public IServerMethod { +public: + BasicCancelMethod(); + virtual ~BasicCancelMethod(); + + /** + * @brief Initialize the method + * @param consumerTag the consumer tag associated with the consumer + */ + void init( + const std::string& consumerTag); + +public: // IServerMethod + std::string getMethodName() const; + + AMQPStatus send(const SmartPtrCAmqpChannel& channel); + +private: + bool _isInitialized; + std::string _consumerTag; + + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(BasicCancelMethod); +}; +CAF_DECLARE_SMART_POINTER(BasicCancelMethod); + +}} + +#endif /* BASICCANCELMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicCancelOkMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicCancelOkMethod.cpp new file mode 100644 index 000000000..350179835 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicCancelOkMethod.cpp @@ -0,0 +1,32 @@ +/* + * Created on: May 21, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "BasicCancelOkMethod.h" + +using namespace Caf::AmqpClient; + +BasicCancelOkMethod::BasicCancelOkMethod() : + CAF_CM_INIT("BasicCancelOkMethod") { +} + +BasicCancelOkMethod::~BasicCancelOkMethod() { +} + +void BasicCancelOkMethod::init(const amqp_method_t * const method) { + CAF_CM_FUNCNAME("init"); + CAF_CM_VALIDATE_PTR(method); + CAF_CM_ASSERT(AMQP_BASIC_CANCEL_OK_METHOD == method->id); + const amqp_basic_cancel_ok_t * const decoded = + reinterpret_cast(method->decoded); + _consumerTag = AMQUtil::amqpBytesToString(&decoded->consumer_tag); +} + +std::string BasicCancelOkMethod::getConsumerTag() { + return _consumerTag; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicCancelOkMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicCancelOkMethod.h new file mode 100644 index 000000000..210eca512 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicCancelOkMethod.h @@ -0,0 +1,48 @@ +/* + * Created on: May 21, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef BASICCANCELOKMETHOD_H_ +#define BASICCANCELOKMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP basic.cancel-ok + */ +class BasicCancelOkMethod : + public TMethodImpl, + public AmqpMethods::Basic::CancelOk { + METHOD_DECL( + AmqpMethods::Basic::CancelOk, + AMQP_BASIC_CANCEL_OK_METHOD, + "basic.cancel-ok", + false) + +public: + BasicCancelOkMethod(); + virtual ~BasicCancelOkMethod(); + +public: // IMethod + void init(const amqp_method_t * const method); + +public: // AmqpMethods::Basic::CancelOk + std::string getConsumerTag(); + +private: + std::string _consumerTag; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(BasicCancelOkMethod); +}; +CAF_DECLARE_SMART_QI_POINTER(BasicCancelOkMethod); + +}} + +#endif /* BASICCANCELOKMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicConsumeMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicConsumeMethod.cpp new file mode 100644 index 000000000..73652c767 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicConsumeMethod.cpp @@ -0,0 +1,59 @@ +/* + * Created on: May 21, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "BasicConsumeMethod.h" + +using namespace Caf::AmqpClient; + +BasicConsumeMethod::BasicConsumeMethod() : + _isInitialized(false), + _noLocal(false), + _noAck(false), + _exclusive(false), + CAF_CM_INIT("BasicConsumeMethod") { +} + +BasicConsumeMethod::~BasicConsumeMethod() { +} + +void BasicConsumeMethod::init( + const std::string& queue, + const std::string& consumerTag, + const bool noLocal, + const bool noAck, + const bool exclusive, + const SmartPtrTable& arguments) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _queue = queue; + _consumerTag = consumerTag; + _noLocal = noLocal; + _noAck = noAck; + _exclusive = exclusive; + _isInitialized = true; +} + +std::string BasicConsumeMethod::getMethodName() const { + return "basic.consume"; +} + +AMQPStatus BasicConsumeMethod::send(const SmartPtrCAmqpChannel& channel) { + CAF_CM_FUNCNAME_VALIDATE("send"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return AmqpUtil::AMQP_BasicConsume( + channel, + _queue, + _consumerTag, + _noLocal, + _noAck, + _exclusive, + false, + NULL); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicConsumeMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicConsumeMethod.h new file mode 100644 index 000000000..2af015cb7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicConsumeMethod.h @@ -0,0 +1,61 @@ +/* + * Created on: May 21, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef BASICCONSUMEMETHOD_H_ +#define BASICCONSUMEMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP basic.consume + */ +class BasicConsumeMethod : public IServerMethod { +public: + BasicConsumeMethod(); + virtual ~BasicConsumeMethod(); + + /** + * @brief Initialize the method + * @param queue queue name + * @param consumerTag consumer tag (or blank for server-generated tag) + * @param noLocal do not send messages to the connection that published them + * @param noAck no acknowledgement needed + * @param exclusive request exclusive consumer access to the queue + * @param arguments additional call arguments + */ + void init( + const std::string& queue, + const std::string& consumerTag, + const bool noLocal, + const bool noAck, + const bool exclusive, + const SmartPtrTable& arguments); + +public: // IServerMethod + std::string getMethodName() const; + + AMQPStatus send(const SmartPtrCAmqpChannel& channel); + +private: + bool _isInitialized; + std::string _queue; + std::string _consumerTag; + bool _noLocal; + bool _noAck; + bool _exclusive; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(BasicConsumeMethod); +}; +CAF_DECLARE_SMART_POINTER(BasicConsumeMethod); + +}} + +#endif /* BASICCONSUMEMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicConsumeOkMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicConsumeOkMethod.cpp new file mode 100644 index 000000000..6c3c53a11 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicConsumeOkMethod.cpp @@ -0,0 +1,32 @@ +/* + * Created on: May 21, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "BasicConsumeOkMethod.h" + +using namespace Caf::AmqpClient; + +BasicConsumeOkMethod::BasicConsumeOkMethod() : + CAF_CM_INIT("BasicConsumeOkMethod") { +} + +BasicConsumeOkMethod::~BasicConsumeOkMethod() { +} + +void BasicConsumeOkMethod::init(const amqp_method_t * const method) { + CAF_CM_FUNCNAME("init"); + CAF_CM_VALIDATE_PTR(method); + CAF_CM_ASSERT(AMQP_BASIC_CONSUME_OK_METHOD == method->id); + const amqp_basic_consume_ok_t * const decoded = + reinterpret_cast(method->decoded); + _consumerTag = AMQUtil::amqpBytesToString(&decoded->consumer_tag); +} + +std::string BasicConsumeOkMethod::getConsumerTag() { + return _consumerTag; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicConsumeOkMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicConsumeOkMethod.h new file mode 100644 index 000000000..ed75f29b8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicConsumeOkMethod.h @@ -0,0 +1,48 @@ +/* + * Created on: May 21, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef BASICCONSUMEOKMETHOD_H_ +#define BASICCONSUMEOKMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP basic.consume-ok + */ +class BasicConsumeOkMethod : + public TMethodImpl, + public AmqpMethods::Basic::ConsumeOk { + METHOD_DECL( + AmqpMethods::Basic::ConsumeOk, + AMQP_BASIC_CONSUME_OK_METHOD, + "basic.consume-ok", + false) + +public: + BasicConsumeOkMethod(); + virtual ~BasicConsumeOkMethod(); + +public: // IMethod + void init(const amqp_method_t * const method); + +public: // AmqpMethods::Basic::ConsumeOk + std::string getConsumerTag(); + +private: + std::string _consumerTag; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(BasicConsumeOkMethod); +}; +CAF_DECLARE_SMART_QI_POINTER(BasicConsumeOkMethod); + +}} + +#endif /* BASICCONSUMEOKMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicDeliverMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicDeliverMethod.cpp new file mode 100644 index 000000000..eb12fae39 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicDeliverMethod.cpp @@ -0,0 +1,54 @@ +/* + * Created on: May 21, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "BasicDeliverMethod.h" + +using namespace Caf::AmqpClient; + +BasicDeliverMethod::BasicDeliverMethod() : + _deliveryTag(0), + _redelivered(false), + CAF_CM_INIT("BasicDeliverMethod") { +} + +BasicDeliverMethod::~BasicDeliverMethod() { +} + +void BasicDeliverMethod::init(const amqp_method_t * const method) { + CAF_CM_FUNCNAME("init"); + CAF_CM_VALIDATE_PTR(method); + CAF_CM_ASSERT(AMQP_BASIC_DELIVER_METHOD == method->id); + const amqp_basic_deliver_t * const decoded = + reinterpret_cast(method->decoded); + _consumerTag = AMQUtil::amqpBytesToString(&decoded->consumer_tag); + _deliveryTag = decoded->delivery_tag; + _exchange = AMQUtil::amqpBytesToString(&decoded->exchange); + _redelivered = decoded->redelivered; + _routingKey = AMQUtil::amqpBytesToString(&decoded->routing_key); +} + +std::string BasicDeliverMethod::getConsumerTag() { + return _consumerTag; +} + +uint64 BasicDeliverMethod::getDeliveryTag() { + return _deliveryTag; +} + +std::string BasicDeliverMethod::getExchange() { + return _exchange; +} + +bool BasicDeliverMethod::getRedelivered() { + return _redelivered; +} + +std::string BasicDeliverMethod::getRoutingKey() { + return _routingKey; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicDeliverMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicDeliverMethod.h new file mode 100644 index 000000000..b64faca69 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicDeliverMethod.h @@ -0,0 +1,56 @@ +/* + * Created on: May 21, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef BASICDELIVERMETHOD_H_ +#define BASICDELIVERMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP basic.deliver + */ +class BasicDeliverMethod : + public TMethodImpl, + public AmqpMethods::Basic::Deliver { + METHOD_DECL( + AmqpMethods::Basic::Deliver, + AMQP_BASIC_DELIVER_METHOD, + "basic.deliver", + true) + +public: + BasicDeliverMethod(); + virtual ~BasicDeliverMethod(); + +public: // IMethod + void init(const amqp_method_t * const method); + +public: // AmqpMethods::Basic::Deliver + std::string getConsumerTag(); + uint64 getDeliveryTag(); + std::string getExchange(); + bool getRedelivered(); + std::string getRoutingKey(); + +private: + std::string _consumerTag; + uint64 _deliveryTag; + std::string _exchange; + bool _redelivered; + std::string _routingKey; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(BasicDeliverMethod); +}; +CAF_DECLARE_SMART_QI_POINTER(BasicDeliverMethod); + +}} + +#endif /* BASICDELIVERMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicGetEmptyMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicGetEmptyMethod.cpp new file mode 100644 index 000000000..b90c23cd1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicGetEmptyMethod.cpp @@ -0,0 +1,25 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "BasicGetEmptyMethod.h" + +using namespace Caf::AmqpClient; + +BasicGetEmptyMethod::BasicGetEmptyMethod() : + CAF_CM_INIT("BasicGetEmptyMethod") { +} + +BasicGetEmptyMethod::~BasicGetEmptyMethod() { +} + +void BasicGetEmptyMethod::init(const amqp_method_t * const method) { + CAF_CM_FUNCNAME("init"); + CAF_CM_VALIDATE_PTR(method); + CAF_CM_ASSERT(AMQP_BASIC_GET_EMPTY_METHOD == method->id); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicGetEmptyMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicGetEmptyMethod.h new file mode 100644 index 000000000..cfe851658 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicGetEmptyMethod.h @@ -0,0 +1,46 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef BASICGETEMPTYMETHOD_H_ +#define BASICGETEMPTYMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP basic.get-empty + */ +class BasicGetEmptyMethod : + public TMethodImpl, + public AmqpMethods::Basic::GetEmpty { + METHOD_DECL( + AmqpMethods::Basic::GetEmpty, + AMQP_BASIC_GET_EMPTY_METHOD, + "basic.get-empty", + false) + +public: + BasicGetEmptyMethod(); + virtual ~BasicGetEmptyMethod(); + +public: // IMethod + void init(const amqp_method_t * const method); + +public: // AmqpMethods::Basic::GetEmpty + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(BasicGetEmptyMethod); +}; +CAF_DECLARE_SMART_QI_POINTER(BasicGetEmptyMethod); + +}} + +#endif /* BASICGETEMPTYMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicGetMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicGetMethod.cpp new file mode 100644 index 000000000..644b78508 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicGetMethod.cpp @@ -0,0 +1,43 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "BasicGetMethod.h" + +using namespace Caf::AmqpClient; + +BasicGetMethod::BasicGetMethod() : + _isInitialized(false), + _noAck(false), + CAF_CM_INIT("BasicGetMethod") { +} + +BasicGetMethod::~BasicGetMethod() { +} + +void BasicGetMethod::init( + const std::string& queue, + const bool noAck) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _queue = queue; + _noAck = noAck; + _isInitialized = true; +} + +std::string BasicGetMethod::getMethodName() const { + return "basic.get"; +} + +AMQPStatus BasicGetMethod::send(const SmartPtrCAmqpChannel& channel) { + CAF_CM_FUNCNAME_VALIDATE("send"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return AmqpUtil::AMQP_BasicGet(channel, _queue, _noAck); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicGetMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicGetMethod.h new file mode 100644 index 000000000..9b4abb6ef --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicGetMethod.h @@ -0,0 +1,51 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef BASICGETMETHOD_H_ +#define BASICGETMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP basic.get + */ +class BasicGetMethod : public IServerMethod { +public: + BasicGetMethod(); + virtual ~BasicGetMethod(); + + /** + * @brief Initialize the method + * @param queue queue name + * @param noAck no acknowledgement (manual acknowledgement) fag + */ + void init( + const std::string& queue, + const bool noAck); + +public: // IServerMethod + std::string getMethodName() const; + + AMQPStatus send(const SmartPtrCAmqpChannel& channel); + +private: + bool _isInitialized; + std::string _queue; + bool _noAck; + + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(BasicGetMethod); +}; +CAF_DECLARE_SMART_POINTER(BasicGetMethod); + +}} + +#endif /* BASICGETMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicGetOkMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicGetOkMethod.cpp new file mode 100644 index 000000000..4f55d0367 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicGetOkMethod.cpp @@ -0,0 +1,55 @@ +/* + * Created on: May 11, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "BasicGetOkMethod.h" + +using namespace Caf::AmqpClient; + +BasicGetOkMethod::BasicGetOkMethod() : + _deliveryTag(0), + _messageCount(0), + _redelivered(false), + CAF_CM_INIT("BasicGetOkMethod") { +} + +BasicGetOkMethod::~BasicGetOkMethod() { +} + +void BasicGetOkMethod::init(const amqp_method_t * const method) { + CAF_CM_FUNCNAME("init"); + CAF_CM_VALIDATE_PTR(method); + CAF_CM_ASSERT(AMQP_BASIC_GET_OK_METHOD == method->id); + const amqp_basic_get_ok_t * const decoded = + reinterpret_cast(method->decoded); + _deliveryTag = decoded->delivery_tag; + _exchange = AMQUtil::amqpBytesToString(&decoded->exchange); + _messageCount = decoded->message_count; + _redelivered = decoded->redelivered; + _routingKey = AMQUtil::amqpBytesToString(&decoded->routing_key); +} + +uint64 BasicGetOkMethod::getDeliveryTag() { + return _deliveryTag; +} + +std::string BasicGetOkMethod::getExchange() { + return _exchange; +} + +uint32 BasicGetOkMethod::getMessageCount() { + return _messageCount; +} + +bool BasicGetOkMethod::getRedelivered() { + return _redelivered; +} + +std::string BasicGetOkMethod::getRoutingKey() { + return _routingKey; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicGetOkMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicGetOkMethod.h new file mode 100644 index 000000000..e33bb8703 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicGetOkMethod.h @@ -0,0 +1,56 @@ +/* + * Created on: May 11, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef BASICGETOKMETHOD_H_ +#define BASICGETOKMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP basic.get-ok + */ +class BasicGetOkMethod : + public TMethodImpl, + public AmqpMethods::Basic::GetOk { + METHOD_DECL( + AmqpMethods::Basic::GetOk, + AMQP_BASIC_GET_OK_METHOD, + "basic.get-ok", + true) + +public: + BasicGetOkMethod(); + virtual ~BasicGetOkMethod(); + +public: // IMethod + void init(const amqp_method_t * const method); + +public: // AmqpMethods::Basic::GetOk + uint64 getDeliveryTag(); + std::string getExchange(); + uint32 getMessageCount(); + bool getRedelivered(); + std::string getRoutingKey(); + +private: + uint64 _deliveryTag; + std::string _exchange; + uint32 _messageCount; + bool _redelivered; + std::string _routingKey; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(BasicGetOkMethod); +}; +CAF_DECLARE_SMART_QI_POINTER(BasicGetOkMethod); + +}} + +#endif /* BASICGETOKMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicProperties.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicProperties.cpp new file mode 100644 index 000000000..72c5568fe --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicProperties.cpp @@ -0,0 +1,485 @@ +/* + * Created on: May 11, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "BasicProperties.h" + +using namespace Caf::AmqpClient; + +BasicProperties::BasicProperties() : + _isInitialized(false), + _flags(0), + _bodySize(0), + _deliveryMode(0), + _priority(0), + _timestamp(0), + CAF_CM_INIT("BasicProperties") { +} + +BasicProperties::~BasicProperties() { +} + +void BasicProperties::init() { + _isInitialized = true; +} + +void BasicProperties::init( + const uint32 flags, + const std::string& contentType, + const std::string& contentEncoding, + const SmartPtrTable& headers, + const uint8 deliveryMode, + const uint8 priority, + const std::string& correlationId, + const std::string& replyTo, + const std::string& expiration, + const std::string& messageId, + const uint64 timestamp, + const std::string& type, + const std::string& userId, + const std::string& appId, + const std::string& clusterId) { + CAF_CM_FUNCNAME_VALIDATE("init"); + + _flags = flags; + if (flags & AmqpContentHeaders::BASIC_PROPERTY_CONTENT_TYPE_FLAG) { + CAF_CM_VALIDATE_STRING(contentType); + _contentType = contentType; + } + if (flags & AmqpContentHeaders::BASIC_PROPERTY_CONTENT_ENCODING_FLAG) { + CAF_CM_VALIDATE_STRING(contentEncoding); + _contentEncoding = contentEncoding; + } + if (flags & AmqpContentHeaders::BASIC_PROPERTY_HEADERS_FLAG) { + CAF_CM_VALIDATE_SMARTPTR(headers); + _headers = headers; + } + if (flags & AmqpContentHeaders::BASIC_PROPERTY_DEVLIVERY_MODE_FLAG) { + _deliveryMode = deliveryMode; + } + if (flags & AmqpContentHeaders::BASIC_PROPERTY_PRIORITY_FLAG) { + _priority = priority; + } + if (flags & AmqpContentHeaders::BASIC_PROPERTY_CORRELATION_ID_FLAG) { + _correlationId = correlationId; + } + if (flags & AmqpContentHeaders::BASIC_PROPERTY_REPLY_TO_FLAG) { + _replyTo = replyTo; + } + if (flags & AmqpContentHeaders::BASIC_PROPERTY_EXPIRATION_FLAG) { + _expiration = expiration; + } + if (flags & AmqpContentHeaders::BASIC_PROPERTY_MESSAGE_ID_FLAG) { + _messageId = messageId; + } + if (flags & AmqpContentHeaders::BASIC_PROPERTY_TIMESTAMP_FLAG) { + _timestamp = timestamp; + } + if (flags & AmqpContentHeaders::BASIC_PROPERTY_TYPE_FLAG) { + _type = type; + } + if (flags & AmqpContentHeaders::BASIC_PROPERTY_USER_ID_FLAG) { + _userId = userId; + } + if (flags & AmqpContentHeaders::BASIC_PROPERTY_APP_ID_FLAG) { + _appId = appId; + } + if (flags & AmqpContentHeaders::BASIC_PROPERTY_CLUSTER_ID_FLAG) { + _clusterId = clusterId; + } + _isInitialized = true; +} + +void BasicProperties::init(const SmartPtrCAmqpFrame& frame) { + CAF_CM_FUNCNAME("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_PTR(frame); + + if (frame->getFrameType() != AMQP_FRAME_HEADER) { + CAF_CM_EXCEPTIONEX_VA1( + AmqpExceptions::UnexpectedFrameException, + 0, + "Expected an AMQP header frame. Received type %d", + frame->getFrameType()); + } + + if (frame->getHeaderClassId() != AMQP_BASIC_CLASS) { + CAF_CM_EXCEPTIONEX_VA1( + AmqpExceptions::UnknownClassOrMethodException, + 0, + "[class=0x%04X]", + frame->getHeaderClassId()); + } + + const amqp_basic_properties_t * const decoded = frame->getHeaderProperties(); + _bodySize = frame->getHeaderBodySize(); + const amqp_flags_t flags = decoded->_flags; + + if (flags & AMQP_BASIC_CONTENT_TYPE_FLAG) { + _contentType = AMQUtil::amqpBytesToString(&decoded->content_type); + _flags |= AmqpContentHeaders::BASIC_PROPERTY_CONTENT_TYPE_FLAG; + } + if (flags & AMQP_BASIC_CONTENT_ENCODING_FLAG) { + _contentEncoding = AMQUtil::amqpBytesToString(&decoded->content_encoding); + _flags |= AmqpContentHeaders::BASIC_PROPERTY_CONTENT_ENCODING_FLAG; + } + if (flags & AMQP_BASIC_HEADERS_FLAG) { + _headers = AMQUtil::amqpApiTableToTableObj(&decoded->headers); + _flags |= AmqpContentHeaders::BASIC_PROPERTY_HEADERS_FLAG; + } + if (flags & AMQP_BASIC_DELIVERY_MODE_FLAG) { + _deliveryMode = decoded->delivery_mode; + _flags |= AmqpContentHeaders::BASIC_PROPERTY_DEVLIVERY_MODE_FLAG; + } + if (flags & AMQP_BASIC_PRIORITY_FLAG) { + _priority = decoded->priority; + _flags |= AmqpContentHeaders::BASIC_PROPERTY_PRIORITY_FLAG; + } + if (flags & AMQP_BASIC_CORRELATION_ID_FLAG) { + _correlationId = AMQUtil::amqpBytesToString(&decoded->correlation_id); + _flags |= AmqpContentHeaders::BASIC_PROPERTY_CORRELATION_ID_FLAG; + } + if (flags & AMQP_BASIC_REPLY_TO_FLAG) { + _replyTo = AMQUtil::amqpBytesToString(&decoded->reply_to); + _flags |= AmqpContentHeaders::BASIC_PROPERTY_REPLY_TO_FLAG; + } + if (flags & AMQP_BASIC_EXPIRATION_FLAG) { + _expiration = AMQUtil::amqpBytesToString(&decoded->expiration); + _flags |= AmqpContentHeaders::BASIC_PROPERTY_EXPIRATION_FLAG; + } + if (flags & AMQP_BASIC_MESSAGE_ID_FLAG) { + _messageId = AMQUtil::amqpBytesToString(&decoded->message_id); + _flags |= AmqpContentHeaders::BASIC_PROPERTY_MESSAGE_ID_FLAG; + } + if (flags & AMQP_BASIC_TIMESTAMP_FLAG) { + _timestamp = decoded->timestamp; + _flags |= AmqpContentHeaders::BASIC_PROPERTY_TIMESTAMP_FLAG; + } + if (flags & AMQP_BASIC_TYPE_FLAG) { + _type = AMQUtil::amqpBytesToString(&decoded->type); + _flags |= AmqpContentHeaders::BASIC_PROPERTY_TYPE_FLAG; + } + if (flags & AMQP_BASIC_USER_ID_FLAG) { + _userId = AMQUtil::amqpBytesToString(&decoded->user_id); + _flags |= AmqpContentHeaders::BASIC_PROPERTY_USER_ID_FLAG; + } + if (flags & AMQP_BASIC_APP_ID_FLAG) { + _appId = AMQUtil::amqpBytesToString(&decoded->app_id); + _flags |= AmqpContentHeaders::BASIC_PROPERTY_APP_ID_FLAG; + } + if (flags & AMQP_BASIC_CLUSTER_ID_FLAG) { + _clusterId = AMQUtil::amqpBytesToString(&decoded->cluster_id); + _flags |= AmqpContentHeaders::BASIC_PROPERTY_CLUSTER_ID_FLAG; + } + _isInitialized = true; +} + +bool BasicProperties::areHeadersAvailable() { + return (_flags & AmqpContentHeaders::BASIC_PROPERTY_HEADERS_FLAG); +} + +void BasicProperties::getAsApiProperties(amqp_basic_properties_t& properties) { + CAF_CM_FUNCNAME_VALIDATE("getAsApiProperties"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + memset(&properties, 0, sizeof(properties)); + if (_flags & AmqpContentHeaders::BASIC_PROPERTY_CONTENT_TYPE_FLAG) { + properties.content_type.len = _contentType.length(); + properties.content_type.bytes = const_cast(_contentType.c_str()); + properties._flags |= AMQP_BASIC_CONTENT_TYPE_FLAG; + } + if (_flags & AmqpContentHeaders::BASIC_PROPERTY_CONTENT_ENCODING_FLAG) { + properties.content_encoding.len = _contentEncoding.length(); + properties.content_encoding.bytes = const_cast(_contentEncoding.c_str()); + properties._flags |= AMQP_BASIC_CONTENT_ENCODING_FLAG; + } + if (_flags & AmqpContentHeaders::BASIC_PROPERTY_HEADERS_FLAG) { + AMQUtil::amqpTableObjToApiTable(_headers, properties.headers); + properties._flags |= AMQP_BASIC_HEADERS_FLAG; + } + if (_flags & AmqpContentHeaders::BASIC_PROPERTY_DEVLIVERY_MODE_FLAG) { + properties.delivery_mode = _deliveryMode; + properties._flags |= AMQP_BASIC_DELIVERY_MODE_FLAG; + } + if (_flags & AmqpContentHeaders::BASIC_PROPERTY_PRIORITY_FLAG) { + properties.priority = _priority; + properties._flags |= AMQP_BASIC_PRIORITY_FLAG; + } + if (_flags & AmqpContentHeaders::BASIC_PROPERTY_CORRELATION_ID_FLAG) { + properties.correlation_id.len = _correlationId.length(); + properties.correlation_id.bytes = const_cast(_correlationId.c_str()); + properties._flags |= AMQP_BASIC_CORRELATION_ID_FLAG; + } + if (_flags & AmqpContentHeaders::BASIC_PROPERTY_REPLY_TO_FLAG) { + properties.reply_to.len = _replyTo.length(); + properties.reply_to.bytes = const_cast(_replyTo.c_str()); + properties._flags |= AMQP_BASIC_REPLY_TO_FLAG; + } + if (_flags & AmqpContentHeaders::BASIC_PROPERTY_EXPIRATION_FLAG) { + properties.expiration.len = _expiration.length(); + properties.expiration.bytes = const_cast(_expiration.c_str()); + properties._flags |= AMQP_BASIC_EXPIRATION_FLAG; + } + if (_flags & AmqpContentHeaders::BASIC_PROPERTY_MESSAGE_ID_FLAG) { + properties.message_id.len = _messageId.length(); + properties.message_id.bytes = const_cast(_messageId.c_str()); + properties._flags |= AMQP_BASIC_MESSAGE_ID_FLAG; + } + if (_flags & AmqpContentHeaders::BASIC_PROPERTY_TIMESTAMP_FLAG) { + properties.timestamp = _timestamp; + properties._flags |= AMQP_BASIC_TIMESTAMP_FLAG; + } + if (_flags & AmqpContentHeaders::BASIC_PROPERTY_TYPE_FLAG) { + properties.type.len = _type.length(); + properties.type.bytes = const_cast(_type.c_str()); + properties._flags |= AMQP_BASIC_TYPE_FLAG; + } + if (_flags & AmqpContentHeaders::BASIC_PROPERTY_USER_ID_FLAG) { + properties.user_id.len = _userId.length(); + properties.user_id.bytes = const_cast(_userId.c_str()); + properties._flags |= AMQP_BASIC_USER_ID_FLAG; + } + if (_flags & AmqpContentHeaders::BASIC_PROPERTY_APP_ID_FLAG) { + properties.app_id.len = _appId.length(); + properties.app_id.bytes = const_cast(_appId.c_str()); + properties._flags |= AMQP_BASIC_APP_ID_FLAG; + } + if (_flags & AmqpContentHeaders::BASIC_PROPERTY_CLUSTER_ID_FLAG) { + properties.cluster_id.len = _clusterId.length(); + properties.cluster_id.bytes = const_cast(_clusterId.c_str()); + properties._flags |= AMQP_BASIC_CLUSTER_ID_FLAG; + } +} + +uint16 BasicProperties::getClassId() { + return AMQP_BASIC_CLASS; +} + +std::string BasicProperties::getClassName() { + return "basic"; +} + +uint64 BasicProperties::getBodySize() { + return _bodySize; +} + +uint32 BasicProperties::getFlags() { + CAF_CM_FUNCNAME_VALIDATE("getFlags"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _flags; +} + +std::string BasicProperties::getContentType() { + CAF_CM_FUNCNAME_VALIDATE("getContentType"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + ValidatePropertyIsSet( + AmqpContentHeaders::BASIC_PROPERTY_CONTENT_TYPE_FLAG, + "contentType"); + return _contentType; +} + +std::string BasicProperties::getContentEncoding() { + CAF_CM_FUNCNAME_VALIDATE("getContentType"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + ValidatePropertyIsSet( + AmqpContentHeaders::BASIC_PROPERTY_CONTENT_ENCODING_FLAG, + "contentEncoding"); + return _contentEncoding; +} + +SmartPtrTable BasicProperties::getHeaders() { + CAF_CM_FUNCNAME_VALIDATE("getHeaders"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + ValidatePropertyIsSet( + AmqpContentHeaders::BASIC_PROPERTY_HEADERS_FLAG, + "headers"); + return _headers; +} + +uint8 BasicProperties::getDeliveryMode() { + CAF_CM_FUNCNAME_VALIDATE("getDeliveryMode"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + ValidatePropertyIsSet( + AmqpContentHeaders::BASIC_PROPERTY_DEVLIVERY_MODE_FLAG, + "deliveryMode"); + return _deliveryMode; +} + +uint8 BasicProperties::getPriority() { + CAF_CM_FUNCNAME_VALIDATE("getPriority"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + ValidatePropertyIsSet( + AmqpContentHeaders::BASIC_PROPERTY_PRIORITY_FLAG, + "priority"); + return _priority; +} + +std::string BasicProperties::getCorrelationId() { + CAF_CM_FUNCNAME_VALIDATE("getCorrelationId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + ValidatePropertyIsSet( + AmqpContentHeaders::BASIC_PROPERTY_CORRELATION_ID_FLAG, + "correlationId"); + return _correlationId; +} + +std::string BasicProperties::getReplyTo() { + CAF_CM_FUNCNAME_VALIDATE("getReplyTo"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + ValidatePropertyIsSet( + AmqpContentHeaders::BASIC_PROPERTY_REPLY_TO_FLAG, + "replyTo"); + return _replyTo; +} + +std::string BasicProperties::getExpiration() { + CAF_CM_FUNCNAME_VALIDATE("getExpiration"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + ValidatePropertyIsSet( + AmqpContentHeaders::BASIC_PROPERTY_EXPIRATION_FLAG, + "expiration"); + return _expiration; +} + +std::string BasicProperties::getMessageId() { + CAF_CM_FUNCNAME_VALIDATE("getMessageId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + ValidatePropertyIsSet( + AmqpContentHeaders::BASIC_PROPERTY_MESSAGE_ID_FLAG, + "messageId"); + return _messageId; +} + +uint64 BasicProperties::getTimestamp() { + CAF_CM_FUNCNAME_VALIDATE("getTimestamp"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + ValidatePropertyIsSet( + AmqpContentHeaders::BASIC_PROPERTY_TIMESTAMP_FLAG, + "timestamp"); + return _timestamp; +} + +std::string BasicProperties::getType() { + CAF_CM_FUNCNAME_VALIDATE("getType"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + ValidatePropertyIsSet( + AmqpContentHeaders::BASIC_PROPERTY_TYPE_FLAG, + "type"); + return _type; +} + +std::string BasicProperties::getUserId() { + CAF_CM_FUNCNAME_VALIDATE("getUserId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + ValidatePropertyIsSet( + AmqpContentHeaders::BASIC_PROPERTY_USER_ID_FLAG, + "userId"); + return _userId; +} + +std::string BasicProperties::getAppId() { + CAF_CM_FUNCNAME_VALIDATE("getAppId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + ValidatePropertyIsSet( + AmqpContentHeaders::BASIC_PROPERTY_APP_ID_FLAG, + "appId"); + return _appId; +} + +std::string BasicProperties::getClusterId() { + CAF_CM_FUNCNAME_VALIDATE("getClusterId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + ValidatePropertyIsSet( + AmqpContentHeaders::BASIC_PROPERTY_CLUSTER_ID_FLAG, + "clusterId"); + return _clusterId; +} + +void BasicProperties::setContentType(const std::string& contentType) { + _contentType = contentType; + _flags |= AmqpContentHeaders::BASIC_PROPERTY_CONTENT_TYPE_FLAG; +} + +void BasicProperties::setContentEncoding(const std::string& contentEncoding) { + _contentEncoding = contentEncoding; + _flags |= AmqpContentHeaders::BASIC_PROPERTY_CONTENT_ENCODING_FLAG; +} + +void BasicProperties::setHeaders(const SmartPtrTable& headers) { + if (headers) { + _headers = headers; + _flags |= AmqpContentHeaders::BASIC_PROPERTY_HEADERS_FLAG; + } +} + +void BasicProperties::setDeliveryMode(const uint8 deliveryMode) { + _deliveryMode = deliveryMode; + _flags |= AmqpContentHeaders::BASIC_PROPERTY_DEVLIVERY_MODE_FLAG; +} + +void BasicProperties::setPriority(const uint8 priority) { + _priority = priority; + _flags |= AmqpContentHeaders::BASIC_PROPERTY_PRIORITY_FLAG; +} + +void BasicProperties::setCorrelationId(const std::string& correlationId) { + _correlationId = correlationId; + _flags |= AmqpContentHeaders::BASIC_PROPERTY_CORRELATION_ID_FLAG; +} + +void BasicProperties::setReplyTo(const std::string& replyTo) { + _replyTo = replyTo; + _flags |= AmqpContentHeaders::BASIC_PROPERTY_REPLY_TO_FLAG; +} + +void BasicProperties::setExpiration(const std::string& expiration) { + _expiration = expiration; + _flags |= AmqpContentHeaders::BASIC_PROPERTY_EXPIRATION_FLAG; +} + +void BasicProperties::setMessageId(const std::string& messageId) { + _messageId = messageId; + _flags |= AmqpContentHeaders::BASIC_PROPERTY_MESSAGE_ID_FLAG; +} + +void BasicProperties::setTimestamp(const uint64 timestamp) { + _timestamp = timestamp; + _flags |= AmqpContentHeaders::BASIC_PROPERTY_TIMESTAMP_FLAG; +} + +void BasicProperties::setType(const std::string& type) { + _type = type; + _flags |= AmqpContentHeaders::BASIC_PROPERTY_TYPE_FLAG; +} + +void BasicProperties::setUserId(const std::string& userId) { + _userId = userId; + _flags |= AmqpContentHeaders::BASIC_PROPERTY_USER_ID_FLAG; +} + +void BasicProperties::setAppId(const std::string& appId) { + _appId = appId; + _flags |= AmqpContentHeaders::BASIC_PROPERTY_APP_ID_FLAG; +} + +void BasicProperties::setClusterId(const std::string& clusterId) { + _clusterId = clusterId; + _flags |= AmqpContentHeaders::BASIC_PROPERTY_CLUSTER_ID_FLAG; +} + +void BasicProperties::ValidatePropertyIsSet( + const uint32 flag, + const char* propertyName) { + CAF_CM_FUNCNAME("ValidatePropertyIsSet"); + if (!(_flags & flag)) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchElementException, + 0, + "The property '%s' is not set", + propertyName); + } +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicProperties.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicProperties.h new file mode 100644 index 000000000..dccf8eb26 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicProperties.h @@ -0,0 +1,150 @@ +/* + * Created on: May 11, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef BASICPROPERTIES_H_ +#define BASICPROPERTIES_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP basic properties + */ +class BasicProperties : + public AmqpContentHeaders::BasicProperties, + public IContentHeader { + CAF_DECL_UUID("db3dbcd6-f241-47ff-b17c-d5cf6addabf8") + + CAF_BEGIN_QI() + CAF_QI_ENTRY(AmqpContentHeaders::BasicProperties) + CAF_QI_ENTRY(IContentHeader) + CAF_QI_ENTRY(BasicProperties) + CAF_END_QI() +public: + BasicProperties(); + virtual ~BasicProperties(); + + /** + * @brief Initialize the properties + *

+ * This version creates an object with no properties. Call the setXXX methods + * to add properties. + */ + void init(); + + /** + * @brief Initialize the properties + *

+ * Set the flags property to the binary 'or' (|) of + * BASIC_PROPERTY_XXXX_FLAG constants representing the fields present. + *

+ * Use 0, std::string() or + * SmartPtrTable() to skip initialization of fields not included + * in the object. + */ + void init( + const uint32 flags, + const std::string& contentType, + const std::string& contentEncoding, + const SmartPtrTable& headers, + const uint8 deliveryMode, + const uint8 priority, + const std::string& correlationId, + const std::string& replyTo, + const std::string& expiration, + const std::string& messageId, + const uint64 timestamp, + const std::string& type, + const std::string& userId, + const std::string& appId, + const std::string& clusterId); + + /** + * @brief Converts this class instance into a c-api amqp_basic_properties_t struct. + *

+ * The pointers in the c-api struct point at member of this class. This class instance + * must be realized as int32 as the return properties is in use. + * @param properties the c-api properties structure to be filled out + */ + void getAsApiProperties(amqp_basic_properties_t& properties); + +public: // IContentHeader + void init(const SmartPtrCAmqpFrame& frame); + + uint64 getBodySize(); + +public: // AmqpProperties::BasicProperties, + bool areHeadersAvailable(); + uint32 getFlags(); + std::string getContentType(); + void setContentType(const std::string& contentType); + std::string getContentEncoding(); + void setContentEncoding(const std::string& contentEncoding); + SmartPtrTable getHeaders(); + void setHeaders(const SmartPtrTable& headers); + uint8 getDeliveryMode(); + void setDeliveryMode(const uint8 deliveryMode); + uint8 getPriority(); + void setPriority(const uint8 priority); + std::string getCorrelationId(); + void setCorrelationId(const std::string& correlationId); + std::string getReplyTo(); + void setReplyTo(const std::string& replyTo); + std::string getExpiration(); + void setExpiration(const std::string& expiration); + std::string getMessageId(); + void setMessageId(const std::string& messageId); + uint64 getTimestamp(); + void setTimestamp(const uint64 timestamp); + std::string getType(); + void setType(const std::string& type); + std::string getUserId(); + void setUserId(const std::string& userId); + std::string getAppId(); + void setAppId(const std::string& appId); + std::string getClusterId(); + void setClusterId(const std::string& clusterId); + +public: // IAmqpContentHeader + uint16 getClassId(); + + std::string getClassName(); + +private: + void ValidatePropertyIsSet( + const uint32 flag, + const char* propertyName); + +private: + bool _isInitialized; + uint32 _flags; + uint64 _bodySize; + std::string _contentType; + std::string _contentEncoding; + SmartPtrTable _headers; + uint8 _deliveryMode; + uint8 _priority; + std::string _correlationId; + std::string _replyTo; + std::string _expiration; + std::string _messageId; + uint64 _timestamp; + std::string _type; + std::string _userId; + std::string _appId; + std::string _clusterId; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(BasicProperties); +}; +CAF_DECLARE_SMART_QI_POINTER(BasicProperties); + +}} + +#endif /* BASICPROPERTIES_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicPublishMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicPublishMethod.cpp new file mode 100644 index 000000000..10877f058 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicPublishMethod.cpp @@ -0,0 +1,95 @@ +/* + * Created on: May 15, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "BasicPublishMethod.h" + +using namespace Caf::AmqpClient; + +struct MethodBodyFreeData { + SmartPtrCDynamicByteArray body; +}; + +BasicPublishMethod::BasicPublishMethod() : + _isInitialized(false), + _mandatory(false), + _immediate(false), + CAF_CM_INIT("BasicPublishMethod") { +} + +BasicPublishMethod::~BasicPublishMethod() { +} + +void BasicPublishMethod::init( + const std::string& exchange, + const std::string& routingKey, + bool mandatory, + bool immediate, + const AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _exchange = exchange; + _routingKey = routingKey; + _mandatory = mandatory; + _immediate = immediate; + _properties = properties; + _body = body; + _isInitialized = true; +} + +std::string BasicPublishMethod::getMethodName() const { + return "basic.publish"; +} + +AMQPStatus BasicPublishMethod::send(const SmartPtrCAmqpChannel& channel) { + CAF_CM_FUNCNAME("send"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + AMQPStatus status = AMQP_ERROR_OK; + + amqp_basic_properties_t properties; + try { + if (_properties) { + SmartPtrBasicProperties propertiesClass; + propertiesClass.QueryInterface(_properties); + propertiesClass->getAsApiProperties(properties); + } else { + memset(&properties, 0, sizeof(properties)); + } + + status = AmqpUtil::AMQP_BasicPublish( + channel, + _exchange, + _routingKey, + _mandatory, + _immediate, + &properties, + _body); + } + CAF_CM_CATCH_ALL; + if (properties.headers.entries) { + AMQUtil::amqpFreeApiTable(&properties.headers); + } + CAF_CM_THROWEXCEPTION; + return status; +} + + + + + + + + + + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicPublishMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicPublishMethod.h new file mode 100644 index 000000000..533e86576 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicPublishMethod.h @@ -0,0 +1,63 @@ +/* + * Created on: May 15, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef BASICPUBLISHMETHOD_H_ +#define BASICPUBLISHMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP basic.publish + */ +class BasicPublishMethod : public IServerMethod { +public: + BasicPublishMethod(); + virtual ~BasicPublishMethod(); + + /** + * @brief Initialize the method + * @param exchange exchange name + * @param routingKey routing key + * @param mandatory mandatory delivery flag + * @param immediate immediate delivery flag + * @param properties message properties + * @param body message body raw bytes + */ + void init( + const std::string& exchange, + const std::string& routingKey, + bool mandatory, + bool immediate, + const AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body); + +public: // IServerMethod + std::string getMethodName() const; + + AMQPStatus send(const SmartPtrCAmqpChannel& channel); + +private: + bool _isInitialized; + std::string _exchange; + std::string _routingKey; + bool _mandatory; + bool _immediate; + AmqpContentHeaders::SmartPtrBasicProperties _properties; + SmartPtrCDynamicByteArray _body; + + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(BasicPublishMethod); +}; +CAF_DECLARE_SMART_POINTER(BasicPublishMethod); + +}} + +#endif /* BASICPUBLISHMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicQosMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicQosMethod.cpp new file mode 100644 index 000000000..a7fbe0b6e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicQosMethod.cpp @@ -0,0 +1,50 @@ +/* + * Created on: May 22, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "BasicQosMethod.h" + +using namespace Caf::AmqpClient; + +BasicQosMethod::BasicQosMethod() : + _isInitialized(false), + _prefetchSize(0), + _prefetchCount(0), + _global(false), + CAF_CM_INIT("BasicQosMethod") { +} + +BasicQosMethod::~BasicQosMethod() { +} + +void BasicQosMethod::init( + const uint32 prefetchSize, + const uint16 prefetchCount, + const bool global) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _prefetchSize = prefetchSize; + _prefetchCount = prefetchCount; + _global = global; + _isInitialized = true; +} + +std::string BasicQosMethod::getMethodName() const { + return "basic.qos"; +} + +AMQPStatus BasicQosMethod::send(const SmartPtrCAmqpChannel& channel) { + CAF_CM_FUNCNAME_VALIDATE("send"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return AmqpUtil::AMQP_BasicQos( + channel, + _prefetchSize, + _prefetchCount, + _global); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicQosMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicQosMethod.h new file mode 100644 index 000000000..a25fb3a7f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicQosMethod.h @@ -0,0 +1,53 @@ +/* + * Created on: May 22, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef BASICQOSMETHOD_H_ +#define BASICQOSMETHOD_H_ + +namespace Caf { namespace AmqpClient { +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP basic.qos + */ +class BasicQosMethod : public IServerMethod { +public: + BasicQosMethod(); + virtual ~BasicQosMethod(); + + /** + * @brief Initialize the method + * @param prefetchSize prefetch window in octets + * @param prefetchCount prefetch windows in messages + * @param global apply to entire connection + */ + void init( + const uint32 prefetchSize, + const uint16 prefetchCount, + const bool global); + +public: // IServerMethod + std::string getMethodName() const; + + AMQPStatus send(const SmartPtrCAmqpChannel& channel); + +private: + bool _isInitialized; + uint32 _prefetchSize; + uint16 _prefetchCount; + bool _global; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(BasicQosMethod); + +}; +CAF_DECLARE_SMART_POINTER(BasicQosMethod); + +}} + +#endif /* BASICQOSMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicQosOkMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicQosOkMethod.cpp new file mode 100644 index 000000000..3396c8073 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicQosOkMethod.cpp @@ -0,0 +1,25 @@ +/* + * Created on: May 22, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "BasicQosOkMethod.h" + +using namespace Caf::AmqpClient; + +BasicQosOkMethod::BasicQosOkMethod() : + CAF_CM_INIT("BasicQosOkMethod") { +} + +BasicQosOkMethod::~BasicQosOkMethod() { +} + +void BasicQosOkMethod::init(const amqp_method_t * const method) { + CAF_CM_FUNCNAME("init"); + CAF_CM_VALIDATE_PTR(method); + CAF_CM_ASSERT(AMQP_BASIC_QOS_OK_METHOD == method->id); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicQosOkMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicQosOkMethod.h new file mode 100644 index 000000000..f7a5fe2fb --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicQosOkMethod.h @@ -0,0 +1,46 @@ +/* + * Created on: May 22, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef BASICQOSOKMETHOD_H_ +#define BASICQOSOKMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP basic.qos-ok + */ +class BasicQosOkMethod : + public TMethodImpl, + public AmqpMethods::Basic::QosOk { + METHOD_DECL( + AmqpMethods::Basic::QosOk, + AMQP_BASIC_QOS_OK_METHOD, + "basic.qos-ok", + false) + +public: + BasicQosOkMethod(); + virtual ~BasicQosOkMethod(); + +public: // IMethod + void init(const amqp_method_t * const method); + +public: // AmqpMethods::Basic::QosOk + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(BasicQosOkMethod); +}; +CAF_DECLARE_SMART_QI_POINTER(BasicQosOkMethod); + +}} + +#endif /* BASICQOSOKMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicRecoverMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicRecoverMethod.cpp new file mode 100644 index 000000000..ae660b3ee --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicRecoverMethod.cpp @@ -0,0 +1,42 @@ +/* + * Created on: May 21, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "BasicRecoverMethod.h" + +using namespace Caf::AmqpClient; + +BasicRecoverMethod::BasicRecoverMethod() : + _isInitialized(false), + _requeue(false), + CAF_CM_INIT("BasicRecoverMethod") { +} + +BasicRecoverMethod::~BasicRecoverMethod() { +} + +void BasicRecoverMethod::init( + const bool requeue) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _requeue = requeue; + _isInitialized = true; +} + +std::string BasicRecoverMethod::getMethodName() const { + return "basic.recover"; +} + +AMQPStatus BasicRecoverMethod::send(const SmartPtrCAmqpChannel& channel) { + CAF_CM_FUNCNAME_VALIDATE("send"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return AmqpUtil::AMQP_BasicRecover( + channel, + _requeue); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicRecoverMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicRecoverMethod.h new file mode 100644 index 000000000..7854b9e4a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicRecoverMethod.h @@ -0,0 +1,50 @@ +/* + * Created on: May 21, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef BASICRECOVERMETHOD_H_ +#define BASICRECOVERMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP basic.recover + */ +class BasicRecoverMethod : public IServerMethod { +public: + BasicRecoverMethod(); + virtual ~BasicRecoverMethod(); + + /** + * @brief Initialize the method + * @param requeue if false, the message will be redelivered to the + * original receipient. If true, the server will attempt to requeue + * the message, potentially delivering it to an alternative subscriber. + */ + void init( + const bool requeue); + +public: // IServerMethod + std::string getMethodName() const; + + AMQPStatus send(const SmartPtrCAmqpChannel& channel); + +private: + bool _isInitialized; + bool _requeue; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(BasicRecoverMethod); + +}; +CAF_DECLARE_SMART_POINTER(BasicRecoverMethod); + +}} + +#endif /* BASICRECOVERMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicRecoverOkMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicRecoverOkMethod.cpp new file mode 100644 index 000000000..f5350e921 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicRecoverOkMethod.cpp @@ -0,0 +1,25 @@ +/* + * Created on: May 21, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "BasicRecoverOkMethod.h" + +using namespace Caf::AmqpClient; + +BasicRecoverOkMethod::BasicRecoverOkMethod() : + CAF_CM_INIT("BasicRecoverOkMethod") { +} + +BasicRecoverOkMethod::~BasicRecoverOkMethod() { +} + +void BasicRecoverOkMethod::init(const amqp_method_t * const method) { + CAF_CM_FUNCNAME("init"); + CAF_CM_VALIDATE_PTR(method); + CAF_CM_ASSERT(AMQP_BASIC_RECOVER_OK_METHOD == method->id); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicRecoverOkMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicRecoverOkMethod.h new file mode 100644 index 000000000..ce823fe07 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicRecoverOkMethod.h @@ -0,0 +1,46 @@ +/* + * Created on: May 21, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef BASICRECOVEROKMETHOD_H_ +#define BASICRECOVEROKMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP basic.recover-ok + */ +class BasicRecoverOkMethod : + public TMethodImpl, + public AmqpMethods::Basic::RecoverOk { + METHOD_DECL( + AmqpMethods::Basic::RecoverOk, + AMQP_BASIC_RECOVER_OK_METHOD, + "basic.recover-ok", + false) + +public: + BasicRecoverOkMethod(); + virtual ~BasicRecoverOkMethod(); + +public: // IMethod + void init(const amqp_method_t * const method); + +public: // AmqpMethods::Basic::BasicRecoverOk + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(BasicRecoverOkMethod); +}; +CAF_DECLARE_SMART_QI_POINTER(BasicRecoverOkMethod); + +}} + +#endif /* BASICRECOVEROKMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicRejectMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicRejectMethod.cpp new file mode 100644 index 000000000..08e9676e6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicRejectMethod.cpp @@ -0,0 +1,46 @@ +/* + * Created on: Aug 1, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "BasicRejectMethod.h" + +using namespace Caf::AmqpClient; + +BasicRejectMethod::BasicRejectMethod() : + _isInitialized(false), + _deliveryTag(0), + _requeue(false), + CAF_CM_INIT("BasicRejectMethod") { +} + +BasicRejectMethod::~BasicRejectMethod() { +} + +void BasicRejectMethod::init( + const uint64 deliveryTag, + const bool requeue) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _deliveryTag = deliveryTag; + _requeue = requeue; + _isInitialized = true; +} + +std::string BasicRejectMethod::getMethodName() const { + return "basic.Reject"; +} + +AMQPStatus BasicRejectMethod::send(const SmartPtrCAmqpChannel& channel) { + CAF_CM_FUNCNAME_VALIDATE("send"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); +// return AMQP_BasicReject( +// channel, +// _deliveryTag, +// _requeue); + return AMQP_ERROR_UNIMPLEMENTED; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicRejectMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicRejectMethod.h new file mode 100644 index 000000000..d5eef1e8c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicRejectMethod.h @@ -0,0 +1,51 @@ +/* + * Created on: Aug 1, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef BASICREJECTMETHOD_H_ +#define BASICREJECTMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP basic.Reject + */ +class BasicRejectMethod : public IServerMethod { +public: + BasicRejectMethod(); + virtual ~BasicRejectMethod(); + + /** + * @brief Initialize the method + * @param deliveryTag delivery tag + * @param requeue requeue flag + */ + void init( + const uint64 deliveryTag, + const bool requeue); + +public: // IServerMethod + std::string getMethodName() const; + + AMQPStatus send(const SmartPtrCAmqpChannel& channel); + +private: + bool _isInitialized; + uint64 _deliveryTag; + bool _requeue; + + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(BasicRejectMethod); +}; +CAF_DECLARE_SMART_POINTER(BasicRejectMethod); + +}} + +#endif /* BASICREJECTMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicReturnMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicReturnMethod.cpp new file mode 100644 index 000000000..0633f8235 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicReturnMethod.cpp @@ -0,0 +1,48 @@ +/* + * Created on: May 21, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "BasicReturnMethod.h" + +using namespace Caf::AmqpClient; + +BasicReturnMethod::BasicReturnMethod() : + _replyCode(0), + CAF_CM_INIT("BasicReturnMethod") { +} + +BasicReturnMethod::~BasicReturnMethod() { +} + +void BasicReturnMethod::init(const amqp_method_t * const method) { + CAF_CM_FUNCNAME("init"); + CAF_CM_VALIDATE_PTR(method); + CAF_CM_ASSERT(AMQP_BASIC_RETURN_METHOD == method->id); + const amqp_basic_return_t * const decoded = + reinterpret_cast(method->decoded); + _replyCode = decoded->reply_code; + _replyText = AMQUtil::amqpBytesToString(&decoded->reply_text); + _exchange = AMQUtil::amqpBytesToString(&decoded->exchange); + _routingKey = AMQUtil::amqpBytesToString(&decoded->routing_key); +} + +uint16 BasicReturnMethod::getReplyCode() { + return _replyCode; +} + +std::string BasicReturnMethod::getReplyText() { + return _replyText; +} + +std::string BasicReturnMethod::getExchange() { + return _exchange; +} + +std::string BasicReturnMethod::getRoutingKey() { + return _routingKey; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicReturnMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicReturnMethod.h new file mode 100644 index 000000000..1dccfef51 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicReturnMethod.h @@ -0,0 +1,54 @@ +/* + * Created on: May 21, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef BASICRETURNMETHOD_H_ +#define BASICRETURNMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP basic.return + */ +class BasicReturnMethod : + public TMethodImpl, + public AmqpMethods::Basic::Return { + METHOD_DECL( + AmqpMethods::Basic::Return, + AMQP_BASIC_RETURN_METHOD, + "basic.return", + true) + +public: + BasicReturnMethod(); + virtual ~BasicReturnMethod(); + +public: // IMethod + void init(const amqp_method_t * const method); + +public: // AmqpMethods::Basic::Return + uint16 getReplyCode(); + std::string getReplyText(); + std::string getExchange(); + std::string getRoutingKey(); + +private: + uint16 _replyCode; + std::string _replyText; + std::string _exchange; + std::string _routingKey; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(BasicReturnMethod); +}; +CAF_DECLARE_SMART_QI_POINTER(BasicReturnMethod); + +}} + +#endif /* BASICRETURNMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelCloseMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelCloseMethod.cpp new file mode 100644 index 000000000..fd1ff8d03 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelCloseMethod.cpp @@ -0,0 +1,50 @@ +/* + * Created on: May 17, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "ChannelCloseMethod.h" + +using namespace Caf::AmqpClient; + +ChannelCloseMethod::ChannelCloseMethod() : + _replyCode(0), + _classId(0), + _methodId(0), + CAF_CM_INIT("ChannelCloseMethod") { +} + +ChannelCloseMethod::~ChannelCloseMethod() { +} + +void ChannelCloseMethod::init(const amqp_method_t * const method) { + CAF_CM_FUNCNAME("init"); + CAF_CM_VALIDATE_PTR(method); + CAF_CM_ASSERT(AMQP_CHANNEL_CLOSE_METHOD == method->id); + const amqp_channel_close_t * const decoded = + reinterpret_cast(method->decoded); + _replyCode = decoded->reply_code; + _replyText = AMQUtil::amqpBytesToString(&decoded->reply_text); + _classId = decoded->class_id; + _methodId = decoded->method_id; +} + +uint16 ChannelCloseMethod::getReplyCode() { + return _replyCode; +} + +std::string ChannelCloseMethod::getReplyText() { + return _replyText; +} + +uint16 ChannelCloseMethod::getClassId() { + return _classId; +} + +uint16 ChannelCloseMethod::getMethodId() { + return _methodId; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelCloseMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelCloseMethod.h new file mode 100644 index 000000000..1ccf43a35 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelCloseMethod.h @@ -0,0 +1,54 @@ +/* + * Created on: May 17, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CHANNELCLOSEMETHOD_H_ +#define CHANNELCLOSEMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementaiton of AMQP channel.close + */ +class ChannelCloseMethod : + public TMethodImpl, + public AmqpMethods::Channel::Close { + METHOD_DECL( + AmqpMethods::Channel::Close, + AMQP_CHANNEL_CLOSE_METHOD, + "channel.close", + false) + +public: + ChannelCloseMethod(); + virtual ~ChannelCloseMethod(); + +public: // IMethod + void init(const amqp_method_t * const method); + +public: // AmqpMethods::Channel::Close + uint16 getReplyCode(); + std::string getReplyText(); + uint16 getClassId(); + uint16 getMethodId(); + +private: + uint16 _replyCode; + std::string _replyText; + uint16 _classId; + uint16 _methodId; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(ChannelCloseMethod); +}; +CAF_DECLARE_SMART_QI_POINTER(ChannelCloseMethod); + +}} + +#endif /* CHANNELCLOSEMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelCloseOkFromServerMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelCloseOkFromServerMethod.cpp new file mode 100644 index 000000000..5878d0628 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelCloseOkFromServerMethod.cpp @@ -0,0 +1,25 @@ +/* + * Created on: May 22, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "ChannelCloseOkFromServerMethod.h" + +using namespace Caf::AmqpClient; + +ChannelCloseOkFromServerMethod::ChannelCloseOkFromServerMethod() : + CAF_CM_INIT("ChannelCloseOkFromServerMethod") { +} + +ChannelCloseOkFromServerMethod::~ChannelCloseOkFromServerMethod() { +} + +void ChannelCloseOkFromServerMethod::init(const amqp_method_t * const method) { + CAF_CM_FUNCNAME("init"); + CAF_CM_VALIDATE_PTR(method); + CAF_CM_ASSERT(AMQP_CHANNEL_CLOSE_OK_METHOD == method->id); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelCloseOkFromServerMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelCloseOkFromServerMethod.h new file mode 100644 index 000000000..13e235776 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelCloseOkFromServerMethod.h @@ -0,0 +1,45 @@ +/* + * Created on: May 22, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CHANNELCLOSEOKFROMSERVERMETHOD_H_ +#define CHANNELCLOSEOKFROMSERVERMETHOD_H_ + +namespace Caf { namespace AmqpClient { +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP channel.close-ok (received from server) + */ +class ChannelCloseOkFromServerMethod : + public TMethodImpl, + public AmqpMethods::Channel::CloseOk { + METHOD_DECL( + AmqpMethods::Channel::CloseOk, + AMQP_CHANNEL_CLOSE_OK_METHOD, + "channel.close-ok", + false) + +public: + ChannelCloseOkFromServerMethod(); + virtual ~ChannelCloseOkFromServerMethod(); + +public: // IMethod + void init(const amqp_method_t * const method); + +public: // AmqpMethods::Channel::CloseOk + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(ChannelCloseOkFromServerMethod); +}; +CAF_DECLARE_SMART_QI_POINTER(ChannelCloseOkFromServerMethod); + +}} + +#endif /* CHANNELCLOSEOKFROMSERVERMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelCloseOkMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelCloseOkMethod.cpp new file mode 100644 index 000000000..f2c17505e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelCloseOkMethod.cpp @@ -0,0 +1,37 @@ +/* + * Created on: May 17, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "ChannelCloseOkMethod.h" + +using namespace Caf::AmqpClient; + +ChannelCloseOkMethod::ChannelCloseOkMethod() : + _isInitialized(false), + CAF_CM_INIT("ChannelCloseOkMethod") { +} + +ChannelCloseOkMethod::~ChannelCloseOkMethod() { +} + +void ChannelCloseOkMethod::init() { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _isInitialized = true; +} + +std::string ChannelCloseOkMethod::getMethodName() const { + return "channel.close-ok"; +} + +AMQPStatus ChannelCloseOkMethod::send(const SmartPtrCAmqpChannel& channel) { + CAF_CM_FUNCNAME_VALIDATE("send"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return AmqpChannel::AMQP_ChannelCloseOk(channel); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelCloseOkMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelCloseOkMethod.h new file mode 100644 index 000000000..eb5bb164e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelCloseOkMethod.h @@ -0,0 +1,44 @@ +/* + * Created on: May 17, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CHANNELCLOSEOKMETHOD_H_ +#define CHANNELCLOSEOKMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementatin of AMQP channel.close-ok + */ +class ChannelCloseOkMethod :public IServerMethod { +public: + ChannelCloseOkMethod(); + virtual ~ChannelCloseOkMethod(); + + /** + * Initialize the method + */ + void init(); + +public: // IServerMethod + std::string getMethodName() const; + + AMQPStatus send(const SmartPtrCAmqpChannel& channel); + +private: + bool _isInitialized; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(ChannelCloseOkMethod); +}; +CAF_DECLARE_SMART_POINTER(ChannelCloseOkMethod); + +}} + +#endif /* CHANNELCLOSEOKMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelOpenOkMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelOpenOkMethod.cpp new file mode 100644 index 000000000..4bc75afae --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelOpenOkMethod.cpp @@ -0,0 +1,35 @@ +/* + * Created on: May 10, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "ChannelOpenOkMethod.h" + +using namespace Caf::AmqpClient; + +ChannelOpenOkMethod::ChannelOpenOkMethod() : + CAF_CM_INIT("ChannelOpenOkMethod") { +} + +ChannelOpenOkMethod::~ChannelOpenOkMethod() { +} + +void ChannelOpenOkMethod::init(const amqp_method_t * const method) { + CAF_CM_FUNCNAME("init"); + CAF_CM_VALIDATE_PTR(method); + CAF_CM_ASSERT(AMQP_CHANNEL_OPEN_OK_METHOD == method->id); + const amqp_bytes_t * const bytes = + reinterpret_cast(method->decoded); + _channelId.CreateInstance(); + if (bytes->len) { + _channelId->memCpy(bytes->bytes, bytes->len); + } +} + +SmartPtrCDynamicByteArray ChannelOpenOkMethod::getChannelId() { + return _channelId; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelOpenOkMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelOpenOkMethod.h new file mode 100644 index 000000000..f958af774 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelOpenOkMethod.h @@ -0,0 +1,47 @@ +/* + * Created on: May 10, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CHANNELOPENOKMETHOD_H_ +#define CHANNELOPENOKMETHOD_H_ + +namespace Caf { namespace AmqpClient { +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP channel.open-ok + */ +class ChannelOpenOkMethod : + public TMethodImpl, + public AmqpMethods::Channel::OpenOk { + METHOD_DECL( + AmqpMethods::Channel::OpenOk, + AMQP_CHANNEL_OPEN_OK_METHOD, + "channel.open-ok", + false) + +public: + ChannelOpenOkMethod(); + virtual ~ChannelOpenOkMethod(); + +public: // IMethod + void init(const amqp_method_t * const method); + +public: // AmqpMethods::Channel::OpenOk + SmartPtrCDynamicByteArray getChannelId(); + +private: + SmartPtrCDynamicByteArray _channelId; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(ChannelOpenOkMethod); +}; +CAF_DECLARE_SMART_QI_POINTER(ChannelOpenOkMethod); + +}} + +#endif /* CHANNELOPENOKMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/EnvelopeImpl.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/EnvelopeImpl.cpp new file mode 100644 index 000000000..3c002e854 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/EnvelopeImpl.cpp @@ -0,0 +1,58 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "EnvelopeImpl.h" + +using namespace Caf::AmqpClient; + +EnvelopeImpl::EnvelopeImpl() : + _isInitialized(false), + _deliveryTag(0), + _redelivered(false), + CAF_CM_INIT("EnvelopeImpl") { +} + +EnvelopeImpl::~EnvelopeImpl() { +} + +void EnvelopeImpl::init( + const uint64 deliveryTag, + const bool redeliver, + const std::string& exchange, + const std::string& routingKey) { + _deliveryTag = deliveryTag; + _redelivered = redeliver; + _exchange = exchange; + _routingKey = routingKey; + _isInitialized = true; +} + +uint64 EnvelopeImpl::getDeliveryTag() { + CAF_CM_FUNCNAME_VALIDATE("getDeliveryTag"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _deliveryTag; +} + +bool EnvelopeImpl::getRedelivered() { + CAF_CM_FUNCNAME_VALIDATE("getRedelivered"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _redelivered; +} + +std::string EnvelopeImpl::getExchange() { + CAF_CM_FUNCNAME_VALIDATE("getExchange"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _exchange; +} + +std::string EnvelopeImpl::getRoutingKey() { + CAF_CM_FUNCNAME_VALIDATE("getRoutingKey"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _routingKey; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/EnvelopeImpl.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/EnvelopeImpl.h new file mode 100644 index 000000000..ff4af5e7b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/EnvelopeImpl.h @@ -0,0 +1,57 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef ENVELOPEIMPL_H_ +#define ENVELOPEIMPL_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of Envelope + */ +class EnvelopeImpl : public Envelope { +public: + EnvelopeImpl(); + virtual ~EnvelopeImpl(); + + /** + * @brief Initialize the object + * @param deliveryTag delivery tag + * @param redelivered redelivered flag + * @param exchange exchange name + * @param routingKey routing key + */ + void init( + const uint64 deliveryTag, + const bool redelivered, + const std::string& exchange, + const std::string& routingKey); + +public: // Envelope + uint64 getDeliveryTag(); + bool getRedelivered(); + std::string getExchange(); + std::string getRoutingKey(); + +private: + bool _isInitialized; + uint64 _deliveryTag; + bool _redelivered; + std::string _exchange; + std::string _routingKey; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(EnvelopeImpl); +}; +CAF_DECLARE_SMART_POINTER(EnvelopeImpl); + +}} + +#endif /* ENVELOPEIMPL_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeclareMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeclareMethod.cpp new file mode 100644 index 000000000..99cebbf35 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeclareMethod.cpp @@ -0,0 +1,56 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "ExchangeDeclareMethod.h" + +using namespace Caf::AmqpClient; + +ExchangeDeclareMethod::ExchangeDeclareMethod() : + _isInitialized(false), + _passive(false), + _durable(false), + CAF_CM_INIT("ExchangeDeclareMethod") { +} + +ExchangeDeclareMethod::~ExchangeDeclareMethod() { +} + +void ExchangeDeclareMethod::init( + const std::string& exchange, + const std::string& type, + const bool passive, + const bool durable, + const SmartPtrTable& arguments) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _exchange = exchange; + _type = type; + _passive = false; + _durable = durable; + _isInitialized = true; +} + +std::string ExchangeDeclareMethod::getMethodName() const { + return "exchange.declare"; +} + +AMQPStatus ExchangeDeclareMethod::send(const SmartPtrCAmqpChannel& channel) { + CAF_CM_FUNCNAME_VALIDATE("send"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return AmqpUtil::AMQP_ExchangeDeclare( + channel, + _exchange, + _type, + false, + _durable, + false, + NULL); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeclareMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeclareMethod.h new file mode 100644 index 000000000..63ec1351f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeclareMethod.h @@ -0,0 +1,58 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef EXCHANGEDECLAREMETHOD_H_ +#define EXCHANGEDECLAREMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP exchange.declare + */ +class ExchangeDeclareMethod : public IServerMethod { +public: + ExchangeDeclareMethod(); + virtual ~ExchangeDeclareMethod(); + + /** + * @brief Initializes the method + * @param exchange exchange name + * @param type exchange type + * @param passive passive mode call + * @param durable request a durable exchange + * @param arguments declaration arguments + */ + void init( + const std::string& exchange, + const std::string& type, + const bool passive, + const bool durable, + const SmartPtrTable& arguments); + +public: // IServerMethod + std::string getMethodName() const; + + AMQPStatus send(const SmartPtrCAmqpChannel& channel); + +private: + bool _isInitialized; + std::string _exchange; + std::string _type; + bool _passive; + bool _durable; + + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(ExchangeDeclareMethod); +}; +CAF_DECLARE_SMART_POINTER(ExchangeDeclareMethod); + +}} +#endif /* EXCHANGEDECLAREMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeclareOkMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeclareOkMethod.cpp new file mode 100644 index 000000000..c462be44d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeclareOkMethod.cpp @@ -0,0 +1,25 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "ExchangeDeclareOkMethod.h" + +using namespace Caf::AmqpClient; + +ExchangeDeclareOkMethod::ExchangeDeclareOkMethod() : + CAF_CM_INIT("ExchangeDeclareOkMethod") { +} + +ExchangeDeclareOkMethod::~ExchangeDeclareOkMethod() { +} + +void ExchangeDeclareOkMethod::init(const amqp_method_t * const method) { + CAF_CM_FUNCNAME("init"); + CAF_CM_VALIDATE_PTR(method); + CAF_CM_ASSERT(AMQP_EXCHANGE_DECLARE_OK_METHOD == method->id); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeclareOkMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeclareOkMethod.h new file mode 100644 index 000000000..ba21aa03f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeclareOkMethod.h @@ -0,0 +1,46 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef EXCHANGEDECLAREOKMETHOD_H_ +#define EXCHANGEDECLAREOKMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP exchange.declare-ok + */ +class ExchangeDeclareOkMethod : + public TMethodImpl, + public AmqpMethods::Exchange::DeclareOk { + METHOD_DECL( + AmqpMethods::Exchange::DeclareOk, + AMQP_EXCHANGE_DECLARE_OK_METHOD, + "exchange.declare-ok", + false) + +public: + ExchangeDeclareOkMethod(); + virtual ~ExchangeDeclareOkMethod(); + +public: // IMethod + void init(const amqp_method_t * const method); + +public: // AmqpMethods::Queue::DeclareOk + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(ExchangeDeclareOkMethod); +}; +CAF_DECLARE_SMART_QI_POINTER(ExchangeDeclareOkMethod); + +}} + +#endif /* EXCHANGEDECLAREOKMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeleteMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeleteMethod.cpp new file mode 100644 index 000000000..cd99d021a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeleteMethod.cpp @@ -0,0 +1,46 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "ExchangeDeleteMethod.h" + +using namespace Caf::AmqpClient; + +ExchangeDeleteMethod::ExchangeDeleteMethod() : + _isInitialized(false), + _ifUnused(false), + CAF_CM_INIT("ExchangeDeleteMethod") { +} + +ExchangeDeleteMethod::~ExchangeDeleteMethod() { +} + +void ExchangeDeleteMethod::init( + const std::string& exchange, + const bool ifUnused) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _exchange = exchange; + _ifUnused = ifUnused; + _isInitialized = true; +} + +std::string ExchangeDeleteMethod::getMethodName() const { + return "exchange.delete"; +} + +AMQPStatus ExchangeDeleteMethod::send(const SmartPtrCAmqpChannel& channel) { + CAF_CM_FUNCNAME_VALIDATE("send"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return AmqpUtil::AMQP_ExchangeDelete( + channel, + _exchange, + _ifUnused, + false); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeleteMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeleteMethod.h new file mode 100644 index 000000000..e49423bcd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeleteMethod.h @@ -0,0 +1,51 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef EXCHANGEDELETEMETHOD_H_ +#define EXCHANGEDELETEMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP exchange.delete + */ +class ExchangeDeleteMethod : public IServerMethod { +public: + ExchangeDeleteMethod(); + virtual ~ExchangeDeleteMethod(); + + /** + * @brief Initializes the method + * @param exchange exchange name + * @param ifUnused delete only if unused flag + */ + void init( + const std::string& exchange, + const bool ifUnused); + +public: // IServerMethod + std::string getMethodName() const; + + AMQPStatus send(const SmartPtrCAmqpChannel& channel); + +private: + bool _isInitialized; + std::string _exchange; + bool _ifUnused; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(ExchangeDeleteMethod); + +}; +CAF_DECLARE_SMART_POINTER(ExchangeDeleteMethod); + +}} + +#endif /* EXCHANGEDELETEMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeleteOkMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeleteOkMethod.cpp new file mode 100644 index 000000000..156d8ebd0 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeleteOkMethod.cpp @@ -0,0 +1,25 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "ExchangeDeleteOkMethod.h" + +using namespace Caf::AmqpClient; + +ExchangeDeleteOkMethod::ExchangeDeleteOkMethod() : + CAF_CM_INIT("ExchangeDeleteOkMethod") { +} + +ExchangeDeleteOkMethod::~ExchangeDeleteOkMethod() { +} + +void ExchangeDeleteOkMethod::init(const amqp_method_t * const method) { + CAF_CM_FUNCNAME("init"); + CAF_CM_VALIDATE_PTR(method); + CAF_CM_ASSERT(AMQP_EXCHANGE_DELETE_OK_METHOD == method->id); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeleteOkMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeleteOkMethod.h new file mode 100644 index 000000000..049cc50ff --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeleteOkMethod.h @@ -0,0 +1,46 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef EXCHANGEDELETEOKMETHOD_H_ +#define EXCHANGEDELETEOKMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP exchange.delete-ok + */ +class ExchangeDeleteOkMethod : + public TMethodImpl, + public AmqpMethods::Exchange::DeleteOk { + METHOD_DECL( + AmqpMethods::Exchange::DeleteOk, + AMQP_EXCHANGE_DELETE_OK_METHOD, + "exchange.delete-ok", + false) + +public: + ExchangeDeleteOkMethod(); + virtual ~ExchangeDeleteOkMethod(); + +public: // IMethod + void init(const amqp_method_t * const method); + +public: // AmqpMethods::Queue::DeclareOk + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(ExchangeDeleteOkMethod); +}; +CAF_DECLARE_SMART_QI_POINTER(ExchangeDeleteOkMethod); + +}} + +#endif /* EXCHANGEDELETEOKMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/FieldImpl.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/FieldImpl.cpp new file mode 100644 index 000000000..4d0c4fcbd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/FieldImpl.cpp @@ -0,0 +1,39 @@ +/* + * Created on: May 11, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "FieldImpl.h" + +using namespace Caf::AmqpClient; + +FieldImpl::FieldImpl() : + _type(AMQP_FIELD_TYPE_NOTSET), + _value(NULL) { +} + +FieldImpl::~FieldImpl() { + if (_value) { + g_variant_unref(_value); + } +} + +Field::AmqpFieldType FieldImpl::getAmqpType() const { + return _type; +} + +GVariant* FieldImpl::getValue() const { + return _value; +} + +void FieldImpl::setTypeAndValue(AmqpFieldType type, GVariant* value) { + if (_value) { + g_variant_unref(_value); + } + _type = type; + _value = g_variant_ref_sink(value); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/FieldImpl.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/FieldImpl.h new file mode 100644 index 000000000..48b1c8e87 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/FieldImpl.h @@ -0,0 +1,41 @@ +/* + * Created on: May 11, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef FIELDIMPL_H_ +#define FIELDIMPL_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of a Field object + */ +class FieldImpl : public Field { +public: + FieldImpl(); + virtual ~FieldImpl(); + +public: // Field + AmqpFieldType getAmqpType() const; + + GVariant* getValue() const; + + void setTypeAndValue(AmqpFieldType type, GVariant *value); + +private: + AmqpFieldType _type; + GVariant *_value; + CAF_CM_DECLARE_NOCOPY(FieldImpl); +}; +CAF_DECLARE_SMART_POINTER(FieldImpl); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/GetResponseImpl.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/GetResponseImpl.cpp new file mode 100644 index 000000000..3f778a6f6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/GetResponseImpl.cpp @@ -0,0 +1,59 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "GetResponseImpl.h" + +using namespace Caf::AmqpClient; + +GetResponseImpl::GetResponseImpl() : + _isInitialized(false), + _messageCount(0), + CAF_CM_INIT("GetResponseImpl") { +} + +GetResponseImpl::~GetResponseImpl() { +} + +void GetResponseImpl::init( + const SmartPtrEnvelope& envelope, + const AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body, + const uint32 messageCount) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _envelope = envelope; + _properties = properties; + _body = body; + _messageCount = messageCount; + _isInitialized = true; +} + +SmartPtrEnvelope GetResponseImpl::getEnvelope() { + CAF_CM_FUNCNAME_VALIDATE("getEnvelope"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _envelope; +} + +AmqpContentHeaders::SmartPtrBasicProperties GetResponseImpl::getProperties() { + CAF_CM_FUNCNAME_VALIDATE("getProperties"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _properties; +} + +SmartPtrCDynamicByteArray GetResponseImpl::getBody() { + CAF_CM_FUNCNAME_VALIDATE("getBody"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _body; +} + +uint32 GetResponseImpl::getMessageCount() { + CAF_CM_FUNCNAME_VALIDATE("getMessageCount"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _messageCount; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/GetResponseImpl.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/GetResponseImpl.h new file mode 100644 index 000000000..be5d0fc25 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/GetResponseImpl.h @@ -0,0 +1,62 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef GETRESPONSEIMPL_H_ +#define GETRESPONSEIMPL_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Impelementation of the GetResponse interface + *

+ * A class to bundle together the information from a received message. The content is + * packaged into an Envelope, BasicProperties and the body for easier consumption as + * a single unit. + */ +class GetResponseImpl : public GetResponse { +public: + GetResponseImpl(); + virtual ~GetResponseImpl(); + + /** + * @brief Object initializer + * @param envelope the message envelope + * @param properties the messsage properties + * @param body the message body in raw bytes + * @param messageCount the number of messages remaining in the queue + */ + void init( + const SmartPtrEnvelope& envelope, + const AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body, + const uint32 messageCount); + +public: // GetResponse + SmartPtrEnvelope getEnvelope(); + AmqpContentHeaders::SmartPtrBasicProperties getProperties(); + SmartPtrCDynamicByteArray getBody(); + uint32 getMessageCount(); + +private: + bool _isInitialized; + SmartPtrEnvelope _envelope; + AmqpContentHeaders::SmartPtrBasicProperties _properties; + SmartPtrCDynamicByteArray _body; + uint32 _messageCount; + + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(GetResponseImpl); +}; +CAF_DECLARE_SMART_POINTER(GetResponseImpl); + +}} + +#endif /* GETRESPONSEIMPL_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/IContentHeader.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/IContentHeader.h new file mode 100644 index 000000000..922e5fb87 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/IContentHeader.h @@ -0,0 +1,39 @@ +/* + * Created on: May 11, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef ICONTENTHEADER_H_ +#define ICONTENTHEADER_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Base interface for AMQP content header implementation objects + */ +struct __declspec(novtable) IContentHeader : public ContentHeader { + CAF_DECL_UUID("04068590-3083-446E-83AE-DACD90C0F470") + + /** + * @brief Initialize the header object from c-api properties data + * @param properties the properties data + */ + virtual void init(const SmartPtrCAmqpFrame& frame) = 0; + + /** + * @brief Return the expected method body data size + * @return the expected body size + */ + virtual uint64 getBodySize() = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(IContentHeader); + +}} + +#endif /* ICONTENTHEADER_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/IMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/IMethod.h new file mode 100644 index 000000000..1716e2f69 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/IMethod.h @@ -0,0 +1,39 @@ +/* + * Created on: May 10, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef IMETHOD_H_ +#define IMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Base interface for AMQP method implementation objects + */ +struct __declspec(novtable) IMethod : public Method { + CAF_DECL_UUID("08ba9874-b34c-4afe-bfdc-a12fffaefddb") + + /** + * @brief Initialize the object from c-api method data + * @param method the method data + */ + virtual void init(const amqp_method_t * const method) = 0; + + /** + * @retval true if the method expects a content header + * @retval false if the method does not expect a content header + */ + virtual bool hasContent() = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(IMethod); + +}} + +#endif /* IMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/IServerMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/IServerMethod.h new file mode 100644 index 000000000..51677198e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/IServerMethod.h @@ -0,0 +1,40 @@ +/* + * Created on: May 15, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef ISERVERMETHOD_H_ +#define ISERVERMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Base interface for server methods + */ +struct __declspec(novtable) IServerMethod : public ICafObject { + CAF_DECL_UUID("ce585a8d-8b49-4312-b356-6f612142b154") + + /** + * Return the method name + * @return the method name + */ + virtual std::string getMethodName() const = 0; + + /** + * Sends the command to the server + * @param channel AMQP channel + * @return the c-api AMQPStatus of the call + */ + virtual AMQPStatus send(const SmartPtrCAmqpChannel& channel) = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(IServerMethod); + +}} + +#endif /* ISERVERMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueBindMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueBindMethod.cpp new file mode 100644 index 000000000..32185790d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueBindMethod.cpp @@ -0,0 +1,51 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "QueueBindMethod.h" + +using namespace Caf::AmqpClient; + +QueueBindMethod::QueueBindMethod() : + _isInitialized(false), + CAF_CM_INIT("QueueBindMethod") { +} + +QueueBindMethod::~QueueBindMethod() { +} + +void QueueBindMethod::init( + const std::string& queue, + const std::string& exchange, + const std::string& routingKey, + const SmartPtrTable& arguments) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _queue = queue; + _exchange = exchange; + _routingKey = routingKey; + _isInitialized = true; +} + +std::string QueueBindMethod::getMethodName() const { + return "queue.bind"; +} + +AMQPStatus QueueBindMethod::send(const SmartPtrCAmqpChannel& channel) { + CAF_CM_FUNCNAME_VALIDATE("send"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return AmqpUtil::AMQP_QueueBind( + channel, + _queue, + _exchange, + _routingKey, + false, + NULL); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueBindMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueBindMethod.h new file mode 100644 index 000000000..778e28402 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueBindMethod.h @@ -0,0 +1,56 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef QUEUEBINDMETHOD_H_ +#define QUEUEBINDMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP queue.bind + */ +class QueueBindMethod : public IServerMethod { +public: + QueueBindMethod(); + virtual ~QueueBindMethod(); + + /** + * @brief Initialize the method + * @param queue queue name + * @param exchange exchange name + * @param routingKey routing key + * @param arguments binding arguments + */ + void init( + const std::string& queue, + const std::string& exchange, + const std::string& routingKey, + const SmartPtrTable& arguments); + +public: // IServerMethod + std::string getMethodName() const; + + AMQPStatus send(const SmartPtrCAmqpChannel& channel); + +private: + bool _isInitialized; + std::string _queue; + std::string _exchange; + std::string _routingKey; + + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(QueueBindMethod); +}; +CAF_DECLARE_SMART_POINTER(QueueBindMethod); + +}} + +#endif /* QUEUEBINDMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueBindOkMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueBindOkMethod.cpp new file mode 100644 index 000000000..64080153c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueBindOkMethod.cpp @@ -0,0 +1,25 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "QueueBindOkMethod.h" + +using namespace Caf::AmqpClient; + +QueueBindOkMethod::QueueBindOkMethod() : + CAF_CM_INIT("QueueBindOkMethod") { +} + +QueueBindOkMethod::~QueueBindOkMethod() { +} + +void QueueBindOkMethod::init(const amqp_method_t * const method) { + CAF_CM_FUNCNAME("init"); + CAF_CM_VALIDATE_PTR(method); + CAF_CM_ASSERT(AMQP_QUEUE_BIND_OK_METHOD == method->id); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueBindOkMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueBindOkMethod.h new file mode 100644 index 000000000..050cff04f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueBindOkMethod.h @@ -0,0 +1,46 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef QUEUEBINDOKMETHOD_H_ +#define QUEUEBINDOKMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP queue.bind-ok + */ +class QueueBindOkMethod : + public TMethodImpl, + public AmqpMethods::Queue::BindOk { + METHOD_DECL( + AmqpMethods::Queue::BindOk, + AMQP_QUEUE_BIND_OK_METHOD, + "queue.bind-ok", + false) + +public: + QueueBindOkMethod(); + virtual ~QueueBindOkMethod(); + +public: // IMethod + void init(const amqp_method_t * const method); + +public: // AmqpMethods::Queue::BindOk + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(QueueBindOkMethod); +}; +CAF_DECLARE_SMART_QI_POINTER(QueueBindOkMethod); + +}} + +#endif /* QUEUEBINDOKMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeclareMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeclareMethod.cpp new file mode 100644 index 000000000..14b13280e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeclareMethod.cpp @@ -0,0 +1,84 @@ +/* + * Created on: May 10, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "QueueDeclareMethod.h" + +using namespace Caf::AmqpClient; + +QueueDeclareMethod::QueueDeclareMethod() : + _isInitialized(false), + _passive(false), + _durable(false), + _exclusive(false), + _autoDelete(false), + _noWait(false), + CAF_CM_INIT("QueueDeclareMethod") { +} + +QueueDeclareMethod::~QueueDeclareMethod() { +} + +void QueueDeclareMethod::init() { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + init( + "", + false, + true, + true, + SmartPtrTable()); +} + +void QueueDeclareMethod::init( + const std::string& queue, + bool durable, + bool exclusive, + bool autoDelete, + const SmartPtrTable& arguments) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _queue = queue; + _passive = false; + _durable = durable; + _exclusive = exclusive; + _autoDelete = autoDelete; + _noWait = false; + _isInitialized = true; +} + +void QueueDeclareMethod::initPassive( + const std::string& queue) { + CAF_CM_FUNCNAME_VALIDATE("initPassive"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _queue = queue; + _passive = true; + _noWait = false; + _isInitialized = true; +} + +std::string QueueDeclareMethod::getMethodName() const { + return "queue.declare"; +} + +AMQPStatus QueueDeclareMethod::send(const SmartPtrCAmqpChannel& channel) { + CAF_CM_FUNCNAME_VALIDATE("send"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return AmqpUtil::AMQP_QueueDeclare( + channel, + _queue, + _passive, + _durable, + _exclusive, + _autoDelete, + _noWait, + NULL); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeclareMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeclareMethod.h new file mode 100644 index 000000000..08eb30329 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeclareMethod.h @@ -0,0 +1,85 @@ +/* + * Created on: May 10, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef QUEUEDECLAREMETHOD_H_ +#define QUEUEDECLAREMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP queue.declare + */ +class QueueDeclareMethod : + public IServerMethod { +public: + QueueDeclareMethod(); + virtual ~QueueDeclareMethod(); + + /** + * @brief Initialize the method using defaults + *

+ * The defaults are: + *

+ * + * + * + * + * + * + * + *
ParameterValue
queueblank - the server will generate a queue name
durablefalse - the queue will not be durable
exclusivetrue - the queue will be exclusive to this conenction
autoDeletetrue - the queue will be deleted when no longer used
+ */ + void init(); + + /** + * @brief Initialize the method + * @param queue queue name + * @param durable durable queue flag + * @param exclusive exclusive queue flag + * @param autoDelete delete when no longer in use flag + * @param arguments method arguments + */ + void init( + const std::string& queue, + bool durable, + bool exclusive, + bool autoDelete, + const SmartPtrTable& arguments); + + /** + * @brief Initialize the method in passive mode + * @param queue queue name + */ + void initPassive( + const std::string& queue); + +public: // IServerMethod + std::string getMethodName() const; + + AMQPStatus send(const SmartPtrCAmqpChannel& channel); + +private: + bool _isInitialized; + std::string _queue; + bool _passive; + bool _durable; + bool _exclusive; + bool _autoDelete; + bool _noWait; + + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(QueueDeclareMethod); +}; +CAF_DECLARE_SMART_POINTER(QueueDeclareMethod); + +}} + +#endif /* QUEUEDECLAREMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeclareOkMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeclareOkMethod.cpp new file mode 100644 index 000000000..8bc61c547 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeclareOkMethod.cpp @@ -0,0 +1,44 @@ +/* + * Created on: May 11, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "QueueDeclareOkMethod.h" + +using namespace Caf::AmqpClient; + +QueueDeclareOkMethod::QueueDeclareOkMethod() : + _messageCount(0), + _consumerCount(0), + CAF_CM_INIT("QueueDeclareOkMethod") { +} + +QueueDeclareOkMethod::~QueueDeclareOkMethod() { +} + +void QueueDeclareOkMethod::init(const amqp_method_t * const method) { + CAF_CM_FUNCNAME("init"); + CAF_CM_VALIDATE_PTR(method); + CAF_CM_ASSERT(AMQP_QUEUE_DECLARE_OK_METHOD == method->id); + const amqp_queue_declare_ok_t * const decoded = + reinterpret_cast(method->decoded); + _queueName = AMQUtil::amqpBytesToString(&decoded->queue); + _messageCount = decoded->message_count; + _consumerCount = decoded->consumer_count; +} + +std::string QueueDeclareOkMethod::getQueueName() { + return _queueName; +} + +uint32 QueueDeclareOkMethod::getMessageCount() { + return _messageCount; +} + +uint32 QueueDeclareOkMethod::getConsumerCount() { + return _consumerCount; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeclareOkMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeclareOkMethod.h new file mode 100644 index 000000000..5ff5bd566 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeclareOkMethod.h @@ -0,0 +1,52 @@ +/* + * Created on: May 11, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef QUEUEDECLAREOKMETHOD_H_ +#define QUEUEDECLAREOKMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP queue.declare-ok + */ +class QueueDeclareOkMethod : + public TMethodImpl, + public AmqpMethods::Queue::DeclareOk { + METHOD_DECL( + AmqpMethods::Queue::DeclareOk, + AMQP_QUEUE_DECLARE_OK_METHOD, + "queue.declare-ok", + false) + +public: + QueueDeclareOkMethod(); + virtual ~QueueDeclareOkMethod(); + +public: // IMethod + void init(const amqp_method_t * const method); + +public: // AmqpMethods::Queue::DeclareOk + std::string getQueueName(); + uint32 getMessageCount(); + uint32 getConsumerCount(); + +private: + std::string _queueName; + uint32 _messageCount; + uint32 _consumerCount; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(QueueDeclareOkMethod); +}; +CAF_DECLARE_SMART_QI_POINTER(QueueDeclareOkMethod); + +}} + +#endif /* QUEUEDECLAREOKMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeleteMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeleteMethod.cpp new file mode 100644 index 000000000..e3a71bd46 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeleteMethod.cpp @@ -0,0 +1,50 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "QueueDeleteMethod.h" + +using namespace Caf::AmqpClient; + +QueueDeleteMethod::QueueDeleteMethod() : + _isInitialized(false), + _ifUnused(false), + _ifEmpty(false), + CAF_CM_INIT("QueueDeleteMethod") { +} + +QueueDeleteMethod::~QueueDeleteMethod() { +} + +void QueueDeleteMethod::init( + const std::string& queue, + const bool ifUnused, + const bool ifEmpty) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _queue = queue; + _ifUnused = ifUnused; + _ifEmpty = ifEmpty; + _isInitialized = true; +} + +std::string QueueDeleteMethod::getMethodName() const { + return "queue.delete"; +} + +AMQPStatus QueueDeleteMethod::send(const SmartPtrCAmqpChannel& channel) { + CAF_CM_FUNCNAME_VALIDATE("send"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return AmqpUtil::AMQP_QueueDelete( + channel, + _queue, + _ifUnused, + _ifEmpty, + false); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeleteMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeleteMethod.h new file mode 100644 index 000000000..587511530 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeleteMethod.h @@ -0,0 +1,54 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef QUEUEDELETEMETHOD_H_ +#define QUEUEDELETEMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP queue.delete + */ +class QueueDeleteMethod : public IServerMethod { +public: + QueueDeleteMethod(); + virtual ~QueueDeleteMethod(); + + /** + * @brief Initialize the method + * @param queue queue name + * @param ifUnused delete if queue is not in use flag + * @param ifEmpty delete is queue is empty flag + */ + void init( + const std::string& queue, + const bool ifUnused, + const bool ifEmpty); + +public: // IServerMethod + std::string getMethodName() const; + + AMQPStatus send(const SmartPtrCAmqpChannel& channel); + +private: + bool _isInitialized; + std::string _queue; + bool _ifUnused; + bool _ifEmpty; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(QueueDeleteMethod); + +}; +CAF_DECLARE_SMART_POINTER(QueueDeleteMethod); + +}} + +#endif /* QUEUEDELETEMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeleteOkMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeleteOkMethod.cpp new file mode 100644 index 000000000..6c6cff89b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeleteOkMethod.cpp @@ -0,0 +1,33 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "QueueDeleteOkMethod.h" + +using namespace Caf::AmqpClient; + +QueueDeleteOkMethod::QueueDeleteOkMethod() : + _messageCount(0), + CAF_CM_INIT("QueueDeleteOkMethod") { +} + +QueueDeleteOkMethod::~QueueDeleteOkMethod() { +} + +void QueueDeleteOkMethod::init(const amqp_method_t * const method) { + CAF_CM_FUNCNAME("init"); + CAF_CM_VALIDATE_PTR(method); + CAF_CM_ASSERT(AMQP_QUEUE_DELETE_OK_METHOD == method->id); + const amqp_queue_delete_ok_t * const decoded = + reinterpret_cast(method->decoded); + _messageCount = decoded->message_count; +} + +uint32 QueueDeleteOkMethod::getMessageCount() { + return _messageCount; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeleteOkMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeleteOkMethod.h new file mode 100644 index 000000000..267d80b63 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeleteOkMethod.h @@ -0,0 +1,48 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef QUEUEDELETEOKMETHOD_H_ +#define QUEUEDELETEOKMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP queue.delete-ok + */ +class QueueDeleteOkMethod : + public TMethodImpl, + public AmqpMethods::Queue::DeleteOk { + METHOD_DECL( + AmqpMethods::Queue::DeleteOk, + AMQP_QUEUE_DELETE_OK_METHOD, + "queue.delete-ok", + false) + +public: + QueueDeleteOkMethod(); + virtual ~QueueDeleteOkMethod(); + +public: // IMethod + void init(const amqp_method_t * const method); + +public: // AmqpMethods::Queue::DeclareOk + uint32 getMessageCount(); + +private: + uint32 _messageCount; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(QueueDeleteOkMethod); +}; +CAF_DECLARE_SMART_QI_POINTER(QueueDeleteOkMethod); + +}} + +#endif /* QUEUEDELETEOKMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueuePurgeMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueuePurgeMethod.cpp new file mode 100644 index 000000000..a55cc3b9e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueuePurgeMethod.cpp @@ -0,0 +1,42 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "QueuePurgeMethod.h" + +using namespace Caf::AmqpClient; + +QueuePurgeMethod::QueuePurgeMethod() : + _isInitialized(false), + CAF_CM_INIT("QueuePurgeMethod") { +} + +QueuePurgeMethod::~QueuePurgeMethod() { +} + +void QueuePurgeMethod::init( + const std::string& queue) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _queue = queue; + _isInitialized = true; +} + +std::string QueuePurgeMethod::getMethodName() const { + return "queue.purge"; +} + +AMQPStatus QueuePurgeMethod::send(const SmartPtrCAmqpChannel& channel) { + CAF_CM_FUNCNAME_VALIDATE("send"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return AmqpUtil::AMQP_QueuePurge( + channel, + _queue, + false); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueuePurgeMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueuePurgeMethod.h new file mode 100644 index 000000000..39ac9ecb6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueuePurgeMethod.h @@ -0,0 +1,48 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef QUEUEPURGEMETHOD_H_ +#define QUEUEPURGEMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP queue.purge + */ +class QueuePurgeMethod : public IServerMethod { +public: + QueuePurgeMethod(); + virtual ~QueuePurgeMethod(); + + /** + * @brief Initialize the method + * @param queue queue name + */ + void init( + const std::string& queue); + +public: // IServerMethod + std::string getMethodName() const; + + AMQPStatus send(const SmartPtrCAmqpChannel& channel); + +private: + bool _isInitialized; + std::string _queue; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(QueuePurgeMethod); + +}; +CAF_DECLARE_SMART_POINTER(QueuePurgeMethod); + +}} + +#endif /* QUEUEPURGEMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueuePurgeOkMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueuePurgeOkMethod.cpp new file mode 100644 index 000000000..6ee09b898 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueuePurgeOkMethod.cpp @@ -0,0 +1,33 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "QueuePurgeOkMethod.h" + +using namespace Caf::AmqpClient; + +QueuePurgeOkMethod::QueuePurgeOkMethod() : + _messageCount(0), + CAF_CM_INIT("QueuePurgeOkMethod") { +} + +QueuePurgeOkMethod::~QueuePurgeOkMethod() { +} + +void QueuePurgeOkMethod::init(const amqp_method_t * const method) { + CAF_CM_FUNCNAME("init"); + CAF_CM_VALIDATE_PTR(method); + CAF_CM_ASSERT(AMQP_QUEUE_PURGE_OK_METHOD == method->id); + const amqp_queue_purge_ok_t * const decoded = + reinterpret_cast(method->decoded); + _messageCount = decoded->message_count; +} + +uint32 QueuePurgeOkMethod::getMessageCount() { + return _messageCount; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueuePurgeOkMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueuePurgeOkMethod.h new file mode 100644 index 000000000..49b64c5e9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueuePurgeOkMethod.h @@ -0,0 +1,48 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef QueuePurgeOKMETHOD_H_ +#define QueuePurgeOKMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP queue.purge-ok + */ +class QueuePurgeOkMethod : + public TMethodImpl, + public AmqpMethods::Queue::PurgeOk { + METHOD_DECL( + AmqpMethods::Queue::PurgeOk, + AMQP_QUEUE_PURGE_OK_METHOD, + "queue.purge-ok", + false) + +public: + QueuePurgeOkMethod(); + virtual ~QueuePurgeOkMethod(); + +public: // IMethod + void init(const amqp_method_t * const method); + +public: // AmqpMethods::Queue::PurgeOk + uint32 getMessageCount(); + +private: + uint32 _messageCount; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(QueuePurgeOkMethod); +}; +CAF_DECLARE_SMART_QI_POINTER(QueuePurgeOkMethod); + +}} + +#endif /* QueuePurgeOKMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueUnbindMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueUnbindMethod.cpp new file mode 100644 index 000000000..d0168a261 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueUnbindMethod.cpp @@ -0,0 +1,49 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "QueueUnbindMethod.h" + +using namespace Caf::AmqpClient; + +QueueUnbindMethod::QueueUnbindMethod() : + _isInitialized(false), + CAF_CM_INIT("QueueUnbindMethod") { +} + +QueueUnbindMethod::~QueueUnbindMethod() { +} + +void QueueUnbindMethod::init( + const std::string& queue, + const std::string& exchange, + const std::string& routingKey, + const SmartPtrTable& arguments) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _queue = queue; + _exchange = exchange; + _routingKey = routingKey; + _isInitialized = true; +} + +std::string QueueUnbindMethod::getMethodName() const { + return "queue.unbind"; +} + +AMQPStatus QueueUnbindMethod::send(const SmartPtrCAmqpChannel& channel) { + CAF_CM_FUNCNAME_VALIDATE("send"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return AmqpUtil::AMQP_QueueUnbind( + channel, + _queue, + _exchange, + _routingKey, + NULL); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueUnbindMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueUnbindMethod.h new file mode 100644 index 000000000..4c1a81bdf --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueUnbindMethod.h @@ -0,0 +1,56 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef QUEUEUNBINDMETHOD_H_ +#define QUEUEUNBINDMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP queue.unbind + */ +class QueueUnbindMethod : public IServerMethod { +public: + QueueUnbindMethod(); + virtual ~QueueUnbindMethod(); + + /** + * @brief Initialize the method + * @param queue queue name + * @param exchange exchange name + * @param routingKey routing key + * @param arguments method arguments + */ + void init( + const std::string& queue, + const std::string& exchange, + const std::string& routingKey, + const SmartPtrTable& arguments); + +public: // IServerMethod + std::string getMethodName() const; + + AMQPStatus send(const SmartPtrCAmqpChannel& channel); + +private: + bool _isInitialized; + std::string _queue; + std::string _exchange; + std::string _routingKey; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(QueueUnbindMethod); + +}; +CAF_DECLARE_SMART_POINTER(QueueUnbindMethod); + +}} + +#endif /* QUEUEUNBINDMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueUnbindOkMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueUnbindOkMethod.cpp new file mode 100644 index 000000000..db7f3a7cf --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueUnbindOkMethod.cpp @@ -0,0 +1,25 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "QueueUnbindOkMethod.h" + +using namespace Caf::AmqpClient; + +QueueUnbindOkMethod::QueueUnbindOkMethod() : + CAF_CM_INIT("QueueUnbindOkMethod") { +} + +QueueUnbindOkMethod::~QueueUnbindOkMethod() { +} + +void QueueUnbindOkMethod::init(const amqp_method_t * const method) { + CAF_CM_FUNCNAME("init"); + CAF_CM_VALIDATE_PTR(method); + CAF_CM_ASSERT(AMQP_QUEUE_UNBIND_OK_METHOD == method->id); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueUnbindOkMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueUnbindOkMethod.h new file mode 100644 index 000000000..fe618982b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueUnbindOkMethod.h @@ -0,0 +1,46 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef QUEUEUNBINDOKMETHOD_H_ +#define QUEUEUNBINDOKMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP queue.ubind-ok + */ +class QueueUnbindOkMethod : + public TMethodImpl, + public AmqpMethods::Queue::UnbindOk { + METHOD_DECL( + AmqpMethods::Queue::UnbindOk, + AMQP_QUEUE_UNBIND_OK_METHOD, + "queue.unbind-ok", + false) + +public: + QueueUnbindOkMethod(); + virtual ~QueueUnbindOkMethod(); + +public: // IMethod + void init(const amqp_method_t * const method); + +public: // AmqpMethods::Queue::UnbindOk + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(QueueUnbindOkMethod); +}; +CAF_DECLARE_SMART_QI_POINTER(QueueUnbindOkMethod); + +}} + +#endif /* QUEUEUNBINDOKMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/TMethodImpl.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/TMethodImpl.h new file mode 100644 index 000000000..c945f664d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/TMethodImpl.h @@ -0,0 +1,60 @@ +/* + * Created on: May 11, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef TMETHODIMPL_H_ +#define TMETHODIMPL_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Template implementing the static creator function for AMQP method implementations + */ +template +class TMethodImpl : public IMethod { +public: + /** + * @brief Create the method object + * @return the method object + */ + static SmartPtrIMethod Creator(); +}; + +template +SmartPtrIMethod TMethodImpl::Creator() { + TCafSmartPtr > method; + method.CreateInstance(); + return method; +} + +}} + +#define METHOD_DECL(_amqpImpl_, _num_, _name_, _has_content_) \ + CAF_BEGIN_QI() \ + CAF_QI_ENTRY(IMethod) \ + CAF_QI_ENTRY(_amqpImpl_) \ + CAF_END_QI() \ + public: \ + bool hasContent() { \ + return _has_content_; \ + } \ + uint16 getProtocolClassId() { \ + return (uint16)((_num_ & 0xffff0000) >> 16); \ + } \ + \ + uint16 getProtocolMethodId() { \ + return (uint16)(_num_ & 0x0000ffff); \ + } \ + \ + virtual std::string getProtocolMethodName() { \ + return _name_; \ + } + +#endif /* TMETHODIMPL_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/amqpImplInt.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/amqpImplInt.h new file mode 100644 index 000000000..83b48e232 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/amqpImplInt.h @@ -0,0 +1,63 @@ + /* + * Created on: May 10, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPMETHODIMPLINT_H_ +#define AMQPMETHODIMPLINT_H_ + +using namespace Caf::AmqpClient; + +#include "IMethod.h" +#include "TMethodImpl.h" +#include "IContentHeader.h" +#include "IServerMethod.h" + +#include "AMQPImpl.h" +#include "FieldImpl.h" +#include "EnvelopeImpl.h" +#include "GetResponseImpl.h" + +#include "BasicProperties.h" +#include "BasicAckMethod.h" +#include "BasicGetMethod.h" +#include "BasicGetOkMethod.h" +#include "BasicGetEmptyMethod.h" +#include "BasicPublishMethod.h" +#include "BasicConsumeMethod.h" +#include "BasicConsumeOkMethod.h" +#include "BasicDeliverMethod.h" +#include "BasicCancelMethod.h" +#include "BasicCancelOkMethod.h" +#include "BasicReturnMethod.h" +#include "BasicRecoverMethod.h" +#include "BasicRecoverOkMethod.h" +#include "BasicQosMethod.h" +#include "BasicQosOkMethod.h" +#include "BasicRejectMethod.h" + +#include "ChannelOpenOkMethod.h" +#include "ChannelCloseMethod.h" +#include "ChannelCloseOkMethod.h" +#include "ChannelCloseOkFromServerMethod.h" + +#include "ExchangeDeclareMethod.h" +#include "ExchangeDeclareOkMethod.h" +#include "ExchangeDeleteMethod.h" +#include "ExchangeDeleteOkMethod.h" + +#include "QueueDeclareMethod.h" +#include "QueueDeclareOkMethod.h" +#include "QueueDeleteMethod.h" +#include "QueueDeleteOkMethod.h" +#include "QueuePurgeMethod.h" +#include "QueuePurgeOkMethod.h" +#include "QueueBindMethod.h" +#include "QueueBindOkMethod.h" +#include "QueueUnbindMethod.h" +#include "QueueUnbindOkMethod.h" + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/stdafx.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/stdafx.h new file mode 100644 index 000000000..3cc842b50 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/stdafx.h @@ -0,0 +1,16 @@ +/* + * Created on: May 10, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPIMPL_STDAFX_H_ +#define AMQPIMPL_STDAFX_H_ + +#include "../stdafx.h" +#include "../AMQUtil.h" +#include "amqpImplInt.h" + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/api/AMQExceptions.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/api/AMQExceptions.h new file mode 100644 index 000000000..9ff2d7bd8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/api/AMQExceptions.h @@ -0,0 +1,109 @@ +/* + * Created on: May 3, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPCLIENTAPI_AMQEXCEPTIONS_H_ +#define AMQPCLIENTAPI_AMQEXCEPTIONS_H_ + +#define AMQP_CM_DECLARE_EXCEPTION_CLASS(_exclass_) \ +class AMQPCLIENT_LINKAGE _exclass_ : public Caf::CCafException { \ +public: \ + _exclass_(); \ + virtual ~_exclass_(); \ + void throwSelf(); \ + void throwAddRefedSelf(); \ +private: \ + _exclass_(const _exclass_ &); \ + _exclass_ & operator=(const _exclass_ &); \ +}; \ +typedef TCafSmartPtr<_exclass_, TCafObject<_exclass_> > SmartPtr##_exclass_ + +#define AMQP_CM_DEFINE_EXCEPTION_CLASS(_exclass_) \ + _exclass_::_exclass_() : CCafException( #_exclass_ ) {} \ + _exclass_::~_exclass_() {} \ + void _exclass_::throwSelf() { throw this; } \ + void _exclass_::throwAddRefedSelf() { this->AddRef(); throw this; } + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @brief Exceptions defined by this library + */ +namespace AmqpExceptions { + +/** @brief Unmapped AMQP exception */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(AmqpException); + +/** @brief AMQP_ERROR_TIMEOUT exception */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(AmqpTimeoutException); + +/** @brief AMQP_ERROR_NO_MEMORY exception */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(AmqpNoMemoryException); + +/** @brief AMQP_ERROR_INVALID_HANDLE exception */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(AmqpInvalidHandleException); + +/** @brief AMQP_ERROR_INVALID_ARGUMENT exception */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(AmqpInvalidArgumentException); + +/** @brief AMQP_ERROR_WRONG_STATE exception */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(AmqpWrongStateException); + +/** @brief AMQP_ERROR_TOO_MANY_CHANNELS exception */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(AmqpTooManyChannelsException); + +/** @brief AMQP_ERROR_QUEUE_FULL exception */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(AmqpQueueFullException); + +/** @brief AMQP_ERROR_FRAME_TOO_LARGE exception */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(AmqpFrameTooLargeException); + +/** @brief AMQP_ERROR_IO_ERROR exception */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(AmqpIoErrorException); + +/** @brief AMQP_ERROR_PROTOCOL_ERROR exception */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(AmqpProtocolErrorException); + +/** @brief AMQP_ERROR_UNIMPLEMENTED exception */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(AmqpUnimplementedException); + +/** @brief AMQP_ERROR_IO_INTERRUPTED exception */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(AmqpIoInterruptedException); + +// Processing exceptions + +/** @brief Unexpected frame */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(UnexpectedFrameException); + +/** @brief Unknown class or method */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(UnknownClassOrMethodException); + +/** @brief Connection is closed */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(ConnectionClosedException); + +/** @brief Channel is closed */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(ChannelClosedException); + +/** @brief Connection closed because of an error */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(ConnectionUnexpectedCloseException); + +/** @brief Connection closed because of an I/O error */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(ConnectionClosedByIOException); + +/** @brief Channel closed by server because of an error */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(ChannelClosedByServerException); + +/** @brief Channel closed by the application because it is shutting down */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(ChannelClosedByShutdownException); + +/** @brief Channel closed by the application user under normal circumstances */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(ChannelClosedByUserException); + +}}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/api/Address.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/api/Address.h new file mode 100644 index 000000000..121c52d8f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/api/Address.h @@ -0,0 +1,90 @@ +/* + * Created on: May 4, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPCLIENTAPI_ADDRESS_H_ +#define AMQPCLIENTAPI_ADDRESS_H_ + +namespace Caf { namespace AmqpClient { + +/** Supported Protocols */ +typedef enum { + PROTOCOL_AMQP = 0, + PROTOCOL_AMQPS, + PROTOCOL_TUNNEL +} Protocol; + +/** + * @author mdonahue + * @brief A representation of a broker network address + */ +class Address { +public: + Address(); + virtual ~Address(); + +public: + /** + * @brief Construct an address from a protocol, host name, and port number + * @param protocol the communication protocol (tcp, ssl, etc.) + * @param host the host name or dotted ip address + * @param port the port number + */ + void initialize( + const std::string& protocol, + const std::string& host, + const uint32& port, + const std::string& virtualHost = std::string()); + + /** + * @return the protocol + */ + Protocol getProtocol() const; + + /** + * @return the protocol + */ + std::string getProtocolStr() const; + + /** + * @return the host name + */ + std::string getHost() const; + + /** + * @return the port number + */ + uint32 getPort() const; + + std::string getVirtualHost() const; + + std::string toString() const; + +private: + Protocol translateProtocol( + const std::string& protocol, + const std::string& host) const; + +private: + bool _isInitialized; + std::string _protocolStr; + Protocol _protocol; + std::string _host; + uint32 _port; + std::string _virtualHost; + std::string _toString; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(Address); +}; +CAF_DECLARE_SMART_POINTER(Address); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/api/AmqpContentHeaders.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/api/AmqpContentHeaders.h new file mode 100644 index 000000000..8a932fda9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/api/AmqpContentHeaders.h @@ -0,0 +1,199 @@ +/* + * Created on: May 14, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPCLIENTAPI_AMQPCONTENTHEADERS_H_ +#define AMQPCLIENTAPI_AMQPCONTENTHEADERS_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @ingroup AmqpApi + * @brief AMQP content header objects */ +namespace AmqpContentHeaders { + +/** @brief content type property is present */ +extern AMQPCLIENT_LINKAGE const uint32 BASIC_PROPERTY_CONTENT_TYPE_FLAG; +/** @brief content encoding property is present */ +extern AMQPCLIENT_LINKAGE const uint32 BASIC_PROPERTY_CONTENT_ENCODING_FLAG; +/** @brief headers are present */ +extern AMQPCLIENT_LINKAGE const uint32 BASIC_PROPERTY_HEADERS_FLAG; +/** @brief delivery mode property is present */ +extern AMQPCLIENT_LINKAGE const uint32 BASIC_PROPERTY_DEVLIVERY_MODE_FLAG; +/** @brief priority property is present */ +extern AMQPCLIENT_LINKAGE const uint32 BASIC_PROPERTY_PRIORITY_FLAG; +/** @brief correlation id property is present */ +extern AMQPCLIENT_LINKAGE const uint32 BASIC_PROPERTY_CORRELATION_ID_FLAG; +/** @brief reply to property is present */ +extern AMQPCLIENT_LINKAGE const uint32 BASIC_PROPERTY_REPLY_TO_FLAG; +/** @brief expiration property is present */ +extern AMQPCLIENT_LINKAGE const uint32 BASIC_PROPERTY_EXPIRATION_FLAG; +/** @brief message id property is present */ +extern AMQPCLIENT_LINKAGE const uint32 BASIC_PROPERTY_MESSAGE_ID_FLAG; +/** @brief timestamp property is present */ +extern AMQPCLIENT_LINKAGE const uint32 BASIC_PROPERTY_TIMESTAMP_FLAG; +/** @brief type property is present */ +extern AMQPCLIENT_LINKAGE const uint32 BASIC_PROPERTY_TYPE_FLAG; +/** @brief user id property is present */ +extern AMQPCLIENT_LINKAGE const uint32 BASIC_PROPERTY_USER_ID_FLAG; +/** @brief app id property is present */ +extern AMQPCLIENT_LINKAGE const uint32 BASIC_PROPERTY_APP_ID_FLAG; +/** @brief cluster id property is present */ +extern AMQPCLIENT_LINKAGE const uint32 BASIC_PROPERTY_CLUSTER_ID_FLAG; + +/** + * @author mdonahue + * @ingroup AmqpApi + * @brief Basic properties class + *

+ * Review the AMQP protocol documentation for more information. + */ +struct __declspec(novtable) BasicProperties : public ContentHeader { + CAF_DECL_UUID("A6DEE271-36C7-4B46-8EA8-F1F0E3493FC4") + + /** @return are the headers available? */ + virtual bool areHeadersAvailable() = 0; + + /** + * @remark + * Use the binary 'and' (&) to test the flags against the + * BASIC_PROPERTY_XXXXX_FLAGS + * @return the bits representing the properties present in the object + */ + virtual uint32 getFlags() = 0; + + /** @return the content type */ + virtual std::string getContentType() = 0; + + /** @brief Set the content type */ + virtual void setContentType(const std::string& contentType) = 0; + + /** @return the content encoding */ + virtual std::string getContentEncoding() = 0; + + /** @brief Set the content encoding */ + virtual void setContentEncoding(const std::string& contentEncoding) = 0; + + /** @return the message headers */ + virtual SmartPtrTable getHeaders() = 0; + + /** @brief Set the headers */ + virtual void setHeaders(const SmartPtrTable& headers) = 0; + + /** @return the delivery mode */ + virtual uint8 getDeliveryMode() = 0; + + /** @brief Set the delivery mode */ + virtual void setDeliveryMode(const uint8 deliveryMode) = 0; + + /** @return the priority */ + virtual uint8 getPriority() = 0; + + /** @brief Set the priority */ + virtual void setPriority(const uint8 priority) = 0; + + /** @return the correlation id */ + virtual std::string getCorrelationId() = 0; + + /** @brief Set the correlation id */ + virtual void setCorrelationId(const std::string& correlationId) = 0; + + /** @return the reply to */ + virtual std::string getReplyTo() = 0; + + /** @brief Set the reply to */ + virtual void setReplyTo(const std::string& replyTo) = 0; + + /** @return the expiration */ + virtual std::string getExpiration() = 0; + + /** @brief Set the expiration */ + virtual void setExpiration(const std::string& expiration) = 0; + + /** @return the message id */ + virtual std::string getMessageId() = 0; + + /** @brief Set the message id */ + virtual void setMessageId(const std::string& messageId) = 0; + + /** @return the timestamp */ + virtual uint64 getTimestamp() = 0; + + /** @brief Set the timestamp */ + virtual void setTimestamp(const uint64 timestamp) = 0; + + /** @return the type */ + virtual std::string getType() = 0; + + /** @brief set the type */ + virtual void setType(const std::string& type) = 0; + + /** @return the user id */ + virtual std::string getUserId() = 0; + + /** @brief Set the user id */ + virtual void setUserId(const std::string& userId) = 0; + + /** @return the app id */ + virtual std::string getAppId() = 0; + + /** @brief Set the app id */ + virtual void setAppId(const std::string& appId) = 0; + + /** @return the cluster id */ + virtual std::string getClusterId() = 0; + + /** @brief Set the cluster id */ + virtual void setClusterId(const std::string& clusterId) = 0; +}; +CAF_DECLARE_SMART_POINTER(BasicProperties); + +/** + * @author mdonahue + * @ingroup AmqpApi + * @brief Create a #Caf::AmqpClient::AmqpContentHeaders::BasicProperties object to be + * sent with a message. + *

+ * The object is created with no fields set. You must call the setXXX + * methods before publishing the message. + * @return an unpopulated basic properties object + */ +SmartPtrBasicProperties AMQPCLIENT_LINKAGE createBasicProperties(); + +/** + * @author mdonahue + * @ingroup AmqpApi + * @brief Create an object containing #Caf::AmqpClient::AmqpContentHeaders::BasicProperties + * to be sent with a message + *

+ * Set the flags property to the binary 'or' (|) of + * BASIC_PROPERTY_XXXX_FLAG constants representing the fields present. + *

+ * Use 0, std::string() or + * SmartPtrTable() to skip initialization of fields not included + * in the object. + * @return a basic properties object + */ +SmartPtrBasicProperties AMQPCLIENT_LINKAGE createBasicProperties( + const uint32 flags, + const std::string& contentType, + const std::string& contentEncoding, + const SmartPtrTable& headers, + const uint8 deliveryMode, + const uint8 priority, + const std::string& correlationId, + const std::string& replyTo, + const std::string& expiration, + const std::string& messageId, + const uint64 timestamp, + const std::string& type, + const std::string& userId, + const std::string& appId, + const std::string& clusterId); +}}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/api/AmqpMethods.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/api/AmqpMethods.h new file mode 100644 index 000000000..035c7bfd0 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/api/AmqpMethods.h @@ -0,0 +1,298 @@ +/* + * Created on: May 10, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPCLIENTAPI_AMQPMETHODS_H_ +#define AMQPCLIENTAPI_AMQPMETHODS_H_ + +namespace Caf { namespace AmqpClient { namespace AmqpMethods { + +#if (1) // basic +/** + * @brief AMQP Basic methods + * @ingroup AmqpApi + */ +namespace Basic { + +/** + * @ingroup AmqpApi + * @brief Interface representing the basic.get-ok method parameters + */ +struct __declspec(novtable) GetOk : public Method { + CAF_DECL_UUID("A3CD4488-B600-4AC6-9513-03021AC06345") + + /** @return the delivery tag used for basic.ack calls */ + virtual uint64 getDeliveryTag() = 0; + + /** + * @retval true if the message was redelivered + * @retval false if the message has not been redlivered + */ + virtual bool getRedelivered() = 0; + + /** @return the name of the exchange supplying the message */ + virtual std::string getExchange() = 0; + + /** @return the message's routing key */ + virtual std::string getRoutingKey() = 0; + + /** @return the number of messages remaining in the queue */ + virtual uint32 getMessageCount() = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(GetOk); + +/** + * @ingroup AmqpApi + * @brief Interface representing the basic.get-empty method parameters + */ +struct __declspec(novtable) GetEmpty : public Method { + CAF_DECL_UUID("6bcd3e9e-e2b1-4824-b455-acad073737c5") +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(GetEmpty); + +/** + * @ingroup AmqpApi + * @brief Interface representing the basic.consume-ok method parameters + */ +struct __declspec(novtable) ConsumeOk : public Method { + CAF_DECL_UUID("29E385DA-37FB-48E4-9F6D-463555C9DDDC") + + virtual std::string getConsumerTag() = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(ConsumeOk); + +/** + * @ingroup AmqpApi + * @brief Interface representing the basic.deliver method parameters + */ +struct __declspec(novtable) Deliver : public Method { + CAF_DECL_UUID("2AD74C5E-CC9D-4A6C-9738-DA836BC25FCA") + + /** @return the consumer tag associated with the consumer */ + virtual std::string getConsumerTag() = 0; + + /** @return the delivery tag used for basic.ack calls */ + virtual uint64 getDeliveryTag() = 0; + + /** + * @retval true if the message was redelivered + * @retval false if the message has not been redlivered + */ + virtual bool getRedelivered() = 0; + + /** @return the name of the exchange supplying the message */ + virtual std::string getExchange() = 0; + + /** @return the message's routing key */ + virtual std::string getRoutingKey() = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(Deliver); + +/** + * @ingroup AmqpApi + * @brief Interface representing the basic.consume-ok method parameters + */ +struct __declspec(novtable) CancelOk : public Method { + CAF_DECL_UUID("759CEE2C-FDA5-4A2A-BFE0-617A879D05BF") + + /** @return the consumer tag associated with the consumer */ + virtual std::string getConsumerTag() = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(CancelOk); + +/** + * @ingroup AmqpApi + * @brief Interface representing the basic.return method parameters + */ +struct __declspec(novtable) Return : public Method { + CAF_DECL_UUID("000A440E-AEE4-418E-B9A0-9857F5C20283") + + /** @return the reply code */ + virtual uint16 getReplyCode() = 0; + + /** @return the reply text */ + virtual std::string getReplyText() = 0; + + /** @return the exchnage name */ + virtual std::string getExchange() = 0; + + /** @return the routing key */ + virtual std::string getRoutingKey() = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(Return); + +/** + * @ingroup AmqpApi + * @brief Interface representing the basic.recover-ok method parameters + */ +struct __declspec(novtable) RecoverOk : public Method { + CAF_DECL_UUID("DF71DC22-B65C-44FC-A0F4-EFAC181E2F69") +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(RecoverOk); + +/** + * @ingroup AmqpApi + * @brief Interface representing the basic.qos-ok method + */ +struct __declspec(novtable) QosOk : public Method { + CAF_DECL_UUID("D5710B1C-DE05-42F5-9695-95364C1D9468") +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(QosOk); + +} // namespace Basic +#endif + +#if (1) // channel +/** + * @ingroup AmqpApi + * @brief AMQP Channel methods + */ +namespace Channel { + +/** + * @ingroup AmqpApi + * @brief Interface representing the channel.open-ok method parameters + */ +struct __declspec(novtable) OpenOk : public Method { + CAF_DECL_UUID("4c027f40-db11-4a72-ac2e-cc8da89035cb") +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(OpenOk); + +/** + * @ingroup AmqpApi + * @brief Interface representing the channel.close method parameters + */ +struct __declspec(novtable) Close : public Method { + CAF_DECL_UUID("45d0c75f-ff48-4552-9a83-498efa5f6ad2") + + /** @return the reply code */ + virtual uint16 getReplyCode() = 0; + + /** @return the reply text */ + virtual std::string getReplyText() = 0; + + /** @return the class id of the method that caused the close */ + virtual uint16 getClassId() = 0; + + /** @return the method id of the method that caused the close */ + virtual uint16 getMethodId() = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(Close); + +/** + * @ingroup AmqpApi + * @brief Interface representing the channel.close-ok method parameters + */ +struct __declspec(novtable) CloseOk : public Method { + CAF_DECL_UUID("DAF11BD3-06B6-4FA4-AC80-2B0959D2297D") +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(CloseOk); + +} // namespace Channel +#endif + +#if (1) // exchange +/** + * @ingroup AmqpApi + * @brief AMQP Exchange methods + */ +namespace Exchange { + +/** + * @ingroup AmqpApi + * @brief Interface representing the exchange.declare-ok method parameters + */ +struct __declspec(novtable) DeclareOk : public Method { + CAF_DECL_UUID("e54d9fff-7905-4e18-b1e8-090279a5cffe") +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(DeclareOk); + +/** + * @ingroup AmqpApi + * @brief Interface representing the exchange.delete-ok method parameters + */ +struct __declspec(novtable) DeleteOk : public Method { + CAF_DECL_UUID("9f13d0fb-1bdd-473a-873a-58e948bc256c") +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(DeleteOk); + +} // namespace Exchange +#endif + +#if (1) // queue +/** + * @ingroup AmqpApi + * @brief AMQP Queue methods + */ +namespace Queue { + +/** + * @ingroup AmqpApi + * @brief Interface representing the queue.declare-ok method parameters + */ +struct __declspec(novtable) DeclareOk : public Method { + CAF_DECL_UUID("EB96E48E-DF40-4D5F-A41F-7F4EBEBE2BE1") + + /** @return the name of the queue */ + virtual std::string getQueueName() = 0; + + /** @return the number of messages in the queue */ + virtual uint32 getMessageCount() = 0; + + /** @return the number of active consumers for the queue */ + virtual uint32 getConsumerCount() = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(DeclareOk); + +/** + * @ingroup AmqpApi + * @brief Interface representing the queue.delete-ok method parameters + */ +struct __declspec(novtable) DeleteOk : public Method { + CAF_DECL_UUID("34f4b342-7ab0-44d5-b007-4eec141a4435") + + /** @return the number of messages deleted */ + virtual uint32 getMessageCount() = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(DeleteOk); + +/** + * @ingroup AmqpApi + * @brief Interface representing the queue.delete-ok method parameters + */ +struct __declspec(novtable) PurgeOk : public Method { + CAF_DECL_UUID("63bcf694-5ac3-4067-8134-659133986099") + + /** @return the number of messages deleted */ + virtual uint32 getMessageCount() = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(PurgeOk); + +/** + * @ingroup AmqpApi + * @brief Interface representing the queue.bind-ok method parameters + */ +struct __declspec(novtable) BindOk : public Method { + CAF_DECL_UUID("1a60c168-24d1-4184-a5ec-fcf9fca70994") +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(BindOk); + +/** + * @ingroup AmqpApi + * @brief Interface representing the queue.unbind-ok method parameters + */ +struct __declspec(novtable) UnbindOk : public Method { + CAF_DECL_UUID("edf78de1-eee4-44c0-9051-e4f6ee80c0a2") +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(UnbindOk); + +} // namespace Queue +#endif + +}}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/api/CertInfo.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/api/CertInfo.h new file mode 100644 index 000000000..f9326633a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/api/CertInfo.h @@ -0,0 +1,50 @@ +/* + * Created on: May 4, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPCLIENTAPI_CERTINFO_H_ +#define AMQPCLIENTAPI_CERTINFO_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author bwilliams + * @brief A representation of Cert Info + */ +class CertInfo { +public: + CertInfo(); + virtual ~CertInfo(); + +public: + void initialize( + const std::string& caCertPath, + const std::string& clientCertPath, + const std::string& clientKeyPath); + + std::string getCaCertPath() const; + + std::string getClientCertPath() const; + + std::string getClientKeyPath() const; + +private: + bool _isInitialized; + std::string _caCertPath; + std::string _clientCertPath; + std::string _clientKeyPath; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CertInfo); +}; +CAF_DECLARE_SMART_POINTER(CertInfo); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/api/Channel.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/api/Channel.h new file mode 100644 index 000000000..ad1369061 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/api/Channel.h @@ -0,0 +1,430 @@ +/* + * Created on: May 2, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPCLIENTAPI_CHANNEL_H_ +#define AMQPCLIENTAPI_CHANNEL_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApi + * @brief Interface to an AMQP channel + */ +struct __declspec(novtable) Channel : public ICafObject { + + /** @return the channel number */ + virtual uint16 getChannelNumber() = 0; + + /** @brief Closes the channel */ + virtual void close() = 0; + + /** + * @brief Returns the state of the channel + * @retval true the Channel is open + * @retval false the Channel is closed + */ + virtual bool isOpen() = 0; + + /** + * @brief Acknowledge on or more messages + *

+ * Acknowledges one or more messages delivered via the Deliver or + * Get-Ok methods. The client can ask to confirm a single message or a set of + * messages up to and including a specific message. + * + * @param deliveryTag the message's delivery tag + * @param ackMultiple acknowledge multiple messages

+ * If set to true, the delivery tag is treated as "up to and + * including", so that the client can acknowledge multiple messages with a single + * method. If set to false, the delivery tag refers to a single + * message. If the multiple field is true, and the delivery tag + * is 0, the server will acknowledge all outstanding messages. + */ + virtual void basicAck( + const uint64 deliveryTag, + const bool ackMultiple) = 0; + + /** + * @brief Provides a direct access to the messages in a queue + *

+ * This method provides a direct access to the messages in a queue using a + * synchronous dialogue that is designed for specific types of application where + * synchronous functionality is more important than performance. + * + * @param queue the queue name + * @param noAck no acknowledgment needed. If true, the server does not + * expect acknowledgements for messages. That is, when a message is delivered to the client + * the server assumes the delivery will succeed and immediately dequeues it. This + * functionality may increase performance but at the cost of reliability. Messages can get + * lost if a client dies before they are delivered to the application. + * @return message as a GetResponse object or + * a null object if there is no message available. + */ + virtual SmartPtrGetResponse basicGet( + const std::string& queue, + const bool noAck) = 0; + + /** + * @brief Publishes a message to a specific exchange + *

+ * This method publishes a message to a specific exchange. The message will be routed + * to queues as defined by the exchange configuration and distributed to any active + * consumers when the transaction, if any, is committed. + * @param exchange specifies the name of the exchange to publish to. The exchange + * name can be empty, meaning the default exchange. + * @param routingKey specifies the routing key for the message. + * @param properties specifies a #Caf::AmqpClient::AmqpContentHeaders::BasicProperties + * object containing properties and headers to publish with the message. + * @param body specifies the message body in raw bytes. + */ + virtual void basicPublish( + const std::string& exchange, + const std::string& routingKey, + const AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body) = 0; + + /** + * @brief Publishes a message to a specific exchange + *

+ * This method publishes a message to a specific exchange with control over the + * mandatory and immediate bits. + * The message will be routed to queues as defined by the exchange configuration and + * distributed to any active consumers when the transaction, if any, is committed. + * @param exchange specifies the name of the exchange to publish to. The exchange + * name can be empty, meaning the default exchange. + * @param routingKey specifies the routing key for the message. + * @param mandatory specifies how the server is to react if the message cannot be routed + * to a queue. If true, the server will return an unroutable message + * with a Return method. If false, the server silently drops the + * message. + * @param immediate specifies how the server is to react if the message cannot be routed + * to a queue consumer immediately. If true, the server will return an + * undeliverable message with a Return method. If false, + * the server will queue the message, but with no guarantee that it will ever be + * consumed. + * @param properties specifies a #Caf::AmqpClient::AmqpContentHeaders::BasicProperties + * object containing properties and headers to publish with the message. + * @param body specifies the message body in raw bytes. + */ + virtual void basicPublish( + const std::string& exchange, + const std::string& routingKey, + const bool mandatory, + const bool immediate, + const AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body) = 0; + + /** + * @brief Starts a queue consumer + *

+ * This method asks the server to start a 'consumer', which is a transient request for + * messages from a specific queue. Consumers last as int32 as the channel they were + * declared on, or until the client cancels them.
+ * The arguments noAck, noLocal and + * exclusive are false and the server will + * genearate the consumer tag. + * @param queue queue name + * @param consumer an interface to the consumer object + * @return a #Caf::AmqpClient::AmqpMethods::Basic::ConsumeOk object containing + * the results of the call if successful + */ + virtual AmqpMethods::Basic::SmartPtrConsumeOk basicConsume( + const std::string& queue, + const SmartPtrConsumer& consumer) = 0; + + /** + * @brief Starts a queue consumer + *

+ * This method asks the server to start a 'consumer', which is a transient request for + * messages from a specific queue. Consumers last as int32 as the channel they were + * declared on, or until the client cancels them.
+ * The arguments noLocal and exclusive are + * false and the server will genearate the consumer tag. + * @param queue queue name + * @param noAck no acknowledgment needed. If true, the server does not + * expect acknowledgements for messages. That is, when a message is delivered to the client + * the server assumes the delivery will succeed and immediately dequeues it. This + * functionality may increase performance but at the cost of reliability. Messages can get + * lost if a client dies before they are delivered to the application. + * @param consumer an interface to the consumer object + * @return a #Caf::AmqpClient::AmqpMethods::Basic::ConsumeOk object containing + * the results of the call if successful + */ + virtual AmqpMethods::Basic::SmartPtrConsumeOk basicConsume( + const std::string& queue, + const bool noAck, + const SmartPtrConsumer& consumer) = 0; + + /** + * @brief Starts a queue consumer + *

+ * This method asks the server to start a 'consumer', which is a transient request for + * messages from a specific queue. Consumers last as int32 as the channel they were + * declared on, or until the client cancels them. + * @param queue queue name + * @param consumerTag consumer tag (or blank to specify server-generated tag) + * @param noAck acknowledgement flag + * @param noLocal do not send messages to the connection that published them + * @param exclusive request exclusive consumer access to the queue + * @param consumer an interface to the consumer object + * @param arguments a set of arguments for the declaration. The syntax of these + * arguments depends on the server implementation. + * @return a #Caf::AmqpClient::AmqpMethods::Basic::ConsumeOk object containing + * the results of the call if successful + */ + virtual AmqpMethods::Basic::SmartPtrConsumeOk basicConsume( + const std::string& queue, + const std::string& consumerTag, + const bool noAck, + const bool noLocal, + const bool exclusive, + const SmartPtrConsumer& consumer, + const SmartPtrTable& arguments = SmartPtrTable()) = 0; + + /** + * @brief Cancels a consumer + *

+ * This method cancels a consumer. This does not affect already delivered messages, + * but it does mean the server will not send any more messages for that consumer. + * The client may receive an arbitrary number of messages in between sending the cancel + * method and receiving the cancel.ok reply. + * @param consumerTag consumer tag to cancel + * @return a #Caf::AmqpClient::AmqpMethods::Basic::CancelOk object containing + * the results of the call if successful + */ + virtual AmqpMethods::Basic::SmartPtrCancelOk basicCancel( + const std::string& consumerTag) = 0; + + /** + * @brief Redeliver unacknowledged messages + *

+ * This method asks the server to redeliver all unacknowledged message on the channel. + * Zero or more messages may be redelivered. + * @param requeue if false then the message will be redelivered to + * the original receipient. If true then the server will attempt to + * requeue the message, potentially delivering it to an alternate subscriber. + * @return a #Caf::AmqpClient::AmqpMethods::Basic::RecoverOk object containing the + * results of the call if successful + */ + virtual AmqpMethods::Basic::SmartPtrRecoverOk basicRecover( + const bool requeue) = 0; + + /** + * @brief Specifies quality of service + *

+ * This method requests a specific quality of service. The QoS can be specified for + * the current channel or for all channels on the connection. The particular properties + * and semantics of a qos method always depend on the content class semantics. + * @param prefetchSize prefetch window in octets. The client can request that messages + * be sent in advance so that when the client finishes processing a message, + * the following message is already help locally, rather than needing to be sent down + * the channel. Prefetching gives a performance improvement. This field specifies the + * prefetch window size in octets. The server will send a message in advance if it is + * equal to or smaller in size than the available prefetch size (and also falls into + * other prefetch limits). May be set to zero, meaning 'no specific limit', although + * other prefetch limits may still apply. The prefetch-size is ignored if the no-ack + * option is set. + * @param prefetchCount prefetch window in messages. This field may be used in combination + * with the prefetchSize field; a message will only be sent in advance if both + * prefetch windows (and those at the channel and connection level) allow it. The + * prefetch-count is ignored if the no-ack option is set. + * @param global apply to entire connection + * @return + */ + virtual AmqpMethods::Basic::SmartPtrQosOk basicQos( + const uint32 prefetchSize, + const uint32 prefetchCount, + const bool global) = 0; + + /** + * @brief Reject an incoming message + *

+ * This method allows a client to reject a message. It can be used to interrupt and + * cancel large incoming messages, or return un-treatable messages to their original + * queue. + * @param deliveryTag the delivery tag of the message + * @param requeue if true, the server will attempt to requeue + * the message. If false or the requeue attempt fails the + * message is discarded or dead-lettered. + */ + virtual void basicReject( + const uint64 deliveryTag, + const bool requeue) = 0; + + /** + * @brief Creates an exchange + *

+ * This method creates an exchange if it does not already exist, and if the exchange + * exists, verifies that it is of the correct and expected class. + * @param exchange exchange name + * @param type exchange type + * @param durable request a durable exchange + * @param arguments a set of agrguments for the declaration. The syntax of these + * arguments depends on the server implementation. + * @return a #Caf::AmqpClient::AmqpMethods::Exchange::DeclareOk object containing + * the results of the call if successful + */ + virtual AmqpMethods::Exchange::SmartPtrDeclareOk exchangeDeclare( + const std::string& exchange, + const std::string& type, + const bool durable = false, + const SmartPtrTable& arguments = SmartPtrTable()) = 0; + + /** + * @brief Deletes an exchange + *

+ * This method deletes an exchange. When an exchange is deleted all queue bindings on + * the exchange are cancelled. + * @param exchange exchange name + * @param ifUnused delete only if unused. If true, the server + * will only delete the exchange if it has no queue bindings. If the exchange has + * queue bindings the server does not delete it but raises a channel exception + * instead. + * @return a #Caf::AmqpClient::AmqpMethods::Exchange::DeleteOk object containing + * the results of the call if successful + */ + virtual AmqpMethods::Exchange::SmartPtrDeleteOk exchangeDelete( + const std::string& exchange, + const bool ifUnused) = 0; + + /** + * @brief Creates a queue using default parameters + *

+ * The defaults are: + * + * + * + * + * + * + * + * + *
ParameterValue
queueblank - the server will generate a queue name
durablefalse - the queue will not be durable
exclusivetrue - the queue will be exclusive to this conenction
autoDeletetrue - the queue will be deleted when no longer used
+ * @return a #Caf::AmqpClient::AmqpMethods::Queue::DeclareOk object containing + * the results of the call if successful. This object must be examined to retrieve + * the name of the queue generated by the server. + */ + virtual AmqpMethods::Queue::SmartPtrDeclareOk queueDeclare() = 0; + + /** + * @brief Creates or checks a queue + *

+ * @param queue queue name. If blank the server will generate a name. + * @param durable request a durable queue + * @param exclusive request an exclusive queue + * @param autoDelete request that the queue be deleted when no longer in use + * @param arguments a set of agrguments for the declaration. The syntax of these + * arguments depends on the server implementation. + * @return a #Caf::AmqpClient::AmqpMethods::Queue::DeclareOk object containing + * the results of the call if successful. This object must be examined to retrieve + * the name of the queue generated by the server if the queue name was blank in + * the call. + */ + virtual AmqpMethods::Queue::SmartPtrDeclareOk queueDeclare( + const std::string& queue, + const bool durable, + const bool exclusive, + const bool autoDelete, + const SmartPtrTable& arguments = SmartPtrTable()) = 0; + + /** + * @brief Declare a queue passively; i.e. check if it exists. + *

+ * @param queue queue name. + */ + virtual AmqpMethods::Queue::SmartPtrDeclareOk queueDeclarePassive( + const std::string& queue) = 0; + + /** + * @brief Deletes a queue + *

+ * This method deletes a queue. When a queue is deleted any pending messages are + * sent to a dead­-letter queue if this is defined in the server configuration, + * and all consumers on the queue are cancelled. + * @param queue queue name + * @param ifUnused delete only if unused. If true, the server + * will only delete the queue if it has no consumers. If the queue has consumers the + * server does does not delete it but raises a channel exception instead. + * @param ifEmpty delete only if empty. If true, the server will + * only delete the queue if it has no messages. If the queue has messages the + * server does does not delete it but raises a channel exception instead. + * @return a #Caf::AmqpClient::AmqpMethods::Queue::DeleteOk object containing the + * result of the call if successful. + */ + virtual AmqpMethods::Queue::SmartPtrDeleteOk queueDelete( + const std::string& queue, + const bool ifUnused, + const bool ifEmpty) = 0; + + /** + * @brief Purges a queue + *

+ * This method removes all messages from a queue which are not awaiting + * acknowledgment. + * @param queue queue name + * @return a #Caf::AmqpClient::AmqpMethods::Queue::PurgeOk containing the result + * of the call if successful. + */ + virtual AmqpMethods::Queue::SmartPtrPurgeOk queuePurge( + const std::string& queue) = 0; + + /** + * @brief Binds a queue to an exchange + *

+ * This method binds a queue to an exchange. Until a queue is bound it will not + * receive any messages. + * @param queue queue name + * @param exchange exchange name + * @param routingKey message routing key + * @param arguments a set of agrguments for the binding. The syntax of these + * arguments depends on the server implementation. + * @return a #Caf::AmqpClient::AmqpMethods::Queue::BindOk containing the result + * of the call if successful. + */ + virtual AmqpMethods::Queue::SmartPtrBindOk queueBind( + const std::string& queue, + const std::string& exchange, + const std::string& routingKey, + const SmartPtrTable& arguments = SmartPtrTable()) = 0; + + /** + * @brief Unbinds a queue from an exchange + * @param queue queue name + * @param exchange exchange name + * @param routingKey message routing key + * @param arguments a set of agrguments for the binding. The syntax of these + * arguments depends on the server implementation. + * @return a #Caf::AmqpClient::AmqpMethods::Queue::UnbindOk containing the result + * of the call if successful. + */ + virtual AmqpMethods::Queue::SmartPtrUnbindOk queueUnbind( + const std::string& queue, + const std::string& exchange, + const std::string& routingKey, + const SmartPtrTable& arguments = SmartPtrTable()) = 0; + + /** + * @brief Adds a {@link ReturnListener} to the channel + * @param listener the {@link ReturnListener} object to add + */ + virtual void addReturnListener( + const SmartPtrReturnListener& listener) = 0; + + /** + * @brief Removes a {@link ReturnListener} from the channel + * @param listener the {@link ReturnListener} to remove + */ + virtual bool removeReturnListener( + const SmartPtrReturnListener& listener) = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(Channel); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/api/Connection.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/api/Connection.h new file mode 100644 index 000000000..211fa6ca4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/api/Connection.h @@ -0,0 +1,49 @@ +/* + * Created on: May 2, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPCLIENTAPI_CONNECTION_H_ +#define AMQPCLIENTAPI_CONNECTION_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApi + * @brief Interface to an AMQP connection. + */ +struct __declspec(novtable) Connection : public ICafObject { + /** + * @brief Create a new channel + * @return a Channel + */ + virtual SmartPtrChannel createChannel() = 0; + + /** + * @brief Close a channel + * @param channel the Channel to close + */ + virtual void closeChannel(const SmartPtrChannel& channel) = 0; + + /** + * @brief Closes the connection and its channels + */ + virtual void close() = 0; + + /** + * @brief Return the state of the connection + * @retval true the connection is open + * @retval false the connection is closed + */ + virtual bool isOpen() = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(Connection); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/api/ConnectionFactory.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/api/ConnectionFactory.h new file mode 100644 index 000000000..0fc0215ed --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/api/ConnectionFactory.h @@ -0,0 +1,220 @@ +/* + * Created on: May 4, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPCLIENTAPI_CONNECTIONFACTORY_H_ +#define AMQPCLIENTAPI_CONNECTIONFACTORY_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApi + * @brief Interface to a convenience factory class to facilitate opening a + * #Caf::AmqpClient::Connection to an AMQP broker. + *

+ * ConnectionFactories are creating using the #Caf::AmqpClient::createConnectionFactory method. + */ +struct __declspec(novtable) ConnectionFactory : public ICafObject { + + /** + * @return the default protocol to use for connections + */ + virtual std::string getProtocol() const = 0; + + /** + * @brief Set the default protocol for connections + * @param protocol the default protocol for connections + */ + virtual void setProtocol(const std::string& protocol) = 0; + + /** + * @return the default host to use for connections + */ + virtual std::string getHost() const = 0; + + /** + * @brief Set the default host for connections + * @param host the default host for connections + */ + virtual void setHost(const std::string& host) = 0; + + /** + * @return the default port to use for connections + */ + virtual uint32 getPort() const = 0; + + /** + * @brief Set the default port for connections + * @param port the default port for connections + */ + virtual void setPort(const uint32 port) = 0; + + /** + * @return the default virtual host to use for connections + */ + virtual std::string getVirtualHost() const = 0; + + /** + * @brief Set the default virtual host for connections + * @param virtualHost the default virtual host for connections + */ + virtual void setVirtualHost(const std::string& virtualHost) = 0; + + /** + * @return the default user name to use for connections + */ + virtual std::string getUsername() const = 0; + + /** + * @brief Set the default user name for connections + * @param username the default user name for connections + */ + virtual void setUsername(const std::string& username) = 0; + + /** + * @return the default password to use for connections + */ + virtual std::string getPassword() const = 0; + + /** + * @brief Set the default password for connections + * @param password the default password for connections + */ + virtual void setPassword(const std::string& password) = 0; + + /** + * @return the default CaCertPath to use for connections + */ + virtual std::string getCaCertPath() const = 0; + + /** + * @brief Set the default CaCertPath for connections + * @param caCertPath the default CaCertPath for connections + */ + virtual void setCaCertPath(const std::string& caCertPath) = 0; + + /** + * @return the default ClientCertPath to use for connections + */ + virtual std::string getClientCertPath() const = 0; + + /** + * @brief Set the default ClientCertPath for connections + * @param clientCertPath the default ClientCertPath for connections + */ + virtual void setClientCertPath(const std::string& clientCertPath) = 0; + + /** + * @return the default ClientKeyPath to use for connections + */ + virtual std::string getClientKeyPath() const = 0; + + /** + * @brief Set the default ClientKeyPath for connections + * @param clientKeyPath the default ClientKeyPath for connections + */ + virtual void setClientKeyPath(const std::string& clientKeyPath) = 0; + + /** + * @return the initially requested maximum channel number; zero for unlimited + */ + virtual uint32 getRequestedChannelMax() const = 0; + + /** + * @brief Set the requested maximum channel number + * @param requestedChannelMax the initially requested maximum channel number; zero for unlimited + */ + virtual void setRequestedChannelMax(const uint32 requestedChannelMax) = 0; + + /** + * @return the initially requested maximum frame size; zero for unlimited + */ + virtual uint32 getRequestedFrameMax() const = 0; + + /** + * @brief Set the requested maximum frame size + * @param requestedFrameMax the initially requested maximum frame size; zero for unlimited + */ + virtual void setRequestedFrameMax(const uint32 requestedFrameMax) = 0; + + /** + * @return the initially requested heartbeat interval, in seconds; zero for none + */ + virtual uint32 getRequestedHeartbeat() const = 0; + + /** + * @brief Set the requested heartbeat interval + * @param requestedHeartbeat the initially requested heartbeat interval, in seconds; zero for none + */ + virtual void setRequestedHeartbeat(const uint32 requestedHeartbeat) = 0; + + /** + * @return the connection timeout, in milliseconds; zero for infinite + */ + virtual uint32 getConnectionTimeout() const = 0; + + /** + * @brief Set the connection timeout + * @param connectionTimeout connection establishment timeout in milliseconds; zero for infinite + */ + virtual void setConnectionTimeout(const uint32 connectionTimeout) = 0; + + /** + * @return the number of connection consumer processing threads + */ + virtual uint32 getConsumerThreadCount() const = 0; + + /** + * @brief Set the number of connection consumer processing threads + * @param threadCount the number of connection consumer processing threads + */ + virtual void setConsumerThreadCount(const uint32 threadCount) = 0; + + /** + * @return the number of connection retries + */ + virtual uint16 getRetries() const = 0; + + /** + * @brief Set the number of connection retries + * @param retries the number of connection retries + */ + virtual void setRetries(const uint16 retries) = 0; + + /** + * @return the number of connection seconds to wait + */ + virtual uint16 getSecondsToWait() const = 0; + + /** + * @brief Set the number of connection retries + * @param seconds the number of connection seconds to wait + */ + virtual void setSecondsToWait(const uint16 seconds) = 0; + + /** + * @brief Create a new broker connection + * @return a #Caf::AmqpClient::Connection interface to the connection + */ + virtual SmartPtrConnection newConnection() = 0; + + /** + * @brief Create a new broker connection + * @param address broker address to try + * @return a #Caf::AmqpClient::Connection interface to the connection + */ + virtual SmartPtrConnection newConnection( + const SmartPtrAddress& address, + const SmartPtrCertInfo& certInfo) = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(ConnectionFactory); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/api/Consumer.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/api/Consumer.h new file mode 100644 index 000000000..aac6e5cd5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/api/Consumer.h @@ -0,0 +1,74 @@ +/* + * Created on: May 21, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CONSUMER_H_ +#define CONSUMER_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApi + * @brief Interface for application callback objects to receive notifications and messages + * from a queue by subscription. + *

+ * The methods of this interface are invoked in a dispatch thread which is separate from the + * {@link Connection}'s thread. This allows {@link Consumer}s to call {@link Channel} or + * {@link Connection} methods without causing a deadlock. + */ +struct __declspec(novtable) Consumer : public ICafObject { + + /** + * @brief Called when the consumer is registered by a call to any of the + * {@link Channel#basicConsume} methods + * @param consumerTag the consumer tag associated with the consumer + */ + virtual void handleConsumeOk( + const std::string& consumerTag) = 0; + + /** + * @brief Called when the consumer is cancelled by a call to {@link Channel#basicCancel}. + * @param consumerTag the consumer tag associated with the consumer + */ + virtual void handleCancelOk( + const std::string& consumerTag) = 0; + + /** + * @brief Called when a basic.recover-ok is received. + * @param consumerTag the consumer tag associated with the consumer + */ + virtual void handleRecoverOk( + const std::string& consumerTag) = 0; + + /** + * @brief Called when a basic.deliver is received for this consumer. + * @param consumerTag the consumer tag associated with the consumer + * @param envelope message envelope + * @param properties message properties and headers + * @param body message body + */ + virtual void handleDelivery( + const std::string& consumerTag, + const SmartPtrEnvelope& envelope, + const AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body) = 0; + + /** + * @brief Called when the channel has been shut down. + * @param consumerTag the consumer tag associated with the consumer + * @param reason the reason for the shut down + */ + virtual void handleShutdown( + const std::string& consumerTag, + SmartPtrCCafException& reason) = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(Consumer); + +}} + +#endif /* CONSUMER_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/api/ContentHeader.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/api/ContentHeader.h new file mode 100644 index 000000000..861f67398 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/api/ContentHeader.h @@ -0,0 +1,31 @@ +/* + * Created on: May 11, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPCLIENTAPI_CONTENTHEADER_H_ +#define AMQPCLIENTAPI_CONTENTHEADER_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApi + * @brief Base interface for all AMQP content headers + */ +struct __declspec(novtable) ContentHeader : public ICafObject { + + /** @return the content header class id */ + virtual uint16 getClassId() = 0; + + /** @return the content header friendly class name */ + virtual std::string getClassName() = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(ContentHeader); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/api/Envelope.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/api/Envelope.h new file mode 100644 index 000000000..b3fe5a509 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/api/Envelope.h @@ -0,0 +1,41 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPCLIENTAPI_ENVELOPE_H_ +#define AMQPCLIENTAPI_ENVELOPE_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApi + * @brief An interface to objects that group together basic.get-ok message properties + */ +struct __declspec(novtable) Envelope : public ICafObject { + CAF_DECL_UUID("ce68d68a-6973-49e2-a003-cb4474624f5c") + + /** @return the delivery tag */ + virtual uint64 getDeliveryTag() = 0; + + /** + * @retval true if the message was redelivered + * @retval false if the message has not been redelivered + */ + virtual bool getRedelivered() = 0; + + /** @return the name of the exchange supplying the message */ + virtual std::string getExchange() = 0; + + /** @return the message's routing key */ + virtual std::string getRoutingKey() = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(Envelope); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/api/GetResponse.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/api/GetResponse.h new file mode 100644 index 000000000..f03b9aa75 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/api/GetResponse.h @@ -0,0 +1,38 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPCLIENTAPI_GETRESPONSE_H_ +#define AMQPCLIENTAPI_GETRESPONSE_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApi + * @brief Interface representing the bundling of basic.get messages into a nicer form + */ +struct __declspec(novtable) GetResponse : public ICafObject { + CAF_DECL_UUID("c8bda284-7eea-46e1-b9c3-791310d69b04") + + /** @return the message envelope information (#Caf::AmqpClient::Envelope) */ + virtual SmartPtrEnvelope getEnvelope() = 0; + + /** @return the message properties (#Caf::AmqpClient::AmqpContentHeaders::BasicProperties) */ + virtual AmqpContentHeaders::SmartPtrBasicProperties getProperties() = 0; + + /** @return the message body raw bytes */ + virtual SmartPtrCDynamicByteArray getBody() = 0; + + /** @return the number of messages in the queue */ + virtual uint32 getMessageCount() = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(GetResponse); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/api/Method.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/api/Method.h new file mode 100644 index 000000000..1c725e9bc --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/api/Method.h @@ -0,0 +1,34 @@ +/* + * Created on: May 10, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPCLIENTAPI_METHOD_H_ +#define AMQPCLIENTAPI_METHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApi + * @brief Base interface to AMQP methods + */ +struct __declspec(novtable) Method : public ICafObject { + + /** @return the method's class ID */ + virtual uint16 getProtocolClassId() = 0; + + /** @return the method's method ID */ + virtual uint16 getProtocolMethodId() = 0; + + /** @return the method's friendly name */ + virtual std::string getProtocolMethodName() = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(Method); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/api/ReturnListener.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/api/ReturnListener.h new file mode 100644 index 000000000..6f3abc28f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/api/ReturnListener.h @@ -0,0 +1,48 @@ +/* + * Created on: May 21, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef RETURNLISTENER_H_ +#define RETURNLISTENER_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApi + * @brief Interface for objects that will be notified of failed message deliveries + *

+ * When {@link Channel#basicPublish} is used with the mandatory and/or immediate + * flags set and the message cannot be delivered, the server will response with a + * basic.return method call. {@link ReturnListener}s can monitor + * these failed messages. + */ +struct __declspec(novtable) ReturnListener : public ICafObject { + CAF_DECL_UUID("FEB38A27-6338-4BDB-AA0E-527322A2393B") + + /** + * @brief Callback receiving the failed message + * @param replyCode server reply code + * @param replyText server reply text + * @param exchange exchange on which error occured + * @param routingKey routing key for the message that failed + * @param properties original message properties + * @param body original message body + */ + virtual void handleReturn( + const uint16 replyCode, + const std::string& replyText, + const std::string& exchange, + const std::string& routingKey, + const AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body) = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(ReturnListener); + +}} + +#endif /* RETURNLISTENER_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/api/amqpClient.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/api/amqpClient.h new file mode 100644 index 000000000..4e329a74b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/api/amqpClient.h @@ -0,0 +1,315 @@ +/* + * Created on: May 3, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPCLIENTAPI_H_ +#define AMQPCLIENTAPI_H_ + +#include "../AmqpClientLink.h" + +/** + * @defgroup AmqpApi AMQP API + * Documentaiton for the classes, methods and constants that can be + * used directly by applications to work with the AMQP protocol as a client. + */ +namespace Caf { namespace AmqpClient { + +/** Default user name */ +extern const char* DEFAULT_USER; + +/** Default password */ +extern const char* DEFAULT_PASS; + +/** Default virtual host */ +extern const char* DEFAULT_VHOST; + +/** Default protocol */ +extern const char* DEFAULT_PROTOCOL; + +/** Default host */ +extern const char* DEFAULT_HOST; + +/** Default maximum channel number; zero for maximum */ +static const uint32 DEFAULT_CHANNEL_MAX = 0; + +/** Default maximum frame size; zero for maximum */ +static const uint32 DEFAULT_FRAME_MAX = 131072; + +/** Default maximum heartbeat rate; zero for none */ +static const uint32 DEFAULT_HEARTBEAT = 0; + +/** 'Use the default port' port */ +static const uint32 USE_DEFAULT_PORT = UINT_MAX; + +/** The default non-ssl port */ +static const uint32 DEFAULT_AMQP_PORT = 5672; + +/** The default ssl port */ +static const uint32 DEFAULT_AMQP_SSL_PORT = 5671; + +/** The default connection timeout; zero means wait indefinately */ +static const uint32 DEFAULT_CONNECTION_TIMEOUT = 0; + +/** The default number of connection consumer threads */ +static const uint32 DEFAULT_CONSUMER_THREAD_COUNT = 10; + +/** The default number of basic.deliver messages to process in a single run of a channel consumer thread */ +static const uint32 DEFAULT_CONSUMER_THREAD_MAX_DELIVERY_COUNT = 100; + +/** The default number of times a connection open will be retried*/ +static const uint16 DEFAULT_CONNECTION_RETRIES = 5; + +/** The default number of seconds we will wait for each connection open attempt. 0 means wait indefinitely*/ +static const uint16 DEFAULT_CONNECTION_SECONDS_TO_WAIT = 30; + +/** + * @author mdonahue + * @brief Object that maps a c-api AMQP field into a lifetime-managed GVariant + */ +struct __declspec(novtable) Field : public ICafObject { + /** + * @brief Field value types + */ + typedef enum { + /** @brief internal value representing Not Set */ + AMQP_FIELD_TYPE_NOTSET, + /** @brief boolean */ + AMQP_FIELD_TYPE_BOOLEAN, + /** @brief signed 8-bit integer */ + AMQP_FIELD_TYPE_I8, + /** @brief unsigned 8-bit integer */ + AMQP_FIELD_TYPE_U8, + /** @brief signed 16-bit integer */ + AMQP_FIELD_TYPE_I16, + /** @brief unsigned 16-bit integer */ + AMQP_FIELD_TYPE_U16, + /** @brief signed 32-bit integer */ + AMQP_FIELD_TYPE_I32, + /** @brief unsigned 32-bit integer */ + AMQP_FIELD_TYPE_U32, + /** @brief signed 64-bit integer */ + AMQP_FIELD_TYPE_I64, + /** @brief unsigned 64-bit integer */ + AMQP_FIELD_TYPE_U64, + /** @brief 32-bit float */ + AMQP_FIELD_TYPE_F32, + /** @brief 64-bit double */ + AMQP_FIELD_TYPE_F64, + /** @brief UTF8-encoded text */ + AMQP_FIELD_TYPE_UTF8, + /** @brief NOT SUPPORTED */ + AMQP_FIELD_TYPE_ARRAY, + /** @brief NOT SUPPORTED */ + AMQP_FIELD_TYPE_BYTES, + /** @brief NOT SUPPORTED */ + AMQP_FIELD_TYPE_DECIMAL, + /** @brief NOT SUPPORTED */ + AMQP_FIELD_TYPE_TIMESTAMP, + /** @brief NOT SUPPORTED */ + AMQP_FIELD_TYPE_TABLE, + /** @brief NOT SUPPORTED */ + AMQP_FIELD_TYPE_VOID + } AmqpFieldType; + + /** + * @return the field type + */ + virtual AmqpFieldType getAmqpType() const = 0; + /** + * @return the field value as a GVariant + */ + virtual GVariant* getValue() const = 0; + /** + * @brief Set the field type and value + * @param type field type + * @param value field value. DO NOT increment the reference count + * before calling this method. This object will take ownership of + * the GVariant and will call g_variant_unref upon value reassignment or destruction. + */ + virtual void setTypeAndValue(AmqpFieldType type, GVariant *value) = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(Field); +/** @brief A map of field names to field objects */ +typedef std::map Table; +CAF_DECLARE_SMART_POINTER(Table); + +/** + * @brief Add a boolean value to a field table + * @param key the field key + * @param val the value + * @param table the table to insert the field into + */ +void AMQPCLIENT_LINKAGE tableAddBoolean( + const std::string key, + const bool val, + SmartPtrTable& table); + +/** + * @brief Add a signed 8-bit value to a field table + * @param key the field key + * @param val the value + * @param table the table to insert the field into + */ +void AMQPCLIENT_LINKAGE tableAddInt8( + const std::string key, + const int8 val, + SmartPtrTable& table); + +/** + * @brief Add a unsigned 8-bit value to a field table + * @param key the field key + * @param val the value + * @param table the table to insert the field into + */ +void AMQPCLIENT_LINKAGE tableAddUint8( + const std::string key, + const uint8 val, + SmartPtrTable& table); + +/** + * @brief Add a signed 16-bit value to a field table + * @param key the field key + * @param val the value + * @param table the table to insert the field into + */ +void AMQPCLIENT_LINKAGE tableAddInt16( + const std::string key, + const int16 val, + SmartPtrTable& table); + +/** + * @brief Add a unsigned 16-bit value to a field table + * @param key the field key + * @param val the value + * @param table the table to insert the field into + */ +void AMQPCLIENT_LINKAGE tableAddUint16( + const std::string key, + const uint16 val, + SmartPtrTable& table); + +/** + * @brief Add a signed 32-bit value to a field table + * @param key the field key + * @param val the value + * @param table the table to insert the field into + */ +void AMQPCLIENT_LINKAGE tableAddInt32( + const std::string key, + const int32 val, + SmartPtrTable& table); + +/** + * @brief Add a unsigned 32-bit value to a field table + * @param key the field key + * @param val the value + * @param table the table to insert the field into + */ +void AMQPCLIENT_LINKAGE tableAddUint32( + const std::string key, + const uint32 val, + SmartPtrTable& table); + +/** + * @brief Add a signed 64-bit value to a field table + * @param key the field key + * @param val the value + * @param table the table to insert the field into + */ +void AMQPCLIENT_LINKAGE tableAddInt64( + const std::string key, + const int64 val, + SmartPtrTable& table); + +/** + * @brief Add a unsigned 64-bit value to a field table + * @param key the field key + * @param val the value + * @param table the table to insert the field into + */ +void AMQPCLIENT_LINKAGE tableAddUint64( + const std::string key, + const uint64 val, + SmartPtrTable& table); + +/** + * @brief Add a float value to a field table + * @param key the field key + * @param val the value + * @param table the table to insert the field into + */ +void AMQPCLIENT_LINKAGE tableAddFloat( + const std::string key, + const float val, + SmartPtrTable& table); + +/** + * @brief Add a double value to a field table + * @param key the field key + * @param val the value + * @param table the table to insert the field into + */ +void AMQPCLIENT_LINKAGE tableAddDouble( + const std::string key, + const double val, + SmartPtrTable& table); + +/** + * @brief Add UTF8-encoded text to a field table + * @param key the field key + * @param val the value + * @param table the table to insert the field into + */ +void AMQPCLIENT_LINKAGE tableAddUtf8( + const std::string key, + const std::string& val, + SmartPtrTable& table); + +/** + * @brief Add a time stamp (unsigned 64-bit integer) to a field table + * @param key the field key + * @param val the value + * @param table the table to insert the field into + */ +void AMQPCLIENT_LINKAGE tableAddTimestamp( + const std::string key, + const uint64 val, + SmartPtrTable& table); +}} + +#include "AMQExceptions.h" +#include "Address.h" +#include "CertInfo.h" +#include "Method.h" +#include "AmqpMethods.h" +#include "ContentHeader.h" +#include "AmqpContentHeaders.h" +#include "Envelope.h" +#include "GetResponse.h" +#include "Consumer.h" +#include "ReturnListener.h" +#include "Channel.h" +#include "Connection.h" +#include "ConnectionFactory.h" + +namespace Caf { + +/** + * @brief CAF AMQP Client Library + */ +namespace AmqpClient { + +/** + * @ingroup AmqpApi + * @brief Create a new #Caf::AmqpClient::ConnectionFactory + * @return a #Caf::AmqpClient::ConnectionFactory interface to a new connection factory + */ +SmartPtrConnectionFactory AMQPCLIENT_LINKAGE createConnectionFactory(); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/doxy-publish.sh b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/doxy-publish.sh new file mode 100644 index 000000000..807d5baa1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/doxy-publish.sh @@ -0,0 +1,11 @@ +#!/bin/sh +set -e +if [ "" = "$CAF_WEB_SERVER" ]; then + CAFWEBSVR=10.25.57.32 + echo 'Using default CAFWEBSVR address' +fi +echo 'CAFWEBSVR='${CAFWEBSVR} +doxygen Doxyfile +ssh autodb@$CAFWEBSVR mkdir -p caf-downloads/doxy/communication/amqpClientApi +ssh autodb@$CAFWEBSVR rm -rf caf-downloads/doxy/communication/amqpClientApi/* +scp -r html/* autodb@$CAFWEBSVR:caf-downloads/doxy/communication/amqpClientApi diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/stdafx.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/stdafx.h new file mode 100644 index 000000000..d44edbf14 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/stdafx.h @@ -0,0 +1,64 @@ +/* + * Created on: May 2, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#include "AmqpClientLink.h" +#include + +#include "api/amqpClient.h" + +//extern "C" { +#include +#include +#include +//} + +#if !defined(sun) +#include +#include +#include +#endif /* !sun */ + +#define AMQP_HANDLE_INVALID NULL; + +// Forward-declare because the connection creates the channel +// and the channel hangs onto the connection. +namespace Caf { namespace AmqpClient { +CAF_DECLARE_CLASS_AND_SMART_POINTER(CAmqpConnection); +CAF_DECLARE_CLASS_AND_SMART_POINTER(CAmqpChannel); +}} + +#include "AmqpCommon.h" +#include "CAmqpFrame.h" +#include "CAmqpAuthMechanism.h" +#include "CAmqpChannel.h" +#include "CAmqpConnection.h" + +#include "AmqpConnection.h" +#include "AmqpAuthPlain.h" +#include "AmqpChannel.h" +#include "AmqpUtil.h" +#include "amqpImpl/amqpImplInt.h" + +/** + * @defgroup AmqpApiImpl AMQP API Implementation + * Documentation for the implementation of the AMQP API. + *

+ * These classes, methods and constants cannot be used directly by application code. + */ + +/** + * @mainpage + * Documentation of the CAF AMQP Client Library. + *

+ * This library allows applications to interact with an AMQP broker as a + * client using first-class C++ objects representing AMQP entities and operations. + */ +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AbstractConnectionFactory.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AbstractConnectionFactory.cpp new file mode 100644 index 000000000..b8bcd2c1d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AbstractConnectionFactory.cpp @@ -0,0 +1,204 @@ +/* + * Created on: May 24, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "AbstractConnectionFactory.h" + +using namespace Caf::AmqpIntegration; + +AbstractConnectionFactory::AbstractConnectionFactory() : + _isInitialized(false), + CAF_CM_INIT("AbstractConnectionFactory") { +} + +AbstractConnectionFactory::~AbstractConnectionFactory() { +} + +void AbstractConnectionFactory::init( + const AmqpClient::SmartPtrConnectionFactory& amqpConnectionFactory) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(amqpConnectionFactory); + _amqpConnectionFactory = amqpConnectionFactory; + _connectionListener.CreateInstance(); + _isInitialized = true; +} + +void AbstractConnectionFactory::setProtocol(const std::string& protocol) { + CAF_CM_FUNCNAME_VALIDATE("setProtocol"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _amqpConnectionFactory->setProtocol(protocol); +} + +void AbstractConnectionFactory::setHost(const std::string& host) { + CAF_CM_FUNCNAME_VALIDATE("setHost"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _amqpConnectionFactory->setHost(host); +} + +void AbstractConnectionFactory::setPort(const uint32 port) { + CAF_CM_FUNCNAME_VALIDATE("setPort"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _amqpConnectionFactory->setPort(port); +} + +void AbstractConnectionFactory::setVirtualHost(const std::string& virtualHost) { + CAF_CM_FUNCNAME_VALIDATE("setVirtualHost"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _amqpConnectionFactory->setVirtualHost(virtualHost); +} + +void AbstractConnectionFactory::setUsername(const std::string& username) { + CAF_CM_FUNCNAME_VALIDATE("setUsername"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _amqpConnectionFactory->setUsername(username); +} + +void AbstractConnectionFactory::setPassword(const std::string& password) { + CAF_CM_FUNCNAME_VALIDATE("setPassword"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _amqpConnectionFactory->setPassword(password); +} + +void AbstractConnectionFactory::setCaCertPath(const std::string& caCertPath) { + CAF_CM_FUNCNAME_VALIDATE("setCaCertPath"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _amqpConnectionFactory->setCaCertPath(caCertPath); +} + +void AbstractConnectionFactory::setClientCertPath(const std::string& clientCertPath) { + CAF_CM_FUNCNAME_VALIDATE("setClientCertPath"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _amqpConnectionFactory->setClientCertPath(clientCertPath); +} + +void AbstractConnectionFactory::setClientKeyPath(const std::string& clientKeyPath) { + CAF_CM_FUNCNAME_VALIDATE("setClientKeyPath"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _amqpConnectionFactory->setClientKeyPath(clientKeyPath); +} + +void AbstractConnectionFactory::setConnectionTimeout(const uint32 connectionTimeout) { + CAF_CM_FUNCNAME_VALIDATE("setConnectionTimeout"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _amqpConnectionFactory->setConnectionTimeout(connectionTimeout); +} + +void AbstractConnectionFactory::setRetries(const uint16 retries) { + CAF_CM_FUNCNAME_VALIDATE("setRetries"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _amqpConnectionFactory->setRetries(retries); +} + +void AbstractConnectionFactory::setSecondsToWait(const uint16 seconds) { + CAF_CM_FUNCNAME_VALIDATE("setSecondsToWait"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _amqpConnectionFactory->setSecondsToWait(seconds); +} + +std::string AbstractConnectionFactory::getDefaultProtocol() { + return Caf::AmqpClient::DEFAULT_PROTOCOL; +} + +std::string AbstractConnectionFactory::getDefaultHostName() { + return g_get_host_name(); +} + +SmartPtrConnection AbstractConnectionFactory::createBareConnection() { + CAF_CM_FUNCNAME_VALIDATE("createBareConnection"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + SmartPtrSimpleConnection connection; + connection.CreateInstance(); + connection->init(_amqpConnectionFactory->newConnection()); + return connection; +} + +SmartPtrConnectionListener AbstractConnectionFactory::getConnectionListener() { + return _connectionListener; +} + + +void AbstractConnectionFactory::setConnectionListeners( + const std::deque& listeners) { + CAF_CM_FUNCNAME_VALIDATE("setConnectionListeners"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _connectionListener->setDelegates(listeners); +} + +void AbstractConnectionFactory::addConnectionListener( + const SmartPtrConnectionListener& listener) { + CAF_CM_FUNCNAME_VALIDATE("addConnectionListener"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _connectionListener->addDelegate(listener); +} + +std::string AbstractConnectionFactory::getProtocol() { + CAF_CM_FUNCNAME_VALIDATE("getProtocol"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _amqpConnectionFactory->getProtocol(); +} + +std::string AbstractConnectionFactory::getHost() { + CAF_CM_FUNCNAME_VALIDATE("getHost"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _amqpConnectionFactory->getHost(); +} + +uint32 AbstractConnectionFactory::getPort() { + CAF_CM_FUNCNAME_VALIDATE("getPort"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _amqpConnectionFactory->getPort(); +} + +std::string AbstractConnectionFactory::getVirtualHost() { + CAF_CM_FUNCNAME_VALIDATE("getVirtualHost"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _amqpConnectionFactory->getVirtualHost(); +} + +std::string AbstractConnectionFactory::getUsername() { + CAF_CM_FUNCNAME_VALIDATE("getUsername"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _amqpConnectionFactory->getUsername(); +} + +std::string AbstractConnectionFactory::getPassword() { + CAF_CM_FUNCNAME_VALIDATE("getPassword"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _amqpConnectionFactory->getPassword(); +} + +std::string AbstractConnectionFactory::getCaCertPath() { + CAF_CM_FUNCNAME_VALIDATE("getCaCertPath"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _amqpConnectionFactory->getCaCertPath(); +} + +std::string AbstractConnectionFactory::getClientCertPath() { + CAF_CM_FUNCNAME_VALIDATE("getClientCertPath"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _amqpConnectionFactory->getClientCertPath(); +} + +std::string AbstractConnectionFactory::getClientKeyPath() { + CAF_CM_FUNCNAME_VALIDATE("getClientKeyPath"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _amqpConnectionFactory->getClientKeyPath(); +} + +uint16 AbstractConnectionFactory::getRetries() { + CAF_CM_FUNCNAME_VALIDATE("getRetries"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _amqpConnectionFactory->getRetries(); +} + +uint16 AbstractConnectionFactory::getSecondsToWait() { + CAF_CM_FUNCNAME_VALIDATE("getSecondsToWait"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _amqpConnectionFactory->getSecondsToWait(); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AbstractConnectionFactory.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AbstractConnectionFactory.h new file mode 100644 index 000000000..f57a40d0f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AbstractConnectionFactory.h @@ -0,0 +1,139 @@ +/* + * Created on: May 24, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_ABSTRACTCONNECTIONFACTORY_H_ +#define AMQPINTEGRATIONCORE_ABSTRACTCONNECTIONFACTORY_H_ + +#include "ConnectionFactory.h" +#include "SimpleConnection.h" +#include "CompositeConnectionListener.h" + +namespace Caf { namespace AmqpIntegration { + +class AMQPINTEGRATIONCORE_LINKAGE AbstractConnectionFactory : public ConnectionFactory { +public: + AbstractConnectionFactory(); + virtual ~AbstractConnectionFactory(); + + /** + * @brief Initialize the connection factory + * @param amqpConnectionFactory the underlying Caf::AmqpClient::ConnectionFactory object + */ + void init(const AmqpClient::SmartPtrConnectionFactory& amqpConnectionFactory); + + virtual void setConnectionListeners(const std::deque& listeners); + + /** + * @brief Set the default protocol for connections + * @param protocol the default protocol for connections + */ + void setProtocol(const std::string& protocol); + + /** + * @brief Set the default host for connections + * @param host the default host for connections + */ + void setHost(const std::string& host); + + /** + * @brief Set the default port for connections + * @param port the default port for connections + */ + void setPort(const uint32 port); + + /** + * @brief Set the default host for connections + * @param virtualHost the default host for connections + */ + void setVirtualHost(const std::string& virtualHost); + + /** + * @brief Set the default user name for connections + * @param username the default user name for connections + */ + void setUsername(const std::string& username); + + /** + * @brief Set the default password for connections + * @param password the default password for connections + */ + void setPassword(const std::string& password); + + /** + * @brief Set the default CaCertPath for connections + * @param caCertPath the default CaCertPath for connections + */ + void setCaCertPath(const std::string& caCertPath); + + /** + * @brief Set the default ClientCertPath for connections + * @param clientCertPath the default ClientCertPath for connections + */ + void setClientCertPath(const std::string& clientCertPath); + + /** + * @brief Set the default ClientKeyPath for connections + * @param clientKeyPath the default ClientKeyPath for connections + */ + void setClientKeyPath(const std::string& clientKeyPath); + + /** + * @brief Set the number of connection retries + * @param retries + */ + void setRetries(const uint16 retries); + + /** + * @brief Set the wait period in seconds + * @param seconds + */ + void setSecondsToWait(const uint16 seconds); + + /** + * @brief Set the connection timeout + * @param connectionTimeout connection establishment timeout in milliseconds; zero for infinite + */ + void setConnectionTimeout(const uint32 connectionTimeout); + +public: // ConnectionFactory + virtual SmartPtrConnection createConnection() = 0; + std::string getProtocol(); + std::string getHost(); + uint32 getPort(); + std::string getVirtualHost(); + std::string getUsername(); + std::string getPassword(); + std::string getCaCertPath(); + std::string getClientCertPath(); + std::string getClientKeyPath(); + uint16 getRetries(); + uint16 getSecondsToWait(); + virtual void addConnectionListener(const SmartPtrConnectionListener& listener); + +protected: + std::string getDefaultProtocol(); + + std::string getDefaultHostName(); + + SmartPtrConnection createBareConnection(); + + SmartPtrConnectionListener getConnectionListener(); + +private: + bool _isInitialized; + AmqpClient::SmartPtrConnectionFactory _amqpConnectionFactory; + SmartPtrCompositeConnectionListener _connectionListener; + + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(AbstractConnectionFactory); +}; +CAF_DECLARE_SMART_POINTER(AbstractConnectionFactory); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpAdmin.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpAdmin.h new file mode 100644 index 000000000..03ba2bfb1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpAdmin.h @@ -0,0 +1,92 @@ +/* + * Created on: Jun 12, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_AMQPADMIN_H_ +#define AMQPINTEGRATIONCORE_AMQPADMIN_H_ + +#include "Exchange.h" + +namespace Caf { namespace AmqpIntegration { + +/** + * @brief Specifies a basic set of AMQP administrative operations for AMQP > 0.8 + */ +struct __declspec(novtable) AmqpAdmin : public ICafObject { + CAF_DECL_UUID("B10A94BC-0CC7-476F-A38A-2794CF98D74C") + + /** + * @brief Declare an exchange + * @param exchange the exchange (#Caf::AmqpIntegration::Exchange) to declare + */ + virtual void declareExchange(SmartPtrExchange exchange) = 0; + + /** + * @brief Delete an exchange + * @param exchange the name of the exchange + * @retval true the exchange existed and was deleted + * @retval false the exchange did not exists or could not be deleted + */ + virtual bool deleteExchange(const std::string& exchange) = 0; + + /** + * @brief Declare a queue whose name is automatically generated. + *

+ * The queue is created with durable=false, exclusive=true and auto-delete=true. + * @return the created queue. Call #Caf::AmqpIntegration::Queue::getName to + * get the server-generated name of the queue. + */ + virtual SmartPtrQueue declareQueue() = 0; + + /** + * @brief Declare a queue + * @param queue the queue to declare + */ + virtual void declareQueue(SmartPtrQueue queue) = 0; + + /** + * @brief Delete a queue without regard for whether it is in use or has messages in it + * @param queue the name of the queue + * @retval true the queue existed and was deleted + * @retval false the queue did not exist or could not be deleted + */ + virtual bool deleteQueue(const std::string& queue) = 0; + + /** + * @brief Delete a queue + * @param queue the name of the queue + * @param unused true if the queue should be deleted only if not in use + * @param empty true if the queue shoudl be deleted only if empty + */ + virtual void deleteQueue( + const std::string& queue, + const bool unused, + const bool empty) = 0; + + /** + * @brief Purges the contents of a queue + * @param queue the name of the queue + */ + virtual void purgeQueue(const std::string& queue) = 0; + + /** + * @brief Declare a binding of a queue to an exchange + * @param binding the binding information + */ + virtual void declareBinding(SmartPtrBinding binding) = 0; + + /** + * @brief Remove a binding of a queue to an exchange + * @param binding the binding information + */ + virtual void removeBinding(SmartPtrBinding binding) = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(AmqpAdmin); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpHeaderMapper.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpHeaderMapper.cpp new file mode 100644 index 000000000..3bc9c3ee1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpHeaderMapper.cpp @@ -0,0 +1,32 @@ +/* + * Created on: Jun 6, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "AmqpHeaderMapper.h" + +using namespace Caf::AmqpIntegration; + +const std::string AmqpHeaderMapper::PREFIX = "amqp_"; +const std::string AmqpHeaderMapper::APP_ID = AmqpHeaderMapper::PREFIX + "appId"; +const std::string AmqpHeaderMapper::CLUSTER_ID = AmqpHeaderMapper::PREFIX + "clusterId"; +const std::string AmqpHeaderMapper::CONTENT_ENCODING = AmqpHeaderMapper::PREFIX + "contentEncoding"; +const std::string AmqpHeaderMapper::CONTENT_TYPE = AmqpHeaderMapper::PREFIX + "contentType"; +const std::string AmqpHeaderMapper::CORRELATION_ID = AmqpHeaderMapper::PREFIX + "correlationId"; +const std::string AmqpHeaderMapper::DELIVERY_MODE = AmqpHeaderMapper::PREFIX + "deliveryMode"; +const std::string AmqpHeaderMapper::DELIVERY_TAG = AmqpHeaderMapper::PREFIX + "deliveryTag"; +const std::string AmqpHeaderMapper::EXPIRATION = AmqpHeaderMapper::PREFIX + "expiration"; +const std::string AmqpHeaderMapper::MESSAGE_COUNT = AmqpHeaderMapper::PREFIX + "messageCount"; +const std::string AmqpHeaderMapper::MESSAGE_ID = AmqpHeaderMapper::PREFIX + "messageId"; +const std::string AmqpHeaderMapper::RECEIVED_EXCHANGE = AmqpHeaderMapper::PREFIX + "receivedExchange"; +const std::string AmqpHeaderMapper::RECEIVED_ROUTING_KEY = AmqpHeaderMapper::PREFIX + "receivedRoutingKey"; +const std::string AmqpHeaderMapper::REDELIVERED = AmqpHeaderMapper::PREFIX + "redelivered"; +const std::string AmqpHeaderMapper::REPLY_TO = AmqpHeaderMapper::PREFIX + "replyTo"; +const std::string AmqpHeaderMapper::TIMESTAMP = AmqpHeaderMapper::PREFIX + "timestamp"; +const std::string AmqpHeaderMapper::TYPE = AmqpHeaderMapper::PREFIX + "type"; +const std::string AmqpHeaderMapper::USER_ID = AmqpHeaderMapper::PREFIX + "userId"; + diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpHeaderMapper.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpHeaderMapper.h new file mode 100644 index 000000000..45fc0c856 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpHeaderMapper.h @@ -0,0 +1,111 @@ +/* + * Created on: Jun 6, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_AMQPHEADERMAPPER_H_ +#define AMQPINTEGRATIONCORE_AMQPHEADERMAPPER_H_ + +namespace Caf { namespace AmqpIntegration { + +/** + * @brief This interface is used by objects that map AMQP headers to integration message + * headers and vice versa. + */ +struct __declspec(novtable) AMQPINTEGRATIONCORE_LINKAGE +AmqpHeaderMapper : public ICafObject { + CAF_DECL_UUID("5A292DD4-C3CC-4556-9809-90027C13EFA5") + + /* + * @brief Return the collection of AMQP headers from an integration message. + * @param headers the integration message headers + * @return the AMQP headers + */ + virtual AmqpClient::AmqpContentHeaders::SmartPtrBasicProperties + fromHeaders(IIntMessage::SmartPtrCHeaders headers) = 0; + + /** + * @brief Return the collection of integration message headers from an AMQP message. + * @param properties the AMQP message properties (#Caf::AmqpClient::AmqpContentHeaders::BasicProperties). + * @param envelope the AMQP message envelope (#Caf::AmqpClient::Envelope). + * @return the filtered set of headers as integration message headers + */ + virtual IIntMessage::SmartPtrCHeaders + toHeaders( + AmqpClient::AmqpContentHeaders::SmartPtrBasicProperties properties, + AmqpClient::SmartPtrEnvelope envelope) = 0; + + /** + * @brief Return the filtered collection of integration message headers from an integration message. + * @param headers the input set of message headers + * @return the filtered set of headers as integration message headers + */ + virtual IIntMessage::SmartPtrCHeaders + filterHeaders( + IIntMessage::SmartPtrCHeaders headers) = 0; + + /** @brief AMQP header prefix */ + static const std::string PREFIX; + + /** @brief AMQP application id header */ + static const std::string APP_ID; + + /** @brief AMQP cluster id header */ + static const std::string CLUSTER_ID; + + /** @brief AMQP content encoding header */ + static const std::string CONTENT_ENCODING; + + /** @brief AMQP content length hedaer */ + static const std::string CONTENT_LENGTH; + + /** @brief AMQP content type header */ + static const std::string CONTENT_TYPE; + + /** @brief AMQP correlation id header */ + static const std::string CORRELATION_ID; + + /** @brief AMQP delivery mode header */ + static const std::string DELIVERY_MODE; + + /** @brief AMQP delivery tag header */ + static const std::string DELIVERY_TAG; + + /** @brief AMQP expiration header */ + static const std::string EXPIRATION; + + /** @brief AMQP message count header */ + static const std::string MESSAGE_COUNT; + + /** @brief AMQP message id header */ + static const std::string MESSAGE_ID; + + /** @brief AMQP received exchange header */ + static const std::string RECEIVED_EXCHANGE; + + /** @brief AMQP routing key header */ + static const std::string RECEIVED_ROUTING_KEY; + + /** @brief AMQP redelivered header */ + static const std::string REDELIVERED; + + /** @brief AMQP reply to header */ + static const std::string REPLY_TO; + + /** @brief AMQP timestamp header */ + static const std::string TIMESTAMP; + + /** @brief AMQP type header */ + static const std::string TYPE; + + /** @brief AMQP user id header */ + static const std::string USER_ID; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(AmqpHeaderMapper); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpIntegrationCoreDefines.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpIntegrationCoreDefines.h new file mode 100644 index 000000000..d7be43e45 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpIntegrationCoreDefines.h @@ -0,0 +1,29 @@ +/* + * Created on: Jul 31, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCOREDEFINES_H_ +#define AMQPINTEGRATIONCOREDEFINES_H_ + +namespace Caf { namespace AmqpIntegration { +/** + * @brief Message acknowledgment mode flags + */ +typedef enum { + /** @brief No acks will be sent. AMQP broker will assume all messages are acked. */ + ACKNOWLEDGEMODE_NONE, + + /** @brief The listener must acknowledge all messages by calling Channel.basicAck() */ + ACKNOWLEDGEMODE_MANUAL, + + /** @brief The container will acknowledge messages automatically. */ + ACKNOWLEDGEMODE_AUTO +} AcknowledgeMode; + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpIntegrationCoreFunc.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpIntegrationCoreFunc.h new file mode 100644 index 000000000..9eb5b242c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpIntegrationCoreFunc.h @@ -0,0 +1,108 @@ +/* + * Created on: Jun 15, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCOREFUNC_H_ +#define AMQPINTEGRATIONCOREFUNC_H_ + +#include "Queue.h" +#include "Exchange.h" +#include "Binding.h" + +namespace Caf { + +/** @brief CAF AMQP Integration */ +namespace AmqpIntegration { + +/** + * @brief Create a #Caf::AmqpIntegration::Queue object + *

+ * durable will be set to true; + * exclusive and autoDelete will be set to false. + * @param name the name of the queue + * @return the queue object + */ +SmartPtrQueue AMQPINTEGRATIONCORE_LINKAGE createQueue( + const std::string& name); + +/** + * @brief Create a #Caf::AmqpIntegration::Queue object + *

+ * exclusive and autoDelete will be set to false. + * @param name the name of the queue + * @param durable true to make the queue durable else false + * @return the queue object + */ +SmartPtrQueue AMQPINTEGRATIONCORE_LINKAGE createQueue( + const std::string& name, + const bool durable); + +/** + * @brief Create a #Caf::AmqpIntegration::Queue object + * @param name the name of the queue or blank for a server-generated name + * @param durable true to make the queue durable else false + * @param exclusive true to make the queue exclusive else false + * @param autoDelete true to make the queue auto-delete else false + * @return the queue object + */ +SmartPtrQueue AMQPINTEGRATIONCORE_LINKAGE createQueue( + const std::string& name, + const bool durable, + const bool exclusive, + const bool autoDelete); + + +/** + * @brief Create a #Caf::AmqpIntegration::Exchange object representing a direct exchange + * @param name the name of the exchange + * @param durable true to make the exchange durable else false + */ +SmartPtrExchange AMQPINTEGRATIONCORE_LINKAGE createDirectExchange( + const std::string& name, + const bool durable = true); + +/** + * @brief Create a #Caf::AmqpIntegration::Exchange object representing a topic exchange + * @param name the name of the exchange + * @param durable true to make the exchange durable else false + */ +SmartPtrExchange AMQPINTEGRATIONCORE_LINKAGE createTopicExchange( + const std::string& name, + const bool durable = true); + +/** + * @brief Create a #Caf::AmqpIntegration::Exchange object representing a headers exchange + * @param name the name of the exchange + * @param durable true to make the exchange durable else false + */ +SmartPtrExchange AMQPINTEGRATIONCORE_LINKAGE createHeadersExchange( + const std::string& name, + const bool durable = true); + +/** + * @brief Create a #Caf::AmqpIntegration::Exchange object representing a fanout exchange + * @param name the name of the exchange + * @param durable true to make the exchange durable else false + */ +SmartPtrExchange AMQPINTEGRATIONCORE_LINKAGE createFanoutExchange( + const std::string& name, + const bool durable = true); + +/** + * @brief Create a #Caf::AmqpIntegration::Binding object + * @param queue the queue name + * @param exchange the exchange name + * @param routingKey the routing key + */ +SmartPtrBinding AMQPINTEGRATIONCORE_LINKAGE createBinding( + const std::string queue, + const std::string exchange, + const std::string routingKey); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpIntegrationExceptions.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpIntegrationExceptions.cpp new file mode 100644 index 000000000..8a5686629 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpIntegrationExceptions.cpp @@ -0,0 +1,17 @@ +/* + * Created on: Jul 18, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "AmqpIntegrationExceptions.h" + +using namespace Caf::AmqpIntegration::AmqpIntExceptions; + +AMQP_CM_DEFINE_EXCEPTION_CLASS(ReplyRequiredException); +AMQP_CM_DEFINE_EXCEPTION_CLASS(ChannelResolutionException); +AMQP_CM_DEFINE_EXCEPTION_CLASS(ExpressionResultNull); +AMQP_CM_DEFINE_EXCEPTION_CLASS(ExpressionResultWrongType); diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpIntegrationExceptions.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpIntegrationExceptions.h new file mode 100644 index 000000000..22b64fd65 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpIntegrationExceptions.h @@ -0,0 +1,33 @@ +/* + * Created on: Jul 18, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_AMQPINTEGRATIONEXCEPTIONS_H_ +#define AMQPINTEGRATIONCORE_AMQPINTEGRATIONEXCEPTIONS_H_ + +namespace Caf { namespace AmqpIntegration { + +/** + * @brief Exceptions defined by this library + */ +namespace AmqpIntExceptions { + +/** @brief A reply was required but was not produced */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(ReplyRequiredException); + +/** @brief Thrown by a ChannelResolver when it cannot resolve a channel name */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(ChannelResolutionException); + +/** @brief Thrown if an expression failed to return a result */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(ExpressionResultNull); + +/** @brief Thrown if an expression resolved to an incorrect result type */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(ExpressionResultWrongType); + +}}} + +#endif /* AMQPINTEGRATIONCORE_AMQPINTEGRATIONEXCEPTIONS_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpMessageListenerSource.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpMessageListenerSource.cpp new file mode 100644 index 000000000..fce9bc3a2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpMessageListenerSource.cpp @@ -0,0 +1,95 @@ +/* + * Created on: Aug 7, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "AmqpMessageListenerSource.h" + +using namespace Caf::AmqpIntegration; + +AmqpMessageListenerSource::AmqpMessageListenerSource() : + _isInitialized(false), + _messageQueue(NULL), + CAF_CM_INIT("AmqpMessageListenerSource") { +} + +AmqpMessageListenerSource::~AmqpMessageListenerSource() { +} + +void AmqpMessageListenerSource::init( + const SmartPtrAmqpHeaderMapper& headerMapper, + const SmartPtrCPollerMetadata& pollerMetadata) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_PTR(pollerMetadata); + // headerMapper is optional + + _headerMapper = headerMapper; + _messageQueue = g_async_queue_new_full(QueueItemDestroyFunc); + setPollerMetadata(pollerMetadata); + _isInitialized = true; +} +void AmqpMessageListenerSource::onMessage(const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("onMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + SmartPtrIIntMessage queuedMessage = message; + if (_headerMapper) { + SmartPtrCIntMessage filteredMessage; + filteredMessage.CreateInstance(); + filteredMessage->initialize( + queuedMessage->getPayload(), + _headerMapper->filterHeaders(queuedMessage->getHeaders()), + NULL); + queuedMessage = filteredMessage; + } + g_async_queue_push( + _messageQueue, + queuedMessage.GetAddRefedInterface()); +} + +bool AmqpMessageListenerSource::doSend( + const SmartPtrIIntMessage& message, + int32 timeout) { + CAF_CM_FUNCNAME("doSend"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_EXCEPTIONEX_VA1( + UnsupportedOperationException, + E_NOTIMPL, + "This is not a sending channel: %s", _id.c_str()); + return false; +} + +SmartPtrIIntMessage AmqpMessageListenerSource::doReceive(const int32 timeout) { + CAF_CM_FUNCNAME_VALIDATE("doReceive"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + gpointer data = NULL; + if (timeout < 0) { + // blocking + data = g_async_queue_pop(_messageQueue); + } else if (timeout == 0) { + // immediate + data = g_async_queue_try_pop(_messageQueue); + } else { + // timed + gint64 microTimeout = timeout * 1000; + data = g_async_queue_timeout_pop(_messageQueue, microTimeout); + } + + SmartPtrIIntMessage message; + if (data) { + IIntMessage *messagePtr = reinterpret_cast(data); + message = messagePtr; + messagePtr->Release(); + } + return message; +} + +void AmqpMessageListenerSource::QueueItemDestroyFunc(gpointer data) { + reinterpret_cast(data)->Release(); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpMessageListenerSource.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpMessageListenerSource.h new file mode 100644 index 000000000..c9ee9f4f6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpMessageListenerSource.h @@ -0,0 +1,54 @@ +/* + * Created on: Aug 7, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AmqpMessageListenerSource_h +#define AmqpMessageListenerSource_h + +#include "AmqpHeaderMapper.h" +#include "MessageListener.h" + +namespace Caf { namespace AmqpIntegration { + +class AMQPINTEGRATIONCORE_LINKAGE AmqpMessageListenerSource : + public CAbstractPollableChannel, + public MessageListener { +public: + AmqpMessageListenerSource(); + virtual ~AmqpMessageListenerSource(); + + void init( + const SmartPtrAmqpHeaderMapper& headerMapper, + const SmartPtrCPollerMetadata& pollerMetadata); + +public: // MessageListener + void onMessage(const SmartPtrIIntMessage& message); + +private: // CAbstractPollableChannel + bool doSend( + const SmartPtrIIntMessage& message, + int32 timeout); + + SmartPtrIIntMessage doReceive(const int32 timeout); + +private: + static void QueueItemDestroyFunc(gpointer data); + +private: + bool _isInitialized; + std::string _id; + GAsyncQueue *_messageQueue; + SmartPtrAmqpHeaderMapper _headerMapper; + + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(AmqpMessageListenerSource); +}; +CAF_DECLARE_SMART_POINTER(AmqpMessageListenerSource); + +}} + +#endif /* AmqpMessageListenerSource_h */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpOutboundEndpoint.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpOutboundEndpoint.cpp new file mode 100644 index 000000000..102763e2e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpOutboundEndpoint.cpp @@ -0,0 +1,287 @@ +/* + * Created on: Jul 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "AmqpOutboundEndpoint.h" +#include "DefaultAmqpHeaderMapper.h" + +using namespace Caf::AmqpIntegration; + +AmqpOutboundEndpoint::AmqpOutboundEndpoint() : + _isInitialized(false), + _id(CAFCOMMON_GUID_NULL), + _expectReply(false), + _requiresReply(false), + CAF_CM_INIT("AmqpOutboundEndpoint") { +} + +AmqpOutboundEndpoint::~AmqpOutboundEndpoint() { +} + +void AmqpOutboundEndpoint::init( + SmartPtrAmqpTemplate amqpTemplate, + SmartPtrIAppConfig appConfig, + SmartPtrIAppContext appContext) { + CAF_CM_FUNCNAME("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(amqpTemplate); + CAF_CM_VALIDATE_SMARTPTR(appConfig); + CAF_CM_VALIDATE_SMARTPTR(appContext); + + _amqpTemplate = amqpTemplate; + if (!_exchangeName.length() && !_exchangeNameExpression.length()) { + CAF_CM_EXCEPTIONEX_VA0( + IllegalStateException, + 0, + "exchange-name or exchange-name-expression must be set before calling init()"); + } + if (!_routingKey.length() && !_routingKeyExpression.length()) { + CAF_CM_EXCEPTIONEX_VA0( + IllegalStateException, + 0, + "routing-key or routing-key-expression must be set before calling init()"); + } + ::UuidCreate(&_id); + + if (_exchangeNameExpression.length()) { + _exchangeNameHandler.CreateInstance(); + _exchangeNameHandler->init(appConfig, appContext, _exchangeNameExpression); + } + + if (_routingKeyExpression.length()) { + _routingKeyHandler.CreateInstance(); + _routingKeyHandler->init(appConfig, appContext, _routingKeyExpression); + } + + if (_requestHeaderMapperExpression.length()) { + SmartPtrDefaultAmqpHeaderMapper mapper; + mapper.CreateInstance(); + mapper->init(_requestHeaderMapperExpression); + _requestHeaderMapper = mapper; + } + + _isInitialized = true; +} + +void AmqpOutboundEndpoint::setExchangeName(const std::string& exchangeName) { + _exchangeName = exchangeName; +} + +void AmqpOutboundEndpoint::setExchangeNameExpression(const std::string& exchangeNameExpression) { + _exchangeNameExpression = exchangeNameExpression; +} + +void AmqpOutboundEndpoint::setRoutingKey(const std::string& routingKey) { + _routingKey = routingKey; +} + +void AmqpOutboundEndpoint::setRoutingKeyExpression(const std::string& routingKeyExpression) { + _routingKeyExpression = routingKeyExpression; +} +void AmqpOutboundEndpoint::setMappedRequestHeadersExpression(const std::string& expression) { + _requestHeaderMapperExpression = expression; +} + +void AmqpOutboundEndpoint::setExpectReply(const bool expectReply) { + _expectReply = expectReply; +} + +void AmqpOutboundEndpoint::setRequiresReply(const bool requiresReply) { + _requiresReply = requiresReply; +} + +void AmqpOutboundEndpoint::setComponentName(const std::string& name) { + _componentName = name; +} + +void AmqpOutboundEndpoint::setChannelResolver(SmartPtrIChannelResolver channelResolver) { + _channelResolver = channelResolver; +} + +UUID AmqpOutboundEndpoint::getHandlerId() const { + CAF_CM_FUNCNAME_VALIDATE("getHandlerId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _id; +} + +void AmqpOutboundEndpoint::handleMessage(const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME("handleMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(message); + + SmartPtrIIntMessage result = handleRequestMessage(message); + if (result) { + IIntMessage::SmartPtrCHeaders requestHeaders = message->getHeaders(); + handleResult(result, requestHeaders); + } else if (_requiresReply) { + std::stringstream msg; + msg << "No reply produced by handler '"; + if (_componentName.length()) { + msg << _componentName; + } else { + msg << BasePlatform::UuidToString(_id); + } + msg << "', and its 'requiresReply' property is set to true."; + CAF_CM_EXCEPTIONEX_VA0( + AmqpIntExceptions::ReplyRequiredException, + 0, + msg.str().c_str()); + } +} + +SmartPtrIIntMessage AmqpOutboundEndpoint::getSavedMessage() const { + CAF_CM_FUNCNAME_VALIDATE("getSavedMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return NULL; +} + +void AmqpOutboundEndpoint::clearSavedMessage() { + CAF_CM_FUNCNAME_VALIDATE("clearSavedMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); +} + +SmartPtrIIntMessage AmqpOutboundEndpoint::handleRequestMessage( + SmartPtrIIntMessage requestMessage) { + SmartPtrIIntMessage reply; + std::string exchangeName = _exchangeName; + std::string routingKey = _routingKey; + if (_expectReply) { + reply = sendAndReceive(exchangeName, routingKey, requestMessage); + } else { + send(exchangeName, routingKey, requestMessage); + } + return reply; +} + +void AmqpOutboundEndpoint::handleResult( + SmartPtrIIntMessage resultMessage, + IIntMessage::SmartPtrCHeaders requestHeaders) { + SmartPtrIIntMessage reply = createReplyMessage(resultMessage, requestHeaders); + sendReplyMessage( + reply, + resultMessage->findRequiredHeader(MessageHeaders::_sREPLY_CHANNEL)->toString()); +} + +void AmqpOutboundEndpoint::send( + const std::string& exchangeName, + const std::string& routingKey, + SmartPtrIIntMessage requestMessage) { + CAF_CM_FUNCNAME("send"); + + std::string resolvedExchange = exchangeName; + std::string resolvedRoutingKey = routingKey; + SmartPtrIVariant evalResult; + if (_exchangeNameHandler) { + evalResult = _exchangeNameHandler->evaluate(requestMessage); + if (evalResult) { + resolvedExchange = evalResult->toString(); + } else { + CAF_CM_EXCEPTIONEX_VA0( + AmqpIntExceptions::ExpressionResultNull, + 0, + "The exchange name was not resolved"); + } + } + + if (_routingKeyHandler) { + evalResult = _routingKeyHandler->evaluate(requestMessage); + if (evalResult) { + resolvedRoutingKey = evalResult->toString(); + } else { + CAF_CM_EXCEPTIONEX_VA0( + AmqpIntExceptions::ExpressionResultNull, + 0, + "The routing key was not resolved"); + } + } + + _amqpTemplate->send( + resolvedExchange, + resolvedRoutingKey, + requestMessage, + _requestHeaderMapper); +} + +SmartPtrIIntMessage AmqpOutboundEndpoint::sendAndReceive( + const std::string& exchangeName, + const std::string& routingKey, + SmartPtrIIntMessage requestMessage) { + CAF_CM_FUNCNAME("sendAndReceive"); + + std::string resolvedExchange = exchangeName; + std::string resolvedRoutingKey = routingKey; + SmartPtrIVariant evalResult; + if (_exchangeNameHandler) { + evalResult = _exchangeNameHandler->evaluate(requestMessage); + if (evalResult) { + resolvedExchange = evalResult->toString(); + } else { + CAF_CM_EXCEPTIONEX_VA0( + AmqpIntExceptions::ExpressionResultNull, + 0, + "The exchange name was not resolved"); + } + } + + if (_routingKeyHandler) { + evalResult = _routingKeyHandler->evaluate(requestMessage); + if (evalResult) { + resolvedRoutingKey = evalResult->toString(); + } else { + CAF_CM_EXCEPTIONEX_VA0( + AmqpIntExceptions::ExpressionResultNull, + 0, + "The routing key was not resolved"); + } + } + + return _amqpTemplate->sendAndReceive( + resolvedExchange, + resolvedRoutingKey, + requestMessage, + _requestHeaderMapper, + _responseHeaderMapper); +} + +SmartPtrIIntMessage AmqpOutboundEndpoint::createReplyMessage( + SmartPtrIIntMessage reply, + IIntMessage::SmartPtrCHeaders requestHeaders) { + SmartPtrCIntMessage replyMessage; + replyMessage.CreateInstance(); + replyMessage->initialize( + reply->getPayload(), + reply->getHeaders(), + requestHeaders); + return replyMessage; +} + +void AmqpOutboundEndpoint::sendReplyMessage( + SmartPtrIIntMessage reply, + const std::string& replyChannelHeaderValue) { + CAF_CM_FUNCNAME("sendReplyMessage"); + + if (_outputChannel) { + _outputChannel->send(reply); + } else if (replyChannelHeaderValue.length()) { + if (_channelResolver) { + SmartPtrIMessageChannel channel = + _channelResolver->resolveChannelName(replyChannelHeaderValue); + channel->send(reply); + } else { + CAF_CM_EXCEPTIONEX_VA0( + AmqpIntExceptions::ChannelResolutionException, + 0, + "No ChannelResolver is available"); + } + } else { + CAF_CM_EXCEPTIONEX_VA0( + AmqpIntExceptions::ChannelResolutionException, + 0, + "No output-channel or replyChannel header available"); + } +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpOutboundEndpoint.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpOutboundEndpoint.h new file mode 100644 index 000000000..33a5144b3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpOutboundEndpoint.h @@ -0,0 +1,159 @@ +/* + * Created on: Jul 16, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_AMQPOUTBOUNDENDPOINT_H_ +#define AMQPINTEGRATIONCORE_AMQPOUTBOUNDENDPOINT_H_ + +#include "AmqpTemplate.h" + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObjImpl + * @brief Adapter that converts and sends Messages to an AMQP exchange + */ +class AMQPINTEGRATIONCORE_LINKAGE AmqpOutboundEndpoint : public IMessageHandler { + CAF_BEGIN_QI() + CAF_QI_ENTRY(IMessageHandler) + CAF_END_QI() + +public: + AmqpOutboundEndpoint(); + virtual ~AmqpOutboundEndpoint(); + + /** + * @brief Initialize this object + * @param amqpTemplate the #Caf::AmqpIntegration::AmqpTemplate used to + * send and receive messages + * @param appConfig the application configuration object + * @param appContext the application context object + */ + void init( + SmartPtrAmqpTemplate amqpTemplate, + SmartPtrIAppConfig appConfig, + SmartPtrIAppContext appContext); + + /** + * @brief Set the name of the AMQP exchange + * @param exchangeName the name of the exchange + */ + void setExchangeName(const std::string& exchangeName); + + /** + * @brief Set the name of the AMQP exchange as an expression of message information + * @param exchangeNameExpression the exchange name expression + */ + void setExchangeNameExpression(const std::string& exchangeNameExpression); + + /** + * @brief Set the routing key + * @param routingKey the routing key + */ + void setRoutingKey(const std::string& routingKey); + + /** + * @brief Set the routing key as an expression of message information + * @param routingKeyExpression the routing key expression + */ + void setRoutingKeyExpression(const std::string& routingKeyExpression); + + /** + * @brief Set the regular expression mapping of headers to send along with the message + *

+ * AMQP headers (amqp_XXXX) are always automatically mapped to their AMQP + * BasicProperties counterparts. This expression controls which additional headers + * are sent along with the message. + * @param expression header mapping expression + */ + void setMappedRequestHeadersExpression(const std::string& expression); + + /** + * @brief Set the expects reply flag. + * @param expectReply true if a reply is expected else false + */ + void setExpectReply(const bool expectReply); + + /** + * @brief Set the requires reply flag. + * @param requiresReply true if a reply is required else false + */ + void setRequiresReply(const bool requiresReply); + + /** + * @brief Set the friendly name of this instance. + * @param name the instance name + */ + void setComponentName(const std::string& name); + + /** + * @brief Set the channel resolver object + * @param channelResolver the channel resolver + */ + void setChannelResolver(SmartPtrIChannelResolver channelResolver); + +public: // IMessageHandler + UUID getHandlerId() const; + + void handleMessage(const SmartPtrIIntMessage& message); + + SmartPtrIIntMessage getSavedMessage() const; + + void clearSavedMessage(); + +private: + SmartPtrIIntMessage handleRequestMessage(SmartPtrIIntMessage requestMessage); + + void handleResult( + SmartPtrIIntMessage resultMessage, + IIntMessage::SmartPtrCHeaders requestHeaders); + + void send( + const std::string& exchangeName, + const std::string& routingKey, + SmartPtrIIntMessage requestMessage); + + SmartPtrIIntMessage sendAndReceive( + const std::string& exchangeName, + const std::string& routingKey, + SmartPtrIIntMessage requestMessage); + + SmartPtrIIntMessage createReplyMessage( + SmartPtrIIntMessage reply, + IIntMessage::SmartPtrCHeaders requestHeaders); + + void sendReplyMessage( + SmartPtrIIntMessage reply, + const std::string& replyChannelHeaderValue); + +private: + bool _isInitialized; + UUID _id; + std::string _componentName; + SmartPtrAmqpTemplate _amqpTemplate; + bool _expectReply; + bool _requiresReply; + std::string _exchangeName; + std::string _exchangeNameExpression; + std::string _routingKey; + std::string _routingKeyExpression; + std::string _requestHeaderMapperExpression; + SmartPtrIChannelResolver _channelResolver; + SmartPtrIMessageChannel _outputChannel; + SmartPtrCExpressionHandler _exchangeNameHandler; + SmartPtrCExpressionHandler _routingKeyHandler; + SmartPtrAmqpHeaderMapper _requestHeaderMapper; + SmartPtrAmqpHeaderMapper _responseHeaderMapper; + + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(AmqpOutboundEndpoint); +}; +CAF_DECLARE_SMART_QI_POINTER(AmqpOutboundEndpoint); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpTemplate.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpTemplate.h new file mode 100644 index 000000000..f52b8fc12 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpTemplate.h @@ -0,0 +1,164 @@ +/* + * Created on: May 25, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_AMQPTEMPLATE_H_ +#define AMQPINTEGRATIONCORE_AMQPTEMPLATE_H_ + +#include "AmqpHeaderMapper.h" + +namespace Caf { namespace AmqpIntegration { + +/** + * @brief Specifies a basic set of AMQP operations. + *

+ * Provides synchronous send and receive methods as well as a generic executor + * through a callback to a provided object. + */ +struct __declspec(novtable) AmqpTemplate : public ICafObject { + CAF_DECL_UUID("B79DDF8E-B302-4576-9D96-DC413C76392C") + + /** + * @brief Send a message to a default exchange with a default routing key. + * @param message a message to send + * @param headerMapper optional header mapper to use in place of the standard mapper + */ + virtual void send( + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper headerMapper = SmartPtrAmqpHeaderMapper()) = 0; + + /** + * @brief Send a message to a default exchange with a routing key. + * @param routingKey the routing key + * @param message a message to send + * @param headerMapper optional header mapper to use in place of the standard mapper + */ + virtual void send( + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper headerMapper = SmartPtrAmqpHeaderMapper()) = 0; + + /** + * @brief Send a message to an exchange with a routing key. + * @param exchange the name of the exchange + * @param routingKey the routing key + * @param message a message to send + * @param headerMapper optional header mapper to use in place of the standard mapper + */ + virtual void send( + const std::string& exchange, + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper headerMapper = SmartPtrAmqpHeaderMapper()) = 0; + + /** + * @brief Receive a message if there is one from a default queue. + *

+ * Returns immediately, possibly with a null value. + * @param headerMapper optional header mapper to use in place of the standard mapper + */ + virtual SmartPtrIIntMessage receive( + SmartPtrAmqpHeaderMapper headerMapper = SmartPtrAmqpHeaderMapper()) = 0; + + /** + * @brief Receive a message if there is one from a specific queue. + *

+ * Returns immediately, possibly with a null value. + * @param queueName the name of the queue + * @param headerMapper optional header mapper to use in place of the standard mapper + */ + virtual SmartPtrIIntMessage receive( + const std::string& queueName, + SmartPtrAmqpHeaderMapper headerMapper = SmartPtrAmqpHeaderMapper()) = 0; + + /** + * @brief Basic RPC pattern. + *

+ * Send a message to a default exchange with a default routing key and attempt to + * receive a response. The implementation will create a temporary anonymous queue + * to receive the response and will use the repy-to header to notify the recipient + * of the response routing. + * @param message a message to send + * @param requestHeaderMapper optional header mapper to use in place of the standard mapper on the outgoing message + * @param responseHeaderMapper optional header mapper to use in place of the standard mapper on the incoming message + */ + virtual SmartPtrIIntMessage sendAndReceive( + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper requestHeaderMapper = SmartPtrAmqpHeaderMapper(), + SmartPtrAmqpHeaderMapper responseHeaderMapper = SmartPtrAmqpHeaderMapper()) = 0; + + /** + * @brief Basic RPC pattern. + *

+ * Send a message to a default exchange with a specific routing key and attempt to + * receive a response. The implementation will create a temporary anonymous queue + * to receive the response and will use the repy-to header to notify the recipient + * of the response routing. + * @param routingKey the routing key + * @param message a message to send + * @param requestHeaderMapper optional header mapper to use in place of the standard mapper on the outgoing message + * @param responseHeaderMapper optional header mapper to use in place of the standard mapper on the incoming message + */ + virtual SmartPtrIIntMessage sendAndReceive( + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper requestHeaderMapper = SmartPtrAmqpHeaderMapper(), + SmartPtrAmqpHeaderMapper responseHeaderMapper = SmartPtrAmqpHeaderMapper()) = 0; + + /** + * @brief Basic RPC pattern. + *

+ * Send a message to a specific exchange with a specific routing key and attempt to + * receive a response. The implementation will create a temporary anonymous queue + * to receive the response and will use the repy-to header to notify the recipient + * of the response routing. + * @param exchange the name of the exchange + * @param routingKey the routing key + * @param message a message to send + * @param requestHeaderMapper optional header mapper to use in place of the standard mapper on the outgoing message + * @param responseHeaderMapper optional header mapper to use in place of the standard mapper on the incoming message + */ + virtual SmartPtrIIntMessage sendAndReceive( + const std::string& exchange, + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper requestHeaderMapper = SmartPtrAmqpHeaderMapper(), + SmartPtrAmqpHeaderMapper responseHeaderMapper = SmartPtrAmqpHeaderMapper()) = 0; + + /** + * @brief Interface to objects used to execute arbitrary AMQP commands + *

+ * This interface provides a mechanism to execute arbitrary AMQP commands. Implement + * a class based on this interface with the logic required to support the desired + * AMQP operation. The template will call this object with a channel on which + * to execute the command. + * @param channel the AMQP channel (Caf::AmqpClient::Channel in the + * CAF AMQP Client Library API documentation.) + * @param data user-specific data required to perform the operation + * @return a pointer to a user-specified object representing the result of the + * operation. + */ + struct Executor : public ICafObject { + virtual gpointer execute(AmqpClient::SmartPtrChannel channel, gpointer data) = 0; + }; + CAF_DECLARE_SMART_POINTER(Executor); + + /** + * @brief Execute an arbitrary AMQP operation + * @see #Caf::AmqpIntegration::AmqpTemplate::Executor + * @param executor the object used to execute the AMQP operation + * @param data user-specific data required to perform the operation + * @return a pointer to a user-specified object representing the result of the + * operation. + */ + virtual gpointer execute(SmartPtrExecutor executor, gpointer data) = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(AmqpTemplate); + +}} + +#endif /* AMQPINTEGRATIONCORE_AMQPTEMPLATE_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AutoChannelClose.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AutoChannelClose.cpp new file mode 100644 index 000000000..ad01a713c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AutoChannelClose.cpp @@ -0,0 +1,21 @@ +/* + * Created on: Aug 7, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "AutoChannelClose.h" + +using namespace Caf::AmqpIntegration; + +AutoChannelClose::AutoChannelClose(AmqpClient::SmartPtrChannel channel) : + _channel(channel) {} + +AutoChannelClose::~AutoChannelClose() { + if (_channel) { + _channel->close(); + } +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AutoChannelClose.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AutoChannelClose.h new file mode 100644 index 000000000..62f0518e1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AutoChannelClose.h @@ -0,0 +1,37 @@ +/* + * Created on: Jun 15, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_AUTOCHANNELCLOSE_H_ +#define AMQPINTEGRATIONCORE_AUTOCHANNELCLOSE_H_ + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObjImpl + * @brief A helper class to automatically close a channel + *

+ * This class is helpful to mimic try/catch/finally logic in the code. + * Simply declare an instance on the stack, initialized with the channel. + * When the instance goes out of scope it will close the channel. + */ +class AMQPINTEGRATIONCORE_LINKAGE AutoChannelClose { +public: + /** + * @brief Construct the instance with the given channel + * @param channel the channel to auto-close + */ + AutoChannelClose(AmqpClient::SmartPtrChannel channel); + ~AutoChannelClose(); + +private: + AmqpClient::SmartPtrChannel _channel; +}; + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/Binding.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/Binding.h new file mode 100644 index 000000000..3a7527e4b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/Binding.h @@ -0,0 +1,35 @@ +/* + * Created on: Jun 13, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_BINDING_H_ +#define AMQPINTEGRATIONCORE_BINDING_H_ + +namespace Caf { namespace AmqpIntegration { + +/** + * @brief Simple container collecting information to describe a queue binding. Used in conjunction with RabbitAdmin. + *

+ * Use #Caf::AmqpIntegration::createBinding to create a binding. + */ +struct __declspec(novtable) Binding : public ICafObject { + CAF_DECL_UUID("A6067BE6-18C1-4D50-BB2F-AB9E49EA2111") + + /** @return the queue name */ + virtual std::string getQueue() const = 0; + + /** @return the exchange name */ + virtual std::string getExchange() const = 0; + + /** @return the routing key */ + virtual std::string getRoutingKey() const = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(Binding); + +}} + +#endif /* AMQPINTEGRATIONCORE_BINDING_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/BindingImpl.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/BindingImpl.cpp new file mode 100644 index 000000000..90526ee5b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/BindingImpl.cpp @@ -0,0 +1,50 @@ +/* + * Created on: Jun 14, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "Binding.h" +#include "BindingImpl.h" + +using namespace Caf::AmqpIntegration; + +BindingImpl::BindingImpl() { +} + +BindingImpl::~BindingImpl() { +} + +void BindingImpl::init( + const std::string queue, + const std::string exchange, + const std::string routingKey) { + _queue = queue; + _exchange = exchange; + _routingKey = routingKey; +} + +std::string BindingImpl::getQueue() const { + return _queue; +} + +std::string BindingImpl::getExchange() const { + return _exchange; +} + +std::string BindingImpl::getRoutingKey() const { + return _routingKey; +} + +SmartPtrBinding AMQPINTEGRATIONCORE_LINKAGE Caf::AmqpIntegration::createBinding( + const std::string queue, + const std::string exchange, + const std::string routingKey) { + SmartPtrBindingImpl binding; + binding.CreateInstance(); + binding->init(queue, exchange, routingKey); + return binding; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/BindingImpl.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/BindingImpl.h new file mode 100644 index 000000000..1934f9cf2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/BindingImpl.h @@ -0,0 +1,49 @@ +/* + * Created on: Jun 14, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_BINDINGIMPL_H_ +#define AMQPINTEGRATIONCORE_BINDINGIMPL_H_ + +namespace Caf { namespace AmqpIntegration { + +/** + * @brief Implementations of the #Caf::AmqpIntegration::Binding interface. + */ +class AMQPINTEGRATIONCORE_LINKAGE BindingImpl : public Binding { +public: + BindingImpl(); + virtual ~BindingImpl(); + + /** + * @brief initialize the object + * @param queue the name of the queue + * @param exchange the name of the exchange + * @param routingKey the routing key + */ + void init( + const std::string queue, + const std::string exchange, + const std::string routingKey); + + std::string getQueue() const; + + std::string getExchange() const; + + std::string getRoutingKey() const; + +private: + std::string _queue; + std::string _exchange; + std::string _routingKey; + CAF_CM_DECLARE_NOCOPY(BindingImpl); +}; +CAF_DECLARE_SMART_POINTER(BindingImpl); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/BindingInternal.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/BindingInternal.h new file mode 100644 index 000000000..4c53fdec9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/BindingInternal.h @@ -0,0 +1,30 @@ +/* + * Created on: Jun 15, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_BINDINGINTERNAL_H_ +#define AMQPINTEGRATIONCORE_BINDINGINTERNAL_H_ + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObjImpl + * @brief Interface allowing for internal management of binding integration objects + */ +struct __declspec(novtable) BindingInternal : public ICafObject { + CAF_DECL_UUID("23D0079E-93F8-4C06-BD33-F0E795506FB2") + + /** + * @brief Sets the delegated Binding object + * @param binding the delegated binding + */ + virtual void setBindingInternal(SmartPtrBinding binding) = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(BindingInternal); + +}} +#endif /* AMQPINTEGRATIONCORE_BINDINGINTERNAL_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/BlockingQueueConsumer.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/BlockingQueueConsumer.cpp new file mode 100644 index 000000000..7f1bf7a55 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/BlockingQueueConsumer.cpp @@ -0,0 +1,445 @@ +/* + * Created on: Jul 30, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "BlockingQueueConsumer.h" + +using namespace Caf::AmqpIntegration; + +#if (1) // BlockingQueueConsumer +BlockingQueueConsumer::BlockingQueueConsumer() : + _isInitialized(false), + _isRunning(false), + _isCanceled(false), + _deliveryQueue(NULL), + _acknowledgeMode(ACKNOWLEDGEMODE_NONE), + _prefetchCount(0), + CAF_CM_INIT_LOG("BlockingQueueConsumer") { + _parentLock.CreateInstance(); + _parentLock->initialize(); +} + +BlockingQueueConsumer::~BlockingQueueConsumer() { + if (_deliveryQueue) { + g_async_queue_unref(_deliveryQueue); + } +} + +void BlockingQueueConsumer::init( + SmartPtrConnectionFactory connectionFactory, + SmartPtrAmqpHeaderMapper headerMapper, + AcknowledgeMode acknowledgeMode, + uint32 prefetchCount, + const std::string& queue) { + CAF_CM_FUNCNAME("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(connectionFactory); + CAF_CM_VALIDATE_INTERFACE(headerMapper); + CAF_CM_VALIDATE_STRING(queue); + + CAF_CM_ASSERT(acknowledgeMode != ACKNOWLEDGEMODE_MANUAL); + + _connectionFactory = connectionFactory; + _headerMapper = headerMapper; + _acknowledgeMode = acknowledgeMode; + _prefetchCount = prefetchCount; + _queue = queue; + _deliveryQueue = g_async_queue_new_full(destroyQueueItem); + _isInitialized = true; +} + +AmqpClient::SmartPtrChannel BlockingQueueConsumer::getChannel() { + CAF_CM_FUNCNAME("getChannel"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_ASSERT(_isRunning); + return _channel; +} + +std::string BlockingQueueConsumer::getConsumerTag() { + CAF_CM_FUNCNAME("getConsumerTag"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_ASSERT(_isRunning); + return _consumer->getConsumerTag(); +} + +SmartPtrIIntMessage BlockingQueueConsumer::nextMessage() { + CAF_CM_FUNCNAME("nextMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_ASSERT(_isRunning); + + // simulate a blocking pop from the queue + gpointer data = g_async_queue_try_pop(_deliveryQueue); + while (!data && !_isCanceled) { + CThreadUtils::sleep(100); + data = g_async_queue_try_pop(_deliveryQueue); + } + + checkShutdown(); + SmartPtrIIntMessage message; + if (data) { + Delivery *deliveryPtr = reinterpret_cast(data); + SmartPtrDelivery delivery(deliveryPtr); + deliveryPtr->Release(); + message = handle(delivery); + } + return message; +} + +SmartPtrIIntMessage BlockingQueueConsumer::nextMessage(int32 timeout) { + CAF_CM_FUNCNAME("nextMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_ASSERT(_isRunning); + + gint64 microTimeout = timeout * 1000; + gpointer data = g_async_queue_timeout_pop(_deliveryQueue, microTimeout); + + checkShutdown(); + SmartPtrIIntMessage message; + if (data) { + Delivery *deliveryPtr = reinterpret_cast(data); + SmartPtrDelivery delivery(deliveryPtr); + deliveryPtr->Release(); + message = handle(delivery); + } + return message; +} + +bool BlockingQueueConsumer::commitIfNecessary() { + CAF_CM_FUNCNAME("commitIfNecessary"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_ASSERT(_isRunning); + + bool result = false; + std::set deliveryTags; + { + CAF_CM_LOCK_UNLOCK1(_parentLock); + deliveryTags = _deliveryTags; + } + + try { + if (deliveryTags.size()) { + result = true; + if (_acknowledgeMode == ACKNOWLEDGEMODE_AUTO) { + std::set::const_reverse_iterator tag = deliveryTags.rbegin(); + CAF_CM_ASSERT(tag != deliveryTags.rend()); + CAF_CM_LOG_DEBUG_VA2( + "basicAck [tag=%Ld][tag count=%d]", + *tag, + deliveryTags.size()); + _channel->basicAck(*tag, true); + } + } + } + CAF_CM_CATCH_ALL; + { + CAF_CM_LOCK_UNLOCK1(_parentLock); + _deliveryTags.clear(); + } + CAF_CM_THROWEXCEPTION; + return result; +} + +void BlockingQueueConsumer::rollbackOnExceptionIfNecessary(SmartPtrCCafException& ex) { + CAF_CM_FUNCNAME("rollbackOnExceptionIfNecessary"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_ASSERT(_isRunning); + + if (_acknowledgeMode == ACKNOWLEDGEMODE_AUTO) { + std::set deliveryTags; + { + CAF_CM_LOCK_UNLOCK1(_parentLock); + deliveryTags = _deliveryTags; + } + + CAF_CM_LOG_DEBUG_VA2( + "Rejecting %d messages on app exception: %s", + deliveryTags.size(), + ex->getMsg().c_str()); + + try { + for (TConstIterator > tag(deliveryTags); tag; tag++) { +#ifdef FIXED + _channel->basicReject(*tag, true); +#endif + } + } + CAF_CM_CATCH_ALL; + { + CAF_CM_LOCK_UNLOCK1(_parentLock); + _deliveryTags.clear(); + } + if (CAF_CM_ISEXCEPTION) { + CAF_CM_LOG_ERROR_VA1( + "App exception overridden by rollback exception: " + "%s", + ex->getFullMsg().c_str()); + ex = NULL; + CAF_CM_THROWEXCEPTION; + } + } +} + +void BlockingQueueConsumer::checkShutdown() { + CAF_CM_LOCK_UNLOCK1(_parentLock); + if (_shutdownException) { + _shutdownException->throwAddRefedSelf(); + } +} + +void BlockingQueueConsumer::start(const uint32 timeoutMs) { + CAF_CM_FUNCNAME("start"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_ASSERT(!_isRunning); + + CAF_CM_LOG_DEBUG_VA0("Starting consumer"); + _isCanceled = false; + _connection = _connectionFactory->createConnection(); + _channel = _connection->createChannel(); + + try { + _consumer.CreateInstance(); + _consumer->init(this); + + // Set the prefetchCount if ack mode is not NONE (broker-auto) + if (_acknowledgeMode != ACKNOWLEDGEMODE_NONE) { + _channel->basicQos(0, _prefetchCount, false); + } + + if (_connectionFactory->getProtocol().compare("tunnel") != 0) { + // Verify that the queue exists + try { + _channel->queueDeclarePassive(_queue); + } catch (AmqpClient::AmqpExceptions::AmqpIoErrorException *ex) { + std::string exMsg = ex->getMsg(); + ex->Release(); + CAF_CM_EXCEPTIONEX_VA1( + FatalListenerStartupException, + 0, + "Cannot prepare queue for listener. " + "Either the queue does not exist or the broker will not allow us to use it. %s", + exMsg.c_str()); + } + } + CAF_CM_LOG_DEBUG_VA1("Starting on queue '%s'", _queue.c_str()); + _channel->basicConsume( + _queue, + _acknowledgeMode == ACKNOWLEDGEMODE_NONE, + _consumer); + CAF_CM_LOG_DEBUG_VA1("Started on queue '%s'", _queue.c_str()); + + _isRunning = true; + } + CAF_CM_CATCH_ALL; + if (CAF_CM_ISEXCEPTION) { + CAF_CM_LOG_CRIT_CAFEXCEPTION; + if (_channel) { + _channel->close(); + _channel = NULL; + } + if (_connection) { + _connection->close(); + _connection = NULL; + } + } + CAF_CM_THROWEXCEPTION; +} + +void BlockingQueueConsumer::stop(const uint32 timeoutMs) { + CAF_CM_FUNCNAME("stop"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _isCanceled = true; + + try { + std::string consumerTag = _consumer ? _consumer->getConsumerTag() : std::string(); + if (_channel && consumerTag.length()) { + if (_channel->isOpen()) { + CAF_CM_LOG_DEBUG_VA1( + "Canceling consumer '%s'", + consumerTag.c_str()); + _channel->basicCancel(consumerTag); + + // If we are not using broker auto-ack then re-queue the messages + if (_acknowledgeMode != ACKNOWLEDGEMODE_NONE) { + _channel->basicRecover(true); + } + + // Wait for the cancelOk response + CAF_CM_LOG_DEBUG_VA0("Waiting for consumer handler to receive cancel.ok"); + uint64 start = CDateTimeUtils::getTimeMs(); + while (CDateTimeUtils::calcRemainingTime(start, timeoutMs)) { + gpointer data = g_async_queue_try_pop(_deliveryQueue); + if (data) { + Delivery *delivery = reinterpret_cast(data); + if (!delivery->envelope) { + break; + } + delivery->Release(); + } + } + } + } + } + CAF_CM_CATCH_ALL; + + SmartPtrCCafException savedException; + if (CAF_CM_ISEXCEPTION) { + savedException = CAF_CM_GETEXCEPTION; + CAF_CM_CLEAREXCEPTION; + } + + try { + if (_channel) { + _channel->close(); + _channel = NULL; + } + if (_connection) { + _connection->close(); + _connection = NULL; + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + + _consumer = NULL; + _isRunning = false; + _isCanceled = false; + + if (_shutdownException) { + _shutdownException = NULL; + } + + { + CAF_CM_LOCK_UNLOCK1(_parentLock); + _deliveryTags.clear(); + } + + if (savedException) { + savedException->throwAddRefedSelf(); + } +} + +bool BlockingQueueConsumer::isRunning() const { + CAF_CM_FUNCNAME_VALIDATE("isRunning"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _isRunning; +} + +SmartPtrIIntMessage BlockingQueueConsumer::handle(SmartPtrDelivery delivery) { + CAF_CM_FUNCNAME_VALIDATE("handle"); + CAF_CM_VALIDATE_INTERFACE(delivery); + + IIntMessage::SmartPtrCHeaders headers = _headerMapper->toHeaders( + delivery->properties, + delivery->envelope); + SmartPtrCIntMessage message; + message.CreateInstance(); + message->initialize(delivery->body, headers, NULL); + { + CAF_CM_LOCK_UNLOCK1(_parentLock); + _deliveryTags.insert(delivery->envelope->getDeliveryTag()); + } + return message; +} + +void BlockingQueueConsumer::destroyQueueItem(gpointer data) { + reinterpret_cast(data)->Release(); +} +#endif + +#if (1) // BlockingQueueConsumer::InternalConsumer +BlockingQueueConsumer::InternalConsumer::InternalConsumer() : + _deliveryQueue(NULL), + CAF_CM_INIT_LOG("InternalConsumer") { +} + +BlockingQueueConsumer::InternalConsumer::~InternalConsumer() { + if (_deliveryQueue) { + g_async_queue_unref(_deliveryQueue); + } +} + +void BlockingQueueConsumer::InternalConsumer::init( + BlockingQueueConsumer* parent) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_VALIDATE_PTR(parent); + _parent = parent; + _deliveryQueue = _parent->_deliveryQueue; + g_async_queue_ref(_deliveryQueue); +} + +void BlockingQueueConsumer::InternalConsumer::handleConsumeOk( + const std::string& consumerTag) { + CAF_CM_FUNCNAME_VALIDATE("handleConsumeOk"); + _consumerTag = consumerTag; + CAF_CM_LOG_DEBUG_VA1("Received ConsumeOk - consumer='%s'", _consumerTag.c_str()); +} + +void BlockingQueueConsumer::InternalConsumer::handleCancelOk( + const std::string& consumerTag) { + CAF_CM_FUNCNAME_VALIDATE("handleCancelOk"); + CAF_CM_LOG_DEBUG_VA1("Received CancelOk - consumer='%s'", consumerTag.c_str()); + BlockingQueueConsumer::SmartPtrDelivery delivery; + delivery.CreateInstance(); + g_async_queue_push( + _deliveryQueue, + delivery.GetAddRefedInterface()); +} + +void BlockingQueueConsumer::InternalConsumer::handleRecoverOk( + const std::string& consumerTag) { +} + +void BlockingQueueConsumer::InternalConsumer::handleDelivery( + const std::string& consumerTag, + const AmqpClient::SmartPtrEnvelope& envelope, + const AmqpClient::AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body) { + CAF_CM_FUNCNAME_VALIDATE("handleDelivery"); + CAF_CM_VALIDATE_SMARTPTR(_parent); + + if (_parent->_isCanceled) { + CAF_CM_LOG_DEBUG_VA0("Received message but parent is canceled."); + } else { + BlockingQueueConsumer::SmartPtrDelivery delivery; + delivery.CreateInstance(); + delivery->envelope = envelope; + delivery->properties = properties; + delivery->body = body; + g_async_queue_push( + _deliveryQueue, + delivery.GetAddRefedInterface()); + if (CAF_CM_IS_LOG_DEBUG_ENABLED) { + CAF_CM_LOG_DEBUG_VA4( + "Received message [exchange='%s'][rk='%s'][tag=%Lu][len=%d]", + envelope->getExchange().c_str(), + envelope->getRoutingKey().c_str(), + envelope->getDeliveryTag(), + body->getByteCount()); + } + } +} + +void BlockingQueueConsumer::InternalConsumer::handleShutdown( + const std::string& consumerTag, + SmartPtrCCafException& reason) { + CAF_CM_FUNCNAME_VALIDATE("handleShutdown"); + CAF_CM_VALIDATE_SMARTPTR(_parent); + CAF_CM_LOG_DEBUG_VA1( + "Received shutdown signal - consumer='%s'", + consumerTag.c_str()); + CAF_CM_LOCK_UNLOCK1(_parent->_parentLock); + _parent->_shutdownException = reason; + _parent->_deliveryTags.clear(); + _parent = NULL; +} + +std::string BlockingQueueConsumer::InternalConsumer::getConsumerTag() { + return _consumerTag; +} +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/BlockingQueueConsumer.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/BlockingQueueConsumer.h new file mode 100644 index 000000000..d0eec7bc6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/BlockingQueueConsumer.h @@ -0,0 +1,181 @@ +/* + * Created on: Jul 30, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_BLOCKINGQUEUECONSUMER_H_ +#define AMQPINTEGRATIONCORE_BLOCKINGQUEUECONSUMER_H_ + +#include "ConnectionFactory.h" +#include "AmqpHeaderMapper.h" + +namespace Caf { namespace AmqpIntegration { + +// Forward-declare +class BlockingQueueConsumer; +CAF_DECLARE_SMART_POINTER(BlockingQueueConsumer) + +/** + * @ingroup IntObjImpl + * @brief Specialized consumer encapsulating knowledge of the broker connections and having its own lifecycle + */ +class AMQPINTEGRATIONCORE_LINKAGE BlockingQueueConsumer : + public ILifecycle { +public: + BlockingQueueConsumer(); + virtual ~BlockingQueueConsumer(); + + /** + * @brief object initializer + * @param connectionFactory connection factory object + * @param headerMapper header mapper object to map incoming headers + * @param acknowledgeMode message acknowledgement mode + * @param prefetchCount if acknowledgeMode is AUTO or MANUAL this + * message prefetch count value will be sent to the broker via the basic.qos method. + * @param queue the queue to consume + */ + void init( + SmartPtrConnectionFactory connectionFactory, + SmartPtrAmqpHeaderMapper headerMapper, + AcknowledgeMode acknowledgeMode, + uint32 prefetchCount, + const std::string& queue); + + /** + * @retval the underlying channel + */ + AmqpClient::SmartPtrChannel getChannel(); + + /** + * @retval the AMQP consumer tag(s) + */ + std::string getConsumerTag(); + + /** + * @brief Wait for the next message delivery and return it + *

+ * This is a blocking call and will return only when a message has been delivered + * or the consumer is canceled. In the case of cancellation NULL will be returned. + * @retval the next message or NULL + */ + SmartPtrIIntMessage nextMessage(); + + /** + * @brief Wait for the next message delivery and return it + *

+ * This is a non-blocking call and will return when a message has been delivered + * within the timeout specified or if the consumer is canceled. + * @param timeout the timeout in milliseconds + * @retval the next message or NULL + */ + SmartPtrIIntMessage nextMessage(int32 timeout); + + /** + * @brief Acknowledges unacknowledged messages + *

+ * Sends a basic.ack for messages that have been delivered. This method only + * sends a basic.ack if the acknowledge mode flag is set to ACKNOWLEDGEMODE_AUTO. + */ + bool commitIfNecessary(); + + /** + * @brief Rejects unacknowledged messaages + *

+ * Sends a basic.reject for messages that have been delivered. This method only + * sends a basic.reject if the acknowledge mode flag is set to ACKNOWLEDGEMODE_AUTO. + * @param ex the application exception necessitating a rollback + */ + void rollbackOnExceptionIfNecessary(SmartPtrCCafException& ex); + +public: + void start(const uint32 timeoutMs); + void stop(const uint32 timeoutMs); + bool isRunning() const; + +private: + class InternalConsumer : public AmqpClient::Consumer { + public: + InternalConsumer(); + virtual ~InternalConsumer(); + + void init( + BlockingQueueConsumer* parent); + + public: + void handleConsumeOk( + const std::string& consumerTag); + + void handleCancelOk( + const std::string& consumerTag); + + void handleRecoverOk( + const std::string& consumerTag); + + void handleDelivery( + const std::string& consumerTag, + const AmqpClient::SmartPtrEnvelope& envelope, + const AmqpClient::AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body); + + void handleShutdown( + const std::string& consumerTag, + SmartPtrCCafException& reason); + + std::string getConsumerTag(); + + private: + SmartPtrBlockingQueueConsumer _parent; + AmqpClient::SmartPtrChannel _channel; + std::string _consumerTag; + GAsyncQueue *_deliveryQueue; + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(InternalConsumer); + }; + CAF_DECLARE_SMART_POINTER(InternalConsumer); + +private: + struct Delivery : public ICafObject { + AmqpClient::SmartPtrEnvelope envelope; + AmqpClient::AmqpContentHeaders::SmartPtrBasicProperties properties; + SmartPtrCDynamicByteArray body; + }; + CAF_DECLARE_SMART_POINTER(Delivery); + +private: + void checkShutdown(); + + SmartPtrIIntMessage handle(SmartPtrDelivery delivery); + + static void destroyQueueItem(gpointer data); + +private: + friend class InternalConsumer; + + bool _isInitialized; + volatile bool _isRunning; + volatile bool _isCanceled; + std::set _deliveryTags; + SmartPtrInternalConsumer _consumer; + SmartPtrCAutoRecMutex _parentLock; + SmartPtrCCafException _shutdownException; + GAsyncQueue *_deliveryQueue; + SmartPtrConnectionFactory _connectionFactory; + SmartPtrConnection _connection; + AmqpClient::SmartPtrChannel _channel; + SmartPtrAmqpHeaderMapper _headerMapper; + AcknowledgeMode _acknowledgeMode; + uint32 _prefetchCount; + std::string _queue; + + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(BlockingQueueConsumer); +}; + +}} + +#endif /* AMQPINTEGRATIONCORE_BLOCKINGQUEUECONSUMER_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/CachedChannelHandler.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/CachedChannelHandler.cpp new file mode 100644 index 000000000..454536085 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/CachedChannelHandler.cpp @@ -0,0 +1,373 @@ +/* + * Created on: Jun 1, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CachingConnectionFactory.h" + +using namespace Caf::AmqpIntegration; + +CachingConnectionFactory::CachedChannelHandler::CachedChannelHandler() : + _parent(NULL), + CAF_CM_INIT_LOG("CachingConnectionFactory::CachedChannelHandler") { + CAF_CM_INIT_THREADSAFE; +} + +CachingConnectionFactory::CachedChannelHandler::~CachedChannelHandler() { +} + +void CachingConnectionFactory::CachedChannelHandler::init( + CachingConnectionFactory *parent, + AmqpClient::SmartPtrChannel channel) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_VALIDATE_PTR(parent); + CAF_CM_VALIDATE_SMARTPTR(channel); + + _parent = parent; + _channel = channel; +} + +void CachingConnectionFactory::CachedChannelHandler::logicalClose() { + if (_channel && !_channel->isOpen()) { + _channel = NULL; + } else { + // Allow for multiple close calls - if this channel is already + // in the cached channels container then noop else add it + // to the cached channel collection + TSmartConstIterator proxy(*(_parent->_cachedChannels)); + while (proxy) { + if (*proxy == this) { + break; + } + proxy++; + } + if (!proxy) { + _parent->_cachedChannels->push_back(this); + } + } +} + +void CachingConnectionFactory::CachedChannelHandler::physicalClose() { + if (_channel && _channel->isOpen()) { + _channel->close(); + _channel = NULL; + } +} + +void CachingConnectionFactory::CachedChannelHandler::checkChannel() { + if (!_channel || !_channel->isOpen()) { + _channel = _parent->createBareChannel(); + } +} + +void CachingConnectionFactory::CachedChannelHandler::postProcessCall(SmartPtrCCafException exception) { + CAF_CM_FUNCNAME_VALIDATE("postProcessCall"); + if (exception) { + if (!_channel || !_channel->isOpen()) { + CAF_CM_LOG_DEBUG_VA0("Detected closed channel on exception. Re-initializing"); + _channel = _parent->createBareChannel(); + } + exception->throwAddRefedSelf(); + } +} + +AmqpClient::SmartPtrChannel +CachingConnectionFactory::CachedChannelHandler::getTargetChannel() { + CAF_CM_LOCK_UNLOCK; + return _channel; +} + +void CachingConnectionFactory::CachedChannelHandler::close() { + CAF_CM_LOCK_UNLOCK; + bool shouldPhysicallyClose = true; + if (_parent->_isActive) { + CAF_CM_LOCK_UNLOCK1(_parent->_cachedChannelsMonitor); + if (_parent->_cachedChannels->size() < _parent->getChannelCacheSize()) { + logicalClose(); + shouldPhysicallyClose = false; + } + } + + if (shouldPhysicallyClose) { + physicalClose(); + } +} + +bool CachingConnectionFactory::CachedChannelHandler::isOpen() { + CAF_CM_LOCK_UNLOCK; + return (_channel && _channel->isOpen()); +} + +uint16 CachingConnectionFactory::CachedChannelHandler::getChannelNumber() { + CAF_CM_LOCK_UNLOCK; + checkChannel(); + return _channel->getChannelNumber(); +} + +void CachingConnectionFactory::CachedChannelHandler::basicAck( + const uint64 deliveryTag, + const bool ackMultiple) { + CAF_CM_FUNCNAME("basicAck"); + CAF_CM_LOCK_UNLOCK; + checkChannel(); + try { + _channel->basicAck(deliveryTag, ackMultiple); + } + CAF_CM_CATCH_ALL; + postProcessCall(CAF_CM_GETEXCEPTION); +} + +AmqpClient::SmartPtrGetResponse +CachingConnectionFactory::CachedChannelHandler::basicGet( + const std::string& queue, + const bool noAck) { + CAF_CM_FUNCNAME("basicAck"); + CAF_CM_LOCK_UNLOCK; + checkChannel(); + AmqpClient::SmartPtrGetResponse response; + try { + response = _channel->basicGet(queue, noAck); + } + CAF_CM_CATCH_ALL; + postProcessCall(CAF_CM_GETEXCEPTION); + return response; +} + +void CachingConnectionFactory::CachedChannelHandler::basicPublish( + const std::string& exchange, + const std::string& routingKey, + const AmqpClient::AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body) { + CAF_CM_FUNCNAME("basicPublish"); + CAF_CM_LOCK_UNLOCK; + checkChannel(); + try { + _channel->basicPublish(exchange, routingKey, properties, body); + } + CAF_CM_CATCH_ALL; + postProcessCall(CAF_CM_GETEXCEPTION); +} + +void CachingConnectionFactory::CachedChannelHandler::basicPublish( + const std::string& exchange, + const std::string& routingKey, + const bool mandatory, + const bool immediate, + const AmqpClient::AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body) { + CAF_CM_FUNCNAME("basicPublish"); + CAF_CM_LOCK_UNLOCK; + checkChannel(); + try { + _channel->basicPublish( + exchange, + routingKey, + mandatory, + immediate, + properties, + body); + } + CAF_CM_CATCH_ALL; + postProcessCall(CAF_CM_GETEXCEPTION); +} + +AmqpClient::AmqpMethods::Basic::SmartPtrConsumeOk +CachingConnectionFactory::CachedChannelHandler::basicConsume( + const std::string& queue, + const AmqpClient::SmartPtrConsumer& consumer) { + CAF_CM_FUNCNAME("basicConsume"); + CAF_CM_LOCK_UNLOCK; + checkChannel(); + AmqpClient::AmqpMethods::Basic::SmartPtrConsumeOk consumeOk; + try { + consumeOk = _channel->basicConsume(queue, consumer); + } + CAF_CM_CATCH_ALL; + postProcessCall(CAF_CM_GETEXCEPTION); + return consumeOk; +} + +AmqpClient::AmqpMethods::Basic::SmartPtrConsumeOk +CachingConnectionFactory::CachedChannelHandler::basicConsume( + const std::string& queue, + const bool noAck, + const AmqpClient::SmartPtrConsumer& consumer) { + CAF_CM_FUNCNAME("basicConsume"); + CAF_CM_LOCK_UNLOCK; + checkChannel(); + AmqpClient::AmqpMethods::Basic::SmartPtrConsumeOk consumeOk; + try { + consumeOk = _channel->basicConsume(queue, noAck, consumer); + } + CAF_CM_CATCH_ALL; + postProcessCall(CAF_CM_GETEXCEPTION); + return consumeOk; +} + +AmqpClient::AmqpMethods::Basic::SmartPtrConsumeOk +CachingConnectionFactory::CachedChannelHandler::basicConsume( + const std::string& queue, + const std::string& consumerTag, + const bool noAck, + const bool noLocal, + const bool exclusive, + const AmqpClient::SmartPtrConsumer& consumer, + const AmqpClient::SmartPtrTable& arguments) { + CAF_CM_FUNCNAME("basicConsume"); + CAF_CM_LOCK_UNLOCK; + checkChannel(); + AmqpClient::AmqpMethods::Basic::SmartPtrConsumeOk consumeOk; + try { + consumeOk = _channel->basicConsume( + queue, + consumerTag, + noAck, + noLocal, + exclusive, + consumer, + arguments); + } + CAF_CM_CATCH_ALL; + postProcessCall(CAF_CM_GETEXCEPTION); + return consumeOk; +} + +AmqpClient::AmqpMethods::Basic::SmartPtrCancelOk +CachingConnectionFactory::CachedChannelHandler::basicCancel( + const std::string& consumerTag) { + CAF_CM_FUNCNAME("basicCancel"); + CAF_CM_LOCK_UNLOCK; + checkChannel(); + AmqpClient::AmqpMethods::Basic::SmartPtrCancelOk cancelOk; + try { + cancelOk = _channel->basicCancel(consumerTag); + } + CAF_CM_CATCH_ALL; + postProcessCall(CAF_CM_GETEXCEPTION); + return cancelOk; +} + +AmqpClient::AmqpMethods::Basic::SmartPtrRecoverOk +CachingConnectionFactory::CachedChannelHandler::basicRecover( + const bool requeue) { + CAF_CM_FUNCNAME("basicRecover"); + CAF_CM_LOCK_UNLOCK; + checkChannel(); + AmqpClient::AmqpMethods::Basic::SmartPtrRecoverOk recoverOk; + try { + recoverOk = _channel->basicRecover(requeue); + } + CAF_CM_CATCH_ALL; + postProcessCall(CAF_CM_GETEXCEPTION); + return recoverOk; +} + +AmqpClient::AmqpMethods::Basic::SmartPtrQosOk +CachingConnectionFactory::CachedChannelHandler::basicQos( + const uint32 prefetchSize, + const uint32 prefetchCount, + const bool global) { + return _channel->basicQos(prefetchSize, prefetchCount, global); +} + +void CachingConnectionFactory::CachedChannelHandler::basicReject( + const uint64 deliveryTag, + const bool requeue) { + return _channel->basicReject(deliveryTag, requeue); +} + +AmqpClient::AmqpMethods::Exchange::SmartPtrDeclareOk +CachingConnectionFactory::CachedChannelHandler::exchangeDeclare( + const std::string& exchange, + const std::string& type, + const bool durable, + const AmqpClient::SmartPtrTable& arguments) { + return _channel->exchangeDeclare(exchange, type, durable, arguments); +} + +AmqpClient::AmqpMethods::Exchange::SmartPtrDeleteOk +CachingConnectionFactory::CachedChannelHandler::exchangeDelete( + const std::string& exchange, + const bool ifUnused) { + return _channel->exchangeDelete(exchange, ifUnused); +} + +AmqpClient::AmqpMethods::Queue::SmartPtrDeclareOk +CachingConnectionFactory::CachedChannelHandler::queueDeclare() { + return _channel->queueDeclare(); +} + +AmqpClient::AmqpMethods::Queue::SmartPtrDeclareOk +CachingConnectionFactory::CachedChannelHandler::queueDeclare( + const std::string& queue, + const bool durable, + const bool exclusive, + const bool autoDelete, + const AmqpClient::SmartPtrTable& arguments) { + return _channel->queueDeclare( + queue, + durable, + exclusive, + autoDelete, + arguments); +} + +AmqpClient::AmqpMethods::Queue::SmartPtrDeclareOk +CachingConnectionFactory::CachedChannelHandler::queueDeclarePassive( + const std::string& queue) { + return _channel->queueDeclarePassive(queue); +} + +AmqpClient::AmqpMethods::Queue::SmartPtrDeleteOk +CachingConnectionFactory::CachedChannelHandler::queueDelete( + const std::string& queue, + const bool ifUnused, + const bool ifEmpty) { + return _channel->queueDelete(queue, ifUnused, ifEmpty); +} + +AmqpClient::AmqpMethods::Queue::SmartPtrPurgeOk +CachingConnectionFactory::CachedChannelHandler::queuePurge( + const std::string& queue) { + return _channel->queuePurge(queue); +} + +AmqpClient::AmqpMethods::Queue::SmartPtrBindOk +CachingConnectionFactory::CachedChannelHandler::queueBind( + const std::string& queue, + const std::string& exchange, + const std::string& routingKey, + const AmqpClient::SmartPtrTable& arguments) { + return _channel->queueBind( + queue, + exchange, + routingKey, + arguments); +} + +AmqpClient::AmqpMethods::Queue::SmartPtrUnbindOk +CachingConnectionFactory::CachedChannelHandler::queueUnbind( + const std::string& queue, + const std::string& exchange, + const std::string& routingKey, + const AmqpClient::SmartPtrTable& arguments) { + return _channel->queueUnbind( + queue, + exchange, + routingKey, + arguments); +} + +void CachingConnectionFactory::CachedChannelHandler::addReturnListener( + const AmqpClient::SmartPtrReturnListener& listener) { + return _channel->addReturnListener(listener); +} + +bool CachingConnectionFactory::CachedChannelHandler::removeReturnListener( + const AmqpClient::SmartPtrReturnListener& listener) { + return _channel->removeReturnListener(listener); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/CachingConnectionFactory.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/CachingConnectionFactory.cpp new file mode 100644 index 000000000..ebb6681f6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/CachingConnectionFactory.cpp @@ -0,0 +1,214 @@ +/* + * Created on: May 25, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CachingConnectionFactory.h" + +using namespace Caf::AmqpIntegration; + +CachingConnectionFactory::CachingConnectionFactory() : + _isInitialized(false), + _isActive(true), + _channelCacheSize(2), + CAF_CM_INIT_LOG("CachingConnectionFactory") { + _connectionMonitor.CreateInstance(); + _connectionMonitor->initialize(); + + _cachedChannelsMonitor.CreateInstance(); + _cachedChannelsMonitor->initialize(); +} + +CachingConnectionFactory::~CachingConnectionFactory() { + CAF_CM_FUNCNAME("~CachingConnectionFactory"); + if (_connection) { + try { + try { + _connection->close(); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + + if (_cachedChannels) { + CAF_CM_LOCK_UNLOCK1(_cachedChannelsMonitor); + _cachedChannels->clear(); + _cachedChannels = NULL; + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + } +} + +void CachingConnectionFactory::init() { + init(std::string(),std::string()); +} + +void CachingConnectionFactory::init( + const std::string& protocol, + const std::string& host, + const uint32 port) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + AbstractConnectionFactory::init(AmqpClient::createConnectionFactory()); + setConnectionTimeout(10000); + std::string locProtocol = protocol; + if (locProtocol.empty()) { + locProtocol = getDefaultProtocol(); + } + std::string hostname = host; + if (hostname.empty()) { + hostname = getDefaultHostName(); + } + setHost(hostname); + setPort(port); + _cachedChannels.CreateInstance(); + _isInitialized = true; +} + +void CachingConnectionFactory::init( + const std::string& protocol, + const std::string& host) { + init(protocol, host, AmqpClient::DEFAULT_AMQP_PORT); +} + +void CachingConnectionFactory::init( + const uint32 port) { + init(std::string(), std::string(), port); +} + +void CachingConnectionFactory::init( + const AmqpClient::SmartPtrConnectionFactory& amqpConnectionFactory) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + AbstractConnectionFactory::init(amqpConnectionFactory); + _cachedChannels.CreateInstance(); + _isInitialized = true; +} + +void CachingConnectionFactory::destroy() { + CAF_CM_FUNCNAME_VALIDATE("destroy"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + // This method ends up calling reset() during _connection->destroy() which + // sets _connection to NULL. To prevent the wheels from disappearing from + // underneath the _connection, store a temporary reference to it. + SmartPtrChannelCachingConnectionProxy connectionRef = _connection; + CAF_CM_LOCK_UNLOCK1(_connectionMonitor); + if (_connection) { + _connection->destroy(); + _connection = NULL; + } + reset(); +} + +uint32 CachingConnectionFactory::getChannelCacheSize() { + return _channelCacheSize; +} + +AmqpClient::SmartPtrChannel CachingConnectionFactory::getChannel() { + CAF_CM_FUNCNAME_VALIDATE("getChannel"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + AmqpClient::SmartPtrChannel channel; + { + CAF_CM_LOCK_UNLOCK1(_cachedChannelsMonitor); + if (_cachedChannels->size()) { + channel = _cachedChannels->front(); + _cachedChannels->pop_front(); + } + } + if (channel) { + CAF_CM_LOG_DEBUG_VA1("found cached rabbit channel #%d", channel->getChannelNumber()); + } else { + channel = newCachedChannelProxy(); + } + return channel; +} + +void CachingConnectionFactory::setConnectionListeners( + const std::deque& listeners) { + CAF_CM_FUNCNAME_VALIDATE("setConnectionListeners"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + AbstractConnectionFactory::setConnectionListeners(listeners); + if (_connection) { + getConnectionListener()->onCreate(_connection); + } +} + +void CachingConnectionFactory::setChannelCacheSize(uint32 cacheSize) { + CAF_CM_FUNCNAME("setChannelCacheSize"); + CAF_CM_ASSERT(cacheSize >= 1); + _channelCacheSize = cacheSize; +} + +void CachingConnectionFactory::addConnectionListener( + const SmartPtrConnectionListener& listener) { + CAF_CM_FUNCNAME_VALIDATE("addConnectionListener"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(listener); + AbstractConnectionFactory::addConnectionListener(listener); + if (_connection) { + listener->onCreate(_connection); + } +} + +SmartPtrConnection CachingConnectionFactory::createConnection() { + CAF_CM_FUNCNAME_VALIDATE("createConnection"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_LOCK_UNLOCK1(_connectionMonitor); + if (!_connection) { + _connection.CreateInstance(); + _connection->init(createBareConnection(), this); + getConnectionListener()->onCreate(_connection); + } + return _connection; +} + +void CachingConnectionFactory::reset() { + CAF_CM_FUNCNAME("reset"); + _isActive = false; + CAF_CM_LOCK_UNLOCK1(_cachedChannelsMonitor); + for (TSmartIterator channel(*_cachedChannels); + channel; + channel++) { + try { + AmqpClient::SmartPtrChannel target = channel->getTargetChannel(); + if (target) { + target->close(); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + } + try { + _cachedChannels->clear(); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + _isActive = true; + _connection = NULL; +} + +SmartPtrChannelProxy CachingConnectionFactory::newCachedChannelProxy(){ + AmqpClient::SmartPtrChannel channel = createBareChannel(); + SmartPtrCachedChannelHandler proxy; + proxy.CreateInstance(); + proxy->init(this, channel); + return proxy; +} + +AmqpClient::SmartPtrChannel CachingConnectionFactory::createBareChannel() { + if (!_connection || !_connection->isOpen()) { + _connection = NULL; + createConnection(); + } + return _connection->createBareChannel(); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/CachingConnectionFactory.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/CachingConnectionFactory.h new file mode 100644 index 000000000..1582c362f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/CachingConnectionFactory.h @@ -0,0 +1,257 @@ +/* + * Created on: May 25, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CACHINGCONNECTIONFACTORY_H_ +#define CACHINGCONNECTIONFACTORY_H_ + +#include "AbstractConnectionFactory.h" +#include "ConnectionProxy.h" +#include "ChannelProxy.h" + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObjImpl + * @brief Implementation of the CachingConnectionFactory Integration Object + */ +class AMQPINTEGRATIONCORE_LINKAGE CachingConnectionFactory : + public AbstractConnectionFactory { +public: + CachingConnectionFactory(); + virtual ~CachingConnectionFactory(); + + void init(); + + void init(const std::string& protocol, const std::string& host, const uint32 port); + + void init(const std::string& protocol, const std::string& host); + + void init(const uint32 port); + + void init(const AmqpClient::SmartPtrConnectionFactory& amqpConnectionFactory); + + void destroy(); + + uint32 getChannelCacheSize(); + + AmqpClient::SmartPtrChannel getChannel(); + + void setConnectionListeners(const std::deque& listeners); + + void setChannelCacheSize(uint32 cacheSize); + +public: // ConnectionFactory + SmartPtrConnection createConnection(); + + void addConnectionListener(const SmartPtrConnectionListener& listener); + +private: + typedef std::deque ProxyDeque; + CAF_DECLARE_SMART_POINTER(ProxyDeque); + + void reset(); + + SmartPtrChannelProxy newCachedChannelProxy(); + + AmqpClient::SmartPtrChannel createBareChannel(); + +private: + class ChannelCachingConnectionProxy : public ConnectionProxy { + public: + ChannelCachingConnectionProxy(); + virtual ~ChannelCachingConnectionProxy(); + + public: + void init( + SmartPtrConnection connection, + CachingConnectionFactory *parent); + + void destroy(); + + public: // ConnectionProxy + SmartPtrConnection getTargetConnection(); + + public: // Connection + AmqpClient::SmartPtrChannel createChannel(); + void close(); + bool isOpen(); + + public: + AmqpClient::SmartPtrChannel createBareChannel(); + + private: + SmartPtrConnection _target; + CachingConnectionFactory *_parent; + + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(ChannelCachingConnectionProxy); + }; + CAF_DECLARE_SMART_POINTER(ChannelCachingConnectionProxy); + friend class ChannelCachingConnectionProxy; + + class CachedChannelHandler : public ChannelProxy { + public: + CachedChannelHandler(); + virtual ~CachedChannelHandler(); + + void init( + CachingConnectionFactory *parent, + AmqpClient::SmartPtrChannel channel); + + private: + void logicalClose(); + + void physicalClose(); + + void checkChannel(); + + void postProcessCall(SmartPtrCCafException exception); + + public: // ChannelProxy + AmqpClient::SmartPtrChannel getTargetChannel(); + + public: // Channel + uint16 getChannelNumber(); + + void close(); + + bool isOpen(); + + void basicAck( + const uint64 deliveryTag, + const bool ackMultiple); + + AmqpClient::SmartPtrGetResponse basicGet( + const std::string& queue, + const bool noAck); + + void basicPublish( + const std::string& exchange, + const std::string& routingKey, + const AmqpClient::AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body); + + void basicPublish( + const std::string& exchange, + const std::string& routingKey, + const bool mandatory, + const bool immediate, + const AmqpClient::AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body); + + AmqpClient::AmqpMethods::Basic::SmartPtrConsumeOk basicConsume( + const std::string& queue, + const AmqpClient::SmartPtrConsumer& consumer); + + AmqpClient::AmqpMethods::Basic::SmartPtrConsumeOk basicConsume( + const std::string& queue, + const bool noAck, + const AmqpClient::SmartPtrConsumer& consumer); + + AmqpClient::AmqpMethods::Basic::SmartPtrConsumeOk basicConsume( + const std::string& queue, + const std::string& consumerTag, + const bool noAck, + const bool noLocal, + const bool exclusive, + const AmqpClient::SmartPtrConsumer& consumer, + const AmqpClient::SmartPtrTable& arguments = AmqpClient::SmartPtrTable()); + + AmqpClient::AmqpMethods::Basic::SmartPtrCancelOk basicCancel( + const std::string& consumerTag); + + AmqpClient::AmqpMethods::Basic::SmartPtrRecoverOk basicRecover( + const bool requeue); + + AmqpClient::AmqpMethods::Basic::SmartPtrQosOk basicQos( + const uint32 prefetchSize, + const uint32 prefetchCount, + const bool global); + + void basicReject( + const uint64 deliveryTag, + const bool requeue); + + AmqpClient::AmqpMethods::Exchange::SmartPtrDeclareOk exchangeDeclare( + const std::string& exchange, + const std::string& type, + const bool durable = false, + const AmqpClient::SmartPtrTable& arguments = AmqpClient::SmartPtrTable()); + + AmqpClient::AmqpMethods::Exchange::SmartPtrDeleteOk exchangeDelete( + const std::string& exchange, + const bool ifUnused); + + AmqpClient::AmqpMethods::Queue::SmartPtrDeclareOk queueDeclare(); + + AmqpClient::AmqpMethods::Queue::SmartPtrDeclareOk queueDeclare( + const std::string& queue, + const bool durable, + const bool exclusive, + const bool autoDelete, + const AmqpClient::SmartPtrTable& arguments = AmqpClient::SmartPtrTable()); + + AmqpClient::AmqpMethods::Queue::SmartPtrDeclareOk queueDeclarePassive( + const std::string& queue); + + AmqpClient::AmqpMethods::Queue::SmartPtrDeleteOk queueDelete( + const std::string& queue, + const bool ifUnused, + const bool ifEmpty); + + AmqpClient::AmqpMethods::Queue::SmartPtrPurgeOk queuePurge( + const std::string& queue); + + AmqpClient::AmqpMethods::Queue::SmartPtrBindOk queueBind( + const std::string& queue, + const std::string& exchange, + const std::string& routingKey, + const AmqpClient::SmartPtrTable& arguments = AmqpClient::SmartPtrTable()); + + AmqpClient::AmqpMethods::Queue::SmartPtrUnbindOk queueUnbind( + const std::string& queue, + const std::string& exchange, + const std::string& routingKey, + const AmqpClient::SmartPtrTable& arguments = AmqpClient::SmartPtrTable()); + + void addReturnListener( + const AmqpClient::SmartPtrReturnListener& listener); + + bool removeReturnListener( + const AmqpClient::SmartPtrReturnListener& listener); + + private: + CachingConnectionFactory *_parent; + AmqpClient::SmartPtrChannel _channel; + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_CREATE_THREADSAFE; + CAF_CM_DECLARE_NOCOPY(CachedChannelHandler); + }; + CAF_DECLARE_SMART_POINTER(CachedChannelHandler); + friend class CachedChannelHandler; + +private: + bool _isInitialized; + bool _isActive; + SmartPtrCAutoRecMutex _connectionMonitor; + SmartPtrChannelCachingConnectionProxy _connection; + uint32 _channelCacheSize; + SmartPtrProxyDeque _cachedChannels; + SmartPtrCAutoRecMutex _cachedChannelsMonitor; + + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CachingConnectionFactory); +}; +CAF_DECLARE_SMART_POINTER(CachingConnectionFactory); + +}} + +#endif /* CACHINGCONNECTIONFACTORY_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/ChannelCachingConnectionProxy.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/ChannelCachingConnectionProxy.cpp new file mode 100644 index 000000000..a202cd3a2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/ChannelCachingConnectionProxy.cpp @@ -0,0 +1,66 @@ +/* + * Created on: Jun 1, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CachingConnectionFactory.h" + +using namespace Caf::AmqpIntegration; + +CachingConnectionFactory::ChannelCachingConnectionProxy::ChannelCachingConnectionProxy() : + _parent(NULL), + CAF_CM_INIT_LOG("CachingConnectionFactory::ChannelCachingConnectionProxy") { +} + +CachingConnectionFactory::ChannelCachingConnectionProxy::~ChannelCachingConnectionProxy() { + _target = NULL; + _parent = NULL; +} + +void CachingConnectionFactory::ChannelCachingConnectionProxy::init( + SmartPtrConnection connection, + CachingConnectionFactory *parent) { + _target = connection; + _parent = parent; +} + +void CachingConnectionFactory::ChannelCachingConnectionProxy::destroy() { + CAF_CM_FUNCNAME("destroy"); + if (_target) { + _parent->getConnectionListener()->onClose(_target); + try { + _target->close(); + } + CAF_CM_CATCH_ALL; + CAF_CM_CLEAREXCEPTION; + try { + _parent->reset(); + } + CAF_CM_CATCH_ALL; + CAF_CM_CLEAREXCEPTION; + } + _target = NULL; +} + +SmartPtrConnection CachingConnectionFactory::ChannelCachingConnectionProxy::getTargetConnection() { + return _target; +} + +AmqpClient::SmartPtrChannel CachingConnectionFactory::ChannelCachingConnectionProxy::createChannel() { + return _parent->getChannel(); +} + +void CachingConnectionFactory::ChannelCachingConnectionProxy::close() { +} + +bool CachingConnectionFactory::ChannelCachingConnectionProxy::isOpen() { + return _target && _target->isOpen(); +} + +AmqpClient::SmartPtrChannel CachingConnectionFactory::ChannelCachingConnectionProxy::createBareChannel() { + return _target->createChannel(); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/ChannelProxy.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/ChannelProxy.h new file mode 100644 index 000000000..b65feb67e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/ChannelProxy.h @@ -0,0 +1,31 @@ +/* + * Created on: May 29, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CHANNELPROXY_H_ +#define CHANNELPROXY_H_ + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObjImpl + * @brief Interface on objects used to proxy channel objects for the various + * connection objects. + */ +struct __declspec(novtable) ChannelProxy : public AmqpClient::Channel { + + /** + * @brief Return the proxied Channel object + * @return the proxied channel + */ + virtual AmqpClient::SmartPtrChannel getTargetChannel() = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(ChannelProxy); + +}} + +#endif /* CHANNELPROXY_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/CompositeConnectionListener.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/CompositeConnectionListener.cpp new file mode 100644 index 000000000..337438d39 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/CompositeConnectionListener.cpp @@ -0,0 +1,63 @@ +/* + * Created on: Jun 2, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CompositeConnectionListener.h" + +using namespace Caf::AmqpIntegration; + +CompositeConnectionListener::CompositeConnectionListener() : + CAF_CM_INIT_LOG("CompositeConnectionListener") { +} + +CompositeConnectionListener::~CompositeConnectionListener() { +} + +void CompositeConnectionListener::setDelegates( + const ListenerDeque& delegates) { + _delegates = delegates; +} + +void CompositeConnectionListener::addDelegate( + const SmartPtrConnectionListener& delegate) { + CAF_CM_FUNCNAME_VALIDATE("addDelegate"); + CAF_CM_VALIDATE_SMARTPTR(delegate); + _delegates.push_back(delegate); +} + +void CompositeConnectionListener::onCreate( + const SmartPtrConnection& connection) { + CAF_CM_FUNCNAME("onCreate"); + CAF_CM_VALIDATE_SMARTPTR(connection); + for (TSmartIterator delegate(_delegates); + delegate; + delegate++) { + try { + delegate->onCreate(connection); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + } +} + +void CompositeConnectionListener::onClose( + const SmartPtrConnection& connection) { + CAF_CM_FUNCNAME("onClose"); + CAF_CM_VALIDATE_SMARTPTR(connection); + for (TSmartIterator delegate(_delegates); + delegate; + delegate++) { + try { + delegate->onClose(connection); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + } +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/CompositeConnectionListener.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/CompositeConnectionListener.h new file mode 100644 index 000000000..2160dd5d3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/CompositeConnectionListener.h @@ -0,0 +1,53 @@ +/* + * Created on: Jun 2, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef COMPOSITECONNECTIONLISTENER_H_ +#define COMPOSITECONNECTIONLISTENER_H_ + +#include "ConnectionListener.h" + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObjImpl + * @brief Implementation of ConnectionListener that notifies multiple delegates + */ +class AMQPINTEGRATIONCORE_LINKAGE CompositeConnectionListener : public ConnectionListener { +public: + CompositeConnectionListener(); + virtual ~CompositeConnectionListener(); + + typedef std::deque ListenerDeque; + + /** + * @brief Set the delegate collection + * @param delegates the collection of ConnectionListener delegates + */ + void setDelegates(const ListenerDeque& delegates); + + /** + * @brief Add a delegate to the collection + * @param delegate the ConnectionListener delegate to add + */ + void addDelegate(const SmartPtrConnectionListener& delegate); + +public: // ConnectionListener + void onCreate(const SmartPtrConnection& connection); + void onClose(const SmartPtrConnection& connection); + +private: + ListenerDeque _delegates; + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CompositeConnectionListener); +}; +CAF_DECLARE_SMART_POINTER(CompositeConnectionListener); + +}} + +#endif /* COMPOSITECONNECTIONLISTENER_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/Connection.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/Connection.h new file mode 100644 index 000000000..3a29db647 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/Connection.h @@ -0,0 +1,41 @@ +/* + * Created on: May 24, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_CONNECTION_H_ +#define AMQPINTEGRATIONCORE_CONNECTION_H_ + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObjImpl + * @brief An interface for Caf::AmqpIntegration connection objects + */ +struct __declspec(novtable) Connection : public ICafObject { + + /** + * @brief Create a {@link AmqpClient::Channel Channel}. + */ + virtual AmqpClient::SmartPtrChannel createChannel() = 0; + + /** + * @brief Close the connection + */ + virtual void close() = 0; + + /** + * @brief Check the connection's status + * @retval true the connection is open + * @retval false the connection is closed + */ + virtual bool isOpen() = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(Connection); + +}} + +#endif /* AMQPINTEGRATIONCORE_CONNECTION_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/ConnectionFactory.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/ConnectionFactory.h new file mode 100644 index 000000000..05d9381fd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/ConnectionFactory.h @@ -0,0 +1,94 @@ +/* + * Created on: May 24, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_CONNECTIONFACTORY_H_ +#define AMQPINTEGRATIONCORE_CONNECTIONFACTORY_H_ + +#include "Connection.h" +#include "ConnectionListener.h" + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObjImpl + * @brief Interface for connection factory implementations + */ +struct __declspec(novtable) ConnectionFactory : ICafObject { + CAF_DECL_UUID("D2420BC6-240C-4EAC-8518-E86A93A40035") + + /** + * @return a new Connection + */ + virtual SmartPtrConnection createConnection() = 0; + + /** + * @return the default protocol to use for connections + */ + virtual std::string getProtocol() = 0; + + /** + * @return the default host to use for connections + */ + virtual std::string getHost() = 0; + + /** + * @return the default port to use for connections + */ + virtual uint32 getPort() = 0; + + /** + * @return the default virtual host to use for connections + */ + virtual std::string getVirtualHost() = 0; + + /** + * @return the default user name to use for connections + */ + virtual std::string getUsername() = 0; + + /** + * @return the default password to use for connections + */ + virtual std::string getPassword() = 0; + + /** + * @return the default path to the CA Cert + */ + virtual std::string getCaCertPath() = 0; + + /** + * @return the default path to the Client Cert + */ + virtual std::string getClientCertPath() = 0; + + /** + * @return the default path to the Client Key + */ + virtual std::string getClientKeyPath() = 0; + + /** + * @return the number of connection retries + */ + virtual uint16 getRetries() = 0; + + /** + * @return the number of connection seconds to wait + */ + virtual uint16 getSecondsToWait() = 0; + + /** + * @brief Add a connection create/close callback + * @param listener ConnectionListener callback + */ + virtual void addConnectionListener(const SmartPtrConnectionListener& listener) = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(ConnectionFactory); + +}} + +#endif /* AMQPINTEGRATIONCORE_CONNECTIONFACTORY_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/ConnectionListener.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/ConnectionListener.h new file mode 100644 index 000000000..a75183ca4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/ConnectionListener.h @@ -0,0 +1,39 @@ +/* + * Created on: Jun 2, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_CONNECTIONLISTENER_H_ +#define AMQPINTEGRATIONCORE_CONNECTIONLISTENER_H_ + +#include "Connection.h" + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObjImpl + * @brief Connection event notification callback interface + */ +struct __declspec(novtable) ConnectionListener : public ICafObject { + CAF_DECL_UUID("8F249C38-CF91-4553-9C68-3D714626A7EC") + + /** + * @brief Connection created event + * @param connection the Connection that has been created + */ + virtual void onCreate(const SmartPtrConnection& connection) = 0; + + /** + * @brief Connection closed event + * @param connection the Connection that has been closed + */ + virtual void onClose(const SmartPtrConnection& connection) = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(ConnectionListener); + +}} + +#endif /* AMQPINTEGRATIONCORE_CONNECTIONLISTENER_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/ConnectionProxy.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/ConnectionProxy.h new file mode 100644 index 000000000..c681fdfd7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/ConnectionProxy.h @@ -0,0 +1,31 @@ +/* + * Created on: May 25, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_CONNECTIONPROXY_H_ +#define AMQPINTEGRATIONCORE_CONNECTIONPROXY_H_ + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObjImpl + * @brief Interface on objects used to proxy connection objects for the various + * connection factories. + */ +struct __declspec(novtable) ConnectionProxy : public Connection { + + /** + * @brief Return the proxied Connection object + * @return the proxied connection + */ + virtual SmartPtrConnection getTargetConnection() = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(ConnectionProxy); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/DefaultAmqpHeaderMapper.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/DefaultAmqpHeaderMapper.cpp new file mode 100644 index 000000000..065df309b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/DefaultAmqpHeaderMapper.cpp @@ -0,0 +1,286 @@ +/* + * Created on: Jun 6, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "DefaultAmqpHeaderMapper.h" +#include "HeaderUtils.h" + +using namespace Caf::AmqpIntegration; + +DefaultAmqpHeaderMapper::DefaultAmqpHeaderMapper() : + _isInitialized(false), + CAF_CM_INIT("DefaultAmqpHeaderMapper") { +} + +DefaultAmqpHeaderMapper::~DefaultAmqpHeaderMapper() { +} + +void DefaultAmqpHeaderMapper::init(const std::string& userHeaderRegex) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + if (!userHeaderRegex.empty()) { + _userHeaderRegex.CreateInstance(); + _userHeaderRegex->initialize(userHeaderRegex); + } + + _isInitialized = true; +} + +AmqpClient::AmqpContentHeaders::SmartPtrBasicProperties +DefaultAmqpHeaderMapper::fromHeaders( + IIntMessage::SmartPtrCHeaders headers) { + CAF_CM_FUNCNAME("fromHeaders"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + AmqpClient::AmqpContentHeaders::SmartPtrBasicProperties properties; + properties = AmqpClient::AmqpContentHeaders::createBasicProperties(); + + SmartPtrCVariant variant; + variant = HeaderUtils::getHeaderString(headers, APP_ID); + if (variant) { + properties->setAppId(g_variant_get_string(variant->get(), NULL)); + } + variant = HeaderUtils::getHeaderString(headers, CONTENT_ENCODING); + if (variant) { + properties->setContentEncoding(g_variant_get_string(variant->get(), NULL)); + } else { + properties->setContentEncoding("UTF8"); + } + variant = HeaderUtils::getHeaderString(headers, CONTENT_TYPE); + if (variant) { + properties->setContentType(g_variant_get_string(variant->get(), NULL)); + } else { + properties->setContentType("text/plain"); + } + variant = HeaderUtils::getHeaderString(headers, CORRELATION_ID); + if (variant) { + properties->setCorrelationId(g_variant_get_string(variant->get(), NULL)); + } + variant = HeaderUtils::getHeaderUint8(headers, DELIVERY_MODE); + if (variant) { + properties->setDeliveryMode(g_variant_get_byte(variant->get())); + } + variant = HeaderUtils::getHeaderString(headers, EXPIRATION); + if (variant) { + properties->setExpiration(g_variant_get_string(variant->get(), NULL)); + } + variant = HeaderUtils::getHeaderString(headers, MESSAGE_ID); + if (variant) { + properties->setMessageId(g_variant_get_string(variant->get(), NULL)); + } + variant = HeaderUtils::getHeaderString(headers, REPLY_TO); + if (variant) { + properties->setReplyTo(g_variant_get_string(variant->get(), NULL)); + } + variant = HeaderUtils::getHeaderUint64(headers, TIMESTAMP); + if (variant) { + properties->setTimestamp(g_variant_get_uint64(variant->get())); + } + variant = HeaderUtils::getHeaderString(headers, TYPE); + if (variant) { + properties->setType(g_variant_get_string(variant->get(), NULL)); + } + variant = HeaderUtils::getHeaderString(headers, USER_ID); + if (variant) { + properties->setUserId(g_variant_get_string(variant->get(), NULL)); + } + + // map user-defined headers + if (_userHeaderRegex) { + AmqpClient::SmartPtrTable propertyHeaders; + propertyHeaders.CreateInstance(); + for (IIntMessage::CHeaders::const_iterator headerIter = headers->begin(); + headerIter != headers->end(); + headerIter++) { + const std::string headerName = headerIter->first; + if (_userHeaderRegex->isMatched(headerName)) { + const SmartPtrIVariant headerValue = headerIter->second.first; + CAF_CM_VALIDATE_SMARTPTR(headerValue); + GVariant *headerVal = headerValue->get(); + if (g_variant_is_of_type(headerVal, G_VARIANT_TYPE_STRING)) { + AmqpClient::tableAddUtf8( + headerName, + headerValue->toString(), + propertyHeaders); + } else if (g_variant_is_of_type(headerVal, G_VARIANT_TYPE_BOOLEAN)) { + AmqpClient::tableAddBoolean( + headerName, + g_variant_get_boolean(headerVal), + propertyHeaders); + } else if (g_variant_is_of_type(headerVal, G_VARIANT_TYPE_BYTE)) { + AmqpClient::tableAddUint8( + headerName, + g_variant_get_byte(headerVal), + propertyHeaders); + } else if (g_variant_is_of_type(headerVal, G_VARIANT_TYPE_INT16)) { + AmqpClient::tableAddInt16( + headerName, + g_variant_get_int16(headerVal), + propertyHeaders); + } else if (g_variant_is_of_type(headerVal, G_VARIANT_TYPE_UINT16)) { + AmqpClient::tableAddUint16( + headerName, + g_variant_get_uint16(headerVal), + propertyHeaders); + } else if (g_variant_is_of_type(headerVal, G_VARIANT_TYPE_INT32)) { + AmqpClient::tableAddInt32( + headerName, + g_variant_get_int32(headerVal), + propertyHeaders); + } else if (g_variant_is_of_type(headerVal, G_VARIANT_TYPE_UINT32)) { + AmqpClient::tableAddUint32( + headerName, + g_variant_get_uint32(headerVal), + propertyHeaders); + } else if (g_variant_is_of_type(headerVal, G_VARIANT_TYPE_INT64)) { + AmqpClient::tableAddInt64( + headerName, + g_variant_get_int64(headerVal), + propertyHeaders); + } else if (g_variant_is_of_type(headerVal, G_VARIANT_TYPE_UINT64)) { + AmqpClient::tableAddUint64( + headerName, + g_variant_get_uint64(headerVal), + propertyHeaders); + } else { + CAF_CM_EXCEPTIONEX_VA2( + InvalidArgumentException, + 0, + "Unsupported GVariant conversion. [name='%s'][type='%s']", + headerName.c_str(), + g_variant_get_type_string(headerVal)); + } + } + } + if (propertyHeaders->size()) { + properties->setHeaders(propertyHeaders); + } + } + return properties; +} + +IIntMessage::SmartPtrCHeaders + DefaultAmqpHeaderMapper::toHeaders( + AmqpClient::AmqpContentHeaders::SmartPtrBasicProperties properties, + AmqpClient::SmartPtrEnvelope envelope) { + CAF_CM_FUNCNAME_VALIDATE("toHeaders"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CIntMessageHeaders messageHeaders; + messageHeaders.insertUint64(DELIVERY_TAG, envelope->getDeliveryTag()); + messageHeaders.insertString(RECEIVED_ROUTING_KEY, envelope->getRoutingKey()); + messageHeaders.insertBool(REDELIVERED, envelope->getRedelivered()); + + // The exchange name can be empty, meaning the default exchange + messageHeaders.insertStringOpt(RECEIVED_EXCHANGE, envelope->getExchange()); + + const uint32 flags = properties->getFlags(); + if (flags & AmqpClient::AmqpContentHeaders::BASIC_PROPERTY_APP_ID_FLAG) { + messageHeaders.insertString(APP_ID, properties->getAppId()); + } + if (flags & AmqpClient::AmqpContentHeaders::BASIC_PROPERTY_CONTENT_ENCODING_FLAG) { + messageHeaders.insertString(CONTENT_ENCODING, properties->getContentEncoding()); + } + if (flags & AmqpClient::AmqpContentHeaders::BASIC_PROPERTY_CONTENT_TYPE_FLAG) { + messageHeaders.insertString(CONTENT_TYPE, properties->getContentType()); + } + if (flags & AmqpClient::AmqpContentHeaders::BASIC_PROPERTY_CORRELATION_ID_FLAG) { + messageHeaders.insertString(CORRELATION_ID, properties->getCorrelationId()); + } + if (flags & AmqpClient::AmqpContentHeaders::BASIC_PROPERTY_DEVLIVERY_MODE_FLAG) { + messageHeaders.insertUint8(DELIVERY_MODE, properties->getDeliveryMode()); + } + if (flags & AmqpClient::AmqpContentHeaders::BASIC_PROPERTY_EXPIRATION_FLAG) { + messageHeaders.insertString(EXPIRATION, properties->getExpiration()); + } + if (flags & AmqpClient::AmqpContentHeaders::BASIC_PROPERTY_MESSAGE_ID_FLAG) { + messageHeaders.insertString(MESSAGE_ID, properties->getMessageId()); + } + if (flags & AmqpClient::AmqpContentHeaders::BASIC_PROPERTY_REPLY_TO_FLAG) { + messageHeaders.insertString(REPLY_TO, properties->getReplyTo()); + } + if (flags & AmqpClient::AmqpContentHeaders::BASIC_PROPERTY_TIMESTAMP_FLAG) { + messageHeaders.insertUint64(TIMESTAMP, properties->getTimestamp()); + } + if (flags & AmqpClient::AmqpContentHeaders::BASIC_PROPERTY_TYPE_FLAG) { + messageHeaders.insertString(TYPE, properties->getType()); + } + if (flags & AmqpClient::AmqpContentHeaders::BASIC_PROPERTY_USER_ID_FLAG) { + messageHeaders.insertString(USER_ID, properties->getUserId()); + } + if ((flags & AmqpClient::AmqpContentHeaders::BASIC_PROPERTY_HEADERS_FLAG) && + _userHeaderRegex) { + AmqpClient::SmartPtrTable table = properties->getHeaders(); + for (TSmartConstMapIterator field(*table); + field; + field++) { + const std::string fieldName = field.getKey(); + if (_userHeaderRegex->isMatched(fieldName)) { + GVariant *fieldVar = field->getValue(); + switch (field->getAmqpType()) { + case AmqpClient::Field::AMQP_FIELD_TYPE_UTF8: + messageHeaders.insertString(fieldName, g_variant_get_string(fieldVar, NULL)); + break; + case AmqpClient::Field::AMQP_FIELD_TYPE_BOOLEAN: + messageHeaders.insertBool(fieldName, g_variant_get_boolean(fieldVar)); + break; + case AmqpClient::Field::AMQP_FIELD_TYPE_I8: + case AmqpClient::Field::AMQP_FIELD_TYPE_U8: + messageHeaders.insertUint8(fieldName, g_variant_get_byte(fieldVar)); + break; + case AmqpClient::Field::AMQP_FIELD_TYPE_I16: + messageHeaders.insertInt16(fieldName, g_variant_get_int16(fieldVar)); + break; + case AmqpClient::Field::AMQP_FIELD_TYPE_U16: + messageHeaders.insertUint16(fieldName, g_variant_get_uint16(fieldVar)); + break; + case AmqpClient::Field::AMQP_FIELD_TYPE_I32: + messageHeaders.insertInt32(fieldName, g_variant_get_int32(fieldVar)); + break; + case AmqpClient::Field::AMQP_FIELD_TYPE_U32: + messageHeaders.insertUint32(fieldName, g_variant_get_uint32(fieldVar)); + break; + case AmqpClient::Field::AMQP_FIELD_TYPE_I64: + messageHeaders.insertInt64(fieldName, g_variant_get_int64(fieldVar)); + break; + case AmqpClient::Field::AMQP_FIELD_TYPE_U64: + case AmqpClient::Field::AMQP_FIELD_TYPE_TIMESTAMP: + messageHeaders.insertUint64(fieldName, g_variant_get_uint64(fieldVar)); + break; + default: + break; + } + } + } + } + + return messageHeaders.getHeaders(); +} + +IIntMessage::SmartPtrCHeaders DefaultAmqpHeaderMapper::filterHeaders( + IIntMessage::SmartPtrCHeaders headers) { + CAF_CM_FUNCNAME_VALIDATE("filterHeaders"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + IIntMessage::SmartPtrCHeaders filteredHeaders; + filteredHeaders.CreateInstance(); + + if (_userHeaderRegex) { + for (IIntMessage::CHeaders::const_iterator headerIter = headers->begin(); + headerIter != headers->end(); + headerIter++) { + const std::string headerName = headerIter->first; + if (_userHeaderRegex->isMatched(headerName)) { + filteredHeaders->insert( + IIntMessage::CHeaders::value_type( + headerName, + std::make_pair(headerIter->second.first, headerIter->second.second))); + } + } + } + return filteredHeaders; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/DefaultAmqpHeaderMapper.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/DefaultAmqpHeaderMapper.h new file mode 100644 index 000000000..6ec7b66d3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/DefaultAmqpHeaderMapper.h @@ -0,0 +1,60 @@ +/* + * Created on: Jun 6, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_DEFAULTAMQPHEADERMAPPER_H_ +#define AMQPINTEGRATIONCORE_DEFAULTAMQPHEADERMAPPER_H_ + +#include "AmqpHeaderMapper.h" + +namespace Caf { namespace AmqpIntegration { + +/** + * @brief This class is used to map AMQP headers to integration message + * headers and vice versa. + *

+ * This class maps headers between the AMQP message protocol and the internal + * integration object message protocol. By default, standard AMQP headers are mapped and + * internal and user-defined headers are not. An optional regular expression can be + * supplied to allow user-defined headers to be mapped from integration messages + * to AMQP. + */ +class AMQPINTEGRATIONCORE_LINKAGE DefaultAmqpHeaderMapper : public AmqpHeaderMapper { +public: + DefaultAmqpHeaderMapper(); + virtual ~DefaultAmqpHeaderMapper(); + + /** + * @brief Object initializer + * @param userHeaderRegex the regular expression to apply to the integration + * message header keys. Those that match are mapped to the AMQP message headers. + */ + void init(const std::string& userHeaderRegex = std::string()); + + virtual AmqpClient::AmqpContentHeaders::SmartPtrBasicProperties + fromHeaders(IIntMessage::SmartPtrCHeaders headers); + + virtual IIntMessage::SmartPtrCHeaders + toHeaders( + AmqpClient::AmqpContentHeaders::SmartPtrBasicProperties properties, + AmqpClient::SmartPtrEnvelope envelope); + + virtual IIntMessage::SmartPtrCHeaders + filterHeaders( + IIntMessage::SmartPtrCHeaders headers); + +private: + bool _isInitialized; + SmartPtrCCafRegex _userHeaderRegex; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(DefaultAmqpHeaderMapper); +}; +CAF_DECLARE_SMART_POINTER(DefaultAmqpHeaderMapper); + +}} + +#endif /* AMQPINTEGRATIONCORE_DEFAULTAMQPHEADERMAPPER_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/Exchange.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/Exchange.h new file mode 100644 index 000000000..ea25d1b05 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/Exchange.h @@ -0,0 +1,54 @@ +/* + * Created on: Jun 12, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_EXCHANGE_H_ +#define AMQPINTEGRATIONCORE_EXCHANGE_H_ + +namespace Caf { namespace AmqpIntegration { + +/** + * @brief Constants representing the exchange types returned by #Caf::AmqpIntegration::Exchange::getType + */ +struct AMQPINTEGRATIONCORE_LINKAGE ExchangeTypes { + /** @brief direct exchange */ + static const char *DIRECT; + /** @brief topic exchange */ + static const char *TOPIC; + /** @brief headers exchange */ + static const char *HEADERS; + /** @brief fanoout exchange */ + static const char *FANOUT; +}; + +/** + * @brief Simple container collecting information to describe an exchange. Used in conjunction with RabbitAdmin. + *

+ * Use #Caf::AmqpIntegration::createDirectExchange, #Caf::AmqpIntegration::createTopicExchange, + * #Caf::AmqpIntegration::createHeadersExchange or #Caf::AmqpIntegration::createFanoutExchange + * to create an exchange. + */ +struct __declspec(novtable) Exchange : public ICafObject { + CAF_DECL_UUID("0F93E16B-E12D-4D00-8DB8-163D57BE2078") + + /** @return the name of the exchange */ + virtual std::string getName() const = 0; + + /** @return the exchange type @see #Caf::AmqpIntegration::ExchangeTypes */ + virtual std::string getType() const = 0; + + /** + * @retval true the exchange is durable + * @retval false the exchange is not durable + */ + virtual bool isDurable() const = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(Exchange); + +}} + +#endif /* AMQPINTEGRATIONCORE_EXCHANGE_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/ExchangeImpl.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/ExchangeImpl.cpp new file mode 100644 index 000000000..6ae517192 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/ExchangeImpl.cpp @@ -0,0 +1,128 @@ +/* + * Created on: Jun 14, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "Exchange.h" +#include "ExchangeImpl.h" + +using namespace Caf::AmqpIntegration; + +const char *ExchangeTypes::DIRECT = "direct"; +const char *ExchangeTypes::TOPIC = "topic"; +const char *ExchangeTypes::HEADERS = "headers"; +const char *ExchangeTypes::FANOUT = "fanout"; + +AbstractExchange::AbstractExchange() : + _isDurable(true) { +} + +AbstractExchange::~AbstractExchange() { +} + +void AbstractExchange::init( + const std::string& name, + const bool isDurable) { + _name = name; + _isDurable = isDurable; +} + +std::string AbstractExchange::getName() const { + return _name; +} + +bool AbstractExchange::isDurable() const { + return _isDurable; +} + +DirectExchange::DirectExchange() { +} + +void DirectExchange::init( + const std::string name, + const bool durable) { + AbstractExchange::init(name, durable); +} + +std::string DirectExchange::getType() const { + return ExchangeTypes::DIRECT; +} + +SmartPtrExchange AMQPINTEGRATIONCORE_LINKAGE Caf::AmqpIntegration::createDirectExchange( + const std::string& name, + const bool durable) { + SmartPtrDirectExchange exchange; + exchange.CreateInstance(); + exchange->init(name, durable); + return exchange; +} + +TopicExchange::TopicExchange() { +} + +void TopicExchange::init( + const std::string name, + const bool durable) { + AbstractExchange::init(name, durable); +} + +std::string TopicExchange::getType() const { + return ExchangeTypes::TOPIC; +} + +SmartPtrExchange AMQPINTEGRATIONCORE_LINKAGE Caf::AmqpIntegration::createTopicExchange( + const std::string& name, + const bool durable) { + SmartPtrTopicExchange exchange; + exchange.CreateInstance(); + exchange->init(name, durable); + return exchange; +} + +HeadersExchange::HeadersExchange() { +} + +void HeadersExchange::init( + const std::string name, + const bool durable) { + AbstractExchange::init(name, durable); +} + +std::string HeadersExchange::getType() const { + return ExchangeTypes::HEADERS; +} + +SmartPtrExchange AMQPINTEGRATIONCORE_LINKAGE Caf::AmqpIntegration::createHeadersExchange( + const std::string& name, + const bool durable) { + SmartPtrHeadersExchange exchange; + exchange.CreateInstance(); + exchange->init(name, durable); + return exchange; +} + +FanoutExchange::FanoutExchange() { +} + +void FanoutExchange::init( + const std::string name, + const bool durable) { + AbstractExchange::init(name, durable); +} + +std::string FanoutExchange::getType() const { + return ExchangeTypes::FANOUT; +} + +SmartPtrExchange AMQPINTEGRATIONCORE_LINKAGE Caf::AmqpIntegration::createFanoutExchange( + const std::string& name, + const bool durable) { + SmartPtrFanoutExchange exchange; + exchange.CreateInstance(); + exchange->init(name, durable); + return exchange; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/ExchangeImpl.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/ExchangeImpl.h new file mode 100644 index 000000000..5538e25b9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/ExchangeImpl.h @@ -0,0 +1,127 @@ +/* + * Created on: Jun 14, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_EXCHANGEIMPL_H_ +#define AMQPINTEGRATIONCORE_EXCHANGEIMPL_H_ + +namespace Caf { namespace AmqpIntegration { + +/** + * @brief Base class for implementations of the #Caf::AmqpIntegration::Exchange interface + */ +class AMQPINTEGRATIONCORE_LINKAGE AbstractExchange : public Exchange { +public: + AbstractExchange(); + virtual ~AbstractExchange(); + + /** + * @brief initalize the object + * @param name exchange name + * @param isDurable true if the exchange is durable else false + */ + void init( + const std::string& name, + const bool isDurable); + + virtual std::string getName() const; + virtual std::string getType() const = 0; + virtual bool isDurable() const; + +private: + std::string _name; + bool _isDurable; + CAF_CM_DECLARE_NOCOPY(AbstractExchange); +}; + +/** + * @brief Implementation of the #Caf::AmqpIntegration::Exchange interface for direct exchanges + */ +class DirectExchange : public AbstractExchange { +public: + DirectExchange(); + + /** + * @brief initalize the object + * @param name exchange name + * @param durable true if the exchange is durable else false + */ + void init( + const std::string name, + const bool durable); + + virtual std::string getType() const; + CAF_CM_DECLARE_NOCOPY(DirectExchange); +}; +CAF_DECLARE_SMART_POINTER(DirectExchange); + +/** + * @brief Implementation of the #Caf::AmqpIntegration::Exchange interface for topic exchanges + */ +class TopicExchange : public AbstractExchange { +public: + TopicExchange(); + + /** + * @brief initalize the object + * @param name exchange name + * @param durable true if the exchange is durable else false + */ + void init( + const std::string name, + const bool durable); + + virtual std::string getType() const; + CAF_CM_DECLARE_NOCOPY(TopicExchange); +}; +CAF_DECLARE_SMART_POINTER(TopicExchange); + +/** + * @brief Implementation of the #Caf::AmqpIntegration::Exchange interface for headers exchanges + */ +class HeadersExchange : public AbstractExchange { +public: + HeadersExchange(); + + /** + * @brief initalize the object + * @param name exchange name + * @param durable true if the exchange is durable else false + */ + void init( + const std::string name, + const bool durable); + + virtual std::string getType() const; + CAF_CM_DECLARE_NOCOPY(HeadersExchange); +}; +CAF_DECLARE_SMART_POINTER(HeadersExchange); + +/** + * @brief Implementation of the #Caf::AmqpIntegration::Exchange interface for fanout exchanges + */ +class FanoutExchange : public AbstractExchange { +public: + FanoutExchange(); + + /** + * @brief initalize the object + * @param name exchange name + * @param durable true if the exchange is durable else false + */ + void init( + const std::string name, + const bool durable); + + virtual std::string getType() const; + CAF_CM_DECLARE_NOCOPY(FanoutExchange); +}; +CAF_DECLARE_SMART_POINTER(FanoutExchange); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/ExchangeInternal.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/ExchangeInternal.h new file mode 100644 index 000000000..ba1748fe8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/ExchangeInternal.h @@ -0,0 +1,31 @@ +/* + * Created on: Jun 14, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_EXCHANGEINTERNAL_H_ +#define AMQPINTEGRATIONCORE_EXCHANGEINTERNAL_H_ + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObjImpl + * @brief Interface allowing for internal management of exchange integration objects + */ +struct __declspec(novtable) ExchangeInternal : public ICafObject { + CAF_DECL_UUID("5373AD13-2103-4FC4-A581-9D6D454F02A3") + + /** + * @brief Return the bindings defined as part of the exchange definition + * @return the collection of bindings + */ + virtual std::deque getEmbeddedBindings() const = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(ExchangeInternal); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/HeaderUtils.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/HeaderUtils.cpp new file mode 100644 index 000000000..94e698ba6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/HeaderUtils.cpp @@ -0,0 +1,112 @@ +/* + * Created on: Jun 6, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "HeaderUtils.h" + +using namespace Caf::AmqpIntegration; + +SmartPtrCVariant HeaderUtils::getHeaderString( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag) { + SmartPtrCVariant variant; + IIntMessage::CHeaders::const_iterator header = + headers->find(tag); + if (header != headers->end()) { + variant = CVariant::createString(header->second.first->toString()); + } + return variant; +} + +SmartPtrCVariant HeaderUtils::getHeaderUint8( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag) { + SmartPtrCVariant variant; + IIntMessage::CHeaders::const_iterator header = + headers->find(tag); + if (header != headers->end()) { + if (g_variant_is_of_type(header->second.first->get(), G_VARIANT_TYPE_BYTE)) { + variant = CVariant::createUint8(g_variant_get_byte(header->second.first->get())); + } else { + variant = CVariant::createUint8( + CStringConv::fromString(header->second.first->toString())); + } + } + return variant; +} + +SmartPtrCVariant HeaderUtils::getHeaderUint16( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag) { + SmartPtrCVariant variant; + IIntMessage::CHeaders::const_iterator header = + headers->find(tag); + if (header != headers->end()) { + if (g_variant_is_of_type(header->second.first->get(), G_VARIANT_TYPE_UINT16)) { + variant = CVariant::createUint16(g_variant_get_uint16(header->second.first->get())); + } else { + variant = CVariant::createUint16( + CStringConv::fromString(header->second.first->toString())); + } + } + return variant; +} + +SmartPtrCVariant HeaderUtils::getHeaderUint32( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag) { + SmartPtrCVariant variant; + IIntMessage::CHeaders::const_iterator header = + headers->find(tag); + if (header != headers->end()) { + if (g_variant_is_of_type(header->second.first->get(), G_VARIANT_TYPE_UINT32)) { + variant = CVariant::createUint32(g_variant_get_uint32(header->second.first->get())); + } else { + variant = CVariant::createUint32( + CStringConv::fromString(header->second.first->toString())); + } + } + return variant; +} + +SmartPtrCVariant HeaderUtils::getHeaderUint64( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag) { + SmartPtrCVariant variant; + IIntMessage::CHeaders::const_iterator header = + headers->find(tag); + if (header != headers->end()) { + if (g_variant_is_of_type(header->second.first->get(), G_VARIANT_TYPE_UINT64)) { + variant = CVariant::createUint64(g_variant_get_uint64(header->second.first->get())); + } else { + variant = CVariant::createUint64( + CStringConv::fromString(header->second.first->toString())); + } + } + return variant; +} + +SmartPtrCVariant HeaderUtils::getHeaderBool( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag) { + SmartPtrCVariant variant; + IIntMessage::CHeaders::const_iterator header = + headers->find(tag); + if (header != headers->end()) { + if (g_variant_is_of_type(header->second.first->get(), G_VARIANT_TYPE_BOOLEAN)) { + variant = CVariant::createBool(g_variant_get_boolean(header->second.first->get())); + } else { + const std::string val = header->second.first->toString(); + variant = CVariant::createBool( + (val == "0") || + (g_ascii_strncasecmp(val.c_str(), "false", val.length()) == 0) + ? false : true); + } + } + return variant; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/HeaderUtils.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/HeaderUtils.h new file mode 100644 index 000000000..8ce2296f1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/HeaderUtils.h @@ -0,0 +1,82 @@ +/* + * Created on: Jun 6, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_HEADERUTILS_H_ +#define AMQPINTEGRATIONCORE_HEADERUTILS_H_ + +namespace Caf { namespace AmqpIntegration { + +/** + * @brief A collection of helper functions + */ +class AMQPINTEGRATIONCORE_LINKAGE HeaderUtils { +public: + /** + * @brief Extract a header value as text + * @param headers message headers + * @param tag value name + * @return the value as a variant String + */ + static SmartPtrCVariant getHeaderString( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag); + + /** + * @brief Extract a header value as an unsigned 8-bit integer + * @param headers message headers + * @param tag value name + * @return the value as a variant Uint8 + */ + static SmartPtrCVariant getHeaderUint8( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag); + + /** + * @brief Extract a header value as an unsigned 16-bit integer + * @param headers message headers + * @param tag value name + * @return the value as a variant Uint16 + */ + static SmartPtrCVariant getHeaderUint16( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag); + + /** + * @brief Extract a header value as an unsigned 32-bit integer + * @param headers message headers + * @param tag value name + * @return the value as a variant Uint32 + */ + static SmartPtrCVariant getHeaderUint32( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag); + + /** + * @brief Extract a header value as an unsigned 64-bit integer + * @param headers message headers + * @param tag value name + * @return the value as a variant Uint64 + */ + static SmartPtrCVariant getHeaderUint64( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag); + + /** + * @brief Extract a header value as a boolean + * @param headers message headers + * @param tag value name + * @return the value as a variant Bool + */ + static SmartPtrCVariant getHeaderBool( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag); +}; + +}} + +#endif /* AMQPINTEGRATIONCORE_HEADERUTILS_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/MessageListener.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/MessageListener.h new file mode 100644 index 000000000..4ac066a6b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/MessageListener.h @@ -0,0 +1,23 @@ +/* + * Created on: Aug 2, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_MESSAGELISTENER_H_ +#define AMQPINTEGRATIONCORE_MESSAGELISTENER_H_ + +namespace Caf { namespace AmqpIntegration { + +struct __declspec(novtable) MessageListener : public ICafObject { + CAF_DECL_UUID("5B2B7C47-ACEF-4FB1-97A0-1594D05AB4D9") + + virtual void onMessage(const SmartPtrIIntMessage& message) = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(MessageListener); + +}} + +#endif /* AMQPINTEGRATIONCORE_MESSAGELISTENER_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/Queue.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/Queue.h new file mode 100644 index 000000000..761deb458 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/Queue.h @@ -0,0 +1,47 @@ +/* + * Created on: Jun 13, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_QUEUE_H_ +#define AMQPINTEGRATIONCORE_QUEUE_H_ + +namespace Caf { namespace AmqpIntegration { + +/** + * @brief Simple container collecting information to describe a queue. Used in conjunction with RabbitAdmin. + *

+ * Use #Caf::AmqpIntegration::createQueue to create a queue. + */ +struct __declspec(novtable) Queue : public ICafObject { + CAF_DECL_UUID("082088AD-ECA3-4591-986F-8D9AFEDDEE7D") + + /** @return the name of the queue */ + virtual std::string getName() const = 0; + + /** + * @retval true the queue is durable + * @retval false the queue is not durable + */ + virtual bool isDurable() const = 0; + + /** + * @retval true the queue is exclusive to the connection + * @retval false the queue is not exclusive to the connection + */ + virtual bool isExclusive() const = 0; + + /** + * @retval true the server should delete the queue when it is no longer in use + * @retval false the server should not delete the queue when it is no longer in use + */ + virtual bool isAutoDelete() const = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(Queue); + +}} + +#endif /* AMQPINTEGRATIONCORE_QUEUE_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/QueueImpl.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/QueueImpl.cpp new file mode 100644 index 000000000..a933c23e3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/QueueImpl.cpp @@ -0,0 +1,87 @@ +/* + * Created on: Jun 14, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "Queue.h" +#include "QueueImpl.h" + +using namespace Caf::AmqpIntegration; + +QueueImpl::QueueImpl() : + _durable(false), + _exclusive(false), + _autoDelete(false) { +} + +QueueImpl::~QueueImpl() { +} + +void QueueImpl::init(const std::string& name) { + init(name, true, false, false); +} + +void QueueImpl::init( + const std::string& name, + const bool durable) { + init(name, durable, false, false); +} + +void QueueImpl::init( + const std::string& name, + const bool durable, + const bool exclusive, + const bool autoDelete) { + _name = name; + _durable = durable; + _exclusive = exclusive; + _autoDelete = autoDelete; +} + +std::string QueueImpl::getName() const { + return _name; +} + +bool QueueImpl::isDurable() const { + return _durable; +} + +bool QueueImpl::isExclusive() const { + return _exclusive; +} + +bool QueueImpl::isAutoDelete() const { + return _autoDelete; +} + +SmartPtrQueue AMQPINTEGRATIONCORE_LINKAGE Caf::AmqpIntegration::createQueue( + const std::string& name) { + SmartPtrQueueImpl queue; + queue.CreateInstance(); + queue->init(name); + return queue; +} + +SmartPtrQueue AMQPINTEGRATIONCORE_LINKAGE Caf::AmqpIntegration::createQueue( + const std::string& name, + const bool durable) { + SmartPtrQueueImpl queue; + queue.CreateInstance(); + queue->init(name, durable); + return queue; +} + +SmartPtrQueue AMQPINTEGRATIONCORE_LINKAGE Caf::AmqpIntegration::createQueue( + const std::string& name, + const bool durable, + const bool exclusive, + const bool autoDelete) { + SmartPtrQueueImpl queue; + queue.CreateInstance(); + queue->init(name, durable, exclusive, autoDelete); + return queue; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/QueueImpl.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/QueueImpl.h new file mode 100644 index 000000000..1418fe54c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/QueueImpl.h @@ -0,0 +1,74 @@ +/* + * Created on: Jun 14, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_QUEUEIMPL_H_ +#define AMQPINTEGRATIONCORE_QUEUEIMPL_H_ + +namespace Caf { namespace AmqpIntegration { + +/** + * @brief Implementation of the #Caf::AmqpIntegration::Queue interface. + */ +class AMQPINTEGRATIONCORE_LINKAGE QueueImpl : public Queue { +public: + QueueImpl(); + virtual ~QueueImpl(); + + /** + * @brief initialize the object + *

+ * durable will be set to true; + * exclusive and autoDelete will be set to false. + * @param name queue name + */ + void init(const std::string& name); + + /** + * @brief initialize the object + *

+ * exclusive and autoDelete will be set to false. + * @param name queue name + * @param durable true to make the queue durable else false + */ + void init( + const std::string& name, + const bool durable); + + /** + * @brief initialize the object + * @param name queue name + * @param durable true to make the queue durable else false + * @param exclusive true to make the queue exclusive else false + * @param autoDelete true to make the queue auto-delete else false + */ + void init( + const std::string& name, + const bool durable, + const bool exclusive, + const bool autoDelete); + + std::string getName() const; + + bool isDurable() const; + + bool isExclusive() const; + + bool isAutoDelete() const; + +private: + std::string _name; + bool _durable; + bool _exclusive; + bool _autoDelete; + CAF_CM_DECLARE_NOCOPY(QueueImpl); +}; +CAF_DECLARE_SMART_POINTER(QueueImpl); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/QueueInternal.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/QueueInternal.h new file mode 100644 index 000000000..8d2840175 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/QueueInternal.h @@ -0,0 +1,30 @@ +/* + * Created on: Jun 14, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_QUEUEINTERNAL_H_ +#define AMQPINTEGRATIONCORE_QUEUEINTERNAL_H_ + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObjImpl + * @brief Interface allowing for internal management of queue integration objects + */ +struct __declspec(novtable) QueueInternal : public ICafObject { + CAF_DECL_UUID("E15F4DA8-C4DC-4813-82B9-1B15C69915D1") + + /** + * @brief Sets the delegated Queue object + * @param queue the delegated queue + */ + virtual void setQueueInternal(SmartPtrQueue queue) = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(QueueInternal); + +}} +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/RabbitAdmin.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/RabbitAdmin.cpp new file mode 100644 index 000000000..5f82026a2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/RabbitAdmin.cpp @@ -0,0 +1,309 @@ +/* + * Created on: Jun 12, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "RabbitAdmin.h" + +using namespace Caf::AmqpIntegration; + +RabbitAdmin::RabbitAdmin() : + _isInitialized(false), + CAF_CM_INIT_LOG("RabbitAdmin") { +} + +RabbitAdmin::~RabbitAdmin() { + CAF_CM_FUNCNAME("~RabbitAdmin"); + try { + if (_rabbitTemplate) { + _rabbitTemplate->term(); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; +} + +void RabbitAdmin::init(SmartPtrConnectionFactory connectionFactory) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(connectionFactory); + _rabbitTemplate.CreateInstance(); + _rabbitTemplate->init(connectionFactory); + _isInitialized = true; +} + +void RabbitAdmin::term() { + CAF_CM_FUNCNAME_VALIDATE("term"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _rabbitTemplate->term(); + _rabbitTemplate = NULL; +} + +void RabbitAdmin::declareExchange(SmartPtrExchange exchange) { + CAF_CM_FUNCNAME_VALIDATE("declareExchange"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(exchange); + SmartPtrDeclareExchangeExecutor executor; + executor.CreateInstance(); + _rabbitTemplate->execute(executor, exchange.GetNonAddRefedInterface()); +} + +bool RabbitAdmin::deleteExchange(const std::string& exchange) { + CAF_CM_FUNCNAME_VALIDATE("deleteExchange"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(exchange); + SmartPtrDeleteExchangeExecutor executor; + executor.CreateInstance(); + gpointer result = _rabbitTemplate->execute( + executor, + const_cast(exchange.c_str())); + return result != NULL; +} + +SmartPtrQueue RabbitAdmin::declareQueue() { + CAF_CM_FUNCNAME_VALIDATE("declareQueue"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + SmartPtrDeclareQueueExecutor executor; + executor.CreateInstance(); + gpointer result = _rabbitTemplate->execute(executor, NULL); + CAF_CM_VALIDATE_PTR(result); + Queue *queuePtr = reinterpret_cast(result); + SmartPtrQueue queue(queuePtr); + queuePtr->Release(); + return queue; +} + +void RabbitAdmin::declareQueue(SmartPtrQueue queue) { + CAF_CM_FUNCNAME_VALIDATE("declareQueue"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + SmartPtrDeclareQueueExecutor executor; + executor.CreateInstance(); + _rabbitTemplate->execute(executor, queue.GetNonAddRefedInterface()); +} + +bool RabbitAdmin::deleteQueue(const std::string& queue) { + CAF_CM_FUNCNAME_VALIDATE("deleteQueue"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(queue); + SmartPtrDeleteQueueExecutor executor; + executor.CreateInstance(); + gpointer result = _rabbitTemplate->execute( + executor, + const_cast(queue.c_str())); + return result != NULL; +} + +void RabbitAdmin::deleteQueue( + const std::string& queue, + const bool unused, + const bool empty) { + CAF_CM_FUNCNAME_VALIDATE("deleteQueue"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(queue); + SmartPtrCVariant args[3]; + args[0] = CVariant::createString(queue); + args[1] = CVariant::createBool(unused); + args[2] = CVariant::createBool(empty); + SmartPtrDeleteQueueExExecutor executor; + executor.CreateInstance(); + _rabbitTemplate->execute(executor, args); +} + +void RabbitAdmin::purgeQueue(const std::string& queue) { + CAF_CM_FUNCNAME_VALIDATE("purgeQueue"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(queue); + SmartPtrPurgeQueueExecutor executor; + executor.CreateInstance(); + _rabbitTemplate->execute( + executor, + const_cast(queue.c_str())); +} + +void RabbitAdmin::declareBinding(SmartPtrBinding binding) { + CAF_CM_FUNCNAME_VALIDATE("declareBinding"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(binding); + SmartPtrDeclareBindingExecutor executor; + executor.CreateInstance(); + _rabbitTemplate->execute( + executor, + binding.GetNonAddRefedInterface()); +} + +void RabbitAdmin::removeBinding(SmartPtrBinding binding) { + CAF_CM_FUNCNAME_VALIDATE("removeBinding"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(binding); + SmartPtrRemoveBindingExecutor executor; + executor.CreateInstance(); + _rabbitTemplate->execute( + executor, + binding.GetNonAddRefedInterface()); +} + +gpointer RabbitAdmin::DeclareExchangeExecutor::execute( + AmqpClient::SmartPtrChannel channel, + gpointer data) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("RabbitAdmin::DeclareExchangeExecutor", "execute"); + CAF_CM_VALIDATE_SMARTPTR(channel); + CAF_CM_VALIDATE_PTR(data); + Exchange *exchange = reinterpret_cast(data); + CAF_CM_LOG_DEBUG_VA3( + "declaring exchange '%s' type '%s' durable=%d", + exchange->getName().c_str(), + exchange->getType().c_str(), + exchange->isDurable()); + channel->exchangeDeclare( + exchange->getName(), + exchange->getType(), + exchange->isDurable()); + return NULL; +} + +gpointer RabbitAdmin::DeleteExchangeExecutor::execute( + AmqpClient::SmartPtrChannel channel, + gpointer data) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("RabbitAdmin::DeleteExchangeExecutor", "execute"); + CAF_CM_VALIDATE_SMARTPTR(channel); + CAF_CM_VALIDATE_PTR(data); + const char *exchange = reinterpret_cast(data); + CAF_CM_LOG_DEBUG_VA1( + "deleting exchange '%s'", + exchange); + gpointer result = NULL; + try { + channel->exchangeDelete(exchange, false); + result = reinterpret_cast(0x01); + } catch (AmqpClient::AmqpExceptions::ChannelClosedByServerException *ex) { + ex->Release(); + } + return NULL; +} + +gpointer RabbitAdmin::DeclareQueueExecutor::execute( + AmqpClient::SmartPtrChannel channel, + gpointer data) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("RabbitAdmin::DeclareQueueExecutor", "execute"); + CAF_CM_VALIDATE_SMARTPTR(channel); + + gpointer result = NULL; + if (data) { + Queue *queue = reinterpret_cast(data); + const std::string queueName = queue->getName(); + if (queueName.find("amq.", 0) == 0) { + CAF_CM_LOG_ERROR_VA1( + "Cannot declare queue '%s' because it's name begins with 'amq.'", + queueName.c_str()); + } else { + CAF_CM_LOG_DEBUG_VA4( + "declaring queue '%s' [durable=%d][exclusive=%d][autoDelete=%d]", + queueName.c_str(), + queue->isDurable(), + queue->isExclusive(), + queue->isAutoDelete()); + + channel->queueDeclare( + queue->getName(), + queue->isDurable(), + queue->isExclusive(), + queue->isAutoDelete()); + } + } else { + AmqpClient::AmqpMethods::Queue::SmartPtrDeclareOk declareOk = + channel->queueDeclare(); + SmartPtrQueue queue = createQueue( + declareOk->getQueueName(), + false, + true, + true); + result = queue.GetAddRefedInterface(); + } + return result; +} + +gpointer RabbitAdmin::DeleteQueueExecutor::execute( + AmqpClient::SmartPtrChannel channel, + gpointer data) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("RabbitAdmin::DeleteQueueExecutor", "execute"); + CAF_CM_VALIDATE_SMARTPTR(channel); + CAF_CM_VALIDATE_PTR(data); + const char *queue = reinterpret_cast(data); + CAF_CM_LOG_DEBUG_VA1( + "deleting queue '%s'", + queue); + gpointer result = NULL; + try { + channel->queueDelete(queue, false, false); + result = reinterpret_cast(0x01); + } catch (AmqpClient::AmqpExceptions::ChannelClosedByServerException *ex) { + ex->Release(); + } + return result; +} + +gpointer RabbitAdmin::DeleteQueueExExecutor::execute( + AmqpClient::SmartPtrChannel channel, + gpointer data) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("RabbitAdmin::DeleteQueueExExecutor", "execute"); + CAF_CM_VALIDATE_SMARTPTR(channel); + CAF_CM_VALIDATE_PTR(data); + SmartPtrCVariant *args = reinterpret_cast(data); + CAF_CM_LOG_DEBUG_VA3( + "deleting queue '%s' [unused=%d][empty=%d]", + g_variant_get_string(args[0]->get(), NULL), + g_variant_get_boolean(args[1]->get()), + g_variant_get_boolean(args[2]->get())); + channel->queueDelete( + g_variant_get_string(args[0]->get(), NULL), + g_variant_get_boolean(args[1]->get()), + g_variant_get_boolean(args[2]->get())); + return NULL; +} + +gpointer RabbitAdmin::PurgeQueueExecutor::execute( + AmqpClient::SmartPtrChannel channel, + gpointer data) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("RabbitAdmin::PurgeQueueExecutor", "execute"); + CAF_CM_VALIDATE_SMARTPTR(channel); + CAF_CM_VALIDATE_PTR(data); + const char *queue = reinterpret_cast(data); + CAF_CM_LOG_DEBUG_VA1( + "purging queue '%s'", + queue); + channel->queuePurge(queue); + return NULL; +} + +gpointer RabbitAdmin::DeclareBindingExecutor::execute( + AmqpClient::SmartPtrChannel channel, + gpointer data) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("RabbitAdmin::DeclareBindingExecutor", "execute"); + CAF_CM_VALIDATE_SMARTPTR(channel); + CAF_CM_VALIDATE_PTR(data); + Binding *binding = reinterpret_cast(data); + channel->queueBind( + binding->getQueue(), + binding->getExchange(), + binding->getRoutingKey()); + return NULL; +} + +gpointer RabbitAdmin::RemoveBindingExecutor::execute( + AmqpClient::SmartPtrChannel channel, + gpointer data) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("RabbitAdmin::RemoveBindingExecutor", "execute"); + CAF_CM_VALIDATE_SMARTPTR(channel); + CAF_CM_VALIDATE_PTR(data); + Binding *binding = reinterpret_cast(data); + channel->queueUnbind( + binding->getQueue(), + binding->getExchange(), + binding->getRoutingKey()); + return NULL; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/RabbitAdmin.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/RabbitAdmin.h new file mode 100644 index 000000000..24456c6ce --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/RabbitAdmin.h @@ -0,0 +1,106 @@ +/* + * Created on: Jun 12, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_RABBITADMIN_H_ +#define AMQPINTEGRATIONCORE_RABBITADMIN_H_ + +#include "RabbitTemplate.h" +#include "AmqpAdmin.h" + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObjImpl + * @brief Implementation of the RabbitAdmin Integration Object + */ +class AMQPINTEGRATIONCORE_LINKAGE RabbitAdmin : public AmqpAdmin { +public: + RabbitAdmin(); + virtual ~RabbitAdmin(); + + void init(SmartPtrConnectionFactory connectionFactory); + + void term(); + +public: // AmqpAdmin + void declareExchange(SmartPtrExchange exchange); + + bool deleteExchange(const std::string& exchange); + + SmartPtrQueue declareQueue(); + + void declareQueue(SmartPtrQueue queue); + + bool deleteQueue(const std::string& queue); + + void deleteQueue( + const std::string& queue, + const bool unused, + const bool empty); + + void purgeQueue(const std::string& queue); + + void declareBinding(SmartPtrBinding binding); + + void removeBinding(SmartPtrBinding binding); + +private: // Executors + class DeclareExchangeExecutor : public AmqpTemplate::Executor { + public: + gpointer execute(AmqpClient::SmartPtrChannel channel, gpointer data); + }; + CAF_DECLARE_SMART_POINTER(DeclareExchangeExecutor); + + class DeleteExchangeExecutor : public AmqpTemplate::Executor { + gpointer execute(AmqpClient::SmartPtrChannel channel, gpointer data); + }; + CAF_DECLARE_SMART_POINTER(DeleteExchangeExecutor); + + class DeclareQueueExecutor : public AmqpTemplate::Executor { + gpointer execute(AmqpClient::SmartPtrChannel channel, gpointer data); + }; + CAF_DECLARE_SMART_POINTER(DeclareQueueExecutor); + + class DeleteQueueExecutor : public AmqpTemplate::Executor { + gpointer execute(AmqpClient::SmartPtrChannel channel, gpointer data); + }; + CAF_DECLARE_SMART_POINTER(DeleteQueueExecutor); + + class DeleteQueueExExecutor : public AmqpTemplate::Executor { + gpointer execute(AmqpClient::SmartPtrChannel channel, gpointer data); + }; + CAF_DECLARE_SMART_POINTER(DeleteQueueExExecutor); + + class PurgeQueueExecutor : public AmqpTemplate::Executor { + gpointer execute(AmqpClient::SmartPtrChannel channel, gpointer data); + }; + CAF_DECLARE_SMART_POINTER(PurgeQueueExecutor); + + class DeclareBindingExecutor : public AmqpTemplate::Executor { + gpointer execute(AmqpClient::SmartPtrChannel channel, gpointer data); + }; + CAF_DECLARE_SMART_POINTER(DeclareBindingExecutor); + + class RemoveBindingExecutor : public AmqpTemplate::Executor { + gpointer execute(AmqpClient::SmartPtrChannel channel, gpointer data); + }; + CAF_DECLARE_SMART_POINTER(RemoveBindingExecutor); + +private: + bool _isInitialized; + SmartPtrRabbitTemplate _rabbitTemplate; + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(RabbitAdmin); +}; + +CAF_DECLARE_SMART_POINTER(RabbitAdmin); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/RabbitTemplate.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/RabbitTemplate.cpp new file mode 100644 index 000000000..6a06e7122 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/RabbitTemplate.cpp @@ -0,0 +1,327 @@ +/* + * Created on: Jun 5, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "RabbitTemplate.h" +#include "AutoChannelClose.h" +#include "DefaultAmqpHeaderMapper.h" + +using namespace Caf::AmqpIntegration; + +std::string RabbitTemplate::DEFAULT_EXCHANGE = ""; +std::string RabbitTemplate::DEFAULT_ROUTING_KEY = ""; +int32 RabbitTemplate::DEFAULT_REPLY_TIMEOUT = 5000; + +RabbitTemplate::RabbitTemplate() : + _isInitialized(false), + _exchange(DEFAULT_EXCHANGE), + _routingKey(DEFAULT_ROUTING_KEY), + _replyTimeout(DEFAULT_REPLY_TIMEOUT), + CAF_CM_INIT_LOG("RabbitTemplate") { +} + +RabbitTemplate::~RabbitTemplate() { + CAF_CM_FUNCNAME("~RabbitTemplate"); + try { + term(); + } + CAF_CM_CATCH_ALL; + CAF_CM_CLEAREXCEPTION; +} + +void RabbitTemplate::init(SmartPtrConnectionFactory connectionFactory) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(connectionFactory); + SmartPtrDefaultAmqpHeaderMapper defaultMapper; + defaultMapper.CreateInstance(); + defaultMapper->init(); + _headerMapper = defaultMapper; + _connectionFactory = connectionFactory; + _connection = _connectionFactory->createConnection(); + _isInitialized = true; +} + +void RabbitTemplate::term() { + if (_connection) { + _connection->close(); + _connection = NULL; + } +} + +void RabbitTemplate::setExchange(const std::string& exchange) { + _exchange = exchange; +} + +void RabbitTemplate::setRoutingKey(const std::string& routingKey) { + _routingKey = routingKey; +} + +void RabbitTemplate::setQueue(const std::string& queue) { + _queue = queue; +} + +void RabbitTemplate::setReplyTimeout(const uint32 replyTimeout) { + _replyTimeout = replyTimeout; +} + +void RabbitTemplate::setHeaderMapper(const SmartPtrAmqpHeaderMapper& headerMapper) { + CAF_CM_FUNCNAME_VALIDATE("setHeaderMapper"); + CAF_CM_VALIDATE_SMARTPTR(headerMapper); + _headerMapper = headerMapper; +} + +void RabbitTemplate::send( + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper headerMapper) { + send( + _exchange, + _routingKey, + message, + headerMapper); +} + +void RabbitTemplate::send( + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper headerMapper) { + send( + _exchange, + routingKey, + message, + headerMapper); +} + +void RabbitTemplate::send( + const std::string& exchange, + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper headerMapper) { + CAF_CM_FUNCNAME_VALIDATE("send"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + AmqpClient::SmartPtrChannel channel = _connection->createChannel(); + AutoChannelClose closer(channel); + doSend(channel, exchange, routingKey, message, headerMapper); +} + +SmartPtrIIntMessage RabbitTemplate::receive(SmartPtrAmqpHeaderMapper headerMapper) { + return receive(_queue, headerMapper); +} + +SmartPtrIIntMessage RabbitTemplate::receive( + const std::string& queueName, + SmartPtrAmqpHeaderMapper headerMapper) { + CAF_CM_FUNCNAME_VALIDATE("receive"); + CAF_CM_VALIDATE_STRING(queueName); + + SmartPtrCIntMessage message; + AmqpClient::SmartPtrChannel channel = _connection->createChannel(); + AutoChannelClose closer(channel); + AmqpClient::SmartPtrGetResponse response = channel->basicGet(queueName, true); + if (response) { + if (!headerMapper) { + headerMapper = _headerMapper; + } + IIntMessage::SmartPtrCHeaders headers = + headerMapper->toHeaders( + response->getProperties(), + response->getEnvelope()); + message.CreateInstance(); + message->initialize(response->getBody(), headers, + IIntMessage::SmartPtrCHeaders()); + } + return message; +} + +SmartPtrIIntMessage RabbitTemplate::sendAndReceive( + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper requestHeaderMapper, + SmartPtrAmqpHeaderMapper responseHeaderMapper) { + return sendAndReceive( + _exchange, + _routingKey, + message, + requestHeaderMapper, + responseHeaderMapper); +} + +SmartPtrIIntMessage RabbitTemplate::sendAndReceive( + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper requestHeaderMapper, + SmartPtrAmqpHeaderMapper responseHeaderMapper) { + return sendAndReceive( + _exchange, + routingKey, + message, + requestHeaderMapper, + responseHeaderMapper); +} + +SmartPtrIIntMessage RabbitTemplate::sendAndReceive( + const std::string& exchange, + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper requestHeaderMapper, + SmartPtrAmqpHeaderMapper responseHeaderMapper) { + AmqpClient::SmartPtrChannel channel = _connection->createChannel(); + AutoChannelClose closer(channel); + return doSendAndReceive( + channel, + exchange, + routingKey, + message, + requestHeaderMapper, + responseHeaderMapper); +} + +gpointer RabbitTemplate::execute(SmartPtrExecutor executor, gpointer data) { + CAF_CM_FUNCNAME_VALIDATE("execute"); + CAF_CM_VALIDATE_INTERFACE(executor); + AmqpClient::SmartPtrChannel channel = _connection->createChannel(); + CAF_CM_VALIDATE_SMARTPTR(channel); + AutoChannelClose closer(channel); + return executor->execute(channel, data); +} + +void RabbitTemplate::doSend( + AmqpClient::SmartPtrChannel channel, + const std::string& exchange, + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper headerMapper) { + CAF_CM_FUNCNAME_VALIDATE("doSend"); + CAF_CM_LOG_DEBUG_VA2( + "Publishing message on exchange [%s], routingKey= [%s]", + exchange.c_str(), + routingKey.c_str()); + + if (!headerMapper) { + headerMapper = _headerMapper; + } + + AmqpClient::AmqpContentHeaders::SmartPtrBasicProperties props = headerMapper->fromHeaders(message->getHeaders()); + channel->basicPublish( + exchange, + routingKey, + false, + false, + props, + message->getPayload()); +} + +SmartPtrIIntMessage RabbitTemplate::doSendAndReceive( + AmqpClient::SmartPtrChannel channel, + const std::string& exchange, + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper requestHeaderMapper, + SmartPtrAmqpHeaderMapper responseHeaderMapper) { + CAF_CM_FUNCNAME("doSendAndReceive"); + + if (!requestHeaderMapper) { + requestHeaderMapper = _headerMapper; + } + if (!responseHeaderMapper) { + responseHeaderMapper = _headerMapper; + } + + IIntMessage::SmartPtrCHeaders headers = message->getHeaders(); + if (headers->find(AmqpHeaderMapper::REPLY_TO) != headers->end()) { + CAF_CM_EXCEPTIONEX_VA1( + IllegalStateException, + 0, + "Send-and-receive methods can only be used if the message " + "does not already have a %s property", + AmqpHeaderMapper::REPLY_TO.c_str()); + } + + // Declare a temporary queue and set the replyTo + AmqpClient::AmqpMethods::Queue::SmartPtrDeclareOk queueDeclareOk = + channel->queueDeclare(); + headers->insert( + std::make_pair( + AmqpHeaderMapper::REPLY_TO, + std::make_pair( + CVariant::createString(queueDeclareOk->getQueueName()), SmartPtrICafObject()))); + + // Create an inter-thread RPC mechanism to capture the response + SmartPtrSynchronousHandoff handoff; + handoff.CreateInstance(); + + // Spin up a consumer to wait for the response + SmartPtrDefaultConsumer consumer; + consumer.CreateInstance(); + consumer->init(responseHeaderMapper, handoff); + const std::string consumerTag = CStringUtils::createRandomUuid(); + const bool noAck = false; + const bool noLocal = true; + const bool exclusive = true; + AmqpClient::AmqpMethods::Basic::SmartPtrConsumeOk consumeOk = + channel->basicConsume( + queueDeclareOk->getQueueName(), + consumerTag, + noAck, + noLocal, + exclusive, + consumer); + + // Send the message + doSend(channel, exchange, routingKey, message, requestHeaderMapper); + + // Wait for the reply + SmartPtrIIntMessage reply = handoff->get(_replyTimeout); + + // Cancel the consumer + channel->basicCancel(consumerTag); + + return reply; +} + +RabbitTemplate::DefaultConsumer::DefaultConsumer() { +} + +RabbitTemplate::DefaultConsumer::~DefaultConsumer() { +} + +void RabbitTemplate::DefaultConsumer::init( + SmartPtrAmqpHeaderMapper mapper, + SmartPtrSynchronousHandoff handoff) { + _mapper = mapper; + _handoff = handoff; +} + +void RabbitTemplate::DefaultConsumer::handleDelivery( + const std::string& consumerTag, + const AmqpClient::SmartPtrEnvelope& envelope, + const AmqpClient::AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body) { + const IIntMessage::SmartPtrCHeaders headers = + _mapper->toHeaders(properties, envelope); + SmartPtrCIntMessage message; + message.CreateInstance(); + message->initialize(body, headers, IIntMessage::SmartPtrCHeaders()); + _handoff->set(message); +} + +void RabbitTemplate::DefaultConsumer::handleConsumeOk( + const std::string& consumerTag) { +} + +void RabbitTemplate::DefaultConsumer::handleCancelOk( + const std::string& consumerTag) { +} + +void RabbitTemplate::DefaultConsumer::handleRecoverOk( + const std::string& consumerTag) { +} + +void RabbitTemplate::DefaultConsumer::handleShutdown( + const std::string& consumerTag, + SmartPtrCCafException& reason) { +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/RabbitTemplate.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/RabbitTemplate.h new file mode 100644 index 000000000..652323dc3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/RabbitTemplate.h @@ -0,0 +1,161 @@ +/* + * Created on: Jun 5, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_RABBITTEMPLATE_H_ +#define AMQPINTEGRATIONCORE_RABBITTEMPLATE_H_ + +#include "ConnectionFactory.h" +#include "AmqpTemplate.h" + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObjImpl + * @brief Implementation of the RabbitTemplate Integration Object + */ +class AMQPINTEGRATIONCORE_LINKAGE RabbitTemplate : public AmqpTemplate { +public: + RabbitTemplate(); + virtual ~RabbitTemplate(); + + void init(SmartPtrConnectionFactory connectionFactory); + + void term(); + + void setExchange(const std::string& exchange); + + void setRoutingKey(const std::string& routingKey); + + void setQueue(const std::string& queue); + + void setReplyTimeout(const uint32 replyTimeout); + + void setHeaderMapper(const SmartPtrAmqpHeaderMapper& headerMapper); + +public: // AmqpTemplate + void send( + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper headerMapper = SmartPtrAmqpHeaderMapper()); + + void send( + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper headerMapper = SmartPtrAmqpHeaderMapper()); + + void send( + const std::string& exchange, + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper headerMapper = SmartPtrAmqpHeaderMapper()); + + SmartPtrIIntMessage receive( + SmartPtrAmqpHeaderMapper headerMapper = SmartPtrAmqpHeaderMapper()); + + SmartPtrIIntMessage receive( + const std::string& queueName, + SmartPtrAmqpHeaderMapper headerMapper = SmartPtrAmqpHeaderMapper()); + + SmartPtrIIntMessage sendAndReceive( + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper requestHeaderMapper = SmartPtrAmqpHeaderMapper(), + SmartPtrAmqpHeaderMapper responseHeaderMapper = SmartPtrAmqpHeaderMapper()); + + SmartPtrIIntMessage sendAndReceive( + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper requestHeaderMapper = SmartPtrAmqpHeaderMapper(), + SmartPtrAmqpHeaderMapper responseHeaderMapper = SmartPtrAmqpHeaderMapper()); + + SmartPtrIIntMessage sendAndReceive( + const std::string& exchange, + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper requestHeaderMapper = SmartPtrAmqpHeaderMapper(), + SmartPtrAmqpHeaderMapper responseHeaderMapper = SmartPtrAmqpHeaderMapper()); + + gpointer execute(SmartPtrExecutor executor, gpointer data); + +private: + void doSend( + AmqpClient::SmartPtrChannel channel, + const std::string& exchange, + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper headerMapper = SmartPtrAmqpHeaderMapper()); + + SmartPtrIIntMessage doSendAndReceive( + AmqpClient::SmartPtrChannel channel, + const std::string& exchange, + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper requestHeaderMapper = SmartPtrAmqpHeaderMapper(), + SmartPtrAmqpHeaderMapper responseHeaderMapper = SmartPtrAmqpHeaderMapper()); + +private: + typedef TBlockingCell SynchronousHandoff; + CAF_DECLARE_SMART_POINTER(SynchronousHandoff); + + class DefaultConsumer : public AmqpClient::Consumer { + public: + DefaultConsumer(); + virtual ~DefaultConsumer(); + + void init( + SmartPtrAmqpHeaderMapper mapper, + SmartPtrSynchronousHandoff handoff); + + void handleConsumeOk( + const std::string& consumerTag); + + void handleCancelOk( + const std::string& consumerTag); + + void handleRecoverOk( + const std::string& consumerTag); + + void handleDelivery( + const std::string& consumerTag, + const AmqpClient::SmartPtrEnvelope& envelope, + const AmqpClient::AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body); + + void handleShutdown( + const std::string& consumerTag, + SmartPtrCCafException& reason); + + private: + SmartPtrAmqpHeaderMapper _mapper; + SmartPtrSynchronousHandoff _handoff; + }; + CAF_DECLARE_SMART_POINTER(DefaultConsumer); + +private: + static std::string DEFAULT_EXCHANGE; + static std::string DEFAULT_ROUTING_KEY; + static int32 DEFAULT_REPLY_TIMEOUT; + +private: + bool _isInitialized; + std::string _exchange; + std::string _routingKey; + std::string _queue; + uint32 _replyTimeout; + SmartPtrConnectionFactory _connectionFactory; + SmartPtrConnection _connection; + SmartPtrAmqpHeaderMapper _headerMapper; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(RabbitTemplate); +}; +CAF_DECLARE_SMART_POINTER(RabbitTemplate); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/SimpleConnection.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/SimpleConnection.cpp new file mode 100644 index 000000000..e0042e5a2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/SimpleConnection.cpp @@ -0,0 +1,42 @@ +/* + * Created on: May 25, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "SimpleConnection.h" + +using namespace Caf::AmqpIntegration; + +SimpleConnection::SimpleConnection() : + CAF_CM_INIT("SimpleConnection") { +} + +SimpleConnection::~SimpleConnection() { +} + +void SimpleConnection::init(const AmqpClient::SmartPtrConnection& delegate) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_delegate); + CAF_CM_VALIDATE_SMARTPTR(delegate); + _delegate = delegate; +} + +AmqpClient::SmartPtrChannel SimpleConnection::createChannel() { + CAF_CM_FUNCNAME_VALIDATE("createChannel"); + CAF_CM_PRECOND_ISINITIALIZED(_delegate); + return _delegate->createChannel(); +} + +void SimpleConnection::close() { + CAF_CM_FUNCNAME_VALIDATE("close"); + CAF_CM_PRECOND_ISINITIALIZED(_delegate); + _delegate->close(); +} + +bool SimpleConnection::isOpen() { + return _delegate && _delegate->isOpen(); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/SimpleConnection.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/SimpleConnection.h new file mode 100644 index 000000000..8446d3bc3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/SimpleConnection.h @@ -0,0 +1,46 @@ +/* + * Created on: May 25, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_SIMPLECONNECTION_H_ +#define AMQPINTEGRATIONCORE_SIMPLECONNECTION_H_ + +#include "Connection.h" + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObjImpl + * @brief A simple object that wraps a AmqpClient::Connection and exposes + * it as an AmqpIntegration::Connection. + */ +class AMQPINTEGRATIONCORE_LINKAGE SimpleConnection : public Connection { +public: + SimpleConnection(); + virtual ~SimpleConnection(); + + /** + * @brief Initialize the object with the given AmqpClient::Connection + * @param delegate the wrapped AmqpClient::Connection + */ + void init(const AmqpClient::SmartPtrConnection& delegate); + +public: // Connection + AmqpClient::SmartPtrChannel createChannel(); + void close(); + bool isOpen(); + +private: + AmqpClient::SmartPtrConnection _delegate; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(SimpleConnection); +}; +CAF_DECLARE_SMART_POINTER(SimpleConnection); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/SimpleMessageListenerContainer.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/SimpleMessageListenerContainer.cpp new file mode 100644 index 000000000..e3830a10c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/SimpleMessageListenerContainer.cpp @@ -0,0 +1,406 @@ +/* + * Created on: Aug 1, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "SimpleMessageListenerContainer.h" +#include "DefaultAmqpHeaderMapper.h" + +using namespace Caf::AmqpIntegration; + +SimpleMessageListenerContainer::SimpleMessageListenerContainer() : + _isInitialized(false), + _isRunning(false), + _isActive(false), + _debugTrace(true), + _acknowledgeMode(ACKNOWLEDGEMODE_NONE), + _receiveTimeout(5000), + _prefetchCount(0), + _txSize(1), + _recoveryInterval(30000), + CAF_CM_INIT_LOG("SimpleMessageListenerContainer") { +} + +SimpleMessageListenerContainer::~SimpleMessageListenerContainer() { +} + +void SimpleMessageListenerContainer::init() { + init(_connectionFactory); +} + +void SimpleMessageListenerContainer::init( + SmartPtrConnectionFactory connectionFactory) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(_connectionFactory); + _connectionFactory = connectionFactory; + validateConfig(); + _isInitialized = true; + +} +void SimpleMessageListenerContainer::setAcknowledgeMode( + AcknowledgeMode acknowledgeMode) { + CAF_CM_FUNCNAME_VALIDATE("setAcknowledgeMode"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _acknowledgeMode = acknowledgeMode; +} + +void SimpleMessageListenerContainer::setPrefetchCount( + const uint32 prefetchCount) { + CAF_CM_FUNCNAME_VALIDATE("setPrefetchCount"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _prefetchCount = prefetchCount; +} + +void SimpleMessageListenerContainer::setReceiveTimeout( + const uint32 receiveTimeout) { + CAF_CM_FUNCNAME_VALIDATE("setReceiveTimeout"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_NOTZERO(receiveTimeout); + _receiveTimeout = receiveTimeout; +} + +void SimpleMessageListenerContainer::setRecoveryInterval( + const uint32 recoveryInterval) { + CAF_CM_FUNCNAME_VALIDATE("setRecoveryInterval"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_NOTZERO(recoveryInterval); + _recoveryInterval = recoveryInterval; +} + +void SimpleMessageListenerContainer::setTxSize( + const uint32 txSize) { + CAF_CM_FUNCNAME_VALIDATE("setTxSize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_NOTZERO(txSize); + _txSize = txSize; +} + +void SimpleMessageListenerContainer::setQueue( + const std::string& queue) { + CAF_CM_FUNCNAME_VALIDATE("setQueue"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(queue); + _queue = queue; +} + +void SimpleMessageListenerContainer::setConnectionFactory( + SmartPtrConnectionFactory connectionFactory) { + CAF_CM_FUNCNAME_VALIDATE("setConnectionFactory"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(connectionFactory); + _connectionFactory = connectionFactory; +} + +void SimpleMessageListenerContainer::setMessagerListener( + SmartPtrMessageListener messageListener) { + CAF_CM_FUNCNAME_VALIDATE("setMessageListener"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(messageListener); + _messageListener = messageListener; +} + +SmartPtrMessageListener SimpleMessageListenerContainer::getMessageListener() { + return _messageListener; +} + +void SimpleMessageListenerContainer::start(const uint32 timeout) { + CAF_CM_FUNCNAME("start"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_ASSERT(!_isRunning); + _isActive = true; + + CAF_CM_LOG_DEBUG_VA0("Starting Rabbit listener container"); + + _startupException.CreateInstance(); + + // There is no point in prefetching less than the transaction size because + // the consumer will stall since the broker will not receive an ack for delivered + // messages + const uint32 actualPrefetchCount = _prefetchCount > _txSize ? _prefetchCount : _txSize; + CAF_CM_LOG_DEBUG_VA3( + "Config: [prefetchCount=%d][txSize=%d][actualPrefetchCount=%d]", + _prefetchCount, + _txSize, + actualPrefetchCount); + + // At this level simply allow all headers to pass through. + // The message listener consuming the message will have + // an opportunity to filter the headers. + SmartPtrDefaultAmqpHeaderMapper headerMapper; + headerMapper.CreateInstance(); + headerMapper->init(".*"); + + _consumer.CreateInstance(); + _consumer->init( + _connectionFactory, + headerMapper, + _acknowledgeMode, + actualPrefetchCount, + _queue); + + SmartPtrAsyncMessageProcessingConsumer processor; + processor.CreateInstance(); + processor->init( + this, + _consumer, + _startupException, + timeout, + _recoveryInterval); + + _executor.CreateInstance(); + _executor->initialize(processor, processor); + _executor->execute(timeout); + + // Wait for the consumer to start or fail + const uint64 remainingTime = CDateTimeUtils::calcRemainingTime( + CDateTimeUtils::getTimeMs(), + timeout); + if (remainingTime) { + SmartPtrCCafException ex = _startupException->get(static_cast(remainingTime)); + if (ex) { + CAF_CM_LOG_CRIT_VA0("Fatal exception on listener startup"); + ex->throwAddRefedSelf(); + } + } else { + try { + _executor->cancel(timeout); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + CAF_CM_EXCEPTIONEX_VA0( + TimeoutException, + 0, + "The timeout value specified is not int32 enough to determine " + "if the consumer has started. Increase the timeout value."); + } + + _startupException = NULL; + _isRunning = true; +} + +void SimpleMessageListenerContainer::stop(const uint32 timeout) { + CAF_CM_FUNCNAME("stop"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _isActive = false; + if (_isRunning) { + try { + _executor->cancel(timeout); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + } + _isRunning = false; +} + +bool SimpleMessageListenerContainer::isRunning() const { + CAF_CM_FUNCNAME_VALIDATE("isRunning"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _isRunning; +} + +void SimpleMessageListenerContainer::validateConfig() { + CAF_CM_FUNCNAME_VALIDATE("validateConfig"); + CAF_CM_VALIDATE_INTERFACE(_connectionFactory); + CAF_CM_VALIDATE_INTERFACE(_messageListener); + CAF_CM_VALIDATE_STRING(_queue); + CAF_CM_VALIDATE_NOTZERO(_receiveTimeout); + CAF_CM_VALIDATE_NOTZERO(_recoveryInterval); + CAF_CM_VALIDATE_NOTZERO(_txSize); +} + +bool SimpleMessageListenerContainer::isActive() { + return _isActive; +} + +bool SimpleMessageListenerContainer::receiveAndExecute( + SmartPtrBlockingQueueConsumer consumer) { + CAF_CM_FUNCNAME("receiveAndExecute"); + AmqpClient::SmartPtrChannel channel = _consumer->getChannel(); + for (uint32 i = 0; i < _txSize; ++i) { + if (_debugTrace) { + CAF_CM_LOG_DEBUG_VA0("Waiting for message from consumer"); + } + SmartPtrIIntMessage message = _consumer->nextMessage(_receiveTimeout); + if (!message) { + break; + } + + try { + executeListener(channel, message); + } + CAF_CM_CATCH_ALL; + if (CAF_CM_ISEXCEPTION) { + SmartPtrCCafException ex = CAF_CM_GETEXCEPTION; + CAF_CM_CLEAREXCEPTION; + _consumer->rollbackOnExceptionIfNecessary(ex); + ex->throwAddRefedSelf(); + } + } + + return _consumer->commitIfNecessary(); +} + +void SimpleMessageListenerContainer::executeListener( + AmqpClient::SmartPtrChannel channel, + SmartPtrIIntMessage message) { + doInvokeListener(message); +} + +void SimpleMessageListenerContainer::doInvokeListener( + SmartPtrIIntMessage message) { + CAF_CM_FUNCNAME("doInvokeListener"); + try { + _messageListener->onMessage(message); + } catch (ListenerExecutionFailedException *ex) { + // noop - let 'er rip + ex->throwSelf(); + } + CAF_CM_CATCH_ALL; + if (CAF_CM_ISEXCEPTION) { + const std::string orig = CAF_CM_EXCEPTION_GET_FULLMSG; + CAF_CM_CLEAREXCEPTION; + CAF_CM_EXCEPTIONEX_VA1( + ListenerExecutionFailedException, + 0, + "Listener threw exception: %s", + orig.c_str()); + } +} + +void SimpleMessageListenerContainer::restart() { + CAF_CM_FUNCNAME_VALIDATE("restart"); + CAF_CM_LOG_DEBUG_VA0("Restarting Rabbit listener container"); + _isRunning = false; + start(30000); +} + +#if (1) // AsyncMessageProcessingConsumer +SimpleMessageListenerContainer::AsyncMessageProcessingConsumer::AsyncMessageProcessingConsumer() : + _parent(NULL), + _timeout(0), + _recoveryInterval(0), + _isCanceled(false), + CAF_CM_INIT_LOG("SimpleMessageListenerContainer::AsyncMessageProcessingConsumer") { +} + +SimpleMessageListenerContainer::AsyncMessageProcessingConsumer::~AsyncMessageProcessingConsumer() { +} + +void SimpleMessageListenerContainer::AsyncMessageProcessingConsumer::init( + SimpleMessageListenerContainer *parent, + SmartPtrBlockingQueueConsumer consumer, + SmartPtrStartupExceptionHandoff startupException, + const uint32 timeout, + const uint32 recoveryInterval) { + _parent = parent; + _consumer = consumer; + _startupException = startupException; + _timeout = timeout; + _recoveryInterval = recoveryInterval; +} + +void SimpleMessageListenerContainer::AsyncMessageProcessingConsumer::run() { + CAF_CM_FUNCNAME("run"); + bool isAborted = false; + + try { + try { + _consumer->start(_timeout); + _startupException->set(NULL); + _startupException = NULL; + } catch (FatalListenerStartupException *ex) { + ex->throwSelf(); + } + CAF_CM_CATCH_ALL; + if (CAF_CM_ISEXCEPTION) { + _startupException->set(NULL); + _startupException = NULL; + CAF_CM_LOG_ERROR_CAFEXCEPTION; + handleStartupFailure(); + CAF_CM_THROWEXCEPTION; + } + + bool isContinuable = false; + while (!_isCanceled && (_parent->isActive() || isContinuable)) { + try { + isContinuable = _parent->receiveAndExecute(_consumer); + } catch (ListenerExecutionFailedException *ex) { + // ignore + _logger.log( + log4cpp::Priority::ERROR, + _cm_funcName_, + __LINE__, + ex); + ex->Release(); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_ERROR_CAFEXCEPTION; + CAF_CM_THROWEXCEPTION; + } + } catch (FatalListenerStartupException *ex) { + CAF_CM_LOG_ERROR_VA1( + "Consumer received fatal exception on startup: %s", + ex->getFullMsg().c_str()); + ex->Release(); + isAborted = true; + } + CAF_CM_CATCH_ALL; + if (CAF_CM_ISEXCEPTION) { + CAF_CM_LOG_WARN_VA1( + "Consumer raised exception. Processing will restart if the connection " + "factory supports it. Exception: %s", + (CAF_CM_EXCEPTION_GET_FULLMSG).c_str()); + CAF_CM_CLEAREXCEPTION; + } + + if (_startupException) { + _startupException->set(NULL); + _startupException = NULL; + } + + if (_isCanceled) { + CAF_CM_LOG_DEBUG_VA0("Canceling due to TaskContainer->cancel()"); + } else { + if (!_parent->isActive() || isAborted) { + CAF_CM_LOG_DEBUG_VA0("Canceling consumer"); + try { + _consumer->stop(_timeout); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_ERROR_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + + if (isAborted) { + CAF_CM_LOG_INFO_VA0("Stopping parent container because of aborted consumer"); + _parent->stop(_timeout); + } + } else { + CAF_CM_LOG_INFO_VA0("Restarting consumer"); + _parent->restart(); + } + } +} + +void SimpleMessageListenerContainer::AsyncMessageProcessingConsumer::cancel() { + _isCanceled = true; +} + +void SimpleMessageListenerContainer::AsyncMessageProcessingConsumer::handleError( + const SmartPtrIThrowable& throwable, + const SmartPtrIIntMessage& message) const { +} + +void SimpleMessageListenerContainer::AsyncMessageProcessingConsumer::handleStartupFailure() { + uint64 start = CDateTimeUtils::getTimeMs(); + while (!_isCanceled && CDateTimeUtils::calcRemainingTime(start, _recoveryInterval)) { + CThreadUtils::sleep(100); + } +} +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/SimpleMessageListenerContainer.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/SimpleMessageListenerContainer.h new file mode 100644 index 000000000..c062d5e78 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/SimpleMessageListenerContainer.h @@ -0,0 +1,155 @@ +/* + * Created on: Aug 1, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef SIMPLEMESSAGELISTENERCONTAINER_H_ +#define SIMPLEMESSAGELISTENERCONTAINER_H_ + +#include "ConnectionFactory.h" +#include "BlockingQueueConsumer.h" +#include "MessageListener.h" + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObjImpl + * @brief A simple message listener used by channels to retrieve messages + *

+ * This container manages message acknowledgment, broker connection recoverability and + * other aspects of consuming from queues. + */ +class AMQPINTEGRATIONCORE_LINKAGE SimpleMessageListenerContainer : + public ILifecycle { +public: + SimpleMessageListenerContainer(); + virtual ~SimpleMessageListenerContainer(); + + /** + * @brief initialize the object + */ + void init(); + + /** + * @brief initialize the object + * @param connectionFactory the ConnectionFactory + */ + void init( + SmartPtrConnectionFactory connectionFactory); + +public: + /** + * @brief Set the message acknowledgment mode + * @param acknowledgeMode acknowledgment mode + */ + void setAcknowledgeMode(AcknowledgeMode acknowledgeMode); + + void setPrefetchCount(const uint32 prefetchCount); + + void setReceiveTimeout(const uint32 receiveTimeout); + + void setRecoveryInterval(const uint32 recoveryInterval); + + void setTxSize(const uint32 txSize); + + void setQueue(const std::string& queue); + + void setConnectionFactory(SmartPtrConnectionFactory connectionFactory); + + void setMessagerListener(SmartPtrMessageListener messageListener); + + SmartPtrMessageListener getMessageListener(); + +public: // ILifecycle + void start(const uint32 timeoutMs); + + void stop(const uint32 timeoutMs); + + bool isRunning() const; + +private: + void validateConfig(); + + bool isActive(); + + bool receiveAndExecute(SmartPtrBlockingQueueConsumer consumer); + + void executeListener( + AmqpClient::SmartPtrChannel channel, + SmartPtrIIntMessage message); + + void doInvokeListener( + SmartPtrIIntMessage message); + + void restart(); + +private: + typedef TBlockingCell StartupExceptionHandoff; + CAF_DECLARE_SMART_POINTER(StartupExceptionHandoff); + +private: + class AsyncMessageProcessingConsumer : + public IRunnable, + public IErrorHandler { + public: + AsyncMessageProcessingConsumer(); + ~AsyncMessageProcessingConsumer(); + void init( + SimpleMessageListenerContainer *parent, + SmartPtrBlockingQueueConsumer consumer, + SmartPtrStartupExceptionHandoff startupException, + const uint32 timeout, + const uint32 recoveryInterval); + void run(); + void cancel(); + void handleError( + const SmartPtrIThrowable& throwable, + const SmartPtrIIntMessage& message) const; + + private: + void handleStartupFailure(); + + private: + SimpleMessageListenerContainer *_parent; + SmartPtrBlockingQueueConsumer _consumer; + SmartPtrStartupExceptionHandoff _startupException; + uint32 _timeout; + uint32 _recoveryInterval; + bool _isCanceled; + + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(AsyncMessageProcessingConsumer); + }; + CAF_DECLARE_SMART_POINTER(AsyncMessageProcessingConsumer); + +private: + bool _isInitialized; + volatile bool _isRunning; + volatile bool _isActive; + bool _debugTrace; + SmartPtrBlockingQueueConsumer _consumer; + SmartPtrCSimpleAsyncTaskExecutor _executor; + SmartPtrStartupExceptionHandoff _startupException; + + SmartPtrConnectionFactory _connectionFactory; + SmartPtrMessageListener _messageListener; + std::string _queue; + AcknowledgeMode _acknowledgeMode; + uint32 _receiveTimeout; + uint32 _prefetchCount; + uint32 _txSize; + uint32 _recoveryInterval; + + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(SimpleMessageListenerContainer); +}; +CAF_DECLARE_SMART_POINTER(SimpleMessageListenerContainer); + +}} + +#endif /* SIMPLEMESSAGELISTENERCONTAINER_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/amqpIntegrationCoreLink.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/amqpIntegrationCoreLink.h new file mode 100644 index 000000000..c28b14912 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/amqpIntegrationCoreLink.h @@ -0,0 +1,58 @@ +/* + * Created on: Jun 12, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORELINK_H_ +#define AMQPINTEGRATIONCORELINK_H_ + +#ifndef AMQPINTEGRATIONCORE_LINKAGE + #ifdef WIN32 + #ifdef AMQP_CLIENT + #define AMQPINTEGRATIONCORE_LINKAGE __declspec(dllexport) + #else + #define AMQPINTEGRATIONCORE_LINKAGE __declspec(dllimport) + #endif + #else + #define AMQPINTEGRATIONCORE_LINKAGE + #endif +#endif + +#include "../amqpClient/api/amqpClient.h" +#include "Exchange.h" +#include "ExchangeImpl.h" +#include "Queue.h" +#include "QueueImpl.h" +#include "Binding.h" +#include "BindingImpl.h" +#include "ExchangeInternal.h" +#include "QueueInternal.h" +#include "BindingInternal.h" +#include "AbstractConnectionFactory.h" +#include "AmqpAdmin.h" +#include "AmqpHeaderMapper.h" +#include "AmqpIntegrationCoreDefines.h" +#include "AmqpIntegrationCoreFunc.h" +#include "AmqpIntegrationExceptions.h" +#include "AmqpMessageListenerSource.h" +#include "AmqpOutboundEndpoint.h" +#include "AmqpTemplate.h" +#include "AutoChannelClose.h" +#include "BlockingQueueConsumer.h" +#include "CachingConnectionFactory.h" +#include "Connection.h" +#include "ConnectionFactory.h" +#include "ConnectionListener.h" +#include "ConnectionProxy.h" +#include "DefaultAmqpHeaderMapper.h" +#include "HeaderUtils.h" +#include "MessageListener.h" +#include "RabbitAdmin.h" +#include "RabbitTemplate.h" +#include "SimpleConnection.h" +#include "SimpleMessageListenerContainer.h" + +#endif /* AMQPINTEGRATIONCORELINK_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/stdafx.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/stdafx.h new file mode 100644 index 000000000..9fb09f85c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/stdafx.h @@ -0,0 +1,27 @@ +/* + * Created on: Jun 12, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifndef AMQPINTEGRATIONCORE_LINKAGE +#ifdef WIN32 +#define AMQPINTEGRATIONCORE_LINKAGE __declspec(dllexport) +#else +#define AMQPINTEGRATIONCORE_LINKAGE +#endif +#endif + +#include +#include +#include "../amqpClient/api/amqpClient.h" +#include "AmqpIntegrationCoreFunc.h" +#include "AmqpIntegrationCoreDefines.h" +#include "AmqpIntegrationExceptions.h" + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpListener/src/AmqpListenerWorker.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpListener/src/AmqpListenerWorker.cpp new file mode 100644 index 000000000..67def663a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpListener/src/AmqpListenerWorker.cpp @@ -0,0 +1,100 @@ +/* + * Created on: Aug 20, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ +// NOTE: windows.h defines macros for min and max. Specifying NOMINMAX to prevent +// macro definition. Must be specified before windows.h is included. +#define NOMINMAX + +#include "stdafx.h" +#include "AmqpListenerWorker.h" + +using namespace Caf; + +AmqpListenerWorker::AmqpListenerWorker() : + CAF_CM_INIT_LOG("AmqpListenerWorker") { + CAF_THREADSIGNAL_INIT; + _stopSignal.initialize("AmqpListenerWorker::stopSignal"); +} + +AmqpListenerWorker::~AmqpListenerWorker() { +} + +void AmqpListenerWorker::doWork() { + CAF_CM_FUNCNAME("run"); + + uint32 intShutdownTimeout = AppConfigUtils::getOptionalUint32( + "communication_amqp", + "shutdown_timeout"); + intShutdownTimeout = std::max(intShutdownTimeout, static_cast(5000)); + + SmartPtrCIntegrationAppContext intAppContext; + try { + CLoggingUtils::setStartupConfigFile( + AppConfigUtils::getRequiredString(_sAppConfigGlobalParamLogConfigFile)); + CLoggingUtils::setLogDir( + AppConfigUtils::getRequiredString(_sAppConfigGlobalParamLogDir)); + + uint32 intStartupTimeout = AppConfigUtils::getOptionalUint32( + "communication_amqp", + "startup_timeout"); + intStartupTimeout = std::max(intStartupTimeout, static_cast(5000)); + + uint32 connectionRetryInterval = AppConfigUtils::getOptionalUint32( + "communication_amqp", + "connection_retry_interval"); + connectionRetryInterval = std::max(connectionRetryInterval, static_cast(5000)); + + bool isSignaled = false; + do { + try { + CAF_CM_LOG_DEBUG_VA0("***** Initializing context"); + intAppContext.CreateInstance(); + intAppContext->initialize( + intStartupTimeout, + AppConfigUtils::getRequiredString("communication_amqp", "context_file")); + CAF_CM_LOG_DEBUG_VA0("***** Started. Waiting for stop signal."); + { + CAF_THREADSIGNAL_LOCK_UNLOCK; + _stopSignal.wait(CAF_THREADSIGNAL_MUTEX, 0); + } + CAF_CM_LOG_DEBUG_VA0("***** Received stop signal."); + break; + } catch (AmqpClient::AmqpExceptions::AmqpTimeoutException *ex) { + _logger.log( + log4cpp::Priority::WARN, + _cm_funcName_, + __LINE__, + ex); + ex->Release(); + CThreadUtils::sleep(connectionRetryInterval); + } + CAF_CM_CATCH_ALL; + CAF_CM_THROWEXCEPTION; + { + CAF_THREADSIGNAL_LOCK_UNLOCK; + isSignaled = _stopSignal.waitOrTimeout(CAF_THREADSIGNAL_MUTEX, 100); + } + } while (!isSignaled); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + + try { + if (intAppContext) { + intAppContext->terminate(intShutdownTimeout); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_THROWEXCEPTION; +} + +void AmqpListenerWorker::stopWork() { + CAF_CM_FUNCNAME_VALIDATE("stop"); + CAF_CM_LOG_DEBUG_VA0("***** Setting stop signal."); + _stopSignal.signal(); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpListener/src/AmqpListenerWorker.h b/open-vm-tools/common-agent/Cpp/Communication/amqpListener/src/AmqpListenerWorker.h new file mode 100644 index 000000000..22f513002 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpListener/src/AmqpListenerWorker.h @@ -0,0 +1,34 @@ +/* + * Created on: Aug 20, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AmqpListenerWorker_h +#define AmqpListenerWorker_h + +namespace Caf { + +class AmqpListenerWorker : + public IWork +{ +public: + AmqpListenerWorker(); + virtual ~AmqpListenerWorker(); + + void doWork(); + void stopWork(); + +private: + CThreadSignal _stopSignal; + CAF_THREADSIGNAL_CREATE; + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(AmqpListenerWorker); +}; +CAF_DECLARE_SMART_POINTER(AmqpListenerWorker); +} + +#endif /* AmqpListenerWorker_h */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpListener/src/CWinService.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpListener/src/CWinService.cpp new file mode 100644 index 000000000..cdd15e444 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpListener/src/CWinService.cpp @@ -0,0 +1,301 @@ +/* + * Author: bwilliams + * Created: June 25, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CWinService.h" +#include + +bool CWinService::s_isInitialized = false; +SmartPtrCWinServiceState CWinService::s_winServiceState; +SmartPtrCWinServiceInstance CWinService::s_winServiceInstance; + +//////////////////////////////////////////////////////////////////////// +// +// controlHandler() +// +// Handler for the break event when running in console mode +// +//////////////////////////////////////////////////////////////////////// +BOOL WINAPI controlHandler( + DWORD dwCtrlType) { + CAF_CM_STATIC_FUNC_LOG("CWinService", "controlHandler"); + + try { + switch(dwCtrlType) { + case CTRL_BREAK_EVENT: // use Ctrl+C or Ctrl+Break to simulate + case CTRL_C_EVENT: // SERVICE_CONTROL_STOP in debug mode + CAF_CM_LOG_DEBUG_VA0("Received Ctrl+C or Ctrl+Break... Stopping the service"); + CWinService::s_winServiceState->signalServiceStop(); + return TRUE; + break; + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + const BOOL rc = (CAF_CM_ISEXCEPTION) ? FALSE : TRUE; + CAF_CM_CLEAREXCEPTION; + + return rc; +} + +uint32 __stdcall Caf::serviceWorkerThreadFunc( + void* pThreadContext) { + CAF_CM_STATIC_FUNC_LOG("CWinService", "serviceWorkerThreadFunc"); + + try { + // Bring the thread into the correct scope + CWinService::s_winServiceInstance->runWorkerThread(); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + const uint32 rc = (CAF_CM_ISEXCEPTION) ? -1 : 0; + CAF_CM_CLEAREXCEPTION; + + return rc; +} + +void CWinService::initialize( + const SmartPtrIWork& work) { + CAF_CM_STATIC_FUNC_LOG("CWinService", "initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(s_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(work); + + s_winServiceState.CreateInstance(); + s_winServiceState->initialize( + "VMwareCAFCommAmqpListener", + "VMware CAF AMQP Communication Service", + "VMware Common Agent AMQP Communication Service", + work); + + s_winServiceInstance.CreateInstance(); + s_winServiceInstance->initialize(s_winServiceState); + s_isInitialized = true; + } + CAF_CM_EXIT; +} + +void CWinService::execute( + int32 argc, + char** argv) { + CAF_CM_STATIC_FUNC_LOG("CWinService", "execute"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(s_isInitialized); + + // Figure out what to do based on the optional command line argument + const CWinServiceInstance::SCommandLineParams commandLineParams = + s_winServiceInstance->processCommandLine(argc, argv); + switch (commandLineParams._eMode) { + case CWinServiceInstance::EModeRunAsService: + CAF_CM_LOG_DEBUG_VA0("Running the service"); + run(); + break; + + case CWinServiceInstance::EModeRunAsConsole: + CAF_CM_LOG_DEBUG_VA0("Running as console"); + runAsConsole(); + break; + + case CWinServiceInstance::EModeRegister: { + CAF_CM_LOG_DEBUG_VA0("Installing the service"); + const std::string currentFile = FileSystemUtils::getCurrentFile(); + s_winServiceInstance->install(currentFile); + } + break; + + case CWinServiceInstance::EModeUnregister: + CAF_CM_LOG_DEBUG_VA0("Uninstalling the service"); + s_winServiceInstance->uninstall(); + break; + + default: + std::string cmdLine; + for (int32 index = 0; index < argc; index++) { + cmdLine += argv[index]; + cmdLine += " "; + } + CAF_CM_EXCEPTIONEX_VA2( + InvalidHandleException, E_FAIL, + "Invalid mode returned from processCommandLine - Mode: %d, cmdLine: %s", + static_cast(commandLineParams._eMode), cmdLine.c_str()); + break; + } + } + CAF_CM_EXIT; +} + +void CWinService::run() { + CAF_CM_STATIC_FUNC_LOG("CWinService", "run"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(s_isInitialized); + + const std::string serviceName = s_winServiceState->getServiceName(); + + // build the table of Services in this exe, name and the address of the + // Service's main function terminated by NULL's + SERVICE_TABLE_ENTRYA stbl[] = + { + { + const_cast(serviceName.c_str()), + reinterpret_cast(CWinService::serviceMain) + }, + { + NULL, + NULL + } + }; + + // call the SCM. We have 30 seconds to execute this call. If it fails to + // execute within that time, the SCM will assume that something is wrong + // and terminate this process... + if (::StartServiceCtrlDispatcherA(stbl) == FALSE) { + const DWORD lastError = ::GetLastError(); + const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(lastError); + CAF_CM_EXCEPTION_VA2(lastError, "::StartServiceCtrlDispatcher() Failed - serviceName: \"%s\", msg: \"%s\"", + serviceName.c_str(), errorMsg.c_str()); + } + } + CAF_CM_EXIT; +} + +void CWinService::runAsConsole() { + CAF_CM_STATIC_FUNC_LOG("CWinService", "runAsConsole"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(s_isInitialized); + + ::SetConsoleCtrlHandler(controlHandler, TRUE); + + CWinService::s_winServiceState->putIsService(false); + CWinService::serviceMain(0, NULL); + } + CAF_CM_EXIT; +} + +void CALLBACK CWinService::serviceMain( + const DWORD cdwArgc, + LPCWSTR* plpwszArgv) { + CAF_CM_STATIC_FUNC_LOG("CWinService", "serviceMain"); + + try { + // This is a new thread from the SCM + CafInitialize::init(); + + CAF_CM_PRECOND_ISINITIALIZED(s_isInitialized); + + const std::string serviceName = s_winServiceState->getServiceName(); + + // Register our handler routine with the SCM. + // The function that we are registering will be called when certain + // events occur like : starting, stopping, pausing this Service + if (s_winServiceState->getIsService()) { + const SERVICE_STATUS_HANDLE serviceHandle = ::RegisterServiceCtrlHandlerExA( + serviceName.c_str(), CWinService::scmHandlerEx, NULL); + if (! serviceHandle) { + const DWORD lastError = ::GetLastError(); + const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(lastError); + CAF_CM_EXCEPTION_VA2(lastError, "::RegisterServiceCtrlHandlerEx() Failed - serviceName: \"%s\", msg: \"%s\"", + serviceName.c_str(), errorMsg.c_str()); + } + + s_winServiceState->putServiceHandle(serviceHandle); + } + + // Let the SCM know that the service is starting. + s_winServiceState->putCurrentServiceState(SERVICE_START_PENDING); + if (s_winServiceState->getIsService()) { + s_winServiceState->setStatus(); + } + + // Creates the worker thread. + createWorkerThread(); + + // Runs the Service + s_winServiceInstance->runService(); + + // Let the SCM know that we've stopped. + s_winServiceState->putCurrentServiceState(SERVICE_STOPPED); + if (s_winServiceState->getIsService()) { + s_winServiceState->setStatus(); + } + + // Close all of the handles. + s_winServiceState->close(); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + + CafInitialize::term(); +} + +DWORD CWinService::scmHandlerEx( + DWORD dwCommand, + DWORD dwEventType, + LPVOID lpEventData, + LPVOID lpContext) { + CAF_CM_STATIC_FUNC_LOG("CWinService", "scmHandlerEx"); + + try { + CAF_CM_PRECOND_ISINITIALIZED(s_isInitialized); + + switch(dwCommand) { + case SERVICE_CONTROL_STOP: + case SERVICE_CONTROL_SHUTDOWN: + case SERVICE_CONTROL_POWEREVENT: { + CAF_CM_LOG_INFO_VA0("Caught stop, shutdown or power event"); + + // Let the SCM know that we're in the process of stopping. + s_winServiceState->putCurrentServiceState(SERVICE_STOP_PENDING); + s_winServiceState->setStatus(); + + // Signal the event that tells us to stop. + s_winServiceState->signalServiceStop(); + } + break; + + case SERVICE_CONTROL_INTERROGATE: { + CAF_CM_LOG_INFO_VA0("Caught interrogate event"); + + // Let the SCM know our current state. + s_winServiceState->setStatus(); + } + break; + default: + CAF_CM_LOG_WARN_VA1("Unhandled command - %d", dwCommand); + break; + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + + return NO_ERROR; +} + +void CWinService::createWorkerThread() { + CAF_CM_STATIC_FUNC_LOG("CWinService", "createWorkerThread"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(s_isInitialized); + + // Create the thread. + uint32 uiThreadAddress = 0; + UINT_PTR uipRc = ::_beginthreadex(NULL, 0, ::serviceWorkerThreadFunc, NULL, 0, &uiThreadAddress); + if (0 == uipRc) { + const DWORD lastError = ::GetLastError(); + const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(lastError); + CAF_CM_EXCEPTION_VA1(lastError, "::_beginthreadex() Failed - msg: \"%s\"", + errorMsg.c_str()); + } + } + CAF_CM_EXIT; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpListener/src/CWinService.h b/open-vm-tools/common-agent/Cpp/Communication/amqpListener/src/CWinService.h new file mode 100644 index 000000000..abfd6939b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpListener/src/CWinService.h @@ -0,0 +1,68 @@ +/* + * Author: bwilliams + * Created: June 25, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CWinService_h_ +#define CWinService_h_ + +namespace Caf { + +class CWinService { +public: + /// Initializes the static service class. + static void initialize( + const SmartPtrIWork& work); + + /// Parses the command line and executes the server + static void execute(int32 argc, char** argv); + +private: + /// Spawns the worker thread to run the service + static void run(); + + /// Runs the service in console mode for debugging + static void runAsConsole(); + +private: + /// Each Service (there can be more than one) exposes its own main function + /// This function's pointer was passed into the SCM in the run method + /// For each of these main functions the SCM will create a thread. + static void CALLBACK serviceMain( + const DWORD cdwArgc, + LPCWSTR* plpwszArgv); + + /// Notification callback function for the SCM that's called when the state of + /// the Service must be changed. + static DWORD CALLBACK scmHandlerEx( + DWORD dwCommand, + DWORD dwEventType, + LPVOID lpEventData, + LPVOID lpContext ); + +private: + // Creates the service's main working thread which performs the work of this service. + static void createWorkerThread(); + +private: + /// When CWinService::createWorkerThread() creates the helper-thread, + /// it calls this global function. This function simply redirects the thread + /// back into the main class. + friend uint32 __stdcall serviceWorkerThreadFunc( + void* pThreadContext); + +public: + static bool s_isInitialized; + static SmartPtrCWinServiceState s_winServiceState; + static SmartPtrCWinServiceInstance s_winServiceInstance; + +private: + CAF_CM_DECLARE_NOCREATE(CWinService); +}; + +} + +#endif // #ifndef CWinService_h_ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpListener/src/amqpListenerMain.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpListener/src/amqpListenerMain.cpp new file mode 100644 index 000000000..447bfe509 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpListener/src/amqpListenerMain.cpp @@ -0,0 +1,170 @@ +/* + * Created on: Aug 20, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#ifndef WIN32 +#include +#endif +#include "AmqpListenerWorker.h" + +bool _gDaemonized = true; +bool _gSysLogInfos = false; +SmartPtrAmqpListenerWorker _gAmqpListenerWorker; + +using namespace Caf; + +#ifndef WIN32 +extern "C" void TermHandler(int32 signum); +#endif + +int32 main(int32 argc, char** argv) { + HRESULT hr = CafInitialize::init(); + if (hr != S_OK) { +#ifndef WIN32 + ::syslog(LOG_ERR, "CommAmqpListener: CafInitialize::init() failed 0x%08X.", hr); +#endif + ::fprintf(stderr, "CommAmqpListener: CafInitialize::init() failed 0x%08X\n", hr); + return 1; + } + + CafInitialize::serviceConfig(); + + CAF_CM_STATIC_FUNC_LOG( "CommAmqpListener", "main" ); + SmartPtrIAppConfig appConfig; + try { + std::string appConfigEnv; + CEnvironmentUtils::readEnvironmentVar("CAF_APPCONFIG", appConfigEnv); + if (appConfigEnv.empty()) { + Cdeqstr deqstr; + deqstr.push_back("cafenv-appconfig"); + deqstr.push_back("persistence-appconfig"); + deqstr.push_back("CommAmqpListener-appconfig"); + deqstr.push_back("custom-appconfig"); + appConfig = getAppConfig(deqstr); + } else { + appConfig = getAppConfig(); + } + } catch(CCafException *ex) { +#ifndef WIN32 + ::syslog( + LOG_ERR, + "CommAmqpListener: getAppConfig() failed . %s", + ex->getFullMsg().c_str()); +#endif + ::fprintf( + stderr, + "CommAmqpListener: getAppConfig() failed . %s\n", + ex->getFullMsg().c_str()); + ex->Release(); + } catch (std::exception ex) { +#ifndef WIN32 + ::syslog( + LOG_ERR, + "CommAmqpListener: getAppConfig() failed . %s", + ex.what()); +#endif + ::fprintf( + stderr, + "CommAmqpListener: getAppConfig() failed . %s\n", + ex.what()); + } catch (...) { +#ifndef WIN32 + ::syslog( + LOG_ERR, + "CommAmqpListener: getAppConfig() failed . unknown exception"); +#endif + ::fprintf( + stderr, + "CommAmqpListener: getAppConfig() failed . unknown exception\n"); + } + + if (!appConfig) { + CafInitialize::term(); + return 1; + } + + int32 iRc = 0; + + try { + _gAmqpListenerWorker.CreateInstance(); + +#ifdef WIN32 + CWinService::initialize(_gAmqpListenerWorker); + CWinService::execute(argc, argv); +#else + Cdeqstr parts = CStringUtils::split(argv[0], G_DIR_SEPARATOR); + std::string procName = "CommAmqpListener"; + if (parts.size()) { + procName = parts.back(); + } + + CDaemonUtils::MakeDaemon( + argc, + argv, + procName.c_str(), + TermHandler, + _gDaemonized, + _gSysLogInfos); + + CLoggingUtils::setStartupConfigFile( + AppConfigUtils::getRequiredString(_sAppConfigGlobalParamLogConfigFile)); + CLoggingUtils::setLogDir( + AppConfigUtils::getRequiredString(_sAppConfigGlobalParamLogDir)); + + _gAmqpListenerWorker->doWork(); +#endif + } + CAF_CM_CATCH_CAF + CAF_CM_CATCH_DEFAULT + CAF_CM_LOG_CRIT_CAFEXCEPTION; + + if (CAF_CM_ISEXCEPTION) { + const std::string msg = CAF_CM_EXCEPTION_GET_FULLMSG; +#ifndef WIN32 + ::syslog( + LOG_ERR, + "CommAmqpListener: %s", + msg.c_str()); +#endif + + ::fprintf( + stderr, + "CommAmqpListener: %s\n", + msg.c_str()); + iRc = 1; + } + CAF_CM_CLEAREXCEPTION; + _gAmqpListenerWorker = NULL; + CafInitialize::term(); + return iRc; +} + +extern "C" void TermHandler(int32 signum) { + CAF_CM_STATIC_FUNC_LOG_ONLY( "CommAmqpListener", "TermHandler" ); + + CAF_CM_ENTER { + switch (signum) { + case SIGTERM: + CAF_CM_LOG_INFO_VA0( "Received SIGTERM" ); + if (_gAmqpListenerWorker) { + _gAmqpListenerWorker->stopWork(); + } + break; + case SIGINT: + CAF_CM_LOG_INFO_VA0( "Received SIGINT" ); + if (_gAmqpListenerWorker) { + _gAmqpListenerWorker->stopWork(); + } + break; + default: + CAF_CM_LOG_ERROR_VA1( "Ignoring Unexpected signal %d", signum); + break; + } + } + CAF_CM_EXIT; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpListener/src/commAmqpListener-context.xml b/open-vm-tools/common-agent/Cpp/Communication/amqpListener/src/commAmqpListener-context.xml new file mode 100644 index 000000000..d189a4658 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpListener/src/commAmqpListener-context.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpListener/src/commAmqpListener.config b/open-vm-tools/common-agent/Cpp/Communication/amqpListener/src/commAmqpListener.config new file mode 100644 index 000000000..3510b2171 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpListener/src/commAmqpListener.config @@ -0,0 +1,33 @@ +[globals] +root_dir=/Users/mdonahue/src/vcm/common-agent/main/Cpp/Subsystems/Communication/src/services/amqpListener +data_dir=${root_dir}/data +log_dir=${root_dir}/log +log_config_file=${root_dir}/log4cpp_config +thread_stack_size_kb=0 + +[app] +startup-timeout=30000 +shutdown-timeout=30000 +context-file=${root_dir}/commAmqpListener-context.xml + +[amqp] +broker=127.0.0.1 +vhost=caf +connection_timeout=5000 +connection_retry_interval=5000 +channel_cache_size=4 +reply_timeout=5000 + +[subsystems] +# INTEGRATION SYSTEM BEANS +com.vmware.commonagent.integration.objectfactory=IntegrationSubsys +com.vmware.commonagent.integration.channels.errorchannel=IntegrationSubsys +com.vmware.commonagent.integration.channels.nullchannel=IntegrationSubsys +com.vmware.caf.comm.integration.objectfactory=CommIntegration +com.vmware.caf.comm.integration.replytoresolver=CommIntegration +com.vmware.caf.comm.integration.eventtopiccalculator=CommIntegration + +# Amqp Listener Context Beans +com.vmware.caf.comm.integration.amqp.caching.connection.factory=CommAmqpIntegration +com.vmware.caf.comm.integration.objects=CommAmqpIntegration +com.vmware.commonagent.integration.headerexpressioninvoker=IntegrationSubsys diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpListener/src/log4cpp_config b/open-vm-tools/common-agent/Cpp/Communication/amqpListener/src/log4cpp_config new file mode 100644 index 000000000..b3fd9c006 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpListener/src/log4cpp_config @@ -0,0 +1,17 @@ +#log4j.rootCategory=DEBUG, console, file +log4j.rootCategory=DEBUG, file + +#log4j.category.CApplicationContext=INFO +log4j.category.CIntegrationAppContext=DEBUG +log4j.category.CSqliteTableImpl=INFO +log4j.category.CSqliteUtil=INFO +log4j.category.CSqliteConnection=INFO + +log4j.appender.console=org.apache.log4j.ConsoleAppender +log4j.appender.console.layout=org.apache.log4j.PatternLayout +log4j.appender.console.layout.ConversionPattern=%p|%d{ISO8601}|%t|%c|%m%n + +log4j.appender.file=org.apache.log4j.FileAppender +log4j.appender.file.fileName=log4cpp_file.log +log4j.appender.file.layout=org.apache.log4j.PatternLayout +log4j.appender.file.layout.ConversionPattern=%p|%d{ISO8601}|%t|%c|%m%n diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpListener/src/run-macos.sh b/open-vm-tools/common-agent/Cpp/Communication/amqpListener/src/run-macos.sh new file mode 100644 index 000000000..38db4a2db --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpListener/src/run-macos.sh @@ -0,0 +1,8 @@ +#!/bin/sh +LIB_BASE=$HOME/src/vcm/common-agent/main/Cpp +LIB_DIR=lib/mac64 +TOOLCHAIN=$HOME/toolchain/mac64 +LOG4CPP_LIB=$TOOLCHAIN/log4cpp-1.0/lib +export DYLD_LIBRARY_PATH=$LIB_BASE/Base/$LIB_DIR:$LIB_BASE/Common/$LIB_DIR:$LOG4CPP_LIB:$LIB_BASE/Subsystems/Integration/$LIB_DIR:$LIB_BASE/Subsystems/Communication/$LIB_DIR:$LIB_BASE/Subsystems/Communication/vmcfsdk/lib/mac64 +export CAF_APPCONFIG=$HOME/src/vcm/common-agent/main/Cpp/Subsystems/Communication/src/services/amqpListener/commAmqpListener.config +./Release_mac64/CommAmqpListener -n diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpListener/src/stdafx.h b/open-vm-tools/common-agent/Cpp/Communication/amqpListener/src/stdafx.h new file mode 100644 index 000000000..cda4f5dbb --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpListener/src/stdafx.h @@ -0,0 +1,21 @@ +/* + * Created on: Aug 20, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef stdafx_h +#define stdafx_h + +#include +#include + +#ifdef WIN32 +#include "CWinService.h" +#endif + +#include "../../amqpCore/src/amqpClient/api/amqpClient.h" + +#endif /* stdafx_h */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/BaseDefines.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/BaseDefines.h new file mode 100644 index 000000000..bf4c99241 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/BaseDefines.h @@ -0,0 +1,74 @@ +/* + * Author: mdonahue + * Created: Jan 12, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef SYS_INC_BASEDEFINES_H_ +#define SYS_INC_BASEDEFINES_H_ + +#ifdef ECM_SUB_SYSTEM +#error "The ECM_SUB_SYSTEM define has been deprecated. Use CAF_SUB_SYSTEM instead." +#endif + +#ifdef WIN32 +// Disable compiler warning 4275: non dll-interface used as base for dll-interface class +#pragma warning(disable: 4275) +#endif + +#include + +const gboolean GLIB_FALSE = (gboolean)0; +const gboolean GLIB_TRUE = !GLIB_FALSE; + +// Windows includes +#if defined( WIN32 ) + #ifndef WIN32_LEAN_AND_MEAN + #define WIN32_LEAN_AND_MEAN + #endif + + #ifndef _WIN32_WINNT + #define _WIN32_WINNT 0x0502 + #endif + + #include +#endif + +#include +#if defined( WIN32 ) + typedef __int8 int8; + typedef unsigned __int8 uint8; + typedef __int16 int16; + typedef unsigned __int16 uint16; + typedef __int32 int32; + typedef unsigned __int32 uint32; + typedef __int64 int64; + typedef unsigned __int64 uint64; + + struct timezone + { + int32 tz_minuteswest; + int32 tz_dsttime; + }; + +#else + #include + + typedef signed char int8; + typedef unsigned char uint8; + typedef int16_t int16; + typedef uint16_t uint16; + typedef int32_t int32; + typedef uint32_t uint32; + typedef int64_t int64; + typedef uint64_t uint64; +#endif + +#include +#include + +#include "../src/BasePlatformLink.h" + +#endif /* SYS_INC_BASEDEFINES_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/CafCppUnitSupport.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/CafCppUnitSupport.h new file mode 100644 index 000000000..37f073baf --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/CafCppUnitSupport.h @@ -0,0 +1,17 @@ +/////////////////////////////////////////////////////////////////////////////////////////// +// +// Author: michael.donahue +// +// Created: 6/25/2008 +// +// Copyright (c) 2011 Vmware, Inc. All rights reserved. +// -- VMware Confidential +// +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifndef CafCppUnitSupport_h_ +#define CafCppUnitSupport_h_ + +#include "../test/CafCppUnitSupport/CafCppUnitSupportLink.h" + +#endif // #ifndef CafCppUnitSupport_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Collections.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Collections.h new file mode 100644 index 000000000..4decdd78c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Collections.h @@ -0,0 +1,15 @@ +/* + * Author: mdonahue + * Created: Jan 25, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef ITERATORS_H_ +#define ITERATORS_H_ + +#include "../src/Collections/Iterators/IteratorsInc.h" +#include "../src/Collections/Graphs/GraphsInc.h" + +#endif /* ITERATORS_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/CommonDefines.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/CommonDefines.h new file mode 100644 index 000000000..e57a1f4f5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/CommonDefines.h @@ -0,0 +1,34 @@ +/* + * Author: mdonahue + * Created: Jan 13, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef COMMON_SYS_INC_COMMONDEFINES_H_ +#define COMMON_SYS_INC_COMMONDEFINES_H_ + +#include + +namespace Caf { +} + +// Aggregator +#include "../src/Common/CommonAggregatorLink.h" + +//////////////////////////////////////////////////////////////////////// +// endian ordering repair macros +//////////////////////////////////////////////////////////////////////// +#define CAF_FIX_16BIT_ENDIAN(x) x = (((x) >> 8) & 0xff) | ((x) << 8) +#define CAF_FIX_32BIT_ENDIAN(x) x = (((x) >> 24) & 0xff) | (((x) >> 8) & 0xff00) | (((x) & 0xff00) << 8) | ((x) << 24) +#define CAF_FIX_64BIT_ENDIAN(x) x = (((x) >> 56) & 0xff) | (((x) >> 40) & 0xff00) | (((x) >> 24) & 0xff0000) | \ + (((x) >> 8) & 0xff000000) | (((x) & 0xff000000) << 8) | \ + (((x) & 0xff0000) << 24) | (((x) & 0xff00) << 40) | \ + ((x) << 56) + +#define CAF_FIX_GUID_ENDIAN(guid) CAF_FIX_32BIT_ENDIAN(guid.Data1); \ + CAF_FIX_16BIT_ENDIAN(guid.Data2); \ + CAF_FIX_16BIT_ENDIAN(guid.Data3) + +#endif /* COMMON_SYS_INC_COMMONDEFINES_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/CafContracts.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/CafContracts.h new file mode 100644 index 000000000..143468dcc --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/CafContracts.h @@ -0,0 +1,74 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef Proxy_CafContracts_h_ +#define Proxy_CafContracts_h_ + +#include "../../src/Globals/CommonGlobalsLink.h" + +namespace Caf { + extern COMMONGLOBALS_LINKAGE const char* _sConfigTmpDir; + extern COMMONGLOBALS_LINKAGE const char* _sConfigInputDir; + extern COMMONGLOBALS_LINKAGE const char* _sConfigOutputDir; + extern COMMONGLOBALS_LINKAGE const char* _sConfigSchemaCacheDir; + extern COMMONGLOBALS_LINKAGE const char* _sConfigProviderRegDir; + extern COMMONGLOBALS_LINKAGE const char* _sConfigInstallDir; + extern COMMONGLOBALS_LINKAGE const char* _sConfigInvokersDir; + extern COMMONGLOBALS_LINKAGE const char* _sConfigProvidersDir; + extern COMMONGLOBALS_LINKAGE const char* _sConfigCommonPackagesDir; + extern COMMONGLOBALS_LINKAGE const char* _sConfigWorkingDir; + extern COMMONGLOBALS_LINKAGE const char* _sConfigPrivateKeyFile; + extern COMMONGLOBALS_LINKAGE const char* _sConfigCertFile; + + extern COMMONGLOBALS_LINKAGE const char* _sProviderHostArea; + extern COMMONGLOBALS_LINKAGE const char* _sManagementAgentArea; + + extern COMMONGLOBALS_LINKAGE const char* _sSchemaSummaryFilename; + extern COMMONGLOBALS_LINKAGE const char* _sProviderResponseFilename; + extern COMMONGLOBALS_LINKAGE const char* _sStdoutFilename; + extern COMMONGLOBALS_LINKAGE const char* _sStderrFilename; + + extern COMMONGLOBALS_LINKAGE const char* _sPayloadRequestFilename; + extern COMMONGLOBALS_LINKAGE const char* _sResponseFilename; + extern COMMONGLOBALS_LINKAGE const char* _sErrorResponseFilename; + extern COMMONGLOBALS_LINKAGE const char* _sProviderRequestFilename; + extern COMMONGLOBALS_LINKAGE const char* _sInfraErrFilename; + + // FxProviderFx related string constants + extern COMMONGLOBALS_LINKAGE const char* _sObjIdProviderDriver; + extern COMMONGLOBALS_LINKAGE const char* _sObjIdProviderCdifFormatter; + + // MA related string constants + extern COMMONGLOBALS_LINKAGE const char* _sObjIdCollectSchemaExecutor; + extern COMMONGLOBALS_LINKAGE const char* _sObjIdProviderCollectSchemaExecutor; + extern COMMONGLOBALS_LINKAGE const char* _sObjIdProviderExecutor; + extern COMMONGLOBALS_LINKAGE const char* _sObjIdSinglePmeRequestSplitterInstance; + extern COMMONGLOBALS_LINKAGE const char* _sObjIdSinglePmeRequestSplitter; + extern COMMONGLOBALS_LINKAGE const char* _sObjIdDiagToMgmtRequestTransformerInstance; + extern COMMONGLOBALS_LINKAGE const char* _sObjIdDiagToMgmtRequestTransformer; + extern COMMONGLOBALS_LINKAGE const char* _sObjIdInstallToMgmtRequestTransformerInstance; + extern COMMONGLOBALS_LINKAGE const char* _sObjIdInstallToMgmtRequestTransformer; + + extern COMMONGLOBALS_LINKAGE const char* _sObjIdAttachmentRequestTransformerInstance; + extern COMMONGLOBALS_LINKAGE const char* _sObjIdAttachmentRequestTransformer; + extern COMMONGLOBALS_LINKAGE const char* _sObjIdVersionTransformerInstance; + extern COMMONGLOBALS_LINKAGE const char* _sObjIdVersionTransformer; + + extern COMMONGLOBALS_LINKAGE const char* _sObjIdPersistenceNamespaceDb; + extern COMMONGLOBALS_LINKAGE const char* _sObjIdConfigEnv; + + // Framework related string constants + extern COMMONGLOBALS_LINKAGE const char* _sObjIdErrorToResponseTransformerInstance; + extern COMMONGLOBALS_LINKAGE const char* _sObjIdErrorToResponseTransformer; + extern COMMONGLOBALS_LINKAGE const char* _sObjIdPayloadHeaderEnricherInstance; + extern COMMONGLOBALS_LINKAGE const char* _sObjIdPayloadHeaderEnricher; + extern COMMONGLOBALS_LINKAGE const char* _sObjIdEnvelopeToPayloadTransformerInstance; + extern COMMONGLOBALS_LINKAGE const char* _sObjIdEnvelopeToPayloadTransformer; +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CAddInCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CAddInCollectionDoc.h new file mode 100644 index 000000000..2c1b3875a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CAddInCollectionDoc.h @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CAddInCollectionDoc_h_ +#define CAddInCollectionDoc_h_ + +namespace Caf { + +/// A simple container for objects of type AddInCollection +class CAddInCollectionDoc { +public: + CAddInCollectionDoc() : + _isInitialized(false) {} + virtual ~CAddInCollectionDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque addInCollection = std::deque()) { + if (! _isInitialized) { + _addInCollection = addInCollection; + + _isInitialized = true; + } + } + +public: + /// Accessor for the AddIn + std::deque getAddInCollection() const { + return _addInCollection; + } + +private: + bool _isInitialized; + + std::deque _addInCollection; + +private: + CAF_CM_DECLARE_NOCOPY(CAddInCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CAddInCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CAddInsDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CAddInsDoc.h new file mode 100644 index 000000000..bb03f6c46 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CAddInsDoc.h @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CAddInsDoc_h_ +#define CAddInsDoc_h_ + +namespace Caf { + +/// A simple container for objects of type AddIns +class CAddInsDoc { +public: + CAddInsDoc() : + _isInitialized(false) {} + virtual ~CAddInsDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque addInCollection = std::deque()) { + if (! _isInitialized) { + _addInCollection = addInCollection; + + _isInitialized = true; + } + } + +public: + /// Accessor for the AddInCollection + std::deque getAddInCollection() const { + return _addInCollection; + } + +private: + bool _isInitialized; + + std::deque _addInCollection; + +private: + CAF_CM_DECLARE_NOCOPY(CAddInsDoc); +}; + +CAF_DECLARE_SMART_POINTER(CAddInsDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h new file mode 100644 index 000000000..d12a71583 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h @@ -0,0 +1,65 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CAttachmentCollectionDoc_h_ +#define CAttachmentCollectionDoc_h_ + +namespace Caf { + +/// A simple container for objects of type AttachmentCollection +class CAttachmentCollectionDoc { +public: + CAttachmentCollectionDoc() : + _isInitialized(false) {} + virtual ~CAttachmentCollectionDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque attachment = std::deque(), + const std::deque inlineAttachment = std::deque()) { + if (! _isInitialized) { + _attachment = attachment; + _inlineAttachment = inlineAttachment; + + _isInitialized = true; + } + } + +public: + /// Accessor for the Attachment + std::deque getAttachment() const { + return _attachment; + } + + /// Accessor for the InlineAttachment + std::deque getInlineAttachment() const { + return _inlineAttachment; + } + +private: + bool _isInitialized; + + std::deque _attachment; + std::deque _inlineAttachment; + +private: + CAF_CM_DECLARE_NOCOPY(CAttachmentCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CAttachmentCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CAttachmentDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CAttachmentDoc.h new file mode 100644 index 000000000..ddcf46ce2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CAttachmentDoc.h @@ -0,0 +1,88 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + */ + +#ifndef CAttachmentDoc_h_ +#define CAttachmentDoc_h_ + +namespace Caf { + +/// A simple container for objects of type Attachment +class CAttachmentDoc { +public: + CAttachmentDoc() : + _isInitialized(false), + _isReference(false), + _cmsPolicy(CMS_POLICY_CAF_ENCRYPTED_AND_SIGNED) {} + virtual ~CAttachmentDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string name, + const std::string type, + const std::string uri, + const bool isReference, + const CMS_POLICY cmsPolicy = CMS_POLICY_CAF_ENCRYPTED_AND_SIGNED) { + if (! _isInitialized) { + _name = name; + _type = type; + _uri = uri; + _isReference = isReference; + _cmsPolicy = cmsPolicy; + + _isInitialized = true; + } + } + +public: + /// Accessor for the Name + std::string getName() const { + return _name; + } + + /// Accessor for the Type + std::string getType() const { + return _type; + } + + /// Accessor for the Uri + std::string getUri() const { + return _uri; + } + + /// Accessor for the IsReference + bool getIsReference() const { + return _isReference; + } + + /// Accessor for the CMS Policy + CMS_POLICY getCmsPolicy() const { + return _cmsPolicy; + } + +private: + bool _isInitialized; + + std::string _name; + std::string _type; + std::string _uri; + bool _isReference; + CMS_POLICY _cmsPolicy; + +private: + CAF_CM_DECLARE_NOCOPY(CAttachmentDoc); +}; + +CAF_DECLARE_SMART_POINTER(CAttachmentDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CAttachmentNameCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CAttachmentNameCollectionDoc.h new file mode 100644 index 000000000..341696649 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CAttachmentNameCollectionDoc.h @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CAttachmentNameCollectionDoc_h_ +#define CAttachmentNameCollectionDoc_h_ + +namespace Caf { + +/// A simple container for objects of type AttachmentNameCollection +class CAttachmentNameCollectionDoc { +public: + CAttachmentNameCollectionDoc() : + _isInitialized(false) {} + virtual ~CAttachmentNameCollectionDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque name = std::deque()) { + if (! _isInitialized) { + _name = name; + + _isInitialized = true; + } + } + +public: + /// Accessor for the Name + std::deque getName() const { + return _name; + } + +private: + bool _isInitialized; + + std::deque _name; + +private: + CAF_CM_DECLARE_NOCOPY(CAttachmentNameCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CAttachmentNameCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CAuthnAuthzCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CAuthnAuthzCollectionDoc.h new file mode 100644 index 000000000..4bd791434 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CAuthnAuthzCollectionDoc.h @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CAuthnAuthzCollectionDoc_h_ +#define CAuthnAuthzCollectionDoc_h_ + +namespace Caf { + +/// Set of logging levels for different components +class CAuthnAuthzCollectionDoc { +public: + CAuthnAuthzCollectionDoc() : + _isInitialized(false) {} + virtual ~CAuthnAuthzCollectionDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque authnAuthz = std::deque()) { + if (! _isInitialized) { + _authnAuthz = authnAuthz; + + _isInitialized = true; + } + } + +public: + /// Used to change the logging level for a specific component + std::deque getAuthnAuthz() const { + return _authnAuthz; + } + +private: + bool _isInitialized; + + std::deque _authnAuthz; + +private: + CAF_CM_DECLARE_NOCOPY(CAuthnAuthzCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CAuthnAuthzCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CAuthnAuthzDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CAuthnAuthzDoc.h new file mode 100644 index 000000000..39afc7e27 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CAuthnAuthzDoc.h @@ -0,0 +1,79 @@ +/* + * Author: bwilliams + * Created: May 24, 2015 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + */ + +#ifndef CAuthnAuthzDoc_h_ +#define CAuthnAuthzDoc_h_ + +namespace Caf { + +/// A simple container for objects of type AuthnAuthz +class CAuthnAuthzDoc { +public: + CAuthnAuthzDoc() : + _isInitialized(false), + _sequenceNumber(0) {} + virtual ~CAuthnAuthzDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string type, + const std::string value, + const std::string name = std::string(), + const int32 sequenceNumber = 0) { + if (! _isInitialized) { + _type = type; + _value = value; + _name = name; + _sequenceNumber = sequenceNumber; + + _isInitialized = true; + } + } + +public: + /// Accessor for the Type + std::string getType() const { + return _type; + } + + /// Accessor for the Value + std::string getValue() const { + return _value; + } + + /// Accessor for the Name + std::string getName() const { + return _name; + } + + /// Accessor for the SequenceNumber + int32 getSequenceNumber() const { + return _sequenceNumber; + } + +private: + bool _isInitialized; + + std::string _type; + std::string _value; + std::string _name; + int32 _sequenceNumber; + +private: + CAF_CM_DECLARE_NOCOPY(CAuthnAuthzDoc); +}; + +CAF_DECLARE_SMART_POINTER(CAuthnAuthzDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CClassFiltersDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CClassFiltersDoc.h new file mode 100644 index 000000000..6599701fb --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CClassFiltersDoc.h @@ -0,0 +1,65 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CClassFiltersDoc_h_ +#define CClassFiltersDoc_h_ + +namespace Caf { + +/// A simple container for objects of type ClassFilters +class CClassFiltersDoc { +public: + CClassFiltersDoc() : + _isInitialized(false) {} + virtual ~CClassFiltersDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string dialect = std::string(), + const std::deque classFilter = std::deque()) { + if (! _isInitialized) { + _dialect = dialect; + _classFilter = classFilter; + + _isInitialized = true; + } + } + +public: + /// Accessor for the Dialect + std::string getDialect() const { + return _dialect; + } + + /// Accessor for the ClassFilter + std::deque getClassFilter() const { + return _classFilter; + } + +private: + bool _isInitialized; + + std::string _dialect; + std::deque _classFilter; + +private: + CAF_CM_DECLARE_NOCOPY(CClassFiltersDoc); +}; + +CAF_DECLARE_SMART_POINTER(CClassFiltersDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CClassSpecifierDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CClassSpecifierDoc.h new file mode 100644 index 000000000..6672a9276 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CClassSpecifierDoc.h @@ -0,0 +1,65 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CClassSpecifierDoc_h_ +#define CClassSpecifierDoc_h_ + +namespace Caf { + +/// A simple container for objects of type ClassSpecifier +class CClassSpecifierDoc { +public: + CClassSpecifierDoc() : + _isInitialized(false) {} + virtual ~CClassSpecifierDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const SmartPtrCFullyQualifiedClassGroupDoc fullyQualifiedClass = SmartPtrCFullyQualifiedClassGroupDoc(), + const SmartPtrCClassFiltersDoc classFilters = SmartPtrCClassFiltersDoc()) { + if (! _isInitialized) { + _fullyQualifiedClass = fullyQualifiedClass; + _classFilters = classFilters; + + _isInitialized = true; + } + } + +public: + /// Accessor for the FullyQualifiedClass + SmartPtrCFullyQualifiedClassGroupDoc getFullyQualifiedClass() const { + return _fullyQualifiedClass; + } + + /// Accessor for the ClassFilters + SmartPtrCClassFiltersDoc getClassFilters() const { + return _classFilters; + } + +private: + bool _isInitialized; + + SmartPtrCFullyQualifiedClassGroupDoc _fullyQualifiedClass; + SmartPtrCClassFiltersDoc _classFilters; + +private: + CAF_CM_DECLARE_NOCOPY(CClassSpecifierDoc); +}; + +CAF_DECLARE_SMART_POINTER(CClassSpecifierDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CFullyQualifiedClassGroupDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CFullyQualifiedClassGroupDoc.h new file mode 100644 index 000000000..cd2d04db7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CFullyQualifiedClassGroupDoc.h @@ -0,0 +1,73 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CFullyQualifiedClassGroupDoc_h_ +#define CFullyQualifiedClassGroupDoc_h_ + +namespace Caf { + +/// A simple container for objects of type FullyQualifiedClassGroup +class CFullyQualifiedClassGroupDoc { +public: + CFullyQualifiedClassGroupDoc() : + _isInitialized(false) {} + virtual ~CFullyQualifiedClassGroupDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string classNamespace, + const std::string className, + const std::string classVersion) { + if (! _isInitialized) { + _classNamespace = classNamespace; + _className = className; + _classVersion = classVersion; + + _isInitialized = true; + } + } + +public: + /// Accessor for the ClassNamespace + std::string getClassNamespace() const { + return _classNamespace; + } + + /// Accessor for the ClassName + std::string getClassName() const { + return _className; + } + + /// Accessor for the ClassVersion + std::string getClassVersion() const { + return _classVersion; + } + +private: + bool _isInitialized; + + std::string _classNamespace; + std::string _className; + std::string _classVersion; + +private: + CAF_CM_DECLARE_NOCOPY(CFullyQualifiedClassGroupDoc); +}; + +CAF_DECLARE_SMART_POINTER(CFullyQualifiedClassGroupDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CInlineAttachmentCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CInlineAttachmentCollectionDoc.h new file mode 100644 index 000000000..7c33ab046 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CInlineAttachmentCollectionDoc.h @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CInlineAttachmentCollectionDoc_h_ +#define CInlineAttachmentCollectionDoc_h_ + +namespace Caf { + +/// A simple container for objects of type InlineAttachmentCollection +class CInlineAttachmentCollectionDoc { +public: + CInlineAttachmentCollectionDoc() : + _isInitialized(false) {} + virtual ~CInlineAttachmentCollectionDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque attachment = std::deque()) { + if (! _isInitialized) { + _attachment = attachment; + + _isInitialized = true; + } + } + +public: + /// Accessor for the InlineAttachment + std::deque getInlineAttachment() const { + return _attachment; + } + +private: + bool _isInitialized; + + std::deque _attachment; + +private: + CAF_CM_DECLARE_NOCOPY(CInlineAttachmentCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CInlineAttachmentCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CInlineAttachmentDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CInlineAttachmentDoc.h new file mode 100644 index 000000000..0bdf80350 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CInlineAttachmentDoc.h @@ -0,0 +1,73 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CInlineAttachmentDoc_h_ +#define CInlineAttachmentDoc_h_ + +namespace Caf { + +/// A simple container for objects of type InlineAttachment +class CInlineAttachmentDoc { +public: + CInlineAttachmentDoc() : + _isInitialized(false) {} + virtual ~CInlineAttachmentDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string name, + const std::string type, + const std::string value) { + if (! _isInitialized) { + _name = name; + _type = type; + _value = value; + + _isInitialized = true; + } + } + +public: + /// Accessor for the Name + std::string getName() const { + return _name; + } + + /// Accessor for the Type + std::string getType() const { + return _type; + } + + /// Accessor for the Value + std::string getValue() const { + return _value; + } + +private: + bool _isInitialized; + + std::string _name; + std::string _type; + std::string _value; + +private: + CAF_CM_DECLARE_NOCOPY(CInlineAttachmentDoc); +}; + +CAF_DECLARE_SMART_POINTER(CInlineAttachmentDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CLoggingLevelCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CLoggingLevelCollectionDoc.h new file mode 100644 index 000000000..2f41493fe --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CLoggingLevelCollectionDoc.h @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CLoggingLevelCollectionDoc_h_ +#define CLoggingLevelCollectionDoc_h_ + +namespace Caf { + +/// Set of logging levels for different components +class CLoggingLevelCollectionDoc { +public: + CLoggingLevelCollectionDoc() : + _isInitialized(false) {} + virtual ~CLoggingLevelCollectionDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque loggingLevel = std::deque()) { + if (! _isInitialized) { + _loggingLevel = loggingLevel; + + _isInitialized = true; + } + } + +public: + /// Used to change the logging level for a specific component + std::deque getLoggingLevel() const { + return _loggingLevel; + } + +private: + bool _isInitialized; + + std::deque _loggingLevel; + +private: + CAF_CM_DECLARE_NOCOPY(CLoggingLevelCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CLoggingLevelCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CLoggingLevelElemDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CLoggingLevelElemDoc.h new file mode 100644 index 000000000..6791e8e25 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CLoggingLevelElemDoc.h @@ -0,0 +1,67 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CLoggingLevelElemDoc_h_ +#define CLoggingLevelElemDoc_h_ + +namespace Caf { + +/// Logging level for a component +class CLoggingLevelElemDoc { +public: + CLoggingLevelElemDoc() : + _component(LOGGINGCOMPONENT_NONE), + _level(LOGGINGLEVEL_NONE), + _isInitialized(false) {} + virtual ~CLoggingLevelElemDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const LOGGINGCOMPONENT_TYPE component = LOGGINGCOMPONENT_NONE, + const LOGGINGLEVEL_TYPE level = LOGGINGLEVEL_NONE) { + if (! _isInitialized) { + _component = component; + _level = level; + + _isInitialized = true; + } + } + +public: + /// The logging level applies to this component + LOGGINGCOMPONENT_TYPE getComponent() const { + return _component; + } + + /// Set the logging level to this value + LOGGINGLEVEL_TYPE getLevel() const { + return _level; + } + +private: + LOGGINGCOMPONENT_TYPE _component; + LOGGINGLEVEL_TYPE _level; + + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CLoggingLevelElemDoc); +}; + +CAF_DECLARE_SMART_POINTER(CLoggingLevelElemDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/COperationDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/COperationDoc.h new file mode 100644 index 000000000..3d2dbff2b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/COperationDoc.h @@ -0,0 +1,65 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef COperationDoc_h_ +#define COperationDoc_h_ + +namespace Caf { + +/// A simple container for objects of type Operation +class COperationDoc { +public: + COperationDoc() : + _isInitialized(false) {} + virtual ~COperationDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string name, + const SmartPtrCParameterCollectionDoc parameterCollection = SmartPtrCParameterCollectionDoc()) { + if (! _isInitialized) { + _name = name; + _parameterCollection = parameterCollection; + + _isInitialized = true; + } + } + +public: + /// Accessor for the Name + std::string getName() const { + return _name; + } + + /// Accessor for the ParameterCollection + SmartPtrCParameterCollectionDoc getParameterCollection() const { + return _parameterCollection; + } + +private: + bool _isInitialized; + + std::string _name; + SmartPtrCParameterCollectionDoc _parameterCollection; + +private: + CAF_CM_DECLARE_NOCOPY(COperationDoc); +}; + +CAF_DECLARE_SMART_POINTER(COperationDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CParameterCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CParameterCollectionDoc.h new file mode 100644 index 000000000..e1c0ac533 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CParameterCollectionDoc.h @@ -0,0 +1,65 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CParameterCollectionDoc_h_ +#define CParameterCollectionDoc_h_ + +namespace Caf { + +/// A simple container for objects of type ParameterCollection +class CParameterCollectionDoc { +public: + CParameterCollectionDoc() : + _isInitialized(false) {} + virtual ~CParameterCollectionDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque parameter = std::deque(), + const std::deque instanceParameter = std::deque()) { + if (! _isInitialized) { + _parameter = parameter; + _instanceParameter = instanceParameter; + + _isInitialized = true; + } + } + +public: + /// Accessor for the Parameter + std::deque getParameter() const { + return _parameter; + } + + /// Accessor for the InstanceParameter + std::deque getInstanceParameter() const { + return _instanceParameter; + } + +private: + bool _isInitialized; + + std::deque _parameter; + std::deque _instanceParameter; + +private: + CAF_CM_DECLARE_NOCOPY(CParameterCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CParameterCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CPropertyCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CPropertyCollectionDoc.h new file mode 100644 index 000000000..70b1785bb --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CPropertyCollectionDoc.h @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CPropertyCollectionDoc_h_ +#define CPropertyCollectionDoc_h_ + +namespace Caf { + +/// A simple container for objects of type PropertyCollection +class CPropertyCollectionDoc { +public: + CPropertyCollectionDoc() : + _isInitialized(false) {} + virtual ~CPropertyCollectionDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque property = std::deque()) { + if (! _isInitialized) { + _property = property; + + _isInitialized = true; + } + } + +public: + /// Accessor for the Property + std::deque getProperty() const { + return _property; + } + +private: + bool _isInitialized; + + std::deque _property; + +private: + CAF_CM_DECLARE_NOCOPY(CPropertyCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CPropertyCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CPropertyDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CPropertyDoc.h new file mode 100644 index 000000000..3da307ebb --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CPropertyDoc.h @@ -0,0 +1,74 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CPropertyDoc_h_ +#define CPropertyDoc_h_ + +namespace Caf { + +/// A simple container for objects of type Property +class CPropertyDoc { +public: + CPropertyDoc() : + _type(PROPERTY_NONE), + _isInitialized(false) {} + virtual ~CPropertyDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string name, + const PROPERTY_TYPE type, + const std::deque value = std::deque()) { + if (! _isInitialized) { + _name = name; + _type = type; + _value = value; + + _isInitialized = true; + } + } + +public: + /// Accessor for the Name + std::string getName() const { + return _name; + } + + /// Accessor for the Type + PROPERTY_TYPE getType() const { + return _type; + } + + /// Accessor for the Value + std::deque getValue() const { + return _value; + } + +private: + PROPERTY_TYPE _type; + + bool _isInitialized; + std::string _name; + std::deque _value; + +private: + CAF_CM_DECLARE_NOCOPY(CPropertyDoc); +}; + +CAF_DECLARE_SMART_POINTER(CPropertyDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CProtocolCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CProtocolCollectionDoc.h new file mode 100644 index 000000000..25a7ab7fe --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CProtocolCollectionDoc.h @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CProtocolCollectionDoc_h_ +#define CProtocolCollectionDoc_h_ + +namespace Caf { + +/// Set of protocol +class CProtocolCollectionDoc { +public: + CProtocolCollectionDoc() : + _isInitialized(false) {} + virtual ~CProtocolCollectionDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque protocol = std::deque()) { + if (! _isInitialized) { + _protocol = protocol; + + _isInitialized = true; + } + } + +public: + /// Used to change the logging level for a specific component + std::deque getProtocol() const { + return _protocol; + } + +private: + bool _isInitialized; + + std::deque _protocol; + +private: + CAF_CM_DECLARE_NOCOPY(CProtocolCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CProtocolCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CProtocolDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CProtocolDoc.h new file mode 100644 index 000000000..8a7f1f1b1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CProtocolDoc.h @@ -0,0 +1,74 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CProtocolDoc_h_ +#define CProtocolDoc_h_ + +namespace Caf { + +/// A simple container for objects of Protocol +class CProtocolDoc { +public: + CProtocolDoc() : + _sequenceNumber(0), + _isInitialized(false) {} + virtual ~CProtocolDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string uri, + const std::string name = std::string(), + const int32 sequenceNumber = 0) { + if (! _isInitialized) { + _name = name; + _uri = uri; + _sequenceNumber = sequenceNumber; + + _isInitialized = true; + } + } + +public: + /// Accessor for the Uri + std::string getUri() const { + return _uri; + } + + /// Accessor for the Name + std::string getName() const { + return _name; + } + + /// Accessor for the Value + int32 getSequenceNumber() const { + return _sequenceNumber; + } + +private: + int32 _sequenceNumber; + bool _isInitialized; + + std::string _uri; + std::string _name; + +private: + CAF_CM_DECLARE_NOCOPY(CProtocolDoc); +}; + +CAF_DECLARE_SMART_POINTER(CProtocolDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CRequestConfigDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CRequestConfigDoc.h new file mode 100644 index 000000000..b766dc5a6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CRequestConfigDoc.h @@ -0,0 +1,81 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CRequestConfigDoc_h_ +#define CRequestConfigDoc_h_ + +namespace Caf { + +/// A simple container for objects of type RequestConfig +class CRequestConfigDoc { +public: + CRequestConfigDoc() : + _isInitialized(false) {} + virtual ~CRequestConfigDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string responseFormatType, + const SmartPtrCAddInsDoc requestProcessorAddIns = SmartPtrCAddInsDoc(), + const SmartPtrCAddInsDoc responseProcessorAddIns = SmartPtrCAddInsDoc(), + const SmartPtrCLoggingLevelCollectionDoc loggingLevelCollection = SmartPtrCLoggingLevelCollectionDoc()) { + if (! _isInitialized) { + _responseFormatType = responseFormatType; + _requestProcessorAddIns = requestProcessorAddIns; + _responseProcessorAddIns = responseProcessorAddIns; + _loggingLevelCollection = loggingLevelCollection; + + _isInitialized = true; + } + } + +public: + /// Accessor for the ResponseFormatType + std::string getResponseFormatType() const { + return _responseFormatType; + } + + /// Accessor for the RequestProcessorAddIns + SmartPtrCAddInsDoc getRequestProcessorAddIns() const { + return _requestProcessorAddIns; + } + + /// Accessor for the ResponseProcessorAddIns + SmartPtrCAddInsDoc getResponseProcessorAddIns() const { + return _responseProcessorAddIns; + } + + /// Accessor for the LoggingLevelCollection + SmartPtrCLoggingLevelCollectionDoc getLoggingLevelCollection() const { + return _loggingLevelCollection; + } + +private: + bool _isInitialized; + + std::string _responseFormatType; + SmartPtrCAddInsDoc _requestProcessorAddIns; + SmartPtrCAddInsDoc _responseProcessorAddIns; + SmartPtrCLoggingLevelCollectionDoc _loggingLevelCollection; + +private: + CAF_CM_DECLARE_NOCOPY(CRequestConfigDoc); +}; + +CAF_DECLARE_SMART_POINTER(CRequestConfigDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CRequestHeaderDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CRequestHeaderDoc.h new file mode 100644 index 000000000..820509f78 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CRequestHeaderDoc.h @@ -0,0 +1,106 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CRequestHeaderDoc_h_ +#define CRequestHeaderDoc_h_ + +namespace Caf { + +/// A simple container for objects of type RequestHeader +class CRequestHeaderDoc { +public: + CRequestHeaderDoc() : + _isInitialized(false), + _sessionId(CAFCOMMON_GUID_NULL) {} + virtual ~CRequestHeaderDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const SmartPtrCRequestConfigDoc requestConfig, + const SmartPtrCAuthnAuthzCollectionDoc authnAuthzCollection = SmartPtrCAuthnAuthzCollectionDoc(), + const SmartPtrCProtocolCollectionDoc protocolCollection = SmartPtrCProtocolCollectionDoc(), + const SmartPtrCPropertyCollectionDoc echoPropertyBag = SmartPtrCPropertyCollectionDoc(), + const std::string version = "1.0", + const std::string createdDateTime = CDateTimeUtils::getCurrentDateTime(), + const UUID sessionId = CAFCOMMON_GUID_NULL) { + if (! _isInitialized) { + _requestConfig = requestConfig; + _authnAuthzCollection = authnAuthzCollection; + _protocolCollection = protocolCollection; + _echoPropertyBag = echoPropertyBag; + _version = version; + _createdDateTime = createdDateTime; + _sessionId = sessionId; + + _isInitialized = true; + } + } + +public: + /// Accessor for the RequestConfig + SmartPtrCRequestConfigDoc getRequestConfig() const { + return _requestConfig; + } + + /// Accessor for the Authentication / Authorization Collection + SmartPtrCAuthnAuthzCollectionDoc getAuthnAuthzCollection() const { + return _authnAuthzCollection; + } + + /// Accessor for the Protocol Collection + SmartPtrCProtocolCollectionDoc getProtocolCollection() const { + return _protocolCollection; + } + + /// Accessor for the EchoPropertyBag + SmartPtrCPropertyCollectionDoc getEchoPropertyBag() const { + return _echoPropertyBag; + } + + /// Accessor for the version + std::string getVersion() const { + return _version; + } + + /// Accessor for the date/time when the request was created + std::string getCreatedDateTime() const { + return _createdDateTime; + } + + /// Accessor for the session ID + UUID getSessionId() const { + return _sessionId; + } + +private: + bool _isInitialized; + + SmartPtrCRequestConfigDoc _requestConfig; + SmartPtrCAuthnAuthzCollectionDoc _authnAuthzCollection; + SmartPtrCProtocolCollectionDoc _protocolCollection; + SmartPtrCPropertyCollectionDoc _echoPropertyBag; + std::string _version; + std::string _createdDateTime; + UUID _sessionId; + +private: + CAF_CM_DECLARE_NOCOPY(CRequestHeaderDoc); +}; + +CAF_DECLARE_SMART_POINTER(CRequestHeaderDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CRequestInstanceParameterDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CRequestInstanceParameterDoc.h new file mode 100644 index 000000000..7e555c29c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CRequestInstanceParameterDoc.h @@ -0,0 +1,89 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CRequestInstanceParameterDoc_h_ +#define CRequestInstanceParameterDoc_h_ + +namespace Caf { + +/// A simple container for objects of type RequestInstanceParameter +class CRequestInstanceParameterDoc { +public: + CRequestInstanceParameterDoc() : + _isInitialized(false) {} + virtual ~CRequestInstanceParameterDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string name, + const std::string classNamespace, + const std::string className, + const std::string classVersion, + const std::deque value) { + if (! _isInitialized) { + _name = name; + _classNamespace = classNamespace; + _className = className; + _classVersion = classVersion; + _value = value; + + _isInitialized = true; + } + } + +public: + /// Accessor for the Name + std::string getName() const { + return _name; + } + + /// Accessor for the ClassNamespace + std::string getClassNamespace() const { + return _classNamespace; + } + + /// Accessor for the ClassName + std::string getClassName() const { + return _className; + } + + /// Accessor for the ClassVersion + std::string getClassVersion() const { + return _classVersion; + } + + /// Accessor for the Value + std::deque getValue() const { + return _value; + } + +private: + bool _isInitialized; + + std::string _name; + std::string _classNamespace; + std::string _className; + std::string _classVersion; + std::deque _value; + +private: + CAF_CM_DECLARE_NOCOPY(CRequestInstanceParameterDoc); +}; + +CAF_DECLARE_SMART_POINTER(CRequestInstanceParameterDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CRequestParameterDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CRequestParameterDoc.h new file mode 100644 index 000000000..5513c170b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CRequestParameterDoc.h @@ -0,0 +1,74 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CRequestParameterDoc_h_ +#define CRequestParameterDoc_h_ + +namespace Caf { + +/// A simple container for objects of type RequestParameter +class CRequestParameterDoc { +public: + CRequestParameterDoc() : + _type(PARAMETER_NONE), + _isInitialized(false) {} + virtual ~CRequestParameterDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string name, + const PARAMETER_TYPE type, + const std::deque value) { + if (! _isInitialized) { + _name = name; + _type = type; + _value = value; + + _isInitialized = true; + } + } + +public: + /// Accessor for the Name + std::string getName() const { + return _name; + } + + /// Accessor for the Type + PARAMETER_TYPE getType() const { + return _type; + } + + /// Accessor for the Value + std::deque getValue() const { + return _value; + } + +private: + PARAMETER_TYPE _type; + + bool _isInitialized; + std::string _name; + std::deque _value; + +private: + CAF_CM_DECLARE_NOCOPY(CRequestParameterDoc); +}; + +CAF_DECLARE_SMART_POINTER(CRequestParameterDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CStatisticsDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CStatisticsDoc.h new file mode 100644 index 000000000..3a3175c84 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CStatisticsDoc.h @@ -0,0 +1,110 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CStatisticsDoc_h_ +#define CStatisticsDoc_h_ + +namespace Caf { + +/// A simple container for objects of type Statistics +class CStatisticsDoc { +public: + CStatisticsDoc() : + _providerJobNum(0), + _providerJobTotal(0), + _providerJobDurationSecs(0), + _pmeNum(0), + _pmeTotal(0), + _pmeDurationSecs(0), + _isInitialized(false) {} + virtual ~CStatisticsDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const SmartPtrCPropertyCollectionDoc propertyCollection, + const int32 providerJobNum, + const int32 providerJobTotal, + const int32 providerJobDurationSecs, + const int32 pmeNum, + const int32 pmeTotal, + const int32 pmeDurationSecs) { + if (! _isInitialized) { + _propertyCollection = propertyCollection; + _providerJobNum = providerJobNum; + _providerJobTotal = providerJobTotal; + _providerJobDurationSecs = providerJobDurationSecs; + _pmeNum = pmeNum; + _pmeTotal = pmeTotal; + _pmeDurationSecs = pmeDurationSecs; + + _isInitialized = true; + } + } + +public: + /// Accessor for the PropertyCollection + SmartPtrCPropertyCollectionDoc getPropertyCollection() const { + return _propertyCollection; + } + + /// Accessor for the ProviderJobNum + int32 getProviderJobNum() const { + return _providerJobNum; + } + + /// Accessor for the ProviderJobTotal + int32 getProviderJobTotal() const { + return _providerJobTotal; + } + + /// Accessor for the ProviderJobDurationSecs + int32 getProviderJobDurationSecs() const { + return _providerJobDurationSecs; + } + + /// Accessor for the PmeNum + int32 getPmeNum() const { + return _pmeNum; + } + + /// Accessor for the PmeTotal + int32 getPmeTotal() const { + return _pmeTotal; + } + + /// Accessor for the PmeDurationSecs + int32 getPmeDurationSecs() const { + return _pmeDurationSecs; + } + +private: + SmartPtrCPropertyCollectionDoc _propertyCollection; + int32 _providerJobNum; + int32 _providerJobTotal; + int32 _providerJobDurationSecs; + int32 _pmeNum; + int32 _pmeTotal; + int32 _pmeDurationSecs; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CStatisticsDoc); +}; + +CAF_DECLARE_SMART_POINTER(CStatisticsDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CafCoreTypesDocInc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CafCoreTypesDocInc.h new file mode 100644 index 000000000..809e9bb7f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafCoreTypesDoc/CafCoreTypesDocInc.h @@ -0,0 +1,105 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CAFCORETYPESDOCINC_H_ +#define CAFCORETYPESDOCINC_H_ + +namespace Caf { + typedef enum { + PROPERTY_NONE, + PROPERTY_STRING, + PROPERTY_SINT32, + PROPERTY_UINT32, + PROPERTY_SINT64, + PROPERTY_UINT64, + PROPERTY_DECIMAL, + PROPERTY_DOUBLE, + PROPERTY_BOOLEAN, + PROPERTY_DATETIME + } PROPERTY_TYPE; + + typedef enum { + PARAMETER_NONE, + PARAMETER_STRING, + PARAMETER_SINT32, + PARAMETER_UINT32, + PARAMETER_SINT64, + PARAMETER_UINT64, + PARAMETER_DECIMAL, + PARAMETER_DOUBLE, + PARAMETER_BOOLEAN, + PARAMETER_DATETIME + } PARAMETER_TYPE; + + typedef enum { + LOGGINGLEVEL_NONE, + LOGGINGLEVEL_DEBUG, + LOGGINGLEVEL_INFO, + LOGGINGLEVEL_WARN, + LOGGINGLEVEL_ERROR, + LOGGINGLEVEL_CRITICAL + } LOGGINGLEVEL_TYPE; + + typedef enum { + LOGGINGCOMPONENT_NONE, + LOGGINGCOMPONENT_COMMUNICATIONS, + LOGGINGCOMPONENT_MANAGEMENTAGENT, + LOGGINGCOMPONENT_UINT32, + LOGGINGCOMPONENT_PROVIDERFRAMEWORK, + LOGGINGCOMPONENT_PROVIDER + } LOGGINGCOMPONENT_TYPE; + + typedef enum { + CMS_POLICY_NONE, + CMS_POLICY_CAF_ENCRYPTED, + CMS_POLICY_CAF_SIGNED, + CMS_POLICY_CAF_ENCRYPTED_AND_SIGNED, + CMS_POLICY_APP_SIGNED, + CMS_POLICY_APP_ENCRYPTED, + CMS_POLICY_APP_ENCRYPTED_AND_SIGNED + } CMS_POLICY; +} + +#include "CFullyQualifiedClassGroupDoc.h" +#include "CAttachmentNameCollectionDoc.h" + +#include "CLoggingLevelElemDoc.h" +#include "CLoggingLevelCollectionDoc.h" + +#include "CRequestInstanceParameterDoc.h" +#include "CRequestParameterDoc.h" + +#include "CInlineAttachmentDoc.h" +#include "CInlineAttachmentCollectionDoc.h" + +#include "CAttachmentDoc.h" +#include "CAttachmentCollectionDoc.h" + +#include "CParameterCollectionDoc.h" +#include "COperationDoc.h" + +#include "CPropertyDoc.h" +#include "CPropertyCollectionDoc.h" + +#include "CAddInCollectionDoc.h" +#include "CAddInsDoc.h" + +#include "CAuthnAuthzDoc.h" +#include "CAuthnAuthzCollectionDoc.h" + +#include "CProtocolDoc.h" +#include "CProtocolCollectionDoc.h" + +#include "CRequestConfigDoc.h" +#include "CRequestHeaderDoc.h" + +#include "CClassFiltersDoc.h" +#include "CClassSpecifierDoc.h" +#include "CStatisticsDoc.h" + +#endif /* CAFCORETYPESDOCINC_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafInstallRequestDoc/CFullPackageElemDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafInstallRequestDoc/CFullPackageElemDoc.h new file mode 100644 index 000000000..5b00823d1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafInstallRequestDoc/CFullPackageElemDoc.h @@ -0,0 +1,97 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CFullPackageElemDoc_h_ +#define CFullPackageElemDoc_h_ + +namespace Caf { + +/// A simple container for objects of type FullPackageElem +class CFullPackageElemDoc { +public: + CFullPackageElemDoc() : + _index(0), + _isInitialized(false) {} + virtual ~CFullPackageElemDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const int32 index, + const std::string packageNamespace, + const std::string packageName, + const std::string packageVersion, + const SmartPtrCPackageDefnDoc installPackage, + const SmartPtrCPackageDefnDoc uninstallPackage) { + if (! _isInitialized) { + _index = index; + _packageNamespace = packageNamespace; + _packageName = packageName; + _packageVersion = packageVersion; + _installPackage = installPackage; + _uninstallPackage = uninstallPackage; + + _isInitialized = true; + } + } + +public: + /// Accessor for the Index + int32 getIndex() const { + return _index; + } + + /// Accessor for the PackageNamespace + std::string getPackageNamespace() const { + return _packageNamespace; + } + + /// Accessor for the PackageName + std::string getPackageName() const { + return _packageName; + } + + /// Accessor for the PackageVersion + std::string getPackageVersion() const { + return _packageVersion; + } + + /// Accessor for the InstallPackage + SmartPtrCPackageDefnDoc getInstallPackage() const { + return _installPackage; + } + + /// Accessor for the UninstallPackage + SmartPtrCPackageDefnDoc getUninstallPackage() const { + return _uninstallPackage; + } + +private: + int32 _index; + std::string _packageNamespace; + std::string _packageName; + std::string _packageVersion; + SmartPtrCPackageDefnDoc _installPackage; + SmartPtrCPackageDefnDoc _uninstallPackage; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CFullPackageElemDoc); +}; + +CAF_DECLARE_SMART_POINTER(CFullPackageElemDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafInstallRequestDoc/CGetInventoryJobDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafInstallRequestDoc/CGetInventoryJobDoc.h new file mode 100644 index 000000000..a6df7a782 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafInstallRequestDoc/CGetInventoryJobDoc.h @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CGetInventoryJobDoc_h_ +#define CGetInventoryJobDoc_h_ + +namespace Caf { + +/// A simple container for objects of type GetInventoryJob +class CGetInventoryJobDoc { +public: + CGetInventoryJobDoc() : + _jobId(CAFCOMMON_GUID_NULL), + _isInitialized(false) {} + virtual ~CGetInventoryJobDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const UUID jobId) { + if (! _isInitialized) { + _jobId = jobId; + + _isInitialized = true; + } + } + +public: + /// Accessor for the JobId + UUID getJobId() const { + return _jobId; + } + +private: + UUID _jobId; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CGetInventoryJobDoc); +}; + +CAF_DECLARE_SMART_POINTER(CGetInventoryJobDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafInstallRequestDoc/CInstallBatchDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafInstallRequestDoc/CInstallBatchDoc.h new file mode 100644 index 000000000..4abfae57e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafInstallRequestDoc/CInstallBatchDoc.h @@ -0,0 +1,73 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CInstallBatchDoc_h_ +#define CInstallBatchDoc_h_ + +namespace Caf { + +/// A simple container for objects of type InstallBatch +class CInstallBatchDoc { +public: + CInstallBatchDoc() : + _isInitialized(false) {} + virtual ~CInstallBatchDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const SmartPtrCGetInventoryJobDoc getInventory, + const SmartPtrCInstallProviderJobDoc installProvider, + const SmartPtrCUninstallProviderJobDoc uninstallProvider) { + if (! _isInitialized) { + _getInventory = getInventory; + _installProvider = installProvider; + _uninstallProvider = uninstallProvider; + + _isInitialized = true; + } + } + +public: + /// Accessor for the GetInventory + SmartPtrCGetInventoryJobDoc getGetInventory() const { + return _getInventory; + } + + /// Accessor for the InstallProvider + SmartPtrCInstallProviderJobDoc getInstallProvider() const { + return _installProvider; + } + + /// Accessor for the UninstallProvider + SmartPtrCUninstallProviderJobDoc getUninstallProvider() const { + return _uninstallProvider; + } + +private: + bool _isInitialized; + + SmartPtrCGetInventoryJobDoc _getInventory; + SmartPtrCInstallProviderJobDoc _installProvider; + SmartPtrCUninstallProviderJobDoc _uninstallProvider; + +private: + CAF_CM_DECLARE_NOCOPY(CInstallBatchDoc); +}; + +CAF_DECLARE_SMART_POINTER(CInstallBatchDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafInstallRequestDoc/CInstallPackageSpecDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafInstallRequestDoc/CInstallPackageSpecDoc.h new file mode 100644 index 000000000..005b03b2f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafInstallRequestDoc/CInstallPackageSpecDoc.h @@ -0,0 +1,113 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CInstallPackageSpecDoc_h_ +#define CInstallPackageSpecDoc_h_ + +namespace Caf { + +/// A simple container for objects of type InstallPackageSpec +class CInstallPackageSpecDoc { +public: + CInstallPackageSpecDoc() : + _isInitialized(false) {} + virtual ~CInstallPackageSpecDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string packageNamespace, + const std::string packageName, + const std::string packageVersion, + const std::string startupAttachmentName, + const std::string packageAttachmentName, + const SmartPtrCAttachmentNameCollectionDoc attachmentNameCollection, + const SmartPtrCAttachmentCollectionDoc attachmentCollection, + const std::string arguments) { + if (! _isInitialized) { + _packageNamespace = packageNamespace; + _packageName = packageName; + _packageVersion = packageVersion; + _startupAttachmentName = startupAttachmentName; + _packageAttachmentName = packageAttachmentName; + _attachmentNameCollection = attachmentNameCollection; + _attachmentCollection = attachmentCollection; + _arguments = arguments; + + _isInitialized = true; + } + } + +public: + /// Accessor for the PackageNamespace + std::string getPackageNamespace() const { + return _packageNamespace; + } + + /// Accessor for the PackageName + std::string getPackageName() const { + return _packageName; + } + + /// Accessor for the PackageVersion + std::string getPackageVersion() const { + return _packageVersion; + } + + /// Accessor for the StartupAttachmentName + std::string getStartupAttachmentName() const { + return _startupAttachmentName; + } + + /// Accessor for the PackageAttachmentName + std::string getPackageAttachmentName() const { + return _packageAttachmentName; + } + + /// Accessor for the AttachmentNameCollection + SmartPtrCAttachmentNameCollectionDoc getSupportingAttachmentNameCollection() const { + return _attachmentNameCollection; + } + + /// Accessor for the AttachmentCollection + SmartPtrCAttachmentCollectionDoc getAttachmentCollection() const { + return _attachmentCollection; + } + + /// Accessor for the Arguments + std::string getArguments() const { + return _arguments; + } + +private: + bool _isInitialized; + + std::string _packageNamespace; + std::string _packageName; + std::string _packageVersion; + std::string _startupAttachmentName; + std::string _packageAttachmentName; + SmartPtrCAttachmentNameCollectionDoc _attachmentNameCollection; + SmartPtrCAttachmentCollectionDoc _attachmentCollection; + std::string _arguments; + +private: + CAF_CM_DECLARE_NOCOPY(CInstallPackageSpecDoc); +}; + +CAF_DECLARE_SMART_POINTER(CInstallPackageSpecDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafInstallRequestDoc/CInstallProviderJobDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafInstallRequestDoc/CInstallProviderJobDoc.h new file mode 100644 index 000000000..93e988e12 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafInstallRequestDoc/CInstallProviderJobDoc.h @@ -0,0 +1,107 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CInstallProviderJobDoc_h_ +#define CInstallProviderJobDoc_h_ + +namespace Caf { + +/// A simple container for objects of type InstallProviderJob +class CInstallProviderJobDoc { +public: + CInstallProviderJobDoc() : + _clientId(CAFCOMMON_GUID_NULL), + _jobId(CAFCOMMON_GUID_NULL), + _packageOSType(PACKAGE_OS_NONE), + _isInitialized(false) {} + virtual ~CInstallProviderJobDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const UUID clientId, + const UUID jobId, + const std::string providerNamespace, + const std::string providerName, + const std::string providerVersion, + const PACKAGE_OS_TYPE packageOSType, + const std::deque packageCollection) { + if (! _isInitialized) { + _clientId = clientId; + _jobId = jobId; + _providerNamespace = providerNamespace; + _providerName = providerName; + _providerVersion = providerVersion; + _packageOSType = packageOSType; + _packageCollection = packageCollection; + + _isInitialized = true; + } + } + +public: + /// Accessor for the ClientId + UUID getClientId() const { + return _clientId; + } + + /// Accessor for the JobId + UUID getJobId() const { + return _jobId; + } + + /// Accessor for the ProviderNamespace + std::string getProviderNamespace() const { + return _providerNamespace; + } + + /// Accessor for the ProviderName + std::string getProviderName() const { + return _providerName; + } + + /// Accessor for the ProviderVersion + std::string getProviderVersion() const { + return _providerVersion; + } + + /// Accessor for the PackageOSType + PACKAGE_OS_TYPE getPackageOSType() const { + return _packageOSType; + } + + /// Accessor for the PackageVal + std::deque getPackageCollection() const { + return _packageCollection; + } + +private: + UUID _clientId; + UUID _jobId; + std::string _providerNamespace; + std::string _providerName; + std::string _providerVersion; + PACKAGE_OS_TYPE _packageOSType; + std::deque _packageCollection; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CInstallProviderJobDoc); +}; + +CAF_DECLARE_SMART_POINTER(CInstallProviderJobDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafInstallRequestDoc/CInstallProviderSpecDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafInstallRequestDoc/CInstallProviderSpecDoc.h new file mode 100644 index 000000000..ee8846bbe --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafInstallRequestDoc/CInstallProviderSpecDoc.h @@ -0,0 +1,89 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CInstallProviderSpecDoc_h_ +#define CInstallProviderSpecDoc_h_ + +namespace Caf { + +/// A simple container for objects of type InstallProviderSpec +class CInstallProviderSpecDoc { +public: + CInstallProviderSpecDoc() : + _clientId(CAFCOMMON_GUID_NULL), + _isInitialized(false) {} + virtual ~CInstallProviderSpecDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const UUID clientId, + const std::string providerNamespace, + const std::string providerName, + const std::string providerVersion, + const std::deque packageCollection) { + if (! _isInitialized) { + _clientId = clientId; + _providerNamespace = providerNamespace; + _providerName = providerName; + _providerVersion = providerVersion; + _packageCollection = packageCollection; + + _isInitialized = true; + } + } + +public: + /// Accessor for the ClientId + UUID getClientId() const { + return _clientId; + } + + /// Accessor for the ProviderNamespace + std::string getProviderNamespace() const { + return _providerNamespace; + } + + /// Accessor for the ProviderName + std::string getProviderName() const { + return _providerName; + } + + /// Accessor for the ProviderVersion + std::string getProviderVersion() const { + return _providerVersion; + } + + /// Accessor for the PackageVal + std::deque getPackageCollection() const { + return _packageCollection; + } + +private: + UUID _clientId; + std::string _providerNamespace; + std::string _providerName; + std::string _providerVersion; + std::deque _packageCollection; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CInstallProviderSpecDoc); +}; + +CAF_DECLARE_SMART_POINTER(CInstallProviderSpecDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafInstallRequestDoc/CInstallRequestDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafInstallRequestDoc/CInstallRequestDoc.h new file mode 100644 index 000000000..44d9f7470 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafInstallRequestDoc/CInstallRequestDoc.h @@ -0,0 +1,98 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CInstallRequestDoc_h_ +#define CInstallRequestDoc_h_ + +namespace Caf { + +/// A simple container for objects of type InstallRequest +class CInstallRequestDoc { +public: + CInstallRequestDoc() : + _clientId(CAFCOMMON_GUID_NULL), + _requestId(CAFCOMMON_GUID_NULL), + _isInitialized(false) {} + virtual ~CInstallRequestDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const UUID clientId, + const UUID requestId, + const std::string pmeId, + const SmartPtrCRequestHeaderDoc requestHeader, + const SmartPtrCInstallBatchDoc batch, + const SmartPtrCAttachmentCollectionDoc attachmentCollection) { + if (! _isInitialized) { + _clientId = clientId; + _requestId = requestId; + _pmeId = pmeId; + _requestHeader = requestHeader; + _batch = batch; + _attachmentCollection = attachmentCollection; + + _isInitialized = true; + } + } + +public: + /// Accessor for the ClientId + UUID getClientId() const { + return _clientId; + } + + /// Accessor for the RequestId + UUID getRequestId() const { + return _requestId; + } + + /// Accessor for the PmeId + std::string getPmeId() const { + return _pmeId; + } + + /// Accessor for the RequestHeader + SmartPtrCRequestHeaderDoc getRequestHeader() const { + return _requestHeader; + } + + /// Accessor for the Batch + SmartPtrCInstallBatchDoc getBatch() const { + return _batch; + } + + /// Accessor for the AttachmentCollection + SmartPtrCAttachmentCollectionDoc getAttachmentCollection() const { + return _attachmentCollection; + } + +private: + UUID _clientId; + UUID _requestId; + std::string _pmeId; + SmartPtrCRequestHeaderDoc _requestHeader; + SmartPtrCInstallBatchDoc _batch; + SmartPtrCAttachmentCollectionDoc _attachmentCollection; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CInstallRequestDoc); +}; + +CAF_DECLARE_SMART_POINTER(CInstallRequestDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafInstallRequestDoc/CMinPackageElemDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafInstallRequestDoc/CMinPackageElemDoc.h new file mode 100644 index 000000000..d9505ca79 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafInstallRequestDoc/CMinPackageElemDoc.h @@ -0,0 +1,81 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CMinPackageElemDoc_h_ +#define CMinPackageElemDoc_h_ + +namespace Caf { + +/// A simple container for objects of type MinPackageElem +class CMinPackageElemDoc { +public: + CMinPackageElemDoc() : + _index(0), + _isInitialized(false) {} + virtual ~CMinPackageElemDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const int32 index, + const std::string packageNamespace, + const std::string packageName, + const std::string packageVersion) { + if (! _isInitialized) { + _index = index; + _packageNamespace = packageNamespace; + _packageName = packageName; + _packageVersion = packageVersion; + + _isInitialized = true; + } + } + +public: + /// Accessor for the Index + int32 getIndex() const { + return _index; + } + + /// Accessor for the PackageNamespace + std::string getPackageNamespace() const { + return _packageNamespace; + } + + /// Accessor for the PackageName + std::string getPackageName() const { + return _packageName; + } + + /// Accessor for the PackageVersion + std::string getPackageVersion() const { + return _packageVersion; + } + +private: + int32 _index; + std::string _packageNamespace; + std::string _packageName; + std::string _packageVersion; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CMinPackageElemDoc); +}; + +CAF_DECLARE_SMART_POINTER(CMinPackageElemDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafInstallRequestDoc/CPackageDefnDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafInstallRequestDoc/CPackageDefnDoc.h new file mode 100644 index 000000000..60bdd2b19 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafInstallRequestDoc/CPackageDefnDoc.h @@ -0,0 +1,81 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CPackageDefnDoc_h_ +#define CPackageDefnDoc_h_ + +namespace Caf { + +/// A simple container for objects of type PackageDefn +class CPackageDefnDoc { +public: + CPackageDefnDoc() : + _isInitialized(false) {} + virtual ~CPackageDefnDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string startupAttachmentName, + const std::string packageAttachmentName, + const SmartPtrCAttachmentNameCollectionDoc attachmentNameCollection, + const std::string arguments) { + if (! _isInitialized) { + _startupAttachmentName = startupAttachmentName; + _packageAttachmentName = packageAttachmentName; + _attachmentNameCollection = attachmentNameCollection; + _arguments = arguments; + + _isInitialized = true; + } + } + +public: + /// Accessor for the StartupAttachmentName + std::string getStartupAttachmentName() const { + return _startupAttachmentName; + } + + /// Accessor for the PackageAttachmentName + std::string getPackageAttachmentName() const { + return _packageAttachmentName; + } + + /// Accessor for the AttachmentNameCollection + SmartPtrCAttachmentNameCollectionDoc getSupportingAttachmentNameCollection() const { + return _attachmentNameCollection; + } + + /// Accessor for the Arguments + std::string getArguments() const { + return _arguments; + } + +private: + bool _isInitialized; + + std::string _startupAttachmentName; + std::string _packageAttachmentName; + SmartPtrCAttachmentNameCollectionDoc _attachmentNameCollection; + std::string _arguments; + +private: + CAF_CM_DECLARE_NOCOPY(CPackageDefnDoc); +}; + +CAF_DECLARE_SMART_POINTER(CPackageDefnDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafInstallRequestDoc/CUninstallProviderJobDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafInstallRequestDoc/CUninstallProviderJobDoc.h new file mode 100644 index 000000000..5a60daee4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafInstallRequestDoc/CUninstallProviderJobDoc.h @@ -0,0 +1,99 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CUninstallProviderJobDoc_h_ +#define CUninstallProviderJobDoc_h_ + +namespace Caf { + +/// A simple container for objects of type UninstallProviderJob +class CUninstallProviderJobDoc { +public: + CUninstallProviderJobDoc() : + _clientId(CAFCOMMON_GUID_NULL), + _jobId(CAFCOMMON_GUID_NULL), + _packageOSType(PACKAGE_OS_NONE), + _isInitialized(false) {} + virtual ~CUninstallProviderJobDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const UUID clientId, + const UUID jobId, + const std::string providerNamespace, + const std::string providerName, + const std::string providerVersion, + const PACKAGE_OS_TYPE packageOSType) { + if (! _isInitialized) { + _clientId = clientId; + _jobId = jobId; + _providerNamespace = providerNamespace; + _providerName = providerName; + _providerVersion = providerVersion; + _packageOSType = packageOSType; + + _isInitialized = true; + } + } + +public: + /// Accessor for the ClientId + UUID getClientId() const { + return _clientId; + } + + /// Accessor for the JobId + UUID getJobId() const { + return _jobId; + } + + /// Accessor for the ProviderNamespace + std::string getProviderNamespace() const { + return _providerNamespace; + } + + /// Accessor for the ProviderName + std::string getProviderName() const { + return _providerName; + } + + /// Accessor for the ProviderVersion + std::string getProviderVersion() const { + return _providerVersion; + } + + /// Accessor for the PackageOSType + PACKAGE_OS_TYPE getPackageOSType() const { + return _packageOSType; + } + +private: + UUID _clientId; + UUID _jobId; + std::string _providerNamespace; + std::string _providerName; + std::string _providerVersion; + PACKAGE_OS_TYPE _packageOSType; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CUninstallProviderJobDoc); +}; + +CAF_DECLARE_SMART_POINTER(CUninstallProviderJobDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafInstallRequestDoc/CafInstallRequestDocInc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafInstallRequestDoc/CafInstallRequestDocInc.h new file mode 100644 index 000000000..b6a91c5bd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/CafInstallRequestDoc/CafInstallRequestDocInc.h @@ -0,0 +1,35 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CAFINSTALLREQUESTDOCINC_H_ +#define CAFINSTALLREQUESTDOCINC_H_ + +namespace Caf { + typedef enum { + PACKAGE_OS_NONE, + PACKAGE_OS_ALL, + PACKAGE_OS_NIX, + PACKAGE_OS_WIN + } PACKAGE_OS_TYPE; +} + +#include "CPackageDefnDoc.h" +#include "CMinPackageElemDoc.h" +#include "CFullPackageElemDoc.h" + +#include "CInstallPackageSpecDoc.h" +#include "CInstallProviderSpecDoc.h" + +#include "CGetInventoryJobDoc.h" +#include "CUninstallProviderJobDoc.h" +#include "CInstallProviderJobDoc.h" + +#include "CInstallBatchDoc.h" +#include "CInstallRequestDoc.h" + +#endif /* CAFINSTALLREQUESTINC_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/DiagRequestDoc/CDiagRequestDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/DiagRequestDoc/CDiagRequestDoc.h new file mode 100644 index 000000000..5ba7a422d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/DiagRequestDoc/CDiagRequestDoc.h @@ -0,0 +1,90 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CDiagRequestDoc_h_ +#define CDiagRequestDoc_h_ + +namespace Caf { + +/// A simple container for objects of type DiagRequest +class CDiagRequestDoc { +public: + CDiagRequestDoc() : + _clientId(CAFCOMMON_GUID_NULL), + _requestId(CAFCOMMON_GUID_NULL), + _isInitialized(false) {} + virtual ~CDiagRequestDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const UUID clientId, + const UUID requestId, + const std::string pmeId, + const SmartPtrCRequestHeaderDoc requestHeader, + const SmartPtrCDiagBatchDoc batch) { + if (! _isInitialized) { + _clientId = clientId; + _requestId = requestId; + _pmeId = pmeId; + _requestHeader = requestHeader; + _batch = batch; + + _isInitialized = true; + } + } + +public: + /// Accessor for the ClientId + UUID getClientId() const { + return _clientId; + } + + /// Accessor for the RequestId + UUID getRequestId() const { + return _requestId; + } + + /// Accessor for the PmeId + std::string getPmeId() const { + return _pmeId; + } + + /// Accessor for the RequestHeader + SmartPtrCRequestHeaderDoc getRequestHeader() const { + return _requestHeader; + } + + /// Accessor for the Batch + SmartPtrCDiagBatchDoc getBatch() const { + return _batch; + } + +private: + UUID _clientId; + UUID _requestId; + std::string _pmeId; + SmartPtrCRequestHeaderDoc _requestHeader; + SmartPtrCDiagBatchDoc _batch; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CDiagRequestDoc); +}; + +CAF_DECLARE_SMART_POINTER(CDiagRequestDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/DiagRequestDoc/DiagRequestDocInc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/DiagRequestDoc/DiagRequestDocInc.h new file mode 100644 index 000000000..a4cd9fa13 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/DiagRequestDoc/DiagRequestDocInc.h @@ -0,0 +1,14 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef DIAGREQUESTDOCINC_H_ +#define DIAGREQUESTDOCINC_H_ + +#include "CDiagRequestDoc.h" + +#endif /* DIAGREQUESTDOCINC_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/DiagTypesDoc/CDiagBatchDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/DiagTypesDoc/CDiagBatchDoc.h new file mode 100644 index 000000000..af42ced5f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/DiagTypesDoc/CDiagBatchDoc.h @@ -0,0 +1,73 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CDiagBatchDoc_h_ +#define CDiagBatchDoc_h_ + +namespace Caf { + +/// A simple container for objects of type DiagBatch +class CDiagBatchDoc { +public: + CDiagBatchDoc() : + _isInitialized(false) {} + virtual ~CDiagBatchDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const SmartPtrCDiagCollectInstancesDoc collectInstances, + const SmartPtrCDiagSetValueCollectionDoc setValueCollection, + const SmartPtrCDiagDeleteValueCollectionDoc deleteValueCollection) { + if (! _isInitialized) { + _collectInstances = collectInstances; + _setValueCollection = setValueCollection; + _deleteValueCollection = deleteValueCollection; + + _isInitialized = true; + } + } + +public: + /// Accessor for the CollectInstances + SmartPtrCDiagCollectInstancesDoc getCollectInstances() const { + return _collectInstances; + } + + /// Accessor for the SetValueCollection + SmartPtrCDiagSetValueCollectionDoc getSetValueCollection() const { + return _setValueCollection; + } + + /// Accessor for the DeleteValueCollection + SmartPtrCDiagDeleteValueCollectionDoc getDeleteValueCollection() const { + return _deleteValueCollection; + } + +private: + bool _isInitialized; + + SmartPtrCDiagCollectInstancesDoc _collectInstances; + SmartPtrCDiagSetValueCollectionDoc _setValueCollection; + SmartPtrCDiagDeleteValueCollectionDoc _deleteValueCollection; + +private: + CAF_CM_DECLARE_NOCOPY(CDiagBatchDoc); +}; + +CAF_DECLARE_SMART_POINTER(CDiagBatchDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/DiagTypesDoc/CDiagCollectInstancesDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/DiagTypesDoc/CDiagCollectInstancesDoc.h new file mode 100644 index 000000000..f41e858c3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/DiagTypesDoc/CDiagCollectInstancesDoc.h @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CDiagCollectInstancesDoc_h_ +#define CDiagCollectInstancesDoc_h_ + +namespace Caf { + +/// A simple container for objects of type DiagCollectInstances +class CDiagCollectInstancesDoc { +public: + CDiagCollectInstancesDoc() : + _jobId(CAFCOMMON_GUID_NULL), + _isInitialized(false) {} + virtual ~CDiagCollectInstancesDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const UUID jobId) { + if (! _isInitialized) { + _jobId = jobId; + + _isInitialized = true; + } + } + +public: + /// Accessor for the JobId + UUID getJobId() const { + return _jobId; + } + +private: + UUID _jobId; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CDiagCollectInstancesDoc); +}; + +CAF_DECLARE_SMART_POINTER(CDiagCollectInstancesDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/DiagTypesDoc/CDiagDeleteValueCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/DiagTypesDoc/CDiagDeleteValueCollectionDoc.h new file mode 100644 index 000000000..c634e5760 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/DiagTypesDoc/CDiagDeleteValueCollectionDoc.h @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CDiagDeleteValueCollectionDoc_h_ +#define CDiagDeleteValueCollectionDoc_h_ + +namespace Caf { + +/// A simple container for objects of type DiagDeleteValueCollection +class CDiagDeleteValueCollectionDoc { +public: + CDiagDeleteValueCollectionDoc() : + _isInitialized(false) {} + virtual ~CDiagDeleteValueCollectionDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque deleteValueCollection) { + if (! _isInitialized) { + _deleteValueCollection = deleteValueCollection; + + _isInitialized = true; + } + } + +public: + /// Accessor for the DeleteValue + std::deque getDeleteValueCollection() const { + return _deleteValueCollection; + } + +private: + bool _isInitialized; + + std::deque _deleteValueCollection; + +private: + CAF_CM_DECLARE_NOCOPY(CDiagDeleteValueCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CDiagDeleteValueCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/DiagTypesDoc/CDiagDeleteValueDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/DiagTypesDoc/CDiagDeleteValueDoc.h new file mode 100644 index 000000000..b4808f7e5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/DiagTypesDoc/CDiagDeleteValueDoc.h @@ -0,0 +1,73 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CDiagDeleteValueDoc_h_ +#define CDiagDeleteValueDoc_h_ + +namespace Caf { + +/// A simple container for objects of type DiagDeleteValue +class CDiagDeleteValueDoc { +public: + CDiagDeleteValueDoc() : + _jobId(CAFCOMMON_GUID_NULL), + _isInitialized(false) {} + virtual ~CDiagDeleteValueDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const UUID jobId, + const std::string fileAlias, + const std::string valueName) { + if (! _isInitialized) { + _jobId = jobId; + _fileAlias = fileAlias; + _valueName = valueName; + + _isInitialized = true; + } + } + +public: + /// Accessor for the JobId + UUID getJobId() const { + return _jobId; + } + + /// Accessor for the FileAlias + std::string getFileAlias() const { + return _fileAlias; + } + + /// Accessor for the ValueName + std::string getValueName() const { + return _valueName; + } + +private: + UUID _jobId; + std::string _fileAlias; + std::string _valueName; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CDiagDeleteValueDoc); +}; + +CAF_DECLARE_SMART_POINTER(CDiagDeleteValueDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/DiagTypesDoc/CDiagSetValueCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/DiagTypesDoc/CDiagSetValueCollectionDoc.h new file mode 100644 index 000000000..5b75cf5e8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/DiagTypesDoc/CDiagSetValueCollectionDoc.h @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CDiagSetValueCollectionDoc_h_ +#define CDiagSetValueCollectionDoc_h_ + +namespace Caf { + +/// A simple container for objects of type DiagSetValueCollection +class CDiagSetValueCollectionDoc { +public: + CDiagSetValueCollectionDoc() : + _isInitialized(false) {} + virtual ~CDiagSetValueCollectionDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque setValueCollection) { + if (! _isInitialized) { + _setValueCollection = setValueCollection; + + _isInitialized = true; + } + } + +public: + /// Accessor for the SetValue + std::deque getSetValueCollection() const { + return _setValueCollection; + } + +private: + bool _isInitialized; + + std::deque _setValueCollection; + +private: + CAF_CM_DECLARE_NOCOPY(CDiagSetValueCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CDiagSetValueCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/DiagTypesDoc/CDiagSetValueDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/DiagTypesDoc/CDiagSetValueDoc.h new file mode 100644 index 000000000..9f641f389 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/DiagTypesDoc/CDiagSetValueDoc.h @@ -0,0 +1,73 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CDiagSetValueDoc_h_ +#define CDiagSetValueDoc_h_ + +namespace Caf { + +/// A simple container for objects of type DiagSetValue +class CDiagSetValueDoc { +public: + CDiagSetValueDoc() : + _jobId(CAFCOMMON_GUID_NULL), + _isInitialized(false) {} + virtual ~CDiagSetValueDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const UUID jobId, + const std::string fileAlias, + const SmartPtrCPropertyDoc value) { + if (! _isInitialized) { + _jobId = jobId; + _fileAlias = fileAlias; + _value = value; + + _isInitialized = true; + } + } + +public: + /// Accessor for the JobId + UUID getJobId() const { + return _jobId; + } + + /// Accessor for the FileAlias + std::string getFileAlias() const { + return _fileAlias; + } + + /// Accessor for the Value + SmartPtrCPropertyDoc getValue() const { + return _value; + } + +private: + UUID _jobId; + std::string _fileAlias; + SmartPtrCPropertyDoc _value; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CDiagSetValueDoc); +}; + +CAF_DECLARE_SMART_POINTER(CDiagSetValueDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/DiagTypesDoc/DiagTypesDocInc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/DiagTypesDoc/DiagTypesDocInc.h new file mode 100644 index 000000000..b9e82a664 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/DiagTypesDoc/DiagTypesDocInc.h @@ -0,0 +1,25 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef DIAGTYPESDOCINC_H_ +#define DIAGTYPESDOCINC_H_ + +namespace Caf { +} + +#include "CDiagDeleteValueDoc.h" +#include "CDiagDeleteValueCollectionDoc.h" + +#include "CDiagSetValueDoc.h" +#include "CDiagSetValueCollectionDoc.h" + +#include "CDiagCollectInstancesDoc.h" + +#include "CDiagBatchDoc.h" + +#endif /* DIAGTYPESDOCINC_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/MgmtRequestDoc/CMgmtRequestDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/MgmtRequestDoc/CMgmtRequestDoc.h new file mode 100644 index 000000000..9f146d0aa --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/MgmtRequestDoc/CMgmtRequestDoc.h @@ -0,0 +1,98 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CMgmtRequestDoc_h_ +#define CMgmtRequestDoc_h_ + +namespace Caf { + +/// A simple container for objects of type MgmtRequest +class CMgmtRequestDoc { +public: + CMgmtRequestDoc() : + _clientId(CAFCOMMON_GUID_NULL), + _requestId(CAFCOMMON_GUID_NULL), + _isInitialized(false) {} + virtual ~CMgmtRequestDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const UUID clientId, + const UUID requestId, + const std::string pmeId, + const SmartPtrCRequestHeaderDoc requestHeader, + const SmartPtrCMgmtBatchDoc batch, + const SmartPtrCAttachmentCollectionDoc attachmentCollection) { + if (! _isInitialized) { + _clientId = clientId; + _requestId = requestId; + _pmeId = pmeId; + _requestHeader = requestHeader; + _batch = batch; + _attachmentCollection = attachmentCollection; + + _isInitialized = true; + } + } + +public: + /// Accessor for the ClientId + UUID getClientId() const { + return _clientId; + } + + /// Accessor for the RequestId + UUID getRequestId() const { + return _requestId; + } + + /// Accessor for the PmeId + std::string getPmeId() const { + return _pmeId; + } + + /// Accessor for the RequestHeader + SmartPtrCRequestHeaderDoc getRequestHeader() const { + return _requestHeader; + } + + /// Accessor for the Batch + SmartPtrCMgmtBatchDoc getBatch() const { + return _batch; + } + + /// Accessor for the AttachmentCollection + SmartPtrCAttachmentCollectionDoc getAttachmentCollection() const { + return _attachmentCollection; + } + +private: + UUID _clientId; + UUID _requestId; + std::string _pmeId; + SmartPtrCRequestHeaderDoc _requestHeader; + SmartPtrCMgmtBatchDoc _batch; + SmartPtrCAttachmentCollectionDoc _attachmentCollection; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CMgmtRequestDoc); +}; + +CAF_DECLARE_SMART_POINTER(CMgmtRequestDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/MgmtRequestDoc/MgmtRequestDocInc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/MgmtRequestDoc/MgmtRequestDocInc.h new file mode 100644 index 000000000..91bd3b737 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/MgmtRequestDoc/MgmtRequestDocInc.h @@ -0,0 +1,17 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef MTMTREQUESTDOCINC_H_ +#define MTMTREQUESTDOCINC_H_ + +namespace Caf { +} + +#include "CMgmtRequestDoc.h" + +#endif /* MTMTREQUESTDOCINC_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/MgmtTypesDoc/CMgmtBatchDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/MgmtTypesDoc/CMgmtBatchDoc.h new file mode 100644 index 000000000..d5c47d347 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/MgmtTypesDoc/CMgmtBatchDoc.h @@ -0,0 +1,73 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CMgmtBatchDoc_h_ +#define CMgmtBatchDoc_h_ + +namespace Caf { + +/// A simple container for objects of type MgmtBatch +class CMgmtBatchDoc { +public: + CMgmtBatchDoc() : + _isInitialized(false) {} + virtual ~CMgmtBatchDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const SmartPtrCMgmtCollectSchemaDoc collectSchema, + const SmartPtrCMgmtCollectInstancesCollectionDoc collectInstancesCollection, + const SmartPtrCMgmtInvokeOperationCollectionDoc invokeOperationCollection) { + if (! _isInitialized) { + _collectSchema = collectSchema; + _collectInstancesCollection = collectInstancesCollection; + _invokeOperationCollection = invokeOperationCollection; + + _isInitialized = true; + } + } + +public: + /// Accessor for the CollectSchema + SmartPtrCMgmtCollectSchemaDoc getCollectSchema() const { + return _collectSchema; + } + + /// Accessor for the CollectInstancesCollection + SmartPtrCMgmtCollectInstancesCollectionDoc getCollectInstancesCollection() const { + return _collectInstancesCollection; + } + + /// Accessor for the InvokeOperationCollection + SmartPtrCMgmtInvokeOperationCollectionDoc getInvokeOperationCollection() const { + return _invokeOperationCollection; + } + +private: + bool _isInitialized; + + SmartPtrCMgmtCollectSchemaDoc _collectSchema; + SmartPtrCMgmtCollectInstancesCollectionDoc _collectInstancesCollection; + SmartPtrCMgmtInvokeOperationCollectionDoc _invokeOperationCollection; + +private: + CAF_CM_DECLARE_NOCOPY(CMgmtBatchDoc); +}; + +CAF_DECLARE_SMART_POINTER(CMgmtBatchDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/MgmtTypesDoc/CMgmtCollectInstancesCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/MgmtTypesDoc/CMgmtCollectInstancesCollectionDoc.h new file mode 100644 index 000000000..397cc1de3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/MgmtTypesDoc/CMgmtCollectInstancesCollectionDoc.h @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CMgmtCollectInstancesCollectionDoc_h_ +#define CMgmtCollectInstancesCollectionDoc_h_ + +namespace Caf { + +/// A simple container for objects of type MgmtCollectInstancesCollection +class CMgmtCollectInstancesCollectionDoc { +public: + CMgmtCollectInstancesCollectionDoc() : + _isInitialized(false) {} + virtual ~CMgmtCollectInstancesCollectionDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque collectInstancesCollection) { + if (! _isInitialized) { + _collectInstancesCollection = collectInstancesCollection; + + _isInitialized = true; + } + } + +public: + /// Accessor for the CollectInstances + std::deque getCollectInstancesCollection() const { + return _collectInstancesCollection; + } + +private: + bool _isInitialized; + + std::deque _collectInstancesCollection; + +private: + CAF_CM_DECLARE_NOCOPY(CMgmtCollectInstancesCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CMgmtCollectInstancesCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/MgmtTypesDoc/CMgmtCollectInstancesDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/MgmtTypesDoc/CMgmtCollectInstancesDoc.h new file mode 100644 index 000000000..c15627e1e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/MgmtTypesDoc/CMgmtCollectInstancesDoc.h @@ -0,0 +1,73 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CMgmtCollectInstancesDoc_h_ +#define CMgmtCollectInstancesDoc_h_ + +namespace Caf { + +/// A simple container for objects of type MgmtCollectInstances +class CMgmtCollectInstancesDoc { +public: + CMgmtCollectInstancesDoc() : + _jobId(CAFCOMMON_GUID_NULL), + _isInitialized(false) {} + virtual ~CMgmtCollectInstancesDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const UUID jobId, + const SmartPtrCClassSpecifierDoc classSpecifier, + const SmartPtrCParameterCollectionDoc parameterCollection) { + if (! _isInitialized) { + _jobId = jobId; + _classSpecifier = classSpecifier; + _parameterCollection = parameterCollection; + + _isInitialized = true; + } + } + +public: + /// Accessor for the JobId + UUID getJobId() const { + return _jobId; + } + + /// Accessor for the ClassSpecifier + SmartPtrCClassSpecifierDoc getClassSpecifier() const { + return _classSpecifier; + } + + /// Accessor for the ParameterCollection + SmartPtrCParameterCollectionDoc getParameterCollection() const { + return _parameterCollection; + } + +private: + UUID _jobId; + SmartPtrCClassSpecifierDoc _classSpecifier; + SmartPtrCParameterCollectionDoc _parameterCollection; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CMgmtCollectInstancesDoc); +}; + +CAF_DECLARE_SMART_POINTER(CMgmtCollectInstancesDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/MgmtTypesDoc/CMgmtCollectSchemaDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/MgmtTypesDoc/CMgmtCollectSchemaDoc.h new file mode 100644 index 000000000..4d6713f30 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/MgmtTypesDoc/CMgmtCollectSchemaDoc.h @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CMgmtCollectSchemaDoc_h_ +#define CMgmtCollectSchemaDoc_h_ + +namespace Caf { + +/// A simple container for objects of type MgmtCollectSchema +class CMgmtCollectSchemaDoc { +public: + CMgmtCollectSchemaDoc() : + _jobId(CAFCOMMON_GUID_NULL), + _isInitialized(false) {} + virtual ~CMgmtCollectSchemaDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const UUID jobId) { + if (! _isInitialized) { + _jobId = jobId; + + _isInitialized = true; + } + } + +public: + /// Accessor for the JobId + UUID getJobId() const { + return _jobId; + } + +private: + UUID _jobId; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CMgmtCollectSchemaDoc); +}; + +CAF_DECLARE_SMART_POINTER(CMgmtCollectSchemaDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/MgmtTypesDoc/CMgmtInvokeOperationCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/MgmtTypesDoc/CMgmtInvokeOperationCollectionDoc.h new file mode 100644 index 000000000..aa4b83ea8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/MgmtTypesDoc/CMgmtInvokeOperationCollectionDoc.h @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CMgmtInvokeOperationCollectionDoc_h_ +#define CMgmtInvokeOperationCollectionDoc_h_ + +namespace Caf { + +/// A simple container for objects of type MgmtInvokeOperationCollection +class CMgmtInvokeOperationCollectionDoc { +public: + CMgmtInvokeOperationCollectionDoc() : + _isInitialized(false) {} + virtual ~CMgmtInvokeOperationCollectionDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque invokeOperationCollection) { + if (! _isInitialized) { + _invokeOperationCollection = invokeOperationCollection; + + _isInitialized = true; + } + } + +public: + /// Accessor for the InvokeOperation + std::deque getInvokeOperationCollection() const { + return _invokeOperationCollection; + } + +private: + bool _isInitialized; + + std::deque _invokeOperationCollection; + +private: + CAF_CM_DECLARE_NOCOPY(CMgmtInvokeOperationCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CMgmtInvokeOperationCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/MgmtTypesDoc/CMgmtInvokeOperationDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/MgmtTypesDoc/CMgmtInvokeOperationDoc.h new file mode 100644 index 000000000..bc4748df6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/MgmtTypesDoc/CMgmtInvokeOperationDoc.h @@ -0,0 +1,73 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CMgmtInvokeOperationDoc_h_ +#define CMgmtInvokeOperationDoc_h_ + +namespace Caf { + +/// A simple container for objects of type MgmtInvokeOperation +class CMgmtInvokeOperationDoc { +public: + CMgmtInvokeOperationDoc() : + _jobId(CAFCOMMON_GUID_NULL), + _isInitialized(false) {} + virtual ~CMgmtInvokeOperationDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const UUID jobId, + const SmartPtrCClassSpecifierDoc classSpecifier, + const SmartPtrCOperationDoc operation) { + if (! _isInitialized) { + _jobId = jobId; + _classSpecifier = classSpecifier; + _operation = operation; + + _isInitialized = true; + } + } + +public: + /// Accessor for the JobId + UUID getJobId() const { + return _jobId; + } + + /// Accessor for the ClassSpecifier + SmartPtrCClassSpecifierDoc getClassSpecifier() const { + return _classSpecifier; + } + + /// Accessor for the Operation + SmartPtrCOperationDoc getOperation() const { + return _operation; + } + +private: + UUID _jobId; + SmartPtrCClassSpecifierDoc _classSpecifier; + SmartPtrCOperationDoc _operation; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CMgmtInvokeOperationDoc); +}; + +CAF_DECLARE_SMART_POINTER(CMgmtInvokeOperationDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/MgmtTypesDoc/MgmtTypesDocInc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/MgmtTypesDoc/MgmtTypesDocInc.h new file mode 100644 index 000000000..06f4f8c17 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/MgmtTypesDoc/MgmtTypesDocInc.h @@ -0,0 +1,25 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef MGMTTYPESDOCINC_H_ +#define MGMTTYPESDOCINC_H_ + +namespace Caf { +} + +#include "CMgmtCollectSchemaDoc.h" + +#include "CMgmtCollectInstancesDoc.h" +#include "CMgmtCollectInstancesCollectionDoc.h" + +#include "CMgmtInvokeOperationDoc.h" +#include "CMgmtInvokeOperationCollectionDoc.h" + +#include "CMgmtBatchDoc.h" + +#endif /* MGMTTYPESDOCINC_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtBatchCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtBatchCollectionDoc.h new file mode 100644 index 000000000..9d57e6ecd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtBatchCollectionDoc.h @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CMultiPmeMgmtBatchCollectionDoc_h_ +#define CMultiPmeMgmtBatchCollectionDoc_h_ + +namespace Caf { + +/// A simple container for objects of type MultiPmeMgmtBatchCollection +class CMultiPmeMgmtBatchCollectionDoc { +public: + CMultiPmeMgmtBatchCollectionDoc() : + _isInitialized(false) {} + virtual ~CMultiPmeMgmtBatchCollectionDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque multiPmeBatch) { + if (! _isInitialized) { + _multiPmeBatch = multiPmeBatch; + + _isInitialized = true; + } + } + +public: + /// Accessor for the MultiPmeBatch + std::deque getMultiPmeBatch() const { + return _multiPmeBatch; + } + +private: + bool _isInitialized; + + std::deque _multiPmeBatch; + +private: + CAF_CM_DECLARE_NOCOPY(CMultiPmeMgmtBatchCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CMultiPmeMgmtBatchCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtBatchDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtBatchDoc.h new file mode 100644 index 000000000..0af331d90 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtBatchDoc.h @@ -0,0 +1,65 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CMultiPmeMgmtBatchDoc_h_ +#define CMultiPmeMgmtBatchDoc_h_ + +namespace Caf { + +/// A simple container for objects of type MultiPmeMgmtBatch +class CMultiPmeMgmtBatchDoc { +public: + CMultiPmeMgmtBatchDoc() : + _isInitialized(false) {} + virtual ~CMultiPmeMgmtBatchDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const SmartPtrCPmeIdCollectionDoc pmeIdCollection, + const SmartPtrCMgmtBatchDoc batch) { + if (! _isInitialized) { + _pmeIdCollection = pmeIdCollection; + _batch = batch; + + _isInitialized = true; + } + } + +public: + /// Accessor for the PmeIdCollection + SmartPtrCPmeIdCollectionDoc getPmeIdCollection() const { + return _pmeIdCollection; + } + + /// Accessor for the Batch + SmartPtrCMgmtBatchDoc getBatch() const { + return _batch; + } + +private: + bool _isInitialized; + + SmartPtrCPmeIdCollectionDoc _pmeIdCollection; + SmartPtrCMgmtBatchDoc _batch; + +private: + CAF_CM_DECLARE_NOCOPY(CMultiPmeMgmtBatchDoc); +}; + +CAF_DECLARE_SMART_POINTER(CMultiPmeMgmtBatchDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtRequestDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtRequestDoc.h new file mode 100644 index 000000000..6c04429da --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtRequestDoc.h @@ -0,0 +1,82 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CMultiPmeMgmtRequestDoc_h_ +#define CMultiPmeMgmtRequestDoc_h_ + +namespace Caf { + +/// A simple container for objects of type MultiPmeMgmtRequest +class CMultiPmeMgmtRequestDoc { +public: + CMultiPmeMgmtRequestDoc() : + _clientId(CAFCOMMON_GUID_NULL), + _requestId(CAFCOMMON_GUID_NULL), + _isInitialized(false) {} + virtual ~CMultiPmeMgmtRequestDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const UUID clientId, + const UUID requestId, + const SmartPtrCRequestHeaderDoc requestHeader, + const SmartPtrCMultiPmeMgmtBatchCollectionDoc multiPmeBatchCollection) { + if (! _isInitialized) { + _clientId = clientId; + _requestId = requestId; + _requestHeader = requestHeader; + _multiPmeBatchCollection = multiPmeBatchCollection; + + _isInitialized = true; + } + } + +public: + /// Accessor for the ClientId + UUID getClientId() const { + return _clientId; + } + + /// Accessor for the RequestId + UUID getRequestId() const { + return _requestId; + } + + /// Accessor for the RequestHeader + SmartPtrCRequestHeaderDoc getRequestHeader() const { + return _requestHeader; + } + + /// Accessor for the MultiPmeBatchCollection + SmartPtrCMultiPmeMgmtBatchCollectionDoc getMultiPmeBatchCollection() const { + return _multiPmeBatchCollection; + } + +private: + UUID _clientId; + UUID _requestId; + SmartPtrCRequestHeaderDoc _requestHeader; + SmartPtrCMultiPmeMgmtBatchCollectionDoc _multiPmeBatchCollection; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CMultiPmeMgmtRequestDoc); +}; + +CAF_DECLARE_SMART_POINTER(CMultiPmeMgmtRequestDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/MultiPmeMgmtRequestDoc/CPmeIdCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/MultiPmeMgmtRequestDoc/CPmeIdCollectionDoc.h new file mode 100644 index 000000000..e560c463c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/MultiPmeMgmtRequestDoc/CPmeIdCollectionDoc.h @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CPmeIdCollectionDoc_h_ +#define CPmeIdCollectionDoc_h_ + +namespace Caf { + +/// A simple container for objects of type PmeIdCollection +class CPmeIdCollectionDoc { +public: + CPmeIdCollectionDoc() : + _isInitialized(false) {} + virtual ~CPmeIdCollectionDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque pmeIdCollection) { + if (! _isInitialized) { + _pmeIdCollection = pmeIdCollection; + + _isInitialized = true; + } + } + +public: + /// Accessor for the PmeId + std::deque getPmeIdCollection() const { + return _pmeIdCollection; + } + +private: + bool _isInitialized; + + std::deque _pmeIdCollection; + +private: + CAF_CM_DECLARE_NOCOPY(CPmeIdCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CPmeIdCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/MultiPmeMgmtRequestDoc/MultiPmeMgmtRequestDocInc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/MultiPmeMgmtRequestDoc/MultiPmeMgmtRequestDocInc.h new file mode 100644 index 000000000..e8fd153f6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/MultiPmeMgmtRequestDoc/MultiPmeMgmtRequestDocInc.h @@ -0,0 +1,17 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef MULTIPMEMGMTREQUESTDOCINC_H_ +#define MULTIPMEMGMTREQUESTDOCINC_H_ + +#include "CPmeIdCollectionDoc.h" +#include "CMultiPmeMgmtBatchDoc.h" +#include "CMultiPmeMgmtBatchCollectionDoc.h" +#include "CMultiPmeMgmtRequestDoc.h" + +#endif /* MULTIPMEMGMTREQUESTDOCINC_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/PayloadEnvelopeDoc/CPayloadEnvelopeDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/PayloadEnvelopeDoc/CPayloadEnvelopeDoc.h new file mode 100644 index 000000000..b77dd62cd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/PayloadEnvelopeDoc/CPayloadEnvelopeDoc.h @@ -0,0 +1,119 @@ +/* + * Author: bwilliams + * Created: July 3, 2015 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + */ + +#ifndef CPayloadEnvelopeDoc_h_ +#define CPayloadEnvelopeDoc_h_ + +namespace Caf { + +/// A simple container for objects of type PayloadEnvelope +class CPayloadEnvelopeDoc { +public: + CPayloadEnvelopeDoc() : + _clientId(CAFCOMMON_GUID_NULL), + _requestId(CAFCOMMON_GUID_NULL), + _isInitialized(false) {} + virtual ~CPayloadEnvelopeDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const UUID& clientId, + const UUID& requestId, + const std::string& pmeId, + const std::string& payloadType, + const std::string& payloadVersion, + const SmartPtrCAttachmentCollectionDoc& attachmentCollection, + const SmartPtrCProtocolCollectionDoc& protocolCollection = SmartPtrCProtocolCollectionDoc(), + const SmartPtrCPropertyCollectionDoc& headerCollection = SmartPtrCPropertyCollectionDoc(), + const std::string version = "1.0") { + if (! _isInitialized) { + _clientId = clientId; + _requestId = requestId; + _pmeId = pmeId; + _payloadType = payloadType; + _payloadVersion = payloadVersion; + _attachmentCollection = attachmentCollection; + _protocolCollection = protocolCollection; + _headerCollection = headerCollection; + _version = version; + + _isInitialized = true; + } + } + +public: + /// Accessor for the ClientId + UUID getClientId() const { + return _clientId; + } + + /// Accessor for the RequestId + UUID getRequestId() const { + return _requestId; + } + + /// Accessor for the PmeId + std::string getPmeId() const { + return _pmeId; + } + + /// Accessor for the PayloadType + std::string getPayloadType() const { + return _payloadType; + } + + /// Accessor for the PayloadVersion + std::string getPayloadVersion() const { + return _payloadVersion; + } + + /// Accessor for the Protocol Collection + SmartPtrCProtocolCollectionDoc getProtocolCollection() const { + return _protocolCollection; + } + + /// Accessor for the AttachmentCollection + SmartPtrCAttachmentCollectionDoc getAttachmentCollection() const { + return _attachmentCollection; + } + + /// Accessor for the Headers + SmartPtrCPropertyCollectionDoc getHeaderCollection() const { + return _headerCollection; + } + + /// Accessor for the version + std::string getVersion() const { + return _version; + } + +private: + UUID _clientId; + UUID _requestId; + std::string _pmeId; + std::string _payloadType; + std::string _payloadVersion; + SmartPtrCAttachmentCollectionDoc _attachmentCollection; + SmartPtrCProtocolCollectionDoc _protocolCollection; + SmartPtrCPropertyCollectionDoc _headerCollection; + std::string _version; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CPayloadEnvelopeDoc); +}; + +CAF_DECLARE_SMART_POINTER(CPayloadEnvelopeDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/PayloadEnvelopeDoc/PayloadEnvelopeDocInc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/PayloadEnvelopeDoc/PayloadEnvelopeDocInc.h new file mode 100644 index 000000000..076ee6d6e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/PayloadEnvelopeDoc/PayloadEnvelopeDocInc.h @@ -0,0 +1,14 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef PayloadEnvelopeDocInc_H_ +#define PayloadEnvelopeDocInc_H_ + +#include "CPayloadEnvelopeDoc.h" + +#endif /* PayloadEnvelopeDocInc_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/PersistenceDoc/CAmqpBrokerCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/PersistenceDoc/CAmqpBrokerCollectionDoc.h new file mode 100644 index 000000000..96e2103d3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/PersistenceDoc/CAmqpBrokerCollectionDoc.h @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CAmqpBrokerCollectionDoc_h_ +#define CAmqpBrokerCollectionDoc_h_ + +namespace Caf { + +/// A simple container for objects of type AmqpBrokerCollection +class CAmqpBrokerCollectionDoc { +public: + CAmqpBrokerCollectionDoc() : + _isInitialized(false) {} + virtual ~CAmqpBrokerCollectionDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque amqpBroker = std::deque()) { + if (! _isInitialized) { + _amqpBroker = amqpBroker; + + _isInitialized = true; + } + } + +public: + /// Accessor for the AmqpBroker + std::deque getAmqpBroker() const { + return _amqpBroker; + } + +private: + bool _isInitialized; + + std::deque _amqpBroker; + +private: + CAF_CM_DECLARE_NOCOPY(CAmqpBrokerCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CAmqpBrokerCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/PersistenceDoc/CAmqpBrokerDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/PersistenceDoc/CAmqpBrokerDoc.h new file mode 100644 index 000000000..696219964 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/PersistenceDoc/CAmqpBrokerDoc.h @@ -0,0 +1,112 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (c) 2015 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + */ + +#ifndef CAmqpBrokerDoc_h_ +#define CAmqpBrokerDoc_h_ + +namespace Caf { + +/// A simple container for objects of type CAmqpBrokerDoc +class CAmqpBrokerDoc { +public: + CAmqpBrokerDoc() : + _isInitialized(false) {} + virtual ~CAmqpBrokerDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string& amqpBrokerId = std::string(), + const std::string& uri = std::string(), + const std::string& tlsCert = std::string(), + const std::string& tlsProtocol = std::string(), + const Cdeqstr& tlsCipherCollection = Cdeqstr(), + const SmartPtrCCertCollectionDoc& tlsCertCollection = SmartPtrCCertCollectionDoc(), + const std::string& tlsCertPath = std::string(), + const SmartPtrCCertPathCollectionDoc& tlsCertPathCollection = SmartPtrCCertPathCollectionDoc()) { + if (! _isInitialized) { + _amqpBrokerId = amqpBrokerId; + _uri = uri; + _tlsCert = tlsCert; + _tlsProtocol = tlsProtocol; + _tlsCipherCollection = tlsCipherCollection; + _tlsCertCollection = tlsCertCollection; + + _tlsCertPath = tlsCertPath; + _tlsCertPathCollection = tlsCertPathCollection; + + _isInitialized = true; + } + } + +public: + /// Accessor for the AmqpBrokerId + std::string getAmqpBrokerId() const { + return _amqpBrokerId; + } + + /// Accessor for the Uri + std::string getUri() const { + return _uri; + } + + /// Accessor for the TlsCert + std::string getTlsCert() const { + return _tlsCert; + } + + /// Accessor for the TlsProtocol + std::string getTlsProtocol() const { + return _tlsProtocol; + } + + /// Accessor for the tlsCipherCollection + Cdeqstr getTlsCipherCollection() const { + return _tlsCipherCollection; + } + + /// Accessor for the TlsCertCollection + SmartPtrCCertCollectionDoc getTlsCertCollection() const { + return _tlsCertCollection; + } + + /// Accessor for the TlsCertPath + std::string getTlsCertPath() const { + return _tlsCertPath; + } + + /// Accessor for the TlsCertPathCollection + SmartPtrCCertPathCollectionDoc getTlsCertPathCollection() const { + return _tlsCertPathCollection; + } + +private: + std::string _amqpBrokerId; + std::string _uri; + std::string _tlsCert; + std::string _tlsProtocol; + Cdeqstr _tlsCipherCollection; + SmartPtrCCertCollectionDoc _tlsCertCollection; + + std::string _tlsCertPath; + SmartPtrCCertPathCollectionDoc _tlsCertPathCollection; + + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CAmqpBrokerDoc); +}; + +CAF_DECLARE_SMART_POINTER(CAmqpBrokerDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/PersistenceDoc/CCertCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/PersistenceDoc/CCertCollectionDoc.h new file mode 100644 index 000000000..505967b0b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/PersistenceDoc/CCertCollectionDoc.h @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CCertCollectionDoc_h_ +#define CCertCollectionDoc_h_ + +namespace Caf { + +/// A simple container for objects of type CertCollection +class CCertCollectionDoc { +public: + CCertCollectionDoc() : + _isInitialized(false) {} + virtual ~CCertCollectionDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque certCollection = std::deque()) { + if (! _isInitialized) { + _certCollection = certCollection; + + _isInitialized = true; + } + } + +public: + /// Accessor for the Cert + std::deque getCert() const { + return _certCollection; + } + +private: + bool _isInitialized; + + std::deque _certCollection; + +private: + CAF_CM_DECLARE_NOCOPY(CCertCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CCertCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/PersistenceDoc/CCertPathCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/PersistenceDoc/CCertPathCollectionDoc.h new file mode 100644 index 000000000..871c11677 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/PersistenceDoc/CCertPathCollectionDoc.h @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CCertPathCollectionDoc_h_ +#define CCertPathCollectionDoc_h_ + +namespace Caf { + +/// A simple container for objects of type CertPathCollection +class CCertPathCollectionDoc { +public: + CCertPathCollectionDoc() : + _isInitialized(false) {} + virtual ~CCertPathCollectionDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque certPathCollection = std::deque()) { + if (! _isInitialized) { + _certPathCollection = certPathCollection; + + _isInitialized = true; + } + } + +public: + /// Accessor for the Cert + std::deque getCertPath() const { + return _certPathCollection; + } + +private: + bool _isInitialized; + + std::deque _certPathCollection; + +private: + CAF_CM_DECLARE_NOCOPY(CCertPathCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CCertPathCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/PersistenceDoc/CLocalSecurityDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/PersistenceDoc/CLocalSecurityDoc.h new file mode 100644 index 000000000..fd99ab2d8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/PersistenceDoc/CLocalSecurityDoc.h @@ -0,0 +1,88 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (c) 2015 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + */ + +#ifndef CLocalSecurityDoc_h_ +#define CLocalSecurityDoc_h_ + +namespace Caf { + +/// A simple container for objects of type CLocalSecurityDoc +class CLocalSecurityDoc { +public: + CLocalSecurityDoc() : + _isInitialized(false) {} + virtual ~CLocalSecurityDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string& localId = std::string(), + const std::string& privateKey = std::string(), + const std::string& cert = std::string(), + const std::string& privateKeyPath = std::string(), + const std::string& certPath = std::string()) { + if (! _isInitialized) { + _localId = localId; + _privateKey = privateKey; + _cert = cert; + + _privateKeyPath = privateKeyPath; + _certPath = certPath; + + _isInitialized = true; + } + } + +public: + /// Accessor for the LocalId + std::string getLocalId() const { + return _localId; + } + + /// Accessor for the PrivateKey + std::string getPrivateKey() const { + return _privateKey; + } + + /// Accessor for the Cert + std::string getCert() const { + return _cert; + } + + /// Accessor for the PrivateKeyPath + std::string getPrivateKeyPath() const { + return _privateKeyPath; + } + + /// Accessor for the CertPath + std::string getCertPath() const { + return _certPath; + } + +private: + std::string _localId; + std::string _privateKey; + std::string _cert; + + std::string _privateKeyPath; + std::string _certPath; + + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CLocalSecurityDoc); +}; + +CAF_DECLARE_SMART_POINTER(CLocalSecurityDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/PersistenceDoc/CPersistenceDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/PersistenceDoc/CPersistenceDoc.h new file mode 100644 index 000000000..0504ee6b9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/PersistenceDoc/CPersistenceDoc.h @@ -0,0 +1,78 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (c) 2015 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + */ + +#ifndef CPersistenceDoc_h_ +#define CPersistenceDoc_h_ + +namespace Caf { + +/// A simple container for objects of type PersistenceEnvelope +class CPersistenceDoc { +public: + CPersistenceDoc() : + _isInitialized(false) {} + virtual ~CPersistenceDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const SmartPtrCLocalSecurityDoc& localSecurity = SmartPtrCLocalSecurityDoc(), + const SmartPtrCRemoteSecurityCollectionDoc& remoteSecurityCollection = SmartPtrCRemoteSecurityCollectionDoc(), + const SmartPtrCPersistenceProtocolDoc& persistenceProtocol = SmartPtrCPersistenceProtocolDoc(), + const std::string version = "1.0") { + if (! _isInitialized) { + _localSecurity = localSecurity; + _remoteSecurityCollection = remoteSecurityCollection; + _persistenceProtocol = persistenceProtocol; + _version = version; + + _isInitialized = true; + } + } + +public: + /// Accessor for the LocalSecurity + SmartPtrCLocalSecurityDoc getLocalSecurity() const { + return _localSecurity; + } + + /// Accessor for the Protocol Collection + SmartPtrCRemoteSecurityCollectionDoc getRemoteSecurityCollection() const { + return _remoteSecurityCollection; + } + + /// Accessor for the PersistenceProtocol + SmartPtrCPersistenceProtocolDoc getPersistenceProtocol() const { + return _persistenceProtocol; + } + + /// Accessor for the version + std::string getVersion() const { + return _version; + } + +private: + SmartPtrCLocalSecurityDoc _localSecurity; + SmartPtrCRemoteSecurityCollectionDoc _remoteSecurityCollection; + SmartPtrCPersistenceProtocolDoc _persistenceProtocol; + std::string _version; + + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CPersistenceDoc); +}; + +CAF_DECLARE_SMART_POINTER(CPersistenceDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/PersistenceDoc/CPersistenceProtocolDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/PersistenceDoc/CPersistenceProtocolDoc.h new file mode 100644 index 000000000..72af9a42b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/PersistenceDoc/CPersistenceProtocolDoc.h @@ -0,0 +1,54 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (c) 2015 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + */ + +#ifndef CPersistenceProtocolDoc_h_ +#define CPersistenceProtocolDoc_h_ + +namespace Caf { + +/// A simple container for objects of type CPersistenceProtocolDoc +class CPersistenceProtocolDoc { +public: + CPersistenceProtocolDoc() : + _isInitialized(false) {} + virtual ~CPersistenceProtocolDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const SmartPtrCAmqpBrokerCollectionDoc& amqpBrokerCollection = SmartPtrCAmqpBrokerCollectionDoc()) { + if (! _isInitialized) { + _amqpBrokerCollection = amqpBrokerCollection; + + _isInitialized = true; + } + } + +public: + /// Accessor for the AmqpBrokerCollection + SmartPtrCAmqpBrokerCollectionDoc getAmqpBrokerCollection() const { + return _amqpBrokerCollection; + } + +private: + SmartPtrCAmqpBrokerCollectionDoc _amqpBrokerCollection; + + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CPersistenceProtocolDoc); +}; + +CAF_DECLARE_SMART_POINTER(CPersistenceProtocolDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/PersistenceDoc/CRemoteSecurityCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/PersistenceDoc/CRemoteSecurityCollectionDoc.h new file mode 100644 index 000000000..978b59fb1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/PersistenceDoc/CRemoteSecurityCollectionDoc.h @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CRemoteSecurityCollectionDoc_h_ +#define CRemoteSecurityCollectionDoc_h_ + +namespace Caf { + +/// A simple container for objects of type RemoteSecurityCollection +class CRemoteSecurityCollectionDoc { +public: + CRemoteSecurityCollectionDoc() : + _isInitialized(false) {} + virtual ~CRemoteSecurityCollectionDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque remoteSecurity = std::deque()) { + if (! _isInitialized) { + _remoteSecurity = remoteSecurity; + + _isInitialized = true; + } + } + +public: + /// Accessor for the RemoteSecurity + std::deque getRemoteSecurity() const { + return _remoteSecurity; + } + +private: + bool _isInitialized; + + std::deque _remoteSecurity; + +private: + CAF_CM_DECLARE_NOCOPY(CRemoteSecurityCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CRemoteSecurityCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/PersistenceDoc/CRemoteSecurityDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/PersistenceDoc/CRemoteSecurityDoc.h new file mode 100644 index 000000000..9411fc565 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/PersistenceDoc/CRemoteSecurityDoc.h @@ -0,0 +1,104 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (c) 2015 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + */ + +#ifndef CRemoteSecurityDoc_h_ +#define CRemoteSecurityDoc_h_ + +namespace Caf { + +/// A simple container for objects of type CRemoteSecurityDoc +class CRemoteSecurityDoc { +public: + CRemoteSecurityDoc() : + _isInitialized(false) {} + virtual ~CRemoteSecurityDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string& remoteId = std::string(), + const std::string& protocolName = std::string(), + const std::string& cmsCert = std::string(), + const std::string& cmsCipherName = std::string(), + const SmartPtrCCertCollectionDoc& cmsCertCollection = SmartPtrCCertCollectionDoc(), + const std::string& cmsCertPath = std::string(), + const SmartPtrCCertPathCollectionDoc& cmsCertPathCollection = SmartPtrCCertPathCollectionDoc()) { + if (! _isInitialized) { + _remoteId = remoteId; + _protocolName = protocolName; + _cmsCert = cmsCert; + _cmsCipherName = cmsCipherName; + _cmsCertCollection = cmsCertCollection; + + _cmsCertPath = cmsCertPath; + _cmsCertPathCollection = cmsCertPathCollection; + + _isInitialized = true; + } + } + +public: + /// Accessor for the RemoteId + std::string getRemoteId() const { + return _remoteId; + } + + /// Accessor for the ProtocolName + std::string getProtocolName() const { + return _protocolName; + } + + /// Accessor for the cmsCert + std::string getCmsCert() const { + return _cmsCert; + } + + /// Accessor for the CmsCipher + std::string getCmsCipherName() const { + return _cmsCipherName; + } + + /// Accessor for the CertCollection + SmartPtrCCertCollectionDoc getCmsCertCollection() const { + return _cmsCertCollection; + } + + /// Accessor for the cmsCertPath + std::string getCmsCertPath() const { + return _cmsCertPath; + } + + /// Accessor for the CertPathCollection + SmartPtrCCertPathCollectionDoc getCmsCertPathCollection() const { + return _cmsCertPathCollection; + } + +private: + std::string _remoteId; + std::string _protocolName; + std::string _cmsCert; + std::string _cmsCipherName; + SmartPtrCCertCollectionDoc _cmsCertCollection; + + std::string _cmsCertPath; + SmartPtrCCertPathCollectionDoc _cmsCertPathCollection; + + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CRemoteSecurityDoc); +}; + +CAF_DECLARE_SMART_POINTER(CRemoteSecurityDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/PersistenceDoc/PersistenceDocInc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/PersistenceDoc/PersistenceDocInc.h new file mode 100644 index 000000000..96bc18782 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/PersistenceDoc/PersistenceDocInc.h @@ -0,0 +1,22 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef PersistenceDocInc_H_ +#define PersistenceDocInc_H_ + +#include "CCertCollectionDoc.h" +#include "CCertPathCollectionDoc.h" +#include "CAmqpBrokerDoc.h" +#include "CAmqpBrokerCollectionDoc.h" +#include "CRemoteSecurityDoc.h" +#include "CRemoteSecurityCollectionDoc.h" +#include "CLocalSecurityDoc.h" +#include "CPersistenceProtocolDoc.h" +#include "CPersistenceDoc.h" + +#endif /* PersistenceDocInc_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderInfraDoc/CClassCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderInfraDoc/CClassCollectionDoc.h new file mode 100644 index 000000000..5a5ffbab1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderInfraDoc/CClassCollectionDoc.h @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CClassCollectionDoc_h_ +#define CClassCollectionDoc_h_ + +namespace Caf { + +/// A simple container for objects of type ClassCollection +class CClassCollectionDoc { +public: + CClassCollectionDoc() : + _isInitialized(false) {} + virtual ~CClassCollectionDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque fullyQualifiedClass) { + if (! _isInitialized) { + _fullyQualifiedClass = fullyQualifiedClass; + + _isInitialized = true; + } + } + +public: + /// Accessor for the FullyQualifiedClass + std::deque getFullyQualifiedClass() const { + return _fullyQualifiedClass; + } + +private: + bool _isInitialized; + + std::deque _fullyQualifiedClass; + +private: + CAF_CM_DECLARE_NOCOPY(CClassCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CClassCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderInfraDoc/CProviderRegDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderInfraDoc/CProviderRegDoc.h new file mode 100644 index 000000000..bf8a632f5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderInfraDoc/CProviderRegDoc.h @@ -0,0 +1,98 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CProviderRegDoc_h_ +#define CProviderRegDoc_h_ + +namespace Caf { + +/// A simple container for objects of type ProviderReg +class CProviderRegDoc { +public: + CProviderRegDoc() : + _staleSec(0), + _isSchemaVisible(false), + _isInitialized(false) {} + virtual ~CProviderRegDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string providerNamespace, + const std::string providerName, + const std::string providerVersion, + const int32 staleSec, + const bool isSchemaVisible, + const std::string invokerRelPath) { + if (! _isInitialized) { + _providerNamespace = providerNamespace; + _providerName = providerName; + _providerVersion = providerVersion; + _staleSec = staleSec; + _isSchemaVisible = isSchemaVisible; + _invokerRelPath = invokerRelPath; + + _isInitialized = true; + } + } + +public: + /// Accessor for the ProviderNamespace + std::string getProviderNamespace() const { + return _providerNamespace; + } + + /// Accessor for the ProviderName + std::string getProviderName() const { + return _providerName; + } + + /// Accessor for the ProviderVersion + std::string getProviderVersion() const { + return _providerVersion; + } + + /// Accessor for the StaleSec + int32 getStaleSec() const { + return _staleSec; + } + + /// Accessor for the IsSchemaVisible + bool getIsSchemaVisible() const { + return _isSchemaVisible; + } + + /// Accessor for the InvokerRelPath + std::string getInvokerRelPath() const { + return _invokerRelPath; + } + +private: + std::string _providerNamespace; + std::string _providerName; + std::string _providerVersion; + int32 _staleSec; + bool _isSchemaVisible; + std::string _invokerRelPath; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CProviderRegDoc); +}; + +CAF_DECLARE_SMART_POINTER(CProviderRegDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderInfraDoc/CSchemaSummaryDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderInfraDoc/CSchemaSummaryDoc.h new file mode 100644 index 000000000..08d3e33c3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderInfraDoc/CSchemaSummaryDoc.h @@ -0,0 +1,89 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CSchemaSummaryDoc_h_ +#define CSchemaSummaryDoc_h_ + +namespace Caf { + +/// A simple container for objects of type SchemaSummary +class CSchemaSummaryDoc { +public: + CSchemaSummaryDoc() : + _isInitialized(false) {} + virtual ~CSchemaSummaryDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string providerNamespace, + const std::string providerName, + const std::string providerVersion, + const SmartPtrCClassCollectionDoc classCollection, + const std::string invokerPath) { + if (! _isInitialized) { + _providerNamespace = providerNamespace; + _providerName = providerName; + _providerVersion = providerVersion; + _classCollection = classCollection; + _invokerPath = invokerPath; + + _isInitialized = true; + } + } + +public: + /// Accessor for the ProviderNamespace + std::string getProviderNamespace() const { + return _providerNamespace; + } + + /// Accessor for the ProviderName + std::string getProviderName() const { + return _providerName; + } + + /// Accessor for the ProviderVersion + std::string getProviderVersion() const { + return _providerVersion; + } + + /// Accessor for the ClassCollection + SmartPtrCClassCollectionDoc getClassCollection() const { + return _classCollection; + } + + /// Accessor for the InvokerPath + std::string getInvokerPath() const { + return _invokerPath; + } + +private: + bool _isInitialized; + + std::string _providerNamespace; + std::string _providerName; + std::string _providerVersion; + SmartPtrCClassCollectionDoc _classCollection; + std::string _invokerPath; + +private: + CAF_CM_DECLARE_NOCOPY(CSchemaSummaryDoc); +}; + +CAF_DECLARE_SMART_POINTER(CSchemaSummaryDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderInfraDoc/ProviderInfraDocInc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderInfraDoc/ProviderInfraDocInc.h new file mode 100644 index 000000000..7854841ed --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderInfraDoc/ProviderInfraDocInc.h @@ -0,0 +1,16 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef PROVIDERINFRADOCINC_H_ +#define PROVIDERINFRADOCINC_H_ + +#include "CClassCollectionDoc.h" +#include "CProviderRegDoc.h" +#include "CSchemaSummaryDoc.h" + +#endif /* PROVIDERINFRADOCINC_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderRequestDoc/CProviderBatchDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderRequestDoc/CProviderBatchDoc.h new file mode 100644 index 000000000..595230323 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderRequestDoc/CProviderBatchDoc.h @@ -0,0 +1,73 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CProviderBatchDoc_h_ +#define CProviderBatchDoc_h_ + +namespace Caf { + +/// A simple container for objects of type ProviderBatch +class CProviderBatchDoc { +public: + CProviderBatchDoc() : + _isInitialized(false) {} + virtual ~CProviderBatchDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string outputDir, + const SmartPtrCProviderCollectInstancesCollectionDoc collectInstancesCollection, + const SmartPtrCProviderInvokeOperationCollectionDoc invokeOperationCollection) { + if (! _isInitialized) { + _outputDir = outputDir; + _collectInstancesCollection = collectInstancesCollection; + _invokeOperationCollection = invokeOperationCollection; + + _isInitialized = true; + } + } + +public: + /// Accessor for the OutputDir + std::string getOutputDir() const { + return _outputDir; + } + + /// Accessor for the CollectInstancesCollection + SmartPtrCProviderCollectInstancesCollectionDoc getCollectInstancesCollection() const { + return _collectInstancesCollection; + } + + /// Accessor for the InvokeOperationCollection + SmartPtrCProviderInvokeOperationCollectionDoc getInvokeOperationCollection() const { + return _invokeOperationCollection; + } + +private: + bool _isInitialized; + + std::string _outputDir; + SmartPtrCProviderCollectInstancesCollectionDoc _collectInstancesCollection; + SmartPtrCProviderInvokeOperationCollectionDoc _invokeOperationCollection; + +private: + CAF_CM_DECLARE_NOCOPY(CProviderBatchDoc); +}; + +CAF_DECLARE_SMART_POINTER(CProviderBatchDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderRequestDoc/CProviderCollectInstancesCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderRequestDoc/CProviderCollectInstancesCollectionDoc.h new file mode 100644 index 000000000..f2702147d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderRequestDoc/CProviderCollectInstancesCollectionDoc.h @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CProviderCollectInstancesCollectionDoc_h_ +#define CProviderCollectInstancesCollectionDoc_h_ + +namespace Caf { + +/// A simple container for objects of type ProviderCollectInstancesCollection +class CProviderCollectInstancesCollectionDoc { +public: + CProviderCollectInstancesCollectionDoc() : + _isInitialized(false) {} + virtual ~CProviderCollectInstancesCollectionDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque collectInstances) { + if (! _isInitialized) { + _collectInstances = collectInstances; + + _isInitialized = true; + } + } + +public: + /// Accessor for the CollectInstances + std::deque getCollectInstances() const { + return _collectInstances; + } + +private: + bool _isInitialized; + + std::deque _collectInstances; + +private: + CAF_CM_DECLARE_NOCOPY(CProviderCollectInstancesCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CProviderCollectInstancesCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderRequestDoc/CProviderCollectInstancesDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderRequestDoc/CProviderCollectInstancesDoc.h new file mode 100644 index 000000000..768ba550d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderRequestDoc/CProviderCollectInstancesDoc.h @@ -0,0 +1,97 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CProviderCollectInstancesDoc_h_ +#define CProviderCollectInstancesDoc_h_ + +namespace Caf { + +/// A simple container for objects of type ProviderCollectInstances +class CProviderCollectInstancesDoc { +public: + CProviderCollectInstancesDoc() : + _jobId(CAFCOMMON_GUID_NULL), + _isInitialized(false) {} + virtual ~CProviderCollectInstancesDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string classNamespace, + const std::string className, + const std::string classVersion, + const UUID jobId, + const std::string outputDir, + const SmartPtrCParameterCollectionDoc parameterCollection) { + if (! _isInitialized) { + _classNamespace = classNamespace; + _className = className; + _classVersion = classVersion; + _jobId = jobId; + _outputDir = outputDir; + _parameterCollection = parameterCollection; + + _isInitialized = true; + } + } + +public: + /// Accessor for the ClassNamespace + std::string getClassNamespace() const { + return _classNamespace; + } + + /// Accessor for the ClassName + std::string getClassName() const { + return _className; + } + + /// Accessor for the ClassVersion + std::string getClassVersion() const { + return _classVersion; + } + + /// Accessor for the JobId + UUID getJobId() const { + return _jobId; + } + + /// Accessor for the OutputDir + std::string getOutputDir() const { + return _outputDir; + } + + /// Accessor for the ParameterCollection + SmartPtrCParameterCollectionDoc getParameterCollection() const { + return _parameterCollection; + } + +private: + std::string _classNamespace; + std::string _className; + std::string _classVersion; + UUID _jobId; + std::string _outputDir; + SmartPtrCParameterCollectionDoc _parameterCollection; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CProviderCollectInstancesDoc); +}; + +CAF_DECLARE_SMART_POINTER(CProviderCollectInstancesDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderRequestDoc/CProviderCollectSchemaRequestDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderRequestDoc/CProviderCollectSchemaRequestDoc.h new file mode 100644 index 000000000..26d5c5d78 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderRequestDoc/CProviderCollectSchemaRequestDoc.h @@ -0,0 +1,99 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CProviderCollectSchemaRequestDoc_h_ +#define CProviderCollectSchemaRequestDoc_h_ + +namespace Caf { + +/// A simple container for objects of type ProviderCollectSchemaRequest +class CProviderCollectSchemaRequestDoc { +public: + CProviderCollectSchemaRequestDoc() : + _clientId(CAFCOMMON_GUID_NULL), + _requestId(CAFCOMMON_GUID_NULL), + _jobId(CAFCOMMON_GUID_NULL), + _isInitialized(false) {} + virtual ~CProviderCollectSchemaRequestDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const UUID clientId, + const UUID requestId, + const std::string pmeId, + const UUID jobId, + const std::string outputDir, + const SmartPtrCProviderRequestHeaderDoc requestHeader) { + if (! _isInitialized) { + _clientId = clientId; + _requestId = requestId; + _pmeId = pmeId; + _jobId = jobId; + _outputDir = outputDir; + _requestHeader = requestHeader; + + _isInitialized = true; + } + } + +public: + /// Accessor for the ClientId + UUID getClientId() const { + return _clientId; + } + + /// Accessor for the RequestId + UUID getRequestId() const { + return _requestId; + } + + /// Accessor for the PmeId + std::string getPmeId() const { + return _pmeId; + } + + /// Accessor for the JobId + UUID getJobId() const { + return _jobId; + } + + /// Accessor for the OutputDir + std::string getOutputDir() const { + return _outputDir; + } + + /// Accessor for the RequestHeader + SmartPtrCProviderRequestHeaderDoc getRequestHeader() const { + return _requestHeader; + } + +private: + UUID _clientId; + UUID _requestId; + std::string _pmeId; + UUID _jobId; + std::string _outputDir; + SmartPtrCProviderRequestHeaderDoc _requestHeader; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CProviderCollectSchemaRequestDoc); +}; + +CAF_DECLARE_SMART_POINTER(CProviderCollectSchemaRequestDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderRequestDoc/CProviderInvokeOperationCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderRequestDoc/CProviderInvokeOperationCollectionDoc.h new file mode 100644 index 000000000..903efcd07 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderRequestDoc/CProviderInvokeOperationCollectionDoc.h @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CProviderInvokeOperationCollectionDoc_h_ +#define CProviderInvokeOperationCollectionDoc_h_ + +namespace Caf { + +/// A simple container for objects of type ProviderInvokeOperationCollection +class CProviderInvokeOperationCollectionDoc { +public: + CProviderInvokeOperationCollectionDoc() : + _isInitialized(false) {} + virtual ~CProviderInvokeOperationCollectionDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque invokeOperation) { + if (! _isInitialized) { + _invokeOperation = invokeOperation; + + _isInitialized = true; + } + } + +public: + /// Accessor for the InvokeOperation + std::deque getInvokeOperation() const { + return _invokeOperation; + } + +private: + bool _isInitialized; + + std::deque _invokeOperation; + +private: + CAF_CM_DECLARE_NOCOPY(CProviderInvokeOperationCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CProviderInvokeOperationCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderRequestDoc/CProviderInvokeOperationDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderRequestDoc/CProviderInvokeOperationDoc.h new file mode 100644 index 000000000..1bff3328a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderRequestDoc/CProviderInvokeOperationDoc.h @@ -0,0 +1,97 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CProviderInvokeOperationDoc_h_ +#define CProviderInvokeOperationDoc_h_ + +namespace Caf { + +/// A simple container for objects of type ProviderInvokeOperation +class CProviderInvokeOperationDoc { +public: + CProviderInvokeOperationDoc() : + _jobId(CAFCOMMON_GUID_NULL), + _isInitialized(false) {} + virtual ~CProviderInvokeOperationDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string classNamespace, + const std::string className, + const std::string classVersion, + const UUID jobId, + const std::string outputDir, + const SmartPtrCOperationDoc operation) { + if (! _isInitialized) { + _classNamespace = classNamespace; + _className = className; + _classVersion = classVersion; + _jobId = jobId; + _outputDir = outputDir; + _operation = operation; + + _isInitialized = true; + } + } + +public: + /// Accessor for the ClassNamespace + std::string getClassNamespace() const { + return _classNamespace; + } + + /// Accessor for the ClassName + std::string getClassName() const { + return _className; + } + + /// Accessor for the ClassVersion + std::string getClassVersion() const { + return _classVersion; + } + + /// Accessor for the JobId + UUID getJobId() const { + return _jobId; + } + + /// Accessor for the OutputDir + std::string getOutputDir() const { + return _outputDir; + } + + /// Accessor for the Operation + SmartPtrCOperationDoc getOperation() const { + return _operation; + } + +private: + std::string _classNamespace; + std::string _className; + std::string _classVersion; + UUID _jobId; + std::string _outputDir; + SmartPtrCOperationDoc _operation; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CProviderInvokeOperationDoc); +}; + +CAF_DECLARE_SMART_POINTER(CProviderInvokeOperationDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderRequestDoc/CProviderRequestConfigDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderRequestDoc/CProviderRequestConfigDoc.h new file mode 100644 index 000000000..ab3b11dce --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderRequestDoc/CProviderRequestConfigDoc.h @@ -0,0 +1,65 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CProviderRequestConfigDoc_h_ +#define CProviderRequestConfigDoc_h_ + +namespace Caf { + +/// A simple container for objects of type ProviderRequestConfig +class CProviderRequestConfigDoc { +public: + CProviderRequestConfigDoc() : + _isInitialized(false) {} + virtual ~CProviderRequestConfigDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string responseFormatType, + const SmartPtrCLoggingLevelCollectionDoc loggingLevelCollection) { + if (! _isInitialized) { + _responseFormatType = responseFormatType; + _loggingLevelCollection = loggingLevelCollection; + + _isInitialized = true; + } + } + +public: + /// Accessor for the ResponseFormatType + std::string getResponseFormatType() const { + return _responseFormatType; + } + + /// Accessor for the LoggingLevelCollection + SmartPtrCLoggingLevelCollectionDoc getLoggingLevelCollection() const { + return _loggingLevelCollection; + } + +private: + bool _isInitialized; + + std::string _responseFormatType; + SmartPtrCLoggingLevelCollectionDoc _loggingLevelCollection; + +private: + CAF_CM_DECLARE_NOCOPY(CProviderRequestConfigDoc); +}; + +CAF_DECLARE_SMART_POINTER(CProviderRequestConfigDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderRequestDoc/CProviderRequestDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderRequestDoc/CProviderRequestDoc.h new file mode 100644 index 000000000..d82777a6f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderRequestDoc/CProviderRequestDoc.h @@ -0,0 +1,98 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CProviderRequestDoc_h_ +#define CProviderRequestDoc_h_ + +namespace Caf { + +/// A simple container for objects of type ProviderRequest +class CProviderRequestDoc { +public: + CProviderRequestDoc() : + _clientId(CAFCOMMON_GUID_NULL), + _requestId(CAFCOMMON_GUID_NULL), + _isInitialized(false) {} + virtual ~CProviderRequestDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const UUID clientId, + const UUID requestId, + const std::string pmeId, + const SmartPtrCProviderRequestHeaderDoc requestHeader, + const SmartPtrCProviderBatchDoc batch, + const SmartPtrCAttachmentCollectionDoc attachmentCollection) { + if (! _isInitialized) { + _clientId = clientId; + _requestId = requestId; + _pmeId = pmeId; + _requestHeader = requestHeader; + _batch = batch; + _attachmentCollection = attachmentCollection; + + _isInitialized = true; + } + } + +public: + /// Accessor for the ClientId + UUID getClientId() const { + return _clientId; + } + + /// Accessor for the RequestId + UUID getRequestId() const { + return _requestId; + } + + /// Accessor for the PmeId + std::string getPmeId() const { + return _pmeId; + } + + /// Accessor for the RequestHeader + SmartPtrCProviderRequestHeaderDoc getRequestHeader() const { + return _requestHeader; + } + + /// Accessor for the Batch + SmartPtrCProviderBatchDoc getBatch() const { + return _batch; + } + + /// Accessor for the AttachmentCollection + SmartPtrCAttachmentCollectionDoc getAttachmentCollection() const { + return _attachmentCollection; + } + +private: + UUID _clientId; + UUID _requestId; + std::string _pmeId; + SmartPtrCProviderRequestHeaderDoc _requestHeader; + SmartPtrCProviderBatchDoc _batch; + SmartPtrCAttachmentCollectionDoc _attachmentCollection; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CProviderRequestDoc); +}; + +CAF_DECLARE_SMART_POINTER(CProviderRequestDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderRequestDoc/CProviderRequestHeaderDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderRequestDoc/CProviderRequestHeaderDoc.h new file mode 100644 index 000000000..e7f2d7d99 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderRequestDoc/CProviderRequestHeaderDoc.h @@ -0,0 +1,65 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CProviderRequestHeaderDoc_h_ +#define CProviderRequestHeaderDoc_h_ + +namespace Caf { + +/// A simple container for objects of type ProviderRequestHeader +class CProviderRequestHeaderDoc { +public: + CProviderRequestHeaderDoc() : + _isInitialized(false) {} + virtual ~CProviderRequestHeaderDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const SmartPtrCProviderRequestConfigDoc requestConfig, + const SmartPtrCPropertyCollectionDoc echoPropertyBag) { + if (! _isInitialized) { + _requestConfig = requestConfig; + _echoPropertyBag = echoPropertyBag; + + _isInitialized = true; + } + } + +public: + /// Accessor for the RequestConfig + SmartPtrCProviderRequestConfigDoc getRequestConfig() const { + return _requestConfig; + } + + /// Accessor for the EchoPropertyBag + SmartPtrCPropertyCollectionDoc getEchoPropertyBag() const { + return _echoPropertyBag; + } + +private: + bool _isInitialized; + + SmartPtrCProviderRequestConfigDoc _requestConfig; + SmartPtrCPropertyCollectionDoc _echoPropertyBag; + +private: + CAF_CM_DECLARE_NOCOPY(CProviderRequestHeaderDoc); +}; + +CAF_DECLARE_SMART_POINTER(CProviderRequestHeaderDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderRequestDoc/ProviderRequestDocInc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderRequestDoc/ProviderRequestDocInc.h new file mode 100644 index 000000000..9cbda8397 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderRequestDoc/ProviderRequestDocInc.h @@ -0,0 +1,26 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef PROVIDERREQUESTDOCINC_H_ +#define PROVIDERREQUESTDOCINC_H_ + +#include "CProviderCollectInstancesDoc.h" +#include "CProviderCollectInstancesCollectionDoc.h" + +#include "CProviderInvokeOperationDoc.h" +#include "CProviderInvokeOperationCollectionDoc.h" + +#include "CProviderRequestConfigDoc.h" +#include "CProviderRequestHeaderDoc.h" + +#include "CProviderBatchDoc.h" + +#include "CProviderRequestDoc.h" +#include "CProviderCollectSchemaRequestDoc.h" + +#endif /* PROVIDERREQUESTDOCINC_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderResultsDoc/CCdifDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderResultsDoc/CCdifDoc.h new file mode 100644 index 000000000..aaf397342 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderResultsDoc/CCdifDoc.h @@ -0,0 +1,73 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CCdifDoc_h_ +#define CCdifDoc_h_ + +namespace Caf { + +/// A simple container for objects of type Cdif +class CCdifDoc { +public: + CCdifDoc() : + _isInitialized(false) {} + virtual ~CCdifDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const SmartPtrCRequestIdentifierDoc requestIdentifier, + const SmartPtrCDefinitionObjectCollectionDoc definitionObjectCollection, + const SmartPtrCSchemaDoc schema) { + if (! _isInitialized) { + _requestIdentifier = requestIdentifier; + _definitionObjectCollection = definitionObjectCollection; + _schema = schema; + + _isInitialized = true; + } + } + +public: + /// Accessor for the RequestIdentifier + SmartPtrCRequestIdentifierDoc getRequestIdentifier() const { + return _requestIdentifier; + } + + /// Accessor for the DefinitionObjectCollection + SmartPtrCDefinitionObjectCollectionDoc getDefinitionObjectCollection() const { + return _definitionObjectCollection; + } + + /// Accessor for the Schema + SmartPtrCSchemaDoc getSchema() const { + return _schema; + } + +private: + bool _isInitialized; + + SmartPtrCRequestIdentifierDoc _requestIdentifier; + SmartPtrCDefinitionObjectCollectionDoc _definitionObjectCollection; + SmartPtrCSchemaDoc _schema; + +private: + CAF_CM_DECLARE_NOCOPY(CCdifDoc); +}; + +CAF_DECLARE_SMART_POINTER(CCdifDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderResultsDoc/CDefinitionObjectCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderResultsDoc/CDefinitionObjectCollectionDoc.h new file mode 100644 index 000000000..b56dcc55b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderResultsDoc/CDefinitionObjectCollectionDoc.h @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CDefinitionObjectCollectionDoc_h_ +#define CDefinitionObjectCollectionDoc_h_ + +namespace Caf { + +/// Set of elements containing data returned as a result of a provider collection or action +class CDefinitionObjectCollectionDoc { +public: + CDefinitionObjectCollectionDoc() : + _isInitialized(false) {} + virtual ~CDefinitionObjectCollectionDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque value) { + if (! _isInitialized) { + _value = value; + + _isInitialized = true; + } + } + +public: + /// Accessor for the Value + std::deque getValue() const { + return _value; + } + +private: + bool _isInitialized; + + std::deque _value; + +private: + CAF_CM_DECLARE_NOCOPY(CDefinitionObjectCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CDefinitionObjectCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderResultsDoc/CRequestIdentifierDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderResultsDoc/CRequestIdentifierDoc.h new file mode 100644 index 000000000..673fbfb21 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderResultsDoc/CRequestIdentifierDoc.h @@ -0,0 +1,100 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CRequestIdentifierDoc_h_ +#define CRequestIdentifierDoc_h_ + +namespace Caf { + +/// Fields that allow client to determine which request resulted in this response document +class CRequestIdentifierDoc { +public: + CRequestIdentifierDoc() : + _clientId(CAFCOMMON_GUID_NULL), + _requestId(CAFCOMMON_GUID_NULL), + _jobId(CAFCOMMON_GUID_NULL), + _sessionId(CAFCOMMON_GUID_NULL), + _isInitialized(false) {} + virtual ~CRequestIdentifierDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const UUID clientId, + const UUID requestId, + const std::string pmeId, + const UUID jobId, + const SmartPtrCActionClassDoc actionClass, + const UUID sessionId) { + if (! _isInitialized) { + _clientId = clientId; + _requestId = requestId; + _pmeId = pmeId; + _jobId = jobId; + _actionClass = actionClass; + _sessionId = sessionId; + + _isInitialized = true; + } + } + +public: + /// Accessor for the ClientId + UUID getClientId() const { + return _clientId; + } + + /// Accessor for the RequestId + UUID getRequestId() const { + return _requestId; + } + + /// Accessor for the PmeId + std::string getPmeId() const { + return _pmeId; + } + + /// Identifier of the specific job within the request + UUID getJobId() const { + return _jobId; + } + + /// Accessor for the ActionClass + SmartPtrCActionClassDoc getActionClass() const { + return _actionClass; + } + + /// Client-configurable identifier that is opaque (not used) by the Common Agent Framework + UUID getSessionId() const { + return _sessionId; + } + +private: + UUID _clientId; + UUID _requestId; + std::string _pmeId; + UUID _jobId; + SmartPtrCActionClassDoc _actionClass; + UUID _sessionId; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CRequestIdentifierDoc); +}; + +CAF_DECLARE_SMART_POINTER(CRequestIdentifierDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderResultsDoc/CSchemaDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderResultsDoc/CSchemaDoc.h new file mode 100644 index 000000000..77058e3ec --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderResultsDoc/CSchemaDoc.h @@ -0,0 +1,81 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CSchemaDoc_h_ +#define CSchemaDoc_h_ + +namespace Caf { + +/// Set of elements describing the objects that can be generated by the provider +class CSchemaDoc { +public: + CSchemaDoc() : + _isInitialized(false) {} + virtual ~CSchemaDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque dataClassCollection, + const std::deque actionClassCollection, + const std::deque logicalRelationshipCollection = std::deque(), + const std::deque physicalRelationshipCollection = std::deque()) { + if (! _isInitialized) { + _dataClassCollection = dataClassCollection; + _actionClassCollection = actionClassCollection; + _logicalRelationshipCollection = logicalRelationshipCollection; + _physicalRelationshipCollection = physicalRelationshipCollection; + + _isInitialized = true; + } + } + +public: + /// Accessor for the DataClassCollection + std::deque getDataClassCollection() const { + return _dataClassCollection; + } + + /// Accessor for the ActionClassCollection + std::deque getActionClassCollection() const { + return _actionClassCollection; + } + + /// Accessor for the LogicalRelationshipCollection + std::deque getLogicalRelationshipCollection() const { + return _logicalRelationshipCollection; + } + + /// Accessor for the PhysicalRelationshipCollection + std::deque getPhysicalRelationshipCollection() const { + return _physicalRelationshipCollection; + } + +private: + bool _isInitialized; + + std::deque _dataClassCollection; + std::deque _actionClassCollection; + std::deque _logicalRelationshipCollection; + std::deque _physicalRelationshipCollection; + +private: + CAF_CM_DECLARE_NOCOPY(CSchemaDoc); +}; + +CAF_DECLARE_SMART_POINTER(CSchemaDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderResultsDoc/ProviderResultsDocInc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderResultsDoc/ProviderResultsDocInc.h new file mode 100644 index 000000000..867cd7a61 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ProviderResultsDoc/ProviderResultsDocInc.h @@ -0,0 +1,17 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef PROVIDERRESULTSDOCINC_H_ +#define PROVIDERRESULTSDOCINC_H_ + +#include "CDefinitionObjectCollectionDoc.h" +#include "CRequestIdentifierDoc.h" +#include "CSchemaDoc.h" +#include "CCdifDoc.h" + +#endif /* PROVIDERRESULTSDOCINC_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ResponseDoc/CErrorResponseDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ResponseDoc/CErrorResponseDoc.h new file mode 100644 index 000000000..6422f24b4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ResponseDoc/CErrorResponseDoc.h @@ -0,0 +1,90 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CErrorResponseDoc_h_ +#define CErrorResponseDoc_h_ + +namespace Caf { + +/// A simple container for objects of type ErrorResponse +class CErrorResponseDoc { +public: + CErrorResponseDoc() : + _clientId(CAFCOMMON_GUID_NULL), + _requestId(CAFCOMMON_GUID_NULL), + _isInitialized(false) {} + virtual ~CErrorResponseDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const UUID clientId, + const UUID requestId, + const std::string pmeId, + const SmartPtrCResponseHeaderDoc responseHeader, + const std::string errorMessage) { + if (! _isInitialized) { + _clientId = clientId; + _requestId = requestId; + _pmeId = pmeId; + _responseHeader = responseHeader; + _errorMessage = errorMessage; + + _isInitialized = true; + } + } + +public: + /// Accessor for the ClientId + UUID getClientId() const { + return _clientId; + } + + /// Accessor for the RequestId + UUID getRequestId() const { + return _requestId; + } + + /// Accessor for the PmeId + std::string getPmeId() const { + return _pmeId; + } + + /// Accessor for the Response Header + SmartPtrCResponseHeaderDoc getResponseHeader() const { + return _responseHeader; + } + + /// Accessor for the ErrorMessage + std::string getErrorMessage() const { + return _errorMessage; + } + +private: + UUID _clientId; + UUID _requestId; + std::string _pmeId; + SmartPtrCResponseHeaderDoc _responseHeader; + std::string _errorMessage; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CErrorResponseDoc); +}; + +CAF_DECLARE_SMART_POINTER(CErrorResponseDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ResponseDoc/CEventKeyCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ResponseDoc/CEventKeyCollectionDoc.h new file mode 100644 index 000000000..81408cfe9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ResponseDoc/CEventKeyCollectionDoc.h @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CEventKeyCollectionDoc_h_ +#define CEventKeyCollectionDoc_h_ + +namespace Caf { + +/// A simple container for objects of type EventKeyCollection +class CEventKeyCollectionDoc { +public: + CEventKeyCollectionDoc() : + _isInitialized(false) {} + virtual ~CEventKeyCollectionDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque eventKey) { + if (! _isInitialized) { + _eventKey = eventKey; + + _isInitialized = true; + } + } + +public: + /// Accessor for the EventKey + std::deque getEventKey() const { + return _eventKey; + } + +private: + bool _isInitialized; + + std::deque _eventKey; + +private: + CAF_CM_DECLARE_NOCOPY(CEventKeyCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CEventKeyCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ResponseDoc/CEventKeyDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ResponseDoc/CEventKeyDoc.h new file mode 100644 index 000000000..663d278ce --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ResponseDoc/CEventKeyDoc.h @@ -0,0 +1,65 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CEventKeyDoc_h_ +#define CEventKeyDoc_h_ + +namespace Caf { + +/// A simple container for objects of type EventKey +class CEventKeyDoc { +public: + CEventKeyDoc() : + _isInitialized(false) {} + virtual ~CEventKeyDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string name, + const std::string value) { + if (! _isInitialized) { + _name = name; + _value = value; + + _isInitialized = true; + } + } + +public: + /// Accessor for the Name + std::string getName() const { + return _name; + } + + /// Accessor for the Value + std::string getValue() const { + return _value; + } + +private: + bool _isInitialized; + + std::string _name; + std::string _value; + +private: + CAF_CM_DECLARE_NOCOPY(CEventKeyDoc); +}; + +CAF_DECLARE_SMART_POINTER(CEventKeyDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ResponseDoc/CEventManifestDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ResponseDoc/CEventManifestDoc.h new file mode 100644 index 000000000..a9a1ea6dd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ResponseDoc/CEventManifestDoc.h @@ -0,0 +1,89 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CEventManifestDoc_h_ +#define CEventManifestDoc_h_ + +namespace Caf { + +/// A simple container for objects of type EventManifest +class CEventManifestDoc { +public: + CEventManifestDoc() : + _isInitialized(false) {} + virtual ~CEventManifestDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string classNamespace, + const std::string className, + const std::string classVersion, + const std::string operationName, + const SmartPtrCAttachmentCollectionDoc attachmentCollection) { + if (! _isInitialized) { + _classNamespace = classNamespace; + _className = className; + _classVersion = classVersion; + _operationName = operationName; + _attachmentCollection = attachmentCollection; + + _isInitialized = true; + } + } + +public: + /// Accessor for the ClassNamespace + std::string getClassNamespace() const { + return _classNamespace; + } + + /// Accessor for the ClassName + std::string getClassName() const { + return _className; + } + + /// Accessor for the ClassVersion + std::string getClassVersion() const { + return _classVersion; + } + + /// Accessor for the OperationName + std::string getOperationName() const { + return _operationName; + } + + /// Accessor for the AttachmentCollection + SmartPtrCAttachmentCollectionDoc getAttachmentCollection() const { + return _attachmentCollection; + } + +private: + bool _isInitialized; + + std::string _classNamespace; + std::string _className; + std::string _classVersion; + std::string _operationName; + SmartPtrCAttachmentCollectionDoc _attachmentCollection; + +private: + CAF_CM_DECLARE_NOCOPY(CEventManifestDoc); +}; + +CAF_DECLARE_SMART_POINTER(CEventManifestDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ResponseDoc/CManifestCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ResponseDoc/CManifestCollectionDoc.h new file mode 100644 index 000000000..005c3ad12 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ResponseDoc/CManifestCollectionDoc.h @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CManifestCollectionDoc_h_ +#define CManifestCollectionDoc_h_ + +namespace Caf { + +/// A simple container for objects of type ManifestCollection +class CManifestCollectionDoc { +public: + CManifestCollectionDoc() : + _isInitialized(false) {} + virtual ~CManifestCollectionDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque manifest) { + if (! _isInitialized) { + _manifest = manifest; + + _isInitialized = true; + } + } + +public: + /// Accessor for the Manifest + std::deque getManifest() const { + return _manifest; + } + +private: + bool _isInitialized; + + std::deque _manifest; + +private: + CAF_CM_DECLARE_NOCOPY(CManifestCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CManifestCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ResponseDoc/CManifestDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ResponseDoc/CManifestDoc.h new file mode 100644 index 000000000..767c6383d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ResponseDoc/CManifestDoc.h @@ -0,0 +1,97 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CManifestDoc_h_ +#define CManifestDoc_h_ + +namespace Caf { + +/// A simple container for objects of type Manifest +class CManifestDoc { +public: + CManifestDoc() : + _jobId(CAFCOMMON_GUID_NULL), + _isInitialized(false) {} + virtual ~CManifestDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string classNamespace, + const std::string className, + const std::string classVersion, + const UUID jobId, + const std::string operationName, + const SmartPtrCAttachmentNameCollectionDoc attachmentNameCollection) { + if (! _isInitialized) { + _classNamespace = classNamespace; + _className = className; + _classVersion = classVersion; + _jobId = jobId; + _operationName = operationName; + _attachmentNameCollection = attachmentNameCollection; + + _isInitialized = true; + } + } + +public: + /// Accessor for the ClassNamespace + std::string getClassNamespace() const { + return _classNamespace; + } + + /// Accessor for the ClassName + std::string getClassName() const { + return _className; + } + + /// Accessor for the ClassVersion + std::string getClassVersion() const { + return _classVersion; + } + + /// Accessor for the JobId + UUID getJobId() const { + return _jobId; + } + + /// Accessor for the OperationName + std::string getOperationName() const { + return _operationName; + } + + /// Accessor for the AttachmentNameCollection + SmartPtrCAttachmentNameCollectionDoc getAttachmentNameCollection() const { + return _attachmentNameCollection; + } + +private: + std::string _classNamespace; + std::string _className; + std::string _classVersion; + UUID _jobId; + std::string _operationName; + SmartPtrCAttachmentNameCollectionDoc _attachmentNameCollection; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CManifestDoc); +}; + +CAF_DECLARE_SMART_POINTER(CManifestDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ResponseDoc/CProviderEventResponseDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ResponseDoc/CProviderEventResponseDoc.h new file mode 100644 index 000000000..90ed428f8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ResponseDoc/CProviderEventResponseDoc.h @@ -0,0 +1,89 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CProviderEventResponseDoc_h_ +#define CProviderEventResponseDoc_h_ + +namespace Caf { + +/// A simple container for objects of type ProviderEventResponse +class CProviderEventResponseDoc { +public: + CProviderEventResponseDoc() : + _isInitialized(false) {} + virtual ~CProviderEventResponseDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string pmeId, + const SmartPtrCResponseHeaderDoc responseHeader, + const SmartPtrCEventManifestDoc manifest, + const SmartPtrCEventKeyCollectionDoc eventKeyCollection, + const SmartPtrCStatisticsDoc statistics) { + if (! _isInitialized) { + _pmeId = pmeId; + _responseHeader = responseHeader; + _manifest = manifest; + _eventKeyCollection = eventKeyCollection; + _statistics = statistics; + + _isInitialized = true; + } + } + +public: + /// Accessor for the PmeId + std::string getPmeId() const { + return _pmeId; + } + + /// Accessor for the ResponseHeader + SmartPtrCResponseHeaderDoc getResponseHeader() const { + return _responseHeader; + } + + /// Accessor for the Manifest + SmartPtrCEventManifestDoc getManifest() const { + return _manifest; + } + + /// Accessor for the EventKeyCollection + SmartPtrCEventKeyCollectionDoc getEventKeyCollection() const { + return _eventKeyCollection; + } + + /// Accessor for the Statistics + SmartPtrCStatisticsDoc getStatistics() const { + return _statistics; + } + +private: + bool _isInitialized; + + std::string _pmeId; + SmartPtrCResponseHeaderDoc _responseHeader; + SmartPtrCEventManifestDoc _manifest; + SmartPtrCEventKeyCollectionDoc _eventKeyCollection; + SmartPtrCStatisticsDoc _statistics; + +private: + CAF_CM_DECLARE_NOCOPY(CProviderEventResponseDoc); +}; + +CAF_DECLARE_SMART_POINTER(CProviderEventResponseDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ResponseDoc/CProviderResponseDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ResponseDoc/CProviderResponseDoc.h new file mode 100644 index 000000000..84b8b5b76 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ResponseDoc/CProviderResponseDoc.h @@ -0,0 +1,106 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CProviderResponseDoc_h_ +#define CProviderResponseDoc_h_ + +namespace Caf { + +/// A simple container for objects of type ProviderResponse +class CProviderResponseDoc { +public: + CProviderResponseDoc() : + _clientId(CAFCOMMON_GUID_NULL), + _requestId(CAFCOMMON_GUID_NULL), + _isInitialized(false) {} + virtual ~CProviderResponseDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const UUID clientId, + const UUID requestId, + const std::string pmeId, + const SmartPtrCResponseHeaderDoc responseHeader, + const SmartPtrCManifestDoc manifest, + const SmartPtrCAttachmentCollectionDoc attachmentCollection, + const SmartPtrCStatisticsDoc statistics) { + if (! _isInitialized) { + _clientId = clientId; + _requestId = requestId; + _pmeId = pmeId; + _responseHeader = responseHeader; + _manifest = manifest; + _attachmentCollection = attachmentCollection; + _statistics = statistics; + + _isInitialized = true; + } + } + +public: + /// Accessor for the ClientId + UUID getClientId() const { + return _clientId; + } + + /// Accessor for the RequestId + UUID getRequestId() const { + return _requestId; + } + + /// Accessor for the PmeId + std::string getPmeId() const { + return _pmeId; + } + + /// Accessor for the ResponseHeader + SmartPtrCResponseHeaderDoc getResponseHeader() const { + return _responseHeader; + } + + /// Accessor for the Manifest + SmartPtrCManifestDoc getManifest() const { + return _manifest; + } + + /// Accessor for the AttachmentCollection + SmartPtrCAttachmentCollectionDoc getAttachmentCollection() const { + return _attachmentCollection; + } + + /// Accessor for the Statistics + SmartPtrCStatisticsDoc getStatistics() const { + return _statistics; + } + +private: + UUID _clientId; + UUID _requestId; + std::string _pmeId; + SmartPtrCResponseHeaderDoc _responseHeader; + SmartPtrCManifestDoc _manifest; + SmartPtrCAttachmentCollectionDoc _attachmentCollection; + SmartPtrCStatisticsDoc _statistics; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CProviderResponseDoc); +}; + +CAF_DECLARE_SMART_POINTER(CProviderResponseDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ResponseDoc/CResponseDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ResponseDoc/CResponseDoc.h new file mode 100644 index 000000000..79df7f1cc --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ResponseDoc/CResponseDoc.h @@ -0,0 +1,106 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CResponseDoc_h_ +#define CResponseDoc_h_ + +namespace Caf { + +/// A simple container for objects of type Response +class CResponseDoc { +public: + CResponseDoc() : + _clientId(CAFCOMMON_GUID_NULL), + _requestId(CAFCOMMON_GUID_NULL), + _isInitialized(false) {} + virtual ~CResponseDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const UUID clientId, + const UUID requestId, + const std::string pmeId, + const SmartPtrCResponseHeaderDoc responseHeader, + const SmartPtrCManifestCollectionDoc manifestCollection, + const SmartPtrCAttachmentCollectionDoc attachmentCollection, + const SmartPtrCStatisticsDoc statistics) { + if (! _isInitialized) { + _clientId = clientId; + _requestId = requestId; + _pmeId = pmeId; + _responseHeader = responseHeader; + _manifestCollection = manifestCollection; + _attachmentCollection = attachmentCollection; + _statistics = statistics; + + _isInitialized = true; + } + } + +public: + /// Accessor for the ClientId + UUID getClientId() const { + return _clientId; + } + + /// Accessor for the RequestId + UUID getRequestId() const { + return _requestId; + } + + /// Accessor for the PmeId + std::string getPmeId() const { + return _pmeId; + } + + /// Accessor for the ManifestCollection + SmartPtrCResponseHeaderDoc getResponseHeader() const { + return _responseHeader; + } + + /// Accessor for the ManifestCollection + SmartPtrCManifestCollectionDoc getManifestCollection() const { + return _manifestCollection; + } + + /// Accessor for the AttachmentCollection + SmartPtrCAttachmentCollectionDoc getAttachmentCollection() const { + return _attachmentCollection; + } + + /// Accessor for the Statistics + SmartPtrCStatisticsDoc getStatistics() const { + return _statistics; + } + +private: + UUID _clientId; + UUID _requestId; + std::string _pmeId; + SmartPtrCResponseHeaderDoc _responseHeader; + SmartPtrCManifestCollectionDoc _manifestCollection; + SmartPtrCAttachmentCollectionDoc _attachmentCollection; + SmartPtrCStatisticsDoc _statistics; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CResponseDoc); +}; + +CAF_DECLARE_SMART_POINTER(CResponseDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ResponseDoc/CResponseHeaderDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ResponseDoc/CResponseHeaderDoc.h new file mode 100644 index 000000000..4e9655d96 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ResponseDoc/CResponseHeaderDoc.h @@ -0,0 +1,91 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CResponseHeaderDoc_h_ +#define CResponseHeaderDoc_h_ + +namespace Caf { + +/// A simple container for objects of type ResponseHeader +class CResponseHeaderDoc { +public: + CResponseHeaderDoc() : + _sequenceNumber(0), + _isFinalResponse(true), + _sessionId(CAFCOMMON_GUID_NULL), + _isInitialized(false) {} + virtual ~CResponseHeaderDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string version = "1.0", + const std::string createdDateTime = CDateTimeUtils::getCurrentDateTime(), + const uint32 sequenceNumber = 0, + const bool isFinalResponse = true, + const UUID sessionId = CAFCOMMON_GUID_NULL) { + if (! _isInitialized) { + _version = version; + _createdDateTime = createdDateTime; + _sequenceNumber = sequenceNumber; + _isFinalResponse = isFinalResponse; + _sessionId = sessionId; + + _isInitialized = true; + } + } + +public: + /// Accessor for the version + std::string getVersion() const { + return _version; + } + + /// Accessor for the date/time when the request was created + std::string getCreatedDateTime() const { + return _createdDateTime; + } + + /// Accessor for the sequenceNumber + uint32 getSequenceNumber() const { + return _sequenceNumber; + } + + /// Accessor for the version + bool getIsFinalResponse() const { + return _isFinalResponse; + } + + /// Accessor for the session ID + UUID getSessionId() const { + return _sessionId; + } + +private: + std::string _version; + std::string _createdDateTime; + uint32 _sequenceNumber; + bool _isFinalResponse; + UUID _sessionId; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CResponseHeaderDoc); +}; + +CAF_DECLARE_SMART_POINTER(CResponseHeaderDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ResponseDoc/ResponseDocInc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ResponseDoc/ResponseDocInc.h new file mode 100644 index 000000000..2dedce9e9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/ResponseDoc/ResponseDocInc.h @@ -0,0 +1,25 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef RESPONSEDOCINC_H_ +#define RESPONSEDOCINC_H_ + +#include "CEventKeyDoc.h" +#include "CEventKeyCollectionDoc.h" + +#include "CManifestDoc.h" +#include "CManifestCollectionDoc.h" + +#include "CResponseHeaderDoc.h" +#include "CErrorResponseDoc.h" +#include "CEventManifestDoc.h" +#include "CProviderEventResponseDoc.h" +#include "CProviderResponseDoc.h" +#include "CResponseDoc.h" + +#endif /* RESPONSEDOCINC_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CActionClassDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CActionClassDoc.h new file mode 100644 index 000000000..4a3e71142 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CActionClassDoc.h @@ -0,0 +1,105 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CActionClassDoc_h_ +#define CActionClassDoc_h_ + +namespace Caf { + +/// Definition of an action class that may be generated by the provider +class CActionClassDoc { +public: + CActionClassDoc() : + _isInitialized(false) {} + virtual ~CActionClassDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string namespaceVal, + const std::string name, + const std::string version, + const SmartPtrCCollectMethodDoc collectMethod, + const std::deque methodCollection, + const std::string displayName = std::string(), + const std::string description = std::string()) { + if (! _isInitialized) { + _namespaceVal = namespaceVal; + _name = name; + _version = version; + _collectMethod = collectMethod; + _methodCollection = methodCollection; + _displayName = displayName; + _description = description; + + _isInitialized = true; + } + } + +public: + /// Accessor for the NamespaceVal + std::string getNamespaceVal() const { + return _namespaceVal; + } + + /// Accessor for the Name + std::string getName() const { + return _name; + } + + /// Accessor for the Version + std::string getVersion() const { + return _version; + } + + /// Accessor for the CollectMethod + SmartPtrCCollectMethodDoc getCollectMethod() const { + return _collectMethod; + } + + /// Accessor for the Method + std::deque getMethodCollection() const { + return _methodCollection; + } + + /// A hint as to what this class should be called when displaying it to a human + std::string getDisplayName() const { + return _displayName; + } + + /// A phrase to describe the class for mouse-over text, etc + std::string getDescription() const { + return _description; + } + +private: + bool _isInitialized; + + std::string _namespaceVal; + std::string _name; + std::string _version; + SmartPtrCCollectMethodDoc _collectMethod; + std::deque _methodCollection; + std::string _displayName; + std::string _description; + +private: + CAF_CM_DECLARE_NOCOPY(CActionClassDoc); +}; + +CAF_DECLARE_SMART_POINTER(CActionClassDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CActionClassInstanceCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CActionClassInstanceCollectionDoc.h new file mode 100644 index 000000000..fc6ffcd8b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CActionClassInstanceCollectionDoc.h @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CActionClassInstanceCollectionDoc_h_ +#define CActionClassInstanceCollectionDoc_h_ + +namespace Caf { + +/// A simple container for objects of type ActionClassInstanceCollection +class CActionClassInstanceCollectionDoc { +public: + CActionClassInstanceCollectionDoc() : + _isInitialized(false) {} + virtual ~CActionClassInstanceCollectionDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque actionClassInstanceCollection) { + if (! _isInitialized) { + _actionClassInstanceCollection = actionClassInstanceCollection; + + _isInitialized = true; + } + } + +public: + /// Accessor for the ActionClassInstance + std::deque getActionClassInstanceCollection() const { + return _actionClassInstanceCollection; + } + +private: + bool _isInitialized; + + std::deque _actionClassInstanceCollection; + +private: + CAF_CM_DECLARE_NOCOPY(CActionClassInstanceCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CActionClassInstanceCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CActionClassInstanceDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CActionClassInstanceDoc.h new file mode 100644 index 000000000..f0641ea0b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CActionClassInstanceDoc.h @@ -0,0 +1,81 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CActionClassInstanceDoc_h_ +#define CActionClassInstanceDoc_h_ + +namespace Caf { + +/// A simple container for objects of type ActionClassInstance +class CActionClassInstanceDoc { +public: + CActionClassInstanceDoc() : + _isInitialized(false) {} + virtual ~CActionClassInstanceDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string namespaceVal, + const std::string name, + const std::string version, + const SmartPtrCInstanceOperationCollectionDoc instanceOperationCollection) { + if (! _isInitialized) { + _namespaceVal = namespaceVal; + _name = name; + _version = version; + _instanceOperationCollection = instanceOperationCollection; + + _isInitialized = true; + } + } + +public: + /// Accessor for the NamespaceVal + std::string getNamespaceVal() const { + return _namespaceVal; + } + + /// Accessor for the Name + std::string getName() const { + return _name; + } + + /// Accessor for the Version + std::string getVersion() const { + return _version; + } + + /// Accessor for the InstanceOperationCollection + SmartPtrCInstanceOperationCollectionDoc getInstanceOperationCollection() const { + return _instanceOperationCollection; + } + +private: + bool _isInitialized; + + std::string _namespaceVal; + std::string _name; + std::string _version; + SmartPtrCInstanceOperationCollectionDoc _instanceOperationCollection; + +private: + CAF_CM_DECLARE_NOCOPY(CActionClassInstanceDoc); +}; + +CAF_DECLARE_SMART_POINTER(CActionClassInstanceDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CClassCardinalityDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CClassCardinalityDoc.h new file mode 100644 index 000000000..10d37b2bb --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CClassCardinalityDoc.h @@ -0,0 +1,81 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CClassCardinalityDoc_h_ +#define CClassCardinalityDoc_h_ + +namespace Caf { + +/// Class description of one end of a relationship +class CClassCardinalityDoc { +public: + CClassCardinalityDoc() : + _isInitialized(false) {} + virtual ~CClassCardinalityDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string namespaceVal, + const std::string name, + const std::string version, + const std::string cardinality) { + if (! _isInitialized) { + _namespaceVal = namespaceVal; + _name = name; + _version = version; + _cardinality = cardinality; + + _isInitialized = true; + } + } + +public: + /// Accessor for the NamespaceVal + std::string getNamespaceVal() const { + return _namespaceVal; + } + + /// Accessor for the Name + std::string getName() const { + return _name; + } + + /// Accessor for the Version + std::string getVersion() const { + return _version; + } + + /// Cardinality of one end relationship, i.e. has one, has many, etc + std::string getCardinality() const { + return _cardinality; + } + +private: + bool _isInitialized; + + std::string _namespaceVal; + std::string _name; + std::string _version; + std::string _cardinality; + +private: + CAF_CM_DECLARE_NOCOPY(CClassCardinalityDoc); +}; + +CAF_DECLARE_SMART_POINTER(CClassCardinalityDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CClassFieldDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CClassFieldDoc.h new file mode 100644 index 000000000..47752eb52 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CClassFieldDoc.h @@ -0,0 +1,81 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CClassFieldDoc_h_ +#define CClassFieldDoc_h_ + +namespace Caf { + +/// Description of a class and the field used to identify one end of a relationship +class CClassFieldDoc { +public: + CClassFieldDoc() : + _isInitialized(false) {} + virtual ~CClassFieldDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string namespaceVal, + const std::string name, + const std::string version, + const std::string field) { + if (! _isInitialized) { + _namespaceVal = namespaceVal; + _name = name; + _version = version; + _field = field; + + _isInitialized = true; + } + } + +public: + /// Accessor for the NamespaceVal + std::string getNamespaceVal() const { + return _namespaceVal; + } + + /// Accessor for the Name + std::string getName() const { + return _name; + } + + /// Accessor for the Version + std::string getVersion() const { + return _version; + } + + /// Description of a class field used to identify one end of a relationship + std::string getField() const { + return _field; + } + +private: + bool _isInitialized; + + std::string _namespaceVal; + std::string _name; + std::string _version; + std::string _field; + +private: + CAF_CM_DECLARE_NOCOPY(CClassFieldDoc); +}; + +CAF_DECLARE_SMART_POINTER(CClassFieldDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CClassIdentifierDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CClassIdentifierDoc.h new file mode 100644 index 000000000..7764f0260 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CClassIdentifierDoc.h @@ -0,0 +1,73 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CClassIdentifierDoc_h_ +#define CClassIdentifierDoc_h_ + +namespace Caf { + +/// Tuple of values to uniquely identify a class +class CClassIdentifierDoc { +public: + CClassIdentifierDoc() : + _isInitialized(false) {} + virtual ~CClassIdentifierDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string namespaceVal, + const std::string name, + const std::string version) { + if (! _isInitialized) { + _namespaceVal = namespaceVal; + _name = name; + _version = version; + + _isInitialized = true; + } + } + +public: + /// Accessor for the NamespaceVal + std::string getNamespaceVal() const { + return _namespaceVal; + } + + /// Accessor for the Name + std::string getName() const { + return _name; + } + + /// Accessor for the Version + std::string getVersion() const { + return _version; + } + +private: + bool _isInitialized; + + std::string _namespaceVal; + std::string _name; + std::string _version; + +private: + CAF_CM_DECLARE_NOCOPY(CClassIdentifierDoc); +}; + +CAF_DECLARE_SMART_POINTER(CClassIdentifierDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CClassInstancePropertyDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CClassInstancePropertyDoc.h new file mode 100644 index 000000000..dd68090a9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CClassInstancePropertyDoc.h @@ -0,0 +1,107 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CClassInstancePropertyDoc_h_ +#define CClassInstancePropertyDoc_h_ + +namespace Caf { + +/// Definition of an attribute (field) of a class +class CClassInstancePropertyDoc { +public: + CClassInstancePropertyDoc() : + _required(false), + _transientVal(false), + _list(false), + _isInitialized(false) {} + virtual ~CClassInstancePropertyDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string name, + const std::deque type, + const bool required = false, + const bool transientVal = false, + const bool list = false, + const std::string displayName = std::string(), + const std::string description = std::string()) { + if (! _isInitialized) { + _name = name; + _type = type; + _required = required; + _transientVal = transientVal; + _list = list; + _displayName = displayName; + _description = description; + + _isInitialized = true; + } + } + +public: + /// Property name + std::string getName() const { + return _name; + } + + /// Accessor for the Type + std::deque getType() const { + return _type; + } + + /// Whether this is a required property, i.e. this property must always be non-empty + bool getRequired() const { + return _required; + } + + /// Accessor for the TransientVal + bool getTransientVal() const { + return _transientVal; + } + + /// Indicates whether to expect a list of properties in the provider response + bool getList() const { + return _list; + } + + /// A hint as to what this property should be called when displaying it to a human + std::string getDisplayName() const { + return _displayName; + } + + /// A phrase to describe the property for mouse-over text, etc + std::string getDescription() const { + return _description; + } + +private: + std::string _name; + std::deque _type; + bool _required; + bool _transientVal; + bool _list; + std::string _displayName; + std::string _description; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CClassInstancePropertyDoc); +}; + +CAF_DECLARE_SMART_POINTER(CClassInstancePropertyDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CClassPropertyDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CClassPropertyDoc.h new file mode 100644 index 000000000..b3058e290 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CClassPropertyDoc.h @@ -0,0 +1,167 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CClassPropertyDoc_h_ +#define CClassPropertyDoc_h_ + +namespace Caf { + +/// Definition of an attribute (field) of a class +class CClassPropertyDoc { +public: + CClassPropertyDoc() : + _type(PROPERTY_NONE), + _required(false), + _key(false), + _list(false), + _caseSensitive(false), + _transientVal(false), + _validator(VALIDATOR_NONE), + _isInitialized(false) {} + virtual ~CClassPropertyDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string name, + const PROPERTY_TYPE type, + const std::deque value, + const bool required = false, + const bool key = false, + const bool list = false, + const bool caseSensitive = false, + const bool transientVal = false, + const std::string defaultVal = std::string(), + const VALIDATOR_TYPE validator = VALIDATOR_NONE, + const std::string upperRange = std::string(), + const std::string lowerRange = std::string(), + const std::string displayName = std::string(), + const std::string description = std::string()) { + if (! _isInitialized) { + _name = name; + _type = type; + _value = value; + _required = required; + _key = key; + _list = list; + _caseSensitive = caseSensitive; + _transientVal = transientVal; + _defaultVal = defaultVal; + _validator = validator; + _upperRange = upperRange; + _lowerRange = lowerRange; + _displayName = displayName; + _description = description; + + _isInitialized = true; + } + } + +public: + /// Property name + std::string getName() const { + return _name; + } + + /// Describes the data type of the property + PROPERTY_TYPE getType() const { + return _type; + } + + /// The contents of a validator used on this property + std::deque getValue() const { + return _value; + } + + /// Whether this is a required property, i.e. this property must always be non-empty + bool getRequired() const { + return _required; + } + + /// Indicates this property may be used as a key identifying field + bool getKey() const { + return _key; + } + + /// Indicates whether to expect a list of properties in the provider response + bool getList() const { + return _list; + } + + /// Indicates whether a string field should be treated in a case-sensitive manner + bool getCaseSensitive() const { + return _caseSensitive; + } + + /// Accessor for the TransientVal + bool getTransientVal() const { + return _transientVal; + } + + /// Accessor for the DefaultVal + std::string getDefaultVal() const { + return _defaultVal; + } + + /// The type of validator described in the 'value' sub-elements + VALIDATOR_TYPE getValidator() const { + return _validator; + } + + /// If a 'range' validator is in use, this describes the upper limit of allowable values for the property. QUESTIONABLE: how do we determine inclusive or exclusive range + std::string getUpperRange() const { + return _upperRange; + } + + /// If a 'range' validator is in use, this describes the lower limit of allowable values for the property. QUESTIONABLE: how do we determine inclusive or exclusive range + std::string getLowerRange() const { + return _lowerRange; + } + + /// A hint as to what this property should be called when displaying it to a human + std::string getDisplayName() const { + return _displayName; + } + + /// A phrase to describe the property for mouse-over text, etc + std::string getDescription() const { + return _description; + } + +private: + std::string _name; + PROPERTY_TYPE _type; + std::deque _value; + bool _required; + bool _key; + bool _list; + bool _caseSensitive; + bool _transientVal; + std::string _defaultVal; + VALIDATOR_TYPE _validator; + std::string _upperRange; + std::string _lowerRange; + std::string _displayName; + std::string _description; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CClassPropertyDoc); +}; + +CAF_DECLARE_SMART_POINTER(CClassPropertyDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CCmdlMetadataDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CCmdlMetadataDoc.h new file mode 100644 index 000000000..8b05cdd57 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CCmdlMetadataDoc.h @@ -0,0 +1,65 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CCmdlMetadataDoc_h_ +#define CCmdlMetadataDoc_h_ + +namespace Caf { + +/// A simple container for objects of type CmdlMetadata +class CCmdlMetadataDoc { +public: + CCmdlMetadataDoc() : + _isInitialized(false) {} + virtual ~CCmdlMetadataDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string name, + const std::string value) { + if (! _isInitialized) { + _name = name; + _value = value; + + _isInitialized = true; + } + } + +public: + /// Accessor for the Name + std::string getName() const { + return _name; + } + + /// Accessor for the Value + std::string getValue() const { + return _value; + } + +private: + bool _isInitialized; + + std::string _name; + std::string _value; + +private: + CAF_CM_DECLARE_NOCOPY(CCmdlMetadataDoc); +}; + +CAF_DECLARE_SMART_POINTER(CCmdlMetadataDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CCmdlUnionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CCmdlUnionDoc.h new file mode 100644 index 000000000..b6d22c637 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CCmdlUnionDoc.h @@ -0,0 +1,73 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CCmdlUnionDoc_h_ +#define CCmdlUnionDoc_h_ + +namespace Caf { + +/// A simple container for objects of type CmdlUnion +class CCmdlUnionDoc { +public: + CCmdlUnionDoc() : + _isInitialized(false) {} + virtual ~CCmdlUnionDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string namespaceVal, + const std::string name, + const std::string version) { + if (! _isInitialized) { + _namespaceVal = namespaceVal; + _name = name; + _version = version; + + _isInitialized = true; + } + } + +public: + /// Accessor for the NamespaceVal + std::string getNamespaceVal() const { + return _namespaceVal; + } + + /// Accessor for the Name + std::string getName() const { + return _name; + } + + /// Accessor for the Version + std::string getVersion() const { + return _version; + } + +private: + bool _isInitialized; + + std::string _namespaceVal; + std::string _name; + std::string _version; + +private: + CAF_CM_DECLARE_NOCOPY(CCmdlUnionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CCmdlUnionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CCollectMethodDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CCollectMethodDoc.h new file mode 100644 index 000000000..df9d238d3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CCollectMethodDoc.h @@ -0,0 +1,97 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CCollectMethodDoc_h_ +#define CCollectMethodDoc_h_ + +namespace Caf { + +/// Definition of a collection method on a class +class CCollectMethodDoc { +public: + CCollectMethodDoc() : + _isInitialized(false) {} + virtual ~CCollectMethodDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string name, + const std::deque parameterCollection = std::deque(), + const std::deque instanceParameterCollection = std::deque(), + const std::deque returnValCollection = std::deque(), + const std::deque eventValCollection = std::deque(), + const std::deque errorCollection = std::deque()) { + if (! _isInitialized) { + _name = name; + _parameterCollection = parameterCollection; + _instanceParameterCollection = instanceParameterCollection; + _returnValCollection = returnValCollection; + _eventValCollection = eventValCollection; + _errorCollection = errorCollection; + + _isInitialized = true; + } + } + +public: + /// name of the collection method + std::string getName() const { + return _name; + } + + /// Definition of a parameter that passes simple types to the collection method + std::deque getParameterCollection() const { + return _parameterCollection; + } + + /// Definition of a parameter passing data class instances to the collection method + std::deque getInstanceParameterCollection() const { + return _instanceParameterCollection; + } + + /// Accessor for the ReturnVal + std::deque getReturnValCollection() const { + return _returnValCollection; + } + + /// Accessor for the EventVal + std::deque getEventValCollection() const { + return _eventValCollection; + } + + /// A class that may be returned to indicate an error occurred during the processing of the collection method + std::deque getErrorCollection() const { + return _errorCollection; + } + +private: + bool _isInitialized; + + std::string _name; + std::deque _parameterCollection; + std::deque _instanceParameterCollection; + std::deque _returnValCollection; + std::deque _eventValCollection; + std::deque _errorCollection; + +private: + CAF_CM_DECLARE_NOCOPY(CCollectMethodDoc); +}; + +CAF_DECLARE_SMART_POINTER(CCollectMethodDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CDataClassDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CDataClassDoc.h new file mode 100644 index 000000000..ace402e80 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CDataClassDoc.h @@ -0,0 +1,122 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CDataClassDoc_h_ +#define CDataClassDoc_h_ + +namespace Caf { + +/// Definition of a data class that may be generated by the provider +class CDataClassDoc { +public: + CDataClassDoc() : + _unique(false), + _transientVal(false), + _isInitialized(false) {} + virtual ~CDataClassDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string namespaceVal, + const std::string name, + const std::string version, + const std::deque propertyCollection = std::deque(), + const std::deque instancePropertyCollection = std::deque(), + const bool unique = false, + const bool transientVal = false, + const std::string displayName = std::string(), + const std::string description = std::string()) { + if (! _isInitialized) { + _namespaceVal = namespaceVal; + _name = name; + _version = version; + _propertyCollection = propertyCollection; + _instancePropertyCollection = instancePropertyCollection; + _unique = unique; + _transientVal = transientVal; + _displayName = displayName; + _description = description; + + _isInitialized = true; + } + } + +public: + /// Accessor for the NamespaceVal + std::string getNamespaceVal() const { + return _namespaceVal; + } + + /// Accessor for the Name + std::string getName() const { + return _name; + } + + /// Accessor for the Version + std::string getVersion() const { + return _version; + } + + /// Accessor for the Property + std::deque getPropertyCollection() const { + return _propertyCollection; + } + + /// Accessor for the InstanceProperty + std::deque getInstancePropertyCollection() const { + return _instancePropertyCollection; + } + + /// Indicates whether the key properties of this class are enough to guarantee uniqueness from other classes of the same type + bool getUnique() const { + return _unique; + } + + /// Accessor for the TransientVal + bool getTransientVal() const { + return _transientVal; + } + + /// A hint as to what this class should be called when displaying it to a human + std::string getDisplayName() const { + return _displayName; + } + + /// A phrase to describe the class for mouse-over text, etc + std::string getDescription() const { + return _description; + } + +private: + std::string _namespaceVal; + std::string _name; + std::string _version; + std::deque _propertyCollection; + std::deque _instancePropertyCollection; + bool _unique; + bool _transientVal; + std::string _displayName; + std::string _description; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CDataClassDoc); +}; + +CAF_DECLARE_SMART_POINTER(CDataClassDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CDataClassInstanceCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CDataClassInstanceCollectionDoc.h new file mode 100644 index 000000000..ed360f873 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CDataClassInstanceCollectionDoc.h @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CDataClassInstanceCollectionDoc_h_ +#define CDataClassInstanceCollectionDoc_h_ + +namespace Caf { + +/// A simple container for objects of type DataClassInstanceCollection +class CDataClassInstanceCollectionDoc { +public: + CDataClassInstanceCollectionDoc() : + _isInitialized(false) {} + virtual ~CDataClassInstanceCollectionDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque dataClassInstanceCollection = std::deque()) { + if (! _isInitialized) { + _dataClassInstanceCollection = dataClassInstanceCollection; + + _isInitialized = true; + } + } + +public: + /// Accessor for the DataClassInstance + std::deque getDataClassInstanceCollection() const { + return _dataClassInstanceCollection; + } + +private: + bool _isInitialized; + + std::deque _dataClassInstanceCollection; + +private: + CAF_CM_DECLARE_NOCOPY(CDataClassInstanceCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CDataClassInstanceCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CDataClassInstanceDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CDataClassInstanceDoc.h new file mode 100644 index 000000000..72c187904 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CDataClassInstanceDoc.h @@ -0,0 +1,105 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CDataClassInstanceDoc_h_ +#define CDataClassInstanceDoc_h_ + +namespace Caf { + +/// A simple container for objects of type DataClassInstance +class CDataClassInstanceDoc { +public: + CDataClassInstanceDoc() : + _isInitialized(false) {} + virtual ~CDataClassInstanceDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string namespaceVal, + const std::string name, + const std::string version, + const std::deque cmdlMetadataCollection, + const std::deque propertyCollection, + const std::deque instancePropertyCollection, + const SmartPtrCCmdlUnionDoc cmdlUnion) { + if (! _isInitialized) { + _namespaceVal = namespaceVal; + _name = name; + _version = version; + _cmdlMetadataCollection = cmdlMetadataCollection; + _propertyCollection = propertyCollection; + _instancePropertyCollection = instancePropertyCollection; + _cmdlUnion = cmdlUnion; + + _isInitialized = true; + } + } + +public: + /// Accessor for the NamespaceVal + std::string getNamespaceVal() const { + return _namespaceVal; + } + + /// Accessor for the Name + std::string getName() const { + return _name; + } + + /// Accessor for the Version + std::string getVersion() const { + return _version; + } + + /// Accessor for the CmdlMetadata + std::deque getCmdlMetadataCollection() const { + return _cmdlMetadataCollection; + } + + /// Accessor for the Property + std::deque getPropertyCollection() const { + return _propertyCollection; + } + + /// Accessor for the InstanceProperty + std::deque getInstancePropertyCollection() const { + return _instancePropertyCollection; + } + + /// Accessor for the CmdlUnion + SmartPtrCCmdlUnionDoc getCmdlUnion() const { + return _cmdlUnion; + } + +private: + bool _isInitialized; + + std::string _namespaceVal; + std::string _name; + std::string _version; + std::deque _cmdlMetadataCollection; + std::deque _propertyCollection; + std::deque _instancePropertyCollection; + SmartPtrCCmdlUnionDoc _cmdlUnion; + +private: + CAF_CM_DECLARE_NOCOPY(CDataClassInstanceDoc); +}; + +CAF_DECLARE_SMART_POINTER(CDataClassInstanceDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CDataClassPropertyDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CDataClassPropertyDoc.h new file mode 100644 index 000000000..4ba19082b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CDataClassPropertyDoc.h @@ -0,0 +1,73 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CDataClassPropertyDoc_h_ +#define CDataClassPropertyDoc_h_ + +namespace Caf { + +/// A simple container for objects of type DataClassProperty +class CDataClassPropertyDoc { +public: + CDataClassPropertyDoc() : + _isInitialized(false) {} + virtual ~CDataClassPropertyDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string name, + const std::deque cmdlMetadata, + const std::string value) { + if (! _isInitialized) { + _name = name; + _cmdlMetadata = cmdlMetadata; + _value = value; + + _isInitialized = true; + } + } + +public: + /// Accessor for the Name + std::string getName() const { + return _name; + } + + /// Accessor for the CmdlMetadata + std::deque getCmdlMetadata() const { + return _cmdlMetadata; + } + + /// Accessor for the Value + std::string getValue() const { + return _value; + } + +private: + bool _isInitialized; + + std::string _name; + std::deque _cmdlMetadata; + std::string _value; + +private: + CAF_CM_DECLARE_NOCOPY(CDataClassPropertyDoc); +}; + +CAF_DECLARE_SMART_POINTER(CDataClassPropertyDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CDataClassSubInstanceDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CDataClassSubInstanceDoc.h new file mode 100644 index 000000000..b4137c9c2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CDataClassSubInstanceDoc.h @@ -0,0 +1,89 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CDataClassSubInstanceDoc_h_ +#define CDataClassSubInstanceDoc_h_ + +namespace Caf { + +/// A simple container for objects of type DataClassSubInstance +class CDataClassSubInstanceDoc { +public: + CDataClassSubInstanceDoc() : + _isInitialized(false) {} + virtual ~CDataClassSubInstanceDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string name, + const std::deque cmdlMetadataCollection, + const std::deque propertyCollection, + const std::deque instancePropertyCollection, + const SmartPtrCCmdlUnionDoc cmdlUnion) { + if (! _isInitialized) { + _name = name; + _cmdlMetadataCollection = cmdlMetadataCollection; + _propertyCollection = propertyCollection; + _instancePropertyCollection = instancePropertyCollection; + _cmdlUnion = cmdlUnion; + + _isInitialized = true; + } + } + +public: + /// Accessor for the Name + std::string getName() const { + return _name; + } + + /// Accessor for the CmdlMetadata + std::deque getCmdlMetadataCollection() const { + return _cmdlMetadataCollection; + } + + /// Accessor for the Property + std::deque getPropertyCollection() const { + return _propertyCollection; + } + + /// Accessor for the InstanceProperty + std::deque getInstancePropertyCollection() const { + return _instancePropertyCollection; + } + + /// Accessor for the CmdlUnion + SmartPtrCCmdlUnionDoc getCmdlUnion() const { + return _cmdlUnion; + } + +private: + bool _isInitialized; + + std::string _name; + std::deque _cmdlMetadataCollection; + std::deque _propertyCollection; + std::deque _instancePropertyCollection; + SmartPtrCCmdlUnionDoc _cmdlUnion; + +private: + CAF_CM_DECLARE_NOCOPY(CDataClassSubInstanceDoc); +}; + +CAF_DECLARE_SMART_POINTER(CDataClassSubInstanceDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CInstanceOperationCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CInstanceOperationCollectionDoc.h new file mode 100644 index 000000000..5309585dd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CInstanceOperationCollectionDoc.h @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CInstanceOperationCollectionDoc_h_ +#define CInstanceOperationCollectionDoc_h_ + +namespace Caf { + +/// A simple container for objects of type InstanceOperationCollection +class CInstanceOperationCollectionDoc { +public: + CInstanceOperationCollectionDoc() : + _isInitialized(false) {} + virtual ~CInstanceOperationCollectionDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque instanceOperationCollection) { + if (! _isInitialized) { + _instanceOperationCollection = instanceOperationCollection; + + _isInitialized = true; + } + } + +public: + /// Accessor for the InstanceOperation + std::deque getInstanceOperationCollection() const { + return _instanceOperationCollection; + } + +private: + bool _isInitialized; + + std::deque _instanceOperationCollection; + +private: + CAF_CM_DECLARE_NOCOPY(CInstanceOperationCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CInstanceOperationCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CInstanceOperationDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CInstanceOperationDoc.h new file mode 100644 index 000000000..d65004590 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CInstanceOperationDoc.h @@ -0,0 +1,65 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CInstanceOperationDoc_h_ +#define CInstanceOperationDoc_h_ + +namespace Caf { + +/// A simple container for objects of type InstanceOperation +class CInstanceOperationDoc { +public: + CInstanceOperationDoc() : + _isInitialized(false) {} + virtual ~CInstanceOperationDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string operationName, + const std::string moniker) { + if (! _isInitialized) { + _operationName = operationName; + _moniker = moniker; + + _isInitialized = true; + } + } + +public: + /// Accessor for the OperationName + std::string getOperationName() const { + return _operationName; + } + + /// Accessor for the Moniker + std::string getMoniker() const { + return _moniker; + } + +private: + bool _isInitialized; + + std::string _operationName; + std::string _moniker; + +private: + CAF_CM_DECLARE_NOCOPY(CInstanceOperationDoc); +}; + +CAF_DECLARE_SMART_POINTER(CInstanceOperationDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CInstanceParameterDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CInstanceParameterDoc.h new file mode 100644 index 000000000..241f2f160 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CInstanceParameterDoc.h @@ -0,0 +1,114 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CInstanceParameterDoc_h_ +#define CInstanceParameterDoc_h_ + +namespace Caf { + +/// A parameter containing a data class instance used by a method to control the outcome +class CInstanceParameterDoc { +public: + CInstanceParameterDoc() : + _isOptional(false), + _isList(false), + _isInitialized(false) {} + virtual ~CInstanceParameterDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string name, + const std::string instanceNamespace, + const std::string instanceName, + const std::string instanceVersion, + const bool isOptional = false, + const bool isList = false, + const std::string displayName = std::string(), + const std::string description = std::string()) { + if (! _isInitialized) { + _name = name; + _instanceNamespace = instanceNamespace; + _instanceName = instanceName; + _instanceVersion = instanceVersion; + _isOptional = isOptional; + _isList = isList; + _displayName = displayName; + _description = description; + + _isInitialized = true; + } + } + +public: + /// Name of parameter + std::string getName() const { + return _name; + } + + /// Namespace of instance object type + std::string getInstanceNamespace() const { + return _instanceNamespace; + } + + /// Name of instance object type + std::string getInstanceName() const { + return _instanceName; + } + + /// Version of instance object type + std::string getInstanceVersion() const { + return _instanceVersion; + } + + /// Indicates this parameter need not be passed + bool getIsOptional() const { + return _isOptional; + } + + /// Indicates whether to expect a list of values as opposed to a single value (the default if this attribute is not present) + bool getIsList() const { + return _isList; + } + + /// Human-readable version of the parameter name + std::string getDisplayName() const { + return _displayName; + } + + /// Short description of what the parameter is for + std::string getDescription() const { + return _description; + } + +private: + std::string _name; + std::string _instanceNamespace; + std::string _instanceName; + std::string _instanceVersion; + bool _isOptional; + bool _isList; + std::string _displayName; + std::string _description; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CInstanceParameterDoc); +}; + +CAF_DECLARE_SMART_POINTER(CInstanceParameterDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CJoinTypeDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CJoinTypeDoc.h new file mode 100644 index 000000000..da3c172d6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CJoinTypeDoc.h @@ -0,0 +1,81 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CJoinTypeDoc_h_ +#define CJoinTypeDoc_h_ + +namespace Caf { + +/// A simple container for objects of type JoinType +class CJoinTypeDoc { +public: + CJoinTypeDoc() : + _operand(OPERATOR_NONE), + _isInitialized(false) {} + virtual ~CJoinTypeDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const OPERATOR_TYPE operand, + const SmartPtrCClassFieldDoc dataClassLeft, + const SmartPtrCClassFieldDoc dataClassRight, + const std::string description) { + if (! _isInitialized) { + _operand = operand; + _dataClassLeft = dataClassLeft; + _dataClassRight = dataClassRight; + _description = description; + + _isInitialized = true; + } + } + +public: + /// Defines the operand used to join the class fields. Restricted to '=' for now + OPERATOR_TYPE getOperand() const { + return _operand; + } + + /// Identifies the fields on classes that uniquely identify relationship + SmartPtrCClassFieldDoc getDataClassLeft() const { + return _dataClassLeft; + } + + /// Identifies the fields on classes that uniquely identify relationship + SmartPtrCClassFieldDoc getDataClassRight() const { + return _dataClassRight; + } + + /// A short human-readable description of the join + std::string getDescription() const { + return _description; + } + +private: + OPERATOR_TYPE _operand; + SmartPtrCClassFieldDoc _dataClassLeft; + SmartPtrCClassFieldDoc _dataClassRight; + std::string _description; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CJoinTypeDoc); +}; + +CAF_DECLARE_SMART_POINTER(CJoinTypeDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CLogicalRelationshipDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CLogicalRelationshipDoc.h new file mode 100644 index 000000000..af3da625a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CLogicalRelationshipDoc.h @@ -0,0 +1,113 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CLogicalRelationshipDoc_h_ +#define CLogicalRelationshipDoc_h_ + +namespace Caf { + +/// Definition of a relationship between classes that can be described by identifying the fields on the classes that uniquely identify the relationship +class CLogicalRelationshipDoc { +public: + CLogicalRelationshipDoc() : + _arity(ARITY_NONE), + _isInitialized(false) {} + virtual ~CLogicalRelationshipDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string namespaceVal, + const std::string name, + const std::string version, + const ARITY_TYPE arity, + const SmartPtrCClassCardinalityDoc dataClassLeft, + const SmartPtrCClassCardinalityDoc dataClassRight, + const std::deque joinCollection, + const std::string description = std::string()) { + if (! _isInitialized) { + _namespaceVal = namespaceVal; + _name = name; + _version = version; + _arity = arity; + _dataClassLeft = dataClassLeft; + _dataClassRight = dataClassRight; + _joinCollection = joinCollection; + _description = description; + + _isInitialized = true; + } + } + +public: + /// Accessor for the NamespaceVal + std::string getNamespaceVal() const { + return _namespaceVal; + } + + /// Accessor for the Name + std::string getName() const { + return _name; + } + + /// Accessor for the Version + std::string getVersion() const { + return _version; + } + + /// Accessor for the Arity + ARITY_TYPE getArity() const { + return _arity; + } + + /// Accessor for the DataClassLeft + SmartPtrCClassCardinalityDoc getDataClassLeft() const { + return _dataClassLeft; + } + + /// Accessor for the DataClassRight + SmartPtrCClassCardinalityDoc getDataClassRight() const { + return _dataClassRight; + } + + /// Defines a join condition of the relationship + std::deque getJoinCollection() const { + return _joinCollection; + } + + /// Accessor for the Description + std::string getDescription() const { + return _description; + } + +private: + std::string _namespaceVal; + std::string _name; + std::string _version; + ARITY_TYPE _arity; + SmartPtrCClassCardinalityDoc _dataClassLeft; + SmartPtrCClassCardinalityDoc _dataClassRight; + std::deque _joinCollection; + std::string _description; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CLogicalRelationshipDoc); +}; + +CAF_DECLARE_SMART_POINTER(CLogicalRelationshipDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CMethodDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CMethodDoc.h new file mode 100644 index 000000000..eeb0c200e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CMethodDoc.h @@ -0,0 +1,113 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CMethodDoc_h_ +#define CMethodDoc_h_ + +namespace Caf { + +/// Definition of a method on a class +class CMethodDoc { +public: + CMethodDoc() : + _isInitialized(false) {} + virtual ~CMethodDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string name, + const std::deque parameterCollection = std::deque(), + const std::deque instanceParameterCollection = std::deque(), + const std::deque returnValCollection = std::deque(), + const std::deque eventValCollection = std::deque(), + const std::deque errorCollection = std::deque(), + const std::string displayName = std::string(), + const std::string description = std::string()) { + if (! _isInitialized) { + _name = name; + _parameterCollection = parameterCollection; + _instanceParameterCollection = instanceParameterCollection; + _returnValCollection = returnValCollection; + _eventValCollection = eventValCollection; + _errorCollection = errorCollection; + _displayName = displayName; + _description = description; + + _isInitialized = true; + } + } + +public: + /// name of the method + std::string getName() const { + return _name; + } + + /// Definition of a parameter that passes simple types to the method + std::deque getParameterCollection() const { + return _parameterCollection; + } + + /// Definition of a parameter that passes data class instances to the method + std::deque getInstanceParameterCollection() const { + return _instanceParameterCollection; + } + + /// Accessor for the ReturnVal + std::deque getReturnValCollection() const { + return _returnValCollection; + } + + /// Accessor for the EventVal + std::deque getEventValCollection() const { + return _eventValCollection; + } + + /// A class that may be returned to indicate an error occurred during the processing of the collection method + std::deque getErrorCollection() const { + return _errorCollection; + } + + /// Human-readable version of the method name + std::string getDisplayName() const { + return _displayName; + } + + /// A short phrase describing the purpose of the method + std::string getDescription() const { + return _description; + } + +private: + bool _isInitialized; + + std::string _name; + std::deque _parameterCollection; + std::deque _instanceParameterCollection; + std::deque _returnValCollection; + std::deque _eventValCollection; + std::deque _errorCollection; + std::string _displayName; + std::string _description; + +private: + CAF_CM_DECLARE_NOCOPY(CMethodDoc); +}; + +CAF_DECLARE_SMART_POINTER(CMethodDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CMethodParameterDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CMethodParameterDoc.h new file mode 100644 index 000000000..a351cd0c0 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CMethodParameterDoc.h @@ -0,0 +1,107 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CMethodParameterDoc_h_ +#define CMethodParameterDoc_h_ + +namespace Caf { + +/// A parameter containing a simple type used by a method to control the outcome +class CMethodParameterDoc { +public: + CMethodParameterDoc() : + _type(PARAMETER_NONE), + _isOptional(false), + _isList(false), + _isInitialized(false) {} + virtual ~CMethodParameterDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string name, + const PARAMETER_TYPE type, + const bool isOptional = false, + const bool isList = false, + const std::string defaultVal = std::string(), + const std::string displayName = std::string(), + const std::string description = std::string()) { + if (! _isInitialized) { + _name = name; + _type = type; + _isOptional = isOptional; + _isList = isList; + _defaultVal = defaultVal; + _displayName = displayName; + _description = description; + + _isInitialized = true; + } + } + +public: + /// Name of parameter + std::string getName() const { + return _name; + } + + /// Describes the data type of the property + PARAMETER_TYPE getType() const { + return _type; + } + + /// Indicates this parameter need not be passed + bool getIsOptional() const { + return _isOptional; + } + + /// Indicates whether to expect a list of values as opposed to a single value (the default if this attribute is not present) + bool getIsList() const { + return _isList; + } + + /// Accessor for the DefaultVal + std::string getDefaultVal() const { + return _defaultVal; + } + + /// Human-readable version of the parameter name + std::string getDisplayName() const { + return _displayName; + } + + /// Short description of what the parameter is for + std::string getDescription() const { + return _description; + } + +private: + std::string _name; + PARAMETER_TYPE _type; + bool _isOptional; + bool _isList; + std::string _defaultVal; + std::string _displayName; + std::string _description; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CMethodParameterDoc); +}; + +CAF_DECLARE_SMART_POINTER(CMethodParameterDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CPhysicalRelationshipDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CPhysicalRelationshipDoc.h new file mode 100644 index 000000000..4f17e66e6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CPhysicalRelationshipDoc.h @@ -0,0 +1,105 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CPhysicalRelationshipDoc_h_ +#define CPhysicalRelationshipDoc_h_ + +namespace Caf { + +/// Describes a relationship between dataclass where the key information from data class instances comprising the relationship are listed in an instance of this class +class CPhysicalRelationshipDoc { +public: + CPhysicalRelationshipDoc() : + _arity(ARITY_NONE), + _isInitialized(false) {} + virtual ~CPhysicalRelationshipDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string namespaceVal, + const std::string name, + const std::string version, + const ARITY_TYPE arity, + const SmartPtrCClassCardinalityDoc dataClassLeft, + const SmartPtrCClassCardinalityDoc dataClassRight, + const std::string description = std::string()) { + if (! _isInitialized) { + _namespaceVal = namespaceVal; + _name = name; + _version = version; + _arity = arity; + _dataClassLeft = dataClassLeft; + _dataClassRight = dataClassRight; + _description = description; + + _isInitialized = true; + } + } + +public: + /// Accessor for the NamespaceVal + std::string getNamespaceVal() const { + return _namespaceVal; + } + + /// Accessor for the Name + std::string getName() const { + return _name; + } + + /// Accessor for the Version + std::string getVersion() const { + return _version; + } + + /// Accessor for the Arity + ARITY_TYPE getArity() const { + return _arity; + } + + /// Accessor for the DataClassLeft + SmartPtrCClassCardinalityDoc getDataClassLeft() const { + return _dataClassLeft; + } + + /// Accessor for the DataClassRight + SmartPtrCClassCardinalityDoc getDataClassRight() const { + return _dataClassRight; + } + + /// Accessor for the Description + std::string getDescription() const { + return _description; + } + +private: + std::string _namespaceVal; + std::string _name; + std::string _version; + ARITY_TYPE _arity; + SmartPtrCClassCardinalityDoc _dataClassLeft; + SmartPtrCClassCardinalityDoc _dataClassRight; + std::string _description; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CPhysicalRelationshipDoc); +}; + +CAF_DECLARE_SMART_POINTER(CPhysicalRelationshipDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CRelationshipDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CRelationshipDoc.h new file mode 100644 index 000000000..c541ed2d2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/CRelationshipDoc.h @@ -0,0 +1,106 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppDoc". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CRelationshipDoc_h_ +#define CRelationshipDoc_h_ + +namespace Caf { + +/// Definition of a relationship between data classes +class CRelationshipDoc { +public: + CRelationshipDoc() : + _arity(ARITY_NONE), + _isInitialized(false) {} + virtual ~CRelationshipDoc() {} + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string namespaceVal, + const std::string name, + const std::string version, + const ARITY_TYPE arity, + const SmartPtrCClassCardinalityDoc dataClassLeft, + const SmartPtrCClassCardinalityDoc dataClassRight, + const std::string description = std::string()) { + if (! _isInitialized) { + _namespaceVal = namespaceVal; + _name = name; + _version = version; + _arity = arity; + _dataClassLeft = dataClassLeft; + _dataClassRight = dataClassRight; + _description = description; + + _isInitialized = true; + } + } + +public: + /// Accessor for the NamespaceVal + std::string getNamespaceVal() const { + return _namespaceVal; + } + + /// Accessor for the Name + std::string getName() const { + return _name; + } + + /// Accessor for the Version + std::string getVersion() const { + return _version; + } + + /// Number of parts (sides) to relationship. Restricted to a two-sided relationship for now + ARITY_TYPE getArity() const { + return _arity; + } + + /// Identifies the two classes that make up the relationship + SmartPtrCClassCardinalityDoc getDataClassLeft() const { + return _dataClassLeft; + } + + /// Identifies the two classes that make up the relationship + SmartPtrCClassCardinalityDoc getDataClassRight() const { + return _dataClassRight; + } + + /// A short human-readable description of the relationship + std::string getDescription() const { + return _description; + } + +private: + std::string _namespaceVal; + std::string _name; + std::string _version; + ARITY_TYPE _arity; + SmartPtrCClassCardinalityDoc _dataClassLeft; + SmartPtrCClassCardinalityDoc _dataClassRight; + std::string _description; + bool _isInitialized; + + +private: + CAF_CM_DECLARE_NOCOPY(CRelationshipDoc); +}; + +CAF_DECLARE_SMART_POINTER(CRelationshipDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/SchemaTypesDocInc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/SchemaTypesDocInc.h new file mode 100644 index 000000000..986c4c9f3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Doc/SchemaTypesDoc/SchemaTypesDocInc.h @@ -0,0 +1,69 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef SCHEMATYPESDOCINC_H_ +#define SCHEMATYPESDOCINC_H_ + +namespace Caf { + + typedef enum { + OPERATOR_NONE, + OPERATOR_EQUAL + } OPERATOR_TYPE; + + typedef enum { + ARITY_NONE, + ARITY_UNSIGNED_BYTE = 2 + } ARITY_TYPE; + + typedef enum { + VALIDATOR_NONE, + VALIDATOR_ENUM, + VALIDATOR_RANGE, + VALIDATOR_REGEX, + VALIDATOR_CUSTOM + } VALIDATOR_TYPE; + + // Forward declare + CAF_DECLARE_CLASS_AND_SMART_POINTER(CDataClassSubInstanceDoc); +} + +#include "CInstanceOperationDoc.h" +#include "CInstanceOperationCollectionDoc.h" +#include "CActionClassInstanceDoc.h" +#include "CActionClassInstanceCollectionDoc.h" + +#include "CCmdlMetadataDoc.h" +#include "CCmdlUnionDoc.h" +#include "CDataClassPropertyDoc.h" +#include "CDataClassSubInstanceDoc.h" +#include "CDataClassInstanceDoc.h" +#include "CDataClassInstanceCollectionDoc.h" + +#include "CMethodParameterDoc.h" +#include "CInstanceParameterDoc.h" + +#include "CClassIdentifierDoc.h" + +#include "CMethodDoc.h" +#include "CCollectMethodDoc.h" +#include "CActionClassDoc.h" + +#include "CClassPropertyDoc.h" + +#include "CClassFieldDoc.h" +#include "CJoinTypeDoc.h" + +#include "CClassCardinalityDoc.h" +#include "CClassInstancePropertyDoc.h" +#include "CDataClassDoc.h" +#include "CLogicalRelationshipDoc.h" +#include "CPhysicalRelationshipDoc.h" +#include "CRelationshipDoc.h" + +#endif /* SCHEMATYPESDOCINC_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/DocContracts.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/DocContracts.h new file mode 100644 index 000000000..57ba0feec --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/DocContracts.h @@ -0,0 +1,27 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef DocContracts_h_ +#define DocContracts_h_ + +#include "Doc/CafCoreTypesDoc/CafCoreTypesDocInc.h" +#include "Doc/SchemaTypesDoc/SchemaTypesDocInc.h" +#include "Doc/DiagTypesDoc/DiagTypesDocInc.h" +#include "Doc/DiagRequestDoc/DiagRequestDocInc.h" +#include "Doc/MgmtTypesDoc/MgmtTypesDocInc.h" +#include "Doc/MgmtRequestDoc/MgmtRequestDocInc.h" +#include "Doc/PayloadEnvelopeDoc/PayloadEnvelopeDocInc.h" +#include "Doc/PersistenceDoc/PersistenceDocInc.h" +#include "Doc/ProviderInfraDoc/ProviderInfraDocInc.h" +#include "Doc/ProviderRequestDoc/ProviderRequestDocInc.h" +#include "Doc/ProviderResultsDoc/ProviderResultsDocInc.h" +#include "Doc/ResponseDoc/ResponseDocInc.h" +#include "Doc/CafInstallRequestDoc/CafInstallRequestDocInc.h" +#include "Doc/MultiPmeMgmtRequestDoc/MultiPmeMgmtRequestDocInc.h" + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Fx/IBean.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Fx/IBean.h new file mode 100644 index 000000000..5a66bb0d9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Fx/IBean.h @@ -0,0 +1,54 @@ +/* + * Author: bwilliams + * Created: Jan 26, 2011 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _FxContracts_IBean_h_ +#define _FxContracts_IBean_h_ + +namespace Caf { + +CAF_FORWARD_DECLARE_SMART_INTERFACE(IBean); + +/// TODO - describe interface +struct __declspec(novtable) +IBean : public ICafObject { + CAF_DECL_UUID("860C6E41-76E4-404b-913F-C330EE864DCD") + + struct CArg { + CArg(const SmartPtrIBean& ref) : + _reference(ref), + _type(REFERENCE) {} + CArg(const std::string& val) : + _value(val), + _type(VALUE) {} + + typedef enum { + REFERENCE, + VALUE + } ARG_TYPE; + + SmartPtrIBean _reference; + std::string _value; + ARG_TYPE _type; + + private: + CArg(); + }; + + typedef std::deque Cargs; + typedef Cmapstrstr Cprops; + + virtual void initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) = 0; + + virtual void terminateBean() = 0; +}; + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Fx/IVariant.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Fx/IVariant.h new file mode 100644 index 000000000..052a5be19 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Fx/IVariant.h @@ -0,0 +1,31 @@ +/* + * Created on: Jul 23, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _FxContracts_IVARIANT_H_ +#define _FxContracts_IVARIANT_H_ + +namespace Caf { +struct __declspec(novtable) IVariant : public ICafObject { + CAF_DECL_UUID("05AC7CB8-BBD4-4B3B-AB80-29002DD73747") + + virtual GVariant *get() const = 0; + virtual std::string toString() const = 0; + virtual bool isString() const = 0; + virtual bool isBool() const = 0; + virtual bool isUint8() const = 0; + virtual bool isInt16() const = 0; + virtual bool isUint16() const = 0; + virtual bool isInt32() const = 0; + virtual bool isUint32() const = 0; + virtual bool isInt64() const = 0; + virtual bool isUint64() const = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(IVariant); +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/FxContracts.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/FxContracts.h new file mode 100644 index 000000000..07b8bea3b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/FxContracts.h @@ -0,0 +1,19 @@ +/* + * Author: mdonahue + * Created: 1/20/2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef FxContracts_h_ +#define FxContracts_h_ + +#include +#include + +// Interfaces +#include "Fx/IBean.h" +#include "Fx/IVariant.h" + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/Dependencies/CPollerMetadata.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/Dependencies/CPollerMetadata.h new file mode 100644 index 000000000..99d48fcfb --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/Dependencies/CPollerMetadata.h @@ -0,0 +1,48 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _IntegrationContracts_CPollerMetadata_h_ +#define _IntegrationContracts_CPollerMetadata_h_ + +namespace Caf { + +class CPollerMetadata { +public: + CPollerMetadata() : + _maxMessagesPerPoll(0), + _fixedRate(0) {} + +public: + uint32 getMaxMessagesPerPoll() const { + return _maxMessagesPerPoll; + } + void putMaxMessagesPerPoll(const uint32& maxMessagesPerPoll) { + _maxMessagesPerPoll = maxMessagesPerPoll; + } + + uint32 getFixedRate() const { + return _fixedRate; + } + void putFixedRate(const uint32& fixedRate) { + _fixedRate = fixedRate; + } + +private: + uint32 _maxMessagesPerPoll; + uint32 _fixedRate; + +private: + CPollerMetadata (const CPollerMetadata&); + CPollerMetadata & operator=(const CPollerMetadata&); +}; + +CAF_DECLARE_SMART_POINTER(CPollerMetadata); + +} + +#endif // #ifndef _IntegrationContracts_CPollerMetadata_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IChannelInterceptor.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IChannelInterceptor.h new file mode 100644 index 000000000..446475bdb --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IChannelInterceptor.h @@ -0,0 +1,61 @@ +/* + * Created on: Jan 25, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _IntegrationContracts_ICHANNELINTERCEPTOR_H_ +#define _IntegrationContracts_ICHANNELINTERCEPTOR_H_ + +namespace Caf { + +struct __declspec(novtable) + IChannelInterceptor : public ICafObject +{ + CAF_DECL_UUID("5002EA10-769B-44A0-AA6B-18ED91B57655") + + /** + * Invoked before the message is sent to the channel. + * The message may be modified if necessary. + * If this method returns null then the + * actual send invocation will not occur. + */ + virtual SmartPtrIIntMessage& preSend( + SmartPtrIIntMessage& message, + SmartPtrIMessageChannel& channel) = 0; + + /** + * Invoked immediately after the send invocation. The + * boolean value argument represents the return value of + * that invocation. + */ + virtual void postSend( + SmartPtrIIntMessage& message, + SmartPtrIMessageChannel& channel, + bool sent) = 0; + + /** + * Invoked as soon as receive is called and before a message + * is actually retrieved. If the return value is 'false' then + * no message will be retrieved. This only applies to PollableChannels. + */ + virtual bool preReceive( + SmartPtrIMessageChannel& channel) = 0; + + /** + * Invoked immediately after a message has been retrieved but + * before it is returned to the caller. The message may be modified + * if necessary. This only applies to PollableChannels. + */ + virtual SmartPtrIIntMessage& postReceive( + SmartPtrIIntMessage& message, + SmartPtrIMessageChannel& channel) = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IChannelInterceptor); + +} + +#endif /* _IntegrationContracts_ICHANNELINTERCEPTOR_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IChannelInterceptorInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IChannelInterceptorInstance.h new file mode 100644 index 000000000..5aa875272 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IChannelInterceptorInstance.h @@ -0,0 +1,27 @@ +/* + * Created on: Jan 25, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _IntegrationContracts_ICHANNELINTERCEPTORINSTANCE_H_ +#define _IntegrationContracts_ICHANNELINTERCEPTORINSTANCE_H_ + +namespace Caf { + +struct __declspec(novtable) + IChannelInterceptorInstance : public ICafObject +{ + CAF_DECL_UUID("566C38A8-FF13-4E31-814E-A18130C009F6") + + virtual uint32 getOrder() const = 0; + + virtual bool isChannelIdMatched(const std::string& channelId) const = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IChannelInterceptorInstance); + +} +#endif /* _IntegrationContracts_ICHANNELINTERCEPTORINSTANCE_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IChannelInterceptorSupport.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IChannelInterceptorSupport.h new file mode 100644 index 000000000..8d1b92470 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IChannelInterceptorSupport.h @@ -0,0 +1,27 @@ +/* + * Created on: Jan 26, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _IntegrationContracts_ICHANNELINTERCEPTORSUPPORT_H_ +#define _IntegrationContracts_ICHANNELINTERCEPTORSUPPORT_H_ + +namespace Caf { + +struct __declspec(novtable) +IChannelInterceptorSupport : public ICafObject { + CAF_DECL_UUID("C8F3CBAF-B1EB-4AD8-920C-EFE5EE25638A") + + typedef std::list InterceptorCollection; + virtual void setInterceptors( + const InterceptorCollection& interceptors) = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IChannelInterceptorSupport); + +} + +#endif /* _IntegrationContracts_ICHANNELINTERCEPTORSUPPORT_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IChannelResolver.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IChannelResolver.h new file mode 100644 index 000000000..7f6d653c0 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IChannelResolver.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _IntegrationContracts_IChannelResolver_h_ +#define _IntegrationContracts_IChannelResolver_h_ + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) + IChannelResolver : public ICafObject +{ + CAF_DECL_UUID("32361862-a312-4cab-a978-45b7059ca102") + + virtual SmartPtrIMessageChannel resolveChannelName( + const std::string& channelName) const = 0; + + virtual SmartPtrIIntegrationObject resolveChannelNameToObject( + const std::string& channelName) const = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IChannelResolver); + +} + +#endif // #ifndef _IntegrationContracts_IChannelResolver_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IDocument.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IDocument.h new file mode 100644 index 000000000..a2bf910bd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IDocument.h @@ -0,0 +1,51 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _IntegrationContracts_IDocument_h_ +#define _IntegrationContracts_IDocument_h_ + +namespace Caf { + +CAF_FORWARD_DECLARE_SMART_INTERFACE(IDocument); + +/// TODO - describe interface +struct __declspec(novtable) + IDocument : public ICafObject +{ + CAF_DECL_UUID("aa95ea11-3ca0-4863-b267-88d38246ff67") + +public: // Read operations + typedef std::map CAttributeCollection; + typedef std::multimap CChildCollection; + typedef std::deque COrderedChildCollection; + CAF_DECLARE_SMART_POINTER(CAttributeCollection); + CAF_DECLARE_SMART_POINTER(CChildCollection); + CAF_DECLARE_SMART_POINTER(COrderedChildCollection); + +public: // Read operations + virtual std::string findRequiredAttribute(const std::string& name) const = 0; + virtual std::string findOptionalAttribute(const std::string& name) const = 0; + virtual SmartPtrIDocument findRequiredChild(const std::string& name) const = 0; + virtual SmartPtrIDocument findOptionalChild(const std::string& name) const = 0; + virtual SmartPtrCAttributeCollection getAllAttributes() const = 0; + virtual SmartPtrCChildCollection getAllChildren() const = 0; + virtual SmartPtrCOrderedChildCollection getAllChildrenInOrder() const = 0; + virtual std::string getName() const = 0; + virtual std::string getValue() const = 0; + virtual std::string getPath() const = 0; + +public: // Save operations + virtual void saveToFile(const std::string& filename) const = 0; + virtual std::string saveToString() const = 0; + virtual std::string saveToStringRaw() const = 0; +}; + +} + +#endif // #ifndef _IntegrationContracts_IDocument_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IErrorHandler.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IErrorHandler.h new file mode 100644 index 000000000..e368f4a8c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IErrorHandler.h @@ -0,0 +1,31 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _IntegrationContracts_IErrorHandler_h_ +#define _IntegrationContracts_IErrorHandler_h_ + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) + IErrorHandler : public ICafObject +{ + CAF_DECL_UUID("da0e8646-43fb-4d43-a31b-f736c3978d48") + +public: // Read operations + virtual void handleError( + const SmartPtrIThrowable& throwable, + const SmartPtrIIntMessage& message) const = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IErrorHandler); + +} + +#endif // #ifndef _IntegrationContracts_IErrorHandler_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IErrorProcessor.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IErrorProcessor.h new file mode 100644 index 000000000..1f54feb3e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IErrorProcessor.h @@ -0,0 +1,29 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _IntegrationContracts_IErrorProcessor_h_ +#define _IntegrationContracts_IErrorProcessor_h_ + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) + IErrorProcessor : public ICafObject +{ + CAF_DECL_UUID("7ed3c23c-609a-4e42-9463-ed98da222d0a") + + virtual SmartPtrIIntMessage processErrorMessage( + const SmartPtrIIntMessage& message) = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IErrorProcessor); + +} + +#endif // #ifndef _IntegrationContracts_IErrorProcessor_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IExpressionInvoker.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IExpressionInvoker.h new file mode 100644 index 000000000..3222cf14d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IExpressionInvoker.h @@ -0,0 +1,26 @@ +/* + * Created on: Jul 23, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _IntegrationContracts_IEXPRESSIONINVOKER_H_ +#define _IntegrationContracts_IEXPRESSIONINVOKER_H_ + +namespace Caf { + +struct __declspec(novtable) IExpressionInvoker : public ICafObject +{ + CAF_DECL_UUID("EF1DC19E-4DE0-416C-A7CB-D1695FF8D52A") + + virtual SmartPtrIVariant invokeExpression( + const std::string& methodName, + const Cdeqstr& methodParams, + const SmartPtrIIntMessage& message) = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(IExpressionInvoker); +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IIntMessage.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IIntMessage.h new file mode 100644 index 000000000..ecc33795c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IIntMessage.h @@ -0,0 +1,68 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _IntegrationContracts_IIntMessage_h_ +#define _IntegrationContracts_IIntMessage_h_ + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) + IIntMessage : public ICafObject { + CAF_DECL_UUID("c9abc77a-ebd1-4203-911f-1b37d9b17d8e") + + // + // Routines dealing with the message + // + virtual UUID getMessageId() const = 0; + + virtual std::string getMessageIdStr() const = 0; + + // + // Routines dealing with the payload + // + typedef std::map > CHeaders; + CAF_DECLARE_SMART_POINTER(CHeaders); + + virtual SmartPtrCDynamicByteArray getPayload() const = 0; + + virtual std::string getPayloadStr() const = 0; + + // + // Routines dealing with the headers + // + virtual SmartPtrCHeaders getHeaders() const = 0; + + virtual SmartPtrIVariant findOptionalHeader( + const std::string& key) const = 0; + + virtual SmartPtrIVariant findRequiredHeader( + const std::string& key) const = 0; + + virtual std::string findOptionalHeaderAsString( + const std::string& key) const = 0; + + virtual std::string findRequiredHeaderAsString( + const std::string& key) const = 0; + + virtual SmartPtrICafObject findOptionalObjectHeader( + const std::string& key) const = 0; + + virtual SmartPtrICafObject findRequiredObjectHeader( + const std::string& key) const = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IIntMessage); + +typedef std::deque CMessageCollection; +CAF_DECLARE_SMART_POINTER(CMessageCollection); + +} + +#endif // #ifndef _IntegrationContracts_IIntMessage_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IIntegrationAppContext.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IIntegrationAppContext.h new file mode 100644 index 000000000..e7cae541b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IIntegrationAppContext.h @@ -0,0 +1,34 @@ +/* + * Created on: Jun 13, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _IntegrationContracts_IINTEGRATIONAPPCONTEXT_H_ +#define _IntegrationContracts_IINTEGRATIONAPPCONTEXT_H_ + +namespace Caf { + +struct __declspec(novtable) IIntegrationAppContext : public ICafObject { + CAF_DECL_UUID("CC12C628-50C1-4E74-998D-3A9C961FA06F") + + virtual SmartPtrIIntegrationObject getIntegrationObject( + const std::string& id) const = 0; + + virtual void getIntegrationObject( + const IID& iid, + void **ppv) const = 0; + + typedef std::deque CObjectCollection; + CAF_DECLARE_SMART_POINTER(CObjectCollection); + + virtual SmartPtrCObjectCollection getIntegrationObjects(const IID& iid) const = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IIntegrationAppContext); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IIntegrationAppContextAware.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IIntegrationAppContextAware.h new file mode 100644 index 000000000..0d156309f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IIntegrationAppContextAware.h @@ -0,0 +1,24 @@ +/* + * Created on: Jun 13, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _IntegrationContracts_IINTEGRATIONAPPCONTEXTAWARE_H_ +#define _IntegrationContracts_IINTEGRATIONAPPCONTEXTAWARE_H_ + +namespace Caf { + +struct __declspec(novtable) IIntegrationAppContextAware : public ICafObject { + CAF_DECL_UUID("9BC34EB5-AEFF-4384-86DE-421DE89AB6E8") + + virtual void setIntegrationAppContext( + SmartPtrIIntegrationAppContext context) = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IIntegrationAppContextAware); +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IIntegrationComponent.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IIntegrationComponent.h new file mode 100644 index 000000000..5da3ae125 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IIntegrationComponent.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _IntegrationContracts_IIntegrationComponent_h_ +#define _IntegrationContracts_IIntegrationComponent_h_ + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) + IIntegrationComponent : public ICafObject +{ + CAF_DECL_UUID("087e1494-4abe-4bb6-ae49-48f4510e057f") + + virtual bool isResponsible( + const SmartPtrIDocument& configSection) const = 0; + + virtual SmartPtrIIntegrationObject createObject( + const SmartPtrIDocument& configSection) const = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IIntegrationComponent); + +} + +#endif // #ifndef _IntegrationContracts_IIntegrationComponent_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IIntegrationComponentInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IIntegrationComponentInstance.h new file mode 100644 index 000000000..b21e4a38b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IIntegrationComponentInstance.h @@ -0,0 +1,30 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _IntegrationContracts_IIntegrationComponentInstance_h_ +#define _IntegrationContracts_IIntegrationComponentInstance_h_ + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) + IIntegrationComponentInstance : public ICafObject +{ + CAF_DECL_UUID("70053165-1e46-4893-8e27-0e6ee8675c44") + + virtual void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IIntegrationComponentInstance); + +} + +#endif // #ifndef _IntegrationContracts_IIntegrationComponent_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IIntegrationObject.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IIntegrationObject.h new file mode 100644 index 000000000..13ca53ef2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IIntegrationObject.h @@ -0,0 +1,36 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _IntegrationContracts_IIntegrationObject_h_ +#define _IntegrationContracts_IIntegrationObject_h_ + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) + IIntegrationObject : public ICafObject +{ + CAF_DECL_UUID("295fa2c8-01a7-4102-b13e-8fcac00b3e5f") + + virtual void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) = 0; + + virtual std::string getId() const = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IIntegrationObject); + +typedef std::map CIntegrationObjectCollection; +CAF_DECLARE_SMART_POINTER(CIntegrationObjectCollection); + +} + +#endif // #ifndef _IntegrationContracts_IIntegrationObject_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/ILifecycle.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/ILifecycle.h new file mode 100644 index 000000000..19ddd38d2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/ILifecycle.h @@ -0,0 +1,30 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _IntegrationContracts_ILifecycle_h_ +#define _IntegrationContracts_ILifecycle_h_ + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) + ILifecycle : public ICafObject +{ + CAF_DECL_UUID("180845f8-c956-46b3-8a1b-ef5061cc927a") + + virtual void start(const uint32 timeoutMs) = 0; + virtual void stop(const uint32 timeoutMs) = 0; + virtual bool isRunning() const = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(ILifecycle); + +} + +#endif // #ifndef _IntegrationContracts_ILifecycle_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IMessageChannel.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IMessageChannel.h new file mode 100644 index 000000000..2524b112d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IMessageChannel.h @@ -0,0 +1,33 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _IntegrationContracts_IMessageChannel_h_ +#define _IntegrationContracts_IMessageChannel_h_ + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) + IMessageChannel : public ICafObject +{ + CAF_DECL_UUID("d5192d01-9c26-4c1c-8966-66d7a108bcbf") + + virtual bool send( + const SmartPtrIIntMessage& message) = 0; + + virtual bool send( + const SmartPtrIIntMessage& message, + const int32 timeout) = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IMessageChannel); + +} + +#endif // #ifndef _IntegrationContracts_IMessageChannel_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IMessageDispatcher.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IMessageDispatcher.h new file mode 100644 index 000000000..04cb7da6c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IMessageDispatcher.h @@ -0,0 +1,35 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _IntegrationContracts_IMessageDispatcher_h_ +#define _IntegrationContracts_IMessageDispatcher_h_ + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) + IMessageDispatcher : public ICafObject +{ + CAF_DECL_UUID("639d8ead-6406-4c41-9a36-74d065f5dd6b") + + virtual void addHandler( + const SmartPtrIMessageHandler& messageHandler) = 0; + + virtual void removeHandler( + const SmartPtrIMessageHandler& messageHandler) = 0; + + virtual bool dispatch( + const SmartPtrIIntMessage& message) = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IMessageDispatcher); + +} + +#endif // #ifndef _IntegrationContracts_IMessageDispatcher_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IMessageHandler.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IMessageHandler.h new file mode 100644 index 000000000..a3584248f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IMessageHandler.h @@ -0,0 +1,33 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _IntegrationContracts_IMessageHandler_h_ +#define _IntegrationContracts_IMessageHandler_h_ + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) + IMessageHandler : public ICafObject +{ + CAF_DECL_UUID("39a78b6f-f326-4739-b8ad-9e90a827745a") + + virtual void handleMessage( + const SmartPtrIIntMessage& message) = 0; + + virtual SmartPtrIIntMessage getSavedMessage() const = 0; + + virtual void clearSavedMessage() = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IMessageHandler); + +} + +#endif // #ifndef _IntegrationContracts_IMessageHandler_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IMessageProcessor.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IMessageProcessor.h new file mode 100644 index 000000000..b1d234c5c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IMessageProcessor.h @@ -0,0 +1,29 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _IntegrationContracts_IMessageProcessor_h_ +#define _IntegrationContracts_IMessageProcessor_h_ + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) + IMessageProcessor : public ICafObject +{ + CAF_DECL_UUID("68770787-c44e-457e-bf8d-20c64d37bfee") + + virtual SmartPtrIIntMessage processMessage( + const SmartPtrIIntMessage& message) = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IMessageProcessor); + +} + +#endif // #ifndef _IntegrationContracts_IMessageProcessor_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IMessageProducer.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IMessageProducer.h new file mode 100644 index 000000000..243ae3871 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IMessageProducer.h @@ -0,0 +1,28 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _IntegrationContracts_IMessageProducer_h_ +#define _IntegrationContracts_IMessageProducer_h_ + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) + IMessageProducer : public ICafObject +{ + CAF_DECL_UUID("14430bc5-8556-48f8-b37f-c2f24a50d8dd") + + virtual bool isMessageProducer() const = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IMessageProducer); + +} + +#endif // #ifndef _IntegrationContracts_IMessageProducer_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IMessageRouter.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IMessageRouter.h new file mode 100644 index 000000000..4e0fa781e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IMessageRouter.h @@ -0,0 +1,28 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _IntegrationContracts_IMessageRouter_h_ +#define _IntegrationContracts_IMessageRouter_h_ + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) + IMessageRouter : public ICafObject +{ + CAF_DECL_UUID("27ed0739-e527-469b-882f-196d532be0bd") + + virtual void routeMessage(const SmartPtrIIntMessage& message) = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IMessageRouter); + +} + +#endif // #ifndef _IntegrationContracts_IMessageRouter_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IMessageSplitter.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IMessageSplitter.h new file mode 100644 index 000000000..c4d20d931 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IMessageSplitter.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _IntegrationContracts_IMessageSplitter_h_ +#define _IntegrationContracts_IMessageSplitter_h_ + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) + IMessageSplitter : public ICafObject +{ + CAF_DECL_UUID("89a25ba3-113d-4efc-af46-522feda304ac") + + typedef std::deque CMessageCollection; + CAF_DECLARE_SMART_POINTER(CMessageCollection); + + virtual SmartPtrCMessageCollection splitMessage( + const SmartPtrIIntMessage& message) = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IMessageSplitter); + +} + +#endif // #ifndef _IntegrationContracts_IMessageSplitter_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IPhased.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IPhased.h new file mode 100644 index 000000000..0ed49e0c3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IPhased.h @@ -0,0 +1,23 @@ +/* + * Created on: Aug 6, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _IntegrationContracts_IPhased_h +#define _IntegrationContracts_IPhased_h + +namespace Caf { + +struct __declspec(novtable) IPhased : public ICafObject { + CAF_DECL_UUID("CAE354D0-E212-4030-8CB7-23C92D59C6A3") + + virtual int32 getPhase() const = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(IPhased); + +}; + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IPollableChannel.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IPollableChannel.h new file mode 100644 index 000000000..73641e205 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IPollableChannel.h @@ -0,0 +1,30 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _IntegrationContracts_IPollableChannel_h_ +#define _IntegrationContracts_IPollableChannel_h_ + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) + IPollableChannel : public ICafObject +{ + CAF_DECL_UUID("a7ce8841-f37d-489a-a299-e148c5ff6b11") + + virtual SmartPtrIIntMessage receive() = 0; + virtual SmartPtrIIntMessage receive(const int32 timeout) = 0; + virtual SmartPtrCPollerMetadata getPollerMetadata() const = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IPollableChannel); + +} + +#endif // #ifndef _IntegrationContracts_IPollableChannel_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IRunnable.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IRunnable.h new file mode 100644 index 000000000..565120bbc --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IRunnable.h @@ -0,0 +1,29 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _IntegrationContracts_IRunnable_h_ +#define _IntegrationContracts_IRunnable_h_ + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) + IRunnable : public ICafObject +{ + CAF_DECL_UUID("a3ad671c-3d04-4eba-aaa4-8dcc9c43c959") + + virtual void run() = 0; + virtual void cancel() = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IRunnable); + +} + +#endif // #ifndef _IntegrationContracts_IRunnable_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/ISmartLifecycle.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/ISmartLifecycle.h new file mode 100644 index 000000000..56103ac3d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/ISmartLifecycle.h @@ -0,0 +1,23 @@ +/* + * Created on: Aug 6, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _IntegrationContracts_ISmartLifecycle_h +#define _IntegrationContracts_ISmartLifecycle_h + +namespace Caf { + +struct __declspec(novtable) ISmartLifecycle : public ILifecycle { + CAF_DECL_UUID("312B7430-659F-48A1-AAAE-AE44D349132C") + + virtual bool isAutoStartup() const = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(ISmartLifecycle); + +}; + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/ISubscribableChannel.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/ISubscribableChannel.h new file mode 100644 index 000000000..c3b612202 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/ISubscribableChannel.h @@ -0,0 +1,31 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _IntegrationContracts_ISubscribableChannel_h_ +#define _IntegrationContracts_ISubscribableChannel_h_ + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) + ISubscribableChannel : public ICafObject +{ + CAF_DECL_UUID("14d7e980-1b98-4453-b27e-8c058fb705b9") + + virtual void subscribe( + const SmartPtrIMessageHandler& messageHandler) = 0; + virtual void unsubscribe( + const SmartPtrIMessageHandler& messageHandler) = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(ISubscribableChannel); + +} + +#endif // #ifndef _IntegrationContracts_ISubscribableChannel_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/ITaskExecutor.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/ITaskExecutor.h new file mode 100644 index 000000000..7e7aede8e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/ITaskExecutor.h @@ -0,0 +1,38 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _IntegrationContracts_ITaskExecutor_h_ +#define _IntegrationContracts_ITaskExecutor_h_ + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) + ITaskExecutor : public ICafObject +{ + CAF_DECL_UUID("4ab38314-fd31-49fc-bfce-173abc53f1a8") + + typedef enum { + ETaskStateNotStarted, + ETaskStateStarted, + ETaskStateStopping, + ETaskStateFinished, + ETaskStateFailed + } ETaskState; + + virtual void execute(const uint32 timeoutMs) = 0; + virtual void cancel(const uint32 timeoutMs) = 0; + virtual ETaskState getState() const = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(ITaskExecutor); + +} + +#endif // #ifndef _IntegrationContracts_ITaskExecutor_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IThrowable.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IThrowable.h new file mode 100644 index 000000000..5052ee2fe --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/IThrowable.h @@ -0,0 +1,33 @@ +/* + * Author: bwilliams + * Created: Oct. 25, 2011 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _FxContracts_IThrowable_h_ +#define _FxContracts_IThrowable_h_ + +namespace Caf { + +CAF_FORWARD_DECLARE_SMART_INTERFACE(IThrowable); + +/// TODO - describe interface +struct __declspec(novtable) +IThrowable : public ICafObject { + CAF_DECL_UUID("5bced55d-06b7-4c4b-b805-90b51311dc9b") + + virtual std::string getExceptionClassName() const = 0; + virtual std::string getMsg() const = 0; + virtual std::string getClassName() const = 0; + virtual std::string getFuncName() const = 0; + virtual HRESULT getError() const = 0; + virtual std::string getFullMsg() const = 0; +}; + +} + +#endif + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/ITransformer.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/ITransformer.h new file mode 100644 index 000000000..9826b35e5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Integration/ITransformer.h @@ -0,0 +1,29 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _IntegrationContracts_ITransformer_h_ +#define _IntegrationContracts_ITransformer_h_ + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) + ITransformer : public ICafObject +{ + CAF_DECL_UUID("1f2a6ecb-f842-4e09-82a8-89eaf64ec98b") + + virtual SmartPtrIIntMessage transformMessage( + const SmartPtrIIntMessage& message) = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(ITransformer); + +} + +#endif // #ifndef _IntegrationContracts_ITransformer_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/IntegrationContracts.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/IntegrationContracts.h new file mode 100644 index 000000000..15512788c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/IntegrationContracts.h @@ -0,0 +1,49 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef IntegrationContracts_h_ +#define IntegrationContracts_h_ + +#include + +// Dependencies +#include "Integration/Dependencies/CPollerMetadata.h" + +// Interfaces +#include "Integration/IIntMessage.h" +#include "Integration/IThrowable.h" +#include "Integration/IErrorHandler.h" +#include "Integration/IErrorProcessor.h" +#include "Integration/IRunnable.h" +#include "Integration/ITaskExecutor.h" +#include "Integration/IDocument.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/ILifecycle.h" +#include "Integration/IMessageChannel.h" +#include "Integration/IMessageHandler.h" +#include "Integration/IMessageProcessor.h" +#include "Integration/IMessageSplitter.h" +#include "Integration/IMessageDispatcher.h" +#include "Integration/IMessageProducer.h" +#include "Integration/IMessageRouter.h" +#include "Integration/ITransformer.h" +#include "Integration/IPollableChannel.h" +#include "Integration/ISubscribableChannel.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IChannelInterceptor.h" +#include "Integration/IChannelInterceptorInstance.h" +#include "Integration/IChannelInterceptorSupport.h" +#include "Integration/IIntegrationComponentInstance.h" +#include "Integration/IIntegrationComponent.h" +#include "Integration/IIntegrationAppContext.h" +#include "Integration/IIntegrationAppContextAware.h" +#include "Integration/IExpressionInvoker.h" +#include "Integration/IPhased.h" +#include "Integration/ISmartLifecycle.h" + +#endif // #ifndef IntegrationContracts_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/IntegrationContractsDefines.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/IntegrationContractsDefines.h new file mode 100644 index 000000000..bb40cf466 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/IntegrationContractsDefines.h @@ -0,0 +1,71 @@ +/* + * Author: bwilliams + * Created: 10/22/2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef IntegrationContractsDefines_h_ +#define IntegrationContractsDefines_h_ + +#include + +#include +#include +#include +#include +#include + +//////////////////////////////////////////////////////////////////////// +// +// Class declaration helpers +// +//////////////////////////////////////////////////////////////////////// +#define INTEGRATION_CONTRACT_DECLARE_STD_ACCESSOR( _classname_ ) \ + public: \ + _classname_(){}\ + private: \ + _classname_ (const _classname_ &); \ + _classname_ & operator=(const _classname_ &); \ + public: + +#define INTEGRATION_CONTRACT_DECLARE_NOCOPY( _classname_ ) \ + private: \ + _classname_ (const _classname_ &); \ + _classname_ & operator=(const _classname_ &) + +//////////////////////////////////////////////////////////////////////// +// +// Put these accessors in the header file to provide the implementation. +// +//////////////////////////////////////////////////////////////////////// +#define INTEGRATION_CONTRACT_ACCESSOR_IMPL_GET_PUT( _Type_, _Name_ ) \ + private: \ + _Type_ _##_Name_; \ + public: \ + _Type_ get##_Name_() const \ + { \ + return _##_Name_; \ + } \ + void put##_Name_(const _Type_& cr##_Name_) \ + { \ + _##_Name_ = cr##_Name_; \ + } + +//////////////////////////////////////////////////////////////////////// +// +// Put these accessors in the interface file to provide the declaration. +// +//////////////////////////////////////////////////////////////////////// +#define INTEGRATION_CONTRACT_ACCESSOR_VIRT_GET( _Type_, _Name_ ) \ + virtual _Type_ get##_Name_() const = 0; + +#define INTEGRATION_CONTRACT_ACCESSOR_VIRT_PUT( _Type_, _Name_ ) \ + virtual void put##_Name_(const _Type_ & cr##_Name_) = 0; + +#define INTEGRATION_CONTRACT_ACCESSOR_VIRT_GET_PUT( _Type_, _Name_ ) \ + virtual _Type_ get##_Name_() const = 0; \ + virtual void put##_Name_(const _Type_ & cr##_Name_) = 0; + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Ma/IConfigEnv.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Ma/IConfigEnv.h new file mode 100644 index 000000000..783a4e5f2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Ma/IConfigEnv.h @@ -0,0 +1,35 @@ +/* + * Author: bwilliams + * Created: Nov 12, 2015 + * + * Copyright (c) 2015 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _MaContracts_IConfigEnv_h_ +#define _MaContracts_IConfigEnv_h_ + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) +IConfigEnv : public ICafObject { + CAF_DECL_UUID("dea6cea4-9385-458e-b549-d05640382da6") + + virtual void initialize() = 0; + + virtual SmartPtrCPersistenceDoc getUpdated( + const int32 timeout) = 0; + + virtual void update( + const SmartPtrCPersistenceDoc& persistence) = 0; + + virtual void remove( + const SmartPtrCPersistenceDoc& persistence) = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IConfigEnv); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Ma/IPersistence.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Ma/IPersistence.h new file mode 100644 index 000000000..503e8fbd4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/Ma/IPersistence.h @@ -0,0 +1,35 @@ +/* + * Author: bwilliams + * Created: Nov 12, 2015 + * + * Copyright (c) 2015 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _MaContracts_IPersistence_h_ +#define _MaContracts_IPersistence_h_ + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) +IPersistence : public ICafObject { + CAF_DECL_UUID("5b48f8ef-7023-4583-9d2d-b15ae566b0cc") + + virtual void initialize() = 0; + + virtual SmartPtrCPersistenceDoc getUpdated( + const int32 timeout) = 0; + + virtual void update( + const SmartPtrCPersistenceDoc& persistence) = 0; + + virtual void remove( + const SmartPtrCPersistenceDoc& persistence) = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IPersistence); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/MaContracts.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/MaContracts.h new file mode 100644 index 000000000..714a2cde7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Contracts/MaContracts.h @@ -0,0 +1,19 @@ +/* + * Author: bwilliams + * Created: 1/20/2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef MaContracts_h_ +#define MaContracts_h_ + +#include "CafContracts.h" +#include "DocContracts.h" + +// Interfaces +#include "Ma/IPersistence.h" +#include "Ma/IConfigEnv.h" + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/DocUtils.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/DocUtils.h new file mode 100644 index 000000000..571501897 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/DocUtils.h @@ -0,0 +1,17 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef COMMON_SYS_INC_DOCUTILS_H_ +#define COMMON_SYS_INC_DOCUTILS_H_ + +#include +#include + +#include "../src/Doc/DocUtils/DocUtilsLink.h" + +#endif /* COMMON_SYS_INC_DOCUTILS_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/DocXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/DocXml.h new file mode 100644 index 000000000..c8f3d137d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/DocXml.h @@ -0,0 +1,30 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef COMMON_SYS_INC_DOCXML_H_ +#define COMMON_SYS_INC_DOCXML_H_ + +#include +#include + +#include "../src/Doc/DocXml/CafCoreTypesXml/CafCoreTypesXmlLink.h" +#include "../src/Doc/DocXml/SchemaTypesXml/SchemaTypesXmlLink.h" +#include "../src/Doc/DocXml/DiagTypesXml/DiagTypesXmlLink.h" +#include "../src/Doc/DocXml/DiagRequestXml/DiagRequestXmlLink.h" +#include "../src/Doc/DocXml/MgmtTypesXml/MgmtTypesXmlLink.h" +#include "../src/Doc/DocXml/MgmtRequestXml/MgmtRequestXmlLink.h" +#include "../src/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXmlLink.h" +#include "../src/Doc/DocXml/PersistenceXml/PersistenceXmlLink.h" +#include "../src/Doc/DocXml/ProviderInfraXml/ProviderInfraXmlLink.h" +#include "../src/Doc/DocXml/ProviderRequestXml/ProviderRequestXmlLink.h" +#include "../src/Doc/DocXml/ProviderResultsXml/ProviderResultsXmlLink.h" +#include "../src/Doc/DocXml/ResponseXml/ResponseXmlLink.h" +#include "../src/Doc/DocXml/CafInstallRequestXml/CafInstallRequestXmlLink.h" +#include "../src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXmlLink.h" + +#endif /* COMMON_SYS_INC_DOCXML_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration.h new file mode 100644 index 000000000..48cc847b7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration.h @@ -0,0 +1,26 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef COMMON_SYS_INC_INTEGRATION_H_ +#define COMMON_SYS_INC_INTEGRATION_H_ + +#include +#include + +#include "../src/Integration/Core/IntegrationCoreLink.h" +#include "../src/Integration/Caf/IntegrationCafLink.h" + +namespace Caf { + // Integration Contracts + extern INTEGRATIONCORE_LINKAGE const char* _sObjIdIntegrationObjectFactory; + extern INTEGRATIONCORE_LINKAGE const char* _sObjIdErrorChannel; + extern INTEGRATIONCORE_LINKAGE const char* _sObjIdNullChannel; + extern INTEGRATIONCORE_LINKAGE const char* _sObjIdHeaderExpressionInvoker; +} + +#endif /* COMMON_SYS_INC_INTEGRATION_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/BasePlatform.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/BasePlatform.cpp new file mode 100644 index 000000000..90b4a44a8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/BasePlatform.cpp @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" + +#ifdef WIN32 + +extern "C" +{ + +BOOL APIENTRY DllMain(HMODULE, uint32, LPVOID) +{ + return TRUE; +} + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/BasePlatformInc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/BasePlatformInc.h new file mode 100644 index 000000000..05093eba2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/BasePlatformInc.h @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef BasePlatformInc_h_ +#define BasePlatformInc_h_ + +#ifndef BASEPLATFORM_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define BASEPLATFORM_LINKAGE __declspec(dllexport) + #else + #define BASEPLATFORM_LINKAGE __declspec(dllimport) + #endif + #else + #define BASEPLATFORM_LINKAGE + #endif +#endif + +#include "PlatformTypes.h" +#include "PlatformDefines.h" +#include "PlatformErrors.h" +#include "PlatformIID.h" +#include "PlatformStringFunc.h" +#include "ICafObject.h" +#include "TCafObject.h" +#include "TCafQIObject.h" +#include "TCafSmartPtr.h" +#include "TCafStackObject.h" + +CAF_DECLARE_SMART_INTERFACE_POINTER(ICafObject); + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/BasePlatformLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/BasePlatformLink.h new file mode 100644 index 000000000..1c08257c5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/BasePlatformLink.h @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef BasePlatformLink_h_ +#define BasePlatformLink_h_ + +#include "BasePlatformInc.h" + +#include +#include +#include +#include +#include + +namespace Caf { + +// Basic string containers +typedef std::deque Cdeqstr; +typedef std::set Csetstr; +typedef std::vector Cvecstr; +typedef std::map Cmapstrstr; +typedef std::multimap Cmmapstrstr; +CAF_DECLARE_SMART_POINTER(Cdeqstr); +CAF_DECLARE_SMART_POINTER(Csetstr); +CAF_DECLARE_SMART_POINTER(Cvecstr); +CAF_DECLARE_SMART_POINTER(Cmapstrstr); +CAF_DECLARE_SMART_POINTER(Cmmapstrstr); + +// GUID containers +typedef std::vector Cvecguid; +typedef std::deque Cdeqguid; +CAF_DECLARE_SMART_POINTER(Cvecguid); +CAF_DECLARE_SMART_POINTER(Cdeqguid); + +struct SGuidLessThan +{ + bool operator()(const GUID clhs, const GUID crhs) const + { + return ::memcmp(&clhs, &crhs, sizeof(GUID)) < 0; + } +}; + +typedef std::set Csetguid; +CAF_DECLARE_SMART_POINTER(Csetguid); + +// class to extract first part of a pair +template +struct select1st +{ + typename T::first_type operator()(const T & p) const { return p.first; } +}; + +// template function to make use of select1st easy. +// T is a container whose value_type is a pair +template +select1st make_select1st(const T &) { return select1st(); }; + +// class to extract second part of a pair +template +struct select2nd +{ + typename T::second_type operator()(const T & p) const { return p.second; } +}; + +// template function to make use of select2nd easy. +// T is a container whose value_type is a pair +template +select2nd make_select2nd(const T &) { return select2nd(); }; + +} + +#ifdef WIN32 +#include "PlatformApi.h" +#endif + +#endif + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Graphs/GraphsInc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Graphs/GraphsInc.h new file mode 100644 index 000000000..df005b4a9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Graphs/GraphsInc.h @@ -0,0 +1,14 @@ +/* + * Created on: Sep 30, 2011 + * Author: mdonahue + * + * Copyright (c) 2011 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef GRAPHSINC_H_ +#define GRAPHSINC_H_ + +#include "TEdgeListGraph.h" + +#endif /* GRAPHSINC_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Graphs/TEdgeListGraph.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Graphs/TEdgeListGraph.h new file mode 100644 index 000000000..43c9b4f97 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Graphs/TEdgeListGraph.h @@ -0,0 +1,497 @@ +/* + * Created on: Jul 09, 2003 + * Author: Scott VanCamp + * + * Copyright (c) 2003-2011 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef TEDGELISTGRAPH_H_ +#define TEDGELISTGRAPH_H_ + +#include +#include +#include +#include + +////////////////////////////////////////////////////////////////////////////// +// +// Simple graph that uses an edge list +// +// Since we may be using this graph with smart pointers I allow you to specify +// you own less than function. See +// for smart class less than template functions. +////////////////////////////////////////////////////////////////////////////// +using namespace Caf; + +template < class Item, class CustomLess = std::less< Item > > +class TEdgeListGraph +{ + private: + typedef TEdgeListGraph< Item, CustomLess > SameGraphType; + + public: + typedef std::set< Item, CustomLess> CsetVertexEdges; + typedef std::set< Item* > CsetptrVertexEdges; + typedef std::map< Item, CsetptrVertexEdges, CustomLess > CmapVertexEdgeList; + typedef std::list< Item > ClistVertexEdges; + + TEdgeListGraph() + : CAF_CM_INIT( "TEdgeListGraph" ) + { + } + + Item findVertex( const Item& crItemVertex ) const + { + return internalFindVertex(crItemVertex, _mapEdgeList); + } + + bool isVertexInGraph( const Item& crItemVertex ) const + { + return internalIsVertexInGraph(crItemVertex, _mapEdgeList); + } + + bool isEdgeInGraph(const Item& source, const Item& destination) const + { + return internalIsEdgeInGraph(source, destination, _mapEdgeList); + } + + void addVertex( const Item& crItemVertex ) + { + internalAddVertex(crItemVertex, _mapEdgeList); + } + + void removeVertices( const CsetVertexEdges& crsetParents) + { + internalRemoveVertices(crsetParents, _mapEdgeList); + } + + void removeVertex( const Item& crItemVertex ) + { + return internalRemoveVertex(crItemVertex, _mapEdgeList); + } + + void addEdge( const Item& crItemSource, const Item& crItemDestination ) + { + internalAddEdge(crItemSource, crItemDestination, _mapEdgeList); + } + + void removeEdge( const Item& crItemSource, const Item& crItemDestination ) + { + internalRemoveEdge(crItemSource, crItemDestination, _mapEdgeList); + } + + CsetVertexEdges getVertices() const + { + return internalGetVertices(_mapEdgeList); + } + + uint32 getNumberVertices() const + { + return static_cast(_mapEdgeList.size()); + } + + ////////////////////////////////////////////////////////////////////// + // + // getEdges() + // + // Does not recurse into the dependencies, returns the immediate items + // that the item depends on. + ////////////////////////////////////////////////////////////////////// + CsetVertexEdges getEdges( const Item& crItemVertex ) const + { + return internalGetEdges(crItemVertex, _mapEdgeList); + } + + ////////////////////////////////////////////////////////////////////// + // + // getParents() + // + // Returns the parents of a given vertex + // + ////////////////////////////////////////////////////////////////////// + CsetVertexEdges getParents( const Item& crItemVertex ) const + { + return internalGetParents(crItemVertex, _mapEdgeList); + } + + ////////////////////////////////////////////////////////////////////// + // + // getAllParents() + // Returns a set of all the parents of a particular vertex + // + ////////////////////////////////////////////////////////////////////// + CsetVertexEdges getAllParents( const Item& crItemVertex ) const + { + CsetVertexEdges oSetParents; + + // Get the Parents + internalGetAllParents( crItemVertex, _mapEdgeList, oSetParents ); + return oSetParents; + } + + void copyGraph(SameGraphType& copy) const + { + internalCopyGraph(*this, copy); + } + + ////////////////////////////////////////////////////////////////////// + // + // topologySort() + // Returns a topology sort of the entire graph. + // The returned list indicates vertices in sorted order + // + ////////////////////////////////////////////////////////////////////// + // Kahn, A. B. (1962), "Topological sorting of large networks", Communications of the ACM 5 (11): 558�562 + // + // L <- Empty list that will contain the sorted elements + // S <- Set of all nodes with no incoming edges + // while S is non-empty do + // remove a node n from S + // insert n into L + // for each node m with an edge e from n to m do + // remove edge e from the graph + // if m has no other incoming edges then + // insert m into S + // if graph has edges then + // output error message (graph has at least one cycle) + // else + // output message (proposed topologically sorted order: L) + ClistVertexEdges topologySort() const + { + CAF_CM_FUNCNAME("topologySort"); + ClistVertexEdges sortedList; + + // Work with a temporary copy of the graph + TEdgeListGraph graphCopy; + internalCopyGraph(*this, graphCopy); + CsetVertexEdges setNoParents; + + CsetVertexEdges vertices = graphCopy.getVertices(); + for (typename CsetVertexEdges::const_iterator vertex = vertices.begin(); + vertex != vertices.end(); + ++vertex) { + if (graphCopy.getParents(*vertex).size() == 0) { + setNoParents.insert(*vertex); + } + } + + while (setNoParents.size()) { + Item n = *(setNoParents.begin()); + setNoParents.erase(setNoParents.begin()); + sortedList.push_back(n); + CsetVertexEdges edges = graphCopy.getEdges(n); + for (typename CsetVertexEdges::const_iterator edge = edges.begin(); + edge != edges.end(); + ++edge) { + graphCopy.removeEdge(n, *edge); + + bool edgeFound = false; + CsetVertexEdges vertices = graphCopy.getVertices(); + for (typename CsetVertexEdges::const_iterator vertex = vertices.begin(); + !edgeFound && (vertex != vertices.end()); + ++vertex) { + edgeFound = graphCopy.isEdgeInGraph(*vertex, *edge); + } + + if (!edgeFound) { + setNoParents.insert(*edge); + } + } + } + + // Cycle check + vertices = graphCopy.getVertices(); + for (typename CsetVertexEdges::const_iterator vertex = vertices.begin(); + vertex != vertices.end(); + ++vertex) { + if (graphCopy.getEdges(*vertex).size()) { + CAF_CM_EXCEPTION_VA0(ERROR_INVALID_STATE, "The graph has at least one cycle"); + } + } + + return sortedList; + } + + private: + Item internalFindVertex( const Item& crItemVertex, const CmapVertexEdgeList& graph ) const + { + Item FoundVertex; + // Find the vertex + typename CmapVertexEdgeList::const_iterator imapVertex = graph.find( crItemVertex ); + if( imapVertex != graph.end() ) + { + FoundVertex = ( imapVertex->first ); + } + return FoundVertex; + } + + bool internalIsVertexInGraph( const Item& crItemVertex, const CmapVertexEdgeList& graph ) const + { + bool bVertexIsInGraph = false; + + // Find the vertex + typename CmapVertexEdgeList::const_iterator imapVertex = graph.find( crItemVertex ); + if( imapVertex != graph.end() ) + { + bVertexIsInGraph = true; + } + return bVertexIsInGraph; + } + + bool internalIsEdgeInGraph(const Item& source, const Item& destination, const CmapVertexEdgeList& graph) const + { + CsetVertexEdges edges = internalGetEdges(source, graph); + return (edges.end() != edges.find(destination)); + } + + + void internalAddVertex( const Item& crItemVertex, CmapVertexEdgeList& graph ) + { + CAF_CM_FUNCNAME("internalAddVertex"); + // Ensure that the Vertex doesn't already exist in the graph + // we do not allow duplicate Vertices to exist. + typename CmapVertexEdgeList::const_iterator imapEdgeList + = graph.find( crItemVertex ); + if ( graph.end() == imapEdgeList ) + { + graph.insert( std::make_pair( crItemVertex, CsetptrVertexEdges() ) ); + } + else + { + CAF_CM_EXCEPTION_VA0( + ERROR_DUPLICATE_TAG, + "Vertex already exists in the graph, cannot add duplicate Vertices"); + } + } + + void internalRemoveVertices( const CsetVertexEdges& crsetParents, CmapVertexEdgeList& graph) + { + for( typename CsetVertexEdges::const_iterator isetVertex = crsetParents.begin(); + isetVertex != crsetParents.end(); + ++isetVertex ) + { + internalRemoveVertex( *isetVertex, graph ); + } + } + + void internalRemoveVertex( const Item& crItemVertex, CmapVertexEdgeList& graph ) + { + CsetVertexEdges osetVerticesAffected; + + // Find the vertex + typename CmapVertexEdgeList::iterator imapVertex = graph.find( crItemVertex ); + if( imapVertex != graph.end() ) + { + // Get an Item pointer to the vertex that we wish to remove + Item* pItem = const_cast( &( imapVertex->first ) ); + + // Iterate over each vertex removing each reference to the vertex being removed + for( typename CmapVertexEdgeList::iterator imapEdgeList = graph.begin(); + imapEdgeList != graph.end(); + ++imapEdgeList ) + { + // Is the item in the edge list for the current vertex + typename CsetptrVertexEdges::iterator isetVertex = imapEdgeList->second.find( pItem ); + if( isetVertex != imapEdgeList->second.end() ) + { + // Remove the reference + imapEdgeList->second.erase( isetVertex ); + } + } + + // We no longer need the Item pointer + pItem = NULL; + + // Remove the vertex + graph.erase( imapVertex ); + } + } + + void internalAddEdge( const Item& crItemSource, const Item& crItemDestination, CmapVertexEdgeList& graph ) + { + CAF_CM_FUNCNAME("internalAddEdge"); + + // Ensure that you are not trying to add a dependency to yourself + if ( crItemSource == crItemDestination ) + { + CAF_CM_EXCEPTION_VA0( + ERROR_INVALID_DATA, + "Edges to yourself are not allowed, cannot add edge"); + } + + // Ensure that there is a source vertex + typename CmapVertexEdgeList::iterator imapSourceVertex = graph.find( crItemSource ); + if( imapSourceVertex == graph.end() ) + { + CAF_CM_EXCEPTION_VA0( + ERROR_TAG_NOT_FOUND, + "Unable to find source vertex, cannot add edge"); + } + + // Ensure that there is a destination vertex + typename CmapVertexEdgeList::iterator imapDestinationVertex = graph.find( crItemDestination ); + if( imapDestinationVertex == graph.end() ) + { + CAF_CM_EXCEPTION_VA0( + ERROR_TAG_NOT_FOUND, + "Unable to find destination vertex, cannot add edge"); + } + + // Create the edge + Item* pItem = const_cast( &( imapDestinationVertex->first ) ); + imapSourceVertex->second.insert( pItem ); + } + + void internalRemoveEdge( const Item& crItemSource, const Item& crItemDestination, CmapVertexEdgeList& graph ) + { + // Ensure that there is a source vertex + typename CmapVertexEdgeList::iterator imapSourceVertex = graph.find( crItemSource ); + if( imapSourceVertex != graph.end() ) + { + // Ensure that there is a destination vertex + typename CmapVertexEdgeList::iterator imapDestinationVertex = graph.find( crItemDestination ); + if( imapDestinationVertex != graph.end() ) + { + // Get a pointer to the edge + Item* pItem = const_cast( &( imapDestinationVertex->first ) ); + + // remove the edge + imapSourceVertex->second.erase( pItem ); + } + } + } + + CsetVertexEdges internalGetVertices(const CmapVertexEdgeList& graph) const + { + CsetVertexEdges osetVertices; + for( typename CmapVertexEdgeList::const_iterator imapEdgeList = graph.begin(); + imapEdgeList != graph.end(); + ++imapEdgeList ) + { + osetVertices.insert( imapEdgeList->first ); + } + return osetVertices; + } + + CsetVertexEdges internalGetEdges( const Item& crItemVertex, const CmapVertexEdgeList& graph ) const + { + CAF_CM_FUNCNAME("getEdges"); + CsetVertexEdges osetEdges; + + // Find the vertex + typename CmapVertexEdgeList::const_iterator imapVertex = graph.find( crItemVertex ); + if( imapVertex == graph.end() ) + { + CAF_CM_EXCEPTION_VA0( + ERROR_TAG_NOT_FOUND, + "Unable to find vertex. Cannot get edges"); + } + else + { + for( typename CsetptrVertexEdges::const_iterator isetEdge = imapVertex->second.begin(); + isetEdge != imapVertex->second.end(); + ++isetEdge ) + { + if( *isetEdge == NULL ) + { + CAF_CM_EXCEPTION_VA0( + E_FAIL, + "Invalid graph, an edge reported pointing to a invalid destination vertex"); + } + osetEdges.insert( **isetEdge ); + } + } + return osetEdges; + } + + CsetVertexEdges internalGetParents( + const Item& crItemVertex, + const CmapVertexEdgeList& graph) const + { + CsetVertexEdges oSetParents; + + // Find the vertex + typename CmapVertexEdgeList::const_iterator cimapVertex = graph.find( crItemVertex ); + if( cimapVertex != graph.end() ) + { + // Get an Item pointer to the vertex that we wish to get parents for + Item* pItem = const_cast( &( cimapVertex->first ) ); + + // Iterate over each vertex in the graph + for( typename CmapVertexEdgeList::const_iterator cimapEdgeList = graph.begin(); + cimapEdgeList != graph.end(); + ++cimapEdgeList ) + { + // Is the item in the edge list for the current vertex + typename CsetptrVertexEdges::const_iterator cisetVertex = cimapEdgeList->second.find( pItem ); + if( cisetVertex != cimapEdgeList->second.end() ) + { + // Add the vertex to the set of parents + oSetParents.insert( cimapEdgeList->first ); + } + } + + // We no longer need the Item pointer + pItem = NULL; + } + return oSetParents; + } + + void internalGetAllParents( + const Item& crItemVertex, + const CmapVertexEdgeList& graph, + CsetVertexEdges& roSetParents) const + { + // Find the vertex in the map + typename CmapVertexEdgeList::const_iterator imapVertex = graph.find( crItemVertex ); + if( imapVertex != graph.end() ) + { + // Get the parents of this vertex + CsetVertexEdges setCurrentParents = internalGetParents( crItemVertex, graph ); + + // For each parent found that we have not recorded yet find its parents + for( typename CsetVertexEdges::iterator isetCurrentParent = setCurrentParents.begin(); + isetCurrentParent != setCurrentParents.end(); + ++isetCurrentParent ) + { + // Have we recorded this current parent in the parent set? + typename CsetVertexEdges::iterator isetIsCurrentParentRecorded = roSetParents.find( *isetCurrentParent ); + if( isetIsCurrentParentRecorded == roSetParents.end() ) + { + // Since we have not recorded this vertex, record it and get its parents + roSetParents.insert( *isetCurrentParent ); + + // Since we have not recorded this parent, record it and get its parents + internalGetAllParents(*isetCurrentParent, graph, roSetParents ); + } + } + } + } + + void internalCopyGraph(const SameGraphType& source, SameGraphType& copy) const + { + CsetVertexEdges sourceVertices = source.getVertices(); + for (typename CsetVertexEdges::const_iterator vertex = sourceVertices.begin(); + vertex != sourceVertices.end(); + ++vertex) { + copy.addVertex(*vertex); + } + + for (typename CsetVertexEdges::const_iterator vertex = sourceVertices.begin(); + vertex != sourceVertices.end(); + ++vertex) { + CsetVertexEdges sourceEdges = source.getEdges(*vertex); + for (typename CsetVertexEdges::const_iterator edge = sourceEdges.begin(); + edge != sourceEdges.end(); + ++edge) { + copy.addEdge(*vertex, *edge); + } + } + } + + CmapVertexEdgeList _mapEdgeList; + CAF_CM_CREATE; +}; + +#endif /* TEDGELISTGRAPH_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/IteratorsInc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/IteratorsInc.h new file mode 100644 index 000000000..7e7386111 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/IteratorsInc.h @@ -0,0 +1,33 @@ +///////////////////////////////////////////////////////////////////////////// +// +// Author: J.P. Grossman +// +// Created: 10/16/2003 +// +// Copyright (c) 2003-2011 Vmware, Inc. All rights reserved. +// -- VMware Confidential +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef IteratorsInc_h_ +#define IteratorsInc_h_ + +#include "TIterator.h" +#include "TMapIterator.h" + +#include "TConstIterator.h" +#include "TConstMapIterator.h" + +#include "TSmartIterator.h" +#include "TSmartMapIterator.h" + +#include "TSmartConstIterator.h" +#include "TSmartConstMapIterator.h" + +#include "TMultimapIterator.h" +#include "TConstMultimapIterator.h" + +#include "TSmartMultimapIterator.h" +#include "TSmartConstMultimapIterator.h" + +#endif // #ifndef IteratorsInc_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TConstIterator.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TConstIterator.h new file mode 100644 index 000000000..f51af41c5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TConstIterator.h @@ -0,0 +1,94 @@ +///////////////////////////////////////////////////////////////////////////// +// +// Author: J.P. Grossman +// +// Purpose: Return a lightweight iterator for an arbitrary container. +// The iterator moves in the forward direction only; once +// it reaches the end you need a new one. I considered +// adding m_citerBegin to allow for a Reset method, but +// decided that it was better to have a "use once then +// throw away" iterator to prevent the misuse of passing +// the iterator around, possibly after the original +// container has gone away. This way use of the iterator +// is localized, much like the use of standard iterators. +// +// Created: 10/16/2003 +// +// Copyright (c) 2003-2011 Vmware, Inc. All rights reserved. +// -- VMware Confidential +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef TConstIterator_h_ +#define TConstIterator_h_ + +namespace Caf { + +template +class TConstIterator +{ +public: + TConstIterator () + { + m_citerCurrent = m_citerEnd; + } + + TConstIterator (const Container &rcContainer) + { + m_citerCurrent = rcContainer.begin(); + m_citerEnd = rcContainer.end(); + } + + TConstIterator (const TConstIterator &rhs) + { + m_citerCurrent = rhs.m_citerCurrent; + m_citerEnd = rhs.m_citerEnd; + } + + TConstIterator &operator= (const Container &rcContainer) + { + m_citerCurrent = rcContainer.begin(); + m_citerEnd = rcContainer.end(); + return *this; + } + + TConstIterator &operator= (const TConstIterator &rhs) + { + m_citerCurrent = rhs.m_citerCurrent; + m_citerEnd = rhs.m_citerEnd; + return *this; + } + +public: + const ValueType &operator* () + { + return *m_citerCurrent; + } + + const ValueType *operator-> () + { + return m_citerCurrent.operator->(); + } + + void operator++ () + { + ++m_citerCurrent; + } + + void operator++ (int32) + { + m_citerCurrent++; + } + + operator bool () + { + return m_citerCurrent != m_citerEnd; + } + +private: + typename Container::const_iterator m_citerCurrent; + typename Container::const_iterator m_citerEnd; +}; +} + +#endif // #ifndef TConstIterator_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TConstMapIterator.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TConstMapIterator.h new file mode 100644 index 000000000..7aa744eb1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TConstMapIterator.h @@ -0,0 +1,92 @@ +///////////////////////////////////////////////////////////////////////////// +// +// Author: J.P. Grossman +// +// Created: 10/16/2003 +// +// Copyright (c) 2003-2011 Vmware, Inc. All rights reserved. +// -- VMware Confidential +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef TConstMapIterator_h_ +#define TConstMapIterator_h_ + +namespace Caf { + +template +class TConstMultimapIterator; + +template +class TConstMapIterator +{ +public: + TConstMapIterator () + { + m_citerCurrent = m_citerEnd; + } + + TConstMapIterator (const Container &rcContainer) + { + m_citerCurrent = rcContainer.begin(); + m_citerEnd = rcContainer.end(); + } + + TConstMapIterator (const TConstMapIterator &rhs) + { + m_citerCurrent = rhs.m_citerCurrent; + m_citerEnd = rhs.m_citerEnd; + } + + TConstMapIterator &operator= (const Container &rcContainer) + { + m_citerCurrent = rcContainer.begin(); + m_citerEnd = rcContainer.end(); + return *this; + } + + TConstMapIterator &operator= (const TConstMapIterator &rhs) + { + m_citerCurrent = rhs.m_citerCurrent; + m_citerEnd = rhs.m_citerEnd; + return *this; + } + +public: + const ValueType &operator* () + { + return m_citerCurrent->second; + } + + const ValueType *operator-> () + { + return &m_citerCurrent->second; + } + + void operator++ () + { + ++m_citerCurrent; + } + + void operator++ (int32) + { + m_citerCurrent++; + } + + const KeyType &getKey (void) + { + return m_citerCurrent->first; + } + + operator bool () + { + return m_citerCurrent != m_citerEnd; + } + +private: + typename Container::const_iterator m_citerCurrent; + typename Container::const_iterator m_citerEnd; +}; +} + +#endif // #ifndef TConstMapIterator_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TConstMultimapIterator.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TConstMultimapIterator.h new file mode 100644 index 000000000..50e61a7e6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TConstMultimapIterator.h @@ -0,0 +1,82 @@ +///////////////////////////////////////////////////////////////////////////// +// +// Author: J.P. Grossman +// +// Created: 10/16/2003 +// +// Copyright (c) 2003-2011 Vmware, Inc. All rights reserved. +// -- VMware Confidential +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef TCONSTMULTIMAPITERATOR_H_ +#define TCONSTMULTIMAPITERATOR_H_ + +namespace Caf { + +template +class TConstMultimapIterator +{ +public: + TConstMultimapIterator () + { + m_citerCurrent = m_citerEnd; + } + + TConstMultimapIterator (const Container &rcContainer) + { + m_citerCurrent = rcContainer.begin(); + m_citerEnd = rcContainer.end(); + } + + TConstMultimapIterator (const TConstMultimapIterator &rhs) + { + m_citerCurrent = rhs.m_citerCurrent; + m_citerEnd = rhs.m_citerEnd; + } + + TConstMultimapIterator &operator= (const TConstMultimapIterator &rhs) + { + m_citerCurrent = rhs.m_citerCurrent; + m_citerEnd = rhs.m_citerEnd; + return *this; + } + +public: + const KeyType &getKey (void) + { + return m_citerCurrent->first; + } + + const ValueType &operator* () + { + return m_citerCurrent->second; + } + + const ValueType *operator-> () + { + return &m_citerCurrent->second; + } + + void operator++ () + { + ++m_citerCurrent; + } + + void operator++ (int32) + { + m_citerCurrent++; + } + + operator bool () + { + return (m_citerCurrent != m_citerEnd); + } + +private: + typename Container::const_iterator m_citerCurrent; + typename Container::const_iterator m_citerEnd; +}; +} + +#endif // #ifdef TCONSTMULTIMAPITERATOR_H_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TIterator.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TIterator.h new file mode 100644 index 000000000..787640cd7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TIterator.h @@ -0,0 +1,84 @@ +///////////////////////////////////////////////////////////////////////////// +// +// Author: J.P. Grossman +// +// Created: 10/16/2003 +// +// Copyright (c) 2003-2011 Vmware, Inc. All rights reserved. +// -- VMware Confidential +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef TIterator_h_ +#define TIterator_h_ + +namespace Caf { + +template +class TIterator +{ +public: + TIterator () + { + m_iterCurrent = m_iterEnd; + } + + TIterator (Container &rContainer) + { + m_iterCurrent = rContainer.begin(); + m_iterEnd = rContainer.end(); + } + + TIterator (const TIterator &rhs) + { + m_iterCurrent = rhs.m_iterCurrent; + m_iterEnd = rhs.m_iterEnd; + } + + TIterator &operator= (const Container &rContainer) + { + m_iterCurrent = rContainer.begin(); + m_iterEnd = rContainer.end(); + return *this; + } + + TIterator &operator= (const TIterator &rhs) + { + m_iterCurrent = rhs.m_iterCurrent; + m_iterEnd = rhs.m_iterEnd; + return *this; + } + +public: + ValueType &operator* () + { + return *m_iterCurrent; + } + + ValueType *operator-> () + { + return m_iterCurrent.operator->(); + } + + void operator++ () + { + ++m_iterCurrent; + } + + void operator++ (int32) + { + m_iterCurrent++; + } + + operator bool () + { + return m_iterCurrent != m_iterEnd; + } + +private: + typename Container::iterator m_iterCurrent; + typename Container::iterator m_iterEnd; +}; +} + +#endif // #ifndef TIterator_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TMapIterator.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TMapIterator.h new file mode 100644 index 000000000..b22c68e82 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TMapIterator.h @@ -0,0 +1,91 @@ +///////////////////////////////////////////////////////////////////////////// +// +// Author: J.P. Grossman +// +// Created: 10/16/2003 +// +// Copyright (c) 2003-2011 Vmware, Inc. All rights reserved. +// -- VMware Confidential +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef TMapIterator_h_ +#define TMapIterator_h_ + +namespace Caf { + +template class TMultimapIterator; + +template +class TMapIterator +{ +public: + TMapIterator () + { + m_iterCurrent = m_iterEnd; + } + + TMapIterator (Container &rContainer) + { + m_iterCurrent = rContainer.begin(); + m_iterEnd = rContainer.end(); + } + + TMapIterator (const TMapIterator &rhs) + { + m_iterCurrent = rhs.m_iterCurrent; + m_iterEnd = rhs.m_iterEnd; + } + + TMapIterator &operator= (const Container &rContainer) + { + m_iterCurrent = rContainer.begin(); + m_iterEnd = rContainer.end(); + return *this; + } + + TMapIterator &operator= (const TMapIterator &rhs) + { + m_iterCurrent = rhs.m_iterCurrent; + m_iterEnd = rhs.m_iterEnd; + return *this; + } + +public: + ValueType &operator* () + { + return m_iterCurrent->second; + } + + ValueType *operator-> () + { + return &m_iterCurrent->second; + } + + void operator++ () + { + ++m_iterCurrent; + } + + void operator++ (int32) + { + m_iterCurrent++; + } + + const KeyType &getKey (void) + { + return m_iterCurrent->first; + } + + operator bool () + { + return m_iterCurrent != m_iterEnd; + } + +private: + typename Container::iterator m_iterCurrent; + typename Container::iterator m_iterEnd; +}; +} + +#endif // #ifndef TMapIterator_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TMultimapIterator.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TMultimapIterator.h new file mode 100644 index 000000000..a6399b1f2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TMultimapIterator.h @@ -0,0 +1,82 @@ +///////////////////////////////////////////////////////////////////////////// +// +// Author: J.P. Grossman +// +// Created: 10/16/2003 +// +// Copyright (c) 2003-2011 Vmware, Inc. All rights reserved. +// -- VMware Confidential +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef TMULTIMAPITERATOR_H_ +#define TMULTIMAPITERATOR_H_ + +namespace Caf { + +template +class TMultimapIterator +{ +public: + TMultimapIterator () + { + m_iterCurrent = m_iterEnd; + } + + TMultimapIterator (Container &rContainer) + { + m_iterCurrent = rContainer.begin(); + m_iterEnd = rContainer.end(); + } + + TMultimapIterator (const TMultimapIterator &rhs) + { + m_iterCurrent = rhs.m_iterCurrent; + m_iterEnd = rhs.m_iterEnd; + } + + TMultimapIterator &operator= (const TMultimapIterator &rhs) + { + m_iterCurrent = rhs.m_iterCurrent; + m_iterEnd = rhs.m_iterEnd; + return *this; + } + +public: + const KeyType &getKey (void) + { + return m_iterCurrent->first; + } + + ValueType &operator* () + { + return m_iterCurrent->second; + } + + ValueType *operator-> () + { + return &m_iterCurrent->second; + } + + void operator++ () + { + ++m_iterCurrent; + } + + void operator++ (int32) + { + m_iterCurrent++; + } + + operator bool () + { + return (m_iterCurrent != m_iterEnd); + } + +private: + typename Container::iterator m_iterCurrent; + typename Container::iterator m_iterEnd; +}; +} + +#endif /* TMULTIMAPITERATOR_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TSmartConstIterator.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TSmartConstIterator.h new file mode 100644 index 000000000..62ca9afde --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TSmartConstIterator.h @@ -0,0 +1,88 @@ +///////////////////////////////////////////////////////////////////////////// +// +// Author: J.P. Grossman +// +// Purpose: Variant of TConstIterator that deals with smart pointers +// transparently when the arrow operator is used. ONLY works with +// containers that hold smart pointers. +// +// Created: 10/22/2003 +// +// Copyright (c) 2003-2011 Vmware, Inc. All rights reserved. +// -- VMware Confidential +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef TSmartConstIterator_h_ +#define TSmartConstIterator_h_ + +namespace Caf { + +template +class TSmartConstIterator +{ +public: + TSmartConstIterator () + { + m_citerCurrent = m_citerEnd; + } + + TSmartConstIterator (const Container &rcContainer) + { + m_citerCurrent = rcContainer.begin(); + m_citerEnd = rcContainer.end(); + } + + TSmartConstIterator (const TSmartConstIterator &rhs) + { + m_citerCurrent = rhs.m_citerCurrent; + m_citerEnd = rhs.m_citerEnd; + } + + TSmartConstIterator &operator= (const Container &rcContainer) + { + m_citerCurrent = rcContainer.begin(); + m_citerEnd = rcContainer.end(); + return *this; + } + + TSmartConstIterator &operator= (const TSmartConstIterator &rhs) + { + m_citerCurrent = rhs.m_citerCurrent; + m_citerEnd = rhs.m_citerEnd; + return *this; + } + +public: + const SmartPtrType &operator* () + { + return *m_citerCurrent; + } + + const ValueType *operator-> () + { + return m_citerCurrent->operator->(); + } + + void operator++ () + { + ++m_citerCurrent; + } + + void operator++ (int32) + { + m_citerCurrent++; + } + + operator bool () + { + return m_citerCurrent != m_citerEnd; + } + +private: + typename Container::const_iterator m_citerCurrent; + typename Container::const_iterator m_citerEnd; +}; +} + +#endif // #ifndef TSmartConstIterator_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TSmartConstMapIterator.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TSmartConstMapIterator.h new file mode 100644 index 000000000..acc6b9aec --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TSmartConstMapIterator.h @@ -0,0 +1,91 @@ +///////////////////////////////////////////////////////////////////////////// +// +// Author: J.P. Grossman +// +// Created: 10/22/2003 +// +// Copyright (c) 2003-2011 Vmware, Inc. All rights reserved. +// -- VMware Confidential +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef TSmartConstMapIterator_h_ +#define TSmartConstMapIterator_h_ + +namespace Caf { + +template class TSmartConstMultimapIterator; + +template +class TSmartConstMapIterator +{ +public: + TSmartConstMapIterator () + { + m_citerCurrent = m_citerEnd; + } + + TSmartConstMapIterator (const Container &rcContainer) + { + m_citerCurrent = rcContainer.begin(); + m_citerEnd = rcContainer.end(); + } + + TSmartConstMapIterator (const TSmartConstMapIterator &rhs) + { + m_citerCurrent = rhs.m_citerCurrent; + m_citerEnd = rhs.m_citerEnd; + } + + TSmartConstMapIterator &operator= (const Container &rcContainer) + { + m_citerCurrent = rcContainer.begin(); + m_citerEnd = rcContainer.end(); + return *this; + } + + TSmartConstMapIterator &operator= (const TSmartConstMapIterator &rhs) + { + m_citerCurrent = rhs.m_citerCurrent; + m_citerEnd = rhs.m_citerEnd; + return *this; + } + +public: + const SmartPtrType &operator* () + { + return m_citerCurrent->second; + } + + const ValueType *operator-> () + { + return m_citerCurrent->second.operator->(); + } + + void operator++ () + { + ++m_citerCurrent; + } + + void operator++ (int32) + { + m_citerCurrent++; + } + + const KeyType &getKey (void) + { + return m_citerCurrent->first; + } + + operator bool () + { + return m_citerCurrent != m_citerEnd; + } + +private: + typename Container::const_iterator m_citerCurrent; + typename Container::const_iterator m_citerEnd; +}; +} + +#endif // #ifndef TSmartConstMapIterator_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TSmartConstMultimapIterator.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TSmartConstMultimapIterator.h new file mode 100644 index 000000000..a9fa3fdad --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TSmartConstMultimapIterator.h @@ -0,0 +1,83 @@ +///////////////////////////////////////////////////////////////////////////// +// +// Author: J.P. Grossman +// +// Created: 10/16/2003 +// +// Copyright (c) 2003-2011 Vmware, Inc. All rights reserved. +// -- VMware Confidential +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef TSMARTCONSTMULTIMAPITERATOR_H_ +#define TSMARTCONSTMULTIMAPITERATOR_H_ + +namespace Caf { + +template +class TSmartConstMultimapIterator +{ +public: + TSmartConstMultimapIterator () + { + m_citerCurrent = m_citerEnd; + } + + TSmartConstMultimapIterator (const Container &rcContainer) + { + m_citerCurrent = rcContainer.begin(); + m_citerEnd = rcContainer.end(); + } + + TSmartConstMultimapIterator (const TSmartConstMultimapIterator &rhs) + { + m_citerCurrent = rhs.m_citerCurrent; + m_citerEnd = rhs.m_citerEnd; + } + + TSmartConstMultimapIterator &operator= (const TSmartConstMultimapIterator &rhs) + { + m_citerCurrent = rhs.m_citerCurrent; + m_citerEnd = rhs.m_citerEnd; + return *this; + } + +public: + const KeyType &getKey (void) + { + return m_citerCurrent->first; + } + + const SmartPtrType &operator* () + { + return m_citerCurrent->second; + } + + const ValueType *operator-> () + { + return m_citerCurrent->second.operator->(); + } + + void operator++ () + { + ++m_citerCurrent; + } + + void operator++ (int32) + { + m_citerCurrent++; + } + + operator bool () + { + return (m_citerCurrent != m_citerEnd); + } + +private: + typename Container::const_iterator m_citerCurrent; + typename Container::const_iterator m_citerEnd; +}; + +} + +#endif /* TSMARTCONSTMULTIMAPITERATOR_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TSmartIterator.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TSmartIterator.h new file mode 100644 index 000000000..4cd80ef24 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TSmartIterator.h @@ -0,0 +1,84 @@ +///////////////////////////////////////////////////////////////////////////// +// +// Author: J.P. Grossman +// +// Created: 10/16/2003 +// +// Copyright (c) 2003-2011 Vmware, Inc. All rights reserved. +// -- VMware Confidential +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef TSmartIterator_h_ +#define TSmartIterator_h_ + +namespace Caf { + +template +class TSmartIterator +{ +public: + TSmartIterator () + { + m_iterCurrent = m_iterEnd; + } + + TSmartIterator (Container &rContainer) + { + m_iterCurrent = rContainer.begin(); + m_iterEnd = rContainer.end(); + } + + TSmartIterator (const TSmartIterator &rhs) + { + m_iterCurrent = rhs.m_iterCurrent; + m_iterEnd = rhs.m_iterEnd; + } + + TSmartIterator &operator= (const Container &rContainer) + { + m_iterCurrent = rContainer.begin(); + m_iterEnd = rContainer.end(); + return *this; + } + + TSmartIterator &operator= (const TSmartIterator &rhs) + { + m_iterCurrent = rhs.m_iterCurrent; + m_iterEnd = rhs.m_iterEnd; + return *this; + } + +public: + SmartPtrType &operator* () + { + return *m_iterCurrent; + } + + ValueType *operator-> () + { + return m_iterCurrent->operator->(); + } + + void operator++ () + { + ++m_iterCurrent; + } + + void operator++ (int32) + { + m_iterCurrent++; + } + + operator bool () + { + return m_iterCurrent != m_iterEnd; + } + +private: + typename Container::iterator m_iterCurrent; + typename Container::iterator m_iterEnd; +}; +} + +#endif // #ifndef TSmartIterator_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TSmartMapIterator.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TSmartMapIterator.h new file mode 100644 index 000000000..095f3ab96 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TSmartMapIterator.h @@ -0,0 +1,91 @@ +///////////////////////////////////////////////////////////////////////////// +// +// Author: J.P. Grossman +// +// Created: 10/16/2003 +// +// Copyright (c) 2003-2011 Vmware, Inc. All rights reserved. +// -- VMware Confidential +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef TSmartMapIterator_h_ +#define TSmartMapIterator_h_ + +namespace Caf { + +template class TSmartMultimapIterator; + +template +class TSmartMapIterator +{ +public: + TSmartMapIterator () + { + m_iterCurrent = m_iterEnd; + } + + TSmartMapIterator (Container &rContainer) + { + m_iterCurrent = rContainer.begin(); + m_iterEnd = rContainer.end(); + } + + TSmartMapIterator (const TSmartMapIterator &rhs) + { + m_iterCurrent = rhs.m_iterCurrent; + m_iterEnd = rhs.m_iterEnd; + } + + TSmartMapIterator &operator= (const Container &rContainer) + { + m_iterCurrent = rContainer.begin(); + m_iterEnd = rContainer.end(); + return *this; + } + + TSmartMapIterator &operator= (const TSmartMapIterator &rhs) + { + m_iterCurrent = rhs.m_iterCurrent; + m_iterEnd = rhs.m_iterEnd; + return *this; + } + +public: + SmartPtrType &operator* () + { + return m_iterCurrent->second; + } + + ValueType *operator-> () + { + return m_iterCurrent->second.operator->(); + } + + void operator++ () + { + ++m_iterCurrent; + } + + void operator++ (int32) + { + m_iterCurrent++; + } + + const KeyType &getKey (void) + { + return m_iterCurrent->first; + } + + operator bool () + { + return m_iterCurrent != m_iterEnd; + } + +private: + typename Container::iterator m_iterCurrent; + typename Container::iterator m_iterEnd; +}; +} + +#endif // #ifndef TSmartMapIterator_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TSmartMultimapIterator.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TSmartMultimapIterator.h new file mode 100644 index 000000000..7b22f95f1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TSmartMultimapIterator.h @@ -0,0 +1,83 @@ +///////////////////////////////////////////////////////////////////////////// +// +// Author: J.P. Grossman +// +// Created: 10/16/2003 +// +// Copyright (c) 2003-2011 Vmware, Inc. All rights reserved. +// -- VMware Confidential +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef TSMARTMULTIMAPITERATOR_H_ +#define TSMARTMULTIMAPITERATOR_H_ + +namespace Caf { + +template +class TSmartMultimapIterator +{ +public: + TSmartMultimapIterator () + { + m_iterCurrent = m_iterEnd; + } + + TSmartMultimapIterator (Container &rContainer) + { + m_iterCurrent = rContainer.begin(); + m_iterEnd = rContainer.end(); + } + + TSmartMultimapIterator (const TSmartMultimapIterator &rhs) + { + m_iterCurrent = rhs.m_iterCurrent; + m_iterEnd = rhs.m_iterEnd; + } + + TSmartMultimapIterator &operator= (const TSmartMultimapIterator &rhs) + { + m_iterCurrent = rhs.m_iterCurrent; + m_iterEnd = rhs.m_iterEnd; + return *this; + } + +public: + const KeyType &getKey (void) + { + return m_iterCurrent->first; + } + + SmartPtrType &operator* () + { + return m_iterCurrent->second; + } + + ValueType *operator-> () + { + return m_iterCurrent->second.operator->(); + } + + void operator++ () + { + ++m_iterCurrent; + } + + void operator++ (int32) + { + m_iterCurrent++; + } + + operator bool () + { + return (m_iterCurrent != m_iterEnd); + } + +private: + typename Container::iterator m_iterCurrent; + typename Container::iterator m_iterEnd; +}; + +} + +#endif /* TSMARTMULTIMAPITERATOR_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/AppConfigUtils.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/AppConfigUtils.cpp new file mode 100644 index 000000000..253738d6f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/AppConfigUtils.cpp @@ -0,0 +1,102 @@ +/* + * Author: bwilliams + * Created: Jan 21, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "AppConfigUtils.h" + +using namespace Caf; + +std::string AppConfigUtils::getRequiredString( + const std::string& parameterName) { + std::string rc; + getAppConfig()->getGlobalString(parameterName, rc, IConfigParams::PARAM_REQUIRED); + return rc; +} + +uint32 AppConfigUtils::getRequiredUint32( + const std::string& parameterName) { + uint32 rc; + getAppConfig()->getGlobalUint32(parameterName, rc, IConfigParams::PARAM_REQUIRED); + return rc; +} + +bool AppConfigUtils::getRequiredBoolean( + const std::string& parameterName) { + bool rc; + getAppConfig()->getGlobalBoolean(parameterName, rc, IConfigParams::PARAM_REQUIRED); + return rc; +} + +std::string AppConfigUtils::getOptionalString( + const std::string& parameterName) { + std::string rc; + getAppConfig()->getGlobalString(parameterName, rc, IConfigParams::PARAM_OPTIONAL); + return rc; +} + +uint32 AppConfigUtils::getOptionalUint32( + const std::string& parameterName) { + uint32 rc = 0; + getAppConfig()->getGlobalUint32(parameterName, rc, IConfigParams::PARAM_OPTIONAL); + return rc; +} + +bool AppConfigUtils::getOptionalBoolean( + const std::string& parameterName) { + bool rc = false; + getAppConfig()->getGlobalBoolean(parameterName, rc, IConfigParams::PARAM_OPTIONAL); + return rc; +} + +std::string AppConfigUtils::getRequiredString( + const std::string& sectionName, + const std::string& parameterName) { + std::string rc; + getAppConfig()->getString(sectionName, parameterName, rc, IConfigParams::PARAM_REQUIRED); + return rc; +} + +uint32 AppConfigUtils::getRequiredUint32( + const std::string& sectionName, + const std::string& parameterName) { + uint32 rc; + getAppConfig()->getUint32(sectionName, parameterName, rc, IConfigParams::PARAM_REQUIRED); + return rc; +} + +bool AppConfigUtils::getRequiredBoolean( + const std::string& sectionName, + const std::string& parameterName) { + bool rc; + getAppConfig()->getBoolean(sectionName, parameterName, rc, IConfigParams::PARAM_REQUIRED); + return rc; +} + +std::string AppConfigUtils::getOptionalString( + const std::string& sectionName, + const std::string& parameterName) { + std::string rc; + getAppConfig()->getString(sectionName, parameterName, rc, IConfigParams::PARAM_OPTIONAL); + return rc; +} + +uint32 AppConfigUtils::getOptionalUint32( + const std::string& sectionName, + const std::string& parameterName) { + uint32 rc = 0; + getAppConfig()->getUint32(sectionName, parameterName, rc, IConfigParams::PARAM_OPTIONAL); + return rc; +} + +bool AppConfigUtils::getOptionalBoolean( + const std::string& sectionName, + const std::string& parameterName) { + bool rc = false; + getAppConfig()->getBoolean(sectionName, parameterName, rc, IConfigParams::PARAM_OPTIONAL); + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/AppConfigUtils.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/AppConfigUtils.h new file mode 100644 index 000000000..8ad047b34 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/AppConfigUtils.h @@ -0,0 +1,47 @@ +/* + * Author: bwilliams + * Created: Jan 21, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef AppConfigUtils_H_ +#define AppConfigUtils_H_ + +namespace Caf { + +namespace AppConfigUtils { + + std::string COMMONAGGREGATOR_LINKAGE getRequiredString(const std::string& parameterName); + uint32 COMMONAGGREGATOR_LINKAGE getRequiredUint32(const std::string& parameterName); + bool COMMONAGGREGATOR_LINKAGE getRequiredBoolean(const std::string& parameterName); + + std::string COMMONAGGREGATOR_LINKAGE getOptionalString(const std::string& parameterName); + uint32 COMMONAGGREGATOR_LINKAGE getOptionalUint32(const std::string& parameterName); + bool COMMONAGGREGATOR_LINKAGE getOptionalBoolean(const std::string& parameterName); + + std::string COMMONAGGREGATOR_LINKAGE getRequiredString( + const std::string& sectionName, + const std::string& parameterName); + uint32 COMMONAGGREGATOR_LINKAGE getRequiredUint32( + const std::string& sectionName, + const std::string& parameterName); + bool COMMONAGGREGATOR_LINKAGE getRequiredBoolean( + const std::string& sectionName, + const std::string& parameterName); + + std::string COMMONAGGREGATOR_LINKAGE getOptionalString( + const std::string& sectionName, + const std::string& parameterName); + uint32 COMMONAGGREGATOR_LINKAGE getOptionalUint32( + const std::string& sectionName, + const std::string& parameterName); + bool COMMONAGGREGATOR_LINKAGE getOptionalBoolean( + const std::string& sectionName, + const std::string& parameterName); +}; + +} + +#endif /* AppConfigUtils_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAppConfig.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAppConfig.cpp new file mode 100644 index 000000000..c367310c0 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAppConfig.cpp @@ -0,0 +1,934 @@ +/* + * Author: mdonahue + * Created: Jan 19, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CAppConfig.h" + +using namespace Caf; + +SmartPtrIAppConfig Caf::getAppConfig() { + return CAppConfig::getInstance(); +} + +SmartPtrIAppConfig Caf::getAppConfig(const std::string& configFile) { + return CAppConfig::getInstance(configFile); +} + +SmartPtrIAppConfig Caf::getAppConfig(const Cdeqstr& configFileCollection) { + return CAppConfig::getInstance(configFileCollection); +} + +SmartPtrIAppConfigWrite Caf::getAppConfigWrite() { + return CAppConfig::getInstanceWrite(); +} + +SmartPtrIAppConfigWrite Caf::getAppConfigWrite(const std::string& configFile) { + return CAppConfig::getInstanceWrite(configFile); +} + +SmartPtrIAppConfigWrite Caf::getAppConfigWrite(const Cdeqstr& configFileCollection) { + return CAppConfig::getInstanceWrite(configFileCollection); +} + +const char* CAppConfig::_sGlobalsSectionName = "globals"; +GRecMutex CAppConfig::_sOpMutex; +SmartPtrCAppConfig CAppConfig::_sInstance; + +CAppConfig::CAppConfig() : + _isInitialized(false), + _envPattern(NULL), + _varPattern(NULL), + CAF_CM_INIT("CAppConfig") { +} + +CAppConfig::~CAppConfig() { + for (CGlobalReplacements::iterator iter = _globalReplacements.begin(); iter + != _globalReplacements.end(); ++iter) { + g_regex_unref(iter->first); + } + + if (_envPattern) { + g_regex_unref(_envPattern); + } + + if (_varPattern) { + g_regex_unref(_varPattern); + } +} + +void CAppConfig::initialize() { + CAF_CM_FUNCNAME("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + CAutoMutexLockUnlockRaw oLock(&_sOpMutex); + + std::string appConfigEnv; + CEnvironmentUtils::readEnvironmentVar("CAF_APPCONFIG", appConfigEnv); + + if (appConfigEnv.empty()) { + CAF_CM_EXCEPTION_VA0(ERROR_TAG_NOT_FOUND, "CAF_APPCONFIG env var isn't set."); + } + + const Cdeqstr configFileCollection = CStringUtils::split(appConfigEnv, ';'); + + initialize(configFileCollection); +} + +void CAppConfig::initialize(const std::string& configFile) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(configFile); + + CAutoMutexLockUnlockRaw oLock(&_sOpMutex); + + Cdeqstr configFileCollection; + configFileCollection.push_back(configFile); + + initialize(configFileCollection); +} + +void CAppConfig::initialize(const Cdeqstr& configFileCollection) { + CAF_CM_FUNCNAME_VALIDATE("initializeInternal"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STL(configFileCollection); + + for (TConstIterator strIter(configFileCollection); strIter; strIter++) { + const std::string configFile = *strIter; + const std::string configPath = calcConfigPath(configFile); + if (! configPath.empty()) { + _configFileCollection.push_back(configPath); + } + } + + // Add a pattern for environment variable lookup + _envPattern = g_regex_new( + "\\$\\{env\\:(.+)\\}", + (GRegexCompileFlags)(G_REGEX_OPTIMIZE | G_REGEX_UNGREEDY | G_REGEX_RAW), + (GRegexMatchFlags)0, + NULL); + + _varPattern = g_regex_new( + "\\$\\{var\\:(.+)\\}", + (GRegexCompileFlags)(G_REGEX_OPTIMIZE | G_REGEX_UNGREEDY | G_REGEX_RAW), + (GRegexMatchFlags)0, + NULL); + + _globals = internalLoadParameters(_sGlobalsSectionName); + validateGlobals(_globals); + + _isInitialized = true; +} + +SmartPtrIConfigParams CAppConfig::getParameters(const std::string& sectionName) { + CAF_CM_FUNCNAME_VALIDATE("getParameters"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(sectionName); + + SmartPtrIConfigParams params; + CAutoMutexLockUnlockRaw oLock(&_sOpMutex); + CParamSections::const_iterator cachedSection = _cachedSections.find(sectionName); + if (_cachedSections.end() == cachedSection) { + if (::strcmp(sectionName.c_str(), _sGlobalsSectionName) == 0) { + params = _globals; + } else { + params = internalLoadParameters(sectionName); + _cachedSections.insert(CParamSections::value_type(sectionName, params)); + } + } else { + params = cachedSection->second; + } + + return params; +} + +bool CAppConfig::getString( + const std::string& sectionName, + const std::string& parameterName, + std::string& value, + const IConfigParams::EParamDisposition disposition) { + CAF_CM_FUNCNAME("getString"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(sectionName); + CAF_CM_VALIDATE_STRING(parameterName); + + bool paramFound = false; + SmartPtrIConfigParams params = getParameters(sectionName); + GVariant* param = params->lookup( + parameterName.c_str(), + IConfigParams::PARAM_OPTIONAL); + if (param) { + if (g_variant_is_of_type(param, G_VARIANT_TYPE_STRING)) { + value = g_variant_get_string(param, NULL); + paramFound = true; + } else { + CAF_CM_EXCEPTION_VA1(DISP_E_TYPEMISMATCH, "%s exists but is not a string.", parameterName.c_str()); + } + } else { + if (IConfigParams::PARAM_REQUIRED == disposition) { + CAF_CM_EXCEPTION_VA2(ERROR_TAG_NOT_FOUND, + "Required config parameter [%s] is missing from section [%s]", + parameterName.c_str(), + sectionName.c_str()); + } + } + + return paramFound; +} + +bool CAppConfig::getUint32( + const std::string& sectionName, + const std::string& parameterName, + uint32& value, + const IConfigParams::EParamDisposition disposition) { + CAF_CM_FUNCNAME("getUint32"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(sectionName); + CAF_CM_VALIDATE_STRING(parameterName); + + bool paramFound = false; + + SmartPtrIConfigParams params = getParameters(sectionName); + GVariant* param = params->lookup( + parameterName.c_str(), + IConfigParams::PARAM_OPTIONAL); + if (param) { + if (g_variant_is_of_type(param, G_VARIANT_TYPE_UINT32)) { + value = g_variant_get_uint32(param); + paramFound = true; + } else { + std::string valueStr; + getString(sectionName, parameterName, valueStr, disposition); + value = CStringConv::fromString(valueStr); + } + } else { + if (IConfigParams::PARAM_REQUIRED == disposition) { + CAF_CM_EXCEPTION_VA2(ERROR_TAG_NOT_FOUND, + "Required config parameter [%s] is missing from section [%s]", + parameterName.c_str(), + sectionName.c_str()); + } + } + + return paramFound; +} + +bool CAppConfig::getBoolean( + const std::string& sectionName, + const std::string& parameterName, + bool& value, + const IConfigParams::EParamDisposition disposition) { + CAF_CM_FUNCNAME("getBoolean"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(sectionName); + CAF_CM_VALIDATE_STRING(parameterName); + + value = false; + + std::string tmpValue; + bool paramFound = getString( + sectionName, + parameterName, + tmpValue, + IConfigParams::PARAM_OPTIONAL); + + if (paramFound) { + if ("true" == tmpValue) { + value = true; + } else if ("false" == tmpValue) { + value = false; + } else { + CAF_CM_EXCEPTION_VA1(DISP_E_TYPEMISMATCH, "%s exists but is not a boolean (true or false).", parameterName.c_str()); + } + } else { + if (IConfigParams::PARAM_REQUIRED == disposition) { + CAF_CM_EXCEPTION_VA2(ERROR_TAG_NOT_FOUND, + "Required config parameter [%s] is missing from section [%s]", + parameterName.c_str(), + sectionName.c_str()); + } + } + + return paramFound; +} + +bool CAppConfig::getGlobalString( + const std::string& parameterName, + std::string& value, + const IConfigParams::EParamDisposition disposition) { + return getString(_sGlobalsSectionName, parameterName, value, disposition); +} + +bool CAppConfig::getGlobalUint32( + const std::string& parameterName, + uint32& value, + const IConfigParams::EParamDisposition disposition) { + return getUint32(_sGlobalsSectionName, parameterName, value, disposition); +} + +bool CAppConfig::getGlobalBoolean( + const std::string& parameterName, + bool& value, + const IConfigParams::EParamDisposition disposition) { + return getBoolean(_sGlobalsSectionName, parameterName, value, disposition); +} + +void CAppConfig::setString( + const std::string& sectionName, + const std::string& parameterName, + const std::string& value) { + CAF_CM_FUNCNAME_VALIDATE("setString"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(sectionName); + CAF_CM_VALIDATE_STRING(parameterName); + CAF_CM_VALIDATE_STRING(value); + + SmartPtrIConfigParams params = getParameters(sectionName); + params->insert(g_strdup(parameterName.c_str()), g_variant_new_string( + value.c_str())); +} + +void CAppConfig::setUint32( + const std::string& sectionName, + const std::string& parameterName, + const uint32& value) { + CAF_CM_FUNCNAME_VALIDATE("setUint32"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(sectionName); + CAF_CM_VALIDATE_STRING(parameterName); + + SmartPtrIConfigParams params = getParameters(sectionName); + params->insert(g_strdup(parameterName.c_str()), g_variant_new_uint32( + value)); +} + +void CAppConfig::setBoolean( + const std::string& sectionName, + const std::string& parameterName, + const bool& value) { + CAF_CM_FUNCNAME_VALIDATE("setBoolean"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(sectionName); + CAF_CM_VALIDATE_STRING(parameterName); + + SmartPtrIConfigParams params = getParameters(sectionName); + params->insert(g_strdup(parameterName.c_str()), g_variant_new_boolean( + value)); +} + +void CAppConfig::setGlobalString( + const std::string& parameterName, + const std::string& value) { + setString(_sGlobalsSectionName, parameterName, value); +} + +void CAppConfig::setGlobalUint32( + const std::string& parameterName, + const uint32& value) { + setUint32(_sGlobalsSectionName, parameterName, value); +} + +void CAppConfig::setGlobalBoolean( + const std::string& parameterName, + const bool& value) { + setBoolean(_sGlobalsSectionName, parameterName, value); +} + +std::string CAppConfig::resolveValue(const std::string& value) { + CAF_CM_FUNCNAME("resolveValue"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + std::string rc = value; + GMatchInfo *matchInfo = NULL; + GError* error = NULL; + + try { + if (value.length()) { + gchar *match = NULL; + if (g_regex_match( + _varPattern, + rc.c_str(), + G_REGEX_MATCH_NOTBOL, + &matchInfo)) { + match = g_match_info_fetch(matchInfo, 1); + CAF_CM_VALIDATE_STRINGPTRA(match); + std::string varName(match); + g_free(match); + match = NULL; + size_t pos = varName.find(':', 4); + std::string section = _sGlobalsSectionName; + if (pos != std::string::npos) { + section = varName.substr(0, pos); + varName = varName.substr(pos + 1, varName.length() - pos - 1); + } + + std::string configVal; + bool resolved = false; + // one of these will work - the other two will fail + try { + getString( + section, + varName, + configVal, + IConfigParams::PARAM_REQUIRED); + resolved = true; + } catch (CCafException *ex) { + if (ex->getError() == DISP_E_TYPEMISMATCH) { + ex->Release(); + } else { + throw ex; + } + } + + if (!resolved) { + try { + uint32 uval = 0; + getUint32( + section, + varName, + uval, + IConfigParams::PARAM_REQUIRED); + configVal = CStringConv::toString(uval); + resolved = true; + } catch (CCafException *ex) { + if (ex->getError() == DISP_E_TYPEMISMATCH) { + ex->Release(); + } else { + throw ex; + } + } + } + + if (!resolved) { + try { + bool bval = false; + getBoolean( + section, + varName, + bval, + IConfigParams::PARAM_REQUIRED); + configVal = bval ? "true" : "false"; + resolved = true; + } catch (CCafException *ex) { + if (ex->getError() == DISP_E_TYPEMISMATCH) { + ex->Release(); + } else { + throw ex; + } + } + } + + if (!resolved) { + CAF_CM_EXCEPTION_VA1( + ERROR_INVALID_DATA, + "Unable to resolve %s", + value.c_str()); + } + + gchar *replaced = g_regex_replace_literal( + _varPattern, + rc.c_str(), + -1, + 0, + configVal.c_str(), + G_REGEX_MATCH_NOTBOL, + &error); + if (error) { + throw error; + } + rc = replaced; + g_free(replaced); + } + g_match_info_free(matchInfo); + matchInfo = NULL; + + if (g_regex_match( + _envPattern, + rc.c_str(), + G_REGEX_MATCH_NOTBOL, + &matchInfo)) { + match = g_match_info_fetch(matchInfo, 1); + CAF_CM_VALIDATE_STRINGPTRA(match); + std::string envVarName(match); + g_free(match); + match = NULL; + #ifdef WIN32 + char* dupbuf = NULL; + size_t duplen = 0; + errno_t duprc = ::_dupenv_s(&dupbuf, &duplen, envVarName.c_str()); + const std::string dupval(dupbuf && ::strlen(dupbuf) ? dupbuf : ""); + ::free(dupbuf); + dupbuf = NULL; + const char* envVarValue = dupval.c_str(); + #else + const char* envVarValue = ::getenv(envVarName.c_str()); + #endif + + if (envVarValue && ::strlen(envVarValue)) { + gchar* replaced = g_regex_replace_literal( + _envPattern, + rc.c_str(), + -1, + 0, + envVarValue, + G_REGEX_MATCH_NOTBOL, + &error); + if (error) { + throw error; + } + rc = replaced; + g_free(replaced); + } else { + CAF_CM_EXCEPTION_VA1( + ERROR_TAG_NOT_FOUND, + "Referenced environment variable is not set: %s", + envVarName.c_str()); + } + + } + g_match_info_free(matchInfo); + matchInfo = NULL; + } + } + CAF_CM_CATCH_ALL; + if (matchInfo) { + g_match_info_free(matchInfo); + } + CAF_CM_THROWEXCEPTION; + return rc; +} + +SmartPtrIAppConfig CAppConfig::getInstance() { + CAutoMutexLockUnlockRaw oLock(&_sOpMutex); + if (!_sInstance) { + SmartPtrCAppConfig appConfig; + appConfig.CreateInstance(); + appConfig->initialize(); + _sInstance = appConfig; + } + + return _sInstance; +} + +SmartPtrIAppConfig CAppConfig::getInstance(const std::string& configFile) { + CAutoMutexLockUnlockRaw oLock(&_sOpMutex); + _sInstance = NULL; + SmartPtrCAppConfig appConfig; + appConfig.CreateInstance(); + appConfig->initialize(configFile); + _sInstance = appConfig; + + return _sInstance; +} + +SmartPtrIAppConfig CAppConfig::getInstance(const Cdeqstr& configFileCollection) { + CAutoMutexLockUnlockRaw oLock(&_sOpMutex); + _sInstance = NULL; + SmartPtrCAppConfig appConfig; + appConfig.CreateInstance(); + appConfig->initialize(configFileCollection); + _sInstance = appConfig; + + return _sInstance; +} + +SmartPtrIAppConfigWrite CAppConfig::getInstanceWrite() { + CAutoMutexLockUnlockRaw oLock(&_sOpMutex); + if (!_sInstance) { + SmartPtrCAppConfig appConfig; + appConfig.CreateInstance(); + appConfig->initialize(); + _sInstance = appConfig; + } + + return _sInstance; +} + +SmartPtrIAppConfigWrite CAppConfig::getInstanceWrite(const std::string& configFile) { + CAutoMutexLockUnlockRaw oLock(&_sOpMutex); + _sInstance = NULL; + SmartPtrCAppConfig appConfig; + appConfig.CreateInstance(); + appConfig->initialize(configFile); + _sInstance = appConfig; + + return _sInstance; +} + +SmartPtrIAppConfigWrite CAppConfig::getInstanceWrite(const Cdeqstr& configFileCollection) { + CAutoMutexLockUnlockRaw oLock(&_sOpMutex); + _sInstance = NULL; + SmartPtrCAppConfig appConfig; + appConfig.CreateInstance(); + appConfig->initialize(configFileCollection); + _sInstance = appConfig; + + return _sInstance; +} + +SmartPtrIConfigParams CAppConfig::internalLoadParameters(const std::string& sectionName) { + CAF_CM_FUNCNAME_VALIDATE("internalLoadParameters"); + CAF_CM_VALIDATE_STRING(sectionName); + + // Always return at least an empty collection + SmartPtrCConfigParams configParams; + configParams.CreateInstance(); + configParams->initialize( + sectionName, + CConfigParams::EKeysManaged, + CConfigParams::EValuesManaged); + + for (TConstIterator strIter(_configFileCollection); strIter; strIter++) { + const std::string configFile = *strIter; + internalLoadParameters(sectionName, configFile, configParams); + } + + return configParams; +} + +void CAppConfig::internalLoadParameters( + const std::string& sectionName, + const std::string& configFileName, + const SmartPtrCConfigParams& configParams) { + CAF_CM_FUNCNAME("internalLoadParameters"); + CAF_CM_VALIDATE_STRING(sectionName); + CAF_CM_VALIDATE_STRING(configFileName); + CAF_CM_VALIDATE_SMARTPTR(configParams); + + GKeyFile* configFile = NULL; + GError* configError = NULL; + gchar** keys = NULL; + gchar* sValue = NULL; + GMatchInfo* matchInfo = NULL; + gchar* match = NULL; + + try { + try { + configFile = g_key_file_new(); + g_key_file_load_from_file( + configFile, + configFileName.c_str(), + G_KEY_FILE_NONE, + &configError); + if (configError) { + throw configError; + } + + gsize numKeys = 0; + keys = g_key_file_get_keys( + configFile, + sectionName.c_str(), + &numKeys, + &configError); + + if (numKeys) { + bool isGlobals = (::strcmp(sectionName.c_str(), _sGlobalsSectionName) + == 0); + + for (gsize idx = 0; idx < numKeys; idx++) { + // There is no way to tell if a value is an integer or string. + // We want to insert the value as either string or uint32 so + // try to read the value as an integer. If it cannot be read + // as an integer then insert it as a string. + gint iValue = g_key_file_get_integer( + configFile, + sectionName.c_str(), + keys[idx], + &configError); + if (!configError) { + configParams->insert(g_strdup(keys[idx]), g_variant_new_uint32( + iValue)); + + if (isGlobals) { + // create a regular expression to apply against other + // values in other sections + std::string pattern("\\$\\{"); + pattern += keys[idx]; + pattern += "\\}"; + GRegex* regex = g_regex_new( + pattern.c_str(), + (GRegexCompileFlags)(G_REGEX_OPTIMIZE | G_REGEX_UNGREEDY | G_REGEX_RAW), + (GRegexMatchFlags)0, + &configError); + if (configError) { + throw configError; + } + + const std::string iValueStr = CStringConv::toString(iValue); + _globalReplacements.insert(CGlobalReplacements::value_type( + regex, iValueStr)); + } + } else { + if (G_KEY_FILE_ERROR_INVALID_VALUE != configError->code) { + throw configError; + } else { + g_error_free(configError); + configError = NULL; + sValue = g_key_file_get_string( + configFile, + sectionName.c_str(), + keys[idx], + &configError); + if (configError) { + throw configError; + } + + // Check the value to see if it references an environment variable + if (g_regex_match( + _envPattern, + sValue, + G_REGEX_MATCH_NOTBOL, + &matchInfo)) { + // Replace the reference with the env variable value + match = g_match_info_fetch(matchInfo, 1); + if (*match) { + std::string envVarName(match); + g_free(match); + match = NULL; + #ifdef WIN32 + char* dupbuf = NULL; + size_t duplen = 0; + errno_t duprc = ::_dupenv_s(&dupbuf, &duplen, envVarName.c_str()); + const std::string dupval(dupbuf && ::strlen(dupbuf) ? dupbuf : ""); + ::free(dupbuf); + dupbuf = NULL; + const char* envVarValue = dupval.c_str(); + #else + const char* envVarValue = ::getenv(envVarName.c_str()); + #endif + if (envVarValue && ::strlen(envVarValue)) { + gchar* newValue = g_regex_replace_literal( + _envPattern, + sValue, + -1, + 0, + envVarValue, + G_REGEX_MATCH_NOTBOL, + &configError); + if (configError) { + throw configError; + } + + g_free(sValue); + sValue = newValue; + } else { + CAF_CM_EXCEPTION_VA1(ERROR_TAG_NOT_FOUND, + "Referenced environment variable is not set: %s", + envVarName.c_str()); + } + } else { + CAF_CM_EXCEPTION_VA0(ERROR_INTERNAL_ERROR, + "${env:var} matched but subexpression #1 is null."); + } + } + g_match_info_free(matchInfo); + matchInfo = NULL; + + // Replace occurrences of ${global_var_name} with the appropriate global value + for (CGlobalReplacements::const_iterator pattern = + _globalReplacements.begin(); pattern + != _globalReplacements.end(); ++pattern) { + if (g_regex_match( + pattern->first, + sValue, + G_REGEX_MATCH_NOTBOL, + NULL)) { + gchar* newValue = g_regex_replace_literal( + pattern->first, + sValue, + -1, + 0, + pattern->second.c_str(), + G_REGEX_MATCH_NOTBOL, + &configError); + if (configError) { + throw configError; + } + + g_free(sValue); + sValue = newValue; + } + } + + // Add the variable to the collection + configParams->insert(g_strdup(keys[idx]), g_variant_new_string( + sValue)); + + if (isGlobals) { + // create a regular expression to apply against other + // values in other sections + std::string pattern("\\$\\{"); + pattern += keys[idx]; + pattern += "\\}"; + GRegex* regex = g_regex_new( + pattern.c_str(), + (GRegexCompileFlags)(G_REGEX_OPTIMIZE | G_REGEX_UNGREEDY | G_REGEX_RAW), + (GRegexMatchFlags)0, + &configError); + if (configError) { + throw configError; + } + + _globalReplacements.insert(CGlobalReplacements::value_type( + regex, sValue)); + } + } + + g_free(sValue); + sValue = NULL; + } + } + } + } catch (GError *e) { + CAF_CM_EXCEPTION_VA0(e->code, e->message); + } + } catch (CCafException *e) { + _cm_exception_ = e; + } + + if (configFile) { + g_key_file_free(configFile); + } + + if (configError) { + g_error_free(configError); + } + + if (keys) { + g_strfreev(keys); + } + + if (sValue) { + g_free(sValue); + } + + if (matchInfo) { + g_match_info_free(matchInfo); + } + + if (match) { + g_free(match); + } + + if (_cm_exception_) { + throw _cm_exception_; + } +} + +void CAppConfig::validateGlobals(const SmartPtrIConfigParams& globals) { + CAF_CM_FUNCNAME("validateGlobals"); + CAF_CM_VALIDATE_INTERFACE(globals); + + GVariant* log_dir = globals->lookup( + _sAppConfigGlobalParamLogDir, + IConfigParams::PARAM_REQUIRED); + CAF_CM_ASSERT(g_variant_is_of_type(log_dir, G_VARIANT_TYPE_STRING)); + const char* log_dir_val = g_variant_get_string(log_dir, NULL); + CAF_CM_VALIDATE_STRINGPTRA(log_dir_val); + + GVariant* log_file = globals->lookup( + _sAppConfigGlobalParamLogConfigFile, + IConfigParams::PARAM_REQUIRED); + CAF_CM_ASSERT(g_variant_is_of_type(log_file, G_VARIANT_TYPE_STRING)); + const char* log_file_val = g_variant_get_string(log_file, NULL); + CAF_CM_VALIDATE_STRINGPTRA(log_file_val); + CLoggingUtils::setStartupConfigFile(log_file_val); + + GVariant* thread_stack_size_kb = globals->lookup( + _sAppConfigGlobalThreadStackSizeKb, + IConfigParams::PARAM_REQUIRED); + CAF_CM_ASSERT(g_variant_is_of_type(thread_stack_size_kb, G_VARIANT_TYPE_UINT32)); +} + +std::string CAppConfig::calcConfigPath( + const std::string& configFile) const { + CAF_CM_FUNCNAME_VALIDATE("calcConfigPath"); + CAF_CM_VALIDATE_STRING(configFile); + + std::string rc; + if (g_file_test(configFile.c_str(), G_FILE_TEST_IS_REGULAR)) { + rc = configFile; + } + + if (rc.empty()) { + const std::string currentConfigPath = calcCurrentConfigPath(configFile); + if (g_file_test(currentConfigPath.c_str(), G_FILE_TEST_IS_REGULAR)) { + rc = currentConfigPath; + } + } + + if (rc.empty()) { + const std::string pmeConfigPath = calcDefaultConfigPath("pme", configFile); + if (g_file_test(pmeConfigPath.c_str(), G_FILE_TEST_IS_REGULAR)) { + rc = pmeConfigPath; + } + } + + if (rc.empty()) { + const std::string clientConfigPath = calcDefaultConfigPath("client", configFile); + if (g_file_test(clientConfigPath.c_str(), G_FILE_TEST_IS_REGULAR)) { + rc = clientConfigPath; + } + } + + return rc; +} + +std::string CAppConfig::calcCurrentConfigPath( + const std::string& configFile) const { + CAF_CM_FUNCNAME_VALIDATE("calcCurrentConfigPath"); + CAF_CM_VALIDATE_STRING(configFile); + + const std::string currentDir = FileSystemUtils::getCurrentDir(); + const std::string configPath = FileSystemUtils::buildPath( + currentDir, configFile); + + return configPath; +} + +std::string CAppConfig::calcDefaultConfigPath( + const std::string& area, + const std::string& configFile) const { + CAF_CM_FUNCNAME_VALIDATE("calcDefaultConfigPath"); + CAF_CM_VALIDATE_STRING(area); + CAF_CM_VALIDATE_STRING(configFile); + + const std::string configDir = calcDefaultConfigDir(area); + const std::string configPath = FileSystemUtils::buildPath( + configDir, configFile); + + return configPath; +} + +#ifdef WIN32 +std::string CAppConfig::calcDefaultConfigDir( + const std::string& area) const { + CAF_CM_FUNCNAME("calcDefaultConfigDir"); + CAF_CM_VALIDATE_STRING(area); + + std::string programData; + CEnvironmentUtils::readEnvironmentVar("ProgramData", programData); + if (programData.empty()) { + CAF_CM_EXCEPTION_VA0(ERROR_TAG_NOT_FOUND, "ProgramData env var isn't set."); + } + + const std::string configDir = FileSystemUtils::buildPath( + programData, "VMware", "VMware CAF", area, "config"); + + return configDir; +} +#else +std::string CAppConfig::calcDefaultConfigDir( + const std::string& area) const { + CAF_CM_FUNCNAME_VALIDATE("calcDefaultConfigDir"); + CAF_CM_VALIDATE_STRING(area); + + const std::string configDir = FileSystemUtils::buildPath( + G_DIR_SEPARATOR_S, "etc", "vmware-caf", area, "config"); + + return configDir; +} +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAppConfig.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAppConfig.h new file mode 100644 index 000000000..bc4b569b7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAppConfig.h @@ -0,0 +1,161 @@ +/* + * Author: mdonahue + * Created: Jan 19, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CAPPCONFIG_H_ +#define CAPPCONFIG_H_ + +namespace Caf { + +CAF_DECLARE_CLASS_AND_SMART_POINTER(CAppConfig); + +class COMMONAGGREGATOR_LINKAGE CAppConfig : + public IAppConfig, + public IAppConfigWrite { +public: // IAppConfig + + SmartPtrIConfigParams getParameters(const std::string& sectionName); + + bool + getString( + const std::string& sectionName, + const std::string& parameterName, + std::string& value, + const IConfigParams::EParamDisposition disposition = + IConfigParams::PARAM_REQUIRED); + + bool + getUint32( + const std::string& sectionName, + const std::string& parameterName, + uint32& value, + const IConfigParams::EParamDisposition disposition = + IConfigParams::PARAM_REQUIRED); + + bool + getBoolean( + const std::string& sectionName, + const std::string& parameterName, + bool& value, + const IConfigParams::EParamDisposition disposition = + IConfigParams::PARAM_REQUIRED); + + bool + getGlobalString( + const std::string& parameterName, + std::string& value, + const IConfigParams::EParamDisposition disposition = + IConfigParams::PARAM_REQUIRED); + + bool + getGlobalUint32( + const std::string& parameterName, + uint32& value, + const IConfigParams::EParamDisposition disposition = + IConfigParams::PARAM_REQUIRED); + + bool + getGlobalBoolean( + const std::string& parameterName, + bool& value, + const IConfigParams::EParamDisposition disposition = + IConfigParams::PARAM_REQUIRED); + + std::string resolveValue(const std::string& value); + + static SmartPtrIAppConfig getInstance(); + + static SmartPtrIAppConfig getInstance(const std::string& configFile); + + static SmartPtrIAppConfig getInstance(const Cdeqstr& configFileCollection); + +public: // IAppConfigWrite + void setString(const std::string& sectionName, + const std::string& parameterName, + const std::string& value); + + void setUint32(const std::string& sectionName, + const std::string& parameterName, + const uint32& value); + + void setBoolean(const std::string& sectionName, + const std::string& parameterName, + const bool& value); + + void setGlobalString(const std::string& parameterName, + const std::string& value); + + void setGlobalUint32(const std::string& parameterName, + const uint32& value); + + void setGlobalBoolean(const std::string& parameterName, + const bool& value); + + static SmartPtrIAppConfigWrite getInstanceWrite(); + + static SmartPtrIAppConfigWrite getInstanceWrite(const std::string& configFile); + + static SmartPtrIAppConfigWrite getInstanceWrite(const Cdeqstr& configFileCollection); + +private: + CAppConfig(); + virtual ~CAppConfig(); + +private: + void initialize(); + void initialize(const std::string& configFile); + void initialize(const Cdeqstr& configFileCollection); + +private: + SmartPtrIConfigParams internalLoadParameters( + const std::string& sectionName); + + void internalLoadParameters( + const std::string& sectionName, + const std::string& configFileName, + const SmartPtrCConfigParams& configParams); + + void validateGlobals(const SmartPtrIConfigParams& globals); + +private: + std::string calcCurrentConfigPath( + const std::string& configFile) const; + + std::string calcConfigPath( + const std::string& configFilename) const; + + std::string calcDefaultConfigPath( + const std::string& area, + const std::string& configFile) const; + + std::string calcDefaultConfigDir( + const std::string& area) const; + +private: + static const char* _sGlobalsSectionName; + static GRecMutex _sOpMutex; + static SmartPtrCAppConfig _sInstance; + bool _isInitialized; + typedef std::map CParamSections; + CParamSections _cachedSections; + typedef std::map CGlobalReplacements; + CGlobalReplacements _globalReplacements; + GRegex* _envPattern; + GRegex* _varPattern; + SmartPtrIConfigParams _globals; + + Cdeqstr _configFileCollection; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CAppConfig); + friend class TCafObject; +}; + +} + +#endif /* CAPPCONFIG_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CApplicationContext.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CApplicationContext.cpp new file mode 100644 index 000000000..ab1cdfb1a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CApplicationContext.cpp @@ -0,0 +1,535 @@ +/* + * Author: bwilliams + * Created: Jul 2009 + * + * Copyright (c) 2009-2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CApplicationContext.h" + +using namespace Caf; + +CApplicationContext::CApplicationContext(void) : + m_isInitialized(false), + CAF_CM_INIT_LOG("CApplicationContext") { +} + +CApplicationContext::~CApplicationContext(void) { +} + +void CApplicationContext::initialize() { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(m_isInitialized); + + const std::string beanConfigFile = getDefaultBeanConfigFile(); + + Cdeqstr filenameCollection; + filenameCollection.push_front(beanConfigFile); + + initialize(filenameCollection); + } + CAF_CM_EXIT; +} + +void CApplicationContext::initialize(const Cdeqstr& filenameCollection) { + CAF_CM_FUNCNAME("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(m_isInitialized); + CAF_CM_VALIDATE_STL(filenameCollection); + + for (TConstIterator filenameIter(filenameCollection); + filenameIter; filenameIter++) { + const std::string beanConfigFile = *filenameIter; + + parseBeanConfig( + beanConfigFile, + _beanCollection); + } + + CBeanGraph beanGraph; + createBeanGraph( + _beanCollection, + beanGraph, + _beanTopologySort); + + try { + initializeBeans( + _beanCollection, + _beanTopologySort); + } CAF_CM_CATCH_ALL; + if (CAF_CM_ISEXCEPTION) { + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CCafException *ex = CAF_CM_GETEXCEPTION; + ex->AddRef(); + CAF_CM_CLEAREXCEPTION; + try { + terminateBeans(_beanTopologySort); + } CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + _beanTopologySort.clear(); + _beanCollection.clear(); + CAF_CM_GETEXCEPTION = ex; + CAF_CM_THROWEXCEPTION; + } + m_isInitialized = true; + } + CAF_CM_EXIT; +} + +void CApplicationContext::terminate() { + CAF_CM_FUNCNAME_VALIDATE("terminate"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(m_isInitialized); + terminateBeans(_beanTopologySort); + _beanTopologySort.clear(); + _beanCollection.clear(); + _filenameCollection.clear(); + } + CAF_CM_EXIT; +} + +IAppContext::SmartPtrCBeans CApplicationContext::getBeans() const { + CAF_CM_FUNCNAME_VALIDATE("getBeans"); + + SmartPtrCBeans beans; + beans.CreateInstance(); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(m_isInitialized); + + for (TSmartConstMapIterator beanIter(_beanCollection); + beanIter; beanIter++) { + beans->insert(CBeans::value_type( + beanIter.getKey().c_str(), + beanIter->_bean)); + } + } + CAF_CM_EXIT; + + return beans; +} + +SmartPtrIBean CApplicationContext::getBean(const std::string& beanId) const { + CAF_CM_FUNCNAME("getBean"); + + SmartPtrIBean rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(m_isInitialized); + CAF_CM_VALIDATE_STRING(beanId); + + CBeanCollection::const_iterator iter = _beanCollection.find(beanId); + if (iter == _beanCollection.end()) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchElementException, + 0, + "Bean not found - %s", + beanId.c_str()); + } + + CAF_CM_LOG_DEBUG_VA1( + "Bean Found - %s", + beanId.c_str()); + rc = iter->second->_bean; + } + CAF_CM_EXIT; + + return rc; +} + +std::string CApplicationContext::getDefaultBeanConfigFile() const { + + CAF_CM_FUNCNAME("parseBeanConfig"); + + std::string beanConfigFile; + + CAF_CM_ENTER { + // Get the bean config file + beanConfigFile = AppConfigUtils::getRequiredString("bean_config_file"); + if (!FileSystemUtils::doesFileExist(beanConfigFile)) { + CAF_CM_EXCEPTIONEX_VA1( + FileNotFoundException, + 0, + "The bean config file [%s] does not exist.", + beanConfigFile.c_str()); + } + } + CAF_CM_EXIT; + + return beanConfigFile; +} + +void CApplicationContext::parseBeanConfig( + const std::string& beanConfigFile, + CBeanCollection& beanCollection) const { + + CAF_CM_FUNCNAME("parseBeanConfig"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(beanConfigFile); + + CAF_CM_LOG_DEBUG_VA1("Parsing bean config file %s", beanConfigFile.c_str()); + + // We will look up class references early in the process to fail as early + // as possible and to make logging better. + // Parse the bean config file + CXmlElement::SmartPtrCElementCollection rootElements = + CXmlUtils::parseFile(beanConfigFile, "caf:beans")->getAllChildren(); + for (TSmartConstMultimapIterator rootChild(*rootElements); + rootChild; + rootChild++) { + + // if the child is a bean... + if (rootChild->getName() == "bean") { + // Syntactic sugar + const SmartPtrCXmlElement beanElement = *rootChild; + + // Bean attributes + const std::string beanId = beanElement->findRequiredAttribute("id"); + CAF_CM_LOG_DEBUG_VA1("Parsing bean [id=%s]", beanId.c_str()); + const std::string beanClass = beanElement->findRequiredAttribute("class"); + CAF_CM_LOG_DEBUG_VA2( + "Checking bean class [id=%s][class=%s]", + beanId.c_str(), + beanClass.c_str()); + if (!CEcmSubSystemRegistry::IsRegistered(beanClass)) { + CAF_CM_EXCEPTIONEX_VA3( + NoSuchElementException, + 0, + "Bean class %s is not registered. Fix the AppConfig file. " + "[bean id=%s][bean_config_file=%s]", + beanClass.c_str(), + beanId.c_str(), + beanConfigFile.c_str()); + } + + // get optional constructor args and properties + CBeanCtorArgCollection beanCtorArgs; + Cmapstrstr beanProperties; + CAF_CM_LOG_DEBUG_VA1("Parsing bean ctor args and properties [id=%s]", beanId.c_str()); + CXmlElement::SmartPtrCElementCollection beanElements = beanElement->getAllChildren(); + for (TSmartConstMultimapIterator beanChild(*beanElements); + beanChild; + beanChild++) { + if (beanChild->getName() == "property") { + // Syntactic sugar + const SmartPtrCXmlElement propArgElement = *beanChild; + + // property attributes + const std::string name = propArgElement->findRequiredAttribute("name"); + const std::string value = propArgElement->findRequiredAttribute("value"); + if (!beanProperties.insert(std::make_pair(name, value)).second) { + CAF_CM_EXCEPTIONEX_VA3( + DuplicateElementException, + 0, + "Bean property name is duplicated. " + "[bean id=%s][property name=%s][bean_config_file=%s]", + beanId.c_str(), + name.c_str(), + beanConfigFile.c_str()); + } + } + else if (beanChild->getName() == "constructor-arg") { + // Syntactic sugar + const SmartPtrCXmlElement ctorArgElement = *beanChild; + + // ctor attributes + const uint32 ctorArgIndex = CStringConv::fromString(ctorArgElement->findRequiredAttribute("index")); + CBeanCtorArg::ARG_TYPE ctorArgType = CBeanCtorArg::NOT_SET; + std::string ctorArgValue = ctorArgElement->findOptionalAttribute("value"); + if (ctorArgValue.length() > 0) { + ctorArgType = CBeanCtorArg::VALUE; + } else { + ctorArgValue = ctorArgElement->findOptionalAttribute("ref"); + if (ctorArgValue.length() > 0) { + ctorArgType = CBeanCtorArg::REFERENCE; + } else { + CAF_CM_EXCEPTIONEX_VA2( + InvalidArgumentException, + 0, + "Bean constructor argument must be of type value or ref and cannot be empty. " + "[bean id=%s][bean_config_file=%s]", + beanId.c_str(), + beanConfigFile.c_str()); + } + } + + if (!beanCtorArgs.insert( + CBeanCtorArgCollection::value_type( + ctorArgIndex, + CBeanCtorArg(ctorArgType, ctorArgValue))).second) { + CAF_CM_EXCEPTIONEX_VA3( + DuplicateElementException, + 0, + "Bean has a duplicate constructor-arg index. " + "[bean id=%s][bean_config_file=%s][arg-index=%d]", + beanId.c_str(), + beanConfigFile.c_str(), + ctorArgIndex); + } + CAF_CM_LOG_DEBUG_VA4( + "Bean ctor arg parsed [id=%s][arg-index=%d][arg-type=%s][arg-value=%s]", + beanId.c_str(), + ctorArgIndex, + (CBeanCtorArg::VALUE == ctorArgType ? "VALUE" : "REFERENCE"), + ctorArgValue.c_str()); + } + } + + // Add the bean definition to the collection + SmartPtrCBeanNode beanNode; + beanNode.CreateInstance(); + beanNode->_id = beanId; + beanNode->_class = beanClass; + beanNode->_ctorArgs = beanCtorArgs; + beanNode->_properties = beanProperties; + + if (!beanCollection.insert( + CBeanCollection::value_type( + beanId, + beanNode)).second) { + CAF_CM_EXCEPTIONEX_VA3( + DuplicateElementException, + 0, + "Duplicate bean definition detected. " + "[bean id=%s][bean class=%s][bean_config_file=%s]", + beanId.c_str(), + beanNode->_class.c_str(), + beanConfigFile.c_str()); + } + } + } + + CAF_CM_LOG_DEBUG_VA2( + "Bean configuration file defined %d beans. " + "[file=%s]", + beanCollection.size(), + beanConfigFile.c_str()); + } + CAF_CM_EXIT; +} + +void CApplicationContext::createBeanGraph( + CBeanCollection& beanCollection, + CBeanGraph& beanGraph, + CBeanGraph::ClistVertexEdges& beanTopologySort) const { + CAF_CM_FUNCNAME("createBeanGraph"); + + CAF_CM_ENTER { + // Iterate the bean collection and create the beans. They will not be initialized. + // Two name sets will be built: bean names and contstructor-arg ref names. + // These two sets will be compared to ensure that all referenced beans exist. + Csetstr beanNames; + Csetstr beanCtorRefNames; + for (TSmartMapIterator beanIter(beanCollection); + beanIter; + beanIter++) { + + // Create the bean and add it to the collection + CAF_CM_LOG_DEBUG_VA2( + "Creating bean [id=%s][class=%s]", + beanIter.getKey().c_str(), + beanIter->_class.c_str()); + beanIter->_bean.CreateInstance(beanIter->_class.c_str()); + + // Add the bean id to the beanNames set + if (!beanNames.insert(beanIter->_id).second) { + CAF_CM_LOG_DEBUG_VA1( + "Internal logic error: duplicate bean detected. " + "[id=%s]", + beanIter->_id.c_str()); + } + + // Add ref constructor args to the ctor ref name set + for (TConstMapIterator beanCtorArg(beanIter->_ctorArgs); + beanCtorArg; + beanCtorArg++) { + if (CBeanCtorArg::REFERENCE == beanCtorArg->_type) { + beanCtorRefNames.insert(beanCtorArg->_value); + } + } + } + + // Make sure that all beans referenced as ctor args exist + Csetstr beanNameDiff; + std::set_difference( + beanCtorRefNames.begin(), + beanCtorRefNames.end(), + beanNames.begin(), + beanNames.end(), + std::inserter(beanNameDiff, beanNameDiff.end())); + + if (beanNameDiff.size()) { + for (TConstIterator missingName(beanNameDiff); + missingName; + missingName++) { + CAF_CM_LOG_ERROR_VA1( + "No bean definition exists for constructor-arg referenced bean '%s'", + missingName->c_str()); + } + CAF_CM_EXCEPTIONEX_VA0( + NoSuchElementException, + 0, + "One or more bean constructor-args references beans that are not defined."); + } + + // Create a graph node for each bean + for (TSmartConstMapIterator beanIter(beanCollection); + beanIter; + beanIter++) { + beanGraph.addVertex(*beanIter); + } + + // Okay. Now connect the vertices according the constructor-arg references. + // The resulting graph will give us the initialization/tear-down order. + for (TSmartConstMapIterator beanIter(beanCollection); + beanIter; + beanIter++) { + for (TConstMapIterator ctorArg(beanIter->_ctorArgs); + ctorArg; + ctorArg++) { + if (CBeanCtorArg::REFERENCE == ctorArg->_type) { + CBeanCollection::const_iterator ctorBean = beanCollection.find(ctorArg->_value); + if (beanCollection.end() == ctorBean) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchElementException, + 0, + "Internal error: constructor-arg referenced bean '%s' is missing", + ctorArg->_value.c_str()); + } + beanGraph.addEdge(ctorBean->second, *beanIter); + } + } + } + + // And finally - compute the bean topology sort order + beanTopologySort = beanGraph.topologySort(); + + // Debugging - you will thank me for this later + CAF_CM_LOG_DEBUG_VA0("BEGIN: Bean initialization order") + for (TSmartConstIterator beanNode(beanTopologySort); + beanNode; + beanNode++) { + CAF_CM_LOG_DEBUG_VA1("bean id=%s", beanNode->_id.c_str()); + } + CAF_CM_LOG_DEBUG_VA0("END: Bean initialization order") + } + CAF_CM_EXIT; +} + +void CApplicationContext::initializeBeans( + CBeanCollection& beanCollection, + CBeanGraph::ClistVertexEdges& beanTopologySort) const { + CAF_CM_FUNCNAME("initializeBeans"); + + CAF_CM_ENTER { + for (TSmartIterator beanNode(beanTopologySort); + beanNode; + beanNode++) { + CAF_CM_LOG_DEBUG_VA1("Initializing bean %s", beanNode->_id.c_str()); + + // The bean should not have been initialized + if (beanNode->_isInitialized) { + CAF_CM_EXCEPTIONEX_VA1( + IllegalStateException, + 0, + "Internal error: Bean [%s] has already been initialized.", + beanNode->_id.c_str()); + } + + // Iterate the contructor-args and build a collection to + // pass to the bean initializer + IBean::Cargs beanInitArgs; + for (TConstMapIterator ctorArg(beanNode->_ctorArgs); + ctorArg; + ctorArg++) { + switch (ctorArg->_type) { + case CBeanCtorArg::REFERENCE: { + CBeanCollection::const_iterator bean = beanCollection.find(ctorArg->_value); + if (!bean->second->_isInitialized) { + CAF_CM_EXCEPTIONEX_VA2( + NullPointerException, + 0, + "Internal error: Referenced bean not initialized. " + "[bean id=%s][constructor-arg ref=%s]", + beanNode->_id.c_str(), + ctorArg->_value.c_str()); + } + beanInitArgs.push_back(IBean::CArg(bean->second->_bean)); + CAF_CM_LOG_DEBUG_VA1( + "constructor-arg ref=%s", + ctorArg->_value.c_str()); + } + break; + + case CBeanCtorArg::VALUE: + beanInitArgs.push_back(IBean::CArg(ctorArg->_value)); + CAF_CM_LOG_DEBUG_VA1( + "constructor-arg value=%s", + ctorArg->_value.c_str()); + break; + + default: + CAF_CM_EXCEPTIONEX_VA2( + InvalidArgumentException, + 0, + "Internal error: Bean constructor-arg is not a ref or value " + "[bean id=%s][constructor-arg index=%d]", + beanNode->_id.c_str(), + ctorArg.getKey()); + } + } + + // Iterate the bean properties and resolve value references + SmartPtrIAppConfig appConfig = getAppConfig(); + Cmapstrstr properties = beanNode->_properties; + + for (TMapIterator property(properties); + property; + property++) { + *property = appConfig->resolveValue(*property); + } + + // Initialize the bean + beanNode->_bean->initializeBean(beanInitArgs, properties); + beanNode->_isInitialized = true; + } + } + CAF_CM_EXIT; +} + +void CApplicationContext::terminateBeans(CBeanGraph::ClistVertexEdges& beanTopologySort) const { + CAF_CM_FUNCNAME("terminateBeans"); + + CAF_CM_ENTER { + // Important! Iterate in reverse order of initialization + // Some beans may not be initialized because of exceptions during init process + for (CBeanGraph::ClistVertexEdges::reverse_iterator beanNode = beanTopologySort.rbegin(); + beanNode != beanTopologySort.rend(); + beanNode++) { + if ((*beanNode)->_isInitialized) { + CAF_CM_LOG_DEBUG_VA1( + "Terminating bean %s", + (*beanNode)->_id.c_str()); + try { + (*beanNode)->_bean->terminateBean(); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + } else { + CAF_CM_LOG_DEBUG_VA1( + "Skipping termination of uninitialized bean %s", + (*beanNode)->_id.c_str()); + } + } + } + CAF_CM_EXIT; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CApplicationContext.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CApplicationContext.h new file mode 100644 index 000000000..91abb6f72 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CApplicationContext.h @@ -0,0 +1,110 @@ +/* + * Author: bwilliams + * Created: Jul 2009 + * + * Copyright (c) 2009-2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CApplicationContext_h_ +#define CApplicationContext_h_ + +namespace Caf { + +CAF_DECLARE_CLASS_AND_SMART_POINTER( CApplicationContext); + +class COMMONAGGREGATOR_LINKAGE CApplicationContext : public IAppContext { +private: + // Bean constructor arguments + struct CBeanCtorArg { + typedef enum { + NOT_SET, + REFERENCE, + VALUE + } ARG_TYPE; + + CBeanCtorArg(const ARG_TYPE type, const std::string& value) : + _type(type), + _value(value) {} + + ARG_TYPE _type; + std::string _value; + }; + + // key=constructor-arg index + typedef std::map CBeanCtorArgCollection; + + struct CBeanNode { + CBeanNode() : + _isInitialized(false) {} + + std::string _id; + std::string _class; + SmartPtrIBean _bean; + CBeanCtorArgCollection _ctorArgs; + Cmapstrstr _properties; + bool _isInitialized; + }; + CAF_DECLARE_SMART_POINTER(CBeanNode); + + struct CBeanNodeLess { + bool operator()( + const SmartPtrCBeanNode& lhs, + const SmartPtrCBeanNode& rhs) const { + return std::less()(lhs->_id, rhs->_id); + } + }; + + typedef TEdgeListGraph CBeanGraph; + + // key=bean id + typedef std::map CBeanCollection; + +public: + CApplicationContext(); + virtual ~CApplicationContext(); + +public: + void initialize(); + void initialize(const Cdeqstr& filenameCollection); + + void terminate(); + + SmartPtrCBeans getBeans() const; + +public: // IApplicationContext + SmartPtrIBean getBean(const std::string& name) const; + +private: + bool m_isInitialized; + CBeanCollection _beanCollection; + CBeanGraph::ClistVertexEdges _beanTopologySort; + Cdeqstr _filenameCollection; + +private: + std::string getDefaultBeanConfigFile() const; + + void parseBeanConfig( + const std::string& beanConfigFile, + CBeanCollection& beanCollection) const; + + void createBeanGraph( + CBeanCollection& beanCollection, + CBeanGraph& beanGraph, + CBeanGraph::ClistVertexEdges& beanTopologySort) const; + + void initializeBeans( + CBeanCollection& beanCollection, + CBeanGraph::ClistVertexEdges& beanTopologySort) const; + + void terminateBeans(CBeanGraph::ClistVertexEdges& beanTopologySort) const; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CApplicationContext); +}; + +} + +#endif // #ifndef CApplicationContext_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoCondition.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoCondition.cpp new file mode 100644 index 000000000..f1f467552 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoCondition.cpp @@ -0,0 +1,76 @@ +/* + * Author: bwilliams + * Created: Oct 29, 2014 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CAutoCondition.h" + +using namespace Caf; + +CAutoCondition::CAutoCondition() : + _isInitialized (false), + CAF_CM_INIT("CAutoCondition") { + ::g_cond_init(&_condition); +} + +CAutoCondition::~CAutoCondition() { + ::g_cond_clear(&_condition); +} + +void CAutoCondition::initialize(const std::string& name) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _name = name; + _isInitialized = true; +} + +bool CAutoCondition::isInitialized() const { + return _isInitialized; +} + +void CAutoCondition::close() { + CAF_CM_FUNCNAME_VALIDATE("close"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + if (_isInitialized) { + ::g_cond_clear(&_condition); + _name.clear(); + _isInitialized = false; + } +} + +std::string CAutoCondition::getName() const { + CAF_CM_FUNCNAME_VALIDATE("getName"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _name; +} + +void CAutoCondition::signal() { + CAF_CM_FUNCNAME_VALIDATE("signal"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + ::g_cond_signal(&_condition); +} + +void CAutoCondition::wait(SmartPtrCAutoMutex& mutex) { + CAF_CM_FUNCNAME_VALIDATE("wait"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(mutex); + + ::g_cond_wait(&_condition, mutex->getNonConstPtr()); +} + +bool CAutoCondition::waitUntil(SmartPtrCAutoMutex& mutex, gint64 endTime) { + CAF_CM_FUNCNAME_VALIDATE("waitUntil"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(mutex); + + gboolean isSignaled = ::g_cond_wait_until(&_condition, mutex->getNonConstPtr(), endTime); + return (FALSE == isSignaled) ? false : true; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoCondition.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoCondition.h new file mode 100644 index 000000000..1991467a6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoCondition.h @@ -0,0 +1,42 @@ +/* + * Author: bwilliams + * Created: Oct 29, 2014 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CAUTOCONDITION_H_ +#define CAUTOCONDITION_H_ + +namespace Caf { + +class COMMONAGGREGATOR_LINKAGE CAutoCondition { +public: + CAutoCondition(); + ~CAutoCondition(); + + void initialize(const std::string& name); + bool isInitialized() const; + + void close(); + + std::string getName() const; + + void signal(); + void wait(SmartPtrCAutoMutex& mutex); + bool waitUntil(SmartPtrCAutoMutex& mutex, gint64 endTime); + +private: + GCond _condition; + std::string _name; + bool _isInitialized; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CAutoCondition); +}; +CAF_DECLARE_SMART_POINTER(CAutoCondition); +} + +#endif /* CAUTOCONDITION_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoFileUnlock.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoFileUnlock.cpp new file mode 100644 index 000000000..82f7d239c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoFileUnlock.cpp @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2004-2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CAutoFileUnlock.h" + +using namespace Caf; + +CAutoFileUnlock::CAutoFileUnlock(SmartPtrCFileLock & rspcManagedLock) +{ + m_spcLock = rspcManagedLock; +} + +CAutoFileUnlock::~CAutoFileUnlock() +{ + CAF_CM_STATIC_FUNC("CAutoFileUnlock", "~CAutoFileUnlock"); + try + { + if (m_spcLock) + { + m_spcLock->setLockLevel(CFileLock::UNLOCK, true); + m_spcLock = 0; + } + } + CAF_CM_CATCH_ALL; + CAF_CM_CLEAREXCEPTION; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoFileUnlock.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoFileUnlock.h new file mode 100644 index 000000000..a98ce0032 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoFileUnlock.h @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2004-2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CAutoFileUnlock_h_ +#define CAutoFileUnlock_h_ + +namespace Caf { + +class COMMONAGGREGATOR_LINKAGE CAutoFileUnlock +{ +public: + CAutoFileUnlock(SmartPtrCFileLock & rspcManagedLock); + ~CAutoFileUnlock(); + +private: + SmartPtrCFileLock m_spcLock; + CAF_CM_DECLARE_NOCOPY(CAutoFileUnlock); +}; + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoMutex.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoMutex.cpp new file mode 100644 index 000000000..89b86e21b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoMutex.cpp @@ -0,0 +1,77 @@ +/* + * Author: bwilliams + * Created: Oct 29, 2014 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CAutoMutex.h" + +using namespace Caf; + +CAutoMutex::CAutoMutex() : + _isInitialized(false), + CAF_CM_INIT("CAutoMutex") { +} + +CAutoMutex::~CAutoMutex() { + if (_isInitialized) { + ::g_mutex_clear(&_mutex); + } +} + +void CAutoMutex::initialize() { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + ::g_mutex_init(&_mutex); + _isInitialized = true; +} + +bool CAutoMutex::isInitialized() const { + return _isInitialized; +} + +void CAutoMutex::lock( + const char* className, + const char* funcName, + const int32 lineNumber) { + CAF_CM_FUNCNAME_VALIDATE("lock"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + +// if ((NULL != className) && (NULL != funcName)) { +// CAF_CM_LOG_DEBUG_VA4("Waiting for lock - %s::%s(%d) - %p", className, funcName, +// lineNumber, &_mutex); +// } + + ::g_mutex_lock(&_mutex); + +// if ((NULL != className) && (NULL != funcName)) { +// CAF_CM_LOG_DEBUG_VA4("Got lock - %s::%s(%d) - %p", className, funcName, lineNumber, +// &_mutex); +// } +} + +void CAutoMutex::unlock( + const char* className, + const char* funcName, + const int32 lineNumber) { + CAF_CM_FUNCNAME_VALIDATE("unlock"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + +// if ((NULL != className) && (NULL != funcName)) { +// CAF_CM_LOG_DEBUG_VA4("Unlocking lock - %s::%s(%d) - %p", className, funcName, +// lineNumber, &_mutex); +// } + + ::g_mutex_unlock(&_mutex); +} + +GMutex* CAutoMutex::getNonConstPtr() { + CAF_CM_FUNCNAME_VALIDATE("getNonConstPtr"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return &_mutex; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoMutex.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoMutex.h new file mode 100644 index 000000000..752712be1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoMutex.h @@ -0,0 +1,39 @@ +/* + * Author: bwilliams + * Created: Oct 29, 2014 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CAUTOMUTEX_H_ +#define CAUTOMUTEX_H_ + +namespace Caf { + +class COMMONAGGREGATOR_LINKAGE CAutoMutex { +public: + CAutoMutex(); + ~CAutoMutex(); + + void initialize(); + bool isInitialized() const; + + void lock(const char* className = NULL, const char* funcName = NULL, const int32 lineNumber = 0); + void unlock(const char* className = NULL, const char* funcName = NULL, const int32 lineNumber = 0); + + GMutex* getNonConstPtr(); + +private: + GMutex _mutex; + bool _isInitialized; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CAutoMutex); +}; +CAF_DECLARE_SMART_POINTER(CAutoMutex); + +} + +#endif /* CAUTOMUTEX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoMutexLockUnlock.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoMutexLockUnlock.cpp new file mode 100644 index 000000000..17b24ecbf --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoMutexLockUnlock.cpp @@ -0,0 +1,72 @@ +/* + * Author: mdonahue + * Created: Jan 20, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CAutoMutexLockUnlock.h" + +using namespace Caf; + +CAutoMutexLockUnlock::CAutoMutexLockUnlock( + SmartPtrCAutoMutex& mutex, + const char* className, + const char* funcName, + const int32 lineNumber) : + _lineNumber(0), + CAF_CM_INIT("CAutoMutexLockUnlock") { + CAF_CM_FUNCNAME_VALIDATE("CAutoMutexLockUnlock"); + CAF_CM_VALIDATE_SMARTPTR(mutex); + + _mutex = mutex; + + if ((NULL != className) && (NULL != funcName)) { + _className = className; + _funcName = funcName; + _lineNumber = lineNumber; + } + + _mutex->lock(className, funcName, lineNumber); +} + +CAutoMutexLockUnlock::CAutoMutexLockUnlock( + SmartPtrCAutoRecMutex& recMutex, + const char* className, + const char* funcName, + const int32 lineNumber) : + _lineNumber(0), + CAF_CM_INIT("CAutoMutexLockUnlock") { + CAF_CM_FUNCNAME_VALIDATE("CAutoMutexLockUnlock"); + CAF_CM_VALIDATE_SMARTPTR(recMutex); + + _recMutex = recMutex; + + if ((NULL != className) && (NULL != funcName)) { + _className = className; + _funcName = funcName; + _lineNumber = lineNumber; + } + + _recMutex->lock(className, funcName, lineNumber); +} + +CAutoMutexLockUnlock::~CAutoMutexLockUnlock() { + if (_className.empty() && _funcName.empty()) { + if (!_mutex.IsNull()) { + _mutex->unlock(); + } + if (!_recMutex.IsNull()) { + _recMutex->unlock(); + } + } else { + if (!_mutex.IsNull()) { + _mutex->unlock(_className.c_str(), _funcName.c_str(), _lineNumber); + } + if (!_recMutex.IsNull()) { + _recMutex->unlock(_className.c_str(), _funcName.c_str(), _lineNumber); + } + } +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoMutexLockUnlock.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoMutexLockUnlock.h new file mode 100644 index 000000000..a55dcee17 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoMutexLockUnlock.h @@ -0,0 +1,44 @@ +/* + * Author: mdonahue + * Created: Jan 20, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CAUTOMUTEXLOCKUNLOCK_H_ +#define CAUTOMUTEXLOCKUNLOCK_H_ + +namespace Caf { + +class COMMONAGGREGATOR_LINKAGE CAutoMutexLockUnlock { +public: + CAutoMutexLockUnlock( + SmartPtrCAutoMutex& mutex, + const char* className = NULL, + const char* funcName = NULL, + const int32 lineNumber = 0); + + CAutoMutexLockUnlock( + SmartPtrCAutoRecMutex& recMutex, + const char* className = NULL, + const char* funcName = NULL, + const int32 lineNumber = 0); + + ~CAutoMutexLockUnlock(); + +private: + SmartPtrCAutoMutex _mutex; + SmartPtrCAutoRecMutex _recMutex; + + std::string _className; + std::string _funcName; + int32 _lineNumber; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CAutoMutexLockUnlock); +}; +} + +#endif /* CAUTOMUTEXLOCKUNLOCK_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoMutexUnlockLock.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoMutexUnlockLock.cpp new file mode 100644 index 000000000..6478c96e5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoMutexUnlockLock.cpp @@ -0,0 +1,70 @@ +/* + * Author: bwilliams + * Created: Oct 21, 2014 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CAutoMutexUnlockLock.h" + +using namespace Caf; + +CAutoMutexUnlockLock::CAutoMutexUnlockLock( + SmartPtrCAutoMutex& mutex, + const char* className, + const char* funcName, + const int32 lineNumber) : + _lineNumber(lineNumber), + CAF_CM_INIT("CAutoMutexUnlockLock") { + CAF_CM_FUNCNAME_VALIDATE("CAutoMutexUnlockLock"); + CAF_CM_VALIDATE_SMARTPTR(mutex); + + _mutex = mutex; + + if ((NULL != className) && (NULL != funcName)) { + _className = className; + _funcName = funcName; + } + + _mutex->unlock(className, funcName, lineNumber); +} + +CAutoMutexUnlockLock::CAutoMutexUnlockLock( + SmartPtrCAutoRecMutex& recMutex, + const char* className, + const char* funcName, + const int32 lineNumber) : + _lineNumber(lineNumber), + CAF_CM_INIT("CAutoMutexUnlockLock") { + CAF_CM_FUNCNAME_VALIDATE("CAutoMutexUnlockLock"); + CAF_CM_VALIDATE_SMARTPTR(recMutex); + + _recMutex = recMutex; + + if ((NULL != className) && (NULL != funcName)) { + _className = className; + _funcName = funcName; + } + + _recMutex->unlock(className, funcName, lineNumber); +} + +CAutoMutexUnlockLock::~CAutoMutexUnlockLock() { + if (_className.empty() && _funcName.empty()) { + if (!_mutex.IsNull()) { + _mutex->lock(); + } + if (!_recMutex.IsNull()) { + _recMutex->lock(); + } + } else { + if (!_mutex.IsNull()) { + _mutex->lock(_className.c_str(), _funcName.c_str(), _lineNumber); + } + if (!_recMutex.IsNull()) { + _recMutex->lock(_className.c_str(), _funcName.c_str(), _lineNumber); + } + } +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoMutexUnlockLock.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoMutexUnlockLock.h new file mode 100644 index 000000000..a30d58ab4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoMutexUnlockLock.h @@ -0,0 +1,44 @@ +/* + * Author: bwilliams + * Created: Oct 21, 2014 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CAUTOMUTEXUNLOCKLOCK_H_ +#define CAUTOMUTEXUNLOCKLOCK_H_ + +namespace Caf { + +class COMMONAGGREGATOR_LINKAGE CAutoMutexUnlockLock { +public: + CAutoMutexUnlockLock( + SmartPtrCAutoMutex& mutex, + const char* className = NULL, + const char* funcName = NULL, + const int32 lineNumber = 0); + + CAutoMutexUnlockLock( + SmartPtrCAutoRecMutex& recMutex, + const char* className = NULL, + const char* funcName = NULL, + const int32 lineNumber = 0); + + ~CAutoMutexUnlockLock(); + +private: + SmartPtrCAutoMutex _mutex; + SmartPtrCAutoRecMutex _recMutex; + + std::string _className; + std::string _funcName; + int32 _lineNumber; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CAutoMutexUnlockLock); +}; +} + +#endif /* CAUTOMUTEXUNLOCKLOCK_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoRecMutex.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoRecMutex.cpp new file mode 100644 index 000000000..36686a17b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoRecMutex.cpp @@ -0,0 +1,76 @@ +/* + * Author: bwilliams + * Created: Oct 29, 2014 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CAutoRecMutex.h" + +using namespace Caf; + +CAutoRecMutex::CAutoRecMutex() : + _isInitialized(false), + CAF_CM_INIT("CAutoRecMutex") { + ::g_rec_mutex_init(&_mutex); +} + +CAutoRecMutex::~CAutoRecMutex() { + ::g_rec_mutex_clear(&_mutex); +} + +void CAutoRecMutex::initialize() { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _isInitialized = true; +} + +bool CAutoRecMutex::isInitialized() const { + return _isInitialized; +} + +void CAutoRecMutex::lock( + const char* className, + const char* funcName, + const int32 lineNumber) { + CAF_CM_FUNCNAME_VALIDATE("lock"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + +// if ((NULL != className) && (NULL != funcName)) { +// CAF_CM_LOG_DEBUG_VA4("Waiting for lock - %s::%s(%d) - %p", className, funcName, +// lineNumber, &_mutex); +// } + + ::g_rec_mutex_lock(&_mutex); + +// if ((NULL != className) && (NULL != funcName)) { +// CAF_CM_LOG_DEBUG_VA4("Got lock - %s::%s(%d) - %p", className, funcName, lineNumber, +// &_mutex); +// } + +} + +void CAutoRecMutex::unlock( + const char* className, + const char* funcName, + const int32 lineNumber) { + CAF_CM_FUNCNAME_VALIDATE("unlock"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + +// if ((NULL != className) && (NULL != funcName)) { +// CAF_CM_LOG_DEBUG_VA4("Unlocking lock - %s::%s(%d) - %p", className, funcName, +// lineNumber, &_mutex); +// } + + ::g_rec_mutex_unlock(&_mutex); +} + +GRecMutex* CAutoRecMutex::getNonConstPtr() { + CAF_CM_FUNCNAME_VALIDATE("getNonConstPtr"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return &_mutex; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoRecMutex.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoRecMutex.h new file mode 100644 index 000000000..dbd50e772 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoRecMutex.h @@ -0,0 +1,39 @@ +/* + * Author: bwilliams + * Created: Oct 29, 2014 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CAUTORECMUTEX_H_ +#define CAUTORECMUTEX_H_ + +namespace Caf { + +class COMMONAGGREGATOR_LINKAGE CAutoRecMutex { +public: + CAutoRecMutex(); + ~CAutoRecMutex(); + + void initialize(); + bool isInitialized() const; + + void lock(const char* className = NULL, const char* funcName = NULL, const int32 lineNumber = 0); + void unlock(const char* className = NULL, const char* funcName = NULL, const int32 lineNumber = 0); + + GRecMutex* getNonConstPtr(); + +private: + GRecMutex _mutex; + bool _isInitialized; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CAutoRecMutex); +}; +CAF_DECLARE_SMART_POINTER(CAutoRecMutex); + +} + +#endif /* CAUTORECMUTEX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CCafRegex.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CCafRegex.cpp new file mode 100644 index 000000000..aa558cf39 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CCafRegex.cpp @@ -0,0 +1,264 @@ +/* + * Author: bwilliams + * Created: Jan 21, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CCafRegex.h" + +using namespace Caf; + +CCafRegex::CCafRegex() : + _isInitialized(false), + _gRegex(NULL), + CAF_CM_INIT_LOG("CCafRegex") { +} + +CCafRegex::~CCafRegex() { + CAF_CM_FUNCNAME("~CCafRegex"); + + try { + if(NULL != _gRegex) { + g_regex_unref(_gRegex); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; +} + +void CCafRegex::initialize(const std::string& regex) { + CAF_CM_FUNCNAME("initialize"); + + GError* gError = NULL; + try { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(regex); + + _gRegex = g_regex_new( + regex.c_str(), + (GRegexCompileFlags)(G_REGEX_OPTIMIZE | G_REGEX_RAW), + (GRegexMatchFlags)0, + &gError); + if(NULL == _gRegex) { + const std::string errorMessage = (gError == NULL) ? "" : gError->message; + const int32 errorCode = (gError == NULL) ? 0 : gError->code; + CAF_CM_EXCEPTION_VA1(errorCode, "g_regex_new Failed: \"%s\"", errorMessage.c_str()); + } + + if(NULL != gError) { + g_error_free(gError); + } + + _regex = regex; + _isInitialized = true; + } + catch(...) { + if(NULL != gError) { + g_error_free(gError); + } + throw; + } +} + +bool CCafRegex::isMatched(const std::string& source) { + CAF_CM_FUNCNAME_VALIDATE("isMatched"); + + bool rc = false; + GMatchInfo* gMatchInfo = NULL; + + try { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(source); + + gboolean gIsMatch = g_regex_match(_gRegex, source.c_str(), (GRegexMatchFlags)0, &gMatchInfo); + rc = (FALSE == gIsMatch) ? false : true; + + if(NULL != gMatchInfo) { + g_match_info_free(gMatchInfo); + } + } + catch(...) { + if(NULL != gMatchInfo) { + g_match_info_free(gMatchInfo); + } + throw; + } + + return rc; +} + +std::map CCafRegex::matchNames( + const std::string& source, + const std::set& names) { + + CAF_CM_FUNCNAME_VALIDATE("matchNames"); + + std::map rc; + GMatchInfo* gMatchInfo = NULL; + + try { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(source); + CAF_CM_VALIDATE_STL(names); + + gboolean gIsMatch = g_regex_match(_gRegex, source.c_str(), (GRegexMatchFlags)0, &gMatchInfo); + if(GLIB_TRUE == gIsMatch) { + CAF_CM_VALIDATE_PTR(gMatchInfo); + + for(TConstIterator > name(names); name; name++) { + gchar* gString = g_match_info_fetch_named(gMatchInfo, (*name).c_str()); + if(NULL != gString) { + rc.insert(std::make_pair(*name, gString)); + g_free(gString); + } + } + } + + if(NULL != gMatchInfo) { + g_match_info_free(gMatchInfo); + } + } + catch(...) { + if(NULL != gMatchInfo) { + g_match_info_free(gMatchInfo); + } + throw; + } + + return rc; +} + +std::deque CCafRegex::matchName( + const std::string& source, + const std::string& name) { + + CAF_CM_FUNCNAME("matchName"); + + std::deque rc; + GMatchInfo* gMatchInfo = NULL; + GError* gError = NULL; + + try { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(source); + CAF_CM_VALIDATE_STRING(name); + + gboolean gIsMatch = g_regex_match(_gRegex, source.c_str(), (GRegexMatchFlags)0, &gMatchInfo); + if(GLIB_TRUE == gIsMatch) { + CAF_CM_VALIDATE_PTR(gMatchInfo); + + while(g_match_info_matches(gMatchInfo)) { + gchar* gString = g_match_info_fetch_named(gMatchInfo, name.c_str()); + rc.push_back(gString); + g_free(gString); + + g_match_info_next(gMatchInfo, &gError); + if(NULL != gError) { + CAF_CM_EXCEPTION_VA1(gError->code, "g_match_info_next Failed: \"%s\"", gError->message); + } + } + } + + if(NULL != gMatchInfo) { + g_match_info_free(gMatchInfo); + } + } + catch(...) { + if(NULL != gMatchInfo) { + g_match_info_free(gMatchInfo); + } + if(NULL != gError) { + g_error_free(gError); + } + throw; + } + + return rc; +} + +std::string CCafRegex::match( + const std::string& source, + const int32 matchNum) { + + CAF_CM_FUNCNAME_VALIDATE("match"); + + std::string rc; + GMatchInfo* gMatchInfo = NULL; + + try { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(source); + + gboolean gIsMatch = g_regex_match(_gRegex, source.c_str(), (GRegexMatchFlags)0, &gMatchInfo); + if(GLIB_TRUE == gIsMatch) { + CAF_CM_VALIDATE_PTR(gMatchInfo); + + gchar* gString = g_match_info_fetch(gMatchInfo, matchNum); + rc = gString; + g_free(gString); + } + + if(NULL != gMatchInfo) { + g_match_info_free(gMatchInfo); + } + } + catch(...) { + if(NULL != gMatchInfo) { + g_match_info_free(gMatchInfo); + } + } + + return rc; +} + +std::string CCafRegex::replaceLiteral( + const std::string& source, + const std::string& replacement) { + + CAF_CM_FUNCNAME("replaceLiteral"); + + std::string rc; + GError* gError = NULL; + + try { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(source); + CAF_CM_VALIDATE_STRING(replacement); + + gchar* gString = g_regex_replace_literal( + _gRegex, source.c_str(), -1, 0, replacement.c_str(), G_REGEX_MATCH_NOTBOL, &gError); + + if(NULL != gError) { + CAF_CM_EXCEPTION_VA1(gError->code, "g_regex_replace_literal Failed: \"%s\"", gError->message); + } + + rc = gString; + g_free(gString); + } + catch(...) { + if(NULL != gError) { + g_error_free(gError); + } + throw; + } + + return rc; +} + +std::string CCafRegex::replaceLiteral( + const std::string& regex, + const std::string& source, + const std::string& replacement) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafRegex", "replaceLiteral"); + CAF_CM_VALIDATE_STRING(regex); + CAF_CM_VALIDATE_STRING(source); + CAF_CM_VALIDATE_STRING(replacement); + + CCafRegex cafRegex; + cafRegex.initialize(regex); + return cafRegex.replaceLiteral(source, replacement); +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CCafRegex.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CCafRegex.h new file mode 100644 index 000000000..bd406a7d7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CCafRegex.h @@ -0,0 +1,61 @@ +/* + * Author: bwilliams + * Created: Jan 21, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CCAFREGEX_H_ +#define CCAFREGEX_H_ + +namespace Caf { + +class COMMONAGGREGATOR_LINKAGE CCafRegex { +public: + CCafRegex(); + virtual ~CCafRegex(); + +public: + void initialize(const std::string& regex); + + bool isMatched(const std::string& source); + + std::map matchNames( + const std::string& source, + const std::set& names); + + std::deque matchName( + const std::string& source, + const std::string& name); + + std::string match( + const std::string& source, + const int32 matchNum); + + std::string replaceLiteral( + const std::string& source, + const std::string& replacement); + +public: + static std::string replaceLiteral( + const std::string& regex, + const std::string& source, + const std::string& replacement); + +private: + bool _isInitialized; + GRegex* _gRegex; + std::string _regex; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CCafRegex); +}; + +CAF_DECLARE_SMART_POINTER(CCafRegex); + +} + +#endif /* CCAFREGEX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CCmdLineOptions.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CCmdLineOptions.cpp new file mode 100644 index 000000000..3c2cb4270 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CCmdLineOptions.cpp @@ -0,0 +1,253 @@ +/* + * Author: bwilliams + * Created: Jul 2009 + * + * Copyright (c) 2009-2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CCmdLineOptions.h" + +using namespace Caf; + +CCmdLineOptions::CCmdLineOptions(void) : + _isInitialized(false), + _optionCnt(0), + _maxOptions(0), + _gOptions(NULL), + CAF_CM_INIT_LOG("CCmdLineOptions") { +} + +CCmdLineOptions::~CCmdLineOptions(void) { + CAF_CM_FUNCNAME("~CCmdLineOptions"); + try { + for(TConstIterator option(_stringOptions); option && (option->second != NULL); option++) { + g_free(option->second); + } + } + CAF_CM_CATCH_ALL + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; +} + +void CCmdLineOptions::initialize( + const std::string& cmdDescription, + const uint32 maxOptions) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(cmdDescription); + CAF_CM_VALIDATE_POSITIVE(maxOptions); + + _cmdDescription = cmdDescription; + _maxOptions = maxOptions; + _gOptions = new GOptionEntry[_maxOptions + 1]; + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +void CCmdLineOptions::addStringOption( + const std::string& longName, + const char shortName, + const std::string& optionDescription) { + CAF_CM_FUNCNAME_VALIDATE("addStringOption"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(longName); + CAF_CM_VALIDATE_STRING(optionDescription); + + checkOptionCnt(longName, _optionCnt, _maxOptions); + populateOption(_gOptions[_optionCnt], longName, shortName, optionDescription); + + _stringOptions.insert(std::make_pair(longName, static_cast(NULL))); + _gOptions[_optionCnt].arg_data = &(_stringOptions.find(longName)->second); + _gOptions[_optionCnt].arg = G_OPTION_ARG_STRING; + + _optionCnt++; + } + CAF_CM_EXIT; +} + +void CCmdLineOptions::addIntOption( + const std::string& longName, + const char shortName, + const std::string& optionDescription) { + CAF_CM_FUNCNAME_VALIDATE("addIntOption"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(longName); + CAF_CM_VALIDATE_STRING(optionDescription); + + checkOptionCnt(longName, _optionCnt, _maxOptions); + populateOption(_gOptions[_optionCnt], longName, shortName, optionDescription); + + _intOptions.insert(std::make_pair(longName, 0)); + _gOptions[_optionCnt].arg_data = &(_intOptions.find(longName)->second); + _gOptions[_optionCnt].arg = G_OPTION_ARG_INT; + + _optionCnt++; + } + CAF_CM_EXIT; +} + +void CCmdLineOptions::addBoolOption( + const std::string& longName, + const char shortName, + const std::string& optionDescription) { + CAF_CM_FUNCNAME_VALIDATE("addBoolOption"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(longName); + CAF_CM_VALIDATE_STRING(optionDescription); + + checkOptionCnt(longName, _optionCnt, _maxOptions); + populateOption(_gOptions[_optionCnt], longName, shortName, optionDescription); + + _boolOptions.insert(std::make_pair(longName, FALSE)); + _gOptions[_optionCnt].arg_data = &(_boolOptions.find(longName)->second); + _gOptions[_optionCnt].arg = G_OPTION_ARG_NONE; + + _optionCnt++; + } + CAF_CM_EXIT; +} + +void CCmdLineOptions::parse( + int32 argc, + char* argv[]) { + CAF_CM_FUNCNAME("parse"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + _gOptions[_optionCnt] = GOptionEntry(); + + GError *gError = NULL; + GOptionContext *gContext = g_option_context_new(_cmdDescription.c_str()); + g_option_context_add_main_entries(gContext, _gOptions, NULL); + if(!g_option_context_parse(gContext, &argc, &argv, &gError)) { + CAF_CM_VALIDATE_PTR(gError); + + const std::string errorMessage = gError->message; + const int32 errorCode = gError->code; + + g_error_free(gError); + g_option_context_free(gContext); + + CAF_CM_EXCEPTION_VA1(errorCode, "option parsing failed: %s", errorMessage.c_str()); + } + + g_option_context_free(gContext); + } + CAF_CM_EXIT; +} + +std::string CCmdLineOptions::findStringOption( + const std::string& longName) { + CAF_CM_FUNCNAME("findStringOption"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(longName); + + CStringOptions::const_iterator iter = _stringOptions.find(longName); + if(iter == _stringOptions.end()) { + CAF_CM_EXCEPTION_VA1(E_FAIL, "String option not found: %s", longName.c_str()); + } + + if(iter->second != NULL) { + rc = iter->second; + } + } + CAF_CM_EXIT; + + return rc; +} + +int32 CCmdLineOptions::findIntOption( + const std::string& longName) { + CAF_CM_FUNCNAME("findIntOption"); + + int32 rc = 0; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(longName); + + CIntOptions::const_iterator iter = _intOptions.find(longName); + if(iter == _intOptions.end()) { + CAF_CM_EXCEPTION_VA1(E_FAIL, "Int option not found: %s", longName.c_str()); + } + + rc = iter->second; + } + CAF_CM_EXIT; + + return rc; +} + +bool CCmdLineOptions::findBoolOption( + const std::string& longName) { + CAF_CM_FUNCNAME("findBoolOption"); + + bool rc = false; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(longName); + + CBoolOptions::const_iterator iter = _boolOptions.find(longName); + if(iter == _boolOptions.end()) { + CAF_CM_EXCEPTION_VA1(E_FAIL, "Bool option not found: %s", longName.c_str()); + } + + rc = iter->second == GLIB_TRUE ? true : false; + } + CAF_CM_EXIT; + + return rc; +} + +void CCmdLineOptions::checkOptionCnt( + const std::string& longName, + const uint32 optionCnt, + const uint32 maxOptions) const { + CAF_CM_FUNCNAME("checkOptionCnt"); + + CAF_CM_ENTER { + if(optionCnt >= maxOptions) { + CAF_CM_EXCEPTION_VA3(E_INVALIDARG, "\"%s\" exceeded the maximum number of allowed options (%d >= %d)", + longName.c_str(), optionCnt, maxOptions); + } + } + CAF_CM_EXIT; +} + +void CCmdLineOptions::populateOption( + GOptionEntry& optionEntry, + const std::string& longName, + const char shortName, + const std::string& optionDescription) { + + CAF_CM_ENTER { + // We can't guarantee that longName's and optionDescription's scopes will be sufficient, so store the strings. + _longNames.push_back(longName); + _optionDescriptions.push_back(optionDescription); + + optionEntry.long_name = _longNames.back().c_str(); + optionEntry.short_name = shortName; + optionEntry.flags = 0; + optionEntry.description = _optionDescriptions.back().c_str(); + optionEntry.arg_description = NULL; + } + CAF_CM_EXIT; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CCmdLineOptions.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CCmdLineOptions.h new file mode 100644 index 000000000..fcf51d1d0 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CCmdLineOptions.h @@ -0,0 +1,72 @@ +/* + * Author: bwilliams + * Created: Jul 2009 + * + * Copyright (c) 2009-2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CCmdLineOptions_h_ +#define CCmdLineOptions_h_ + +namespace Caf { + +class COMMONAGGREGATOR_LINKAGE CCmdLineOptions { +private: + typedef std::map CStringOptions; + typedef std::map CIntOptions; + typedef std::map CBoolOptions; + +public: + CCmdLineOptions(); + virtual ~CCmdLineOptions(); + +public: + void initialize(const std::string& cmdDescription, const uint32 maxOptions); + void parse(int32 argc, char* argv[]); + + void addStringOption(const std::string& longName, const char shortName, const std::string& optionDescription); + void addIntOption(const std::string& longName, const char shortName, const std::string& optionDescription); + void addBoolOption(const std::string& longName, const char shortName, const std::string& optionDescription); + + std::string findStringOption(const std::string& longName); + int32 findIntOption(const std::string& longName); + bool findBoolOption(const std::string& longName); + +private: + bool _isInitialized; + uint32 _optionCnt; + std::string _cmdDescription; + + uint32 _maxOptions; + GOptionEntry* _gOptions; + + CStringOptions _stringOptions; + CIntOptions _intOptions; + CBoolOptions _boolOptions; + + // Temporary for storing longNames and optionDescription for addFooOption() methods above. + std::vector _longNames, _optionDescriptions; + +private: + void checkOptionCnt( + const std::string& longName, + const uint32 optionCnt, + const uint32 maxOptions) const; + void populateOption( + GOptionEntry& optionEntry, + const std::string& longName, + const char shortName, + const std::string& optionDescription); + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CCmdLineOptions); +}; + +CAF_DECLARE_SMART_POINTER( CCmdLineOptions); + +} + +#endif // #ifndef CCmdLineOptions_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CConfigParams.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CConfigParams.cpp new file mode 100644 index 000000000..954442efd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CConfigParams.cpp @@ -0,0 +1,97 @@ +/* + * Author: mdonahue + * Created: Jan 17, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CConfigParams.h" + +using namespace Caf; + +CConfigParams::CConfigParams() : + _table(NULL), + CAF_CM_INIT("CConfigParams") { +} + +CConfigParams::~CConfigParams() { + if (_table) + g_hash_table_unref( _table); +} + +void CConfigParams::initialize( + const std::string& sectionName, + EKeyManagement keyManagement, + EValueManagement valueManagement) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER + { + CAF_CM_PRECOND_ISNOTINITIALIZED(_table); + CAF_CM_VALIDATE_STRING(sectionName); + _sectionName = sectionName; + _table = g_hash_table_new_full( + g_str_hash, + g_str_equal, + EKeysManaged == keyManagement ? destroyKeyCallback : NULL, + EValuesManaged == valueManagement ? destroyValueCallback : NULL); + } + CAF_CM_EXIT; +} + +void CConfigParams::insert(const char* key, GVariant* value) { + CAF_CM_FUNCNAME_VALIDATE("insert"); + + CAF_CM_ENTER + { + CAF_CM_PRECOND_ISINITIALIZED(_table); + CAF_CM_VALIDATE_STRINGPTRA(key); + CAF_CM_VALIDATE_PTR(value); + g_hash_table_insert(_table, (void*)key, value); + } + CAF_CM_EXIT; +} + +GVariant* CConfigParams::lookup( + const char* key, + const EParamDisposition disposition) const { + CAF_CM_FUNCNAME("lookup"); + + GVariant* value = NULL; + CAF_CM_ENTER + { + CAF_CM_PRECOND_ISINITIALIZED(_table); + CAF_CM_VALIDATE_STRINGPTRA(key); + value = (GVariant*)g_hash_table_lookup(_table, key); + if (!value && (disposition == PARAM_REQUIRED)) { + CAF_CM_EXCEPTION_VA2( + ERROR_TAG_NOT_FOUND, + "Required config parameter [%s] is missing from section [%s]", + key, + _sectionName.c_str()); + } + } + CAF_CM_EXIT; + + return value; +} + +std::string CConfigParams::getSectionName() const { + CAF_CM_FUNCNAME_VALIDATE("getSectionName"); + CAF_CM_ENTER + { + CAF_CM_PRECOND_ISINITIALIZED(_table); + } + CAF_CM_EXIT; + return _sectionName; +} + +void CConfigParams::destroyKeyCallback(gpointer ptr) { + g_free(ptr); +} + +void CConfigParams::destroyValueCallback(gpointer ptr) { + g_variant_unref((GVariant*)ptr); +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CConfigParams.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CConfigParams.h new file mode 100644 index 000000000..ca9e12755 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CConfigParams.h @@ -0,0 +1,67 @@ +/* + * Author: mdonahue + * Created: Jan 17, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CCONFIGPARAMS_H_ +#define CCONFIGPARAMS_H_ + +namespace Caf { + +/* + * This class wraps a GHashTable object where the key is a const char* and + * the value is a GVariant*. + * + * The key and value pointers inserted must exist for the lifetime of this object. + * Use the EKeyManagement and EValueMangement flags to control how this + * object destroys the contained hash table. + * + */ +class COMMONAGGREGATOR_LINKAGE CConfigParams : public IConfigParams { +public: + typedef enum { + EKeysUnmanaged, // Set if the caller will manage the lifetime of the keys + EKeysManaged // Set if this object is to detroy the keys upon destruction + } EKeyManagement; + + typedef enum { + EValuesUnmanaged, // Set if the caller will manage the lifetime of the values + EValuesManaged // Set if this object is to detroy the values upon destruction + } EValueManagement; + + CConfigParams(); + virtual ~CConfigParams(); + + void initialize( + const std::string& sectionName, + EKeyManagement keyManagement, + EValueManagement valueManagement); + +public: // IConfigParams + GVariant* lookup( + const char* key, + const EParamDisposition disposition = PARAM_REQUIRED) const; + + std::string getSectionName() const; + + void insert(const char* key, GVariant* value); + +private: + static void destroyKeyCallback(gpointer ptr); + static void destroyValueCallback(gpointer ptr); + +private: + std::string _sectionName; + GHashTable* _table; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CConfigParams); +}; + +CAF_DECLARE_SMART_POINTER(CConfigParams); + +} + +#endif /* CCONFIGPARAMS_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CConfigParamsChain.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CConfigParamsChain.cpp new file mode 100644 index 000000000..2a36d1eb6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CConfigParamsChain.cpp @@ -0,0 +1,71 @@ +/* + * Author: mdonahue + * Created: Jan 17, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CConfigParamsChain.h" + +using namespace Caf; + +CConfigParamsChain::CConfigParamsChain() : + CAF_CM_INIT("CConfigParamsChain") { +} + +CConfigParamsChain::~CConfigParamsChain() { +} + +void CConfigParamsChain::initialize( + CConfigParams::EKeyManagement keyManagement, + CConfigParams::EValueManagement valueManagement, + const SmartPtrIConfigParams& baseParams) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_theseParams); + CAF_CM_VALIDATE_INTERFACE(baseParams); + + _baseParams = baseParams; + _theseParams.CreateInstance(); + _theseParams->initialize( + _baseParams->getSectionName(), + keyManagement, + valueManagement); +} + +void CConfigParamsChain::insert(const char* key, GVariant* value) { + CAF_CM_FUNCNAME_VALIDATE("insert"); + CAF_CM_PRECOND_ISINITIALIZED(_theseParams); + + _theseParams->insert(key, value); +} + +GVariant* CConfigParamsChain::lookup( + const char* key, + const EParamDisposition disposition) const { + CAF_CM_FUNCNAME("lookup"); + CAF_CM_PRECOND_ISINITIALIZED(_theseParams); + + GVariant* value = _theseParams->lookup(key, PARAM_OPTIONAL); + if (!value) { + value = _baseParams->lookup(key, PARAM_OPTIONAL); + } + + if (!value && (disposition == PARAM_REQUIRED)) { + CAF_CM_EXCEPTION_VA2( + ERROR_TAG_NOT_FOUND, + "Required config parameter [%s] is missing from section [%s]", + key, + _baseParams->getSectionName().c_str()); + } + + return value; +} + +std::string CConfigParamsChain::getSectionName() const { + CAF_CM_FUNCNAME_VALIDATE("lookup"); + CAF_CM_PRECOND_ISINITIALIZED(_theseParams); + + return _theseParams->getSectionName(); +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CConfigParamsChain.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CConfigParamsChain.h new file mode 100644 index 000000000..ce4f1754f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CConfigParamsChain.h @@ -0,0 +1,44 @@ +/* + * Author: mdonahue + * Created: Jan 17, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CCONFIGPARAMSCHAIN_H_ +#define CCONFIGPARAMSCHAIN_H_ + +namespace Caf { + +class COMMONAGGREGATOR_LINKAGE CConfigParamsChain : public IConfigParams { +public: + CConfigParamsChain(); + virtual ~CConfigParamsChain(); + + void initialize(CConfigParams::EKeyManagement keyManagement, + CConfigParams::EValueManagement valueManagement, + const SmartPtrIConfigParams& baseParams); + + void insert(const char* key, GVariant* value); + +public: // IConfigParams + GVariant* lookup(const char* key, const EParamDisposition disposition = PARAM_REQUIRED) const; + + std::string getSectionName() const; + +private: + static void destroyValueCallback(gpointer ptr); + +private: + SmartPtrCConfigParams _theseParams; + SmartPtrIConfigParams _baseParams; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CConfigParamsChain); +}; + +CAF_DECLARE_SMART_POINTER(CConfigParamsChain); + +} + +#endif /* CCONFIGPARAMSCHAIN_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CDaemonUtils.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CDaemonUtils.cpp new file mode 100644 index 000000000..911c69da6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CDaemonUtils.cpp @@ -0,0 +1,409 @@ +/* + * Author: mdonahue + * Created: Jun 9, 2011 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CDaemonUtils.h" + +#include +#include +#include +#include +#include +#include + +#ifndef OPEN_MAX +#define OPEN_MAX 256 +#endif + +using namespace Caf; + +extern "C" void DaemonUtilsCrashHandler(int32 sigNum, siginfo_t *info, void *context); + +/////////////////////////////////////////////////////////////////////////////// +// +// MakeDaemon +// This function makes the process a daemon process +// +// NOTE: The following function has numerous coding standard violations that +// cannot be/should not be corrected by CAF common classes and macros. +// +/////////////////////////////////////////////////////////////////////////////// +void CDaemonUtils::MakeDaemon( + int32 argc, + char** argv, + const char* processName, + void(*pfnShutdownHandler)(int32 signalNum), + bool& isDaemonized, + bool& logInfos) { + + const char* logProcessName = + (processName && *processName) ? processName : "CDaemonUtils"; + ::openlog(logProcessName, LOG_PID, LOG_USER); + ::atexit(::closelog); + ::syslog(LOG_INFO, "Initializing %s", logProcessName); + + isDaemonized = true; + logInfos = false; + bool enableCrashHandlers = true; + + std::string userName; + std::string groupName; + std::string rootDir; + int32 irc = 0; + while ((irc = ::getopt(argc, argv, "u:g:r:vnc")) != -1) { + switch (irc) { + case 'u': + userName = optarg; + break; + case 'g': + groupName = optarg; + break; + case 'r': + rootDir = optarg; + break; + case 'n': + isDaemonized = false; + break; + case 'c': + enableCrashHandlers = false; + break; + case 'v': + logInfos = true; + break; + default: + ::syslog(LOG_WARNING, "Unknown option '%c', ignoring", irc); + } + } + + if (logInfos) { + ::syslog( + LOG_INFO, + "Got user %s", + userName.empty() ? "" : userName.c_str()); + ::syslog( + LOG_INFO, + "Got group %s", + groupName.empty() ? "" : groupName.c_str()); + } + + if (isDaemonized) { + if (logInfos) { + ::syslog(LOG_INFO, "Daemonizing"); + } + + // This bizarre check is necessary because the console appender writes to stdout + // when a daemon, which messes up the listener some of the file reads - plus, it + // just doesn't make sense for a daemon to write to the console. + if (CLoggingUtils::isConsoleAppenderUsed()) { + ::syslog(LOG_ERR, "Daemon cannot use console appender"); + ::exit(2); + } + + // first fork ourselves off + if (logInfos) { + ::syslog(LOG_INFO, "Daemon forking"); + } + ::closelog(); + + int32 childPid = ::fork(); + if (childPid < 0) { + ::syslog(LOG_ERR, "Cannot fork child - %s", ::strerror(errno)); + ::exit(2); + } else if (childPid > 0) { + ::exit( 0 ); // we're done because we are the parent + } + + // so we are the child - setsid causes this process to be a new + // session leader, process group leader and has no controlling terminal + if (static_cast(-1) == ::setsid()) { + ::syslog( + LOG_ERR, + "Unable to become a session leader - %s", + ::strerror(errno)); + ::exit(2); + } + + // Ignore the signal from this parent terminating + ::signal(SIGHUP, SIG_IGN); + + // and fork again - puts the init process in charge of cleaning us up + childPid = ::fork(); + if (childPid < 0) { + syslog( LOG_ERR, "Cannot fork 2nd child - %s", ::strerror(errno)); + ::exit(2); + } else if (childPid > 0) { + ::exit( 0 ); // we're done because we are the first child + } + + // close any open file descriptors + int32 maxFd = ::sysconf(_SC_OPEN_MAX); + if (maxFd < 0) { + maxFd = OPEN_MAX; + } + + for (int32 fd = 0; fd < maxFd; ++fd) { + ::close(fd); + } + + // and re-open syslog + ::openlog(logProcessName, LOG_CONS | LOG_PID, LOG_USER); + errno = 0; + } + + // set a signal handler to catch SIGTERM & SIGINT + struct sigaction sigActionInfo; + if (pfnShutdownHandler) { + ::memset(&sigActionInfo, 0, sizeof(struct sigaction)); + sigActionInfo.sa_flags = 0; + sigActionInfo.sa_handler = pfnShutdownHandler; + sigemptyset(&sigActionInfo.sa_mask); + + if (-1 == ::sigaction(SIGTERM, &sigActionInfo, NULL)) { + ::syslog( + LOG_ERR, + "Unable to setup shutdown signal handler - %s", + ::strerror(errno)); + ::exit(2); + } + + if (-1 == ::sigaction(SIGINT, &sigActionInfo, NULL)) + { + ::syslog( + LOG_ERR, + "Unable to setup interrupt signal handler - %s", + ::strerror(errno)); + ::exit(2); + } + } else { + ::syslog(LOG_WARNING, "No shutdown handler function was supplied."); + } + + // ignore any terminal signals + #ifdef SIGTTOU + ::signal(SIGTTOU, SIG_IGN); + #endif + #ifdef SIGTTIN + ::signal(SIGTTIN, SIG_IGN); + #endif + #ifdef SIGTSTP + ::signal(SIGTSTP, SIG_IGN); + #endif + + // set us up as the specified group + if (!groupName.empty()) { + struct group* groupInfo = ::getgrnam(groupName.c_str()); + if (groupInfo) { + if (logInfos) { + ::syslog(LOG_INFO, "Switching to group %d", groupInfo->gr_gid); + } + if (0 != ::setgid(groupInfo->gr_gid)) { + ::syslog( + LOG_ERR, + "Unable to become group %s - %s", + groupName.c_str(), + ::strerror(errno)); + ::exit(2); + } + } else { + ::syslog( + LOG_ERR, + "Unable to find group info for %s - %s", + groupName.c_str(), + ::strerror(errno)); + ::exit(2); + } + } + + // set us up as the specified user + if (!userName.empty()) { + struct passwd * passwdInfo = ::getpwnam(userName.c_str()); + if (passwdInfo) { + if (logInfos) { + ::syslog(LOG_INFO, "Switching to user %d", passwdInfo->pw_uid); + } + if (0 != ::setuid(passwdInfo->pw_uid)) { + ::syslog( + LOG_ERR, + "Unable to become user %s - %s", + userName.c_str(), + ::strerror(errno)); + ::exit(2); + } + } else { + ::syslog( + LOG_ERR, + "Unable to find login info for %s - %s", + userName.c_str(), + ::strerror(errno)); + ::exit(2); + } + } + + // Move the current directory to the specified directory + // to make sure we don't hold a file system open. + if (rootDir.empty()) { + if (logInfos) { + ::syslog(LOG_INFO, "Switching to directory of %s", *argv); + } + const char * lastSlash = ::strrchr(*argv, '/'); + if (*lastSlash) { + std::string directory = *argv; + directory.erase(directory.rfind('/')); + if (logInfos) { + ::syslog(LOG_INFO, "chdir %s", directory.c_str()); + } + ::chdir(directory.c_str()); + } else { + if (logInfos) { + ::syslog(LOG_INFO, "chdir /"); + } + ::chdir("/"); + } + } else { + if (logInfos) { + ::syslog(LOG_INFO, "Switching to directory %s", rootDir.c_str()); + } + if (-1 == ::chdir(rootDir.c_str())) + { + ::syslog( + LOG_ERR, + "::chdir to %s failed - %s", + rootDir.c_str(), + ::strerror(errno)); + } + } + + // set our umask correctly - disable all world access + if (logInfos) { + ::syslog(LOG_INFO, "umask 0007"); + } + ::umask(0007); + + // boost our open file limit + struct rlimit rlimitInfo; + ::getrlimit(RLIMIT_NOFILE, &rlimitInfo); + if (rlimitInfo.rlim_cur < rlimitInfo.rlim_max) { + if (logInfos) { +#ifdef __x86_64__ + ::syslog( + LOG_INFO, + "rlimit change #files from %lld to %lld", + (long long) rlimitInfo.rlim_cur, + (long long) rlimitInfo.rlim_max); +#else + ::syslog( + LOG_INFO, + "rlimit change #files from %d to %d", + rlimitInfo.rlim_cur, + rlimitInfo.rlim_max); +#endif + } + rlimitInfo.rlim_cur = rlimitInfo.rlim_max; + ::setrlimit(RLIMIT_NOFILE, &rlimitInfo); + } else { + if (logInfos) { +#ifdef __x86_64__ + ::syslog( + LOG_INFO, + "rlimit #files already at maximum of %lld", + (long long) rlimitInfo.rlim_cur); +#else + ::syslog( + LOG_INFO, + "rlimit #files already at maximum of %d", + rlimitInfo.rlim_cur); +#endif + } + } + + if (enableCrashHandlers) + { + // Set up the crash handler + struct sigaction newAction; + struct sigaction oldAction; + ::memset(&newAction, 0, sizeof(struct sigaction)); + ::memset(&oldAction, 0, sizeof(struct sigaction)); + + newAction.sa_sigaction = DaemonUtilsCrashHandler; + newAction.sa_flags = SA_SIGINFO | SA_RESETHAND; + if (sigfillset(&newAction.sa_mask) == -1) { + ::syslog( + LOG_ERR, + "Unable to fill crash handler signal set - %s", + ::strerror(errno)); + } + else if (::sigaction(SIGILL, &newAction, &oldAction) == -1 || + ::sigaction(SIGSEGV, &newAction, &oldAction) == -1 || + ::sigaction(SIGFPE, &newAction, &oldAction) == -1 || + ::sigaction(SIGBUS, &newAction, &oldAction) == -1) + { + ::syslog( + LOG_ERR, + "Unable to set crash handler signal handler %s", + ::strerror(errno)); + } + } + + if (logInfos) + ::syslog(LOG_INFO, "Initialized"); +} + +extern "C" void DaemonUtilsCrashHandler(int32 sigNum, siginfo_t *info, void *context) +{ + CAF_CM_STATIC_FUNC_LOG("CDaemonUtils", "DaemonUtilsCrashHandler"); + + try { + std::string message("Got Signal "); + switch (sigNum) { + case SIGSEGV: + message += "[SEGV"; + break; + case SIGBUS: + message += "[BUS"; + break; + case SIGFPE: + message += "[FPE"; + break; + + case SIGILL: + message += "[ILL"; + break; + + default: + message += + "[UNKNOWN SIGNAL (" + + CStringConv::toString(sigNum) + + ")"; + break; + } + message += " code=" + CStringConv::toString(info->si_code) + "]"; + message += " Fault Addr[" + CStringConv::toString(info->si_addr) + "] "; + +#if defined ( __linux__ ) || defined ( __APPLE__ ) + Dl_info dlInfo; + if (0 != ::dladdr(info->si_addr, &dlInfo)) { + if (dlInfo.dli_fname != NULL) { + message += " Module ["; + message += dlInfo.dli_fname; + } + if (dlInfo.dli_sname != NULL) { + message += " Symbol ["; + message += dlInfo.dli_sname; + } + } +#else + #error "Need to determine if DlInfo is available" +#endif + + ::syslog(LOG_ERR, "%s", message.c_str()); + CAF_CM_LOG_ERROR_VA0(message.c_str()); + } + CAF_CM_CATCH_ALL; + ::exit(-1); +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CDaemonUtils.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CDaemonUtils.h new file mode 100644 index 000000000..2b8a65abe --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CDaemonUtils.h @@ -0,0 +1,25 @@ +/* + * Author: mdonahue + * Created: Jun 9, 2011 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CDAEMONUTILS_H_ +#define CDAEMONUTILS_H_ + +class CDaemonUtils { +public: + static void MakeDaemon( + int32 argc, + char** argv, + const char* processName, + void(*pfnShutdownHandler)(int32 signalNum), + bool& isDaemonized, + bool& logInfos); + + CAF_CM_DECLARE_NOCREATE(CDaemonUtils); +}; + +#endif /* CDAEMONUTILS_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CDateTimeUtils.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CDateTimeUtils.cpp new file mode 100644 index 000000000..fdf70c9de --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CDateTimeUtils.cpp @@ -0,0 +1,105 @@ +/*k + * Author: bwilliams + * Created: Jan 21, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#ifndef WIN32 +#include +#endif +#include "CDateTimeUtils.h" + +using namespace Caf; + +#ifdef WIN32 +#define DELTA_EPOCH_IN_MICROSECS 11644473600000000Ui64 + +int32 CDateTimeUtils::getTimeOfDay(struct timeval *tv, struct timezone *tz) { + FILETIME ft; + unsigned __int64 tmpres = 0; + static int32 tzflag; + + if (NULL != tv) + { + ::GetSystemTimeAsFileTime(&ft); + + tmpres |= ft.dwHighDateTime; + tmpres <<= 32; + tmpres |= ft.dwLowDateTime; + + /*converting file time to unix epoch*/ + tmpres -= DELTA_EPOCH_IN_MICROSECS; + tmpres /= 10; /*convert into microseconds*/ + tv->tv_sec = (int32)(tmpres / 1000000UL); + tv->tv_usec = (int32)(tmpres % 1000000UL); + } + + if (NULL != tz) + { + if (!tzflag) + { + _tzset(); + tzflag++; + } + long minuteswest = 0; + ::_get_timezone(&minuteswest); + tz->tz_minuteswest = minuteswest / 60; + int32 dstHours = 0; + ::_get_daylight(&dstHours); + tz->tz_dsttime = dstHours == 0 ? 0 : 1; + } + + return 0; +} +#else +int32 CDateTimeUtils::getTimeOfDay(struct timeval *tv, struct timezone *tz) { + return ::gettimeofday(tv, tz); +} +#endif + +uint64 CDateTimeUtils::getTimeMs() { + CAF_CM_STATIC_FUNC("CDateTimeUtils", "getTimeMs"); + + timeval curTime; + if(-1 == getTimeOfDay(&curTime, NULL)) { + const int32 errorCode = errno; + CAF_CM_EXCEPTION_VA0(errorCode, "getTimeOfDay failed"); + } + + return (curTime.tv_sec * 1000) + (curTime.tv_usec / 1000); +} + +uint64 CDateTimeUtils::calcRemainingTime( + const uint64 begTimeMs, + const uint64 totalMs) { + CAF_CM_STATIC_FUNC_VALIDATE("CDateTimeUtils", "calcRemainingTime"); + + const uint64 diffTimeMs = CDateTimeUtils::getTimeMs() - begTimeMs; + CAF_CM_VALIDATE_NONNEGATIVE_INT64(diffTimeMs); + + uint64 rc = 0; + if(totalMs > diffTimeMs) { + rc = totalMs - diffTimeMs; + } + + return rc; +} + +std::string CDateTimeUtils::getCurrentDateTime() { + time_t now; + ::time(&now); + char buf[sizeof "0000-00-00T00:00:00Z"]; + tm result; +#ifdef WIN32 + ::gmtime_s(&result, &now); + ::strftime(buf, sizeof buf, "%Y-%m-%dT%H:%M:%SZ", &result); +#else + ::gmtime_r(&now, &result); + ::strftime(buf, sizeof buf, "%FT%TZ", &result); +#endif + + return buf; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CDateTimeUtils.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CDateTimeUtils.h new file mode 100644 index 000000000..dbaa42df6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CDateTimeUtils.h @@ -0,0 +1,38 @@ +/* + * Author: bwilliams + * Created: Jan 21, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CDateTimeUtils_H_ +#define CDateTimeUtils_H_ + +#ifndef WIN32 +#include +#else +#include +#endif + +namespace Caf { + +class COMMONAGGREGATOR_LINKAGE CDateTimeUtils { +public: + static uint64 getTimeMs(); + + static uint64 calcRemainingTime( + const uint64 begTimeMs, + const uint64 totalMs); + + static int32 getTimeOfDay(struct timeval *tv, struct timezone *tz); + + static std::string getCurrentDateTime(); + +private: + CAF_CM_DECLARE_NOCREATE(CDateTimeUtils); +}; + +} + +#endif /* CDateTimeUtils_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CEnvironmentUtils.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CEnvironmentUtils.cpp new file mode 100644 index 000000000..531b6cd90 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CEnvironmentUtils.cpp @@ -0,0 +1,42 @@ +/* + * Author: bwilliams + * Created: 10/19/2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CEnvironmentUtils.h" +using namespace Caf; + + +void CEnvironmentUtils::readEnvironmentVar(const char* varname, std::string& rValue) { + CAF_CM_STATIC_FUNC_VALIDATE("CEnvironmentUtils", "readEnvironmentVar"); + CAF_CM_VALIDATE_PTR(varname); + #ifdef WIN32 + char* dupEnvBuf = NULL; + size_t dupEnvBufLen = 0; + errno_t apiRc = ::_dupenv_s(&dupEnvBuf, &dupEnvBufLen, varname); + rValue = std::string(dupEnvBuf && ::strlen(dupEnvBuf) ? dupEnvBuf : ""); + ::free(dupEnvBuf); + dupEnvBuf = NULL; + #else + const char *prValue = ::getenv(varname); + if (NULL != prValue) { + rValue = prValue; + } + #endif +} + +void CEnvironmentUtils::writeEnvironmentVar(const char* varname, std::string& rValue) { + CAF_CM_STATIC_FUNC_VALIDATE("CEnvironmentUtils", "writeEnvironmentVar"); + CAF_CM_VALIDATE_PTR(varname); + #ifdef WIN32 + std::ostringstream formattedStream; + formattedStream << std::string(varname) << std::string("=") << rValue; + ::_putenv(formattedStream.str().c_str()); + #else + // Not Implemented + #endif +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CEnvironmentUtils.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CEnvironmentUtils.h new file mode 100644 index 000000000..95c87bb37 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CEnvironmentUtils.h @@ -0,0 +1,26 @@ +/* + * Author: bwilliams + * Created: 10/19/2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CENVIRONMENTUTILS_H_ +#define CENVIRONMENTUTILS_H_ + +namespace Caf { + +class COMMONAGGREGATOR_LINKAGE CEnvironmentUtils { +public: + + static void readEnvironmentVar(const char* varname, std::string& rValue); + static void writeEnvironmentVar(const char* varname, std::string& rValue); + +private: + CAF_CM_DECLARE_NOCREATE(CEnvironmentUtils); +}; + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CFileLock.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CFileLock.cpp new file mode 100644 index 000000000..126914f5f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CFileLock.cpp @@ -0,0 +1,178 @@ +/* + * Copyright (c) 2004-2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CFileLock.h" +#include +#include +#include +#include + +using namespace Caf; + +//////////////////////////////////////////////////////////////////////// +// +// CFileLock::CFileLock() +// +//////////////////////////////////////////////////////////////////////// +CFileLock::CFileLock() : + CAF_CM_INIT("CFileLock"), + _isInitialized(false), + _isFileDescriptorLocal(false), + _fileDescriptor(-1), + _lockLevel(UNLOCK) { +} + +//////////////////////////////////////////////////////////////////////// +// +// CFileLock::~CFileLock() +// +//////////////////////////////////////////////////////////////////////// +CFileLock::~CFileLock() { + CAF_CM_FUNCNAME("~CFileLock"); + try { + if (_isInitialized) { + setLockLevel(UNLOCK, true); + if (_isFileDescriptorLocal) + ::close(_fileDescriptor); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_CLEAREXCEPTION; +} + +//////////////////////////////////////////////////////////////////////// +// +// CFileLock::Initialize() +// +//////////////////////////////////////////////////////////////////////// +void CFileLock::initialize(int32 iFileDescriptor) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _lockLevel = UNLOCK; + _fileDescriptor = iFileDescriptor; + _isFileDescriptorLocal = false; + _isInitialized = true; +} + +//////////////////////////////////////////////////////////////////////// +// +// CFileLock::Initialize() +// +//////////////////////////////////////////////////////////////////////// +void CFileLock::initialize(const char* cszFilename, bool bCreateFile) { + CAF_CM_FUNCNAME("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRINGPTRA(cszFilename); + + int32 iFlags = bCreateFile ? O_RDWR | O_CREAT : O_RDWR; + int32 iFileDescriptor = ::open(cszFilename, iFlags, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP); + + if (-1 != iFileDescriptor) { + _lockLevel = UNLOCK; + _fileDescriptor = iFileDescriptor; + _isFileDescriptorLocal = true; + _isInitialized = true; + } + else { + int32 iRc = errno; + CAF_CM_EXCEPTION_VA1(iRc, "Unable to open file %s", cszFilename); + } +} + +//////////////////////////////////////////////////////////////////////// +// +// CFileLock::GetLockLevel() +// +//////////////////////////////////////////////////////////////////////// +CFileLock::ELockLevel CFileLock::getLockLevel() const { + CAF_CM_FUNCNAME_VALIDATE("getLockLeve"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _lockLevel; +} + +//////////////////////////////////////////////////////////////////////// +// +// CFileLock::SetLockLevel() +// +//////////////////////////////////////////////////////////////////////// +void CFileLock::setLockLevel(ELockLevel eLockLevel, bool bDowngradeLock) { + CAF_CM_FUNCNAME("setLockLeve"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + bool bLockChangeOK = true; + // determine if we are attempting to downgrade an existing lock + if (!bDowngradeLock) { + if (eLockLevel <= _lockLevel) { + bLockChangeOK = false; + } + } + + if (bLockChangeOK && (eLockLevel != _lockLevel)) { + struct flock stFlock; + ::memset(&stFlock, 0, sizeof(stFlock)); + stFlock.l_whence = SEEK_SET; + stFlock.l_start = 0; + stFlock.l_len = 1; + if (SHARED_LOCK == eLockLevel) + stFlock.l_type = F_RDLCK; + else if (EXCLUSIVE_LOCK == eLockLevel) + stFlock.l_type = F_WRLCK; + else + stFlock.l_type = F_UNLCK; + + if (-1 != ::fcntl(_fileDescriptor, F_SETLKW, &stFlock)) { + _lockLevel = eLockLevel; + } + else { + CAF_CM_EXCEPTION_VA0(errno, "Unable to modify lock"); + } + } +} + +//////////////////////////////////////////////////////////////////////// +// +// CFileLock::AttemptSetLockLevel() +// +//////////////////////////////////////////////////////////////////////// +bool CFileLock::attemptSetLockLevel(ELockLevel eLockLevel, bool bDowngradeLock) { + CAF_CM_FUNCNAME("attemptSetLockLeve"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + bool bRet = false; + bool bLockChangeOK = true; + + // determine if we are attempting to downgrade an existing lock + if (!bDowngradeLock) { + if (eLockLevel <= _lockLevel) { + bLockChangeOK = false; + } + } + + if (bLockChangeOK && (eLockLevel != _lockLevel)) { + struct flock stFlock; + ::memset(&stFlock, 0, sizeof(stFlock)); + stFlock.l_whence = SEEK_SET; + stFlock.l_start = 0; + stFlock.l_len = 1; + if (SHARED_LOCK == eLockLevel) + stFlock.l_type = F_RDLCK; + else if (EXCLUSIVE_LOCK == eLockLevel) + stFlock.l_type = F_WRLCK; + else + stFlock.l_type = F_UNLCK; + + if (-1 != ::fcntl(_fileDescriptor, F_SETLK, &stFlock)) { + _lockLevel = eLockLevel; + bRet = true; + } + else if ((EACCES != errno) && (EAGAIN != errno)) { + CAF_CM_EXCEPTION_VA0(errno, "Unable to modify lock"); + } + } + + return bRet; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CFileLock.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CFileLock.h new file mode 100644 index 000000000..02681d1e8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CFileLock.h @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2004-2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CFileLock_h_ +#define CFileLock_h_ + +namespace Caf { + +class COMMONAGGREGATOR_LINKAGE CFileLock +{ +public: + enum ELockLevel + { + UNLOCK, + SHARED_LOCK, + EXCLUSIVE_LOCK + }; + +public: + // Ctor + CFileLock(); + + // dtor + ~CFileLock(); + + // initialize the lock for the specified file + void initialize(int32 iFileDescriptor); + + // initialize the lock for the specified file + void initialize(const char * cszFileName, bool bCreateFile = true); + + // Set the lock to the specified scope + void setLockLevel(ELockLevel eLockLevel, bool bDowngradeLock = false); + + // Set the lock to the specified if possible + bool attemptSetLockLevel(ELockLevel eLockLevel, bool bDowngradeLock = false); + + // Get the current lock level + ELockLevel getLockLevel() const; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CFileLock); + + bool _isInitialized; + bool _isFileDescriptorLocal; + int32 _fileDescriptor; + ELockLevel _lockLevel; +}; + +CAF_DECLARE_SMART_POINTER(CFileLock); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CFileLockWin.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CFileLockWin.cpp new file mode 100644 index 000000000..fa6f55cf3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CFileLockWin.cpp @@ -0,0 +1,35 @@ +/* + * Author: mdonahue + * Created: Nov 14 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CFileLock.h" + +using namespace Caf; + +CFileLock::CFileLock() { +} + +CFileLock::~CFileLock() { +} + +void CFileLock::initialize(int32 iFileDescriptor) { +} + +void CFileLock::initialize(const char * cszFileName, bool bCreateFile) { +} + +void CFileLock::setLockLevel(ELockLevel eLockLevel, bool bDowngradeLock) { +} + +bool CFileLock::attemptSetLockLevel(ELockLevel eLockLevel, bool bDowngradeLock) { + return false; +} + +CFileLock::ELockLevel CFileLock::getLockLevel() const { + return UNLOCK; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CFileSystemUtils.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CFileSystemUtils.cpp new file mode 100644 index 000000000..aa64cbe7f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CFileSystemUtils.cpp @@ -0,0 +1,1288 @@ +/* + * Author: bwilliams + * Created: Jan 21, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CFileSystemUtils.h" +#include "../Collections/Iterators/IteratorsInc.h" +#ifdef WIN32 + #include +#endif + +#ifdef __linux__ +#include +#include +#endif + +#include +#include + +using namespace Caf; + +const std::string FileSystemUtils::REGEX_MATCH_ALL; + +void FileSystemUtils::createDirectory( + const std::string& path, + const uint32 mode/* = 0770*/) { + CAF_CM_STATIC_FUNC_LOG("FileSystemUtils", "createDirectory"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(path); + + if(doesDirectoryExist(path)) { + CAF_CM_EXCEPTIONEX_VA1( + IllegalStateException, + ERROR_ALREADY_EXISTS, + "Directory exists: %s", + path.c_str()); + } else { + CAF_CM_LOG_DEBUG_VA1("Creating directory - %s", path.c_str()); + int32 rc = g_mkdir_with_parents(path.c_str(), mode); + if(rc < 0) { + rc = errno; + CAF_CM_EXCEPTIONEX_VA1( + IOException, + rc, + "Unable to create directory: %s", + path.c_str()); + } + } + } + CAF_CM_EXIT; +} + +void FileSystemUtils::removeDirectory( + const std::string& path) { + CAF_CM_STATIC_FUNC_LOG("FileSystemUtils", "removeDirectory"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(path); + + if(doesDirectoryExist(path)) { + CAF_CM_LOG_DEBUG_VA1("Removing directory - %s", path.c_str()); + int32 rc = g_rmdir(path.c_str()); + if(rc < 0) { + rc = errno; + CAF_CM_EXCEPTIONEX_VA1( + IOException, + rc, + "Failed to remove directory: %s", + path.c_str()); + } + } else { + CAF_CM_EXCEPTIONEX_VA1( + PathNotFoundException, + 0, + "Directory does not exist: %s", + path.c_str()); + } + } + CAF_CM_EXIT; +} + +void FileSystemUtils::recursiveRemoveDirectory(const std::string& path) { + CAF_CM_STATIC_FUNC("FileSystemUtils", "recursiveRemoveDirectory"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(path); + + if(doesDirectoryExist(path)) { + DirectoryItems items = itemsInDirectory(path, REGEX_MATCH_ALL); + + // Delete subdirs first + for (TConstIterator directory(items.directories); directory; directory++) { + recursiveRemoveDirectory(path + G_DIR_SEPARATOR_S + *directory); + } + + // Delete files + for (TConstIterator file(items.files); file; file++) { + removeFile(path + G_DIR_SEPARATOR_S + *file); + } + + // Delete directory + removeDirectory(path); + } else { + CAF_CM_EXCEPTIONEX_VA1( + PathNotFoundException, + 0, + "Directory does not exist: %s", + path.c_str()); + } + } + CAF_CM_EXIT; +} + +void FileSystemUtils::removeFile( + const std::string& path) { + CAF_CM_STATIC_FUNC_LOG("FileSystemUtils", "removeFile"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(path); + + if(doesFileExist(path)) { + CAF_CM_LOG_DEBUG_VA1("Removing file - %s", path.c_str()); + int32 rc = g_remove(path.c_str()); + if(rc < 0) { + rc = errno; + CAF_CM_EXCEPTIONEX_VA1( + IOException, + rc,"Failed to remove file: %s", + path.c_str()); + } + } else { + CAF_CM_EXCEPTIONEX_VA1( + FileNotFoundException, + 0, + "File does not exist: %s", + path.c_str()); + } + } + CAF_CM_EXIT; +} + +FileSystemUtils::Files FileSystemUtils::removeFilesInDirectory( + const std::string& path, + const std::string& regex) { + CAF_CM_STATIC_FUNC("FileSystemUtils", "removeFilesInDirectory"); + + Files rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(path); + + if(doesDirectoryExist(path)) { + DirectoryItems items = itemsInDirectory(path, regex); + for (TConstIterator file(items.files); file; file++) { + removeFile(path + G_DIR_SEPARATOR_S + *file); + rc.push_back(*file); + } + } else { + CAF_CM_EXCEPTIONEX_VA1( + PathNotFoundException, + 0, + "Directory does not exist: %s", + path.c_str()); + } + } + CAF_CM_EXIT; + + return rc; +} + +bool FileSystemUtils::doesFileExist( + const std::string& path) { + CAF_CM_STATIC_FUNC_VALIDATE( "FileSystemUtils", "doesFileExist" ); + CAF_CM_VALIDATE_STRING(path); + + return isRegularFile(path); +} + +bool FileSystemUtils::doesDirectoryExist( + const std::string& path) { + + CAF_CM_STATIC_FUNC_LOG_VALIDATE( "FileSystemUtils", "doesDirectoryExist" ); + + bool rc = false; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(path); + + rc = (GLIB_TRUE == g_file_test(path.c_str(), G_FILE_TEST_IS_DIR)); + } + CAF_CM_EXIT; + + return rc; +} + +bool FileSystemUtils::isRegularFile( + const std::string& path) { + + CAF_CM_STATIC_FUNC_VALIDATE( "FileSystemUtils", "isRegularFile" ); + + bool rc = false; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(path); + + // Test to make sure the source is a regular file (or symlink to one), not a directory + rc = (g_file_test(path.c_str(), G_FILE_TEST_IS_REGULAR) == GLIB_TRUE); + } + CAF_CM_EXIT; + + return rc; +} + +std::string FileSystemUtils::getCurrentDir() { + return getDirname(getCurrentFile()); +} + +std::string FileSystemUtils::getCurrentFile() { + std::string fileName; + CEcmDllManager::GetLibraryNameFromHandle(NULL, fileName); + + return fileName; +} + +std::string FileSystemUtils::getBasename( + const std::string& path) { + + CAF_CM_STATIC_FUNC( "FileSystemUtils", "getBasename" ); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(path); + + gchar* basename = g_path_get_basename(path.c_str()); + if(NULL == basename) { + CAF_CM_EXCEPTION_EFAIL( "g_path_get_basename Failed: " + path); + } + + rc = basename; + g_free(basename); + } + CAF_CM_EXIT; + + return rc; +} + +std::string FileSystemUtils::getDirname( + const std::string& path) { + + CAF_CM_STATIC_FUNC( "FileSystemUtils", "getDirname" ); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(path); + + gchar* dirname = g_path_get_dirname(path.c_str()); + if(NULL == dirname) { + CAF_CM_EXCEPTION_EFAIL( "g_path_get_dirname Failed: " + path); + } + + rc = dirname; + g_free(dirname); + } + CAF_CM_EXIT; + + return rc; +} + +std::string FileSystemUtils::getTmpDir() { + + CAF_CM_STATIC_FUNC( "FileSystemUtils", "getTmpDir" ); + + std::string rc; + + CAF_CM_ENTER { + const gchar* tmpDir = g_get_tmp_dir(); + if(NULL == tmpDir) { + CAF_CM_EXCEPTION_EFAIL( "g_get_tmp_dir Failed"); + } else { + // Trim trailing slash + rc = tmpDir; + rc.erase(rc.find_last_not_of(G_DIR_SEPARATOR)+1); + } + } + CAF_CM_EXIT; + + return rc; +} + +std::string FileSystemUtils::buildPath( + const std::string& path, + const std::string& newElement) { + + CAF_CM_STATIC_FUNC( "FileSystemUtils", "buildPath" ); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(path); + CAF_CM_VALIDATE_STRING(newElement); + + gchar* newPath = g_build_filename(path.c_str(), newElement.c_str(), NULL); + if(NULL == newPath) { + CAF_CM_EXCEPTION_VA2(E_FAIL, "g_build_filename Failed: %s, %s", path.c_str(), newElement.c_str()); + } + + rc = normalizePathForPlatform(newPath); + g_free(newPath); + } + CAF_CM_EXIT; + + return rc; +} + +std::string FileSystemUtils::buildPath( + const std::string& path, + const std::string& newElement1, + const std::string& newElement2) { + + CAF_CM_STATIC_FUNC( "FileSystemUtils", "buildPath" ); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(path); + CAF_CM_VALIDATE_STRING(newElement1); + CAF_CM_VALIDATE_STRING(newElement2); + + gchar* newPath = g_build_filename(path.c_str(), newElement1.c_str(), newElement2.c_str(), NULL); + if(NULL == newPath) { + CAF_CM_EXCEPTION_VA3(E_FAIL, "g_build_filename Failed: %s, %s, %s", path.c_str(), newElement1.c_str(), newElement2.c_str()); + } + + rc = normalizePathForPlatform(newPath); + g_free(newPath); + } + CAF_CM_EXIT; + + return rc; +} + +std::string FileSystemUtils::buildPath( + const std::string& path, + const std::string& newElement1, + const std::string& newElement2, + const std::string& newElement3) { + + CAF_CM_STATIC_FUNC( "FileSystemUtils", "buildPath" ); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(path); + CAF_CM_VALIDATE_STRING(newElement1); + CAF_CM_VALIDATE_STRING(newElement2); + CAF_CM_VALIDATE_STRING(newElement3); + + gchar* newPath = g_build_filename( + path.c_str(), newElement1.c_str(), newElement2.c_str(), newElement3.c_str(), NULL); + if(NULL == newPath) { + CAF_CM_EXCEPTION_VA4(E_FAIL, + "g_build_filename Failed: %s, %s, %s, %s", + path.c_str(), newElement1.c_str(), newElement2.c_str(), newElement3.c_str()); + } + + rc = normalizePathForPlatform(newPath); + g_free(newPath); + } + CAF_CM_EXIT; + + return rc; +} + +std::string FileSystemUtils::buildPath( + const std::string& path, + const std::string& newElement1, + const std::string& newElement2, + const std::string& newElement3, + const std::string& newElement4) { + + CAF_CM_STATIC_FUNC( "FileSystemUtils", "buildPath" ); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(path); + CAF_CM_VALIDATE_STRING(newElement1); + CAF_CM_VALIDATE_STRING(newElement2); + CAF_CM_VALIDATE_STRING(newElement3); + CAF_CM_VALIDATE_STRING(newElement4); + + gchar* newPath = g_build_filename( + path.c_str(), newElement1.c_str(), newElement2.c_str(), newElement3.c_str(), newElement4.c_str(), NULL); + if(NULL == newPath) { + CAF_CM_EXCEPTION_VA5(E_FAIL, + "g_build_filename Failed: %s, %s, %s, %s, %s", + path.c_str(), newElement1.c_str(), newElement2.c_str(), newElement3.c_str(), newElement4.c_str()); + } + + rc = normalizePathForPlatform(newPath); + g_free(newPath); + } + CAF_CM_EXIT; + + return rc; +} + +std::string FileSystemUtils::loadTextFile( + const std::string& path) { + CAF_CM_STATIC_FUNC( "FileSystemUtils", "loadTextFile" ); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(path); + + // Throw an exception if the file doesn't exist. + if (!doesFileExist(path)) { + CAF_CM_EXCEPTIONEX_VA1( + FileNotFoundException, + 0, + "The file '%s' does not exist.", + path.c_str()); + } + + // Read in the contents of the file. Since this is a text file, it's terminated with NULL + // so we needn't pass the length. + GError *gError = NULL; + gchar *fileContents = NULL; + const bool isSuccessful = g_file_get_contents(path.c_str(), &fileContents, NULL, &gError); + + // If the call wasn't successful, throw an exception with the error information. + if(! isSuccessful) { + CAF_CM_VALIDATE_PTR(gError); + + const std::string errorMessage = gError->message; + const int32 errorCode = gError->code; + + g_error_free(gError); + + CAF_CM_EXCEPTIONEX_VA2( + IOException, + errorCode, + "g_file_get_contents Failed: %s File: %s", + errorMessage.c_str(), + path.c_str()); + } + + if (fileContents && ::strlen(fileContents)) { + rc = fileContents; + } + g_free(fileContents); + } + CAF_CM_EXIT; + + return rc; +} + +Cdeqstr FileSystemUtils::loadTextFileIntoColl( + const std::string& path) { + CAF_CM_STATIC_FUNC("FileSystemUtils", "loadTextFileIntoColl"); + CAF_CM_VALIDATE_STRING(path); + + // Throw an exception if the file doesn't exist. + if (!doesFileExist(path)) { + CAF_CM_EXCEPTIONEX_VA1( + FileNotFoundException, + 0, + "The file '%s' does not exist.", + path.c_str()); + } + + std::ifstream fileStream(path.c_str()); + if (! fileStream.is_open()) { + CAF_CM_EXCEPTION_VA1(E_UNEXPECTED, + "Error opening file - %s", path.c_str()); + } + + Cdeqstr rc; + std::string line; + while(std::getline(fileStream, line)) { + rc.push_back(line); + } + + if (fileStream.bad()) { + CAF_CM_EXCEPTION_VA1(E_UNEXPECTED, + "Error reading file - %s", path.c_str()); + } + + return rc; +} + +SmartPtrCDynamicByteArray FileSystemUtils::loadByteFile( + const std::string& path) { + CAF_CM_STATIC_FUNC("FileSystemUtils", "loadByteFile"); + + SmartPtrCDynamicByteArray rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(path); + + // Throw an exception if the file doesn't exist. + if (!doesFileExist(path)) { + CAF_CM_EXCEPTIONEX_VA1( + FileNotFoundException, + 0, + "The file '%s' does not exist.", + path.c_str()); + } + + // Read in the contents of the file. Since this is a text file, it's terminated with NULL + // so we needn't pass the length. + GError *gError = NULL; + gchar *fileContents = NULL; + gsize fileContentsLen = 0; + const bool isSuccessful = g_file_get_contents( + path.c_str(), &fileContents, &fileContentsLen, &gError); + + // If the call wasn't successful, throw an exception with the error information. + if(! isSuccessful) { + CAF_CM_VALIDATE_PTR(gError); + + const std::string errorMessage = gError->message; + const int32 errorCode = gError->code; + + g_error_free(gError); + + CAF_CM_EXCEPTIONEX_VA2( + IOException, + errorCode, + "g_file_get_contents Failed: %s File: %s", + errorMessage.c_str(), + path.c_str()); + } + + if (fileContents && fileContentsLen) { + rc.CreateInstance(); + rc->allocateBytes(static_cast(fileContentsLen)); + rc->memCpy(fileContents, static_cast(fileContentsLen)); + } + g_free(fileContents); + } + CAF_CM_EXIT; + + return rc; +} + +void FileSystemUtils::saveTextFile( + const std::string& outputDir, + const std::string& filename, + const std::string& contents, + const FILE_MODE_TYPE fileMode/* = FILE_MODE_REPLACE*/, + const std::string temporaryFileSuffix/* = ".tmp"*/) { + CAF_CM_STATIC_FUNC_VALIDATE("FileSystemUtils", "saveTextFile"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(outputDir); + CAF_CM_VALIDATE_STRING(filename); + CAF_CM_VALIDATE_STRING(contents); + + const std::string filePath = buildPath(outputDir, filename); + saveTextFile(filePath, contents, fileMode, temporaryFileSuffix); + } + CAF_CM_EXIT; +} + +void FileSystemUtils::saveTextFile( + const std::string& filePath, + const std::string& contents, + const FILE_MODE_TYPE fileMode/* = FILE_MODE_REPLACE*/, + const std::string temporaryFileSuffix/* = ".tmp"*/) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("FileSystemUtils", "saveTextFile"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filePath); + CAF_CM_VALIDATE_STRING(contents); + + saveByteFile(filePath, reinterpret_cast(contents.c_str()), + contents.length(), fileMode, temporaryFileSuffix); + } + CAF_CM_EXIT; +} + +void FileSystemUtils::saveByteFile( + const std::string& filePath, + const SmartPtrCDynamicByteArray& contents, + const FILE_MODE_TYPE fileMode/* = FILE_MODE_REPLACE*/, + const std::string temporaryFileSuffix/* = ".tmp"*/) { + CAF_CM_STATIC_FUNC_VALIDATE("FileSystemUtils", "saveByteFile"); + CAF_CM_VALIDATE_STRING(filePath); + CAF_CM_VALIDATE_SMARTPTR(contents); + // temporaryFileSuffix is optional + + saveByteFile(filePath, contents->getPtr(), contents->getByteCount(), + fileMode, temporaryFileSuffix); +} + +void FileSystemUtils::saveByteFile( + const std::string& filePath, + const byte* contents, + const size_t& contentsLen, + const FILE_MODE_TYPE fileMode/* = FILE_MODE_REPLACE*/, + const std::string temporaryFileSuffix/* = ".tmp"*/) { + CAF_CM_STATIC_FUNC_LOG("FileSystemUtils", "saveByteFile"); + CAF_CM_VALIDATE_STRING(filePath); + CAF_CM_VALIDATE_PTR(contents); + // temporaryFileSuffix is optional + + const std::string fileDir = getDirname(filePath); + if (! doesDirectoryExist(fileDir)) { + createDirectory(fileDir); + } + + bool fileExists = doesFileExist(filePath); + switch (fileMode) { + case FILE_MODE_REPLACE: + if (fileExists) { + CAF_CM_LOG_INFO_VA1("Replacing file - %s", filePath.c_str()); + } + saveFileSafely(filePath, contents, contentsLen, temporaryFileSuffix); + break; + case FILE_MODE_IGNORE: + if (fileExists) { + CAF_CM_LOG_WARN_VA1("Ignoring file - %s", filePath.c_str()); + } else { + saveFileSafely(filePath, contents, contentsLen, temporaryFileSuffix); + } + break; + case FILE_MODE_FAIL: + if (fileExists) { + CAF_CM_EXCEPTION_VA1(ERROR_FILE_EXISTS, "File exists - %s", + filePath.c_str()); + } + saveFileSafely(filePath, contents, contentsLen, temporaryFileSuffix); + break; + } +} + +void FileSystemUtils::saveFileSafely( + const std::string& filePath, + const byte* contents, + const size_t& contentsLen, + const std::string& temporaryFileSuffix) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("FileSystemUtils", "saveFileSafely"); + CAF_CM_VALIDATE_STRING(filePath); + CAF_CM_VALIDATE_PTR(contents); + // temporaryFileSuffix is optional + + CAF_CM_LOG_DEBUG_VA1("Saving to file - %s", filePath.c_str()); + + if (temporaryFileSuffix.empty()) { + saveByteFileRaw(filePath, contents, contentsLen); + } else { + const std::string filePathTmp = filePath + temporaryFileSuffix; + saveByteFileRaw(filePathTmp, contents, contentsLen); + moveFile(filePathTmp, filePath); + } +} + +void FileSystemUtils::saveByteFileRaw( + const std::string& path, + const byte* contents, + const size_t& contentsLen) { + CAF_CM_STATIC_FUNC_LOG("FileSystemUtils", "saveByteFileRaw"); + CAF_CM_VALIDATE_STRING(path); + CAF_CM_VALIDATE_PTR(contents); + + GError *gError = NULL; + const bool isSuccessful = g_file_set_contents( + path.c_str(), reinterpret_cast(contents), contentsLen, &gError); + + // If the call wasn't successful, throw an exception with the error information. + if(! isSuccessful) { + CAF_CM_VALIDATE_PTR(gError); + + const std::string errorMessage = gError->message; + const int32 errorCode = gError->code; + + g_error_free(gError); + + CAF_CM_EXCEPTIONEX_VA2( + IOException, + errorCode, + "g_file_set_contents Failed: %s File: %s", + errorMessage.c_str(), + path.c_str()); + } +} + +FileSystemUtils::DirectoryItems FileSystemUtils::itemsInDirectory( + const std::string& path, + const std::string& regex) { + + CAF_CM_STATIC_FUNC( "FileSystemUtils", "itemsInDirectory" ); + + DirectoryItems rc; + GDir *gDir = NULL; + GError *gError = NULL; + GRegex *gRegex = NULL; + + try { + CAF_CM_VALIDATE_STRING(path); + + if(! doesDirectoryExist(path)) { + CAF_CM_EXCEPTIONEX_VA1( + PathNotFoundException, + 0, + "Directory does not exist: %s", + path.c_str()); + } + + gDir = g_dir_open(path.c_str(), 0, &gError); + if(NULL == gDir) { + const std::string errorMessage = (gError == NULL) ? "" : gError->message; + const int32 errorCode = (gError == NULL) ? 0 : gError->code; + + CAF_CM_EXCEPTIONEX_VA2( + IOException, + errorCode, + "Failed to open directory \"%s\": %s", + path.c_str(), + errorMessage.c_str()); + } + + if(regex.compare(REGEX_MATCH_ALL) != 0) { + gRegex = g_regex_new(regex.c_str(), + (GRegexCompileFlags)(G_REGEX_OPTIMIZE | G_REGEX_RAW), + (GRegexMatchFlags)0, + &gError); + if(gError) { + const std::string errorMessage = gError->message; + const int32 errorCode = gError->code; + + CAF_CM_EXCEPTIONEX_VA2(IOException, errorCode, + "g_regex_new Failed: %s regex: %s", + errorMessage.c_str(), + regex.c_str()); + } + } + + for(const gchar* filename = g_dir_read_name(gDir); + filename != NULL; + filename = g_dir_read_name(gDir)) { + std::string fullPath(path); + fullPath += G_DIR_SEPARATOR_S; + fullPath += filename; + bool isDirectory = g_file_test(fullPath.c_str(), G_FILE_TEST_IS_DIR); + + if (gRegex) { + if (g_regex_match(gRegex, + filename, + (GRegexMatchFlags)0, + NULL)) { + if (isDirectory) { + rc.directories.push_back(filename); + } else { + rc.files.push_back(filename); + } + } + } else { + if (isDirectory) { + rc.directories.push_back(filename); + } else { + rc.files.push_back(filename); + } + } + } + + if(gError != NULL) { + g_error_free(gError); + } + if(gDir != NULL) { + g_dir_close(gDir); + } + if(gRegex != NULL) { + g_regex_unref(gRegex); + } + } + catch(...) { + if(gError != NULL) { + g_error_free(gError); + } + if(gDir != NULL) { + g_dir_close(gDir); + } + if(gRegex != NULL) { + g_regex_unref(gRegex); + } + throw; + } + + return rc; +} + +FileSystemUtils::PathAndDirectoryItemsCollection +FileSystemUtils::recursiveItemsInDirectory(const std::string& path, const std::string& regex) { + PathAndDirectoryItemsCollection rc; + + CAF_CM_ENTER { + DirectoryItems items = itemsInDirectory(path, regex); + rc.push_back(PathAndDirectoryItems(path, items)); + + for (TConstIterator subdir(items.directories); subdir; subdir++) { + std::string subdirPath = buildPath(path, *subdir); + PathAndDirectoryItemsCollection subitems = recursiveItemsInDirectory(subdirPath, regex); + rc.insert(rc.end(), subitems.begin(), subitems.end()); + } + } + CAF_CM_EXIT; + + return rc; +} + +void FileSystemUtils::copyFile(const std::string& srcPath, const std::string& dstPath) { + CAF_CM_STATIC_FUNC_LOG("FileSystemUtils", "copyFile"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(srcPath); + CAF_CM_VALIDATE_STRING(dstPath); + + // Test to make sure the source is a regular file (or symlink to one), not a directory + if (! isRegularFile(srcPath)) { + CAF_CM_EXCEPTIONEX_VA1( + UnsupportedOperationException, + 0, + "Source is not a regular file: %s", + srcPath.c_str()); + } + + const std::string dstDir = getDirname(dstPath); + if (!doesDirectoryExist(dstDir)) { + CAF_CM_EXCEPTIONEX_VA1( + PathNotFoundException, + 0, + "Destination path does not exist: %s", + dstDir.c_str()); + } + +#if defined (__linux__) || defined (__APPLE__) + int32 infd = -1; + int32 outfd = -1; + try { + // Determine the stats of the source file, for use with output file later + struct stat srcStat; + if (::stat(srcPath.c_str(), &srcStat) != 0) { + int32 rc = errno; + CAF_CM_EXCEPTIONEX_VA1( + IOException, + rc, + "::stat %s failed", + srcPath.c_str()); + } + + infd = ::open(srcPath.c_str(), O_RDONLY); + if (infd == -1) { + int32 rc = errno; + CAF_CM_EXCEPTIONEX_VA1( + IOException, + rc, + "Unable to open %s for reading", + srcPath.c_str()); + } + + // Open output file write-only for user, initially, and set to source file's mode bits later + outfd = ::open(dstPath.c_str(), O_WRONLY | O_CREAT, S_IWUSR); + if (outfd == -1) { + int32 rc = errno; + CAF_CM_EXCEPTIONEX_VA1( + IOException, + rc, + "Unable to open %s for writing", + dstPath.c_str()); + } + + // Arbitrary size for the data buffer to use for the copy + const int32 buff_size = 65536; + + byte buffer[buff_size]; + ssize_t index = 0; + // Loop until we've processed the whole file + while (index < srcStat.st_size) { + ssize_t bytesRead = ::read(infd, buffer, buff_size); + if (bytesRead > 0) { + ssize_t writeIndex = 0; + // Loop until we've written out all the buffer + while (writeIndex < bytesRead) { + // If we're part way done, write from where we left off, but with a smaller number of bytes left + ssize_t bytesWritten = ::write(outfd, buffer + writeIndex, bytesRead - writeIndex); + if (bytesWritten < 0) { + int32 rc = errno; + CAF_CM_EXCEPTIONEX_VA2( + IOException, + rc, + "Unable to write to %s (index = %d)", + dstPath.c_str(), + writeIndex); + } + writeIndex += bytesWritten; + } + index += bytesRead; + } else if (bytesRead < 0) { + int32 rc = errno; + CAF_CM_EXCEPTIONEX_VA2( + IOException, + rc, + "Unable to read from %s at offset %d", + srcPath.c_str(), + index); + } + + } + if (outfd != -1) { + // Lastly, update the mode bits on the destination file to be the same as the source + ::fchmod(outfd, srcStat.st_mode); + } + } + CAF_CM_CATCH_ALL; + + if (infd != -1) { + ::close(infd); + } + if (outfd != -1) { + ::close(outfd); + } + CAF_CM_THROWEXCEPTION; +#elif defined(WIN32) + const std::wstring wSrcPath = CStringUtils::convertNarrowToWide(srcPath); + const std::wstring wDstPath = CStringUtils::convertNarrowToWide(dstPath); + BOOL bRc = ::CopyFileW( + wSrcPath.c_str(), + wDstPath.c_str(), + TRUE); + if (!bRc) { + const DWORD lastError = ::GetLastError(); + const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(lastError); + CAF_CM_EXCEPTIONEX_VA3( + IOException, + lastError, + "Failed to copy file %s to %s - %s", + srcPath.c_str(), + dstPath.c_str(), + errorMsg.c_str()); + } +#else +#error not implemented +#endif + } + CAF_CM_EXIT; +} + +void FileSystemUtils::moveFile(const std::string& srcPath, const std::string& dstPath) { + CAF_CM_STATIC_FUNC("FileSystemUtils", "moveFile"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(srcPath); + CAF_CM_VALIDATE_STRING(dstPath); + + if (!doesFileExist(srcPath)) { + CAF_CM_EXCEPTIONEX_VA1( + FileNotFoundException, + 0, + "Source file does not exist: %s", + srcPath.c_str()); + } + if (!doesDirectoryExist(getDirname(dstPath))) { + createDirectory(getDirname(dstPath)); + } + + if (g_rename(srcPath.c_str(), dstPath.c_str()) == -1) { + int32 rc = errno; + CAF_CM_EXCEPTIONEX_VA2( + IOException, + rc, + "Unable to move file %s to %s", + srcPath.c_str(), + dstPath.c_str()); + } + } + CAF_CM_EXIT; +} + +void FileSystemUtils::copyDirectory(const std::string& srcPath, const std::string& dstPath) { + CAF_CM_STATIC_FUNC("FileSystemUtils", "copyDirectory"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(srcPath); + CAF_CM_VALIDATE_STRING(dstPath); + + if(doesDirectoryExist(dstPath)) { + CAF_CM_EXCEPTIONEX_VA1( + IOException, + ERROR_ALREADY_EXISTS, + "Cannot copy into an existing directory: %s", + dstPath.c_str()); + } + createDirectory(dstPath); + + if(!doesDirectoryExist(srcPath)) { + CAF_CM_EXCEPTIONEX_VA1( + PathNotFoundException, + 0, + "Invalid source directory: %s", + srcPath.c_str()); + } + + const DirectoryItems items = itemsInDirectory(srcPath, FileSystemUtils::REGEX_MATCH_ALL); + for (TConstIterator srcFile(items.files); srcFile; srcFile++) { + copyFile(srcPath + G_DIR_SEPARATOR_S + *srcFile, + dstPath + G_DIR_SEPARATOR_S + *srcFile); + } + } + CAF_CM_EXIT; +} + +void FileSystemUtils::recursiveCopyDirectory(const std::string& srcPath, const std::string& dstPath) { + CAF_CM_STATIC_FUNC_VALIDATE("FileSystemUtils", "recursiveCopyDirectory"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(srcPath); + CAF_CM_VALIDATE_STRING(dstPath); + + const DirectoryItems items = itemsInDirectory(srcPath, FileSystemUtils::REGEX_MATCH_ALL); + + // Copy subdirectories first + for (TConstIterator srcDir(items.directories); srcDir; srcDir++) { + copyDirectory(srcPath + G_DIR_SEPARATOR_S + *srcDir, + dstPath + G_DIR_SEPARATOR_S + *srcDir); + } + + // Copy files second + for (TConstIterator srcFile(items.files); srcFile; srcFile++) { + copyFile(srcPath + G_DIR_SEPARATOR_S + *srcFile, + dstPath + G_DIR_SEPARATOR_S + *srcFile); + } + } + CAF_CM_EXIT; +} + +std::string FileSystemUtils::findOptionalFile( + const std::string& directory, + const std::string& filename) { + + CAF_CM_STATIC_FUNC_LOG("FileSystemUtils", "findOptionalFile"); + + std::string rc; + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_STRING(directory); + CAF_CM_VALIDATE_STRING(filename); + + const std::deque files = findOptionalFiles(directory, filename); + if (files.size() == 1) { + rc = files[0]; + } else if (files.size() > 1) { + CAF_CM_EXCEPTION_VA2(ERROR_FILE_EXISTS, + "Found more than one file - directory: %s, filename: %s", + directory.c_str(), filename.c_str()) + } + } + CAF_CM_EXIT; + + return rc; +} + +std::string FileSystemUtils::findRequiredFile( + const std::string& directory, + const std::string& filename) { + + CAF_CM_STATIC_FUNC_LOG("FileSystemUtils", "findRequiredFile"); + + std::string rc; + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_STRING(directory); + CAF_CM_VALIDATE_STRING(filename); + + rc = findOptionalFile(directory, filename); + if (rc.empty()) { + CAF_CM_EXCEPTION_VA2(ERROR_FILE_NOT_FOUND, + "File not found - directory: %s, filename: %s", + directory.c_str(), filename.c_str()) + } + } + CAF_CM_EXIT; + + return rc; +} + +std::deque FileSystemUtils::findOptionalFiles( + const std::string& directory, + const std::string& filename) { + + CAF_CM_STATIC_FUNC_LOG_VALIDATE("FileSystemUtils", "findOptionalFiles"); + + std::deque rc; + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_STRING(directory); + CAF_CM_VALIDATE_STRING(filename); + + PathAndDirectoryItemsCollection pAndDItemsCol = + recursiveItemsInDirectory(directory, REGEX_MATCH_ALL); + for (TConstIterator + pAndDItemsColIter(pAndDItemsCol); pAndDItemsColIter; pAndDItemsColIter++) { + const std::string path = pAndDItemsColIter->path; + const DirectoryItems directoryItems = + pAndDItemsColIter->items; + const Files files = directoryItems.files; + for (TConstIterator fileIter(files); fileIter; fileIter++) { + const std::string filenameCur = *fileIter; + if (filenameCur.compare(filename) == 0) { + const std::string filePath = buildPath(path, filename); + rc.push_back(filePath); + } + } + } + } + CAF_CM_EXIT; + + return rc; +} + +std::deque FileSystemUtils::findRequiredFiles( + const std::string& directory, + const std::string& filename) { + + CAF_CM_STATIC_FUNC_LOG("FileSystemUtils", "findRequiredFiles"); + + std::deque rc; + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_STRING(directory); + CAF_CM_VALIDATE_STRING(filename); + + rc = findOptionalFiles(directory, filename); + if (rc.empty()) { + CAF_CM_EXCEPTION_VA2(ERROR_FILE_NOT_FOUND, + "File not found - directory: %s, filename: %s", + directory.c_str(), filename.c_str()) + } + } + CAF_CM_EXIT; + + return rc; +} + +void FileSystemUtils::chmod( + const std::string &path, + const uint32 mode/* = 0770*/) { + + CAF_CM_STATIC_FUNC_LOG("FileSystemUtils", "chmod"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(path); + + if(! doesFileExist(path)) { + CAF_CM_EXCEPTIONEX_VA1(FileNotFoundException, 0, + "File does not exist: %s", path.c_str()); + } + + // Not using g_chmod on Nix because it hangs. +#ifdef WIN32 + g_chmod(path.c_str(), mode); +#else + const int32 rc = ::chmod(path.c_str(), mode); + if (rc != 0) { + CAF_CM_EXCEPTION_VA1(E_INVALIDARG, + "chmod failed - file: %s, filename: %s", path.c_str()); + } +#endif + } + CAF_CM_EXIT; +} + +std::string FileSystemUtils::normalizePathForPlatform( + const std::string &path) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("FileSystemUtils", "normalizePathForPlatform"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(path); + + rc = path; +#ifdef WIN32 + std::replace(rc.begin(), rc.end(), '/', '\\'); +#else + std::replace(rc.begin(), rc.end(), '\\', '/'); +#endif + } + CAF_CM_EXIT; + + return rc; +} + +std::string FileSystemUtils::normalizePathWithForward( + const std::string &path) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("FileSystemUtils", "normalizePathWithForward"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(path); + + rc = path; + std::replace(rc.begin(), rc.end(), '\\', '/'); + } + CAF_CM_EXIT; + + return rc; +} + +int64 FileSystemUtils::getFileSize(const std::string& filename) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("FileSystemUtils", "getFileSize"); + CAF_CM_VALIDATE_STRING(filename); + + struct stat stat_buf; + int32 rc = ::stat(filename.c_str(), &stat_buf); + return rc == 0 ? stat_buf.st_size : -1; +} + +std::string FileSystemUtils::saveTempTextFile(const std::string& filename_template, const std::string& contents) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("FileSystemUtils", "saveTempTextFile"); + + std::string filename; + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filename_template); + CAF_CM_VALIDATE_STRING(contents); + + filename = FileSystemUtils::getTempFilename(filename_template); + + FileSystemUtils::saveTextFile(filename, contents); + } + CAF_CM_EXIT; + + return filename; +} + +std::string FileSystemUtils::getTempFilename(const std::string& filename_template) { + CAF_CM_STATIC_FUNC("FileSystemUtils", "getTempFilename"); + + std::string filename; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filename_template); + + gchar* allocatedFilename; + GError *gError = NULL; + + int32 fd = g_file_open_tmp(filename_template.c_str(), &allocatedFilename, &gError); + if (fd > 0) { + filename = allocatedFilename; +#ifdef WIN32 + ::_close(fd); +#else + ::close(fd); +#endif + g_free(allocatedFilename); + } + if (gError != NULL) { + const std::string errorMessage = gError->message; + const int32 errorCode = gError->code; + + g_error_free(gError); + + CAF_CM_EXCEPTIONEX_VA2( + IOException, + errorCode, + "g_file_open_tmp Failed: %s Template: %s", + errorMessage.c_str(), + filename_template.c_str()); + } + } + CAF_CM_EXIT; + + return filename; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CFileSystemUtils.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CFileSystemUtils.h new file mode 100644 index 000000000..7c3bac93c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CFileSystemUtils.h @@ -0,0 +1,204 @@ +/* + * Author: bwilliams + * Created: Jan 21, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CFILESYSTEMUTILS_H_ +#define CFILESYSTEMUTILS_H_ + +#include "../Memory/DynamicArray/DynamicArrayInc.h" + +namespace Caf { + +class COMMONAGGREGATOR_LINKAGE FileSystemUtils { +public: + // Helpful typedefs + + // file or directory name only: no path. + typedef std::deque Files; + typedef Files Directories; + + // directory and file names only: no path. + struct DirectoryItems { + DirectoryItems() {}; + DirectoryItems(const Directories& d, const Files& f) : directories(d), files(f) {}; + + Directories directories; + Files files; + }; + + // first is full path to the items in DirectoryItems + struct PathAndDirectoryItems { + PathAndDirectoryItems() {}; + PathAndDirectoryItems(const std::string& p, DirectoryItems& i) : path(p), items(i) {}; + + std::string path; + DirectoryItems items; + }; + + typedef enum { + FILE_MODE_REPLACE, + FILE_MODE_FAIL, + FILE_MODE_IGNORE + } FILE_MODE_TYPE; + + typedef std::deque PathAndDirectoryItemsCollection; + + // Use this constant to match all item names in a directory + static const std::string REGEX_MATCH_ALL; + + static void createDirectory(const std::string &path, const uint32 mode = 0770); + + static void removeDirectory(const std::string& path); + + static void recursiveRemoveDirectory(const std::string& path); + + static void removeFile(const std::string& path); + + static Files removeFilesInDirectory(const std::string& path, const std::string& regex); + + static bool doesFileExist(const std::string& path); + + static bool doesDirectoryExist(const std::string& path); + + static bool isRegularFile(const std::string& path); + + static std::string getCurrentDir(); + + static std::string getCurrentFile(); + + static std::string getBasename(const std::string& path); + + static std::string getDirname(const std::string& path); + + static std::string getTmpDir(); + + static std::string buildPath( + const std::string& path, + const std::string& newElement); + + static std::string buildPath( + const std::string& path, + const std::string& newElement1, + const std::string& newElement2); + + static std::string buildPath( + const std::string& path, + const std::string& newElement1, + const std::string& newElement2, + const std::string& newElement3); + + static std::string buildPath( + const std::string& path, + const std::string& newElement1, + const std::string& newElement2, + const std::string& newElement3, + const std::string& newElement4); + + static std::string loadTextFile( + const std::string& path); + + static Cdeqstr loadTextFileIntoColl( + const std::string& path); + + static SmartPtrCDynamicByteArray loadByteFile( + const std::string& path); + + static void saveTextFile( + const std::string& outputDir, + const std::string& filename, + const std::string& contents, + const FILE_MODE_TYPE fileMode = FILE_MODE_REPLACE, + const std::string temporaryFileSuffix = ".tmp"); + + static void saveTextFile( + const std::string& filePath, + const std::string& contents, + const FILE_MODE_TYPE fileMode = FILE_MODE_REPLACE, + const std::string temporaryFileSuffix = ".tmp"); + + static void saveByteFile( + const std::string& filePath, + const SmartPtrCDynamicByteArray& contents, + const FILE_MODE_TYPE fileMode = FILE_MODE_REPLACE, + const std::string temporaryFileSuffix = ".tmp"); + + static void saveByteFile( + const std::string& filePath, + const byte* contents, + const size_t& contentsLen, + const FILE_MODE_TYPE fileMode = FILE_MODE_REPLACE, + const std::string temporaryFileSuffix = ".tmp"); + + static DirectoryItems itemsInDirectory( + const std::string& path, + const std::string& regex); + + static PathAndDirectoryItemsCollection recursiveItemsInDirectory( + const std::string& path, + const std::string& regex); + + // The caller must ensure that dstPath exists. + static void copyFile(const std::string& srcPath, const std::string& dstPath); + + static void moveFile(const std::string& srcPath, const std::string& dstPath); + + static void copyDirectory(const std::string& srcPath, const std::string& dstPath); + + static void recursiveCopyDirectory(const std::string& srcPath, const std::string& dstPath); + + static std::string findOptionalFile( + const std::string& outputDir, + const std::string& filename); + + static std::string findRequiredFile( + const std::string& outputDir, + const std::string& filename); + + static std::deque findOptionalFiles( + const std::string& outputDir, + const std::string& filename); + + static std::deque findRequiredFiles( + const std::string& outputDir, + const std::string& filename); + + static void chmod( + const std::string &path, + const uint32 mode = 0770); + + static std::string normalizePathForPlatform( + const std::string &path); + + static std::string normalizePathWithForward( + const std::string &path); + + static int64 getFileSize(const std::string& filename); + + static std::string saveTempTextFile(const std::string& filename_template, const std::string& contents); + + static std::string getTempFilename(const std::string& filename_template); + +private: + static void saveFileSafely( + const std::string& filePath, + const byte* contents, + const size_t& contentsLen, + const std::string& temporaryFileSuffix); + + static void saveByteFileRaw( + const std::string& path, + const byte* contents, + const size_t& contentsLen); + + +private: + CAF_CM_DECLARE_NOCREATE(FileSystemUtils); +}; + +} + +#endif /* CFILESYSTEMUTILS_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CHexCodec.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CHexCodec.cpp new file mode 100644 index 000000000..61d75f24a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CHexCodec.cpp @@ -0,0 +1,128 @@ +/* + * Author: mdonahue + * Created: May 24, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CHexCodec.h" +#include +#include + +using namespace Caf; +using namespace std; + +std::string CHexCodec::Encode( + const byte* buffer, + const uint32 bufferSize, + const uint32 pairSpacing, + const uint32 pairsPerLine, + const char lineBreakChar) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CHexCodec", "Encode"); + + stringstream encoding; + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_PTR(buffer); + CAF_CM_VALIDATE_NOTZERO(bufferSize); + + string spacing; + for (uint32 u = 0; u < pairSpacing; ++u) { + spacing += ' '; + } + + uint16 uTest = 1; + byte bTest[2] = { 1, 0 }; + const bool isLittleEndian = (::memcmp(&uTest, bTest, 2) == 0); + uint32 groups = bufferSize >> 2; + uint32 remainder = bufferSize % 4; + encoding.fill('0'); + encoding.setf(ios_base::uppercase); + encoding.setf(ios_base::hex, ios_base::basefield); + uint8 b[4]; + const uint32* uintPtr = reinterpret_cast(buffer); + uint32 pairs = 0; + for (uint32 u = 0; u < groups; ++u) { + if (isLittleEndian) { + b[0] = static_cast(*uintPtr); + b[1] = static_cast(*uintPtr >> 8); + b[2] = static_cast(*uintPtr >> 16); + b[3] = static_cast(*uintPtr >> 24); + } else { + b[0] = static_cast(*uintPtr >> 24); + b[1] = static_cast(*uintPtr >> 16); + b[2] = static_cast(*uintPtr >> 8); + b[3] = static_cast(*uintPtr); + } + + for (uint32 p = 0; p < 4; ++p) { + if (pairSpacing && pairs) { + encoding << spacing; + } + encoding << setw(2) << static_cast(b[p]); + if (pairsPerLine) { + if (0 == (++pairs % pairsPerLine)) { + encoding << lineBreakChar; + pairs = 0; + } + } else { + ++pairs; + } + } + ++uintPtr; + } + + switch (remainder) { + case 0: + break; + case 1: + if (isLittleEndian) { + b[0] = static_cast(*uintPtr); + } else { + b[0] = static_cast(*uintPtr >> 24); + } + break; + case 2: + if (isLittleEndian) { + b[0] = static_cast(*uintPtr); + b[1] = static_cast(*uintPtr >> 8); + } else { + b[0] = static_cast(*uintPtr >> 24); + b[1] = static_cast(*uintPtr >> 16); + } + break; + case 3: + if (isLittleEndian) { + b[0] = static_cast(*uintPtr); + b[1] = static_cast(*uintPtr >> 8); + b[2] = static_cast(*uintPtr >> 16); + } else { + b[0] = static_cast(*uintPtr >> 24); + b[1] = static_cast(*uintPtr >> 16); + b[2] = static_cast(*uintPtr >> 8); + } + break; + } + + for (uint32 p = 0; p < remainder; ++p) { + if (pairSpacing && pairs) { + encoding << spacing; + } + encoding << setw(2) << static_cast(b[p]); + if (pairsPerLine) { + if (0 == (++pairs % pairsPerLine)) { + encoding << lineBreakChar; + pairs = 0; + } + } else { + ++pairs; + } + } + } + CAF_CM_EXIT; + + return encoding.str(); +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CHexCodec.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CHexCodec.h new file mode 100644 index 000000000..575db26e9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CHexCodec.h @@ -0,0 +1,32 @@ +/* + * Author: mdonahue + * Created: May 24, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CHEXCODEC_H_ +#define CHEXCODEC_H_ + +namespace Caf { +class COMMONAGGREGATOR_LINKAGE CHexCodec { +public: + /// Encodes a buffer as a 2 digit per byte string. + /// + /// @param buffer Input buffer + /// @param bufferSize Input buffer length + /// @param pairSpacing Number of spaces to insert between digit pairs + /// @param pairsPerLine Number of pairs to encode per line. 0 = single line output. + /// @param lineBreakChar Character to insert between lines + /// @return A string containing the hex encoding + static std::string Encode( + const byte* buffer, + const uint32 bufferSize, + const uint32 pairSpacing = 0, + const uint32 pairsPerLine = 0, + const char lineBreakChar = '\n'); +}; +} + +#endif /* CHEXCODEC_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CIniFile.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CIniFile.cpp new file mode 100644 index 000000000..c290a2d39 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CIniFile.cpp @@ -0,0 +1,526 @@ +/* + * Author: bwilliams + * Created: May 18, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CIniFile.h" + +using namespace Caf; + +CIniFile::CIniFile() : + _isInitialized(false), + CAF_CM_INIT_LOG("CIniFile") { +} + +CIniFile::~CIniFile() { +} + +void CIniFile::initialize( + const std::string& configFilePath) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(configFilePath); + + _configFilePath = configFilePath; + + _isInitialized = true; +} + +std::deque CIniFile::getSectionCollection() { + CAF_CM_FUNCNAME_VALIDATE("getSectionCollection"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + std::deque sectionCollection; + if (_sectionCollection.empty()) { + _sectionCollection = parse(_configFilePath); + } + + sectionCollection = _sectionCollection; + + return sectionCollection; +} + +std::deque CIniFile::getEntryCollection( + const std::string& sectionName) { + CAF_CM_FUNCNAME_VALIDATE("getEntryCollection"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(sectionName); + + std::deque entryCollection; + if (_sectionCollection.empty()) { + _sectionCollection = parse(_configFilePath); + } + + for (TConstIterator > iniSectionIter(_sectionCollection); + iniSectionIter; iniSectionIter++) { + const SmartPtrSIniSection iniSection = *iniSectionIter; + const std::string sectionNameTmp = iniSection->_sectionName; + + if (sectionNameTmp.compare(sectionName) == 0) { + entryCollection = iniSection->_entryCollection; + } + } + + return entryCollection; +} + +CIniFile::SmartPtrSIniEntry CIniFile::findOptionalEntry( + const std::string& sectionName, + const std::string& keyName) { + CAF_CM_FUNCNAME_VALIDATE("findOptionalEntry"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(sectionName); + CAF_CM_VALIDATE_STRING(keyName); + + CIniFile::SmartPtrSIniEntry iniEntry; + if (_sectionCollection.empty()) { + _sectionCollection = parse(_configFilePath); + } + + for (TConstIterator > iniSectionIter(_sectionCollection); + iniSectionIter; iniSectionIter++) { + const SmartPtrSIniSection iniSection = *iniSectionIter; + const std::string sectionNameTmp = iniSection->_sectionName; + + if (sectionNameTmp.compare(sectionName) == 0) { + for (TConstIterator > iniEntryIter(iniSection->_entryCollection); + iniEntryIter; iniEntryIter++) { + const SmartPtrSIniEntry iniEntryTmp = *iniEntryIter; + const std::string keyNameTmp = iniEntryTmp->_name; + if (keyNameTmp.compare(keyName) == 0) { + iniEntry = iniEntryTmp; + break; + } + } + } + } + + return iniEntry; +} + +CIniFile::SmartPtrSIniEntry CIniFile::findRequiredEntry( + const std::string& sectionName, + const std::string& keyName) { + CAF_CM_FUNCNAME("findRequiredEntry"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(sectionName); + CAF_CM_VALIDATE_STRING(keyName); + + const SmartPtrSIniEntry iniEntry = findOptionalEntry(sectionName, keyName); + if (iniEntry.IsNull()) { + CAF_CM_EXCEPTIONEX_VA2(NoSuchElementException, ERROR_NOT_FOUND, + "Value not found - sectionName: %s, keyName: %s", sectionName.c_str(), keyName.c_str()); + } + + return iniEntry; +} + +std::string CIniFile::findOptionalString( + const std::string& sectionName, + const std::string& keyName) { + CAF_CM_FUNCNAME_VALIDATE("findOptionalString"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(sectionName); + CAF_CM_VALIDATE_STRING(keyName); + + std::string value; + const SmartPtrSIniEntry iniEntry = findOptionalEntry(sectionName, keyName); + if (! iniEntry.IsNull()) { + value = iniEntry->_valueExpanded; + } + + return value; +} + +std::string CIniFile::findRequiredString( + const std::string& sectionName, + const std::string& keyName) { + CAF_CM_FUNCNAME_VALIDATE("findRequiredString"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(sectionName); + CAF_CM_VALIDATE_STRING(keyName); + + const SmartPtrSIniEntry iniEntry = findRequiredEntry(sectionName, keyName); + return iniEntry->_valueExpanded; +} + +std::string CIniFile::findOptionalRawString( + const std::string& sectionName, + const std::string& keyName) { + CAF_CM_FUNCNAME_VALIDATE("findOptionalRawString"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(sectionName); + CAF_CM_VALIDATE_STRING(keyName); + + std::string value; + const SmartPtrSIniEntry iniEntry = findOptionalEntry(sectionName, keyName); + if (! iniEntry.IsNull()) { + value = iniEntry->_valueRaw; + } + + return value; +} + +std::string CIniFile::findRequiredRawString( + const std::string& sectionName, + const std::string& keyName) { + CAF_CM_FUNCNAME_VALIDATE("findRequiredRawString"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(sectionName); + CAF_CM_VALIDATE_STRING(keyName); + + const SmartPtrSIniEntry iniEntry = findRequiredEntry(sectionName, keyName); + return iniEntry->_valueRaw; +} + +void CIniFile::log() { + CAF_CM_FUNCNAME_VALIDATE("log"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + if (_sectionCollection.empty()) { + _sectionCollection = parse(_configFilePath); + } + + for (TConstIterator > iniSectionIter(_sectionCollection); + iniSectionIter; iniSectionIter++) { + const SmartPtrSIniSection iniSection = *iniSectionIter; + CAF_CM_LOG_DEBUG_VA1("Section - %s", iniSection->_sectionName.c_str()); + + for (TConstIterator > iniEntryIter(iniSection->_entryCollection); + iniEntryIter; iniEntryIter++) { + const SmartPtrSIniEntry iniEntry = *iniEntryIter; + CAF_CM_LOG_DEBUG_VA3(" Entry - %s=%s (%s)", + iniEntry->_name.c_str(), iniEntry->_valueRaw.c_str(), iniEntry->_valueExpanded.c_str()); + } + } +} + +void CIniFile::setValue( + const std::string& sectionName, + const std::string& keyName, + const std::string& value) { + CAF_CM_FUNCNAME("setValue"); + + GKeyFile* gKeyFile = NULL; + GError* gError = NULL; + gchar* gFileContents = NULL; + + try { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(sectionName); + CAF_CM_VALIDATE_STRING(keyName); + CAF_CM_VALIDATE_STRING(value); + + try { + gKeyFile = g_key_file_new(); + g_key_file_load_from_file( + gKeyFile, + _configFilePath.c_str(), + G_KEY_FILE_NONE, + &gError); + if (gError != NULL) { + throw gError; + } + + g_key_file_set_string( + gKeyFile, + sectionName.c_str(), + keyName.c_str(), + value.c_str()); + + gFileContents = g_key_file_to_data( + gKeyFile, + NULL, + &gError); + if (gError != NULL) { + throw gError; + } + if (gKeyFile) { + g_key_file_free(gKeyFile); + gKeyFile = NULL; + } + + g_file_set_contents( + _configFilePath.c_str(), + gFileContents, + -1, + &gError); + if (gError != NULL) { + throw gError; + } + + _sectionCollection.clear(); + } catch (GError *gErrorExc) { + CAF_CM_EXCEPTION_VA0(gErrorExc->code, gErrorExc->message); + } + } + CAF_CM_CATCH_CAF + CAF_CM_CATCH_DEFAULT + + try { + if (gKeyFile) { + g_key_file_free(gKeyFile); + } + + if (gError) { + g_error_free(gError); + } + + if (gFileContents) { + g_free(gFileContents); + } + } + CAF_CM_CATCH_DEFAULT + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_THROWEXCEPTION; +} + +void CIniFile::deleteValue( + const std::string& sectionName, + const std::string& keyName) { + CAF_CM_FUNCNAME("deleteValue"); + + GKeyFile* gKeyFile = NULL; + GError* gError = NULL; + gchar* gFileContents = NULL; + + try { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(sectionName); + CAF_CM_VALIDATE_STRING(keyName); + + try { + gKeyFile = g_key_file_new(); + g_key_file_load_from_file( + gKeyFile, + _configFilePath.c_str(), + G_KEY_FILE_NONE, + &gError); + if (gError != NULL) { + throw gError; + } + + g_key_file_remove_key( + gKeyFile, + sectionName.c_str(), + keyName.c_str(), + &gError); + if (gError != NULL) { + throw gError; + } + + gFileContents = g_key_file_to_data( + gKeyFile, + NULL, + &gError); + if (gError != NULL) { + throw gError; + } + if (gKeyFile) { + g_key_file_free(gKeyFile); + gKeyFile = NULL; + } + + g_file_set_contents( + _configFilePath.c_str(), + gFileContents, + -1, + &gError); + if (gError != NULL) { + throw gError; + } + + _sectionCollection.clear(); + } catch (GError *gErrorExc) { + CAF_CM_EXCEPTION_VA0(gErrorExc->code, gErrorExc->message); + } + } + CAF_CM_CATCH_CAF + CAF_CM_CATCH_DEFAULT + + try { + if (gKeyFile) { + g_key_file_free(gKeyFile); + } + + if (gError) { + g_error_free(gError); + } + + if (gFileContents) { + g_free(gFileContents); + } + } + CAF_CM_CATCH_DEFAULT + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_THROWEXCEPTION; +} + +std::deque CIniFile::parse( + const std::string& configFilePath) const { + CAF_CM_FUNCNAME("parse"); + + std::deque iniSectionCollection; + std::deque replacementCollection; + + GKeyFile* gKeyFile = NULL; + gchar** gGroupStrCollection = NULL; + gchar** gKeyStrCollection = NULL; + GError* gError = NULL; + gchar* gValueStr = NULL; + + try { + CAF_CM_VALIDATE_STRING(configFilePath); + + try { + gKeyFile = g_key_file_new(); + g_key_file_load_from_file( + gKeyFile, + configFilePath.c_str(), + G_KEY_FILE_NONE, + &gError); + if (gError != NULL) { + throw gError; + } + + gsize numGroups = 0; + gGroupStrCollection = g_key_file_get_groups(gKeyFile, &numGroups); + for (gsize groupNum = 0; groupNum < numGroups; groupNum++) { + const gchar* gGroupNameStr = gGroupStrCollection[groupNum]; + const std::string groupName = gGroupNameStr; + + SmartPtrSIniSection iniSection; + iniSection.CreateInstance(); + iniSection->_sectionName = groupName; + + gsize numKeys = 0; + gKeyStrCollection = g_key_file_get_keys( + gKeyFile, + gGroupNameStr, + &numKeys, + &gError); + + for (gsize keyNum = 0; keyNum < numKeys; keyNum++) { + const gchar* gKeyNameStr = gKeyStrCollection[keyNum]; + const std::string keyName = gKeyNameStr; + + gValueStr = g_key_file_get_string( + gKeyFile, + gGroupNameStr, + gKeyNameStr, + &gError); + if (gError != NULL) { + throw gError; + } + + std::string valueRaw = gValueStr; + g_free(gValueStr); + gValueStr = NULL; + + std::string valueExpanded; + if (valueRaw.empty()) { + // TODO: Need a way to represent NULL strings as opposed to empty strings. + valueRaw = " "; + valueExpanded = " "; + } else { + valueExpanded = CStringUtils::trim(valueRaw); + valueExpanded = CStringUtils::expandEnv(valueExpanded); + for (TConstIterator > replacementIter(replacementCollection); + replacementIter; replacementIter++ ) { + const SmartPtrSReplacement replacement = *replacementIter; + if (replacement->_regex->isMatched(valueExpanded)) { + valueExpanded = replacement->_regex->replaceLiteral(valueExpanded, replacement->_value); + break; + } + } + + if (groupName.compare("globals") == 0) { + const SmartPtrSReplacement replacement = createReplacement(keyName, valueExpanded); + replacementCollection.push_back(replacement); + } + } + + const SmartPtrSIniEntry iniEntry = createIniEntry(keyName, valueRaw, valueExpanded); + iniSection->_entryCollection.push_back(iniEntry); + } + + iniSectionCollection.push_back(iniSection); + } + } catch (GError *gErrorExc) { + CAF_CM_EXCEPTION_VA0(gErrorExc->code, gErrorExc->message); + } + } + CAF_CM_CATCH_CAF + CAF_CM_CATCH_DEFAULT + + try { + if (gKeyFile) { + g_key_file_free(gKeyFile); + } + + if (gError) { + g_error_free(gError); + } + + if (gGroupStrCollection) { + g_strfreev(gGroupStrCollection); + } + + if (gKeyStrCollection) { + g_strfreev(gKeyStrCollection); + } + + if (gValueStr) { + g_free(gValueStr); + } + } + CAF_CM_CATCH_DEFAULT + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_THROWEXCEPTION; + + return iniSectionCollection; +} + +CIniFile::SmartPtrSReplacement CIniFile::createReplacement( + const std::string& keyName, + const std::string& value) const { + CAF_CM_FUNCNAME_VALIDATE("createReplacement"); + CAF_CM_VALIDATE_STRING(keyName); + + std::string pattern("\\$\\{"); + pattern += keyName; + pattern += "\\}"; + + SmartPtrCCafRegex regex; + regex.CreateInstance(); + regex->initialize(pattern); + + SmartPtrSReplacement replacement; + replacement.CreateInstance(); + replacement->_regex = regex; + replacement->_value = value; + + return replacement; +} + +CIniFile::SmartPtrSIniEntry CIniFile::createIniEntry( + const std::string& keyName, + const std::string& valueRaw, + const std::string& valueExpanded) const { + CAF_CM_FUNCNAME_VALIDATE("createIniEntry"); + CAF_CM_VALIDATE_STRING(keyName); + CAF_CM_VALIDATE_STRING(valueRaw); + CAF_CM_VALIDATE_STRING(valueExpanded); + + SmartPtrSIniEntry iniEntry; + iniEntry.CreateInstance(); + iniEntry->_name = keyName; + iniEntry->_valueRaw = valueRaw; + iniEntry->_valueExpanded = valueExpanded; + + return iniEntry; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CIniFile.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CIniFile.h new file mode 100644 index 000000000..6d09e27bf --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CIniFile.h @@ -0,0 +1,116 @@ +/* + * Author: bwilliams + * Created: May 18, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CINIFILE_H_ +#define CINIFILE_H_ + +namespace Caf { + +class COMMONAGGREGATOR_LINKAGE CIniFile { +public: + struct SIniEntry { + std::string _name; + std::string _valueRaw; + std::string _valueExpanded; + }; + CAF_DECLARE_SMART_POINTER(SIniEntry); + + struct SIniSection { + std::string _sectionName; + std::deque _entryCollection; + }; + CAF_DECLARE_SMART_POINTER(SIniSection); + +public: + CIniFile(); + virtual ~CIniFile(); + +public: + void initialize(const std::string& configFilePath); + + std::deque getSectionCollection(); + + std::deque getEntryCollection( + const std::string& sectionName); + + SmartPtrSIniEntry findOptionalEntry( + const std::string& sectionName, + const std::string& keyName); + + SmartPtrSIniEntry findRequiredEntry( + const std::string& sectionName, + const std::string& keyName); + + std::string findOptionalString( + const std::string& sectionName, + const std::string& keyName); + + std::string findRequiredString( + const std::string& sectionName, + const std::string& keyName); + + std::string findOptionalRawString( + const std::string& sectionName, + const std::string& keyName); + + std::string findRequiredRawString( + const std::string& sectionName, + const std::string& keyName); + + void log(); + + void setValue( + const std::string& sectionName, + const std::string& keyName, + const std::string& value); + + void deleteValue( + const std::string& sectionName, + const std::string& keyName); + +private: + struct SReplacement { + SmartPtrCCafRegex _regex; + std::string _value; + }; + CAF_DECLARE_SMART_POINTER(SReplacement); + +private: + std::deque parse( + const std::string& configFilePath) const; + + SmartPtrSReplacement createReplacement( + const std::string& keyName, + const std::string& value) const; + + SmartPtrSIniEntry createIniEntry( + const std::string& keyName, + const std::string& valueRaw, + const std::string& valueExpanded) const; + + void parseValuePath( + const std::string& valuePath, + std::string& valueName, + std::string& valueValue); + +private: + bool _isInitialized; + std::string _configFilePath; + std::deque _sectionCollection; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CIniFile); +}; + +CAF_DECLARE_SMART_POINTER(CIniFile); + +} + +#endif /* CINIFILE_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CLoggingSetter.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CLoggingSetter.cpp new file mode 100644 index 000000000..7eb400ec9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CLoggingSetter.cpp @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2004-2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CLoggingSetter.h" + +using namespace Caf; + +//////////////////////////////////////////////////////////////////////// +// +// CLoggingSetter::CLoggingSetter() +// +//////////////////////////////////////////////////////////////////////// +CLoggingSetter::CLoggingSetter() : + _isInitialized(false), + CAF_CM_INIT_LOG("CLoggingSetter") { +} + +//////////////////////////////////////////////////////////////////////// +// +// CLoggingSetter::~CLoggingSetter() +// +//////////////////////////////////////////////////////////////////////// +CLoggingSetter::~CLoggingSetter() { + CAF_CM_FUNCNAME("~CLoggingSetter"); + + try { + if (_isInitialized) { + CAF_CM_LOG_DEBUG_VA0("Resetting log config dir"); + CLoggingUtils::resetConfigFile(); + CAF_CM_LOG_DEBUG_VA0("Reset log config dir"); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_CLEAREXCEPTION; +} + +//////////////////////////////////////////////////////////////////////// +// +// CLoggingSetter::Initialize() +// +//////////////////////////////////////////////////////////////////////// +void CLoggingSetter::initialize(const std::string& logDir) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(logDir); + + CAF_CM_LOG_DEBUG_VA1("Setting log config dir - %s", logDir.c_str()); + CLoggingUtils::setLogDir(logDir); + CAF_CM_LOG_DEBUG_VA1("Set log config dir - %s", logDir.c_str()); + + _isInitialized = true; + } + CAF_CM_EXIT; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CLoggingSetter.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CLoggingSetter.h new file mode 100644 index 000000000..f61deaf3d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CLoggingSetter.h @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2004-2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CLoggingSetter_h_ +#define CLoggingSetter_h_ + +namespace Caf { + +class COMMONAGGREGATOR_LINKAGE CLoggingSetter { +public: + CLoggingSetter(); + virtual ~CLoggingSetter(); + +public: + void initialize(const std::string& logDir); + +private: + bool _isInitialized; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CLoggingSetter); +}; + +CAF_DECLARE_SMART_POINTER(CLoggingSetter); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CLoggingUtils.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CLoggingUtils.cpp new file mode 100644 index 000000000..35b681e28 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CLoggingUtils.cpp @@ -0,0 +1,192 @@ +/*k + * Author: bwilliams + * Created: Jan 21, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CLoggingUtils.h" +#include +#include + +using namespace Caf; + +GRecMutex CLoggingUtils::_sOpMutex; +SmartPtrCLoggingUtils CLoggingUtils::_sInstance; + +bool CLoggingUtils::isConsoleAppenderUsed() { + bool rc = false; + + const log4cpp::AppenderSet appenders = + log4cpp::Category::getRoot().getAllAppenders(); + for (log4cpp::AppenderSet::const_iterator iter = appenders.begin(); + (iter != appenders.end() && !rc); iter++) { + const log4cpp::Appender* appender = *iter; + rc = CStringUtils::isEqualIgnoreCase(appender->getName(), "console"); + } + + return rc; +} + +void CLoggingUtils::setStartupConfigFile() { + setStartupConfigFile("log4cpp_config"); +} + +void CLoggingUtils::setStartupConfigFile(const std::string& configFile) { + CAF_CM_STATIC_FUNC("CLoggingUtils", "setStartupConfigFile"); + +#ifndef WIN32 + char configFileFullBuf[ 32768 ]; + ::realpath(configFile.c_str(), configFileFullBuf); + const std::string configFileFull = configFileFullBuf; +#else + wchar_t w_configFileFullBuf[ 32768 ]; + const std::wstring w_configFile = CStringUtils::convertNarrowToWide(configFile.c_str()); + DWORD dwResult = GetFullPathName(w_configFile.c_str(), 32768, w_configFileFullBuf, NULL); + // Convert the string back to narrow + const std::string configFileFull = CStringUtils::convertWideToNarrow(std::wstring(w_configFileFullBuf, dwResult)); +#endif + + if (!FileSystemUtils::doesFileExist(configFileFull)) { + CAF_CM_EXCEPTION_VA1(ERROR_FILE_NOT_FOUND, "Config file does not exist - %s", configFileFull.c_str()); + } + + CAutoMutexLockUnlockRaw oLock(&_sOpMutex); + if (_sInstance.IsNull()) { + _sInstance.CreateInstance(); + } + _sInstance->_configFile = configFileFull; + _sInstance->loadProperties(); + + _sInstance->loadConfig(configFileFull); +} + +SmartPtrCLoggingUtils CLoggingUtils::getInstance() { + CAF_CM_STATIC_FUNC("CLoggingUtils", "getInstance"); + + CAutoMutexLockUnlockRaw oLock(&_sOpMutex); + if (!_sInstance) { + CAF_CM_EXCEPTION_VA0(ERROR_INVALID_STATE, "Config file not set"); + } + + return _sInstance; +} + +CLoggingUtils::CLoggingUtils() : + CAF_CM_INIT_LOG("CLoggingUtils") { +} + +void CLoggingUtils::loadConfig(const std::string& configFile) { + CAF_CM_STATIC_FUNC_LOG("CLoggingUtils", "loadConfig"); + CAF_CM_VALIDATE_STRING(configFile); + + if (!FileSystemUtils::doesFileExist(configFile)) { + CAF_CM_EXCEPTION_VA1(ERROR_FILE_NOT_FOUND, "Config file does not exist - %s", configFile.c_str()); + } + + // Make sure existing unmanaged appenders are cleaned up + std::vector* categories = log4cpp::Category::getCurrentCategories(); + for (std::vector::const_iterator catIter = categories->begin(); + catIter != categories->end(); catIter++) { + log4cpp::Category* category = *catIter; + log4cpp::AppenderSet appenders = category->getAllAppenders(); + for (log4cpp::AppenderSet::const_iterator appIter = appenders.begin(); appIter != appenders.end(); appIter++) { + log4cpp::Appender* appender = *appIter; + if (!category->ownsAppender(appender)) { + // Appender lifecycle is NOT managed by the category...need to manually delete + // First remove the appender before another thread attempts to access it during logging + category->removeAppender(appender); + delete appender; + } + } + } + + // Use property configurator to load configuration file..to set up configured Categories and Appenders + try { + log4cpp::PropertyConfigurator::configure(configFile); + } catch (log4cpp::ConfigureFailure e) { + std::cout << "Log4cpp Error: " << e.what() << std::endl; + } + + CAF_CM_LOG_DEBUG_VA1("Using log config file - %s", configFile.c_str()); +} + +std::string CLoggingUtils::getConfigFile() { + return getInstance()->_configFile; +} + +void CLoggingUtils::resetConfigFile() { + loadConfig(getInstance()->_configFile); +} + +void CLoggingUtils::setLogDir(const std::string& logDir) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CLoggingUtils", "setLogDir"); + CAF_CM_VALIDATE_STRING(logDir); + + if (!FileSystemUtils::doesDirectoryExist(logDir)) { + CAF_CM_LOG_INFO_VA1("Creating log dir - %s", logDir.c_str()); + FileSystemUtils::createDirectory(logDir); + } + + // Create a temporary file for storing the new config + std::string tmpFileName = FileSystemUtils::buildPath(logDir, "log4cpp_config_tmp"); + static const std::string SRCH_STR = ".fileName"; + static const size_t SRCH_STR_SIZE = SRCH_STR.length(); + + std::ofstream tmpCfg(tmpFileName.c_str(), std::ios_base::out | std::ios_base::trunc); + PropertyMap src = getInstance()->_properties; + for (PropertyMap::const_iterator iter = src.begin(); iter != src.end(); iter++) { + tmpCfg << (*iter).first << "="; + if (iter->first.rfind(SRCH_STR) == iter->first.length() - SRCH_STR_SIZE) { + const std::string basename = FileSystemUtils::getBasename(iter->second); + tmpCfg << FileSystemUtils::buildPath(logDir, basename); + } else { + tmpCfg << (*iter).second; + } + tmpCfg << std::endl; + } + tmpCfg.close(); + + loadConfig(tmpFileName); + FileSystemUtils::removeFile(tmpFileName); +} + +void CLoggingUtils::loadProperties() { + CAF_CM_FUNCNAME_VALIDATE("loadProperties"); + CAF_CM_VALIDATE_STRING(_configFile); + _properties.clear(); + + static const size_t BUFF_SIZE = 2048; + char buffer[BUFF_SIZE]; + + std::string line, property, name, value, prefix; + size_t pos = 0; + + std::ifstream properties(_configFile.c_str()); + while (properties.getline(buffer, BUFF_SIZE)) { + line = CStringUtils::trim(buffer); + + // Check for comment. If at beginning, ignore whole line. If not, extract portion up to comment + pos = line.find('#'); + if (pos == std::string::npos) { + property = line; + } else if (pos > 0) { + property = line.substr(0, pos); + } else { + continue; + } + + // Parse the property into name/value + pos = property.find('='); + if (pos != std::string::npos) { + name = CStringUtils::trim(property.substr(0, pos)); + value = CStringUtils::trim(property.substr(pos + 1, property.size() - pos)); + + _properties[name] = value; + } else { + continue; + } + } +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CLoggingUtils.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CLoggingUtils.h new file mode 100644 index 000000000..280b1ca31 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CLoggingUtils.h @@ -0,0 +1,58 @@ +/* + * Author: bwilliams + * Created: Jan 21, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CLoggingUtils_H_ +#define CLoggingUtils_H_ + +#ifndef WIN32 +#include +#endif + +namespace Caf { + +class CLoggingUtils; +CAF_DECLARE_SMART_POINTER(CLoggingUtils); + +class COMMONAGGREGATOR_LINKAGE CLoggingUtils { +private: + typedef std::map PropertyMap; + +public: + static bool isConsoleAppenderUsed(); + static void setStartupConfigFile(); + static void setStartupConfigFile(const std::string& configFile); + static std::string getConfigFile(); + static void resetConfigFile(); + static void setLogDir(const std::string& logDir); + +public: + CLoggingUtils(); + +private: + static SmartPtrCLoggingUtils getInstance(); + + static void loadConfig(const std::string& configFile); + + void loadProperties(); + +private: + static GRecMutex _sOpMutex; + static SmartPtrCLoggingUtils _sInstance; + + std::string _configFile; + PropertyMap _properties; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CLoggingUtils); +}; + +} + +#endif /* CLoggingUtils_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CManagedThreadPool.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CManagedThreadPool.cpp new file mode 100644 index 000000000..6402bd262 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CManagedThreadPool.cpp @@ -0,0 +1,392 @@ +/* + * Created on: May 9, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CManagedThreadPool.h" + +namespace Caf { + +class TaskWrapper : public CManagedThreadPool::IThreadTask { +public: + typedef enum { + StateInactive, + StateActive, + StateFinishedComplete, + StateFinishedIncomplete + } EnumState; + +public: + TaskWrapper(); + virtual ~TaskWrapper(); + + void init(const CManagedThreadPool::SmartPtrIThreadTask& task); + + void setState(EnumState state); + + EnumState getState() const; + +public: // IThreadTask + bool run(); + +private: + CManagedThreadPool::SmartPtrIThreadTask _task; + EnumState _state; + +private: + CAF_CM_CREATE_THREADSAFE; + CAF_CM_DECLARE_NOCOPY(TaskWrapper); + +}; +CAF_DECLARE_SMART_POINTER(TaskWrapper); + +} + +using namespace Caf; + +uint32 CManagedThreadPool::DEFAULT_TASK_UPDATE_INTERVAL = 333; + +CManagedThreadPool::CManagedThreadPool() : + _isInitialized(false), + _isShuttingDown(false), + _threadPool(NULL), + _workerThread(NULL), + _taskUpdateInterval(DEFAULT_TASK_UPDATE_INTERVAL), + CAF_CM_INIT_LOG("CManagedThreadPool") { + CAF_CM_INIT_THREADSAFE; +} + +CManagedThreadPool::~CManagedThreadPool() { + CAF_CM_FUNCNAME_VALIDATE("~CManagedThreadPool"); + + if (_threadPool || _workerThread || _tasks.size()) { + const char* poolName = _poolName.empty() ? "" : _poolName.c_str(); + CAF_CM_LOG_ERROR_VA1( + "[poolName=%s] Destroying thread pool but it is " + "still active. You really should call term() first.", + poolName); + + CAF_CM_LOG_DEBUG_VA1("[poolName=%s] Setting shutdown flag", poolName); + _isShuttingDown = true; + + if (_workerThread) { + CAF_CM_LOG_DEBUG_VA1("[poolName=%s] Waiting for worker thread to stop", poolName); + g_thread_join(_workerThread); + } + + if (_threadPool) { + CAF_CM_LOG_DEBUG_VA1("[poolName=%s] Waiting for thread pool to stop", poolName); + g_thread_pool_free( + _threadPool, + TRUE, /* immediate - do not schedule any more tasks to threads */ + TRUE /* wait - wait for currently running tasks to finish */ ); + } + + CAF_CM_LOG_DEBUG_VA2( + "[poolName=%s] Pool has shut down. Releasing %d tasks", + poolName, + _tasks.size()); + for (TConstIterator task(_tasks); task; task++) { + (*task)->Release(); + } + } +} + +void CManagedThreadPool::init( + const std::string& poolName, + uint32 threadCount, + uint32 taskUpdateInterval) { + CAF_CM_FUNCNAME("init"); + CAF_CM_VALIDATE_STRING(poolName); + CAF_CM_VALIDATE_NOTZERO(threadCount); + + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _poolName = poolName; + if (taskUpdateInterval) { + _taskUpdateInterval = taskUpdateInterval; + } + + GError *error = NULL; + _threadPool = g_thread_pool_new( + taskWorkerFunc, + NULL, + threadCount, + TRUE, + &error); + if (error) { + CAF_CM_THROW_GERROR(error); + } + _workerThread = CThreadUtils::startJoinable( + poolWorkerFunc, + this); + _isInitialized = true; +} + +void CManagedThreadPool::term() { + CAF_CM_FUNCNAME("term"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_LOCK_UNLOCK; + + if (g_thread_self() == _workerThread) { + CAF_CM_EXCEPTIONEX_VA1(IllegalStateException, ERROR_INVALID_STATE, "Must terminate the worker thread from a different thread - %p", _workerThread); + } + + CAF_CM_LOG_DEBUG_VA1("[poolName=%s] Setting shutdown flag", _poolName.c_str()); + _isShuttingDown = true; + + CAF_CM_LOG_DEBUG_VA2("[poolName=%s] Waiting for worker thread to stop - workerThread: %p", _poolName.c_str(), _workerThread); + GThread* workerThread = _workerThread; + { + CAF_CM_UNLOCK_LOCK; + g_thread_join(workerThread); + } + _workerThread = NULL; + + CAF_CM_LOG_DEBUG_VA1("[poolName=%s] Waiting for thread pool to stop", _poolName.c_str()); + GThreadPool* threadPool = _threadPool; + { + CAF_CM_UNLOCK_LOCK; + g_thread_pool_free( + threadPool, + TRUE, /* immediate - do not schedule any more tasks to threads */ + TRUE /* wait - wait for currently running tasks to finish */ ); + } + _threadPool = NULL; + + CAF_CM_LOG_DEBUG_VA2( + "[poolName=%s] Pool has shut down. Releasing %d tasks", + _poolName.c_str(), + _tasks.size()); + const TaskSet tasks = _tasks; + { + CAF_CM_UNLOCK_LOCK; + for (TConstIterator task(tasks); task; task++) { + (*task)->Release(); + } + } + _tasks.clear(); +} + +void CManagedThreadPool::enqueue(const SmartPtrIThreadTask& task) { + CAF_CM_FUNCNAME("enqueue"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(task); + CAF_CM_LOCK_UNLOCK; + SmartPtrTaskWrapper taskWrapper; + taskWrapper.CreateInstance(); + taskWrapper->init(task); + if (!_tasks.insert(taskWrapper.GetAddRefedInterface()).second) { + // This should not be possible! + taskWrapper->Release(); + CAF_CM_EXCEPTIONEX_VA1( + DuplicateElementException, + 0, + "[poolName=%s] An attempt was made to add a task object with an " + "address equal to that of an existing object. " + "This should not be possible. Please report this bug.", + _poolName.c_str()); + } +} + +void CManagedThreadPool::enqueue(const TaskDeque& tasks) { + CAF_CM_FUNCNAME("enqueue"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_LOCK_UNLOCK; + for (TSmartConstIterator task(tasks); task; task++) { + SmartPtrTaskWrapper taskWrapper; + taskWrapper.CreateInstance(); + taskWrapper->init(*task); + if (!_tasks.insert(taskWrapper.GetAddRefedInterface()).second) { + // This should not be possible! + taskWrapper->Release(); + CAF_CM_EXCEPTIONEX_VA1( + DuplicateElementException, + 0, + "[poolName=%s] An attempt was made to add a task object with an " + "address equal to that of an existing object. " + "This should not be possible. Please report this bug.", + _poolName.c_str()); + } + } +} + +CManagedThreadPool::Stats CManagedThreadPool::getStats() const { + CAF_CM_FUNCNAME_VALIDATE("getStats"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_LOCK_UNLOCK; + Stats stats = { 0, 0, 0, 0, 0 }; + stats.taskCount = static_cast(_tasks.size()); + for (TConstIterator task(_tasks); task; task++) { + TaskWrapper *taskWrapper = reinterpret_cast(*task); + switch (taskWrapper->getState()) { + case TaskWrapper::StateActive: + ++stats.activeTaskCount; + break; + + case TaskWrapper::StateInactive: + ++stats.inactiveTaskCount; + break; + + case TaskWrapper::StateFinishedComplete: + ++stats.completeTaskCount; + break; + + case TaskWrapper::StateFinishedIncomplete: + ++stats.incompleteTaskCount; + break; + } + } + return stats; +} + +gpointer CManagedThreadPool::poolWorkerFunc(gpointer context) { + CAF_CM_STATIC_FUNC_LOG("CManagedThreadPool", "poolWorkerFunc"); + try { + CAF_CM_VALIDATE_PTR(context); + CManagedThreadPool *pool = reinterpret_cast(context); + pool->runPool(); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + return NULL; +} + +void CManagedThreadPool::runPool() { + CAF_CM_FUNCNAME("runPool"); + CAF_CM_LOCK_UNLOCK; + + CAF_CM_LOG_DEBUG_VA1("[poolName=%s] Starting runPool() thread", _poolName.c_str()); + while (!_isShuttingDown) { + TaskSet tasksToRun; + TaskSet tasksRemoved; + + try { + // Move inactive tasks to the thread pool + for (TConstIterator task(_tasks); + !_isShuttingDown && task; + task++) { + TaskWrapper* taskWrapper = reinterpret_cast(*task); + if (TaskWrapper::StateInactive == taskWrapper->getState()) { + taskWrapper->setState(TaskWrapper::StateActive); + GError *error = NULL; + g_thread_pool_push( + _threadPool, + taskWrapper, + &error); + if (error) { + taskWrapper->setState(TaskWrapper::StateInactive); + CAF_CM_LOG_ERROR_VA3( + "[poolName=%s] Unable to add task to tread pool. " + "[%d][%s]", + _poolName.c_str(), + error->code, + error->message); + g_error_free(error); + error = NULL; + } + } + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + + try { + // Handle finished tasks. The tasks may switch from Active to + // FinishedComplete or FinishedIncomplete while we are reading the + // state. That's okay - we'll just catch it on the next go-round. + // + // The alternative is to protect the state variable in the task wrapper + // with a critical section. Seems kind of expensive for something that + // isn't really a problem or time-critical. + // + // Also using naked iterators here since I'm updating the task set. + TaskSet::iterator task = _tasks.begin(); + while (!_isShuttingDown && (task != _tasks.end())) { + TaskWrapper* taskWrapper = reinterpret_cast(*task); + if (TaskWrapper::StateFinishedComplete == taskWrapper->getState()) { + TaskSet::iterator toErase = task; + ++task; + _tasks.erase(toErase); + taskWrapper->Release(); + } else if (TaskWrapper::StateFinishedIncomplete == taskWrapper->getState()) { + taskWrapper->setState(TaskWrapper::StateInactive); + ++task; + } else { + ++task; + } + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + + const uint32 taskUpdateInterval = _taskUpdateInterval; + { + CAF_CM_UNLOCK_LOCK; + CThreadUtils::sleep(taskUpdateInterval); + } + } + CAF_CM_LOG_DEBUG_VA1("[poolName=%s] Leaving runPool() thread", _poolName.c_str()); +} + +void CManagedThreadPool::taskWorkerFunc(gpointer threadContext, gpointer) { + CAF_CM_STATIC_FUNC_LOG("TaskWorkerFunc", "taskWorkerFunc"); + // Don't want to segfault so I'll test threadContext even though + // it *cannot* be NULL. If it is we are in really bad shape! + try { + CAF_CM_VALIDATE_PTR(threadContext); + + TaskWrapper *task = reinterpret_cast(threadContext); + bool complete = false; + try { + complete = task->run(); + } + CAF_CM_CATCH_ALL; + if (CAF_CM_ISEXCEPTION) { + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + task->setState(TaskWrapper::StateFinishedComplete); + } else { + task->setState(complete ? + TaskWrapper::StateFinishedComplete : + TaskWrapper::StateFinishedIncomplete); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; +} + +TaskWrapper::TaskWrapper() : + _state(StateInactive) { + CAF_CM_INIT_THREADSAFE; +} + +TaskWrapper::~TaskWrapper() { +} + +void TaskWrapper::init(const CManagedThreadPool::SmartPtrIThreadTask& task) { + _task = task; +} + +void TaskWrapper::setState(EnumState state) { + CAF_CM_LOCK_UNLOCK; + _state = state; +} + +TaskWrapper::EnumState TaskWrapper::getState() const { + CAF_CM_LOCK_UNLOCK; + return _state; +} + +bool TaskWrapper::run() { + return _task->run(); +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CManagedThreadPool.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CManagedThreadPool.h new file mode 100644 index 000000000..a19f211ee --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CManagedThreadPool.h @@ -0,0 +1,123 @@ +/* + * Created on: May 9, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CMANAGEDTHREADPOOL_H_ +#define CMANAGEDTHREADPOOL_H_ + +namespace Caf { + +/** + * @author mdonahue + * @brief This class wraps a GThreadPool and makes it a bit more friendly to use. It + * also allows tasks to partially complete and be requeued. + * The shutdown behavior is to wait for all active tasks to finish. Inactive + * (unscheduled) tasks will be aborted. + */ +class COMMONAGGREGATOR_LINKAGE CManagedThreadPool { +public: + /** + * @brief Interface for task objects + */ + struct __declspec(novtable) IThreadTask : public ICafObject { + /** + * @brief execute task + * @retval true the task has completed its work and will be removed from the pool + * @retval false the task has not completed its work and will be requeued in the pool + */ + virtual bool run() = 0; + }; + CAF_DECLARE_SMART_INTERFACE_POINTER(IThreadTask); + typedef std::deque TaskDeque; + +public: + CManagedThreadPool(); + virtual ~CManagedThreadPool(); + + /** + * @brief initialize the thread pool + * @param poolName a friendly name for the pool to aid in debugging + * @param threadCount the number of task threads + * @param taskUpdateInterval optional task queue refresh rate in milliseconds + */ + void init( + const std::string& poolName, + uint32 threadCount, + uint32 taskUpdateInterval = 0); + + /** + * @brief terminate the thread pool + * All active tasks will be allowed to finish before this method returns + */ + void term(); + + /** + * @brief add a task to the pool + * @param task the task to add + */ + void enqueue(const SmartPtrIThreadTask& task); + + /** + * @brief add a collection of tasks to the pool + * @param tasks the tasks to add + */ + void enqueue(const TaskDeque& tasks); + + /** @brief A simple structure to report some statistics + * + */ + struct Stats { + /** The number of tasks under management */ + uint32 taskCount; + + /** The number of tasks waiting to be assigned to threads for execution */ + uint32 inactiveTaskCount; + + /** The number of tasks assigned to threads for execution */ + uint32 activeTaskCount; + + /** The number of tasks that have completed execution */ + uint32 completeTaskCount; + + /** The number of tasks that have executed but need to be requeued */ + uint32 incompleteTaskCount; + }; + + /** @return the current statistics */ + Stats getStats() const; + +private: + static gpointer poolWorkerFunc(gpointer context); + static void taskWorkerFunc(gpointer threadContext, gpointer NOT_USED); + +private: + void runPool(); + +private: + /** Default task update interval in milliseconds */ + static uint32 DEFAULT_TASK_UPDATE_INTERVAL; + +private: + bool _isInitialized; + volatile bool _isShuttingDown; + std::string _poolName; + GThreadPool *_threadPool; + typedef std::set TaskSet; + TaskSet _tasks; + GThread* _workerThread; + uint32 _taskUpdateInterval; + + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_CREATE_THREADSAFE; + CAF_CM_DECLARE_NOCOPY(CManagedThreadPool); +}; +CAF_DECLARE_SMART_POINTER(CManagedThreadPool); + +} + +#endif /* CMANAGEDTHREADPOOL_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CPersistenceUtils.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CPersistenceUtils.cpp new file mode 100644 index 000000000..07e99b4ae --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CPersistenceUtils.cpp @@ -0,0 +1,437 @@ +/*k + * Author: bwilliams + * Created: Nov 25, 2015 + * + * Copyright (c) 2015 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CPersistenceUtils.h" + +using namespace Caf; + +SmartPtrCPersistenceDoc CPersistenceUtils::loadPersistence( + const std::string& persistenceDir) { + CAF_CM_STATIC_FUNC_VALIDATE("CPersistenceUtils", "loadPersistence"); + CAF_CM_VALIDATE_STRING(persistenceDir); + + SmartPtrCPersistenceDoc persistence; + persistence.CreateInstance(); + persistence->initialize( + loadLocalSecurity(persistenceDir), + loadRemoteSecurityCollection(persistenceDir), + loadPersistenceProtocol(persistenceDir)); + + return persistence; +} + +SmartPtrCLocalSecurityDoc CPersistenceUtils::loadLocalSecurity( + const std::string& persistenceDir) { + CAF_CM_STATIC_FUNC_VALIDATE("CPersistenceUtils", "loadLocalSecurity"); + CAF_CM_VALIDATE_STRING(persistenceDir); + + const std::string localDir = FileSystemUtils::buildPath(persistenceDir, "local"); + + SmartPtrCLocalSecurityDoc localSecurity; + localSecurity.CreateInstance(); + localSecurity->initialize( + loadTextFile(localDir, "localId.txt"), + loadTextFile(localDir, "privateKey.pem"), + loadTextFile(localDir, "cert.pem"), + FileSystemUtils::buildPath(localDir, "privateKey.pem"), + FileSystemUtils::buildPath(localDir, "cert.pem")); + + return localSecurity; +} + +SmartPtrCRemoteSecurityCollectionDoc CPersistenceUtils::loadRemoteSecurityCollection( + const std::string& persistenceDir) { + CAF_CM_STATIC_FUNC_VALIDATE("CPersistenceUtils", "loadRemoteSecurityCollection"); + CAF_CM_VALIDATE_STRING(persistenceDir); + + const std::string remoteDir = FileSystemUtils::buildPath(persistenceDir, "remote"); + + std::deque remoteSecurityCollectionInner; + if (FileSystemUtils::doesDirectoryExist(remoteDir)) { + FileSystemUtils::DirectoryItems remoteItems = FileSystemUtils::itemsInDirectory( + remoteDir, FileSystemUtils::REGEX_MATCH_ALL); + for (TConstIterator remoteIter(remoteItems.directories); remoteIter; remoteIter++) { + const std::string remoteId = *remoteIter; + const std::string remoteIdDir = FileSystemUtils::buildPath(remoteDir, remoteId); + const std::string cmsCertCollectionDir = FileSystemUtils::buildPath(remoteIdDir, "cmsCertCollection"); + + std::deque cmsCertCollectionInner; + std::deque cmsCertPathCollectionInner; + if (FileSystemUtils::doesDirectoryExist(cmsCertCollectionDir)) { + FileSystemUtils::DirectoryItems cmsCertCollectionItems = FileSystemUtils::itemsInDirectory( + cmsCertCollectionDir, FileSystemUtils::REGEX_MATCH_ALL); + for (TConstIterator cmsCertCollectionIter(cmsCertCollectionItems.files); cmsCertCollectionIter; cmsCertCollectionIter++) { + cmsCertCollectionInner.push_back( + loadTextFile(cmsCertCollectionDir, *cmsCertCollectionIter)); + cmsCertPathCollectionInner.push_back( + FileSystemUtils::buildPath(cmsCertCollectionDir, *cmsCertCollectionIter)); + } + } + + SmartPtrCCertCollectionDoc cmsCertCollection; + cmsCertCollection.CreateInstance(); + cmsCertCollection->initialize(cmsCertCollectionInner); + + SmartPtrCCertPathCollectionDoc cmsCertPathCollection; + cmsCertPathCollection.CreateInstance(); + cmsCertPathCollection->initialize(cmsCertPathCollectionInner); + + SmartPtrCRemoteSecurityDoc remoteSecurity; + remoteSecurity.CreateInstance(); + remoteSecurity->initialize( + loadTextFile(remoteIdDir, "remoteId.txt"), + loadTextFile(remoteIdDir, "protocolName.txt"), + loadTextFile(remoteIdDir, "cmsCert.pem"), + loadTextFile(remoteIdDir, "cmsCipherName.txt"), + cmsCertCollection, + FileSystemUtils::buildPath(remoteIdDir, "cmsCert.pem"), + cmsCertPathCollection); + + remoteSecurityCollectionInner.push_back(remoteSecurity); + } + } + + SmartPtrCRemoteSecurityCollectionDoc remoteSecurityCollection; + remoteSecurityCollection.CreateInstance(); + remoteSecurityCollection->initialize(remoteSecurityCollectionInner); + + return remoteSecurityCollection; +} + +SmartPtrCPersistenceProtocolDoc CPersistenceUtils::loadPersistenceProtocol( + const std::string& persistenceDir) { + CAF_CM_STATIC_FUNC_VALIDATE("CPersistenceUtils", "loadPersistenceProtocol"); + CAF_CM_VALIDATE_STRING(persistenceDir); + + const std::string protocolDir = FileSystemUtils::buildPath(persistenceDir, "protocol"); + + std::deque amqpBrokerCollectionInner; + if (FileSystemUtils::doesDirectoryExist(protocolDir)) { + FileSystemUtils::DirectoryItems protocolItems = FileSystemUtils::itemsInDirectory( + protocolDir, FileSystemUtils::REGEX_MATCH_ALL); + for (TConstIterator protocolIter(protocolItems.directories); protocolIter; protocolIter++) { + const std::string protocolId = *protocolIter; + const std::string protocolIdDir = FileSystemUtils::buildPath(protocolDir, protocolId); + const std::string tlsCipherCollectionDir = FileSystemUtils::buildPath(protocolIdDir, "tlsCipherCollection"); + const std::string tlsCertCollectionDir = FileSystemUtils::buildPath(protocolIdDir, "tlsCertCollection"); + + Cdeqstr tlsCipherCollection; + if (FileSystemUtils::doesDirectoryExist(tlsCipherCollectionDir)) { + FileSystemUtils::DirectoryItems tlsCipherCollectionItems = FileSystemUtils::itemsInDirectory( + tlsCipherCollectionDir, FileSystemUtils::REGEX_MATCH_ALL); + for (TConstIterator tlsCipherCollectionIter(tlsCipherCollectionItems.files); tlsCipherCollectionIter; tlsCipherCollectionIter++) { + tlsCipherCollection.push_back( + loadTextFile(tlsCipherCollectionDir, *tlsCipherCollectionIter)); + } + } + + std::deque tlsCertCollectionInner; + std::deque tlsCertPathCollectionInner; + if (FileSystemUtils::doesDirectoryExist(tlsCertCollectionDir)) { + FileSystemUtils::DirectoryItems tlsCertCollectionItems = FileSystemUtils::itemsInDirectory( + tlsCertCollectionDir, FileSystemUtils::REGEX_MATCH_ALL); + for (TConstIterator tlsCertCollectionIter(tlsCertCollectionItems.files); tlsCertCollectionIter; tlsCertCollectionIter++) { + tlsCertCollectionInner.push_back( + loadTextFile(tlsCertCollectionDir, *tlsCertCollectionIter)); + tlsCertPathCollectionInner.push_back( + FileSystemUtils::buildPath(tlsCertCollectionDir, *tlsCertCollectionIter)); + } + } + + SmartPtrCCertCollectionDoc tlsCertCollection; + tlsCertCollection.CreateInstance(); + tlsCertCollection->initialize(tlsCertCollectionInner); + + SmartPtrCCertPathCollectionDoc tlsCertPathCollection; + tlsCertPathCollection.CreateInstance(); + tlsCertPathCollection->initialize(tlsCertPathCollectionInner); + + SmartPtrCAmqpBrokerDoc amqpBroker; + amqpBroker.CreateInstance(); + amqpBroker->initialize( + loadTextFile(protocolIdDir, "amqpBrokerId.txt"), + loadTextFile(protocolIdDir, "uri.txt"), + loadTextFile(protocolIdDir, "tlsCert.pem"), + loadTextFile(protocolIdDir, "tlsProtocol.txt"), + tlsCipherCollection, + tlsCertCollection, + FileSystemUtils::buildPath(protocolIdDir, "tlsCert.pem"), + tlsCertPathCollection); + + amqpBrokerCollectionInner.push_back(amqpBroker); + } + } + + SmartPtrCAmqpBrokerCollectionDoc amqpBrokerCollection; + amqpBrokerCollection.CreateInstance(); + amqpBrokerCollection->initialize(amqpBrokerCollectionInner); + + SmartPtrCPersistenceProtocolDoc persistenceProtocol; + persistenceProtocol.CreateInstance(); + persistenceProtocol->initialize(amqpBrokerCollection); + + return persistenceProtocol; +} + +SmartPtrCAmqpBrokerDoc CPersistenceUtils::loadAmqpBroker( + const std::string& persistenceDir) { + CAF_CM_STATIC_FUNC_VALIDATE("CPersistenceUtils", "loadAmqpBroker"); + CAF_CM_VALIDATE_STRING(persistenceDir); + + const SmartPtrCPersistenceProtocolDoc persistenceProtocol = + loadPersistenceProtocol(persistenceDir); + + return loadAmqpBroker(persistenceProtocol); +} + +SmartPtrCAmqpBrokerDoc CPersistenceUtils::loadAmqpBroker( + const SmartPtrCPersistenceProtocolDoc& persistenceProtocol) { + CAF_CM_STATIC_FUNC_VALIDATE("CPersistenceUtils", "loadAmqpBroker"); + CAF_CM_VALIDATE_SMARTPTR(persistenceProtocol); + + const SmartPtrCAmqpBrokerCollectionDoc amqpBrokerCollection = + persistenceProtocol->getAmqpBrokerCollection(); + CAF_CM_VALIDATE_SMARTPTR(amqpBrokerCollection); + + std::deque amqpBrokerCollectionInner = + amqpBrokerCollection->getAmqpBroker(); + CAF_CM_VALIDATE_BOOL(! amqpBrokerCollectionInner.empty()); + CAF_CM_VALIDATE_BOOL(amqpBrokerCollectionInner.size() <= 2); + + SmartPtrCAmqpBrokerDoc amqpBroker = amqpBrokerCollectionInner.front(); + if (amqpBrokerCollectionInner.size() == 2) { + if (amqpBroker->getAmqpBrokerId().compare("amqpBroker_default") == 0) { + amqpBroker = amqpBrokerCollectionInner.at(1); + } + CAF_CM_VALIDATE_BOOL(amqpBroker->getAmqpBrokerId().compare("amqpBroker_default") != 0); + } + + return amqpBroker; +} + +void CPersistenceUtils::savePersistence( + const SmartPtrCPersistenceDoc& persistence, + const std::string& persistenceDir) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPersistenceUtils", "savePersistence"); + CAF_CM_VALIDATE_SMARTPTR(persistence); + CAF_CM_VALIDATE_STRING(persistenceDir); + + const SmartPtrCLocalSecurityDoc localSecurity = persistence->getLocalSecurity(); + const SmartPtrCRemoteSecurityCollectionDoc remoteSecurityCollection = + persistence->getRemoteSecurityCollection(); + const SmartPtrCPersistenceProtocolDoc persistenceProtocol = + persistence->getPersistenceProtocol(); + + if (FileSystemUtils::doesDirectoryExist(persistenceDir)) { + CAF_CM_LOG_DEBUG_VA1("Removing directory - %s", persistenceDir.c_str()); + FileSystemUtils::recursiveRemoveDirectory(persistenceDir); + } + + saveLocalSecurity(localSecurity, persistenceDir); + saveRemoteSecurityCollection(remoteSecurityCollection, persistenceDir); + savePersistenceProtocol(persistenceProtocol, persistenceDir); +} + +void CPersistenceUtils::saveLocalSecurity( + const SmartPtrCLocalSecurityDoc& localSecurity, + const std::string& persistenceDir) { + CAF_CM_STATIC_FUNC_VALIDATE("CPersistenceUtils", "saveLocalSecurity"); + CAF_CM_VALIDATE_STRING(persistenceDir); + + if (localSecurity) { + const std::string locCertsDir = createDirectory(persistenceDir, "local"); + + if (! localSecurity->getLocalId().empty()) { + FileSystemUtils::saveTextFile( + locCertsDir, "localId.txt", localSecurity->getLocalId()); + } + + if (! localSecurity->getCert().empty()) { + FileSystemUtils::saveTextFile( + locCertsDir, "cert.pem", localSecurity->getCert()); + } + + if (! localSecurity->getPrivateKey().empty()) { + FileSystemUtils::saveTextFile( + locCertsDir, "privateKey.pem", localSecurity->getPrivateKey()); + } + } +} + +void CPersistenceUtils::saveRemoteSecurityCollection( + const SmartPtrCRemoteSecurityCollectionDoc& remoteSecurityCollection, + const std::string& persistenceDir) { + CAF_CM_STATIC_FUNC_VALIDATE("CPersistenceUtils", "saveRemoteSecurityCollection"); + CAF_CM_VALIDATE_STRING(persistenceDir); + + if (! remoteSecurityCollection.IsNull()) { + const std::deque remoteSecurityCollectionInner = + remoteSecurityCollection->getRemoteSecurity(); + if (! remoteSecurityCollectionInner.empty()) { + const std::string rmtCertsDir = createDirectory(persistenceDir, "remote"); + + for (TConstIterator > + remoteSecurityIter(remoteSecurityCollectionInner); + remoteSecurityIter; + remoteSecurityIter++) { + const SmartPtrCRemoteSecurityDoc remoteSecurity = *remoteSecurityIter; + CAF_CM_VALIDATE_SMARTPTR(remoteSecurity); + + const std::string remoteId = remoteSecurity->getRemoteId(); + CAF_CM_VALIDATE_STRING(remoteId); + + const std::string persistenceDir = createDirectory(rmtCertsDir, remoteId); + + FileSystemUtils::saveTextFile( + persistenceDir, "remoteId.txt", remoteSecurity->getRemoteId()); + + if (! remoteSecurity->getProtocolName().empty()) { + FileSystemUtils::saveTextFile( + persistenceDir, "protocolName.txt", remoteSecurity->getProtocolName()); + } + + if (! remoteSecurity->getCmsCert().empty()) { + FileSystemUtils::saveTextFile( + persistenceDir, "cmsCert.pem", remoteSecurity->getCmsCert()); + } + + if (! remoteSecurity->getCmsCipherName().empty()) { + FileSystemUtils::saveTextFile( + persistenceDir, "cmsCipherName.txt", remoteSecurity->getCmsCipherName()); + } + + if (! remoteSecurity->getCmsCertCollection().IsNull()) { + const std::deque cmsCertCollectionInner = + remoteSecurity->getCmsCertCollection()->getCert(); + + if (! cmsCertCollectionInner.empty()) { + const std::string certCollectionDir = createDirectory(persistenceDir, "cmsCertCollection"); + saveCollection(cmsCertCollectionInner, certCollectionDir, "cmsCert", ".pem"); + } + } + } + } + } +} + +void CPersistenceUtils::savePersistenceProtocol( + const SmartPtrCPersistenceProtocolDoc& persistenceProtocol, + const std::string& persistenceDir) { + CAF_CM_STATIC_FUNC_VALIDATE("CPersistenceUtils", "savePersistenceProtocol"); + CAF_CM_VALIDATE_STRING(persistenceDir); + + if (! persistenceProtocol.IsNull() && ! persistenceProtocol->getAmqpBrokerCollection().IsNull()) { + const std::deque amqpBrokerCollectionInner = + persistenceProtocol->getAmqpBrokerCollection()->getAmqpBroker(); + if (! amqpBrokerCollectionInner.empty()) { + const std::string protocolDir = createDirectory(persistenceDir, "protocol"); + + for (TConstIterator > + amqpBrokerIter(amqpBrokerCollectionInner); + amqpBrokerIter; + amqpBrokerIter++) { + const SmartPtrCAmqpBrokerDoc amqpBroker = *amqpBrokerIter; + + const std::string amqpBrokerId = amqpBroker->getAmqpBrokerId(); + CAF_CM_VALIDATE_STRING(amqpBrokerId); + + const std::string amqpQueueDir = createDirectory(protocolDir, amqpBrokerId); + + if (! amqpBroker->getAmqpBrokerId().empty()) { + FileSystemUtils::saveTextFile( + amqpQueueDir, "amqpBrokerId.txt", amqpBroker->getAmqpBrokerId()); + } + + if (! amqpBroker->getUri().empty()) { + FileSystemUtils::saveTextFile( + amqpQueueDir, "uri.txt", amqpBroker->getUri()); + } + + if (! amqpBroker->getTlsCert().empty()) { + FileSystemUtils::saveTextFile( + amqpQueueDir, "tlsCert.pem", amqpBroker->getTlsCert()); + } + + if (! amqpBroker->getTlsProtocol().empty()) { + FileSystemUtils::saveTextFile( + amqpQueueDir, "tlsProtocol.txt", amqpBroker->getTlsProtocol()); + } + + const std::deque tlsCipherCollectionInner = + amqpBroker->getTlsCipherCollection(); + if (! tlsCipherCollectionInner.empty()) { + const std::string cipherDir = createDirectory(amqpQueueDir, "tlsCipherCollection"); + saveCollection(tlsCipherCollectionInner, cipherDir, "tlsCipher", ".txt"); + } + + if (! amqpBroker->getTlsCertCollection().IsNull()) { + const std::deque tlsCertCollectionInner = + amqpBroker->getTlsCertCollection()->getCert(); + + if (! tlsCertCollectionInner.empty()) { + const std::string certCollectionDir = createDirectory(amqpQueueDir, "tlsCertCollection"); + saveCollection(tlsCertCollectionInner, certCollectionDir, "tlsCert", ".pem"); + } + } + } + } + } +} + +std::string CPersistenceUtils::loadTextFile( + const std::string& dir, + const std::string& file) { + CAF_CM_STATIC_FUNC_VALIDATE("CPersistenceUtils", "loadTextFile"); + CAF_CM_VALIDATE_STRING(dir); + CAF_CM_VALIDATE_STRING(file); + + const std::string path = FileSystemUtils::buildPath(dir, file); + + std::string rc; + if (FileSystemUtils::doesFileExist(path)) { + rc = FileSystemUtils::loadTextFile(path); + } + + return rc; +} + +std::string CPersistenceUtils::createDirectory( + const std::string& directory, + const std::string& subdir) { + CAF_CM_STATIC_FUNC_VALIDATE("CPersistenceUtils", "createDirectory"); + CAF_CM_VALIDATE_STRING(directory); + CAF_CM_VALIDATE_STRING(subdir); + + const std::string dirPath = FileSystemUtils::buildPath(directory, subdir); + if (! FileSystemUtils::doesDirectoryExist(dirPath)) { + FileSystemUtils::createDirectory(dirPath); + } + + return dirPath; +} + +void CPersistenceUtils::saveCollection( + const Cdeqstr& collection, + const std::string& directory, + const std::string& filePrefix, + const std::string& filePostfix) { + CAF_CM_STATIC_FUNC_VALIDATE("CPersistenceUtils", "saveCollection"); + CAF_CM_VALIDATE_STL(collection); + CAF_CM_VALIDATE_STRING(directory); + CAF_CM_VALIDATE_STRING(filePrefix); + CAF_CM_VALIDATE_STRING(filePostfix); + + int32 cnt = 0; + for (TConstIterator elemIter(collection); elemIter; elemIter++) { + const std::string elem = *elemIter; + const std::string cntStr = CStringConv::toString(cnt++); + std::string elemFilename = filePrefix + cntStr + filePostfix; + FileSystemUtils::saveTextFile(directory, elemFilename, elem); + } +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CPersistenceUtils.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CPersistenceUtils.h new file mode 100644 index 000000000..05c9d8e0e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CPersistenceUtils.h @@ -0,0 +1,75 @@ +/* + * Author: bwilliams + * Created: Jan 21, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CPersistenceUtils_H_ +#define CPersistenceUtils_H_ + +#include + +namespace Caf { + +class COMMONAGGREGATOR_LINKAGE CPersistenceUtils { +public: + static SmartPtrCPersistenceDoc loadPersistence( + const std::string& persistenceDir); + + static SmartPtrCLocalSecurityDoc loadLocalSecurity( + const std::string& persistenceDir); + + static SmartPtrCRemoteSecurityCollectionDoc loadRemoteSecurityCollection( + const std::string& persistenceDir); + + static SmartPtrCPersistenceProtocolDoc loadPersistenceProtocol( + const std::string& persistenceDir); + + static SmartPtrCAmqpBrokerDoc loadAmqpBroker( + const std::string& persistenceDir); + + static SmartPtrCAmqpBrokerDoc loadAmqpBroker( + const SmartPtrCPersistenceProtocolDoc& persistenceProtocol); + +public: + static void savePersistence( + const SmartPtrCPersistenceDoc& persistence, + const std::string& persistenceDir); + + static void saveLocalSecurity( + const SmartPtrCLocalSecurityDoc& localSecurity, + const std::string& persistenceDir); + + static void saveRemoteSecurityCollection( + const SmartPtrCRemoteSecurityCollectionDoc& remoteSecurityCollection, + const std::string& persistenceDir); + + static void savePersistenceProtocol( + const SmartPtrCPersistenceProtocolDoc& persistenceProtocol, + const std::string& persistenceDir); + +private: + static std::string loadTextFile( + const std::string& dir, + const std::string& file); + +private: + static std::string createDirectory( + const std::string& directory, + const std::string& subdir); + + static void saveCollection( + const Cdeqstr& collection, + const std::string& directory, + const std::string& filePrefix, + const std::string& filePostfix); + +private: + CAF_CM_DECLARE_NOCREATE(CPersistenceUtils); +}; + +} + +#endif /* CPersistenceUtils_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CProcessUtils.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CProcessUtils.cpp new file mode 100644 index 000000000..bf82550e7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CProcessUtils.cpp @@ -0,0 +1,437 @@ +/* + * Author: bwilliams + * Created: Jan 21, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CProcessUtils.h" +#ifndef WIN32 +#include +#include +#endif + + +using namespace Caf; + +const std::string ProcessUtils::INHERIT_PARENT_DIRECTORY; + +void ProcessUtils::runSyncToFiles( + const Cdeqstr& argv, + const std::string& stdoutPath, + const std::string& stderrPath, + const ProcessUtils::Priority priority, + const std::string workingDirectory) { + + CAF_CM_STATIC_FUNC_LOG_VALIDATE("ProcessUtils", "runSyncToFiles"); + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_STL(argv); + // stdoutPath is optional + // stderrPath is optional + + std::string stdoutContent; + std::string stderrContent; + ProcessUtils::runSync( + argv, stdoutPath, stderrPath, stdoutContent, stderrContent, priority, workingDirectory); + } + CAF_CM_EXIT; +} + +void ProcessUtils::runSync( + const Cdeqstr& argv, + std::string& stdoutContent, + std::string& stderrContent, + const ProcessUtils::Priority priority, + const std::string workingDirectory) { + + CAF_CM_STATIC_FUNC_LOG_VALIDATE("ProcessUtils", "runSync"); + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_STL(argv); + + ProcessUtils::runSync( + argv, std::string(), std::string(), stdoutContent, stderrContent, priority, workingDirectory); + } + CAF_CM_EXIT; +} + +#ifdef WIN32 +void ProcessUtils::runSync( + const Cdeqstr& argv, + const std::string& stdoutPath, + const std::string& stderrPath, + std::string& stdoutContent, + std::string& stderrContent, + const ProcessUtils::Priority priority, + const std::string& workingDirectory) { + CAF_CM_STATIC_FUNC_LOG( "CProcessUtils", "runSync(Win)" ); + + const uint32 maxCmdLineLen = 1024; + + PROCESS_INFORMATION processInfo; + HANDLE stdoutReadPipe = NULL; + HANDLE stdoutWritePipe = NULL; + HANDLE stderrReadPipe = NULL; + HANDLE stderrWritePipe = NULL; + + try { + CAF_CM_VALIDATE_STL(argv); + + const std::string cmdLine = convertToString(argv); + + if (cmdLine.length() > maxCmdLineLen) { + CAF_CM_EXCEPTION_VA1(0, "Command-line too long: \"%s\"", + cmdLine.c_str()); + } + + CAF_CM_LOG_INFO_VA1("Running command - %s", cmdLine.c_str()); + + char cmdLineBuf[maxCmdLineLen + 1]; + ::strcpy_s(cmdLineBuf, cmdLine.c_str()); + + SECURITY_ATTRIBUTES securityAttributes; + ::ZeroMemory(&securityAttributes, sizeof(securityAttributes)); + securityAttributes.nLength = sizeof(securityAttributes); + securityAttributes.bInheritHandle = TRUE; + + //Create pipes to write and read stdout/stderr + BOOL apiRc = ::CreatePipe(&stdoutReadPipe, &stdoutWritePipe, &securityAttributes, 0); + if (apiRc == FALSE) { + const DWORD errorCode = ::GetLastError(); + const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(errorCode); + CAF_CM_EXCEPTION_VA2(errorCode, "Failed to create the stdout pipe - cmdLine: \"%s\", msg: \"%s\"", + cmdLine.c_str(), errorMsg.c_str()); + } + + apiRc = ::CreatePipe(&stderrReadPipe, &stderrWritePipe, &securityAttributes, 0); + if (apiRc == FALSE) { + const DWORD errorCode = ::GetLastError(); + const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(errorCode); + CAF_CM_EXCEPTION_VA2(errorCode, "Failed to create the stderr pipe - cmdLine: \"%s\", msg: \"%s\"", + cmdLine.c_str(), errorMsg.c_str()); + } + + STARTUPINFOA startupInfo; + ::ZeroMemory(&startupInfo, sizeof(startupInfo)); + startupInfo.cb = sizeof(startupInfo); + startupInfo.dwFlags |= STARTF_USESTDHANDLES; + startupInfo.hStdInput = NULL; + startupInfo.hStdOutput = stdoutWritePipe; + startupInfo.hStdError = stderrWritePipe; + + ::ZeroMemory(&processInfo, sizeof(processInfo)); + + DWORD dwCreationFlags = CREATE_NO_WINDOW; + switch (priority) { + case LOW: + dwCreationFlags |= BELOW_NORMAL_PRIORITY_CLASS; + break; + + case IDLE: + dwCreationFlags |= IDLE_PRIORITY_CLASS; + break; + + case NORMAL: + default: + dwCreationFlags |= NORMAL_PRIORITY_CLASS; + break; + } + + // NORMAL_PRIORITY_CLASS BELOW_NORMAL_PRIORITY_CLASS IDLE_PRIORITY_CLASS + // Create the process + apiRc = ::CreateProcessA( + NULL, // Image Name + cmdLineBuf, // Command Line + NULL, // Security Attributes for the Process + NULL, // Security Attributes for the Thread + TRUE, // Inherit handles? + dwCreationFlags, // Creation flags + NULL, // Environment + workingDirectory.length() == 0 ? NULL : workingDirectory.c_str(), + &startupInfo, // Startup Info + &processInfo); // Process Info + + if (apiRc == FALSE) { + const DWORD errorCode = ::GetLastError(); + const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(errorCode); + CAF_CM_EXCEPTION_VA2(errorCode, "Failed to invoke \"%s\", msg: \"%s\"", + cmdLine.c_str(), errorMsg.c_str()); + } else { + // Successfully created the process. Wait for it to finish. + ::WaitForSingleObject(processInfo.hProcess, INFINITE); + + // Get the exit code. + DWORD exitCode = 0; + apiRc = ::GetExitCodeProcess(processInfo.hProcess, &exitCode); + if (apiRc == FALSE) { + const DWORD errorCode = ::GetLastError(); + const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(errorCode); + CAF_CM_EXCEPTION_VA2(errorCode, "Executed command but couldn't get exit code - cmdLine: \"%s\", msg: \"%s\"", + cmdLine.c_str(), errorMsg.c_str()); + } + + ::CloseHandle(stdoutWritePipe); + ::CloseHandle(stderrWritePipe); + stdoutWritePipe = NULL; + stderrWritePipe = NULL; + + stdoutContent = readFromPipe(stdoutReadPipe); + stderrContent = readFromPipe(stderrReadPipe); + + if (!stdoutContent.empty() && !stdoutPath.empty()) { + FileSystemUtils::saveTextFile(stdoutPath, stdoutContent); + } + + if (!stderrContent.empty() && !stderrPath.empty()) { + FileSystemUtils::saveTextFile(stderrPath, stderrContent); + } + + std::ostringstream msgStream; + if (exitCode != 0) { + msgStream << "Command failed - exitCode: " << exitCode; + msgStream << ", cmdLine: \"" << cmdLine << "\""; + msgStream << ", stdout: \"" << stdoutContent.c_str() << "\""; + msgStream << ", stderr: \"" << stderrContent.c_str() << "\""; + std::string msg = msgStream.str(); + + CAF_CM_LOG_WARN_VA0(msg.c_str()); + CAF_CM_EXCEPTIONEX_VA0(ProcessFailedException, exitCode, msg); + } + + msgStream << "Command succeeded - cmdLine: \"" << cmdLine << "\"; output: "; + msgStream << ", stdout: \"" << stdoutContent.c_str() << "\""; + msgStream << ", stderr: \"" << stderrContent.c_str() << "\""; + CAF_CM_LOG_DEBUG_VA0(msgStream.str().c_str()); + } + } + CAF_CM_CATCH_CAF + CAF_CM_CATCH_DEFAULT + + try { + if (processInfo.hProcess != NULL) { + ::CloseHandle(processInfo.hProcess); + } + if (processInfo.hThread != NULL) { + ::CloseHandle(processInfo.hThread); + } + if (stdoutReadPipe != NULL) { + ::CloseHandle(stdoutReadPipe); + } + if (stdoutWritePipe != NULL) { + ::CloseHandle(stdoutWritePipe); + } + if (stderrReadPipe != NULL) { + ::CloseHandle(stderrReadPipe); + } + if (stderrWritePipe != NULL) { + ::CloseHandle(stderrWritePipe); + } + } + CAF_CM_CATCH_DEFAULT + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_THROWEXCEPTION; +} + +std::string ProcessUtils::readFromPipe( + const HANDLE readPipe) { + CAF_CM_STATIC_FUNC_LOG( "CProcessUtils", "readFromPipe" ); + + const uint32 maxOutBufSize = 1024; + + std::string rc = ""; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_PTR(readPipe); + + char readBuf[maxOutBufSize+1]; + DWORD numberOfBytesRead = 0; + for (BOOL apiRc = ::ReadFile(readPipe, readBuf, maxOutBufSize, &numberOfBytesRead, NULL); + apiRc != FALSE; + apiRc = ::ReadFile(readPipe, readBuf, maxOutBufSize, &numberOfBytesRead, NULL)) { + readBuf[numberOfBytesRead] = '\0'; + rc += std::string(readBuf); + } + } + CAF_CM_EXIT; + + return rc; +} +#else + +void SpawnChildSetup(gpointer data) { + int niceLevel = *((int*) data); + setpriority(PRIO_PROCESS, 0, niceLevel); +} + +void ProcessUtils::runSync( + const Cdeqstr& argv, + const std::string& stdoutPath, + const std::string& stderrPath, + std::string& stdoutContent, + std::string& stderrContent, + const ProcessUtils::Priority priority, + const std::string& workingDirectory) { + CAF_CM_STATIC_FUNC_LOG( "CProcessUtils", "runSync(NotWin)" ); + + GError *gError = NULL; + gchar *gStdout = NULL; + gchar *gStderr = NULL; + const char** argvNative = NULL; + + try { + CAF_CM_VALIDATE_STL(argv); + + const std::string cmdLine = convertToString(argv); + + // Each string in argvNative points to the internal memory in + // the corresponding string in argv. So int32 as argvNative and + // argv have (at least) the same scope, everything should be fine. + argvNative = convertToCharArray(argv); + + int niceLevel; + switch (priority) { + case LOW: + niceLevel = 10; + break; + + case IDLE: + niceLevel = 19; + break; + + case NORMAL: + default: + niceLevel = 0; + break; + } + + CAF_CM_LOG_INFO_VA1("Running command - %s", cmdLine.c_str()); + + gint gStatus = 0; + const bool isSuccessful = g_spawn_sync( + workingDirectory.length() == 0 ? NULL : workingDirectory.c_str(), + const_cast(argvNative), + NULL, // child's environment, or NULL to inherit parent's + static_cast(0), // GSpawnFlags - the defaults are fine + &SpawnChildSetup, // child_setup - function to run in the child just before exec() + &niceLevel, // user_data - user data for child_setup + &gStdout, + &gStderr, + &gStatus, + &gError); + + stdoutContent = (gStdout == NULL) ? std::string() : gStdout; + stderrContent = (gStderr == NULL) ? std::string() : gStderr; + + if (!stdoutContent.empty() && !stdoutPath.empty()) { + FileSystemUtils::saveTextFile(stdoutPath, stdoutContent); + } + if (!stderrContent.empty() && !stderrPath.empty()) { + FileSystemUtils::saveTextFile(stderrPath, stderrContent); + } + + std::ostringstream msgStream; + if(!isSuccessful || (WIFEXITED(gStatus) == FALSE) || (WEXITSTATUS(gStatus) != 0)) { + const std::string errorMessage = (gError == NULL) ? std::string() : gError->message; + const int32 errorCode = (gError == NULL) ? 0 : gError->code; + + msgStream << "Failed to invoke command - errorCode: " << errorCode; + msgStream << ", errorMessage: \"" << errorMessage.c_str() << "\""; + msgStream << ", cmdLine: \"" << cmdLine << "\""; + msgStream << ", stdout: \"" << stdoutContent.c_str() << "\""; + msgStream << ", stderr: \"" << stderrContent.c_str() << "\""; + std::string msg = msgStream.str(); + + CAF_CM_LOG_WARN_VA0(msg.c_str()); + CAF_CM_EXCEPTIONEX_VA0(ProcessFailedException, errorCode, msg); + } + + msgStream << "Command succeeded - cmdLine: \"" << cmdLine << "\"; output: "; + msgStream << ", stdout: \"" << stdoutContent.c_str() << "\""; + msgStream << ", stderr: \"" << stderrContent.c_str() << "\""; + CAF_CM_LOG_DEBUG_VA0(msgStream.str().c_str()); + + freeMemory(gError, gStdout, gStderr, argvNative); + } + catch(...) { + freeMemory(gError, gStdout, gStderr, argvNative); + throw; + } +} +#endif + +std::string ProcessUtils::getUserName() { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("ProcessUtils", "getUserName"); + + std::string rc; + + CAF_CM_ENTER { + const gchar* gUserName = g_get_user_name(); + CAF_CM_VALIDATE_PTR(gUserName); + + rc = gUserName; + } + CAF_CM_EXIT; + + return rc; +} + +std::string ProcessUtils::getRealUserName() { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("ProcessUtils", "getRealUserName"); + + std::string rc; + + CAF_CM_ENTER { + const gchar* gUserName = g_get_real_name(); + CAF_CM_VALIDATE_PTR(gUserName); + + rc = gUserName; + } + CAF_CM_EXIT; + + return rc; +} + +const char** ProcessUtils::convertToCharArray( + const Cdeqstr& deqstr) { + int32 rcIndex = 0; + const char** rc = new const char*[deqstr.size() + 1]; + for (TConstIterator strIter(deqstr); strIter; strIter++) { + rc[rcIndex++] = (*strIter).c_str(); + } + + rc[rcIndex++] = NULL; + + return rc; +} + +std::string ProcessUtils::convertToString( + const Cdeqstr& deqstr) { + std::string rc; + for (TConstIterator strIter(deqstr); strIter; strIter++) { + const std::string str = *strIter; + rc += str + std::string(" "); + } + + return rc; +} + +void ProcessUtils::freeMemory( + GError *gError, + gchar *gStdout, + gchar *gStderr, + const char** argvNative) { + if(gError != NULL) { + g_error_free(gError); + gError = NULL; + } + g_free(gStdout); + g_free(gStderr); + if (argvNative != NULL) { + delete[] argvNative; + } +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CProcessUtils.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CProcessUtils.h new file mode 100644 index 000000000..04cc32e76 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CProcessUtils.h @@ -0,0 +1,77 @@ +/* + * Author: bwilliams + * Created: Jan 21, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CProcessUtils_H_ +#define CProcessUtils_H_ + +namespace Caf { + +class COMMONAGGREGATOR_LINKAGE ProcessUtils { +public: + enum COMMONAGGREGATOR_LINKAGE Priority { + NORMAL, + LOW, + IDLE + }; +public: + // Use for the "workingDirectory" parameter when you want to inherit the parents directory. + static const std::string INHERIT_PARENT_DIRECTORY; + +public: + static void runSyncToFiles( + const Cdeqstr& argv, + const std::string& stdoutPath, + const std::string& stderrPath, + const ProcessUtils::Priority priority = NORMAL, + const std::string workingDirectory = ProcessUtils::INHERIT_PARENT_DIRECTORY); + + static void runSync( + const Cdeqstr& argv, + std::string& stdoutContent, + std::string& stderrContent, + const ProcessUtils::Priority priority = NORMAL, + const std::string workingDirectory = ProcessUtils::INHERIT_PARENT_DIRECTORY); + +public: + static std::string getUserName(); + static std::string getRealUserName(); + +private: + static void runSync( + const Cdeqstr& argv, + const std::string& stdoutPath, + const std::string& stderrPath, + std::string& stdoutContent, + std::string& stderrContent, + const ProcessUtils::Priority priority, + const std::string& workingDirectory); + + static const char** convertToCharArray( + const Cdeqstr& argv); + + static std::string convertToString( + const Cdeqstr& deqstr); + + static void freeMemory( + GError *gError, + gchar *gStdout, + gchar *gStderr, + const char** argvNative); + +#ifdef WIN32 + static std::string readFromPipe( + const HANDLE readPipe); +#endif + +private: + CAF_CM_DECLARE_NOCREATE(ProcessUtils); +}; + +} + +#endif /* CProcessUtils_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CStringUtils.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CStringUtils.cpp new file mode 100644 index 000000000..5ed5ca462 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CStringUtils.cpp @@ -0,0 +1,185 @@ +/* + * Author: bwilliams + * Created: Jan 21, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CStringUtils.h" + +#include +#include +#include + +using namespace Caf; + +Cdeqstr CStringUtils::split(const std::string &str, const char delim) { + Cdeqstr rc; + std::string token; + std::stringstream stream(str); + while(std::getline(stream, token, delim)) { + rc.push_back(token); + } + + return rc; +} + +// trim from both ends +std::string CStringUtils::trim(const std::string &s) { + std::string sTmp = s; + return trimLeft(trimRight(sTmp)); +} + +// trim from start +std::string CStringUtils::trimLeft(const std::string &s) { + std::string sTmp = s; + sTmp.erase( + sTmp.begin(), + std::find_if( + sTmp.begin(), + sTmp.end(), + std::not1(std::ptr_fun(std::isspace)))); + return sTmp; +} + +// trim from end +std::string CStringUtils::trimRight(const std::string &s) { + std::string sTmp = s; + sTmp.erase( + std::find_if( + sTmp.rbegin(), + sTmp.rend(), + std::not1(std::ptr_fun(std::isspace))).base(), sTmp.end()); + return sTmp; +} + +// expand the environment variable in the string. +std::string CStringUtils::expandEnv(const std::string &envStr) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CStringUtils", "expandEnv"); + CAF_CM_VALIDATE_STRING(envStr); + + return getAppConfig()->resolveValue(envStr); +} + +UUID CStringUtils::createRandomUuidRaw() { + CAF_CM_STATIC_FUNC_LOG("CStringUtils", "createRandomUuidRaw"); + + UUID randomUuid; + if (S_OK != ::UuidCreate(&randomUuid)) { + CAF_CM_EXCEPTIONEX_VA0(InvalidHandleException, E_UNEXPECTED, + "Failed to create the UUID"); + } + + return randomUuid; +} + +std::string CStringUtils::createRandomUuid() { + return BasePlatform::UuidToString(createRandomUuidRaw()); +} + +inline bool caseInsCharCompare(char a, char b) { + return(::toupper(a) == ::toupper(b)); +} + +bool CStringUtils::isEqualIgnoreCase( + const std::string & src, + const std::string & srch) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CStringUtils", "isEqualIgnoreCase"); + CAF_CM_VALIDATE_STRING(src); + CAF_CM_VALIDATE_STRING(srch); + + return((src.size() == srch.size()) && + std::equal(src.begin(), src.end(), srch.begin(), caseInsCharCompare)); + +// std::string::iterator it = std::search( +// src.begin(), src.end(), +// srch.begin(), srch.end(), +// [](char ch1, char ch2) { return std::toupper(ch1) == std::toupper(ch2); } +// ); +// +// return (it != src.end()); +} + +#ifdef WIN32 +std::string CStringUtils::convertWideToNarrow( + const std::wstring& src) { + CAF_CM_STATIC_FUNC_LOG("CStringUtils", "convertWideToNarrow"); + + std::string rc; + + // deal with trivial case of empty string + if (! src.empty()) { + // determine required length of new string + const int32 srcLength = static_cast(src.length()); + const int32 reqLength = ::WideCharToMultiByte(CP_UTF8, 0, src.c_str(), srcLength, NULL, 0, NULL, NULL); + + // construct new string of required length + std::string dst(reqLength, '\0'); + + // convert old string to new string + const int32 dstLength = static_cast(dst.length()); + ::WideCharToMultiByte(CP_UTF8, 0, src.c_str(), srcLength, &dst[0], dstLength, NULL, NULL); + + rc = dst; + } + + return rc; +} + +std::wstring CStringUtils::convertNarrowToWide( + const std::string& src) { + CAF_CM_STATIC_FUNC_LOG("CStringUtils", "convertNarrowToWide"); + + std::wstring rc; + + // deal with trivial case of empty string + if (! src.empty()) { + // determine required length of new string + const int32 srcLength = static_cast(src.length()); + const int32 reqLength = ::MultiByteToWideChar(CP_UTF8, 0, src.c_str(), srcLength, NULL, 0); + + // construct new string of required length + std::wstring dst(reqLength, L'\0'); + + // convert old string to new string + const int32 dstLength = static_cast(dst.length()); + ::MultiByteToWideChar(CP_UTF8, 0, src.c_str(), srcLength, &dst[0], dstLength); + + rc = dst; + } + + return rc; +} +#endif + +std::string CStringUtils::toLower( + const std::string& str) { + CAF_CM_STATIC_FUNC_VALIDATE("CStringUtils", "toLower"); + CAF_CM_VALIDATE_STRING(str); + + std::string rc(str); + std::transform( + str.begin(), + str.end(), + rc.begin(), + std::ptr_fun(std::tolower)); + + return rc; +} + +std::string CStringUtils::toUpper( + const std::string& str) { + CAF_CM_STATIC_FUNC_VALIDATE("CStringUtils", "toUpper"); + CAF_CM_VALIDATE_STRING(str); + + std::string rc(str); + std::transform( + str.begin(), + str.end(), + rc.begin(), + std::ptr_fun(std::toupper)); + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CStringUtils.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CStringUtils.h new file mode 100644 index 000000000..da36ff1b3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CStringUtils.h @@ -0,0 +1,88 @@ +/* + * Author: bwilliams + * Created: Jan 21, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CSTRINGUTILS_H_ +#define CSTRINGUTILS_H_ + +#include + +namespace Caf { + +class COMMONAGGREGATOR_LINKAGE CStringUtils { +public: + static Cdeqstr split(const std::string &str, const char delim); + static std::string trim(const std::string &s); + static std::string trimLeft(const std::string &s); + static std::string trimRight(const std::string &s); + static std::string expandEnv(const std::string &s); + static UUID createRandomUuidRaw(); + static std::string createRandomUuid(); + static bool isEqualIgnoreCase(const std::string & src, const std::string & srch); +#ifdef WIN32 + static std::string convertWideToNarrow(const std::wstring& src); + static std::wstring convertNarrowToWide(const std::string& src); +#endif + + static std::string toLower( + const std::string& str); + + static std::string toUpper( + const std::string& str); + +private: + CAF_CM_DECLARE_NOCREATE(CStringUtils); +}; + +namespace CStringConv { + +// Templates to convert numbers to strings +template +inline std::basic_string toTString(const T& t) { + std::basic_ostringstream o; + o << t; + if (o.fail()) { + throw std::runtime_error("cannot convert number to string"); + } + return o.str(); +} + +template +inline std::string toString(const T& t) { + return toTString(t); +} + +template +inline std::wstring toWString(const T& t) { + return toTString(t); +} + +// Templates to convert strings to numbers +template +inline T fromTString(const std::basic_string& s) { + T t; + std::basic_istringstream i(s); + i >> t; + if (i.fail()) { + throw std::runtime_error("cannot convert string '" + s + "' to number"); + } + return t; +} + +template +inline T fromString(const std::string& s) { + return fromTString(s); +} + +template +inline T fromWString(const std::wstring& s) { + return fromTString(s); +} + +}} + +#endif /* CSTRINGUTILS_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CThreadPool.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CThreadPool.cpp new file mode 100644 index 000000000..92f630fb7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CThreadPool.cpp @@ -0,0 +1,92 @@ +/* + * CThreadPool.cpp + * + * Created on: May 9, 2012 + * Author: mdonahue + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CThreadPool.h" + + bool _isInitialized; + GThreadPool *_threadPool; + gpointer _userData; + +CThreadPool::CThreadPool() : + _isInitialized(false), + _threadPool(NULL), + _userData(NULL), + CAF_CM_INIT("CThreadPool") { + CAF_CM_INIT_THREADSAFE; +} + +CThreadPool::~CThreadPool() { + if (_threadPool) { + g_thread_pool_free(_threadPool, FALSE, TRUE); + } +} + +void CThreadPool::init(gpointer userData, gint maxThreads) { + CAF_CM_FUNCNAME("init"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + GError *error = NULL; + _threadPool = g_thread_pool_new( + ThreadFunc, + userData, + maxThreads, + TRUE, + &error); + if (error) { + CAF_CM_THROW_GERROR(error); + } + _isInitialized = true; +} + +void CThreadPool::term() { + CAF_CM_FUNCNAME_VALIDATE("term"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + g_thread_pool_free(_threadPool, FALSE, TRUE); + _threadPool = NULL; +} + +void CThreadPool::addTask(const SmartPtrIThreadTask& task) { + CAF_CM_FUNCNAME("addTask"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(task); + + if (_threadPool) { + GError *error = NULL; + g_thread_pool_push( + _threadPool, + task.GetAddRefedInterface(), + &error); + if (error) { + task->Release(); + CAF_CM_THROW_GERROR(error); + } + } else { + CAF_CM_EXCEPTIONEX_VA0( + IllegalStateException, + 0, + "The thread pool has been shut down"); + } +} + +void CThreadPool::ThreadFunc(gpointer data, gpointer userData) { + CAF_CM_STATIC_FUNC_LOG("CThreadPool", "ThreadFunc"); + CAF_CM_VALIDATE_PTR(data); + // userData is optional + IThreadTask *task = reinterpret_cast(data); + try { + task->run(userData); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + task->Release(); +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CThreadPool.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CThreadPool.h new file mode 100644 index 000000000..7a0e235fd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CThreadPool.h @@ -0,0 +1,73 @@ +/* + * CThreadPool.h + * + * Created on: May 9, 2012 + * Author: mdonahue + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CTHREADPOOL_H_ +#define CTHREADPOOL_H_ + +namespace Caf { + +/** + * @author mdonahue + * @brief This class wraps a GThreadPool and makes it a bit more friendly to use. + * This class wraps up a GThreadPool as a lifetime-managed object that can be shared. + * The shutdown behavior is to wait for all tasks to finish. + */ +class COMMONAGGREGATOR_LINKAGE CThreadPool { +public: + /** + * @brief This is the interface for tasks queued in this thread pool + */ + struct __declspec(novtable) IThreadTask : public ICafObject { + /** + * @brief execute task + * @param userData the userData passed into the thread pool init() method + */ + virtual void run(gpointer userData) = 0; + }; + CAF_DECLARE_SMART_INTERFACE_POINTER(IThreadTask); + +public: + CThreadPool(); + virtual ~CThreadPool(); + + /** + * @brief Initialize the thread pool + * @param userData opaque data to be passed to each thread + * @param maxThreads the number of threads to create + */ + void init(gpointer userData, gint maxThreads); + + /** + * @brief Terminate the thread pool + * All tasks will be allowed to finish before this method returns + */ + void term(); + + /** + * @brief Add a task to the thread pool + * @param task interface to the task to add + */ + void addTask(const SmartPtrIThreadTask& task); + +private: + static void ThreadFunc(gpointer data, gpointer userData); + +private: + bool _isInitialized; + GThreadPool *_threadPool; + gpointer _userData; + CAF_CM_CREATE; + CAF_CM_CREATE_THREADSAFE; + CAF_CM_DECLARE_NOCOPY(CThreadPool); +}; +CAF_DECLARE_SMART_POINTER(CThreadPool); + +} + +#endif /* CTHREADPOOL_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CThreadSignal.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CThreadSignal.cpp new file mode 100644 index 000000000..c4c1879af --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CThreadSignal.cpp @@ -0,0 +1,106 @@ +/* + * Author: bwilliams + * Created: Jul 2009 + * + * Copyright (c) 2009-2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CThreadSignal.h" + +using namespace Caf; + +CThreadSignal::CThreadSignal(void) : + _isInitialized(false), + _waitCnt(0), + CAF_CM_INIT("CThreadSignal") { + CAF_CM_INIT_THREADSAFE + ; +} + +CThreadSignal::~CThreadSignal(void) { +} + +void CThreadSignal::initialize(const std::string& conditionName) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(conditionName); + + _condition.initialize(conditionName); + _isInitialized = true; +} + +bool CThreadSignal::isInitialized() const { + CAF_CM_LOCK_UNLOCK; + return _isInitialized; +} + +void CThreadSignal::signal() { + CAF_CM_FUNCNAME_VALIDATE("signal"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + for (uint32 iter = 0; iter < _waitCnt; iter++) { + _condition.signal(); + } + + _waitCnt = 0; +} + +void CThreadSignal::wait(SmartPtrCAutoMutex& mutex, const uint32 timeoutMs) { + CAF_CM_FUNCNAME("wait"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(mutex); + + const bool isSignaled = waitOrTimeout(mutex, timeoutMs); + if (!isSignaled) { + CAF_CM_EXCEPTION_VA1(ERROR_TIMEOUT, "Signal timed-out: %s", + _condition.getName().c_str()); + } +} + +bool CThreadSignal::waitOrTimeout(SmartPtrCAutoMutex& mutex, const uint32 timeoutMs) { + CAF_CM_FUNCNAME_VALIDATE("waitOrTimeout"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(mutex); + + { + CAF_CM_LOCK_UNLOCK; + _waitCnt++; + } + + bool rc = false; + if (0 == timeoutMs) { + _condition.wait(mutex); + rc = true; + } else { + gint64 endTime; + endTime = ::g_get_monotonic_time() + timeoutMs * G_TIME_SPAN_MILLISECOND; + rc = _condition.waitUntil(mutex, endTime); + if (!rc) { + CAF_CM_LOCK_UNLOCK; + _waitCnt--; + } + } + + return rc; +} + +std::string CThreadSignal::getName() const { + CAF_CM_FUNCNAME_VALIDATE("getName"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _condition.getName(); +} + +void CThreadSignal::close() { + CAF_CM_LOCK_UNLOCK; + + if (_isInitialized) { + _condition.close(); + _waitCnt = 0; + _isInitialized = false; + } +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CThreadSignal.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CThreadSignal.h new file mode 100644 index 000000000..a99fa0095 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CThreadSignal.h @@ -0,0 +1,62 @@ +/* + * Author: bwilliams + * Created: Jul 2009 + * + * Copyright (c) 2009-2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CThreadSignal_h_ +#define CThreadSignal_h_ + +namespace Caf { + +// Class-level thread safety macros +#define CAF_THREADSIGNAL_CREATE \ + private: \ + mutable SmartPtrCAutoMutex _threadsync_mutex_ + +#define CAF_THREADSIGNAL_INIT \ + _threadsync_mutex_.CreateInstance(); \ + _threadsync_mutex_->initialize() + +#define CAF_THREADSIGNAL_MUTEX \ + _threadsync_mutex_ + +#define CAF_THREADSIGNAL_LOCK_UNLOCK \ + Caf::CAutoMutexLockUnlock _threadsync_auto_lock(CAF_THREADSIGNAL_MUTEX) + +#define CAF_THREADSIGNAL_LOCK_UNLOCK_LOG \ + Caf::CAutoMutexLockUnlock _threadsync_auto_lock(CAF_THREADSIGNAL_MUTEX, CAF_CM_GET_CLASSNAME, CAF_CM_GET_FUNCNAME) + +class COMMONAGGREGATOR_LINKAGE CThreadSignal { +public: + CThreadSignal(); + virtual ~CThreadSignal(); + +public: + void initialize(const std::string& conditionName); + bool isInitialized() const; + void signal(); + void wait(SmartPtrCAutoMutex& mutex, const uint32 timeoutMs); + bool waitOrTimeout(SmartPtrCAutoMutex& mutex, const uint32 timeoutMs); + std::string getName() const; + void close(); + +private: + bool _isInitialized; + CAutoCondition _condition; + + uint32 _waitCnt; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_THREADSAFE; + CAF_CM_DECLARE_NOCOPY(CThreadSignal); +}; + +CAF_DECLARE_SMART_POINTER( CThreadSignal); + +} + +#endif // #ifndef CThreadSignal_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CThreadUtils.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CThreadUtils.cpp new file mode 100644 index 000000000..2aebcb2bb --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CThreadUtils.cpp @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: Jan 21, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CThreadUtils.h" + +using namespace Caf; + +uint32 CThreadUtils::getThreadStackSizeKb() { + CAF_CM_STATIC_FUNC_LOG_ONLY("CThreadUtils", "getThreadStackSizeKb"); + + uint32 stackSizeKb = + AppConfigUtils::getRequiredUint32(_sAppConfigGlobalThreadStackSizeKb); + +#ifdef __linux__ + // The thread stack size is the larger of + // PTHREAD_STACK_MIN, 256K and the config file value + stackSizeKb = std::max((int32)stackSizeKb, std::max(PTHREAD_STACK_MIN, (256 * 1024)) / 1024); +#endif + CAF_CM_LOG_DEBUG_VA1("thread_stack_size_kb=%d", stackSizeKb); + return stackSizeKb; +} + +void CThreadUtils::start( + threadFunc func, + void* data) { + (void)startJoinable(func, data); +} + +GThread* CThreadUtils::startJoinable( + threadFunc func, + void* data) { + + CAF_CM_STATIC_FUNC("CThreadUtils", "startJoinable"); + + GThread *rc = g_thread_new("CThreadUtils::startJoinable", func, data); + if(NULL == rc) { + CAF_CM_EXCEPTION_VA0(0, "g_thread_new Failed"); + } + + return rc; +} + +void CThreadUtils::sleep( + const uint32 milliseconds) { + + CAF_CM_ENTER { + const int32 microseconds = milliseconds * 1000; + g_usleep(microseconds); + } + CAF_CM_EXIT; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CThreadUtils.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CThreadUtils.h new file mode 100644 index 000000000..12ebeedcb --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CThreadUtils.h @@ -0,0 +1,30 @@ +/* + * Author: bwilliams + * Created: Jan 21, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CThreadUtils_H_ +#define CThreadUtils_H_ + +namespace Caf { + +class COMMONAGGREGATOR_LINKAGE CThreadUtils { +public: + typedef void* (*threadFunc) (void* data); + +public: + static uint32 getThreadStackSizeKb(); + static void start(threadFunc func, void* data); + static GThread* startJoinable(threadFunc func, void* data); + static void sleep(const uint32 milliseconds); + +private: + CAF_CM_DECLARE_NOCREATE(CThreadUtils); +}; + +} + +#endif /* CThreadUtils_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CTimeUnit.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CTimeUnit.cpp new file mode 100644 index 000000000..ab6a49dc6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CTimeUnit.cpp @@ -0,0 +1,92 @@ +/* + * Author: bwilliams + * Created: Nov 17, 2014 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CTimeUnit.h" + +using namespace Caf; + +int32 CTimeUnit::MILLISECONDS::toDays(const int32 milliseconds) { + return milliseconds / (1000*60*60*24); +} + +int32 CTimeUnit::MILLISECONDS::toHours(const int32 milliseconds) { + return milliseconds / (1000*60*60); +} + +int32 CTimeUnit::MILLISECONDS::toMinutes(const int32 milliseconds) { + return milliseconds / (1000*60); +} + +int32 CTimeUnit::MILLISECONDS::toSeconds(const int32 milliseconds) { + return milliseconds / 1000; +} + +int32 CTimeUnit::SECONDS::toDays(const int32 seconds) { + return seconds / (60*60*24); +} + +int32 CTimeUnit::SECONDS::toHours(const int32 seconds) { + return seconds / (60*60); +} + +int32 CTimeUnit::SECONDS::toMinutes(const int32 seconds) { + return seconds / 60; +} + +int32 CTimeUnit::SECONDS::toMilliseconds(const int32 seconds) { + return seconds * 1000; +} + +int32 CTimeUnit::MINUTES::toDays(const int32 seconds) { + return seconds / (60*24); +} + +int32 CTimeUnit::MINUTES::toHours(const int32 minutes) { + return minutes / 60; +} + +int32 CTimeUnit::MINUTES::toSeconds(const int32 minutes) { + return minutes * 60; +} + +int32 CTimeUnit::MINUTES::toMilliseconds(const int32 minutes) { + return minutes * 1000 * 60; +} + +int32 CTimeUnit::HOURS::toDays(const int32 hours) { + return hours / 24; +} + +int32 CTimeUnit::HOURS::toMinutes(const int32 hours) { + return hours * 60; +} + +int32 CTimeUnit::HOURS::toSeconds(const int32 hours) { + return hours * (60*60); +} + +int32 CTimeUnit::HOURS::toMilliseconds(const int32 hours) { + return hours * (60*60*1000); +} + +int32 CTimeUnit::DAYS::toHours(const int32 days) { + return days * 24; +} + +int32 CTimeUnit::DAYS::toMinutes(const int32 days) { + return days * (24*60); +} + +int32 CTimeUnit::DAYS::toSeconds(const int32 days) { + return days * (24*60*60); +} + +int32 CTimeUnit::DAYS::toMilliseconds(const int32 days) { + return days * (24*60*60*1000); +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CTimeUnit.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CTimeUnit.h new file mode 100644 index 000000000..57080c304 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CTimeUnit.h @@ -0,0 +1,62 @@ +/* + * Author: bwilliams + * Created: Nov 17, 2014 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CTimeUnit_H_ +#define CTimeUnit_H_ + +namespace Caf { + +class COMMONAGGREGATOR_LINKAGE CTimeUnit { +public: + class COMMONAGGREGATOR_LINKAGE MILLISECONDS { + public: + static int32 toDays(const int32 milliseconds); + static int32 toHours(const int32 milliseconds); + static int32 toMinutes(const int32 milliseconds); + static int32 toSeconds(const int32 milliseconds); + }; + + class COMMONAGGREGATOR_LINKAGE SECONDS { + public: + static int32 toDays(const int32 seconds); + static int32 toHours(const int32 seconds); + static int32 toMinutes(const int32 seconds); + static int32 toMilliseconds(const int32 seconds); + }; + + class COMMONAGGREGATOR_LINKAGE MINUTES { + public: + static int32 toDays(const int32 minutes); + static int32 toHours(const int32 minutes); + static int32 toSeconds(const int32 minutes); + static int32 toMilliseconds(const int32 minutes); + }; + + class COMMONAGGREGATOR_LINKAGE HOURS { + public: + static int32 toDays(const int32 hours); + static int32 toMinutes(const int32 hours); + static int32 toSeconds(const int32 hours); + static int32 toMilliseconds(const int32 hours); + }; + + class COMMONAGGREGATOR_LINKAGE DAYS { + public: + static int32 toHours(const int32 days); + static int32 toMinutes(const int32 days); + static int32 toSeconds(const int32 days); + static int32 toMilliseconds(const int32 days); + }; + +private: + CAF_CM_DECLARE_NOCREATE(CTimeUnit); +}; + +} + +#endif /* CTimeUnit_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CVariant.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CVariant.cpp new file mode 100644 index 000000000..10c70353c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CVariant.cpp @@ -0,0 +1,179 @@ +/* + * Created on: Jun 7, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CVariant.h" + +using namespace Caf; + +CVariant::CVariant() : + _variant(NULL), + CAF_CM_INIT("CVariant") { +} + +CVariant::~CVariant() { + if (_variant) { + g_variant_unref(_variant); + } +} + +void CVariant::set(GVariant *variant) { + CAF_CM_FUNCNAME_VALIDATE("set"); + CAF_CM_VALIDATE_PTR(variant); + if (_variant) { + g_variant_unref(_variant); + _variant = NULL; + } + _variant = g_variant_ref_sink(variant); +} + +GVariant *CVariant::get() const { + CAF_CM_FUNCNAME_VALIDATE("get"); + CAF_CM_VALIDATE_PTR(_variant); + return _variant; +} + +std::string CVariant::toString() const { + CAF_CM_FUNCNAME("toString"); + CAF_CM_VALIDATE_PTR(_variant); + std::string result; + + const GVariantType *variantType = g_variant_get_type(_variant); + if (g_variant_type_equal(variantType, G_VARIANT_TYPE_BOOLEAN)) { + result = g_variant_get_boolean(_variant) ? "true" : "false"; + } else if (g_variant_type_equal(variantType, G_VARIANT_TYPE_BYTE)) { + result = CStringConv::toString(g_variant_get_byte(_variant)); + } else if (g_variant_type_equal(variantType, G_VARIANT_TYPE_INT16)) { + result = CStringConv::toString(g_variant_get_int16(_variant)); + } else if (g_variant_type_equal(variantType, G_VARIANT_TYPE_UINT16)) { + result = CStringConv::toString(g_variant_get_uint16(_variant)); + } else if (g_variant_type_equal(variantType, G_VARIANT_TYPE_INT32)) { + result = CStringConv::toString(g_variant_get_int32(_variant)); + } else if (g_variant_type_equal(variantType, G_VARIANT_TYPE_UINT32)) { + result = CStringConv::toString(g_variant_get_uint32(_variant)); + } else if (g_variant_type_equal(variantType, G_VARIANT_TYPE_INT64)) { + result = CStringConv::toString(g_variant_get_int64(_variant)); + } else if (g_variant_type_equal(variantType, G_VARIANT_TYPE_UINT64)) { + result = CStringConv::toString(g_variant_get_uint64(_variant)); + } else if (g_variant_type_equal(variantType, G_VARIANT_TYPE_STRING)) { + result = g_variant_get_string(_variant, NULL); + } else { + CAF_CM_EXCEPTIONEX_VA1( + UnsupportedOperationException, + 0, + "Unsupported GVariant conversion to string from type '%s'", + g_variant_get_type_string(_variant)); + } + return result; +} + +bool CVariant::isString() const { + return isType(G_VARIANT_TYPE_STRING); +} + +bool CVariant::isBool() const { + return isType(G_VARIANT_TYPE_BOOLEAN); +} + +bool CVariant::isUint8() const { + return isType(G_VARIANT_TYPE_BYTE); +} + +bool CVariant::isInt16() const { + return isType(G_VARIANT_TYPE_INT16); +} + +bool CVariant::isUint16() const { + return isType(G_VARIANT_TYPE_UINT16); +} + +bool CVariant::isInt32() const { + return isType(G_VARIANT_TYPE_INT32); +} + +bool CVariant::isUint32() const { + return isType(G_VARIANT_TYPE_UINT32); +} + +bool CVariant::isInt64() const { + return isType(G_VARIANT_TYPE_INT64); +} + +bool CVariant::isUint64() const { + return isType(G_VARIANT_TYPE_UINT64); +} + +SmartPtrCVariant CVariant::createString(const std::string& value) { + SmartPtrCVariant variant; + variant.CreateInstance(); + variant->set(g_variant_new_string(value.c_str())); + return variant; +} + +SmartPtrCVariant CVariant::createBool(const bool value) { + SmartPtrCVariant variant; + variant.CreateInstance(); + variant->set(g_variant_new_boolean(value)); + return variant; +} + +SmartPtrCVariant CVariant::createUint8(const uint8 value) { + SmartPtrCVariant variant; + variant.CreateInstance(); + variant->set(g_variant_new_byte(value)); + return variant; +} + +SmartPtrCVariant CVariant::createInt16(const int16 value) { + SmartPtrCVariant variant; + variant.CreateInstance(); + variant->set(g_variant_new_int16(value)); + return variant; +} + +SmartPtrCVariant CVariant::createUint16(const uint16 value) { + SmartPtrCVariant variant; + variant.CreateInstance(); + variant->set(g_variant_new_uint16(value)); + return variant; +} + +SmartPtrCVariant CVariant::createInt32(const int32 value) { + SmartPtrCVariant variant; + variant.CreateInstance(); + variant->set(g_variant_new_int32(value)); + return variant; +} + +SmartPtrCVariant CVariant::createUint32(const uint32 value) { + SmartPtrCVariant variant; + variant.CreateInstance(); + variant->set(g_variant_new_uint32(value)); + return variant; +} + +SmartPtrCVariant CVariant::createInt64(const int64 value) { + SmartPtrCVariant variant; + variant.CreateInstance(); + variant->set(g_variant_new_int64(value)); + return variant; +} + +SmartPtrCVariant CVariant::createUint64(const uint64 value) { + SmartPtrCVariant variant; + variant.CreateInstance(); + variant->set(g_variant_new_uint64(value)); + return variant; +} + +bool CVariant::isType(const GVariantType * varType) const { + CAF_CM_FUNCNAME_VALIDATE("isType"); + CAF_CM_VALIDATE_PTR(_variant); + CAF_CM_VALIDATE_PTR(varType); + return g_variant_type_equal(g_variant_get_type(_variant), varType); +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CVariant.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CVariant.h new file mode 100644 index 000000000..53ecc1961 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CVariant.h @@ -0,0 +1,63 @@ +/* + * Created on: Jun 7, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CVARIANT_H_ +#define CVARIANT_H_ + +namespace Caf { + +/** + * @brief A class that holds a GVariant* to manage its lifetime + */ +CAF_DECLARE_CLASS_AND_SMART_POINTER(CVariant); + +class COMMONAGGREGATOR_LINKAGE CVariant : public IVariant { +public: + CVariant(); + virtual ~CVariant(); + + void set(GVariant *variant); + +public: // IVariant + GVariant *get() const; + + std::string toString() const; + + bool isString() const; + bool isBool() const; + bool isUint8() const; + bool isInt16() const; + bool isUint16() const; + bool isInt32() const; + bool isUint32() const; + bool isInt64() const; + bool isUint64() const; + +public: + static SmartPtrCVariant createString(const std::string& value); + static SmartPtrCVariant createBool(const bool value); + static SmartPtrCVariant createUint8(const uint8 value); + static SmartPtrCVariant createInt16(const int16 value); + static SmartPtrCVariant createUint16(const uint16 value); + static SmartPtrCVariant createInt32(const int32 value); + static SmartPtrCVariant createUint32(const uint32 value); + static SmartPtrCVariant createInt64(const int64 value); + static SmartPtrCVariant createUint64(const uint64 value); + +private: + bool isType(const GVariantType * varType) const; + +private: + GVariant *_variant; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CVariant); +}; + +} + +#endif /* CVARIANT_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CWinScm.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CWinScm.cpp new file mode 100644 index 000000000..f2dfd1d84 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CWinScm.cpp @@ -0,0 +1,1326 @@ +/* + * Author: bwilliams + * Created: June 25, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CWinScm.h" + +// Set the default values for how many times to retry and how int32 to wait +// between retries when starting and stopping the service. +const DWORD CWinScm::s_stopRetryMax = 30; +const DWORD CWinScm::s_stopRetryIntervalMillisecs = 1000; + +const DWORD CWinScm::s_startPollMax = 30; +const DWORD CWinScm::s_startPollIntervalMillisecs = 1000; +const DWORD CWinScm::s_startRetryMax = 1; +const DWORD CWinScm::s_startRetryIntervalMillisecs = 5000; + +CWinScm::CWinScm() : + CAF_CM_INIT_LOG("CWinScm"), + _isInitialized(false), + _hSCM(NULL), + _hService(NULL) { +} + +CWinScm::CWinScm(const std::string& serviceName) : + CAF_CM_INIT_LOG("CWinScm"), + _isInitialized(false), + _hSCM(NULL), + _hService(NULL) { + CAF_CM_FUNCNAME("CWinScm"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(serviceName); + + _serviceName = serviceName; + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +CWinScm::~CWinScm() { + CAF_CM_FUNCNAME("~CWinScm"); + + CAF_CM_ENTER { + closeHandle(_hService); + closeHandle(_hSCM); + } + CAF_CM_EXIT; +} + +void CWinScm::initialize( + const std::string& serviceName, + const std::string& machineName) { + CAF_CM_FUNCNAME("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(serviceName); + // machineName is optional + + _serviceName = serviceName; + + // If a machine name was provided, then store it in UNC format (e.g. \\MachineName). + if (! machineName.empty()) { + _machineName = std::string("\\") + machineName; + } + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +void CWinScm::attachScmRequired( + const DWORD desiredAccess/* = SC_MANAGER_ALL_ACCESS*/) { + CAF_CM_FUNCNAME("attachScmRequired"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + attachScm(desiredAccess, true); + } + CAF_CM_EXIT; +} + +void CWinScm::attachScmOptional( + const DWORD desiredAccess/* = SC_MANAGER_ALL_ACCESS*/) { + CAF_CM_FUNCNAME("attachScmOptional"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + attachScm(desiredAccess, false); + } + CAF_CM_EXIT; +} + +void CWinScm::createService( + const std::string& serviceFilename, + const DWORD startType/* = SERVICE_DEMAND_START*/, + const CvecDependencies cvecDependencies/* = CvecDependencies()*/) { + CAF_CM_FUNCNAME("createService"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(serviceFilename); + + createService( + serviceFilename, + std::string(), + std::string(), + std::string(), + std::string(), + startType, + cvecDependencies); + } + CAF_CM_EXIT; +} + +void CWinScm::createService( + const std::string& serviceFilename, + const std::string& serviceDisplayName, + const std::string& serviceDescription, + const std::string& serviceAccountName, + const std::string& serviceAccountPasswd, + const DWORD startType, + const CvecDependencies cvecDependencies) { + CAF_CM_FUNCNAME("createService"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(serviceFilename); + // serviceDisplayName is optional + // serviceDescription is optional + // serviceAccountName is optional + // serviceAccountPasswd is optional + // startType is optional + // cvecDependencies is optional + + // Make sure the previous service (if any) is closed. + closeHandle(_hService); + + // Open the Service Control Manager. + attachScm(); + + // Create and initialize the string that will hold the list of dependenciesWide. + const DWORD dependenciesLen = 2048; + wchar_t dependenciesWide[dependenciesLen + 1]; + + // Iterate through the dependenciesWide and stick them in the string. + size_t dependencyIndex = 0; + CvecDependencies::const_iterator civecDependencies; + for (civecDependencies = cvecDependencies.begin(); + civecDependencies != cvecDependencies.end(); + civecDependencies++) { + const std::string dependency = *civecDependencies; + const std::wstring dependencyWide = CStringUtils::convertNarrowToWide(dependency); + + // Hang onto the length of this dependency. + const size_t dependencyLen = dependencyWide.length(); + + // Make sure the length of the dependenciesWide array won't be exceeded. + if ((dependencyIndex + dependencyLen + 1) >= dependenciesLen) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchElementException, ERROR_NO_MORE_ITEMS, + "Exceeded dependency length - %d", dependencyIndex); + } + + // Copy the current dependency into the string. + ::wcsncpy_s(&dependenciesWide[dependencyIndex], dependenciesLen, dependencyWide.c_str(), dependencyLen); + dependencyIndex += dependencyLen; + + // Null-terminate it. + dependenciesWide[dependencyIndex] = L'\0'; + dependencyIndex++; + } + + // Make sure the length of the dependenciesWide array won't be exceeded. + if ((dependencyIndex + 1) >= dependenciesLen) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchElementException, ERROR_NO_MORE_ITEMS, + "Exceeded dependency length - %d", dependencyIndex); + } + + // The dependency string is terminated by two NULLs. + dependenciesWide[dependencyIndex] = L'\0'; + + // Other config info + std::wstring displayNameWide; + if (! serviceDisplayName.empty()) { + displayNameWide = CStringUtils::convertNarrowToWide(serviceDisplayName); + } else { + displayNameWide = CStringUtils::convertNarrowToWide(_serviceName); + } + + std::wstring accountWide; + std::wstring passwdWide; + if (!serviceAccountName.empty()) { + CAF_CM_VALIDATE_STRING(serviceAccountPasswd); + const std::string account = ".\\" + serviceAccountName; + accountWide = CStringUtils::convertNarrowToWide(account); + passwdWide = CStringUtils::convertNarrowToWide(serviceAccountPasswd); + } + + const wchar_t* accountWidePtr = accountWide.empty() ? NULL : accountWide.c_str(); + const wchar_t* passwdWidePtr = passwdWide.empty() ? NULL : passwdWide.c_str(); + + const std::wstring serviceFilenameWide = CStringUtils::convertNarrowToWide(serviceFilename); + + // Open the service so that its OK for the service to be missing. + if (openService(false)) { + // Change the configuration information. + BOOL bRc = ::ChangeServiceConfig( + _hService, // handle to the service + SERVICE_WIN32_OWN_PROCESS, // Only one Service in this process + startType, // Start type: AUTO, BOOT, DEMAND, DISABLED, START + SERVICE_ERROR_NORMAL, // Error type (NORMAL) + serviceFilenameWide.c_str(),// Service's binary location + NULL, // no load ordering grouping + NULL, // no tag identifier + dependenciesWide, // this list of dependenciesWide + accountWidePtr, // account + passwdWidePtr, // password + displayNameWide.c_str()); // Display name + + // If the call failed, throw an exception. + if (0 == bRc) { + const DWORD lastError = ::GetLastError(); + const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(lastError); + CAF_CM_EXCEPTION_VA3(lastError, "::ChangeServiceConfig() Failed - serviceName: %s, serviceFilename: %s, msg: \"%s\"", + _serviceName.c_str(), serviceFilename.c_str(), errorMsg.c_str()); + } + } else { + const std::wstring serviceNameWide = CStringUtils::convertNarrowToWide(_serviceName); + + // Create the Service + _hService = ::CreateService( + _hSCM, // handle to the SCM + serviceNameWide.c_str(), // Binary name of the Service + displayNameWide.c_str(), // The name to be displayed + SERVICE_ALL_ACCESS, // The desired Access + SERVICE_WIN32_OWN_PROCESS, // Only one Service in this process + startType, // Start type (AUTO, or DISABLED) + SERVICE_ERROR_NORMAL, // Error type (NORMAL) + serviceFilenameWide.c_str(),// Service's binary location + NULL, // no load ordering grouping + NULL, // no tag identifier + dependenciesWide, // this list of dependencies + accountWidePtr, // account + passwdWidePtr); // password + + // If the call failed, throw an exception. + if (! _hService) { + const DWORD lastError = ::GetLastError(); + const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(lastError); + CAF_CM_EXCEPTION_VA3(lastError, "::CreateService() Failed - serviceName: %s, serviceFilename: %s, msg: \"%s\"", + _serviceName.c_str(), serviceFilename.c_str(), errorMsg.c_str()); + } + } + + // Set the description + std::wstring wsDescription(serviceDescription.empty() ? L"" : CStringUtils::convertNarrowToWide(serviceDescription)); + + SERVICE_DESCRIPTION stDescription; + stDescription.lpDescription = const_cast(wsDescription.c_str()); + + const BOOL bRc = ::ChangeServiceConfig2(_hService, SERVICE_CONFIG_DESCRIPTION, &stDescription); + if (bRc == 0) { + const DWORD lastError = ::GetLastError(); + const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(lastError); + CAF_CM_EXCEPTION_VA3(lastError, "::ChangeServiceConfig2() Failed - serviceName: %s, serviceFilename: %s, msg: \"%s\"", + _serviceName.c_str(), serviceFilename.c_str(), errorMsg.c_str()); + } + + // Make sure the service can be opened. + openService(true); + } + CAF_CM_EXIT; +} + +/////////////////////////////////////////////////////////////////////////////// +// +// CWinScm::changeService() +// +// Modifies the Service with only the non-empty elements passed in +// NOTE: If you want to change other service settings, use CreateService +// instead; it will also modify an existing service +// +/////////////////////////////////////////////////////////////////////////////// +void CWinScm::changeService( + const std::string& serviceFilename, + const std::string& serviceDisplayName, + const std::string& serviceDescription, + const std::string& serviceAccountName, + const std::string& serviceAccountPasswd, + const DWORD startupType) { + CAF_CM_FUNCNAME("changeService"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + // Open the Sevice Control Manager. + attachScm(); + + // Open the service + openService(true); + + // Other config info + std::wstring binaryPathNameWide; + if (!serviceFilename.empty()) { + binaryPathNameWide = CStringUtils::convertNarrowToWide(serviceFilename); + } + + std::wstring displayNameWide = NULL; + if (!serviceDisplayName.empty()) { + displayNameWide = CStringUtils::convertNarrowToWide(serviceDisplayName); + } + + std::wstring accountWide; + std::wstring passwdWide; + if (!serviceAccountName.empty()) { + CAF_CM_VALIDATE_STRING(serviceAccountPasswd); + const std::string account = ".\\" + serviceAccountName; + accountWide = CStringUtils::convertNarrowToWide(account); + passwdWide = CStringUtils::convertNarrowToWide(serviceAccountPasswd); + } + + const wchar_t* accountWidePtr = accountWide.empty() ? NULL : accountWide.c_str(); + const wchar_t* passwdWidePtr = passwdWide.empty() ? NULL : passwdWide.c_str(); + + DWORD startType = SERVICE_NO_CHANGE; + if (SERVICE_NO_CHANGE != startupType) { + switch(startupType) { + case SERVICE_BOOT_START: + case SERVICE_SYSTEM_START: + case SERVICE_AUTO_START: + case SERVICE_DEMAND_START: + case SERVICE_DISABLED: + startType = startupType; + break; + default: + CAF_CM_LOG_WARN_VA1("Unrecognized value for service startup type (using anyway) - startupType: %d", startupType); + startType = startupType; + break; + } + } + + // Change the configuration information. + BOOL bRc = ::ChangeServiceConfig( + _hService, // handle to the service + SERVICE_NO_CHANGE, // Only one Service in this process + startType, // Start type: AUTO, BOOT, DEMAND, DISABLED, START + SERVICE_NO_CHANGE, // Error type (NORMAL) + binaryPathNameWide.c_str(), // Service's binary location + NULL, // no load ordering grouping + NULL, // no tag identifier + NULL, // this list of dependencies + accountWidePtr, // account + passwdWidePtr, // password + displayNameWide.c_str()); // Display name + + // If the call failed, throw an exception. + if (0 == bRc) { + const DWORD lastError = ::GetLastError(); + const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(lastError); + CAF_CM_EXCEPTION_VA3(lastError, "::ChangeServiceConfig() Failed - serviceName: %s, binaryPathNameWide: %s, msg: \"%s\"", + _serviceName.c_str(), binaryPathNameWide.c_str(), errorMsg.c_str()); + } + + if (!serviceDescription.empty()) { + // Set the description + SERVICE_DESCRIPTION stDescription; + stDescription.lpDescription = const_cast( + CStringUtils::convertNarrowToWide(serviceDescription).c_str()); + + // Check to see if this function is supported on this platform, if so we can use it. + BOOL bRc = ::ChangeServiceConfig2(_hService, SERVICE_CONFIG_DESCRIPTION, &stDescription); + if (!bRc) { + const DWORD lastError = ::GetLastError(); + const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(lastError); + CAF_CM_EXCEPTION_VA3(lastError, "::ChangeServiceConfig2() Failed - serviceName: %s, binaryPathNameWide: %s, msg: \"%s\"", + _serviceName.c_str(), binaryPathNameWide.c_str(), errorMsg.c_str()); + } + } + + // Make sure the service can be opened. + openService(true); + } + CAF_CM_EXIT; +} + +/////////////////////////////////////////////////////////////////////////////// +// +// CWinScm::deleteService() +// +// Delete this Service +// +/////////////////////////////////////////////////////////////////////////////// +void CWinScm::deleteService( + const DWORD stopRetryMax/* = s_stopRetryMax*/, + const DWORD stopRetryIntervalMillisecs/* = s_stopRetryIntervalMillisecs*/, + const DWORD servicePid/* = 0*/) { + CAF_CM_FUNCNAME("deleteService"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + // Open the service so that its OK for the service to be missing. + if (openService(false)) { + // Stop the service. + stopService(stopRetryMax, stopRetryIntervalMillisecs, servicePid); + + // Delete the service. + if (! ::DeleteService(_hService)) { + const DWORD cdwError = ::GetLastError(); + + // If the service has already been marked for deletion, then this is a no-op. + if (ERROR_SERVICE_MARKED_FOR_DELETE == cdwError) { + CAF_CM_LOG_WARN_VA1("Already marked for deletion - serviceName: %s", _serviceName.c_str()); + } else { + const DWORD lastError = ::GetLastError(); + const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(lastError); + CAF_CM_EXCEPTION_VA2(lastError, "::DeleteService() Failed - serviceName: %s, msg: \"%s\"", + _serviceName.c_str(), errorMsg.c_str()); + } + } else { + closeHandle(_hService); + } + } + } + CAF_CM_EXIT; +} + +/////////////////////////////////////////////////////////////////////////////// +// +// CWinScm::changeServiceRecoveryProperties() +// +// Modifies the Service Recovery Options +// NOTE: If you want to change other service settings, use CreateService +// instead; it will also modify an existing service +// +// serviceFilename - service name +// firstFailureAction, +// secondFailureAction, +// subsequentFailureAction +// members of enum _SC_ACTION_TYPE +// SC_ACTION_NONE = 0, +// SC_ACTION_RESTART = 1, +// SC_ACTION_REBOOT = 2, +// SC_ACTION_RUN_COMMAND = 3 +// ** I am seeing "access denied" when SC_ACTION_REBOOT is included +// ** If all three are SC_ACTION_NONE, the reset period is deleted +// cresetFailureCountAfter_days - failure count is reset to 0 after this many days +// -1 is INFINITE. This shows as infinite using "sc qfailure" but as 49710 in SCM +// crestartServiceAfter_minutes - for action SC_ACTION_RESTART, service will be started after this period +// clpstrCommandLineToRun - for action SC_ACTION_RUN_COMMAND, this command line will be passed to CreateProcess +// If this is null, the command will be unchanged +// If "", the command will be cleared +// crebootComputerAfter_minutes - for action SC_ACTION_REBOOT, the computer will reboot after this period +// clpstrRestartMessage - for action SC_ACTION_REBOOT, this message will be sent to all sessions prior to reboot period +// If this is null, the message will be unchanged +// If "", the message will be cleared +// +/////////////////////////////////////////////////////////////////////////////// +void CWinScm::changeServiceRecoveryProperties( + const std::string& serviceFilename, + const DWORD firstFailureAction, + const DWORD secondFailureAction, + const DWORD subsequentFailureAction, + const DWORD cresetFailureCountAfter_days, + const DWORD crestartServiceAfter_minutes, + const LPCWSTR clpstrCommandLineToRun, + const DWORD crebootComputerAfter_minutes, + const LPCWSTR clpstrRestartMessage) { + CAF_CM_FUNCNAME("changeServiceRecoveryProperties"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + // Open the Sevice Control Manager. + attachScm(); + + // Open the service + openService(true); + + // Change the configuration information. + SERVICE_FAILURE_ACTIONS stFailureActions; + + // reset failure count after... + // The length of time, in seconds, after which to reset the failure count to zero if there are no failures. Specify INFINITE to indicate that this value should never be reset. + if (cresetFailureCountAfter_days == INFINITE) { + stFailureActions.dwResetPeriod = INFINITE; + } else { + // convert to seconds = * 24 hours/day * 60 minutes/hour * 60 seconds/minute + stFailureActions.dwResetPeriod = cresetFailureCountAfter_days * 24 * 60 * 60; + } + + // Reboot message + // Message to broadcast to server users before rebooting in response to the SC_ACTION_REBOOT service controller action. + // If this value is NULL, the reboot message is unchanged. If the value is an empty string (""), the reboot message is deleted and no message is broadcast. + // + stFailureActions.lpRebootMsg = const_cast(clpstrRestartMessage); + + // Command to run + // Command line of the process for the CreateProcess function to execute in response to the SC_ACTION_RUN_COMMAND service controller action. This process runs under the same account as the service. + // If this value is NULL, the command is unchanged. If the value is an empty string (""), the command is deleted and no program is run when the service fails. + stFailureActions.lpCommand = const_cast(clpstrCommandLineToRun); + + // actions + // cActions + // Number of elements in the lpsaActions array. + // If this value is 0, but lpsaActions is not NULL, the reset period and array of failure actions are deleted. + // + // lpsaActions + // Pointer to an array of SC_ACTION structures. + // If this value is NULL, the cActions and resetPeriod members are ignored. + SC_ACTION aAction[3]; + if ((firstFailureAction != SC_ACTION_NONE) || + (secondFailureAction != SC_ACTION_NONE) || + (subsequentFailureAction != SC_ACTION_NONE)) { + stFailureActions.cActions = 3; + stFailureActions.lpsaActions = aAction; + aAction[0].Type = SC_ACTION_TYPE(firstFailureAction); + aAction[1].Type = SC_ACTION_TYPE(secondFailureAction); + aAction[2].Type = SC_ACTION_TYPE(subsequentFailureAction); + + for (int32 i=0; i< 3; i++) { + switch(aAction[i].Type) { + case SC_ACTION_NONE: + aAction[i].Delay = 0; + break; + case SC_ACTION_REBOOT: + // convert minutes to milliseconds + aAction[i].Delay = crebootComputerAfter_minutes * 60 * 1000; + break; + case SC_ACTION_RESTART: + aAction[i].Delay = crestartServiceAfter_minutes * 60 * 1000; + break; + case SC_ACTION_RUN_COMMAND: + // reuse the restart service parameter + aAction[i].Delay = crestartServiceAfter_minutes * 60 * 1000; + break; + default: + aAction[i].Type = SC_ACTION_NONE; + aAction[i].Delay = 0; + break; + } + } + } else { + // All actions are none - clear the actions + stFailureActions.cActions = 0; + stFailureActions.lpsaActions = aAction; + } + + // make the requested changes + // Check to see if this function is supported on this platform, if so we can use it. + BOOL bRc = ::ChangeServiceConfig2(_hService, SERVICE_CONFIG_FAILURE_ACTIONS, &stFailureActions); + if (!bRc) { + const DWORD lastError = ::GetLastError(); + const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(lastError); + CAF_CM_EXCEPTION_VA2(lastError, "::ChangeServiceConfig2() Failed - serviceName: %s, msg: \"%s\"", + _serviceName.c_str(), errorMsg.c_str()); + } + + // Make sure the service can be opened. + openService(true); + } + CAF_CM_EXIT; +} + +/////////////////////////////////////////////////////////////////////////////// +// +// CWinScm::startService() +// +// Starts the Service +// +/////////////////////////////////////////////////////////////////////////////// +SERVICE_STATUS CWinScm::startService( + const DWORD startPollMax/* = s_startPollMax*/, + const DWORD startPollIntervalMillisecs/* = s_startPollIntervalMillisecs*/, + const DWORD startRetryMax/* = s_startRetryMax*/, + const DWORD startRetryIntervalMillisecs/* = s_startRetryIntervalMillisecs*/) { + CAF_CM_FUNCNAME("startService"); + + SERVICE_STATUS stServiceStatus; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + // Initialize the structure. + ::memset(&stServiceStatus, 0, sizeof(stServiceStatus)); + + // Enter a loop that tries to restart the service. + bool isFirstTime = true; + DWORD retryCnt = 0; + for (retryCnt = 0; (0 == startRetryMax) || (retryCnt < startRetryMax); retryCnt++) { + // Don't Sleep the first time through the loop. + if (isFirstTime) { + isFirstTime = false; + } else { + ::Sleep(startRetryIntervalMillisecs); + } + + // Attempt to start the service. + CAF_CM_LOG_INFO_VA2("Attempting to start service - serviceName: %s, retryCnt: %d", _serviceName.c_str(), retryCnt); + stServiceStatus = startServiceInternal(startPollMax, startPollIntervalMillisecs); + + // If the service is started, then exit the loop. + if ((startPollMax == 0) || (stServiceStatus.dwCurrentState == SERVICE_RUNNING)) { + break; + } + + CAF_CM_LOG_ERROR_VA2("Failed to start service - serviceName: %s, retryCnt: %d", _serviceName.c_str(), retryCnt); + } + + // Is the service running? + if ((startPollMax > 0) && (stServiceStatus.dwCurrentState != SERVICE_RUNNING)) { + CAF_CM_EXCEPTIONEX_VA2( + IllegalStateException, E_FAIL, + "Unable to start the service - serviceName: %s, retryCnt: %d", _serviceName.c_str(), retryCnt); + } + + if (stServiceStatus.dwCurrentState == SERVICE_RUNNING) { + CAF_CM_LOG_INFO_VA2("Successfully started the service - serviceName: %s, retryCnt: %d", _serviceName.c_str(), retryCnt); + } + } + CAF_CM_EXIT; + + return stServiceStatus; +} + +/////////////////////////////////////////////////////////////////////////////// +// +// CWinScm::stopService() +// +// Stops the Service +// +/////////////////////////////////////////////////////////////////////////////// +SERVICE_STATUS CWinScm::stopService( + const DWORD stopRetryMax/* = s_stopRetryMax*/, + const DWORD stopRetryIntervalMillisecs/* = s_stopRetryIntervalMillisecs*/, + const DWORD servicePid/* = 0*/) { + CAF_CM_FUNCNAME("stopService"); + + SERVICE_STATUS stServiceStatus; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + // Make sure the previous service (if any) is closed. + closeHandle(_hService); + + // Initialize the input param. + ::memset(&stServiceStatus, 0, sizeof(stServiceStatus)); + + // Is the service stopped? + if (getServiceStatus().dwCurrentState == SERVICE_STOPPED) { + CAF_CM_LOG_WARN_VA1("The service is already stopped - serviceName: %s", _serviceName.c_str()); + } else { + HANDLE serviceProcessHandle = NULL; + + // If the service PID is valid and this is the "local" machine, then open the process just + // in case it needs to be terminated later. + if ((servicePid > 0) && _machineName.empty()) { + // Try to set the debug privelege to ensure that we can kill the process. + grantPrivilege(SE_DEBUG_NAME); + + serviceProcessHandle = ::OpenProcess(PROCESS_TERMINATE | PROCESS_QUERY_INFORMATION, FALSE, servicePid); + if (! serviceProcessHandle) { + const DWORD lastError = ::GetLastError(); + CAF_CM_LOG_ERROR_VA2("::OpenProcess() Failed - serviceName: %s, servicePid: %d", _serviceName.c_str(), servicePid); + } + } + + // if there are any services that depend on us, stop them first +// CdeqDependentOnMe deqDeps; +// getDependentServices(deqDeps); + ERc eRcDependentsStopped = ERcSucceeded; +// if (!deqDeps.empty()) +// { +// eRcDependentsStopped = stopDependentServices(deqDeps, s_stopRetryMax, s_stopRetryIntervalMillisecs); +// } + + // stop our service only if we are able to stop all services dependent upon us + if (eRcDependentsStopped == ERcSucceeded) { + // Tell the service to stop. + if (getServiceStatus().dwCurrentState != SERVICE_STOP_PENDING) { + controlService(SERVICE_CONTROL_STOP); + } + + // Wait for the service to stop. + for (DWORD stopCnt = 0; stopCnt < stopRetryMax; stopCnt++) { + CAF_CM_LOG_INFO_VA2("Waiting for service to stop - serviceName: %s, stopCnt: %d", _serviceName.c_str(), stopCnt); + + // Is the service stopped? + if (getServiceStatus().dwCurrentState == SERVICE_STOPPED) + break; + + // Give the Service time to stop + ::Sleep(stopRetryIntervalMillisecs); + } + + // If the handle is valid then I'm supposed to kill the process if it's still alive. + if (serviceProcessHandle) { + // Get the exit code of the process to determine whether or not it's still alive. + DWORD exitCode = 0; + if (0 == ::GetExitCodeProcess(serviceProcessHandle, &exitCode)) { + const DWORD lastError = ::GetLastError(); + CAF_CM_LOG_ERROR_VA2("::GetExitCodeProcess() Failed - serviceName: %s, servicePid: %d", + _serviceName.c_str(), servicePid); + } else { + // If the process is still alive, then terminate it. + if (STILL_ACTIVE == exitCode) { + // Terminate the process. + if (0 == ::TerminateProcess(serviceProcessHandle, 1)) { + // Hang onto the error code. + const DWORD cdwLastErrorTerminateProcess = ::GetLastError(); + + // Get the exit code of the process to determine whether or not it's still alive. + DWORD exitCode = 0; + if (0 == ::GetExitCodeProcess(serviceProcessHandle, &exitCode)) { + const DWORD lastError = ::GetLastError(); + CAF_CM_LOG_ERROR_VA2("::GetExitCodeProcess() Failed - serviceName: %s, servicePid: %d", _serviceName.c_str(), servicePid); + } else { + // If the process is still alive, then TerminateProcess clearly failed. + if (STILL_ACTIVE == exitCode) + CAF_CM_LOG_ERROR_VA1("::TerminateProcess() Failed - serviceName: %s", _serviceName.c_str()); + } + } + } + } + } + } + } + + stServiceStatus = getServiceStatus(); + if (stServiceStatus.dwCurrentState != SERVICE_STOPPED) { + CAF_CM_LOG_WARN_VA1("Failed to stop service - serviceName: %s", _serviceName.c_str()); + } + + } + CAF_CM_EXIT; + + return stServiceStatus; +} + +/////////////////////////////////////////////////////////////////////////////// +// +// CWinScm::getServiceStatus() +// +// Gets the status of this service. +// +/////////////////////////////////////////////////////////////////////////////// +SERVICE_STATUS CWinScm::getServiceStatus( + const bool isExceptionOnMissingService/* = true*/) { + CAF_CM_FUNCNAME("getServiceStatus"); + + SERVICE_STATUS stServiceStatus; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + // Initialize the input param. + ::memset(&stServiceStatus, 0, sizeof(stServiceStatus)); + + // Try to open the service. If it's possible to open it, then get the service status. Otherwise, + // the service isn't there and the state is set to stopped. + if (openService(isExceptionOnMissingService, SC_MANAGER_CONNECT, SERVICE_QUERY_STATUS)) { + // Get the state of the service. + if (0 == ::QueryServiceStatus(_hService, &stServiceStatus)) { + const DWORD lastError = ::GetLastError(); + const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(lastError); + CAF_CM_EXCEPTION_VA2(lastError, "::QueryServiceStatus() Failed - serviceName: %s, msg: \"%s\"", + _serviceName.c_str(), errorMsg.c_str()); + } + } else { + stServiceStatus.dwCurrentState = SERVICE_STOPPED; + } + } + CAF_CM_EXIT; + + return stServiceStatus; +} + +/////////////////////////////////////////////////////////////////////////////// +// +// CWinScm::controlService() +// +// Controls the Service +// +/////////////////////////////////////////////////////////////////////////////// +SERVICE_STATUS CWinScm::controlService( + const DWORD cdwCommand) { + CAF_CM_FUNCNAME("controlService"); + + SERVICE_STATUS stServiceStatus; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + // Initialize the input param. + ::memset(&stServiceStatus, 0, sizeof(stServiceStatus)); + + // Open the service. + openService(true); + + if (0 == ::ControlService(_hService, cdwCommand, &stServiceStatus)) { + const DWORD cdwError = ::GetLastError(); + CAF_CM_LOG_WARN_VA1("::ControlService() Failed - serviceName: %s", _serviceName.c_str()); + + stServiceStatus = getServiceStatus(); + } + } + CAF_CM_EXIT; + + return stServiceStatus; +} + +/////////////////////////////////////////////////////////////////////////////// +// +// CEcmColService::setStatus() +// +// Wrapper function to implement API call SetServiceStatus +// +/////////////////////////////////////////////////////////////////////////////// +void CWinScm::setStatus( + const SERVICE_STATUS_HANDLE chSrv, + const DWORD state, + const DWORD exitCode, + const DWORD progress/* = 0*/, + const DWORD waitHintMilliseconds/* = 3000 */) { + CAF_CM_FUNCNAME("setStatus"); + + CAF_CM_ENTER { + // Declare a SERVICE_STATUS structure, and fill it in + SERVICE_STATUS srvStatus; + + // We're the only Service running in our current process + srvStatus.dwServiceType = SERVICE_WIN32_OWN_PROCESS; + + // Set the state of the Service from the argument, and save it away + srvStatus.dwCurrentState = state; + + // Which commands sould we accept from the SCM? All the common ones... + srvStatus.dwControlsAccepted = + SERVICE_ACCEPT_STOP | + SERVICE_ACCEPT_SHUTDOWN | + SERVICE_ACCEPT_POWEREVENT; + + // Set the Win32 exit code for the Service + srvStatus.dwWin32ExitCode = exitCode; + + // Set the Service-specific exit code + srvStatus.dwServiceSpecificExitCode = 0; + + // Set the checkpoint value + srvStatus.dwCheckPoint = exitCode; + + // Set the timeout for waits + // Note: Here we are telling the SMC how int32 it should wait for the next + // status message. As int32 as the SCM gets the next status message before + // this time has elapsed, we are OK, if the SCM has not received a message + // and the check point value (exitCode) has not been incremented, the + // SCM will assume that something is wrong and end this Service. So be + // generous. 3 seconds seems to be standard but is overridable. + srvStatus.dwWaitHint = waitHintMilliseconds; + + // Pass the structure to the SCM. + if (! ::SetServiceStatus(chSrv, &srvStatus)) { + const DWORD lastError = ::GetLastError(); + const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(lastError); + CAF_CM_EXCEPTION_VA2(lastError, "::SetServiceStatus() Failed - serviceName: %s, msg: \"%s\"", + _serviceName.c_str(), errorMsg.c_str()); + } + } + CAF_CM_EXIT; +} + +/////////////////////////////////////////////////////////////////////////////// +// +// CWinScm::openService() +// +// Opens the service. +// +/////////////////////////////////////////////////////////////////////////////// +bool CWinScm::openService( + const bool isExceptionOnMissingService, + const DWORD scmDesiredAccess/* = SC_MANAGER_ALL_ACCESS*/, + const DWORD desiredAccess/* = SERVICE_ALL_ACCESS*/) { + CAF_CM_FUNCNAME("openService"); + + bool isServiceFound = true; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + closeHandle(_hService); + + // Open the Service Control Manager. + attachScm(scmDesiredAccess, isExceptionOnMissingService); + + // Get a handle to the Service that we want to delete + const std::wstring serviceNameWide = CStringUtils::convertNarrowToWide(_serviceName); + _hService = ::OpenService( + _hSCM, // handle to the SCM + serviceNameWide.c_str(),// name of the Service to delete + desiredAccess); // desired access + + if (! _hService) { + const DWORD lastError = ::GetLastError(); + + // If the service doesn't exist, then this is a no-op. + if (ERROR_SERVICE_DOES_NOT_EXIST == lastError) { + if (isExceptionOnMissingService) { + const DWORD lastError = ::GetLastError(); + const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(lastError); + CAF_CM_EXCEPTION_VA2(lastError, "::OpenService() says that the service does not exist - serviceName: %s, msg: \"%s\"", + _serviceName.c_str(), errorMsg.c_str()); + } + + isServiceFound = false; + } else { + const DWORD lastError = ::GetLastError(); + const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(lastError); + CAF_CM_EXCEPTION_VA2(lastError, "::OpenService() Failed - serviceName: %s, msg: \"%s\"", + _serviceName.c_str(), errorMsg.c_str()); + } + } + } + CAF_CM_EXIT; + + return isServiceFound; +} + +/////////////////////////////////////////////////////////////////////////////// +// +// CWinScm::getServiceConfig() +// +/////////////////////////////////////////////////////////////////////////////// +CWinScm::SmartPtrSServiceConfig CWinScm::getServiceConfig( + const bool isExceptionOnMissingService) { + CAF_CM_FUNCNAME("getServiceConfig"); + + SmartPtrSServiceConfig spcConfig; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + if (openService(isExceptionOnMissingService, SC_MANAGER_CONNECT, SERVICE_QUERY_CONFIG)) { + // Docs say that 8K is the max so just go for it + BYTE configBuffer[8192]; + LPQUERY_SERVICE_CONFIG pstServiceConfig = reinterpret_cast(configBuffer); + + DWORD dwBytesNeeded = 0; + if (0 == ::QueryServiceConfig( + _hService, + pstServiceConfig, + 8191, + &dwBytesNeeded)) { + const DWORD lastError = ::GetLastError(); + const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(lastError); + CAF_CM_EXCEPTION_VA2(lastError, "::QueryServiceConfig() Failed - serviceName: %s, msg: \"%s\"", + _serviceName.c_str(), errorMsg.c_str()); + } + + // Copy the data into a smart class + spcConfig.CreateInstance(); + spcConfig->_serviceType = pstServiceConfig->dwServiceType; + spcConfig->_startType = pstServiceConfig->dwStartType; + spcConfig->_errorControl = pstServiceConfig->dwErrorControl; + spcConfig->_binaryPathName = CStringUtils::convertWideToNarrow(pstServiceConfig->lpBinaryPathName); + spcConfig->_loadOrderGroup = CStringUtils::convertWideToNarrow(pstServiceConfig->lpLoadOrderGroup); + spcConfig->_tagId = pstServiceConfig->dwTagId; + spcConfig->_dependencies = CStringUtils::convertWideToNarrow(pstServiceConfig->lpDependencies); + spcConfig->_serviceStartName = CStringUtils::convertWideToNarrow(pstServiceConfig->lpServiceStartName); + spcConfig->_displayName = CStringUtils::convertWideToNarrow(pstServiceConfig->lpDisplayName); + } + } + CAF_CM_EXIT; + + return spcConfig; +} + +/////////////////////////////////////////////////////////////////////////////// +// +// CWinScm::closeHandle() +// +// Closes a handle. +// +/////////////////////////////////////////////////////////////////////////////// +void CWinScm::closeHandle( + SC_HANDLE& rhService) { + CAF_CM_FUNCNAME("closeHandle"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + if (rhService) { + if (0 == ::CloseServiceHandle(rhService)) { + const DWORD cdwError = ::GetLastError(); + CAF_CM_LOG_ERROR_VA1("::CloseServiceHandle() Failed - serviceName: %s", _serviceName); + } + + rhService = NULL; + } + } + CAF_CM_EXIT; +} + +/////////////////////////////////////////////////////////////////////////////// +// +// CWinScm::startServiceInternal() +// +// Starts the Service +// +/////////////////////////////////////////////////////////////////////////////// +SERVICE_STATUS CWinScm::startServiceInternal( + const DWORD startPollMax, + const DWORD startPollIntervalMillisecs) { + CAF_CM_FUNCNAME("startServiceInternal"); + + SERVICE_STATUS stServiceStatus; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + // Make sure the previous service (if any) is closed. + closeHandle(_hService); + + // Initialize the input param. + ::memset(&stServiceStatus, 0, sizeof(stServiceStatus)); + + // Is the service stopped? + if (getServiceStatus().dwCurrentState == SERVICE_RUNNING) { + CAF_CM_LOG_WARN_VA1("The service is already running - serviceName: %s", _serviceName.c_str()); + } else { + // Start the service. + if (0 == ::StartService(_hService, 0, NULL)) { + const DWORD lastError = ::GetLastError(); + if (ERROR_SERVICE_ALREADY_RUNNING != lastError) { + const DWORD lastError = ::GetLastError(); + const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(lastError); + CAF_CM_EXCEPTION_VA2(lastError, "::StartService() Failed - serviceName: %s, msg: \"%s\"", + _serviceName.c_str(), errorMsg.c_str()); + } + + CAF_CM_LOG_WARN_VA1("The service is already running - serviceName: %s", _serviceName.c_str()); + } + + // Wait for the service to start. + for (DWORD dwPollCnt = 0; dwPollCnt < startPollMax; dwPollCnt++) { + // Is the service running? + if (getServiceStatus().dwCurrentState == SERVICE_RUNNING) { + break; + } + + // Give the Service time to start + ::Sleep(startPollIntervalMillisecs); + } + } + + stServiceStatus = getServiceStatus(); + } + CAF_CM_EXIT; + + return stServiceStatus; +} + +/////////////////////////////////////////////////////////////////////////////// +// +// CWinScm::getDependentServices() +// +// Gets all the services dependent on this one +// +/////////////////////////////////////////////////////////////////////////////// +void CWinScm::getDependentServices( + CdeqDependentOnMe& rdeqDependentOnMe) { + CAF_CM_FUNCNAME("getDependentServices"); + + static const DWORD scdwNumElems = 50; + static const DWORD scdwAddtlInfoPerElem = 100; + + ENUM_SERVICE_STATUS* serviceStatus = NULL; + + try { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + // Make sure the services is open. + openService(true, SC_MANAGER_CONNECT, SERVICE_ENUMERATE_DEPENDENTS); + + // Initialize the input param. + rdeqDependentOnMe.clear(); + + // Create a buffer with a default number of elements and additional + // info (used to contain the strings that the structure points to). + DWORD serviceStatusBufSz = scdwNumElems * scdwAddtlInfoPerElem; + serviceStatus = new ENUM_SERVICE_STATUS[serviceStatusBufSz + 1]; + + // Loop until all of the dependent services are retrieved. + BOOL bRet = FALSE; + BOOL bExitLoop = FALSE; + do { + // Get the dependent services. + DWORD dwBytesNeeded = 0; + DWORD dwNumServices = 0; + DWORD dwLastError = ERROR_SUCCESS; + bRet = ::EnumDependentServices( + _hService, + SERVICE_ACTIVE, + serviceStatus, + serviceStatusBufSz, + &dwBytesNeeded, + &dwNumServices); + + // If the call returned FALSE get the last error. FALSE isn't necessarily + // a bad condition. The last error must be checked. + if (! bRet) + dwLastError = ::GetLastError(); + + // If the call returned FALSE AND the last error isn't "more data" + // then this is a bad condition. + if (! bRet && (dwLastError != ERROR_MORE_DATA)) { + const DWORD lastError = ::GetLastError(); + const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(lastError); + CAF_CM_EXCEPTION_VA2(lastError, "::EnumDependentServices() Failed - serviceName: %s, msg: \"%s\"", + _serviceName.c_str(), errorMsg.c_str()); + } + + // One of three things is possible: + // + // 1. There are services available and the last error + // was "more data" + // + // 2. There are no services available and the call + // returned TRUE: i.e. no dependent services + // + // 3. There are no services and the call returned + // FALSE: i.e. the buffer isn't big enough + + if (0 == dwNumServices) { + // If the call returned TRUE then this simply means + // that there are no services. + if (bRet) { + bExitLoop = true; + } else { + if (dwBytesNeeded < sizeof(ENUM_SERVICE_STATUS)) { + CAF_CM_EXCEPTIONEX_VA1( + InvalidArgumentException, E_INVALIDARG, + "dwBytesNeeded < sizeof(ENUM_SERVICE_STATUS) - serviceName: %s", _serviceName.c_str()); + } + + // Resize the buffer to contain all of the bytes. + delete[] serviceStatus; + serviceStatusBufSz = dwBytesNeeded - sizeof(ENUM_SERVICE_STATUS); + serviceStatus = new ENUM_SERVICE_STATUS[serviceStatusBufSz + 1]; + } + } else { + // Loop through the services returned and add them to the list + for (DWORD dwServiceIndex = 0; dwServiceIndex < dwNumServices; dwServiceIndex++) { + const std::string serviceName = CStringUtils::convertWideToNarrow(serviceStatus[ dwServiceIndex ].lpServiceName); + rdeqDependentOnMe.push_back(serviceName); + } + + bExitLoop = true; + } + } while(!bExitLoop); + } + CAF_CM_CATCH_ALL; + + if (serviceStatus != NULL) { + delete[] serviceStatus; + } + + CAF_CM_THROWEXCEPTION; +} + +CWinScm::ERc CWinScm::stopDependentServices( + CdeqDependentOnMe& rdeqDependentOnMe, + const DWORD stopRetryMax/* = s_stopRetryMax*/, + const DWORD stopRetryIntervalMillisecs/* = s_stopRetryIntervalMillisecs*/) { + CAF_CM_FUNCNAME("stopDependentServices"); + + ERc eRcDependentsStopped = ERcSucceeded; + + CAF_CM_ENTER { + // stop the services dependent upon us from outside to inside + CdeqDependentOnMe::iterator deqIter = rdeqDependentOnMe.begin(); + CdeqDependentOnMe::iterator deqIterEnd = rdeqDependentOnMe.end(); + SmartPtrCWinScm dependentScm; + for (; deqIter != deqIterEnd; deqIter++) { + const std::string depServiceName = *deqIter; + + SERVICE_STATUS stServiceStatus; + ::memset(&stServiceStatus, 0, sizeof(stServiceStatus)); + + // Create SCM object for the dependent service + dependentScm.CreateInstance(); + dependentScm->initialize(depServiceName, _machineName); + + // Tell the service to stop. + if (dependentScm->getServiceStatus().dwCurrentState != SERVICE_STOP_PENDING) { + dependentScm->controlService(SERVICE_CONTROL_STOP); + } + + // Wait for the service to stop. + for (DWORD stopCnt = 0; stopCnt < stopRetryMax; stopCnt++) { + CAF_CM_LOG_INFO_VA2("Waiting for dependent service to stop - serviceName: %s", depServiceName.c_str(), stopCnt); + + // Is the service stopped? + stServiceStatus = dependentScm->getServiceStatus(); + if (stServiceStatus.dwCurrentState == SERVICE_STOPPED) { + break; + } + + // Give the Service time to stop + ::Sleep(stopRetryIntervalMillisecs); + } + + stServiceStatus = dependentScm->getServiceStatus(); + if (stServiceStatus.dwCurrentState != SERVICE_STOPPED) { + eRcDependentsStopped = ERcFailed; + CAF_CM_LOG_ERROR_VA1("Failed to stop dependent service - serviceName: %s", depServiceName.c_str()); + break; + } + } + } + CAF_CM_EXIT; + + return eRcDependentsStopped; +} + +/////////////////////////////////////////////////////////////////////////////// +// +// CWinScm::attachScm() +// +// Attaches to the SCM. +// +/////////////////////////////////////////////////////////////////////////////// +CWinScm::ERc CWinScm::attachScm( + const DWORD desiredAccess/* = SC_MANAGER_ALL_ACCESS*/, + const bool isExceptionOnFailure/* = true*/) { + CAF_CM_FUNCNAME("attachScm"); + + ERc eRc = ERcSucceeded; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + if (! _hSCM) { + // Open the Sevice Control Manager. + const std::wstring machineNameWide = CStringUtils::convertNarrowToWide(_machineName); + _hSCM = ::OpenSCManager(machineNameWide.c_str(), NULL, desiredAccess); + if (! _hSCM) { + // Get the error that describes what happened. + const DWORD lastError = ::GetLastError(); + + // If the user wants an exception, give it to 'em. + if (isExceptionOnFailure) { + const DWORD lastError = ::GetLastError(); + const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(lastError); + CAF_CM_EXCEPTION_VA2(lastError, "::OpenSCManager() Failed - serviceName: %s, msg: \"%s\"", + _serviceName.c_str(), errorMsg.c_str()); + } + + // If the user doesn't want an exception, then log it as a warning. + CAF_CM_LOG_WARN_VA1("::OpenSCManager() Failed - serviceName: %s", _serviceName.c_str()); + + // Map the return code. + switch(lastError) { + case ERROR_ACCESS_DENIED: + eRc = ERcAccessDenied; + break; + + default: + eRc = ERcFailed; + break; + } + } + } + } + CAF_CM_EXIT; + + return eRc; +} + +void CWinScm::grantPrivilege( + const std::wstring& privilegeWide) { + CAF_CM_FUNCNAME("grantPrivilege"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(privilegeWide); + + DWORD lastError = 0; + + HANDLE hToken = NULL; + const BOOL bCallSucceeded = ::OpenProcessToken( + ::GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken); + if (! bCallSucceeded) { + lastError = ::GetLastError(); + CAF_CM_LOG_WARN_VA0("::OpenProcessToken() Failed"); + } else { + const std::string privilege = CStringUtils::convertWideToNarrow(privilegeWide); + + LUID stLuidPrivilege; + if (::LookupPrivilegeValue(NULL, privilegeWide.c_str(), &stLuidPrivilege)) { + TOKEN_PRIVILEGES tkp; + tkp.PrivilegeCount = 1; + tkp.Privileges[0].Luid = stLuidPrivilege; + tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; + if (! ::AdjustTokenPrivileges(hToken, FALSE, + &tkp, sizeof( tkp ), NULL, NULL)) { + lastError = ::GetLastError(); + CAF_CM_LOG_WARN_VA1("::AdjustTokenPrivileges Failed - privilege: %s", privilege.c_str()); + } + } + else + { + lastError = ::GetLastError(); + CAF_CM_LOG_WARN_VA1("::LookupPrivilegeValue Failed - privilege: %s", privilege.c_str()); + } + } + } + CAF_CM_EXIT; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CWinScm.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CWinScm.h new file mode 100644 index 000000000..c05402d2f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CWinScm.h @@ -0,0 +1,186 @@ +/* + * Author: bwilliams + * Created: June 25, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CWinScm_h_ +#define CWinScm_h_ + +namespace Caf { + +/// TODO - describe class +class COMMONAGGREGATOR_LINKAGE CWinScm { +public: + typedef enum { + ERcSucceeded, + ERcFailed, + ERcAccessDenied + } ERc; + + struct SServiceConfig { + DWORD _serviceType; + DWORD _startType; + DWORD _errorControl; + std::string _binaryPathName; + std::string _loadOrderGroup; + DWORD _tagId; + std::string _dependencies; + std::string _serviceStartName; + std::string _displayName; + }; + CAF_DECLARE_SMART_POINTER(SServiceConfig); + +public: + typedef std::vector CvecDependencies; + typedef std::deque CdeqDependentOnMe; + +public: + CWinScm(); + CWinScm(const std::string& serviceName); + virtual ~CWinScm(); + +public: + /// Initializes the object. + void initialize( + const std::string& serviceName, + const std::string& machineName); + +public: + /// Creates the Service. + void createService( + const std::string& crstrServiceFilename, + const DWORD cdwStartType = SERVICE_DEMAND_START, + const CvecDependencies cvecDependencies = CvecDependencies()); + + /// Creates the Service. + void createService( + const std::string& crstrServiceFilename, + const std::string& crstrServiceDisplayName, + const std::string& crstrServiceDescription, + const std::string& crstrServiceAccountName, + const std::string& crstrServiceAccountPasswd, + const DWORD cdwStartType = SERVICE_DEMAND_START, + const CvecDependencies cvecDependencies = CvecDependencies()); + +public: + void changeService( + const std::string& crstrServiceFilename, + const std::string& crstrServiceDisplayName = std::string(), + const std::string& crstrServiceDescription = std::string(), + const std::string& crstrServiceAccountName = std::string(), + const std::string& crstrServiceAccountPasswd = std::string(), + const DWORD cdwStartupType = SERVICE_NO_CHANGE); + + void changeServiceRecoveryProperties( + const std::string& crstrServiceFilename, + const DWORD cdwFirstFailureAction, + const DWORD cdwSecondFailureAction, + const DWORD cdwSubsequentFailureAction, + const DWORD cdwResetFailureCountAfter_days, + const DWORD cdwRestartServiceAfter_minutes, + const LPCWSTR clpstrCommandLineToRun, + const DWORD cdwRebootComputerAfter_minutes, + const LPCWSTR clpstrRestartMessage ); + +public: + void deleteService( + const DWORD cdwStopRetryMax = s_stopRetryMax, + const DWORD cdwStopRetryIntervalMillisecs = s_stopRetryIntervalMillisecs, + const DWORD cdwServicePid = 0); + +public: + SERVICE_STATUS startService( + const DWORD cdwStartPollMax = s_startPollMax, + const DWORD cdwStartPollIntervalMillisecs = s_startPollIntervalMillisecs, + const DWORD cdwStartRetryMax = s_startRetryMax, + const DWORD cdwStartRetryIntervalMillisecs = s_startRetryIntervalMillisecs); + + SERVICE_STATUS stopService( + const DWORD cdwStopRetryMax = s_stopRetryMax, + const DWORD cdwStopRetryIntervalMillisecs = s_stopRetryIntervalMillisecs, + const DWORD cdwServicePid = 0); + +public: + SERVICE_STATUS getServiceStatus( + const bool cbIsExceptionOnMissingService = true); + + SERVICE_STATUS controlService( + const DWORD cdwCommand); + + bool openService( + const bool cbIsExceptionOnMissingService, + const DWORD scmDesiredAccess = SC_MANAGER_ALL_ACCESS, + const DWORD desiredAccess = SERVICE_ALL_ACCESS + ); + + void setStatus( + const SERVICE_STATUS_HANDLE chSrv, + const DWORD cdwState, + const DWORD cdwExitCode, + const DWORD cdwProgress = 0, + const DWORD cdwWaitHintMilliseconds = 3000 ); + +public: + void getDependentServices( + CdeqDependentOnMe& rdeqDependentOnMe); + + ERc stopDependentServices( + CdeqDependentOnMe& rdeqDependentOnMe, + const DWORD cdwStopRetryMax = s_stopRetryMax, + const DWORD cdwStopRetryIntervalMillisecs = s_stopRetryIntervalMillisecs); + + SmartPtrSServiceConfig getServiceConfig( + const bool cbIsExceptionOnMissingService = true); + +private: + void closeHandle(SC_HANDLE& rhService); + + SERVICE_STATUS startServiceInternal( + const DWORD cdwStartPollMax = s_startPollMax, + const DWORD cdwStartPollIntervalMillisecs = s_startPollIntervalMillisecs); + + void attachScmRequired( + const DWORD desiredAccess = SC_MANAGER_ALL_ACCESS); + + void attachScmOptional( + const DWORD desiredAccess = SC_MANAGER_ALL_ACCESS); + + ERc attachScm( + const DWORD cdwDesiredAccess = SC_MANAGER_ALL_ACCESS, + const bool cbIsExceptionOnFailure = true); + + void grantPrivilege( + const std::wstring& privilegeWide); + +private: + // The maximum number of times to wait for the service to stop and time + // to wait between each attempt. + static const DWORD s_stopRetryMax; + static const DWORD s_stopRetryIntervalMillisecs; + + static const DWORD s_startPollMax; + static const DWORD s_startPollIntervalMillisecs; + static const DWORD s_startRetryMax; + static const DWORD s_startRetryIntervalMillisecs; + +private: + bool _isInitialized; + std::string _serviceName; + std::string _machineName; + SC_HANDLE _hSCM; + SC_HANDLE _hService; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CWinScm); +}; + +CAF_DECLARE_SMART_POINTER(CWinScm); + +} + +#endif // #ifndef CWinScm_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CWinServiceInstance.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CWinServiceInstance.cpp new file mode 100644 index 000000000..64ee349a2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CWinServiceInstance.cpp @@ -0,0 +1,209 @@ +/* + * Author: bwilliams + * Created: June 25, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CWinServiceInstance.h" + +CWinServiceInstance::CWinServiceInstance() : + CAF_CM_INIT_LOG("CWinServiceInstance"), + _isInitialized(false) { +} + +CWinServiceInstance::~CWinServiceInstance() { + CAF_CM_FUNCNAME("~CWinServiceInstance"); +} + +void CWinServiceInstance::initialize( + const SmartPtrCWinServiceState& winServiceState) { + CAF_CM_FUNCNAME("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(winServiceState); + + _winServiceState = winServiceState; + _isInitialized = true; +} + +//////////////////////////////////////////////////////////////////////// +// +// CWinServiceInstance::runService() +// +// Fires off and monitors the main service thread +// +//////////////////////////////////////////////////////////////////////// +void CWinServiceInstance::runService() { + CAF_CM_FUNCNAME("runService"); + + static const DWORD scdwCheckStateSecs = 10; + + try { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + // Loop until stop event... + bool bIsContinue = true; + while (bIsContinue) { + const bool isSignaled = _winServiceState->waitForServiceStop( + scdwCheckStateSecs * 1000); + if (isSignaled) { + CAF_CM_LOG_INFO_VA0("Received the stop event"); + + // Let the worker thread know it's time to stop. + const SmartPtrIWork work = _winServiceState->getWork(); + work->stopWork(); + + bIsContinue = false; + } + + // Check the worker thread + if (bIsContinue) { + const bool isWorkerSignaled = + _winServiceState->waitForWorkerThreadFinished(10); + if (isWorkerSignaled) { + CAF_CM_LOG_INFO_VA0("Worker thread is not running"); + bIsContinue = false; + } + } + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + + try { + CAF_CM_LOG_INFO_VA0("Service is stopping - waiting for worker thread to finish"); + + const bool isSignaled = _winServiceState->waitForWorkerThreadFinished( + _winServiceState->getWorkerThreadStopMs()); + if (!isSignaled) { + CAF_CM_LOG_WARN_VA1("Worker thread did not stop within timeout period - %d", + _winServiceState->getWorkerThreadStopMs()); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + + CAF_CM_THROWEXCEPTION; +} + +void CWinServiceInstance::runWorkerThread() { + CAF_CM_FUNCNAME("runWorkerThread"); + + try { + CafInitialize::init(); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + _winServiceState->putCurrentServiceState(SERVICE_RUNNING); + if (_winServiceState->getIsService()) { + _winServiceState->setStatus(); + } + + const SmartPtrIWork work = _winServiceState->getWork(); + work->doWork(); + + _winServiceState->putCurrentServiceState(SERVICE_STOP_PENDING); + if (_winServiceState->getIsService()) { + _winServiceState->setStatus(); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + + try { + CAF_CM_LOG_INFO_VA0("workerThread is shutting down"); + + // Let the main thread know what's going on. + _winServiceState->signalServiceStop(); + _winServiceState->signalWorkerThreadFinished(); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + + CafInitialize::term(); + + CAF_CM_THROWEXCEPTION; +} + +CWinServiceInstance::SCommandLineParams CWinServiceInstance::processCommandLine( + int32 argc, + char** argv) const { + CAF_CM_FUNCNAME("processCommandLine"); + + CAF_CM_LOG_DEBUG_VA0("processCommandLine"); + + SCommandLineParams commandLineParams; + if (argc == 1) { + commandLineParams._eMode = EModeRunAsService; + } else if (argc == 2) { + if ((::_stricmp("/Service", argv[1]) == 0) + || (::_stricmp("-Service", argv[1]) == 0) + || (::_stricmp("/RegServer", argv[1]) == 0) + || (::_stricmp("-RegServer", argv[1]) == 0)) { + commandLineParams._eMode = EModeRegister; + } else if ((::_stricmp("/UnregService", argv[1]) == 0) + || (::_stricmp("-UnregService", argv[1]) == 0) + || (::_stricmp("/UnregServer", argv[1]) == 0) + || (::_stricmp("-UnregServer", argv[1]) == 0)) { + commandLineParams._eMode = EModeUnregister; + } else if ((::_stricmp("/n", argv[1]) == 0) + || (::_stricmp("-n", argv[1]) == 0)) { + commandLineParams._eMode = EModeRunAsConsole; + } else { + commandLineParams._eMode = EModeUnknown; + CWinServiceInstance::usage(_winServiceState->getServiceName()); + } + } else { + commandLineParams._eMode = EModeUnknown; + CWinServiceInstance::usage(_winServiceState->getServiceName()); + } + + return commandLineParams; +} + +void CWinServiceInstance::install( + const std::string& fileName) const { + CAF_CM_FUNCNAME("install"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CAF_CM_LOG_DEBUG_VA2("Installing the service - serviceName: %s, path: %s", + _winServiceState->getServiceName().c_str(), fileName.c_str()); + + // Create the service. + CWinScm winScm(_winServiceState->getServiceName()); + winScm.createService( + fileName, // ServiceFilename + _winServiceState->getDisplayName(), // ServiceDisplayName, + _winServiceState->getDescription(), // ServiceDescription, + std::string(), // ServiceAccountName, + std::string(), //ServiceAccountPasswd, + SERVICE_AUTO_START); +} + +void CWinServiceInstance::uninstall() const { + CAF_CM_FUNCNAME("uninstall"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CAF_CM_LOG_DEBUG_VA1("Uninstalling the service - serviceName: %s", + _winServiceState->getServiceName().c_str()); + + // Remove the service. + CWinScm winScm(_winServiceState->getServiceName()); + winScm.deleteService(); +} + +void CWinServiceInstance::usage( + const std::string& serviceName) const { + CAF_CM_FUNCNAME("usage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + ::fprintf(stderr, "usage: %s [/Service] | [-Service] |\n" + "\t[/RegServer] | [-RegServer]\n" + "\tRegister service\n\n", serviceName.c_str()); + ::fprintf(stderr, "usage: %s [/UnregService] | [-UnregService] |\n" + "\t[/UnregServer] | [-UnregServer]\n" + "\tUnregister service\n\n", serviceName.c_str()); + ::fprintf(stderr, "usage: %s -n\n" + "\t[-n]\tRun in console mode\n", serviceName.c_str()); +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CWinServiceInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CWinServiceInstance.h new file mode 100644 index 000000000..0d0e68310 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CWinServiceInstance.h @@ -0,0 +1,75 @@ +/* + * Author: bwilliams + * Created: June 25, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CWinServiceInstance_h_ +#define CWinServiceInstance_h_ + +namespace Caf { + +class COMMONAGGREGATOR_LINKAGE CWinServiceInstance { +public: + typedef enum EServerMode { + EModeUnknown, + EModeRunAsService, + EModeRunAsConsole, + EModeRegister, + EModeUnregister + }; + + struct SCommandLineParams { + EServerMode _eMode; + }; + +public: + CWinServiceInstance(); + virtual ~CWinServiceInstance(); + +public: + /// Initializes the component. + void initialize( + const SmartPtrCWinServiceState& winServiceState); + + /// Monitors for the signal indicating that the service should be stopped. + void runService(); + + /// Runs in the worker thread and performs the work of this service. + void runWorkerThread(); + +public: + /// Processes the command-line arguments. + SCommandLineParams processCommandLine( + int32 argc, + char** argv) const; + + /// Installs the service. + void install( + const std::string& fileName) const; + + /// Uninstalls the service. + void uninstall() const; + +private: + /// Produces the usage message. + void usage( + const std::string& serviceName) const; + +public: + bool _isInitialized; + SmartPtrCWinServiceState _winServiceState; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CWinServiceInstance); +}; + +CAF_DECLARE_SMART_POINTER(CWinServiceInstance); + +} + +#endif // #ifndef CWinServiceInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CWinServiceState.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CWinServiceState.cpp new file mode 100644 index 000000000..0cec9fdde --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CWinServiceState.cpp @@ -0,0 +1,336 @@ +/* + * Author: bwilliams + * Created: June 29, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CWinServiceState.h" + +using namespace Caf; + +CWinServiceState::CWinServiceState() : + CAF_CM_INIT_LOG("CWinServiceState"), + _isInitialized(false), + _isService(true), + _serviceHandle(NULL), + _currentServiceState(0), + _scmWaitHintMs(3000), + _workerThreadStopMs(1500) { + CAF_CM_INIT_THREADSAFE; + _waitMutex.CreateInstance(); + _waitMutex->initialize(); +} + +CWinServiceState::~CWinServiceState() { +} + +void CWinServiceState::initialize( + const std::string& serviceName, + const std::string& displayName, + const std::string& description, + const SmartPtrIWork& work) { + CAF_CM_FUNCNAME("initialize"); + + CAF_CM_ENTER_AND_LOCK { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(serviceName); + CAF_CM_VALIDATE_STRING(displayName); + CAF_CM_VALIDATE_SMARTPTR(work); + + // Store the elements of the path into member variables. + _serviceName = serviceName; + _displayName = displayName; + _description = description; + _work = work; + + _serviceStopSignal.initialize("serviceStopSignal"); + _workerThreadFinishedSignal.initialize("workerThreadFinishedSignal"); + + _isInitialized = true; + } + CAF_CM_UNLOCK_AND_EXIT; +} + +std::string CWinServiceState::getServiceName() const { + CAF_CM_FUNCNAME("getServiceName"); + + std::string rc; + + CAF_CM_ENTER_AND_LOCK { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _serviceName; + } + CAF_CM_UNLOCK_AND_EXIT; + + return rc; +} + +std::string CWinServiceState::getDisplayName() const { + CAF_CM_FUNCNAME("getDisplayName"); + + std::string rc; + + CAF_CM_ENTER_AND_LOCK { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _displayName; + } + CAF_CM_UNLOCK_AND_EXIT; + + return rc; +} + +std::string CWinServiceState::getDescription() const { + CAF_CM_FUNCNAME("getDescription"); + + std::string rc; + + CAF_CM_ENTER_AND_LOCK { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _description; + } + CAF_CM_UNLOCK_AND_EXIT; + + return rc; +} + +SmartPtrIWork CWinServiceState::getWork() const { + CAF_CM_FUNCNAME("getWork"); + + SmartPtrIWork rc; + + CAF_CM_ENTER_AND_LOCK { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _work; + } + CAF_CM_UNLOCK_AND_EXIT; + + return rc; +} + +DWORD CWinServiceState::getWorkerThreadStopMs() const { + CAF_CM_FUNCNAME("getWorkerThreadStopMs"); + + DWORD rc = 0; + + CAF_CM_ENTER_AND_LOCK { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _workerThreadStopMs; + } + CAF_CM_UNLOCK_AND_EXIT; + + return rc; +} + +DWORD CWinServiceState::getScmWaitHintMs() const { + CAF_CM_FUNCNAME("getScmWaitHintMs"); + + DWORD rc = 0; + + CAF_CM_ENTER_AND_LOCK { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _scmWaitHintMs; + } + CAF_CM_UNLOCK_AND_EXIT; + + return rc; +} + +bool CWinServiceState::getIsService() const { + CAF_CM_FUNCNAME("getIsService"); + + bool rc = false; + + CAF_CM_ENTER_AND_LOCK { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _isService; + } + CAF_CM_UNLOCK_AND_EXIT; + + return rc; +} + +void CWinServiceState::putIsService( + const bool isService) { + CAF_CM_FUNCNAME("putIsService"); + + CAF_CM_ENTER_AND_LOCK { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _isService = isService; + } + CAF_CM_UNLOCK_AND_EXIT; +} + +SERVICE_STATUS_HANDLE CWinServiceState::getServiceHandle() const { + CAF_CM_FUNCNAME("getServiceHandle"); + + SERVICE_STATUS_HANDLE rc = NULL; + + CAF_CM_ENTER_AND_LOCK { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _serviceHandle; + } + CAF_CM_UNLOCK_AND_EXIT; + + return rc; +} + +void CWinServiceState::putServiceHandle( + const SERVICE_STATUS_HANDLE serviceHandle) { + CAF_CM_FUNCNAME("putServiceHandle"); + + CAF_CM_ENTER_AND_LOCK { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_PTR(serviceHandle); + _serviceHandle = serviceHandle; + } + CAF_CM_UNLOCK_AND_EXIT; +} + +DWORD CWinServiceState::getCurrentServiceState() const { + CAF_CM_FUNCNAME("getCurrentServiceState"); + + DWORD rc = 0; + + CAF_CM_ENTER_AND_LOCK { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _currentServiceState; + } + CAF_CM_UNLOCK_AND_EXIT; + + return rc; +} + +std::string CWinServiceState::getCurrentServiceStateStr() const { + CAF_CM_FUNCNAME("getCurrentServiceState"); + + std::string rc; + + CAF_CM_ENTER_AND_LOCK { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + switch (_currentServiceState) { + case SERVICE_CONTINUE_PENDING: + rc = "SERVICE_CONTINUE_PENDING"; + break; + case SERVICE_PAUSE_PENDING: + rc = "SERVICE_PAUSE_PENDING"; + break; + case SERVICE_PAUSED: + rc = "SERVICE_PAUSED"; + break; + case SERVICE_RUNNING: + rc = "SERVICE_RUNNING"; + break; + case SERVICE_START_PENDING: + rc = "SERVICE_START_PENDING"; + break; + case SERVICE_STOP_PENDING: + rc = "SERVICE_STOP_PENDING"; + break; + case SERVICE_STOPPED: + rc = "SERVICE_STOPPED"; + break; + default: + rc = "Unknown"; + break; + } + } + CAF_CM_UNLOCK_AND_EXIT; + + return rc; +} + +void CWinServiceState::putCurrentServiceState( + const DWORD currentServiceState) { + CAF_CM_FUNCNAME("putCurrentServiceState"); + + CAF_CM_ENTER_AND_LOCK { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _currentServiceState = currentServiceState; + } + CAF_CM_UNLOCK_AND_EXIT; +} + +void CWinServiceState::signalServiceStop() { + CAF_CM_FUNCNAME("signalServiceStop"); + + CAF_CM_ENTER_AND_LOCK { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CAF_CM_LOG_DEBUG_VA1("Signal (%s)", _serviceStopSignal.getName().c_str()); + _serviceStopSignal.signal(); + } + CAF_CM_UNLOCK_AND_EXIT; +} + +bool CWinServiceState::waitForServiceStop( + const uint32 timeoutMs) { + CAF_CM_FUNCNAME("waitForServiceStop"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + //CAF_CM_LOG_DEBUG_VA2("Wait (%s) - waitMs: %d", _serviceStopSignal.getName().c_str(), timeoutMs); + CAutoMutexLockUnlock waitMutexAutoLock(_waitMutex); + const bool isSignaled = _serviceStopSignal.waitOrTimeout(_waitMutex, timeoutMs); + + return isSignaled; +} + +void CWinServiceState::signalWorkerThreadFinished() { + CAF_CM_FUNCNAME("signalWorkerThreadFinished"); + + CAF_CM_ENTER_AND_LOCK { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CAF_CM_LOG_DEBUG_VA1("Signal (%s)", _workerThreadFinishedSignal.getName().c_str()); + _workerThreadFinishedSignal.signal(); + } + CAF_CM_UNLOCK_AND_EXIT; +} + +bool CWinServiceState::waitForWorkerThreadFinished( + const uint32 timeoutMs) { + CAF_CM_FUNCNAME("waitForWorkerThreadFinished"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + //CAF_CM_LOG_DEBUG_VA2("Wait (%s) - waitMs: %d", _workerThreadFinishedSignal.getName().c_str(), timeoutMs); + CAutoMutexLockUnlock waitMutexAutoLock(_waitMutex); + const bool isSignaled = _workerThreadFinishedSignal.waitOrTimeout(_waitMutex, timeoutMs); + + return isSignaled; +} + +void CWinServiceState::close() { + CAF_CM_FUNCNAME("close"); + + CAF_CM_ENTER_AND_LOCK { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + _serviceHandle = NULL; + _isService = true; + _currentServiceState = 0; + _scmWaitHintMs = 3000; + _workerThreadStopMs = 1500; + + _serviceStopSignal.close(); + _workerThreadFinishedSignal.close(); + + _isInitialized = false; + } + CAF_CM_UNLOCK_AND_EXIT; +} + +void CWinServiceState::setStatus() { + CAF_CM_FUNCNAME("setStatus"); + + CAF_CM_LOG_DEBUG_VA1("setStatus - %s", getCurrentServiceStateStr().c_str()); + + CWinScm winScm(getServiceName()); + winScm.setStatus(getServiceHandle(), + getCurrentServiceState(), + (DWORD) NO_ERROR, + (DWORD) 0, + getScmWaitHintMs()); +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CWinServiceState.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CWinServiceState.h new file mode 100644 index 000000000..59f323970 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CWinServiceState.h @@ -0,0 +1,128 @@ +/* + * Author: bwilliams + * Created: June 29, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CWinServiceState_h_ +#define CWinServiceState_h_ + +namespace Caf { + +class COMMONAGGREGATOR_LINKAGE CWinServiceState { +public: + CWinServiceState(); + virtual ~CWinServiceState(); + +public: + /// Initializes the component. + void initialize( + const std::string& serviceName, + const std::string& displayName, + const std::string& description, + const SmartPtrIWork& work); + + /// Gets the name of the service. + std::string getServiceName() const; + + /// Gets the display name of the service. + std::string getDisplayName() const; + + /// Gets the Description of the service. + std::string getDescription() const; + + /// Gets interface for the implementation of the work to be + /// performed by this service. + SmartPtrIWork getWork() const; + +public: + /// Gets the number of Milliseconds to wait for the worker thread to stop. + DWORD getWorkerThreadStopMs() const; + + /// Gets the number of Milliseconds that the SCM should wait for a status update. + DWORD getScmWaitHintMs() const; + +public: + /// Gets whether the code is running as a service or as console (for debugging) + bool getIsService() const; + + /// Puts whether the code is running as a service or as console (for debugging) + void putIsService( + const bool isService); + + /// Gets the handle to this service. + SERVICE_STATUS_HANDLE getServiceHandle() const; + + /// Puts the handle to this service. + void putServiceHandle( + const SERVICE_STATUS_HANDLE serviceHandle); + + /// Gets the current state of this service. + DWORD getCurrentServiceState() const; + + /// Gets the current state of this service as a String (for debugging). + std::string getCurrentServiceStateStr() const; + + /// Puts the current state of this service that's updated by the code as it + /// runs through various phases. + void putCurrentServiceState( + const DWORD currentServiceState); + +public: + /// Sends a signal to the service, telling it that it's time to stop. + void signalServiceStop(); + + /// Wait for the service to stop. + bool waitForServiceStop( + const uint32 timeoutMs); + + /// Sends a signal indicating that the worker thread has finished working. + void signalWorkerThreadFinished(); + + /// Wait for the worker thread to finish working. + bool waitForWorkerThreadFinished( + const uint32 timeoutMs); + +public: + /// Closes everything down and re-sets the component. + void close(); + + // Wrapper function to implement API call SetServiceStatus + void setStatus(); + +private: + bool _isInitialized; + + std::string _serviceName; + std::string _displayName; + std::string _description; + SmartPtrIWork _work; + + DWORD _workerThreadStopMs; + DWORD _scmWaitHintMs; + + bool _isService; + + SERVICE_STATUS_HANDLE _serviceHandle; + + DWORD _currentServiceState; + + CThreadSignal _serviceStopSignal; + CThreadSignal _workerThreadFinishedSignal; + + SmartPtrCAutoMutex _waitMutex; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_CREATE_THREADSAFE; + CAF_CM_DECLARE_NOCOPY(CWinServiceState); +}; + +CAF_DECLARE_SMART_POINTER(CWinServiceState); + +} + +#endif // #ifndef CWinServiceState_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CafInitialize.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CafInitialize.cpp new file mode 100644 index 000000000..d31ddc3a0 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CafInitialize.cpp @@ -0,0 +1,53 @@ +/* + * Author: mdonahue + * Created: Jan 24, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CafInitialize.h" + +using namespace Caf; + +HRESULT CafInitialize::init() { + return S_OK; +} + +HRESULT CafInitialize::serviceConfig() { +#ifdef WIN32 +// CWinScm toolsScm("VMTools"); +// SmartPtrSServiceConfig toolsConfig = toolsScm.getServiceConfig(false); +// if (!toolsConfig.isNull()) { +// // Add to path +// } + + CWinScm vgAuthScm("VGAuthService"); + Caf::CWinScm::SmartPtrSServiceConfig vgAuthConfig = vgAuthScm.getServiceConfig(false); + if (!vgAuthConfig.IsNull() && !vgAuthConfig->_binaryPathName.empty()) { + // Add to path + std::string dllPath = vgAuthConfig->_binaryPathName; + if (dllPath[0] == '\"') { + dllPath = dllPath.substr(1, dllPath.length() - 2); + } + + const std::wstring dllPathWide = CStringUtils::convertNarrowToWide(FileSystemUtils::getDirname(dllPath)); + // NOTE: Can't use ::AddDllDirectory because it requires a newer base version of windows. Even so, + // MSDN documentation specifies search order to be non-deterministic. + if (0 == ::SetDllDirectory(dllPathWide.c_str())) { + const DWORD lastError = ::GetLastError(); + const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(lastError); + ::fprintf( + stderr, + "CafInitialize::serviceConfig() ::AddDllDirectory() Failed - : VGAuthService, msg: \"%s\"", + errorMsg.c_str()); + } + } +#endif + return S_OK; +} + +HRESULT CafInitialize::term() { + return S_OK; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CafInitialize.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CafInitialize.h new file mode 100644 index 000000000..415ed9e43 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CafInitialize.h @@ -0,0 +1,25 @@ +/* + * Author: mdonahue + * Created: Jan 24, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CAFINITIALIZE_H_ +#define CAFINITIALIZE_H_ + +namespace Caf { + +class COMMONAGGREGATOR_LINKAGE CafInitialize { +public: + static HRESULT init(); + static HRESULT serviceConfig(); + static HRESULT term(); + + CAF_CM_DECLARE_NOCREATE(CafInitialize); +}; + +} + +#endif /* CAFINITIALIZE_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CommonAggregatorLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CommonAggregatorLink.h new file mode 100644 index 000000000..05953a9a2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CommonAggregatorLink.h @@ -0,0 +1,88 @@ +/* + * Author: mdonahue + * Created: Jan 13, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef COMMONAGGREGATORLINK_H_ +#define COMMONAGGREGATORLINK_H_ + +#ifndef COMMONAGGREGATOR_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define COMMONAGGREGATOR_LINKAGE __declspec(dllexport) + #else + #define COMMONAGGREGATOR_LINKAGE __declspec(dllimport) + #endif + #else + #define COMMONAGGREGATOR_LINKAGE + #endif +#endif + +#include +#include +#include +#include +#include + +#include + +#include "../Globals/CommonGlobalsLink.h" +#include "../Logging/LoggingLink.h" +#include "../Exception/ExceptionLink.h" +#include "../Collections/Iterators/IteratorsInc.h" +#include "../Collections/Graphs/GraphsInc.h" + +#include "CTimeUnit.h" +#include "CFileLock.h" +#include "CAutoFileUnlock.h" +#include "CCafRegex.h" +#include "CStringUtils.h" +#include "CFileSystemUtils.h" +#include "CProcessUtils.h" +#include "CDateTimeUtils.h" +#include "CThreadUtils.h" +#include "IConfigParams.h" +#include "CConfigParams.h" +#include "CConfigParamsChain.h" +#include "IAppConfig.h" +#include "IAppConfigWrite.h" +#include "IAppContext.h" +#include "AppConfigUtils.h" +#include "CAutoMutex.h" +#include "CAutoRecMutex.h" +#include "CAutoCondition.h" +#include "CAutoMutexLockUnlock.h" +#include "CAutoMutexUnlockLock.h" +#include "CThreadSignal.h" +#include "CCmdLineOptions.h" +#include "CafInitialize.h" +#include "CHexCodec.h" +#include "UriUtils.h" +#include "CLoggingUtils.h" +#include "CLoggingSetter.h" +#include "CThreadPool.h" +#include "CManagedThreadPool.h" +#include "TBlockingCell.h" +#include "CIniFile.h" +#include "CVariant.h" +#include "CEnvironmentUtils.h" +#include "CPersistenceUtils.h" +#include "IWork.h" + +#if defined(__linux__) || defined(__APPLE__) +#include "CDaemonUtils.h" +#elif WIN32 +#include "CWinScm.h" +#include "CWinServiceState.h" +#include "CWinServiceInstance.h" +#endif + +#include "../SubSystemBase/SubSystemBaseLink.h" +#include "../Xml/MarkupParser/MarkupParserLink.h" +#include "../Xml/XmlUtils/XmlUtilsLink.h" +#include "../Memory/DynamicArray/DynamicArrayInc.h" + +#endif /* COMMONAGGREGATORLINK_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/IAppConfig.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/IAppConfig.h new file mode 100644 index 000000000..b0f11a76c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/IAppConfig.h @@ -0,0 +1,65 @@ +/* + * Author: mdonahue + * Created: Jan 19, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef IAPPCONFIG_H_ +#define IAPPCONFIG_H_ + +namespace Caf { + +struct __declspec(novtable) +IAppConfig : public ICafObject { + CAF_DECL_UUID("e57f2252-ce11-4d15-9338-aa928333f7a3") + + virtual SmartPtrIConfigParams getParameters(const std::string& sectionName) = 0; + + virtual bool getString( + const std::string& sectionName, + const std::string& parameterName, + std::string& value, + const IConfigParams::EParamDisposition disposition = IConfigParams::PARAM_REQUIRED) = 0; + + virtual bool getUint32( + const std::string& sectionName, + const std::string& parameterName, + uint32& value, + const IConfigParams::EParamDisposition disposition = IConfigParams::PARAM_REQUIRED) = 0; + + virtual bool getBoolean( + const std::string& sectionName, + const std::string& parameterName, + bool& value, + const IConfigParams::EParamDisposition disposition = IConfigParams::PARAM_REQUIRED) = 0; + + virtual bool getGlobalString( + const std::string& parameterName, + std::string& value, + const IConfigParams::EParamDisposition disposition = IConfigParams::PARAM_REQUIRED) = 0; + + virtual bool getGlobalUint32( + const std::string& parameterName, + uint32& value, + const IConfigParams::EParamDisposition disposition = IConfigParams::PARAM_REQUIRED) = 0; + + virtual bool getGlobalBoolean( + const std::string& parameterName, + bool& value, + const IConfigParams::EParamDisposition disposition = IConfigParams::PARAM_REQUIRED) = 0; + + virtual std::string resolveValue(const std::string& value) = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IAppConfig); + +SmartPtrIAppConfig COMMONAGGREGATOR_LINKAGE getAppConfig(); + +SmartPtrIAppConfig COMMONAGGREGATOR_LINKAGE getAppConfig(const std::string& configFile); + +SmartPtrIAppConfig COMMONAGGREGATOR_LINKAGE getAppConfig(const Cdeqstr& configFileCollection); +} + +#endif /* IAPPCONFIG_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/IAppConfigWrite.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/IAppConfigWrite.h new file mode 100644 index 000000000..5d2048481 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/IAppConfigWrite.h @@ -0,0 +1,55 @@ +/* + * Author: bwilliams + * Created: Jan 28, 2015 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef IAPPCONFIGWRITE_H_ +#define IAPPCONFIGWRITE_H_ + +namespace Caf { + +struct __declspec(novtable) +IAppConfigWrite : public ICafObject { + CAF_DECL_UUID("3cf708c6-b92d-46c3-83d8-edeccecf5ba4") + + virtual void setString( + const std::string& sectionName, + const std::string& parameterName, + const std::string& value) = 0; + + virtual void setUint32( + const std::string& sectionName, + const std::string& parameterName, + const uint32& value) = 0; + + virtual void setBoolean( + const std::string& sectionName, + const std::string& parameterName, + const bool& value) = 0; + + virtual void setGlobalString( + const std::string& parameterName, + const std::string& value) = 0; + + virtual void setGlobalUint32( + const std::string& parameterName, + const uint32& value) = 0; + + virtual void setGlobalBoolean( + const std::string& parameterName, + const bool& value) = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IAppConfigWrite); + +SmartPtrIAppConfigWrite COMMONAGGREGATOR_LINKAGE getAppConfigWrite(); + +SmartPtrIAppConfigWrite COMMONAGGREGATOR_LINKAGE getAppConfigWrite(const std::string& configFile); + +SmartPtrIAppConfigWrite COMMONAGGREGATOR_LINKAGE getAppConfigWrite(const Cdeqstr& configFileCollection); +} + +#endif /* IAPPCONFIGWRITE_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/IAppContext.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/IAppContext.h new file mode 100644 index 000000000..e6337696e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/IAppContext.h @@ -0,0 +1,29 @@ +/* + * Author: mdonahue + * Created: Jan 28, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef IAPPLICATIONCONTEXT_H_ +#define IAPPLICATIONCONTEXT_H_ + + +namespace Caf { + +struct __declspec(novtable) +IAppContext : public ICafObject { + CAF_DECL_UUID("f1d65e47-0f12-4301-861c-6a8c90099dae") + + // key=bean id + typedef std::map CBeans; + CAF_DECLARE_SMART_POINTER(CBeans); + + virtual SmartPtrIBean getBean(const std::string& name) const = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IAppContext); +} + +#endif /* IAPPLICATIONCONTEXT_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/IConfigParams.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/IConfigParams.h new file mode 100644 index 000000000..229cfdc56 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/IConfigParams.h @@ -0,0 +1,35 @@ +/* + * Author: mdonahue + * Created: Jan 17, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef ICONFIGPARAMS_H_ +#define ICONFIGPARAMS_H_ + +namespace Caf { + +struct __declspec(novtable) +IConfigParams : public ICafObject +{ + typedef enum { + PARAM_REQUIRED, + PARAM_OPTIONAL + } EParamDisposition; + + virtual GVariant* lookup( + const char* key, + const EParamDisposition disposition = PARAM_REQUIRED) const = 0; + + virtual std::string getSectionName() const = 0; + + virtual void insert(const char* key, GVariant* value) = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IConfigParams); + +} + +#endif /* ICONFIGPARAMS_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/IWork.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/IWork.h new file mode 100644 index 000000000..977a665f9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/IWork.h @@ -0,0 +1,29 @@ +/* + * Author: bwilliams + * Created: June 29, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _CommonAggregator_IWork_h_ +#define _CommonAggregator_IWork_h_ + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) + IWork : public ICafObject { + CAF_DECL_UUID("76c269db-691f-439d-b47d-87ce55639c8f") + +public: // Read operations + virtual void doWork() = 0; + virtual void stopWork() = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IWork); + +} + +#endif // #ifndef _CommonAggregator_IWork_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/TBlockingCell.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/TBlockingCell.h new file mode 100644 index 000000000..725d5cea3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/TBlockingCell.h @@ -0,0 +1,105 @@ +/* + * Created on: May 15, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef TBLOCKINGCELL_H_ +#define TBLOCKINGCELL_H_ + +namespace Caf { + +/** + * @brief Simple one-shot IPC mechanism. + * Allows a value to be passed from one thread to another in a thread-safe manner. + * The value may only be set once and once set may get retrieved as many times as + * desired. + */ +template class TBlockingCell { + +public: + TBlockingCell() : + _filled(false) { + CAF_CM_INIT_THREADSAFE; + CAF_THREADSIGNAL_INIT; + //TODO: This has stopped working... why? + //_value = NULL; + _valueSignal.initialize("valueSignal"); + } + + virtual ~TBlockingCell() { + } + + /** + * @brief Wait for a value indefinitely + * Waits indefinitely for the value to be set or returns the value if it is + * already set. + * @return value + */ + T get() { + return get(0); + } + + /** + * @brief Wait for a value for a specified amount of time + * Waits for a set amout of time (milliseconds) for the value to be set or returns + * the value if it is already set. + * @retval value if set + * @retval TimeoutException thrown if time expires + */ + T get(uint32 timeoutMs) { + CAF_CM_STATIC_FUNC("TBlockingCell", "get"); + CAF_CM_LOCK; + CAF_THREADSIGNAL_LOCK_UNLOCK; + if (!_filled) { + CAF_CM_UNLOCK; + _valueSignal.waitOrTimeout(CAF_THREADSIGNAL_MUTEX, timeoutMs); + CAF_CM_LOCK; + if (!_filled) { + CAF_CM_UNLOCK; + CAF_CM_EXCEPTIONEX_VA0( + TimeoutException, + 0, + "Timed out waiting for value to be set"); + } else { + CAF_CM_UNLOCK; + } + } else { + CAF_CM_UNLOCK; + } + return _value; + } + + /** + * @brief Sets a new value if the value is not already set + * If the value is already set an IllegalStateException will be thrown. + */ + void set(T newValue) { + CAF_CM_STATIC_FUNC("TBlockingCell", "set"); + CAF_CM_LOCK_UNLOCK; + if (_filled) { + CAF_CM_EXCEPTIONEX_VA0( + IllegalStateException, + 0, + "The value can only be set once"); + } + _value = newValue; + _filled = true; + _valueSignal.signal(); + } + +private: + bool _filled; + T _value; + CAF_THREADSIGNAL_CREATE; + CThreadSignal _valueSignal; + CAF_CM_CREATE_THREADSAFE; + CAF_CM_DECLARE_NOCOPY(TBlockingCell); +}; + +} + + +#endif /* TBLOCKINGCELL_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/UriUtils.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/UriUtils.cpp new file mode 100644 index 000000000..be7d4c9e0 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/UriUtils.cpp @@ -0,0 +1,370 @@ +/* + * Author: mdonahue + * Created: Feb 4, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "UriUtils.h" + +using namespace Caf; + +void UriUtils::parseUriString(const std::string& uri, UriUtils::SUriRecord& data) { + CAF_CM_STATIC_FUNC("UriUtils", "parseUriString"); + CAF_CM_VALIDATE_STRING(uri); + + // examples: + // + // vmcf:service_id@tcp:host=hostname,port=portnum?timeout=timeoutval + // tunnel:localhost:6672/amqp_queue_name?vhost=caf;connection_timeout=150000;connection_retries=10;connection_seconds_to_wait=10;channel_cache_size=3 + // amqp:guest:guest@10.25.91.81:5672/amqp_queue_name?vhost=caf;connection_timeout=150000;connection_retries=10;connection_seconds_to_wait=10;channel_cache_size=3 + + static const std::string uriPattern("^(?P[^:]+?):(?P

[^?]+)\\?\?(?P.*)"); + static const std::string parmPattern("(?P[^=]+)=(?P[^;]+);?"); + static const std::string namePattern("^(?P[^:]+):(?P[^@]+)@(?P.*)"); + static const std::string hostPattern("^(?P[^:]+):(?P[^/]+)/"); + static const std::string pathPattern("/(?P[^?]+)"); + + CAF_CM_ENTER { + data.protocol = std::string(); + data.address = std::string(); + data.parameters.clear(); + + GRegex *regexUri = NULL; + GRegex *regexParms = NULL; + GRegex *regexName = NULL; + GRegex *regexHost = NULL; + GRegex *regexPath = NULL; + GMatchInfo* matchInfo = NULL; + + try { + CAF_CM_VALIDATE_STRING(uri); + GError *error = NULL; + regexUri = g_regex_new(uriPattern.c_str(), + (GRegexCompileFlags)(G_REGEX_RAW), + (GRegexMatchFlags)0, + &error); + if (error) { + throw error; + } + + regexParms = g_regex_new(parmPattern.c_str(), + (GRegexCompileFlags)(G_REGEX_OPTIMIZE | G_REGEX_RAW), + (GRegexMatchFlags)0, + &error); + if (error) { + throw error; + } + + regexName = g_regex_new(namePattern.c_str(), + (GRegexCompileFlags)(G_REGEX_OPTIMIZE | G_REGEX_RAW), + (GRegexMatchFlags)0, + &error); + if (error) { + throw error; + } + + regexHost = g_regex_new(hostPattern.c_str(), + (GRegexCompileFlags)(G_REGEX_OPTIMIZE | G_REGEX_RAW), + (GRegexMatchFlags)0, + &error); + if (error) { + throw error; + } + + regexPath = g_regex_new(pathPattern.c_str(), + (GRegexCompileFlags)(G_REGEX_OPTIMIZE | G_REGEX_RAW), + (GRegexMatchFlags)0, + &error); + if (error) { + throw error; + } + + if (g_regex_match(regexUri, uri.c_str(), (GRegexMatchFlags)0, &matchInfo)) { + gchar *value = g_match_info_fetch_named(matchInfo, "protocol"); + data.protocol = value; + g_free(value); + value = g_match_info_fetch_named(matchInfo, "address"); + data.address = value; + g_free(value); + value = g_match_info_fetch_named(matchInfo, "parameters"); + std::string params(value ? value : ""); + g_free(value); + g_match_info_free(matchInfo); + matchInfo = NULL; + + if (! data.address.empty()) { + std::string hostpath = data.address; + if (g_regex_match(regexName, data.address.c_str(), (GRegexMatchFlags)0, &matchInfo)) { + value = g_match_info_fetch_named(matchInfo, "username"); + data.username = value; + g_free(value); + value = g_match_info_fetch_named(matchInfo, "password"); + data.password = value; + g_free(value); + value = g_match_info_fetch_named(matchInfo, "hostpath"); + hostpath = value; + g_free(value); + } + if (g_regex_match(regexHost, hostpath.c_str(), (GRegexMatchFlags)0, &matchInfo)) { + value = g_match_info_fetch_named(matchInfo, "host"); + data.host = value; + g_free(value); + value = g_match_info_fetch_named(matchInfo, "port"); + data.portStr = value; + data.port = CStringConv::fromString(value); + g_free(value); + } + if (g_regex_match(regexPath, hostpath.c_str(), (GRegexMatchFlags)0, &matchInfo)) { + value = g_match_info_fetch_named(matchInfo, "path"); + data.path = value; + g_free(value); + } + } + + if (params.length()) { + if (g_regex_match(regexParms, params.c_str(), (GRegexMatchFlags)0, &matchInfo)) { + while (g_match_info_matches(matchInfo)) { + value = g_match_info_fetch_named(matchInfo, "name"); + std::string paramName(value); + g_free(value); + value = g_match_info_fetch_named(matchInfo, "value"); + std::string paramValue(value); + g_free(value); + if (!data.parameters.insert( + std::map::value_type(paramName, paramValue)).second) { + CAF_CM_EXCEPTION_VA2(ERROR_DUPLICATE_TAG, + "Duplicate parameter name %s in %s", + paramName.c_str(), + uri.c_str()); + } + g_match_info_next(matchInfo, &error); + if (error) { + throw error; + } + } + } + } + } + } + CAF_CM_CATCH_CAF + CAF_CM_CATCH_GERROR + + if (matchInfo) { + g_match_info_free(matchInfo); + } + if (regexUri) { + g_regex_unref(regexUri); + } + if (regexParms) { + g_regex_unref(regexParms); + } + if (regexName) { + g_regex_unref(regexName); + } + if (regexHost) { + g_regex_unref(regexHost); + } + if (regexPath) { + g_regex_unref(regexPath); + } + CAF_CM_THROWEXCEPTION; + } + CAF_CM_EXIT; +} + +void UriUtils::parseFileAddress(const std::string& fileUri, UriUtils::SFileUriRecord& data) { + CAF_CM_STATIC_FUNC_LOG("UriUtils", "parseFileAddress"); + CAF_CM_VALIDATE_STRING(fileUri); + + // examples: + // + // ///c:/tmp + + static const std::string addressPattern("^//(?P[^/]*)/(?P.*)"); + static const std::string drivePattern("^[a-zA-Z]:"); + + CAF_CM_ENTER { + data.hostname = std::string(); + data.path = std::string(); + + GRegex *regexAddress = NULL; + GRegex *regexDrive = NULL; + GMatchInfo* matchInfo = NULL; + + try { + CAF_CM_VALIDATE_STRING(fileUri); + + GError *error = NULL; + regexAddress = g_regex_new(addressPattern.c_str(), + (GRegexCompileFlags)(G_REGEX_RAW), + (GRegexMatchFlags)0, + &error); + if (error) { + throw error; + } + + if (g_regex_match(regexAddress, fileUri.c_str(), (GRegexMatchFlags)0, &matchInfo)) { + gchar *value = g_match_info_fetch_named(matchInfo, "hostname"); + data.hostname = value; + g_free(value); + value = g_match_info_fetch_named(matchInfo, "path"); + data.path = value; + g_free(value); + g_match_info_free(matchInfo); + matchInfo = NULL; + + regexDrive = g_regex_new(drivePattern.c_str(), + (GRegexCompileFlags)(G_REGEX_RAW), + (GRegexMatchFlags)0, + &error); + if (error) { + throw error; + } + + if (g_regex_match(regexDrive, data.path.c_str(), (GRegexMatchFlags)0, &matchInfo)) { + g_match_info_free(matchInfo); + matchInfo = NULL; + } else { + data.path = "/" + data.path; + } + } + } + CAF_CM_CATCH_CAF + CAF_CM_CATCH_GERROR + + if (matchInfo) { + g_match_info_free(matchInfo); + } + if (regexAddress) { + g_regex_unref(regexAddress); + } + if (regexDrive) { + g_regex_unref(regexDrive); + } + CAF_CM_THROWEXCEPTION; + } + CAF_CM_EXIT; +} + +std::string UriUtils::parseRequiredFilePath( + const std::string& uriStr) { + CAF_CM_STATIC_FUNC("UriUtils", "parseRequiredFilePath"); + CAF_CM_VALIDATE_STRING(uriStr); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(uriStr); + + SUriRecord uriRecord; + parseUriString(uriStr, uriRecord); + + if(uriRecord.protocol.compare("file") != 0) { + CAF_CM_EXCEPTIONEX_VA2(InvalidArgumentException, ERROR_INVALID_DATA, + "Unsupported protocol (%s != \"file\") - %s", + uriRecord.protocol.c_str(), uriStr.c_str()); + } + + UriUtils::SFileUriRecord fileUriRecord; + UriUtils::parseFileAddress(uriRecord.address, fileUriRecord); + + rc = CStringUtils::expandEnv(fileUriRecord.path); + if(! FileSystemUtils::doesFileExist(rc)) { + CAF_CM_EXCEPTIONEX_VA1(FileNotFoundException, ERROR_FILE_NOT_FOUND, + "File in URI not found - %s", rc.c_str()); + } + } + CAF_CM_EXIT; + + return rc; +} + +std::string UriUtils::parseOptionalFilePath( + const std::string& uriStr) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("UriUtils", "parseOptionalFilePath"); + CAF_CM_VALIDATE_STRING(uriStr); + + std::string rc = ""; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(uriStr); + + SUriRecord uriRecord; + parseUriString(uriStr, uriRecord); + + if(uriRecord.protocol.compare("file") != 0) { + CAF_CM_LOG_DEBUG_VA2( + "Unsupported protocol (%s != \"file\") - %s", + uriRecord.protocol.c_str(), uriStr.c_str()); + } else { + UriUtils::SFileUriRecord fileUriRecord; + UriUtils::parseFileAddress(uriRecord.address, fileUriRecord); + + const std::string filePath = CStringUtils::expandEnv(fileUriRecord.path); + if(! FileSystemUtils::doesFileExist(filePath)) { + CAF_CM_LOG_DEBUG_VA2( + "File in URI not found - uri: %s, path: %s", uriStr.c_str(), filePath.c_str()); + } else { + rc = filePath; + } + } + } + CAF_CM_EXIT; + + return rc; +} + +std::string UriUtils::appendParameters( + const std::string& uriStr, + const std::map& parameters) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("UriUtils", "appendParameters"); + CAF_CM_VALIDATE_STRING(uriStr); + + std::string rc = uriStr; + if (!parameters.empty()) { + rc += "?"; + for (TConstMapIterator > parameter(parameters); + parameter; parameter++) { + rc += parameter.getKey() + "=" + *parameter + ";"; + } + } + + CAF_CM_LOG_DEBUG_VA1("Appended parameters - num: %d", parameters.size()); + + return rc; +} + +std::string UriUtils::findOptParameter( + const UriUtils::SUriRecord& uri, + const std::string& name, + const std::string& defaultValue) { + CAF_CM_STATIC_FUNC_VALIDATE("UriUtils", "findOptParameter"); + CAF_CM_VALIDATE_STRING(name); + + std::string rc = defaultValue; + const std::map::const_iterator param = + uri.parameters.find(name); + if(param != uri.parameters.end()) { + rc = param->second; + } + + return rc; +} + +std::string UriUtils::findReqParameter( + const UriUtils::SUriRecord& uri, + const std::string& name) { + CAF_CM_STATIC_FUNC("UriUtils", "findReqParameter"); + CAF_CM_VALIDATE_STRING(name); + + const std::map::const_iterator param = + uri.parameters.find(name); + if(param == uri.parameters.end()) { + CAF_CM_EXCEPTION_VA1(E_INVALIDARG, "param not found - %s", name.c_str()); + } + + return param->second; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/UriUtils.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/UriUtils.h new file mode 100644 index 000000000..e38141368 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/UriUtils.h @@ -0,0 +1,51 @@ +/* + * Author: mdonahue + * Created: Feb 4, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef UriUtils_h_ +#define UriUtils_h_ + +namespace Caf { + +namespace UriUtils { + + struct SUriRecord { + std::string protocol; + std::string address; + std::string username; + std::string password; + std::string host; + uint32 port; + std::string portStr; + std::string path; + std::map parameters; + }; + + struct SFileUriRecord { + std::string hostname; + std::string path; + }; + + void COMMONAGGREGATOR_LINKAGE parseUriString(const std::string& uri, SUriRecord& data); + void COMMONAGGREGATOR_LINKAGE parseFileAddress(const std::string& fileUri, SFileUriRecord& data); + std::string COMMONAGGREGATOR_LINKAGE parseRequiredFilePath(const std::string& uriStr); + std::string COMMONAGGREGATOR_LINKAGE parseOptionalFilePath(const std::string& uriStr); + std::string COMMONAGGREGATOR_LINKAGE appendParameters(const std::string& uriStr, + const std::map& parameters); + + std::string COMMONAGGREGATOR_LINKAGE findOptParameter( + const UriUtils::SUriRecord& uri, + const std::string& name, + const std::string& defaultValue = std::string()); + std::string COMMONAGGREGATOR_LINKAGE findReqParameter( + const UriUtils::SUriRecord& uri, + const std::string& name); +}; + +} + +#endif /* UriUtils_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/stdafx.h new file mode 100644 index 000000000..404d13ec8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/stdafx.h @@ -0,0 +1,34 @@ +/* + * Author: mdonahue + * Created: Jan 13, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define COMMONAGGREGATOR_LINKAGE __declspec(dllexport) + #define COMMONGLOBALS_LINKAGE __declspec(dllexport) + #define EXCEPTION_LINKAGE __declspec(dllexport) + #define LOGGING_LINKAGE __declspec(dllexport) + #define SUBSYSTEMBASE_LINKAGE __declspec(dllexport) + #define MARKUPPARSER_LINKAGE __declspec(dllexport) + #define XMLUTILS_LINKAGE __declspec(dllexport) +#else + #define COMMONAGGREGATOR_LINKAGE + #define COMMONGLOBALS_LINKAGE + #define EXCEPTION_LINKAGE + #define LOGGING_LINKAGE + #define SUBSYSTEMBASE_LINKAGE + #define MARKUPPARSER_LINKAGE + #define XMLUTILS_LINKAGE +#endif + +#include + +#include "CommonAggregatorLink.h" + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/AttachmentUtils.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/AttachmentUtils.cpp new file mode 100644 index 000000000..f605057e2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/AttachmentUtils.cpp @@ -0,0 +1,62 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc-> All rights reserved-> + * -- VMware Confidential + * + */ + +#include "stdafx.h" +#include "AttachmentUtils.h" + +using namespace Caf; + +SmartPtrCAttachmentDoc AttachmentUtils::findOptionalAttachment( + const std::string& attachmentName, + const SmartPtrCAttachmentCollectionDoc& attachmentCollection) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("AttachmentUtils", "findOptionalAttachment"); + + SmartPtrCAttachmentDoc attachmentRc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(attachmentName); + CAF_CM_VALIDATE_SMARTPTR(attachmentCollection); + + const std::deque attachmentCollectionInner = + attachmentCollection->getAttachment(); + for (TConstIterator > attachmentIter(attachmentCollectionInner); + attachmentIter; attachmentIter++) { + const SmartPtrCAttachmentDoc attachmentTmp = *attachmentIter; + const std::string attachmentNameTmp = attachmentTmp->getName(); + if (attachmentNameTmp.compare(attachmentName) == 0) { + attachmentRc = attachmentTmp; + } + } + } + CAF_CM_EXIT; + + return attachmentRc; +} + +SmartPtrCAttachmentDoc AttachmentUtils::findRequiredAttachment( + const std::string& attachmentName, + const SmartPtrCAttachmentCollectionDoc& attachmentCollection) { + CAF_CM_STATIC_FUNC_LOG("AttachmentUtils", "findRequiredAttachment"); + + SmartPtrCAttachmentDoc attachmentRc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(attachmentName); + CAF_CM_VALIDATE_SMARTPTR(attachmentCollection); + + attachmentRc = findOptionalAttachment(attachmentName, attachmentCollection); + if (attachmentRc.IsNull()) { + CAF_CM_EXCEPTIONEX_VA1(NoSuchElementException, ERROR_NOT_FOUND, + "Required attachment not found - %s", attachmentName.c_str()); + } + } + CAF_CM_EXIT; + + return attachmentRc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/AttachmentUtils.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/AttachmentUtils.h new file mode 100644 index 000000000..36e2ff8a8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/AttachmentUtils.h @@ -0,0 +1,30 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + */ + +#ifndef AttachmentUtils_h_ +#define AttachmentUtils_h_ + +namespace Caf { +class DOCUTILS_LINKAGE AttachmentUtils { +public: + static SmartPtrCAttachmentDoc findOptionalAttachment( + const std::string& attachmentName, + const SmartPtrCAttachmentCollectionDoc& attachmentCollection); + + static SmartPtrCAttachmentDoc findRequiredAttachment( + const std::string& attachmentName, + const SmartPtrCAttachmentCollectionDoc& attachmentCollection); + +private: + CAF_CM_DECLARE_NOCREATE(AttachmentUtils); +}; + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/DefnObjectConverter.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/DefnObjectConverter.cpp new file mode 100644 index 000000000..4a20587b8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/DefnObjectConverter.cpp @@ -0,0 +1,212 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc-> All rights reserved-> + * -- VMware Confidential + * + */ + +#include "stdafx.h" +#include "DefnObjectConverter.h" + +using namespace Caf; + +std::string DefnObjectConverter::toString( + const SmartPtrCDataClassInstanceDoc dataClassInstance) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("DefnObjectConverter", "toString"); + + std::string defnObjXmlStr; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(dataClassInstance); + + const SmartPtrCXmlElement defnObjXml = CXmlUtils::createRootElement( + dataClassInstance->getName(), "http://schemas->vmware->com/caf/schema"); + + defnObjXml->addAttribute("namespace", dataClassInstance->getNamespaceVal()); + defnObjXml->addAttribute("name", dataClassInstance->getName()); + defnObjXml->addAttribute("version", dataClassInstance->getVersion()); + + SmartPtrCDataClassSubInstanceDoc dataClassSubInstance; + dataClassSubInstance.CreateInstance(); + dataClassSubInstance->initialize( + dataClassInstance->getName(), + dataClassInstance->getCmdlMetadataCollection(), + dataClassInstance->getPropertyCollection(), + dataClassInstance->getInstancePropertyCollection(), + dataClassInstance->getCmdlUnion()); + + addDataClassSubInstance(dataClassSubInstance, defnObjXml); + + defnObjXmlStr = defnObjXml->saveToStringRaw(); + } + CAF_CM_EXIT; + + return defnObjXmlStr; +} + +SmartPtrCDataClassInstanceDoc DefnObjectConverter::fromString( + const std::string defnObjectXmlStr) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("DefnObjectConverter", "fromString"); + + SmartPtrCDataClassInstanceDoc dataClassInstanceRc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(defnObjectXmlStr); + + const SmartPtrCXmlElement defnObjectXml = CXmlUtils::parseString(defnObjectXmlStr, std::string()); + + const SmartPtrCDataClassSubInstanceDoc dataClassSubInstance = parseDataClassSubInstance(defnObjectXml, true); + + dataClassInstanceRc.CreateInstance(); + dataClassInstanceRc->initialize( + defnObjectXml->findRequiredAttribute("namespace"), + defnObjectXml->findRequiredAttribute("name"), + defnObjectXml->findRequiredAttribute("version"), + dataClassSubInstance->getCmdlMetadataCollection(), + dataClassSubInstance->getPropertyCollection(), + dataClassSubInstance->getInstancePropertyCollection(), + dataClassSubInstance->getCmdlUnion()); + } + CAF_CM_EXIT; + + return dataClassInstanceRc; +} + +void DefnObjectConverter::addDataClassSubInstance( + const SmartPtrCDataClassSubInstanceDoc dataClassSubInstance, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("DefnObjectConverter", "addDataClassSubInstance"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(dataClassSubInstance); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque cmdlMetadataCollection = dataClassSubInstance->getCmdlMetadataCollection(); + if (! cmdlMetadataCollection.empty()) { + addCmdlMetadata(cmdlMetadataCollection, thisXml); + } + + const std::deque dataClassPropertyCollection = dataClassSubInstance->getPropertyCollection(); + if (! dataClassPropertyCollection.empty()) { + for (TSmartConstIterator > dataClassPropertyIter(dataClassPropertyCollection); + dataClassPropertyIter; dataClassPropertyIter++) { + const SmartPtrCDataClassPropertyDoc dataClassProperty = *dataClassPropertyIter; + const SmartPtrCXmlElement propertyXml = thisXml->createAndAddElement(dataClassProperty->getName()); + + const std::deque cmdlMetadataCollectionProperty = dataClassProperty->getCmdlMetadata(); + if (! cmdlMetadataCollectionProperty.empty()) { + addCmdlMetadata(cmdlMetadataCollectionProperty, propertyXml); + } + propertyXml->setValue(dataClassProperty->getValue()); + } + } + + const std::deque instancePropertyCollection = dataClassSubInstance->getInstancePropertyCollection(); + if (! instancePropertyCollection.empty()) { + for (TSmartConstIterator > dataClassSubInstanceIter(instancePropertyCollection); + dataClassSubInstanceIter; dataClassSubInstanceIter++) { + const SmartPtrCDataClassSubInstanceDoc instanceProperty = *dataClassSubInstanceIter; + const SmartPtrCXmlElement instancePropertyXml = thisXml->createAndAddElement(instanceProperty->getName()); + addDataClassSubInstance(instanceProperty, instancePropertyXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCDataClassSubInstanceDoc DefnObjectConverter::parseDataClassSubInstance( + const SmartPtrCXmlElement dataClassSubInstanceXml, + const bool isDataClassInstance) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("DefnObjectConverter", "parseDataClassSubInstance"); + + SmartPtrCDataClassSubInstanceDoc dataClassSubInstanceRc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(dataClassSubInstanceXml); + + std::deque cmdlMetadataCollection; + if (! isDataClassInstance) { + cmdlMetadataCollection = parseCmdlMetadata(dataClassSubInstanceXml); + } + + std::deque dataClassPropertyCollection; + std::deque instancePropertyCollection; + const CXmlElement::SmartPtrCElementCollection childrenXml = dataClassSubInstanceXml->getAllChildren(); + if (! childrenXml.IsNull() && ! childrenXml->empty()) { + for (TConstIterator childrenXmlIter(*childrenXml); + childrenXmlIter; childrenXmlIter++) { + const SmartPtrCXmlElement childXml = childrenXmlIter->second; + + const CXmlElement::SmartPtrCElementCollection grandChildrenXml = childXml->getAllChildren(); + if (! grandChildrenXml.IsNull() && ! grandChildrenXml->empty()) { + const SmartPtrCDataClassSubInstanceDoc dataClassSubInstance = parseDataClassSubInstance(childXml, false); + instancePropertyCollection.push_back(dataClassSubInstance); + } else { + const std::deque cmdlMetadataCollectionProperty = parseCmdlMetadata(childXml); + SmartPtrCDataClassPropertyDoc dataClassProperty; + dataClassProperty.CreateInstance(); + dataClassProperty->initialize( + childXml->getName(), cmdlMetadataCollectionProperty, childXml->getValue()); + dataClassPropertyCollection.push_back(dataClassProperty); + } + } + } + + dataClassSubInstanceRc.CreateInstance(); + dataClassSubInstanceRc->initialize( + dataClassSubInstanceXml->getName(), + cmdlMetadataCollection, dataClassPropertyCollection, instancePropertyCollection, SmartPtrCCmdlUnionDoc()); + } + CAF_CM_EXIT; + + return dataClassSubInstanceRc; +} + +std::deque DefnObjectConverter::parseCmdlMetadata( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("DefnObjectConverter", "parseCmdlMetadata"); + + std::deque cmdlMetadataCollection; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCAttributeCollection attributeCollection = thisXml->getAllAttributes(); + if (! attributeCollection.IsNull() && ! attributeCollection->empty()) { + for (TConstIterator childrenXmlIter(*attributeCollection); + childrenXmlIter; childrenXmlIter++) { + const std::string attributeName = childrenXmlIter->first; + const std::string attributeValue = childrenXmlIter->second; + + SmartPtrCCmdlMetadataDoc cmdlMetadata; + cmdlMetadata.CreateInstance(); + cmdlMetadata->initialize(attributeName, attributeValue); + + cmdlMetadataCollection.push_back(cmdlMetadata); + } + } + } + CAF_CM_EXIT; + + return cmdlMetadataCollection; +} + +void DefnObjectConverter::addCmdlMetadata( + const std::deque cmdlMetadataCollection, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("DefnObjectConverter", "addCmdlMetadata"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STL(cmdlMetadataCollection); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + for (TSmartConstIterator > cmdlMetadataIter(cmdlMetadataCollection); + cmdlMetadataIter; cmdlMetadataIter++) { + const SmartPtrCCmdlMetadataDoc cmdlMetadata = *cmdlMetadataIter; + thisXml->addAttribute(cmdlMetadata->getName(), cmdlMetadata->getValue()); + } + } + CAF_CM_EXIT; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/DefnObjectConverter.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/DefnObjectConverter.h new file mode 100644 index 000000000..190ac2dd5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/DefnObjectConverter.h @@ -0,0 +1,44 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + */ + +#ifndef DefnObjectConverter_h_ +#define DefnObjectConverter_h_ + +namespace Caf { +class DOCUTILS_LINKAGE DefnObjectConverter { +public: + static std::string toString( + const SmartPtrCDataClassInstanceDoc dataClassInstance); + + static SmartPtrCDataClassInstanceDoc fromString( + const std::string defnObjectXmlStr); + +private: + static void addDataClassSubInstance( + const SmartPtrCDataClassSubInstanceDoc dataClassSubInstance, + const SmartPtrCXmlElement thisXml); + + static SmartPtrCDataClassSubInstanceDoc parseDataClassSubInstance( + const SmartPtrCXmlElement dataClassInstanceXml, + const bool isDataClassInstance); + + static std::deque parseCmdlMetadata( + const SmartPtrCXmlElement thisXml); + + static void addCmdlMetadata( + const std::deque cmdlMetadataCollection, + const SmartPtrCXmlElement thisXml); + +private: + CAF_CM_DECLARE_NOCREATE(DefnObjectConverter); +}; + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/DocUtilsInc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/DocUtilsInc.h new file mode 100644 index 000000000..49020f76f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/DocUtilsInc.h @@ -0,0 +1,22 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef DocUtils_Inc_h_ +#define DocUtils_Inc_h_ + +#include "EnumConvertersXml.h" +#include "DefnObjectConverter.h" +#include "ParameterUtils.h" +#include "AttachmentUtils.h" +#include "DocXmlUtils.h" + +#endif /* DocUtils_Inc_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/DocUtilsLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/DocUtilsLink.h new file mode 100644 index 000000000..45ec61240 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/DocUtilsLink.h @@ -0,0 +1,34 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef DocUtils_Link_h_ +#define DocUtils_Link_h_ + +#ifndef DOCUTILS_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define DOCUTILS_LINKAGE __declspec(dllexport) + #else + #define DOCUTILS_LINKAGE __declspec(dllimport) + #endif + #else + #define DOCUTILS_LINKAGE + #endif +#endif + +#include "EnumConvertersXml.h" +#include "DefnObjectConverter.h" +#include "ParameterUtils.h" +#include "AttachmentUtils.h" +#include "DocXmlUtils.h" + +#endif /* DocUtils_Link_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/DocXmlUtils.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/DocXmlUtils.cpp new file mode 100644 index 000000000..81ac1dc3f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/DocXmlUtils.cpp @@ -0,0 +1,51 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + */ + +#include "stdafx.h" +#include "DocXmlUtils.h" + +using namespace Caf; + +std::string DocXmlUtils::getSchemaNamespace( + const std::string& relSchemaNamespace) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("DocXmlUtils", "getSchemaNamespace"); + + std::string schemaNamespace; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(relSchemaNamespace); + + const std::string schemaNamespaceRoot = + AppConfigUtils::getRequiredString("schema_namespace_root"); + const std::string pathDelim = "/"; + schemaNamespace = schemaNamespaceRoot + pathDelim + relSchemaNamespace; + } + CAF_CM_EXIT; + + return schemaNamespace; +} + +std::string DocXmlUtils::getSchemaLocation( + const std::string& relSchemaLocation) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("DocXmlUtils", "getSchemaLocation"); + + std::string schemaLocation; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(relSchemaLocation); + + const std::string schemaLocationRoot = + AppConfigUtils::getRequiredString("schema_location_root"); + const std::string pathDelim = "/"; + schemaLocation = schemaLocationRoot + pathDelim + relSchemaLocation; + } + CAF_CM_EXIT; + + return schemaLocation; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/DocXmlUtils.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/DocXmlUtils.h new file mode 100644 index 000000000..8a0e9746e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/DocXmlUtils.h @@ -0,0 +1,24 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + */ + +#ifndef DocXmlUtils_h_ +#define DocXmlUtils_h_ + +namespace Caf { + + namespace DocXmlUtils { + std::string DOCUTILS_LINKAGE getSchemaNamespace( + const std::string& relSchemaNamespace); + + std::string DOCUTILS_LINKAGE getSchemaLocation( + const std::string& relSchemaLocation); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/EnumConvertersXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/EnumConvertersXml.cpp new file mode 100644 index 000000000..5cba38734 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/EnumConvertersXml.cpp @@ -0,0 +1,584 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + */ + +#include "stdafx.h" +#include "EnumConvertersXml.h" + +using namespace Caf; + +std::string EnumConvertersXml::convertParameterTypeToString( + const PARAMETER_TYPE parameterType) { + CAF_CM_STATIC_FUNC_LOG("EnumConvertersXml", "convertParameterTypeToString"); + + std::string rc; + + CAF_CM_ENTER { + switch(parameterType) { + case PARAMETER_NONE: + CAF_CM_LOG_DEBUG_VA0("Parameter not set"); + break; + case PARAMETER_STRING: + rc = "String"; + break; + case PARAMETER_SINT32: + rc = "SInt32"; + break; + case PARAMETER_UINT32: + rc = "UInt32"; + break; + case PARAMETER_SINT64: + rc = "SInt64"; + break; + case PARAMETER_UINT64: + rc = "UInt64"; + break; + case PARAMETER_DECIMAL: + rc = "Decimal"; + break; + case PARAMETER_DOUBLE: + rc = "Double"; + break; + case PARAMETER_BOOLEAN: + rc = "Boolean"; + break; + case PARAMETER_DATETIME: + rc = "DateTime"; + break; + default: + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Unknown parameter type - %d", static_cast(parameterType)); + } + } + CAF_CM_EXIT; + + return rc; +} + +PARAMETER_TYPE EnumConvertersXml::convertStringToParameterType( + const std::string parameterType) { + CAF_CM_STATIC_FUNC("EnumConvertersXml", "convertStringToParameterType"); + + PARAMETER_TYPE rc = PARAMETER_NONE; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(parameterType); + + if (parameterType.compare("String") == 0) { + rc = PARAMETER_STRING; + } else if (parameterType.compare("SInt32") == 0) { + rc = PARAMETER_SINT32; + } else if (parameterType.compare("UInt32") == 0) { + rc = PARAMETER_UINT32; + } else if (parameterType.compare("SInt64") == 0) { + rc = PARAMETER_SINT64; + } else if (parameterType.compare("UInt64") == 0) { + rc = PARAMETER_UINT64; + } else if (parameterType.compare("Decimal") == 0) { + rc = PARAMETER_DECIMAL; + } else if (parameterType.compare("Double") == 0) { + rc = PARAMETER_DOUBLE; + } else if (parameterType.compare("Boolean") == 0) { + rc = PARAMETER_BOOLEAN; + } else if (parameterType.compare("DateTime") == 0) { + rc = PARAMETER_DATETIME; + } else { + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Unknown parameter type - %s", parameterType.c_str()); + } + } + CAF_CM_EXIT; + + return rc; +} + +std::string EnumConvertersXml::convertPropertyTypeToString( + const PROPERTY_TYPE propertyType) { + CAF_CM_STATIC_FUNC_LOG("EnumConvertersXml", "convertPropertyTypeToString"); + + std::string rc; + + CAF_CM_ENTER { + switch(propertyType) { + case PROPERTY_NONE: + CAF_CM_LOG_DEBUG_VA0("Property not set"); + break; + case PROPERTY_STRING: + rc = "String"; + break; + case PROPERTY_SINT32: + rc = "SInt32"; + break; + case PROPERTY_UINT32: + rc = "UInt32"; + break; + case PROPERTY_SINT64: + rc = "SInt64"; + break; + case PROPERTY_UINT64: + rc = "UInt64"; + break; + case PROPERTY_DECIMAL: + rc = "Decimal"; + break; + case PROPERTY_DOUBLE: + rc = "Double"; + break; + case PROPERTY_BOOLEAN: + rc = "Boolean"; + break; + case PROPERTY_DATETIME: + rc = "DateTime"; + break; + default: + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Unknown property type - %d", static_cast(propertyType)); + } + } + CAF_CM_EXIT; + + return rc; +} + +PROPERTY_TYPE EnumConvertersXml::convertStringToPropertyType( + const std::string propertyType) { + CAF_CM_STATIC_FUNC("EnumConvertersXml", "convertStringToPropertyType"); + + PROPERTY_TYPE rc = PROPERTY_NONE; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(propertyType); + + if (propertyType.compare("String") == 0) { + rc = PROPERTY_STRING; + } else if (propertyType.compare("SInt32") == 0) { + rc = PROPERTY_SINT32; + } else if (propertyType.compare("UInt32") == 0) { + rc = PROPERTY_UINT32; + } else if (propertyType.compare("SInt64") == 0) { + rc = PROPERTY_SINT64; + } else if (propertyType.compare("UInt64") == 0) { + rc = PROPERTY_UINT64; + } else if (propertyType.compare("Decimal") == 0) { + rc = PROPERTY_DECIMAL; + } else if (propertyType.compare("Double") == 0) { + rc = PROPERTY_DOUBLE; + } else if (propertyType.compare("Boolean") == 0) { + rc = PROPERTY_BOOLEAN; + } else if (propertyType.compare("DateTime") == 0) { + rc = PROPERTY_DATETIME; + } else { + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Unknown property type - %s", propertyType.c_str()); + } + } + CAF_CM_EXIT; + + return rc; +} + +std::string EnumConvertersXml::convertValidatorTypeToString( + const VALIDATOR_TYPE validatorType) { + CAF_CM_STATIC_FUNC_LOG("EnumConvertersXml", "convertValidatorTypeToString"); + + std::string rc; + + CAF_CM_ENTER { + switch(validatorType) { + case VALIDATOR_NONE: + break; + case VALIDATOR_ENUM: + rc = "enum"; + break; + case VALIDATOR_RANGE: + rc = "range"; + break; + case VALIDATOR_REGEX: + rc = "regex"; + break; + case VALIDATOR_CUSTOM: + rc = "custom"; + break; + default: + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Unknown validator type - %d", static_cast(validatorType)); + } + } + CAF_CM_EXIT; + + return rc; +} + +VALIDATOR_TYPE EnumConvertersXml::convertStringToValidatorType( + const std::string validatorType) { + CAF_CM_STATIC_FUNC("EnumConvertersXml", "convertStringToValidatorType"); + + VALIDATOR_TYPE rc = VALIDATOR_NONE; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(validatorType); + + if (validatorType.compare("enum") == 0) { + rc = VALIDATOR_ENUM; + } else if (validatorType.compare("range") == 0) { + rc = VALIDATOR_RANGE; + } else if (validatorType.compare("regex") == 0) { + rc = VALIDATOR_REGEX; + } else if (validatorType.compare("custom") == 0) { + rc = VALIDATOR_CUSTOM; + } else { + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Unknown validator type - %s", validatorType.c_str()); + } + } + CAF_CM_EXIT; + + return rc; +} + +std::string EnumConvertersXml::convertOperatorTypeToString( + const OPERATOR_TYPE operatorType) { + CAF_CM_STATIC_FUNC_LOG("EnumConvertersXml", "convertOperatorTypeToString"); + + std::string rc; + + CAF_CM_ENTER { + switch(operatorType) { + case OPERATOR_NONE: + CAF_CM_LOG_DEBUG_VA0("Operator not set"); + break; + case OPERATOR_EQUAL: + rc = "="; + break; + default: + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Unknown operator type - %d", static_cast(operatorType)); + } + } + CAF_CM_EXIT; + + return rc; +} + +OPERATOR_TYPE EnumConvertersXml::convertStringToOperatorType( + const std::string operatorType) { + CAF_CM_STATIC_FUNC("EnumConvertersXml", "convertStringToOperatorType"); + + OPERATOR_TYPE rc = OPERATOR_NONE; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(operatorType); + + if (operatorType.compare("=") == 0) { + rc = OPERATOR_EQUAL; + } else { + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Unknown operator type - %s", operatorType.c_str()); + } + } + CAF_CM_EXIT; + + return rc; +} + +std::string EnumConvertersXml::convertArityTypeToString( + const ARITY_TYPE arityType) { + CAF_CM_STATIC_FUNC_LOG("EnumConvertersXml", "convertArityTypeToString"); + + std::string rc; + + CAF_CM_ENTER { + switch(arityType) { + case ARITY_NONE: + CAF_CM_LOG_DEBUG_VA0("Arity not set"); + break; + case ARITY_UNSIGNED_BYTE: + rc = "2"; + break; + default: + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Unknown arity type - %d", static_cast(arityType)); + } + } + CAF_CM_EXIT; + + return rc; +} + +ARITY_TYPE EnumConvertersXml::convertStringToArityType( + const std::string arityType) { + CAF_CM_STATIC_FUNC("EnumConvertersXml", "convertStringToArityType"); + + ARITY_TYPE rc = ARITY_NONE; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(arityType); + + if (arityType.compare("2") == 0) { + rc = ARITY_UNSIGNED_BYTE; + } else { + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Unknown arity type - %s", arityType.c_str()); + } + } + CAF_CM_EXIT; + + return rc; +} + +std::string EnumConvertersXml::convertPackageOSTypeToString( + const PACKAGE_OS_TYPE packageOSType) { + CAF_CM_STATIC_FUNC_LOG("EnumConvertersXml", "convertPackageOSTypeToString"); + + std::string rc; + + CAF_CM_ENTER { + switch(packageOSType) { + case PACKAGE_OS_NONE: + CAF_CM_LOG_DEBUG_VA0("Package OS not set"); + break; + case PACKAGE_OS_ALL: + rc = "All"; + break; + case PACKAGE_OS_NIX: + rc = "Nix"; + break; + case PACKAGE_OS_WIN: + rc = "Win"; + break; + default: + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Unknown Package OS type - %d", static_cast(packageOSType)); + } + } + CAF_CM_EXIT; + + return rc; +} + +PACKAGE_OS_TYPE EnumConvertersXml::convertStringToPackageOSType( + const std::string packageOSType) { + CAF_CM_STATIC_FUNC("EnumConvertersXml", "convertStringToPackageOSType"); + + PACKAGE_OS_TYPE rc = PACKAGE_OS_NONE; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(packageOSType); + + if (packageOSType.compare("All") == 0) { + rc = PACKAGE_OS_ALL; + } else if (packageOSType.compare("Nix") == 0) { + rc = PACKAGE_OS_NIX; + } else if (packageOSType.compare("Win") == 0) { + rc = PACKAGE_OS_WIN; + } else { + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Unknown Package OS type - %s", packageOSType.c_str()); + } + } + CAF_CM_EXIT; + + return rc; +} + +std::string EnumConvertersXml::convertLoggingLevelTypeToString( + const LOGGINGLEVEL_TYPE loggingLevelType) { + CAF_CM_STATIC_FUNC_LOG("EnumConvertersXml", "convertLoggingLevelTypeToString"); + + std::string rc; + + CAF_CM_ENTER { + switch(loggingLevelType) { + case LOGGINGLEVEL_NONE: + CAF_CM_LOG_DEBUG_VA0("Logging level not set"); + break; + case LOGGINGLEVEL_DEBUG: + rc = "DEBUG"; + break; + case LOGGINGLEVEL_INFO: + rc = "INFO"; + break; + case LOGGINGLEVEL_WARN: + rc = "WARN"; + break; + case LOGGINGLEVEL_ERROR: + rc = "ERROR"; + break; + case LOGGINGLEVEL_CRITICAL: + rc = "CRITICAL"; + break; + default: + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Unknown logging level type - %d", static_cast(loggingLevelType)); + } + } + CAF_CM_EXIT; + + return rc; +} + +LOGGINGLEVEL_TYPE EnumConvertersXml::convertStringToLoggingLevelType( + const std::string loggingLevelType) { + CAF_CM_STATIC_FUNC("EnumConvertersXml", "convertStringToLoggingLevelType"); + + LOGGINGLEVEL_TYPE rc = LOGGINGLEVEL_NONE; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(loggingLevelType); + + if (loggingLevelType.compare("DEBUG") == 0) { + rc = LOGGINGLEVEL_DEBUG; + } else if (loggingLevelType.compare("INFO") == 0) { + rc = LOGGINGLEVEL_INFO; + } else if (loggingLevelType.compare("WARN") == 0) { + rc = LOGGINGLEVEL_WARN; + } else if (loggingLevelType.compare("ERROR") == 0) { + rc = LOGGINGLEVEL_ERROR; + } else if (loggingLevelType.compare("CRITICAL") == 0) { + rc = LOGGINGLEVEL_CRITICAL; + } else { + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Unknown logging level type - %s", loggingLevelType.c_str()); + } + } + CAF_CM_EXIT; + + return rc; +} + +std::string EnumConvertersXml::convertLoggingComponentTypeToString( + const LOGGINGCOMPONENT_TYPE loggingComponentType) { + CAF_CM_STATIC_FUNC_LOG("EnumConvertersXml", "convertLoggingComponentTypeToString"); + + std::string rc; + + CAF_CM_ENTER { + switch(loggingComponentType) { + case LOGGINGCOMPONENT_NONE: + CAF_CM_LOG_DEBUG_VA0("Logging component not set"); + break; + case LOGGINGCOMPONENT_COMMUNICATIONS: + rc = "Communications"; + break; + case LOGGINGCOMPONENT_MANAGEMENTAGENT: + rc = "ManagementAgent"; + break; + case LOGGINGCOMPONENT_PROVIDERFRAMEWORK: + rc = "ProviderFramework"; + break; + case LOGGINGCOMPONENT_PROVIDER: + rc = "Provider"; + break; + default: + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Unknown logging component type - %d", static_cast(loggingComponentType)); + } + } + CAF_CM_EXIT; + + return rc; +} + +LOGGINGCOMPONENT_TYPE EnumConvertersXml::convertStringToLoggingComponentType( + const std::string loggingComponentType) { + CAF_CM_STATIC_FUNC("EnumConvertersXml", "convertStringToLoggingComponentType"); + + LOGGINGCOMPONENT_TYPE rc = LOGGINGCOMPONENT_NONE; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(loggingComponentType); + + if (loggingComponentType.compare("Communications") == 0) { + rc = LOGGINGCOMPONENT_COMMUNICATIONS; + } else if (loggingComponentType.compare("ManagementAgent") == 0) { + rc = LOGGINGCOMPONENT_MANAGEMENTAGENT; + } else if (loggingComponentType.compare("ProviderFramework") == 0) { + rc = LOGGINGCOMPONENT_PROVIDERFRAMEWORK; + } else if (loggingComponentType.compare("Provider") == 0) { + rc = LOGGINGCOMPONENT_PROVIDER; + } else { + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Unknown logging component type - %s", loggingComponentType.c_str()); + } + } + CAF_CM_EXIT; + + return rc; +} + +std::string EnumConvertersXml::convertCmsPolicyToString( + const CMS_POLICY cmsPolicy) { + CAF_CM_STATIC_FUNC_LOG("EnumConvertersXml", "convertCmsPolicyToString"); + + std::string rc; + + CAF_CM_ENTER { + switch(cmsPolicy) { + case CMS_POLICY_NONE: + rc = "None"; + break; + case CMS_POLICY_CAF_ENCRYPTED: + rc = "CAF_Encrypted"; + break; + case CMS_POLICY_CAF_SIGNED: + rc = "CAF_Signed"; + break; + case CMS_POLICY_CAF_ENCRYPTED_AND_SIGNED: + rc = "CAF_Encrypted_And_Signed"; + break; + case CMS_POLICY_APP_ENCRYPTED: + rc = "App_Encrypted"; + break; + case CMS_POLICY_APP_SIGNED: + rc = "App_Signed"; + break; + case CMS_POLICY_APP_ENCRYPTED_AND_SIGNED: + rc = "App_Encrypted_And_Signed"; + break; + default: + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Unknown CMS Policy - %d", static_cast(cmsPolicy)); + } + } + CAF_CM_EXIT; + + return rc; +} + +CMS_POLICY EnumConvertersXml::convertStringToCmsPolicy( + const std::string cmsPolicy) { + CAF_CM_STATIC_FUNC("EnumConvertersXml", "convertStringToCmsPolicy"); + + CMS_POLICY rc = CMS_POLICY_NONE; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(cmsPolicy); + + if (cmsPolicy.compare("None") == 0) { + rc = CMS_POLICY_NONE; + } else if (cmsPolicy.compare("CAF_Encrypted") == 0) { + rc = CMS_POLICY_CAF_ENCRYPTED; + } else if (cmsPolicy.compare("CAF_Signed") == 0) { + rc = CMS_POLICY_CAF_SIGNED; + } else if (cmsPolicy.compare("CAF_Encrypted_And_Signed") == 0) { + rc = CMS_POLICY_CAF_ENCRYPTED_AND_SIGNED; + } else if (cmsPolicy.compare("App_Encrypted") == 0) { + rc = CMS_POLICY_APP_ENCRYPTED; + } else if (cmsPolicy.compare("App_Signed") == 0) { + rc = CMS_POLICY_APP_SIGNED; + } else if (cmsPolicy.compare("App_Encrypted_And_Signed") == 0) { + rc = CMS_POLICY_APP_ENCRYPTED_AND_SIGNED; + } else { + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Unknown CMS Policy - %s", cmsPolicy.c_str()); + } + } + CAF_CM_EXIT; + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/EnumConvertersXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/EnumConvertersXml.h new file mode 100644 index 000000000..cec0cb900 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/EnumConvertersXml.h @@ -0,0 +1,88 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + */ + +#ifndef EnumConvertersXml_h_ +#define EnumConvertersXml_h_ + +namespace Caf { + + namespace EnumConvertersXml { + /// Converts the parameter type to a string + std::string DOCUTILS_LINKAGE convertParameterTypeToString( + const PARAMETER_TYPE parameterType); + + /// Converts the string to a parameter type + PARAMETER_TYPE DOCUTILS_LINKAGE convertStringToParameterType( + const std::string parameterType); + + /// Converts the property type to a string + std::string DOCUTILS_LINKAGE convertPropertyTypeToString( + const PROPERTY_TYPE propertyType); + + /// Converts the string to a property type + PROPERTY_TYPE DOCUTILS_LINKAGE convertStringToPropertyType( + const std::string propertyType); + + /// Converts the validator type to a string + std::string DOCUTILS_LINKAGE convertValidatorTypeToString( + const VALIDATOR_TYPE validatorType); + + /// Converts the string to a validator type + VALIDATOR_TYPE DOCUTILS_LINKAGE convertStringToValidatorType( + const std::string validatorType); + + /// Converts the operator type to a string + std::string DOCUTILS_LINKAGE convertOperatorTypeToString( + const OPERATOR_TYPE operatorType); + + /// Converts the string to a operator type + OPERATOR_TYPE DOCUTILS_LINKAGE convertStringToOperatorType( + const std::string operatorType); + + /// Converts the arity type to a string + std::string DOCUTILS_LINKAGE convertArityTypeToString( + const ARITY_TYPE arityType); + + /// Converts the string to an arity type + ARITY_TYPE DOCUTILS_LINKAGE convertStringToArityType( + const std::string arityType); + + /// Converts the parameter type to a string + std::string DOCUTILS_LINKAGE convertPackageOSTypeToString( + const PACKAGE_OS_TYPE packageOSType); + + /// Converts the string to a parameter type + PACKAGE_OS_TYPE DOCUTILS_LINKAGE convertStringToPackageOSType( + const std::string packageOSType); + + /// Converts the logging level enum type to a string + std::string DOCUTILS_LINKAGE convertLoggingLevelTypeToString( + const LOGGINGLEVEL_TYPE loggingLevelType); + + /// Converts the string to a logging level enum + LOGGINGLEVEL_TYPE DOCUTILS_LINKAGE convertStringToLoggingLevelType( + const std::string loggingLevelType); + + /// Converts the logging component enum type to a string + std::string DOCUTILS_LINKAGE convertLoggingComponentTypeToString( + const LOGGINGCOMPONENT_TYPE loggingComponentType); + + /// Converts the string to a logging component enum type + LOGGINGCOMPONENT_TYPE DOCUTILS_LINKAGE convertStringToLoggingComponentType( + const std::string loggingComponentType); + + std::string DOCUTILS_LINKAGE convertCmsPolicyToString( + const CMS_POLICY cmsPolicy); + + CMS_POLICY DOCUTILS_LINKAGE convertStringToCmsPolicy( + const std::string cmsPolicy); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/ParameterUtils.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/ParameterUtils.cpp new file mode 100644 index 000000000..e0443edad --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/ParameterUtils.cpp @@ -0,0 +1,332 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc-> All rights reserved-> + * -- VMware Confidential + * + */ + +#include "stdafx.h" +#include "ParameterUtils.h" + +using namespace Caf; + +SmartPtrCRequestParameterDoc ParameterUtils::findOptionalParameter( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("ParameterUtils", "findOptionalParameter"); + + SmartPtrCRequestParameterDoc parameterRc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(parameterName); + CAF_CM_VALIDATE_SMARTPTR(parameterCollection); + + const std::deque parameterCollectionInner = + parameterCollection->getParameter(); + for (TConstIterator > parameterIter(parameterCollectionInner); + parameterIter; parameterIter++) { + const SmartPtrCRequestParameterDoc parameterTmp = *parameterIter; + const std::string parameterNameTmp = parameterTmp->getName(); + if (parameterNameTmp.compare(parameterName) == 0) { + parameterRc = parameterTmp; + } + } + } + CAF_CM_EXIT; + + return parameterRc; +} + +SmartPtrCRequestParameterDoc ParameterUtils::findRequiredParameter( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection) { + CAF_CM_STATIC_FUNC_LOG("ParameterUtils", "findRequiredParameter"); + + SmartPtrCRequestParameterDoc parameterRc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(parameterName); + CAF_CM_VALIDATE_SMARTPTR(parameterCollection); + + parameterRc = findOptionalParameter(parameterName, parameterCollection); + if (parameterRc.IsNull()) { + CAF_CM_EXCEPTIONEX_VA1(NoSuchElementException, ERROR_NOT_FOUND, + "Required parameter not found - %s", parameterName.c_str()); + } + } + CAF_CM_EXIT; + + return parameterRc; +} + +std::deque ParameterUtils::findOptionalParameterAsStringCollection( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("ParameterUtils", "findOptionalParameterAsStringCollection"); + + std::deque parameterValueCollectionRc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(parameterName); + CAF_CM_VALIDATE_SMARTPTR(parameterCollection); + + const SmartPtrCRequestParameterDoc parameter = findOptionalParameter(parameterName, parameterCollection); + if (! parameter.IsNull()) { + parameterValueCollectionRc = parameter->getValue(); + } + } + CAF_CM_EXIT; + + return parameterValueCollectionRc; +} + +std::deque ParameterUtils::findRequiredParameterAsStringCollection( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("ParameterUtils", "findRequiredParameterAsStringCollection"); + + std::deque parameterValueCollectionRc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(parameterName); + CAF_CM_VALIDATE_SMARTPTR(parameterCollection); + + const SmartPtrCRequestParameterDoc parameter = findRequiredParameter(parameterName, parameterCollection); + parameterValueCollectionRc = parameter->getValue(); + } + CAF_CM_EXIT; + + return parameterValueCollectionRc; +} + +std::string ParameterUtils::findOptionalParameterAsString( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("ParameterUtils", "findOptionalParameterAsString"); + + std::string parameterValueRc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(parameterName); + CAF_CM_VALIDATE_SMARTPTR(parameterCollection); + + const std::deque parameterValueCollection = + findOptionalParameterAsStringCollection(parameterName, parameterCollection); + if (parameterValueCollection.size() == 1) { + parameterValueRc = parameterValueCollection.front(); + } + } + CAF_CM_EXIT; + + return parameterValueRc; +} + +std::string ParameterUtils::findRequiredParameterAsString( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection) { + CAF_CM_STATIC_FUNC_LOG("ParameterUtils", "findRequiredParameterAsString"); + + std::string parameterValueRc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(parameterName); + CAF_CM_VALIDATE_SMARTPTR(parameterCollection); + + const std::deque parameterValueCollection = + findOptionalParameterAsStringCollection(parameterName, parameterCollection); + if (parameterValueCollection.size() != 1) { + CAF_CM_EXCEPTIONEX_VA1(NoSuchElementException, ERROR_NOT_FOUND, + "Required string parameter not found - %s", parameterName.c_str()); + } + + parameterValueRc = parameterValueCollection.front(); + } + CAF_CM_EXIT; + + return parameterValueRc; +} + +SmartPtrCRequestInstanceParameterDoc ParameterUtils::findOptionalInstanceParameter( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("ParameterUtils", "findOptionalInstanceParameter"); + + SmartPtrCRequestInstanceParameterDoc parameterRc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(parameterName); + CAF_CM_VALIDATE_SMARTPTR(parameterCollection); + + const std::deque parameterCollectionInner = + parameterCollection->getInstanceParameter(); + for (TConstIterator > parameterIter(parameterCollectionInner); + parameterIter; parameterIter++) { + const SmartPtrCRequestInstanceParameterDoc parameterTmp = *parameterIter; + const std::string parameterNameTmp = parameterTmp->getName(); + if (parameterNameTmp.compare(parameterName) == 0) { + parameterRc = parameterTmp; + } + } + } + CAF_CM_EXIT; + + return parameterRc; +} + +SmartPtrCRequestInstanceParameterDoc ParameterUtils::findRequiredInstanceParameter( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection) { + CAF_CM_STATIC_FUNC_LOG("ParameterUtils", "findRequiredInstanceParameter"); + + SmartPtrCRequestInstanceParameterDoc parameterRc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(parameterName); + CAF_CM_VALIDATE_SMARTPTR(parameterCollection); + + parameterRc = findOptionalInstanceParameter(parameterName, parameterCollection); + if (parameterRc.IsNull()) { + CAF_CM_EXCEPTIONEX_VA1(NoSuchElementException, ERROR_NOT_FOUND, + "Required parameter not found - %s", parameterName.c_str()); + } + } + CAF_CM_EXIT; + + return parameterRc; +} + +std::deque ParameterUtils::findOptionalInstanceParameterAsStringCollection( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("ParameterUtils", "findOptionalInstanceParameterAsStringCollection"); + + std::deque parameterValueCollectionRc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(parameterName); + CAF_CM_VALIDATE_SMARTPTR(parameterCollection); + + const SmartPtrCRequestInstanceParameterDoc parameter = findOptionalInstanceParameter(parameterName, parameterCollection); + if (! parameter.IsNull()) { + parameterValueCollectionRc = parameter->getValue(); + } + } + CAF_CM_EXIT; + + return parameterValueCollectionRc; +} + +std::deque ParameterUtils::findRequiredInstanceParameterAsStringCollection( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("ParameterUtils", "findRequiredInstanceParameterAsStringCollection"); + + std::deque parameterValueCollectionRc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(parameterName); + CAF_CM_VALIDATE_SMARTPTR(parameterCollection); + + const SmartPtrCRequestInstanceParameterDoc parameter = findRequiredInstanceParameter(parameterName, parameterCollection); + parameterValueCollectionRc = parameter->getValue(); + } + CAF_CM_EXIT; + + return parameterValueCollectionRc; +} + +std::string ParameterUtils::findOptionalInstanceParameterAsString( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("ParameterUtils", "findOptionalInstanceParameterAsString"); + + std::string parameterValueRc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(parameterName); + CAF_CM_VALIDATE_SMARTPTR(parameterCollection); + + const std::deque parameterValueCollection = + findOptionalInstanceParameterAsStringCollection(parameterName, parameterCollection); + if (parameterValueCollection.size() == 1) { + parameterValueRc = parameterValueCollection.front(); + } + } + CAF_CM_EXIT; + + return parameterValueRc; +} + +std::string ParameterUtils::findRequiredInstanceParameterAsString( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection) { + CAF_CM_STATIC_FUNC_LOG("ParameterUtils", "findRequiredInstanceParameterAsString"); + + std::string parameterValueRc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(parameterName); + CAF_CM_VALIDATE_SMARTPTR(parameterCollection); + + const std::deque parameterValueCollection = + findOptionalInstanceParameterAsStringCollection(parameterName, parameterCollection); + if (parameterValueCollection.size() != 1) { + CAF_CM_EXCEPTIONEX_VA1(NoSuchElementException, ERROR_NOT_FOUND, + "Required string parameter not found - %s", parameterName.c_str()); + } + + parameterValueRc = parameterValueCollection.front(); + } + CAF_CM_EXIT; + + return parameterValueRc; +} + +SmartPtrCRequestParameterDoc ParameterUtils::createParameter( + const std::string& name, + const std::string& value) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("ParameterUtils", "createParameter"); + + SmartPtrCRequestParameterDoc parameter; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(name); + CAF_CM_VALIDATE_STRING(value); + + std::deque valueCollection; + valueCollection.push_back(value); + + parameter.CreateInstance(); + parameter->initialize( + name, + PARAMETER_STRING, + valueCollection); + } + CAF_CM_EXIT; + + return parameter; +} + +SmartPtrCRequestParameterDoc ParameterUtils::createParameter( + const std::string& name, + const std::deque& valueCollection) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("ParameterUtils", "createParameter"); + + SmartPtrCRequestParameterDoc parameter; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(name); + CAF_CM_VALIDATE_STL(valueCollection); + + parameter.CreateInstance(); + parameter->initialize( + name, + PARAMETER_STRING, + valueCollection); + } + CAF_CM_EXIT; + + return parameter; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/ParameterUtils.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/ParameterUtils.h new file mode 100644 index 000000000..0b6585718 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/ParameterUtils.h @@ -0,0 +1,80 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + */ + +#ifndef ParameterUtils_h_ +#define ParameterUtils_h_ + +namespace Caf { +class DOCUTILS_LINKAGE ParameterUtils { +public: + static SmartPtrCRequestParameterDoc findOptionalParameter( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection); + + static SmartPtrCRequestParameterDoc findRequiredParameter( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection); + + static std::deque findOptionalParameterAsStringCollection( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection); + + static std::deque findRequiredParameterAsStringCollection( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection); + + static std::string findOptionalParameterAsString( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection); + + static std::string findRequiredParameterAsString( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection); + +public: + static SmartPtrCRequestInstanceParameterDoc findOptionalInstanceParameter( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection); + + static SmartPtrCRequestInstanceParameterDoc findRequiredInstanceParameter( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection); + + static std::deque findOptionalInstanceParameterAsStringCollection( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection); + + static std::deque findRequiredInstanceParameterAsStringCollection( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection); + + static std::string findOptionalInstanceParameterAsString( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection); + + static std::string findRequiredInstanceParameterAsString( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection); + +public: + static SmartPtrCRequestParameterDoc createParameter( + const std::string& name, + const std::string& value); + + static SmartPtrCRequestParameterDoc createParameter( + const std::string& name, + const std::deque& valueCollection); + +private: + CAF_CM_DECLARE_NOCREATE(ParameterUtils); +}; + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/stdafx.h new file mode 100644 index 000000000..0494c56dd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/stdafx.h @@ -0,0 +1,20 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#include +#include +#include "DocUtilsLink.h" + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AddInCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AddInCollectionXml.cpp new file mode 100644 index 000000000..661b54f1f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AddInCollectionXml.cpp @@ -0,0 +1,73 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "AddInCollectionXml.h" + +using namespace Caf; + +void AddInCollectionXml::add( + const SmartPtrCAddInCollectionDoc addInCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("AddInCollectionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(addInCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque addInVal = + addInCollectionDoc->getAddInCollection(); + CAF_CM_VALIDATE_STL(addInVal); + + if (! addInVal.empty()) { + for (TConstIterator > addInIter(addInVal); + addInIter; addInIter++) { + const SmartPtrCXmlElement addInXml = + thisXml->createAndAddElement("addIn"); + addInXml->setValue(*addInIter); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCAddInCollectionDoc AddInCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("AddInCollectionXml", "parse"); + + SmartPtrCAddInCollectionDoc addInCollectionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection addInChildrenXml = + thisXml->findRequiredChildren("addIn"); + + std::deque addInVal; + if (! addInChildrenXml.IsNull() && ! addInChildrenXml->empty()) { + for (TConstIterator addInXmlIter(*addInChildrenXml); + addInXmlIter; addInXmlIter++) { + const SmartPtrCXmlElement addInXml = addInXmlIter->second; + const std::string addInDoc = addInXml->getValue(); + addInVal.push_back(addInDoc); + } + } + + addInCollectionDoc.CreateInstance(); + addInCollectionDoc->initialize( + addInVal); + } + CAF_CM_EXIT; + + return addInCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AddInCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AddInCollectionXml.h new file mode 100644 index 000000000..ed3f55130 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AddInCollectionXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef AddInCollectionXml_h_ +#define AddInCollectionXml_h_ + +namespace Caf { + + /// Streams the AddInCollection class to/from XML + namespace AddInCollectionXml { + + /// Adds the AddInCollectionDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCAddInCollectionDoc addInCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the AddInCollectionDoc from the XML. + SmartPtrCAddInCollectionDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AddInsXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AddInsXml.cpp new file mode 100644 index 000000000..39b58a0e0 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AddInsXml.cpp @@ -0,0 +1,74 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "AddInsXml.h" + +using namespace Caf; + +void AddInsXml::add( + const SmartPtrCAddInsDoc addInsDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("AddInsXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(addInsDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque addInCollectionVal = + addInsDoc->getAddInCollection(); + CAF_CM_VALIDATE_STL(addInCollectionVal); + + if (! addInCollectionVal.empty()) { + for (TConstIterator > addInCollectionIter(addInCollectionVal); + addInCollectionIter; addInCollectionIter++) { + const SmartPtrCXmlElement addInCollectionXml = + thisXml->createAndAddElement("addInCollection"); + AddInCollectionXml::add(*addInCollectionIter, addInCollectionXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCAddInsDoc AddInsXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("AddInsXml", "parse"); + + SmartPtrCAddInsDoc addInsDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection addInCollectionChildrenXml = + thisXml->findRequiredChildren("addInCollection"); + + std::deque addInCollectionVal; + if (! addInCollectionChildrenXml.IsNull() && ! addInCollectionChildrenXml->empty()) { + for (TConstIterator addInCollectionXmlIter(*addInCollectionChildrenXml); + addInCollectionXmlIter; addInCollectionXmlIter++) { + const SmartPtrCXmlElement addInCollectionXml = addInCollectionXmlIter->second; + const SmartPtrCAddInCollectionDoc addInCollectionDoc = + AddInCollectionXml::parse(addInCollectionXml); + addInCollectionVal.push_back(addInCollectionDoc); + } + } + + addInsDoc.CreateInstance(); + addInsDoc->initialize( + addInCollectionVal); + } + CAF_CM_EXIT; + + return addInsDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AddInsXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AddInsXml.h new file mode 100644 index 000000000..7610f80ac --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AddInsXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef AddInsXml_h_ +#define AddInsXml_h_ + +namespace Caf { + + /// Streams the AddIns class to/from XML + namespace AddInsXml { + + /// Adds the AddInsDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCAddInsDoc addInsDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the AddInsDoc from the XML. + SmartPtrCAddInsDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AttachmentCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AttachmentCollectionXml.cpp new file mode 100644 index 000000000..fee9cdfb6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AttachmentCollectionXml.cpp @@ -0,0 +1,72 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "AttachmentCollectionXml.h" + +using namespace Caf; + +void AttachmentCollectionXml::add( + const SmartPtrCAttachmentCollectionDoc attachmentCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("AttachmentCollectionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(attachmentCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque attachmentVal = + attachmentCollectionDoc->getAttachment(); + if (! attachmentVal.empty()) { + for (TConstIterator > attachmentIter(attachmentVal); + attachmentIter; attachmentIter++) { + const SmartPtrCXmlElement attachmentXml = + thisXml->createAndAddElement("attachment"); + AttachmentXml::add(*attachmentIter, attachmentXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCAttachmentCollectionDoc AttachmentCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("AttachmentCollectionXml", "parse"); + + SmartPtrCAttachmentCollectionDoc attachmentCollectionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection attachmentChildrenXml = + thisXml->findOptionalChildren("attachment"); + + std::deque attachmentVal; + if (! attachmentChildrenXml.IsNull() && ! attachmentChildrenXml->empty()) { + for (TConstIterator attachmentXmlIter(*attachmentChildrenXml); + attachmentXmlIter; attachmentXmlIter++) { + const SmartPtrCXmlElement attachmentXml = attachmentXmlIter->second; + const SmartPtrCAttachmentDoc attachmentDoc = + AttachmentXml::parse(attachmentXml); + attachmentVal.push_back(attachmentDoc); + } + } + + attachmentCollectionDoc.CreateInstance(); + attachmentCollectionDoc->initialize( + attachmentVal); + } + CAF_CM_EXIT; + + return attachmentCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AttachmentCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AttachmentCollectionXml.h new file mode 100644 index 000000000..05f7b8d93 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AttachmentCollectionXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef AttachmentCollectionXml_h_ +#define AttachmentCollectionXml_h_ + +namespace Caf { + + /// Streams the AttachmentCollection class to/from XML + namespace AttachmentCollectionXml { + + /// Adds the AttachmentCollectionDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCAttachmentCollectionDoc attachmentCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the AttachmentCollectionDoc from the XML. + SmartPtrCAttachmentCollectionDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AttachmentNameCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AttachmentNameCollectionXml.cpp new file mode 100644 index 000000000..6fe3a45c0 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AttachmentNameCollectionXml.cpp @@ -0,0 +1,73 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "AttachmentNameCollectionXml.h" + +using namespace Caf; + +void AttachmentNameCollectionXml::add( + const SmartPtrCAttachmentNameCollectionDoc attachmentNameCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("AttachmentNameCollectionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(attachmentNameCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque nameVal = + attachmentNameCollectionDoc->getName(); + CAF_CM_VALIDATE_STL(nameVal); + + if (! nameVal.empty()) { + for (TConstIterator > nameIter(nameVal); + nameIter; nameIter++) { + const SmartPtrCXmlElement nameXml = + thisXml->createAndAddElement("attachmentName"); + nameXml->addAttribute("name", *nameIter); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCAttachmentNameCollectionDoc AttachmentNameCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("AttachmentNameCollectionXml", "parse"); + + SmartPtrCAttachmentNameCollectionDoc attachmentNameCollectionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection nameChildrenXml = + thisXml->findRequiredChildren("attachmentName"); + + std::deque nameVal; + if (! nameChildrenXml.IsNull() && ! nameChildrenXml->empty()) { + for (TConstIterator nameXmlIter(*nameChildrenXml); + nameXmlIter; nameXmlIter++) { + const SmartPtrCXmlElement nameXml = nameXmlIter->second; + const std::string name = nameXml->findRequiredAttribute("name"); + nameVal.push_back(name); + } + } + + attachmentNameCollectionDoc.CreateInstance(); + attachmentNameCollectionDoc->initialize( + nameVal); + } + CAF_CM_EXIT; + + return attachmentNameCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AttachmentNameCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AttachmentNameCollectionXml.h new file mode 100644 index 000000000..71ca95dee --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AttachmentNameCollectionXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef AttachmentNameCollectionXml_h_ +#define AttachmentNameCollectionXml_h_ + +namespace Caf { + + /// Streams the AttachmentNameCollection class to/from XML + namespace AttachmentNameCollectionXml { + + /// Adds the AttachmentNameCollectionDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCAttachmentNameCollectionDoc attachmentNameCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the AttachmentNameCollectionDoc from the XML. + SmartPtrCAttachmentNameCollectionDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AttachmentXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AttachmentXml.cpp new file mode 100644 index 000000000..6ae5d6ba5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AttachmentXml.cpp @@ -0,0 +1,95 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "AttachmentXml.h" + +using namespace Caf; + +void AttachmentXml::add( + const SmartPtrCAttachmentDoc attachmentDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("AttachmentXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(attachmentDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameVal = attachmentDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::string typeVal = attachmentDoc->getType(); + CAF_CM_VALIDATE_STRING(typeVal); + thisXml->addAttribute("type", typeVal); + + const std::string uriVal = attachmentDoc->getUri(); + CAF_CM_VALIDATE_STRING(uriVal); + thisXml->addAttribute("uri", uriVal); + + const std::string isReferenceVal = attachmentDoc->getIsReference() ? "true" : "false"; + CAF_CM_VALIDATE_STRING(isReferenceVal); + thisXml->addAttribute("isReference", isReferenceVal); + + const CMS_POLICY cmsPolicyVal = attachmentDoc->getCmsPolicy(); + thisXml->addAttribute("cmsPolicy", EnumConvertersXml::convertCmsPolicyToString(cmsPolicyVal)); + } + CAF_CM_EXIT; +} + +SmartPtrCAttachmentDoc AttachmentXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("AttachmentXml", "parse"); + + SmartPtrCAttachmentDoc attachmentDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const std::string typeStrVal = + thisXml->findRequiredAttribute("type"); + const std::string typeVal = typeStrVal; + + const std::string uriStrVal = + thisXml->findRequiredAttribute("uri"); + const std::string uriVal = uriStrVal; + + const std::string isReferenceStrVal = + thisXml->findRequiredAttribute("isReference"); + bool isReferenceVal = false; + if (! isReferenceStrVal.empty()) { + isReferenceVal = (isReferenceStrVal.compare("true") == 0) ? true : false; + } + + CMS_POLICY cmsPolicyVal = CMS_POLICY_NONE; + const std::string cmsPolicyStr = thisXml->findOptionalAttribute("cmsPolicy"); + if (! cmsPolicyStr.empty()) { + cmsPolicyVal = EnumConvertersXml::convertStringToCmsPolicy(cmsPolicyStr); + } + + attachmentDoc.CreateInstance(); + attachmentDoc->initialize( + nameVal, + typeVal, + uriVal, + isReferenceVal, + cmsPolicyVal); + } + CAF_CM_EXIT; + + return attachmentDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AttachmentXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AttachmentXml.h new file mode 100644 index 000000000..5fb9f93c5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AttachmentXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef AttachmentXml_h_ +#define AttachmentXml_h_ + +namespace Caf { + + /// Streams the Attachment class to/from XML + namespace AttachmentXml { + + /// Adds the AttachmentDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCAttachmentDoc attachmentDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the AttachmentDoc from the XML. + SmartPtrCAttachmentDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AuthnAuthzCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AuthnAuthzCollectionXml.cpp new file mode 100644 index 000000000..6fd5eab50 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AuthnAuthzCollectionXml.cpp @@ -0,0 +1,74 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "AuthnAuthzCollectionXml.h" + +using namespace Caf; + +void AuthnAuthzCollectionXml::add( + const SmartPtrCAuthnAuthzCollectionDoc authnAuthzCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("AuthnAuthzCollectionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(authnAuthzCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque authnAuthzVal = + authnAuthzCollectionDoc->getAuthnAuthz(); + CAF_CM_VALIDATE_STL(authnAuthzVal); + + if (! authnAuthzVal.empty()) { + for (TConstIterator > authnAuthzIter(authnAuthzVal); + authnAuthzIter; authnAuthzIter++) { + const SmartPtrCXmlElement authnAuthzXml = + thisXml->createAndAddElement("authnAuthz"); + AuthnAuthzXml::add(*authnAuthzIter, authnAuthzXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCAuthnAuthzCollectionDoc AuthnAuthzCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("AuthnAuthzCollectionXml", "parse"); + + SmartPtrCAuthnAuthzCollectionDoc authnAuthzCollectionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection authnAuthzChildrenXml = + thisXml->findRequiredChildren("authnAuthz"); + + std::deque authnAuthzVal; + if (! authnAuthzChildrenXml.IsNull() && ! authnAuthzChildrenXml->empty()) { + for (TConstIterator authnAuthzXmlIter(*authnAuthzChildrenXml); + authnAuthzXmlIter; authnAuthzXmlIter++) { + const SmartPtrCXmlElement authnAuthzXml = authnAuthzXmlIter->second; + const SmartPtrCAuthnAuthzDoc authnAuthzDoc = + AuthnAuthzXml::parse(authnAuthzXml); + authnAuthzVal.push_back(authnAuthzDoc); + } + } + + authnAuthzCollectionDoc.CreateInstance(); + authnAuthzCollectionDoc->initialize( + authnAuthzVal); + } + CAF_CM_EXIT; + + return authnAuthzCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AuthnAuthzCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AuthnAuthzCollectionXml.h new file mode 100644 index 000000000..1838b353d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AuthnAuthzCollectionXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef AuthnAuthzCollectionXml_h_ +#define AuthnAuthzCollectionXml_h_ + +namespace Caf { + + /// Streams the AuthnAuthzCollection class to/from XML + namespace AuthnAuthzCollectionXml { + + /// Adds the AuthnAuthzCollectionDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCAuthnAuthzCollectionDoc authnAuthzCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the AuthnAuthzCollectionDoc from the XML. + SmartPtrCAuthnAuthzCollectionDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AuthnAuthzXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AuthnAuthzXml.cpp new file mode 100644 index 000000000..74df391db --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AuthnAuthzXml.cpp @@ -0,0 +1,87 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "AuthnAuthzXml.h" + +using namespace Caf; + +void AuthnAuthzXml::add( + const SmartPtrCAuthnAuthzDoc authnAuthzDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("AuthnAuthzXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(authnAuthzDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string typeVal = authnAuthzDoc->getType(); + CAF_CM_VALIDATE_STRING(typeVal); + thisXml->addAttribute("type", typeVal); + + const std::string valueVal = authnAuthzDoc->getValue(); + CAF_CM_VALIDATE_STRING(valueVal); + const SmartPtrCXmlElement valueXml = + thisXml->createAndAddElement("value"); + valueXml->setValue(valueVal); + + const std::string nameVal = authnAuthzDoc->getName(); + if (! nameVal.empty()) { + thisXml->addAttribute("name", nameVal); + } + + const std::string sequenceNumberVal = + CStringConv::toString(authnAuthzDoc->getSequenceNumber()); + if (! sequenceNumberVal.empty()) { + thisXml->addAttribute("sequenceNumber", sequenceNumberVal); + } + } + CAF_CM_EXIT; +} + +SmartPtrCAuthnAuthzDoc AuthnAuthzXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("AuthnAuthzXml", "parse"); + + SmartPtrCAuthnAuthzDoc authnAuthzDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string typeVal = + thisXml->findRequiredAttribute("type"); + + const std::string valueVal = + thisXml->findRequiredChild("value")->getValue(); + + const std::string nameVal = + thisXml->findOptionalAttribute("name"); + + const std::string sequenceNumberStrVal = + thisXml->findOptionalAttribute("sequenceNumber"); + int32 sequenceNumberVal = 0; + if (! sequenceNumberStrVal.empty()) { + sequenceNumberVal = CStringConv::fromString(sequenceNumberStrVal); + } + + authnAuthzDoc.CreateInstance(); + authnAuthzDoc->initialize( + typeVal, + valueVal, + nameVal, + sequenceNumberVal); + } + CAF_CM_EXIT; + + return authnAuthzDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AuthnAuthzXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AuthnAuthzXml.h new file mode 100644 index 000000000..92aeb488d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AuthnAuthzXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef AuthnAuthzXml_h_ +#define AuthnAuthzXml_h_ + +namespace Caf { + + /// Streams the AuthnAuthz class to/from XML + namespace AuthnAuthzXml { + + /// Adds the AuthnAuthzDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCAuthnAuthzDoc authnAuthzDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the AuthnAuthzDoc from the XML. + SmartPtrCAuthnAuthzDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/CafCoreTypesXmlInc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/CafCoreTypesXmlInc.h new file mode 100644 index 000000000..73b2ac464 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/CafCoreTypesXmlInc.h @@ -0,0 +1,41 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CafCoreTypesXml_Inc_h_ +#define CafCoreTypesXml_Inc_h_ + +#include "StatisticsXml.h" +#include "RequestParameterXml.h" +#include "RequestInstanceParameterXml.h" +#include "ParameterCollectionXml.h" +#include "PropertyXml.h" +#include "PropertyCollectionXml.h" +#include "AttachmentXml.h" +#include "AttachmentCollectionXml.h" +#include "AttachmentNameCollectionXml.h" +#include "ClassFiltersXml.h" +#include "FullyQualifiedClassGroupXml.h" +#include "ClassSpecifierXml.h" +#include "LoggingLevelElemXml.h" +#include "LoggingLevelCollectionXml.h" +#include "OperationXml.h" +#include "AddInCollectionXml.h" +#include "AddInsXml.h" +#include "AuthnAuthzCollectionXml.h" +#include "AuthnAuthzXml.h" +#include "ProtocolCollectionXml.h" +#include "ProtocolXml.h" +#include "RequestConfigXml.h" +#include "RequestHeaderXml.h" +#include "RequestXml.h" + +#endif /* CafCoreTypesXml_Inc_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/CafCoreTypesXmlLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/CafCoreTypesXmlLink.h new file mode 100644 index 000000000..b5795701e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/CafCoreTypesXmlLink.h @@ -0,0 +1,30 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CafCoreTypesXml_Link_h_ +#define CafCoreTypesXml_Link_h_ + +#ifndef CAFCORETYPESXML_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define CAFCORETYPESXML_LINKAGE __declspec(dllexport) + #else + #define CAFCORETYPESXML_LINKAGE __declspec(dllimport) + #endif + #else + #define CAFCORETYPESXML_LINKAGE + #endif +#endif + +#include "CafCoreTypesXmlInc.h" + +#endif /* CafCoreTypesXml_Link_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ClassFiltersXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ClassFiltersXml.cpp new file mode 100644 index 000000000..6ad727326 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ClassFiltersXml.cpp @@ -0,0 +1,82 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "ClassFiltersXml.h" + +using namespace Caf; + +void ClassFiltersXml::add( + const SmartPtrCClassFiltersDoc classFiltersDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ClassFiltersXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(classFiltersDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string dialectVal = classFiltersDoc->getDialect(); + CAF_CM_VALIDATE_STRING(dialectVal); + thisXml->addAttribute("dialect", dialectVal); + + const std::deque classFilterVal = + classFiltersDoc->getClassFilter(); + CAF_CM_VALIDATE_STL(classFilterVal); + + if (! classFilterVal.empty()) { + for (TConstIterator > classFilterIter(classFilterVal); + classFilterIter; classFilterIter++) { + const SmartPtrCXmlElement classFilterXml = + thisXml->createAndAddElement("classFilter"); + classFilterXml->setValue(*classFilterIter); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCClassFiltersDoc ClassFiltersXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ClassFiltersXml", "parse"); + + SmartPtrCClassFiltersDoc classFiltersDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string dialectStrVal = + thisXml->findRequiredAttribute("dialect"); + const std::string dialectVal = dialectStrVal; + + const CXmlElement::SmartPtrCElementCollection classFilterChildrenXml = + thisXml->findRequiredChildren("classFilter"); + + std::deque classFilterVal; + if (! classFilterChildrenXml.IsNull() && ! classFilterChildrenXml->empty()) { + for (TConstIterator classFilterXmlIter(*classFilterChildrenXml); + classFilterXmlIter; classFilterXmlIter++) { + const SmartPtrCXmlElement classFilterXml = classFilterXmlIter->second; + const std::string classFilterDoc = classFilterXml->getValue(); + classFilterVal.push_back(classFilterDoc); + } + } + + classFiltersDoc.CreateInstance(); + classFiltersDoc->initialize( + dialectVal, + classFilterVal); + } + CAF_CM_EXIT; + + return classFiltersDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ClassFiltersXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ClassFiltersXml.h new file mode 100644 index 000000000..774c0ce2d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ClassFiltersXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ClassFiltersXml_h_ +#define ClassFiltersXml_h_ + +namespace Caf { + + /// Streams the ClassFilters class to/from XML + namespace ClassFiltersXml { + + /// Adds the ClassFiltersDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCClassFiltersDoc classFiltersDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ClassFiltersDoc from the XML. + SmartPtrCClassFiltersDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ClassSpecifierXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ClassSpecifierXml.cpp new file mode 100644 index 000000000..8874b23e8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ClassSpecifierXml.cpp @@ -0,0 +1,80 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "ClassSpecifierXml.h" + +using namespace Caf; + +void ClassSpecifierXml::add( + const SmartPtrCClassSpecifierDoc classSpecifierDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ClassSpecifierXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(classSpecifierDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const SmartPtrCFullyQualifiedClassGroupDoc fullyQualifiedClassVal = + classSpecifierDoc->getFullyQualifiedClass(); + if (! fullyQualifiedClassVal.IsNull()) { + const SmartPtrCXmlElement fullyQualifiedClassXml = + thisXml->createAndAddElement("fullyQualifiedClass"); + FullyQualifiedClassGroupXml::add(fullyQualifiedClassVal, fullyQualifiedClassXml); + } + + const SmartPtrCClassFiltersDoc classFiltersVal = + classSpecifierDoc->getClassFilters(); + if (! classFiltersVal.IsNull()) { + const SmartPtrCXmlElement classFiltersXml = + thisXml->createAndAddElement("classFilters"); + ClassFiltersXml::add(classFiltersVal, classFiltersXml); + } + } + CAF_CM_EXIT; +} + +SmartPtrCClassSpecifierDoc ClassSpecifierXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ClassSpecifierXml", "parse"); + + SmartPtrCClassSpecifierDoc classSpecifierDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const SmartPtrCXmlElement fullyQualifiedClassXml = + thisXml->findOptionalChild("fullyQualifiedClass"); + + SmartPtrCFullyQualifiedClassGroupDoc fullyQualifiedClassVal; + if (! fullyQualifiedClassXml.IsNull()) { + fullyQualifiedClassVal = FullyQualifiedClassGroupXml::parse(fullyQualifiedClassXml); + } + + const SmartPtrCXmlElement classFiltersXml = + thisXml->findOptionalChild("classFilters"); + + SmartPtrCClassFiltersDoc classFiltersVal; + if (! classFiltersXml.IsNull()) { + classFiltersVal = ClassFiltersXml::parse(classFiltersXml); + } + + classSpecifierDoc.CreateInstance(); + classSpecifierDoc->initialize( + fullyQualifiedClassVal, + classFiltersVal); + } + CAF_CM_EXIT; + + return classSpecifierDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ClassSpecifierXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ClassSpecifierXml.h new file mode 100644 index 000000000..aede4c494 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ClassSpecifierXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ClassSpecifierXml_h_ +#define ClassSpecifierXml_h_ + +namespace Caf { + + /// Streams the ClassSpecifier class to/from XML + namespace ClassSpecifierXml { + + /// Adds the ClassSpecifierDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCClassSpecifierDoc classSpecifierDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ClassSpecifierDoc from the XML. + SmartPtrCClassSpecifierDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/FullyQualifiedClassGroupXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/FullyQualifiedClassGroupXml.cpp new file mode 100644 index 000000000..93875917a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/FullyQualifiedClassGroupXml.cpp @@ -0,0 +1,73 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "FullyQualifiedClassGroupXml.h" + +using namespace Caf; + +void FullyQualifiedClassGroupXml::add( + const SmartPtrCFullyQualifiedClassGroupDoc fullyQualifiedClassGroupDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("FullyQualifiedClassGroupXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(fullyQualifiedClassGroupDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string classNamespaceVal = fullyQualifiedClassGroupDoc->getClassNamespace(); + CAF_CM_VALIDATE_STRING(classNamespaceVal); + thisXml->addAttribute("classNamespace", classNamespaceVal); + + const std::string classNameVal = fullyQualifiedClassGroupDoc->getClassName(); + CAF_CM_VALIDATE_STRING(classNameVal); + thisXml->addAttribute("className", classNameVal); + + const std::string classVersionVal = fullyQualifiedClassGroupDoc->getClassVersion(); + CAF_CM_VALIDATE_STRING(classVersionVal); + thisXml->addAttribute("classVersion", classVersionVal); + } + CAF_CM_EXIT; +} + +SmartPtrCFullyQualifiedClassGroupDoc FullyQualifiedClassGroupXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("FullyQualifiedClassGroupXml", "parse"); + + SmartPtrCFullyQualifiedClassGroupDoc fullyQualifiedClassGroupDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string classNamespaceStrVal = + thisXml->findRequiredAttribute("classNamespace"); + const std::string classNamespaceVal = classNamespaceStrVal; + + const std::string classNameStrVal = + thisXml->findRequiredAttribute("className"); + const std::string classNameVal = classNameStrVal; + + const std::string classVersionStrVal = + thisXml->findRequiredAttribute("classVersion"); + const std::string classVersionVal = classVersionStrVal; + + fullyQualifiedClassGroupDoc.CreateInstance(); + fullyQualifiedClassGroupDoc->initialize( + classNamespaceVal, + classNameVal, + classVersionVal); + } + CAF_CM_EXIT; + + return fullyQualifiedClassGroupDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/FullyQualifiedClassGroupXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/FullyQualifiedClassGroupXml.h new file mode 100644 index 000000000..83a163e69 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/FullyQualifiedClassGroupXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef FullyQualifiedClassGroupXml_h_ +#define FullyQualifiedClassGroupXml_h_ + +namespace Caf { + + /// Streams the FullyQualifiedClassGroup class to/from XML + namespace FullyQualifiedClassGroupXml { + + /// Adds the FullyQualifiedClassGroupDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCFullyQualifiedClassGroupDoc fullyQualifiedClassGroupDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the FullyQualifiedClassGroupDoc from the XML. + SmartPtrCFullyQualifiedClassGroupDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/LoggingLevelCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/LoggingLevelCollectionXml.cpp new file mode 100644 index 000000000..ff0fc627e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/LoggingLevelCollectionXml.cpp @@ -0,0 +1,74 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "LoggingLevelCollectionXml.h" + +using namespace Caf; + +void LoggingLevelCollectionXml::add( + const SmartPtrCLoggingLevelCollectionDoc loggingLevelCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("LoggingLevelCollectionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(loggingLevelCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque loggingLevelVal = + loggingLevelCollectionDoc->getLoggingLevel(); + CAF_CM_VALIDATE_STL(loggingLevelVal); + + if (! loggingLevelVal.empty()) { + for (TConstIterator > loggingLevelIter(loggingLevelVal); + loggingLevelIter; loggingLevelIter++) { + const SmartPtrCXmlElement loggingLevelXml = + thisXml->createAndAddElement("loggingLevel"); + LoggingLevelElemXml::add(*loggingLevelIter, loggingLevelXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCLoggingLevelCollectionDoc LoggingLevelCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("LoggingLevelCollectionXml", "parse"); + + SmartPtrCLoggingLevelCollectionDoc loggingLevelCollectionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection loggingLevelChildrenXml = + thisXml->findRequiredChildren("loggingLevel"); + + std::deque loggingLevelVal; + if (! loggingLevelChildrenXml.IsNull() && ! loggingLevelChildrenXml->empty()) { + for (TConstIterator loggingLevelXmlIter(*loggingLevelChildrenXml); + loggingLevelXmlIter; loggingLevelXmlIter++) { + const SmartPtrCXmlElement loggingLevelXml = loggingLevelXmlIter->second; + const SmartPtrCLoggingLevelElemDoc loggingLevelDoc = + LoggingLevelElemXml::parse(loggingLevelXml); + loggingLevelVal.push_back(loggingLevelDoc); + } + } + + loggingLevelCollectionDoc.CreateInstance(); + loggingLevelCollectionDoc->initialize( + loggingLevelVal); + } + CAF_CM_EXIT; + + return loggingLevelCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/LoggingLevelCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/LoggingLevelCollectionXml.h new file mode 100644 index 000000000..b4bbad14a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/LoggingLevelCollectionXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef LoggingLevelCollectionXml_h_ +#define LoggingLevelCollectionXml_h_ + +namespace Caf { + + /// Streams the LoggingLevelCollection class to/from XML + namespace LoggingLevelCollectionXml { + + /// Adds the LoggingLevelCollectionDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCLoggingLevelCollectionDoc loggingLevelCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the LoggingLevelCollectionDoc from the XML. + SmartPtrCLoggingLevelCollectionDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/LoggingLevelElemXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/LoggingLevelElemXml.cpp new file mode 100644 index 000000000..d2cae2e6e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/LoggingLevelElemXml.cpp @@ -0,0 +1,72 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "LoggingLevelElemXml.h" + +using namespace Caf; + +void LoggingLevelElemXml::add( + const SmartPtrCLoggingLevelElemDoc loggingLevelElemDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("LoggingLevelElemXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(loggingLevelElemDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string componentVal = + EnumConvertersXml::convertLoggingComponentTypeToString(loggingLevelElemDoc->getComponent()); + CAF_CM_VALIDATE_STRING(componentVal); + thisXml->addAttribute("component", componentVal); + + const std::string levelVal = + EnumConvertersXml::convertLoggingLevelTypeToString(loggingLevelElemDoc->getLevel()); + CAF_CM_VALIDATE_STRING(levelVal); + thisXml->addAttribute("level", levelVal); + } + CAF_CM_EXIT; +} + +SmartPtrCLoggingLevelElemDoc LoggingLevelElemXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("LoggingLevelElemXml", "parse"); + + SmartPtrCLoggingLevelElemDoc loggingLevelElemDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string componentStrVal = + thisXml->findRequiredAttribute("component"); + LOGGINGCOMPONENT_TYPE componentVal = LOGGINGCOMPONENT_NONE; + if (! componentStrVal.empty()) { + componentVal = EnumConvertersXml::convertStringToLoggingComponentType(componentStrVal); + } + + const std::string levelStrVal = + thisXml->findRequiredAttribute("level"); + LOGGINGLEVEL_TYPE levelVal = LOGGINGLEVEL_NONE; + if (! levelStrVal.empty()) { + levelVal = EnumConvertersXml::convertStringToLoggingLevelType(levelStrVal); + } + + loggingLevelElemDoc.CreateInstance(); + loggingLevelElemDoc->initialize( + componentVal, + levelVal); + } + CAF_CM_EXIT; + + return loggingLevelElemDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/LoggingLevelElemXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/LoggingLevelElemXml.h new file mode 100644 index 000000000..396280cfc --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/LoggingLevelElemXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef LoggingLevelElemXml_h_ +#define LoggingLevelElemXml_h_ + +namespace Caf { + + /// Streams the LoggingLevelElem class to/from XML + namespace LoggingLevelElemXml { + + /// Adds the LoggingLevelElemDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCLoggingLevelElemDoc loggingLevelElemDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the LoggingLevelElemDoc from the XML. + SmartPtrCLoggingLevelElemDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/OperationXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/OperationXml.cpp new file mode 100644 index 000000000..2d6e0f836 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/OperationXml.cpp @@ -0,0 +1,72 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "OperationXml.h" + +using namespace Caf; + +void OperationXml::add( + const SmartPtrCOperationDoc operationDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("OperationXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(operationDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameVal = operationDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const SmartPtrCParameterCollectionDoc parameterCollectionVal = + operationDoc->getParameterCollection(); + if (! parameterCollectionVal.IsNull()) { + const SmartPtrCXmlElement parameterCollectionXml = + thisXml->createAndAddElement("parameterCollection"); + ParameterCollectionXml::add(parameterCollectionVal, parameterCollectionXml); + } + } + CAF_CM_EXIT; +} + +SmartPtrCOperationDoc OperationXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("OperationXml", "parse"); + + SmartPtrCOperationDoc operationDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const SmartPtrCXmlElement parameterCollectionXml = + thisXml->findOptionalChild("parameterCollection"); + + SmartPtrCParameterCollectionDoc parameterCollectionVal; + if (! parameterCollectionXml.IsNull()) { + parameterCollectionVal = ParameterCollectionXml::parse(parameterCollectionXml); + } + + operationDoc.CreateInstance(); + operationDoc->initialize( + nameVal, + parameterCollectionVal); + } + CAF_CM_EXIT; + + return operationDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/OperationXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/OperationXml.h new file mode 100644 index 000000000..aba9dbeee --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/OperationXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef OperationXml_h_ +#define OperationXml_h_ + +namespace Caf { + + /// Streams the Operation class to/from XML + namespace OperationXml { + + /// Adds the OperationDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCOperationDoc operationDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the OperationDoc from the XML. + SmartPtrCOperationDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ParameterCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ParameterCollectionXml.cpp new file mode 100644 index 000000000..7f337cbdf --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ParameterCollectionXml.cpp @@ -0,0 +1,98 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "ParameterCollectionXml.h" + +using namespace Caf; + +void ParameterCollectionXml::add( + const SmartPtrCParameterCollectionDoc parameterCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ParameterCollectionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(parameterCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque parameterVal = + parameterCollectionDoc->getParameter(); + if (! parameterVal.empty()) { + for (TConstIterator > parameterIter(parameterVal); + parameterIter; parameterIter++) { + const SmartPtrCXmlElement parameterXml = + thisXml->createAndAddElement("parameter"); + RequestParameterXml::add(*parameterIter, parameterXml); + } + } + + const std::deque instanceParameterVal = + parameterCollectionDoc->getInstanceParameter(); + if (! instanceParameterVal.empty()) { + for (TConstIterator > instanceParameterIter(instanceParameterVal); + instanceParameterIter; instanceParameterIter++) { + const SmartPtrCXmlElement instanceParameterXml = + thisXml->createAndAddElement("instanceParameter"); + RequestInstanceParameterXml::add(*instanceParameterIter, instanceParameterXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCParameterCollectionDoc ParameterCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ParameterCollectionXml", "parse"); + + SmartPtrCParameterCollectionDoc parameterCollectionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection parameterChildrenXml = + thisXml->findOptionalChildren("parameter"); + + std::deque parameterVal; + if (! parameterChildrenXml.IsNull() && ! parameterChildrenXml->empty()) { + for (TConstIterator parameterXmlIter(*parameterChildrenXml); + parameterXmlIter; parameterXmlIter++) { + const SmartPtrCXmlElement parameterXml = parameterXmlIter->second; + const SmartPtrCRequestParameterDoc parameterDoc = + RequestParameterXml::parse(parameterXml); + parameterVal.push_back(parameterDoc); + } + } + + const CXmlElement::SmartPtrCElementCollection instanceParameterChildrenXml = + thisXml->findOptionalChildren("instanceParameter"); + + std::deque instanceParameterVal; + if (! instanceParameterChildrenXml.IsNull() && ! instanceParameterChildrenXml->empty()) { + for (TConstIterator instanceParameterXmlIter(*instanceParameterChildrenXml); + instanceParameterXmlIter; instanceParameterXmlIter++) { + const SmartPtrCXmlElement instanceParameterXml = instanceParameterXmlIter->second; + const SmartPtrCRequestInstanceParameterDoc instanceParameterDoc = + RequestInstanceParameterXml::parse(instanceParameterXml); + instanceParameterVal.push_back(instanceParameterDoc); + } + } + + parameterCollectionDoc.CreateInstance(); + parameterCollectionDoc->initialize( + parameterVal, + instanceParameterVal); + } + CAF_CM_EXIT; + + return parameterCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ParameterCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ParameterCollectionXml.h new file mode 100644 index 000000000..f7789fca8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ParameterCollectionXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ParameterCollectionXml_h_ +#define ParameterCollectionXml_h_ + +namespace Caf { + + /// Streams the ParameterCollection class to/from XML + namespace ParameterCollectionXml { + + /// Adds the ParameterCollectionDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCParameterCollectionDoc parameterCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ParameterCollectionDoc from the XML. + SmartPtrCParameterCollectionDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/PropertyCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/PropertyCollectionXml.cpp new file mode 100644 index 000000000..1a21e2854 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/PropertyCollectionXml.cpp @@ -0,0 +1,74 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "PropertyCollectionXml.h" + +using namespace Caf; + +void PropertyCollectionXml::add( + const SmartPtrCPropertyCollectionDoc propertyCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("PropertyCollectionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(propertyCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque propertyVal = + propertyCollectionDoc->getProperty(); + CAF_CM_VALIDATE_STL(propertyVal); + + if (! propertyVal.empty()) { + for (TConstIterator > propertyIter(propertyVal); + propertyIter; propertyIter++) { + const SmartPtrCXmlElement propertyXml = + thisXml->createAndAddElement("property"); + PropertyXml::add(*propertyIter, propertyXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCPropertyCollectionDoc PropertyCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("PropertyCollectionXml", "parse"); + + SmartPtrCPropertyCollectionDoc propertyCollectionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection propertyChildrenXml = + thisXml->findRequiredChildren("property"); + + std::deque propertyVal; + if (! propertyChildrenXml.IsNull() && ! propertyChildrenXml->empty()) { + for (TConstIterator propertyXmlIter(*propertyChildrenXml); + propertyXmlIter; propertyXmlIter++) { + const SmartPtrCXmlElement propertyXml = propertyXmlIter->second; + const SmartPtrCPropertyDoc propertyDoc = + PropertyXml::parse(propertyXml); + propertyVal.push_back(propertyDoc); + } + } + + propertyCollectionDoc.CreateInstance(); + propertyCollectionDoc->initialize( + propertyVal); + } + CAF_CM_EXIT; + + return propertyCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/PropertyCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/PropertyCollectionXml.h new file mode 100644 index 000000000..ed103863b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/PropertyCollectionXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef PropertyCollectionXml_h_ +#define PropertyCollectionXml_h_ + +namespace Caf { + + /// Streams the PropertyCollection class to/from XML + namespace PropertyCollectionXml { + + /// Adds the PropertyCollectionDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCPropertyCollectionDoc propertyCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the PropertyCollectionDoc from the XML. + SmartPtrCPropertyCollectionDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/PropertyXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/PropertyXml.cpp new file mode 100644 index 000000000..7ef747bfd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/PropertyXml.cpp @@ -0,0 +1,95 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "PropertyXml.h" + +using namespace Caf; + +void PropertyXml::add( + const SmartPtrCPropertyDoc propertyDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("PropertyXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(propertyDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameVal = propertyDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::string typeVal = + EnumConvertersXml::convertPropertyTypeToString(propertyDoc->getType()); + CAF_CM_VALIDATE_STRING(typeVal); + thisXml->addAttribute("type", typeVal); + + const std::deque valueVal = + propertyDoc->getValue(); + CAF_CM_VALIDATE_STL(valueVal); + + if (! valueVal.empty()) { + for (TConstIterator > valueIter(valueVal); + valueIter; valueIter++) { + const SmartPtrCXmlElement valueXml = + thisXml->createAndAddElement("value"); + valueXml->setValue(*valueIter); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCPropertyDoc PropertyXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("PropertyXml", "parse"); + + SmartPtrCPropertyDoc propertyDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const std::string typeStrVal = + thisXml->findRequiredAttribute("type"); + PROPERTY_TYPE typeVal = PROPERTY_NONE; + if (! typeStrVal.empty()) { + typeVal = EnumConvertersXml::convertStringToPropertyType(typeStrVal); + } + + const CXmlElement::SmartPtrCElementCollection valueChildrenXml = + thisXml->findRequiredChildren("value"); + + std::deque valueVal; + if (! valueChildrenXml.IsNull() && ! valueChildrenXml->empty()) { + for (TConstIterator valueXmlIter(*valueChildrenXml); + valueXmlIter; valueXmlIter++) { + const SmartPtrCXmlElement valueXml = valueXmlIter->second; + const std::string valueDoc = valueXml->getValue(); + valueVal.push_back(valueDoc); + } + } + + propertyDoc.CreateInstance(); + propertyDoc->initialize( + nameVal, + typeVal, + valueVal); + } + CAF_CM_EXIT; + + return propertyDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/PropertyXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/PropertyXml.h new file mode 100644 index 000000000..97e4a3d77 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/PropertyXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef PropertyXml_h_ +#define PropertyXml_h_ + +namespace Caf { + + /// Streams the Property class to/from XML + namespace PropertyXml { + + /// Adds the PropertyDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCPropertyDoc propertyDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the PropertyDoc from the XML. + SmartPtrCPropertyDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ProtocolCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ProtocolCollectionXml.cpp new file mode 100644 index 000000000..c4acf5e08 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ProtocolCollectionXml.cpp @@ -0,0 +1,74 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "ProtocolCollectionXml.h" + +using namespace Caf; + +void ProtocolCollectionXml::add( + const SmartPtrCProtocolCollectionDoc protocolCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProtocolCollectionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(protocolCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque protocolVal = + protocolCollectionDoc->getProtocol(); + CAF_CM_VALIDATE_STL(protocolVal); + + if (! protocolVal.empty()) { + for (TConstIterator > protocolIter(protocolVal); + protocolIter; protocolIter++) { + const SmartPtrCXmlElement protocolXml = + thisXml->createAndAddElement("protocol"); + ProtocolXml::add(*protocolIter, protocolXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCProtocolCollectionDoc ProtocolCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProtocolCollectionXml", "parse"); + + SmartPtrCProtocolCollectionDoc protocolCollectionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection protocolChildrenXml = + thisXml->findRequiredChildren("protocol"); + + std::deque protocolVal; + if (! protocolChildrenXml.IsNull() && ! protocolChildrenXml->empty()) { + for (TConstIterator protocolXmlIter(*protocolChildrenXml); + protocolXmlIter; protocolXmlIter++) { + const SmartPtrCXmlElement protocolXml = protocolXmlIter->second; + const SmartPtrCProtocolDoc protocolDoc = + ProtocolXml::parse(protocolXml); + protocolVal.push_back(protocolDoc); + } + } + + protocolCollectionDoc.CreateInstance(); + protocolCollectionDoc->initialize( + protocolVal); + } + CAF_CM_EXIT; + + return protocolCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ProtocolCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ProtocolCollectionXml.h new file mode 100644 index 000000000..71dab6b7b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ProtocolCollectionXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ProtocolCollectionXml_h_ +#define ProtocolCollectionXml_h_ + +namespace Caf { + + /// Streams the ProtocolCollection class to/from XML + namespace ProtocolCollectionXml { + + /// Adds the ProtocolCollectionDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCProtocolCollectionDoc protocolCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ProtocolCollectionDoc from the XML. + SmartPtrCProtocolCollectionDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ProtocolXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ProtocolXml.cpp new file mode 100644 index 000000000..e09b2124d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ProtocolXml.cpp @@ -0,0 +1,77 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "ProtocolXml.h" + +using namespace Caf; + +void ProtocolXml::add( + const SmartPtrCProtocolDoc protocolDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProtocolXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(protocolDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string uriVal = protocolDoc->getUri(); + CAF_CM_VALIDATE_STRING(uriVal); + thisXml->addAttribute("uri", uriVal); + + const std::string nameVal = protocolDoc->getName(); + if (! nameVal.empty()) { + thisXml->addAttribute("name", nameVal); + } + + const std::string sequenceNumberVal = + CStringConv::toString(protocolDoc->getSequenceNumber()); + if (! sequenceNumberVal.empty()) { + thisXml->addAttribute("sequenceNumber", sequenceNumberVal); + } + } + CAF_CM_EXIT; +} + +SmartPtrCProtocolDoc ProtocolXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProtocolXml", "parse"); + + SmartPtrCProtocolDoc protocolDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string uriVal = + thisXml->findRequiredAttribute("uri"); + + const std::string nameVal = + thisXml->findOptionalAttribute("name"); + + const std::string sequenceNumberStrVal = + thisXml->findOptionalAttribute("sequenceNumber"); + int32 sequenceNumberVal = 0; + if (! sequenceNumberStrVal.empty()) { + sequenceNumberVal = CStringConv::fromString(sequenceNumberStrVal); + } + + protocolDoc.CreateInstance(); + protocolDoc->initialize( + uriVal, + nameVal, + sequenceNumberVal); + } + CAF_CM_EXIT; + + return protocolDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ProtocolXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ProtocolXml.h new file mode 100644 index 000000000..8615170b4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ProtocolXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ProtocolXml_h_ +#define ProtocolXml_h_ + +namespace Caf { + + /// Streams the Protocol class to/from XML + namespace ProtocolXml { + + /// Adds the ProtocolDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCProtocolDoc protocolDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ProtocolDoc from the XML. + SmartPtrCProtocolDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestConfigXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestConfigXml.cpp new file mode 100644 index 000000000..530813059 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestConfigXml.cpp @@ -0,0 +1,106 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "RequestConfigXml.h" + +using namespace Caf; + +void RequestConfigXml::add( + const SmartPtrCRequestConfigDoc requestConfigDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("RequestConfigXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(requestConfigDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string responseFormatTypeVal = requestConfigDoc->getResponseFormatType(); + CAF_CM_VALIDATE_STRING(responseFormatTypeVal); + thisXml->addAttribute("responseFormatType", responseFormatTypeVal); + + const SmartPtrCAddInsDoc requestProcessorAddInsVal = + requestConfigDoc->getRequestProcessorAddIns(); + if (! requestProcessorAddInsVal.IsNull()) { + const SmartPtrCXmlElement requestProcessorAddInsXml = + thisXml->createAndAddElement("requestProcessorAddIns"); + AddInsXml::add(requestProcessorAddInsVal, requestProcessorAddInsXml); + } + + const SmartPtrCAddInsDoc responseProcessorAddInsVal = + requestConfigDoc->getResponseProcessorAddIns(); + if (! responseProcessorAddInsVal.IsNull()) { + const SmartPtrCXmlElement responseProcessorAddInsXml = + thisXml->createAndAddElement("responseProcessorAddIns"); + AddInsXml::add(responseProcessorAddInsVal, responseProcessorAddInsXml); + } + + const SmartPtrCLoggingLevelCollectionDoc loggingLevelCollectionVal = + requestConfigDoc->getLoggingLevelCollection(); + if (! loggingLevelCollectionVal.IsNull()) { + const SmartPtrCXmlElement loggingLevelCollectionXml = + thisXml->createAndAddElement("loggingLevelCollection"); + LoggingLevelCollectionXml::add(loggingLevelCollectionVal, loggingLevelCollectionXml); + } + } + CAF_CM_EXIT; +} + +SmartPtrCRequestConfigDoc RequestConfigXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("RequestConfigXml", "parse"); + + SmartPtrCRequestConfigDoc requestConfigDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string responseFormatTypeStrVal = + thisXml->findRequiredAttribute("responseFormatType"); + const std::string responseFormatTypeVal = responseFormatTypeStrVal; + + const SmartPtrCXmlElement requestProcessorAddInsXml = + thisXml->findOptionalChild("requestProcessorAddIns"); + + SmartPtrCAddInsDoc requestProcessorAddInsVal; + if (! requestProcessorAddInsXml.IsNull()) { + requestProcessorAddInsVal = AddInsXml::parse(requestProcessorAddInsXml); + } + + const SmartPtrCXmlElement responseProcessorAddInsXml = + thisXml->findOptionalChild("responseProcessorAddIns"); + + SmartPtrCAddInsDoc responseProcessorAddInsVal; + if (! responseProcessorAddInsXml.IsNull()) { + responseProcessorAddInsVal = AddInsXml::parse(responseProcessorAddInsXml); + } + + const SmartPtrCXmlElement loggingLevelCollectionXml = + thisXml->findOptionalChild("loggingLevelCollection"); + + SmartPtrCLoggingLevelCollectionDoc loggingLevelCollectionVal; + if (! loggingLevelCollectionXml.IsNull()) { + loggingLevelCollectionVal = LoggingLevelCollectionXml::parse(loggingLevelCollectionXml); + } + + requestConfigDoc.CreateInstance(); + requestConfigDoc->initialize( + responseFormatTypeVal, + requestProcessorAddInsVal, + responseProcessorAddInsVal, + loggingLevelCollectionVal); + } + CAF_CM_EXIT; + + return requestConfigDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestConfigXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestConfigXml.h new file mode 100644 index 000000000..1efc7b814 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestConfigXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef RequestConfigXml_h_ +#define RequestConfigXml_h_ + +namespace Caf { + + /// Streams the RequestConfig class to/from XML + namespace RequestConfigXml { + + /// Adds the RequestConfigDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCRequestConfigDoc requestConfigDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the RequestConfigDoc from the XML. + SmartPtrCRequestConfigDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestHeaderXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestHeaderXml.cpp new file mode 100644 index 000000000..aa65c013b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestHeaderXml.cpp @@ -0,0 +1,144 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "RequestHeaderXml.h" + +using namespace Caf; + +void RequestHeaderXml::add( + const SmartPtrCRequestHeaderDoc requestHeaderDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("RequestHeaderXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(requestHeaderDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const SmartPtrCRequestConfigDoc requestConfigVal = + requestHeaderDoc->getRequestConfig(); + CAF_CM_VALIDATE_SMARTPTR(requestConfigVal); + + const SmartPtrCXmlElement requestConfigXml = + thisXml->createAndAddElement("requestConfig"); + RequestConfigXml::add(requestConfigVal, requestConfigXml); + + const SmartPtrCAuthnAuthzCollectionDoc authnAuthzCollectionVal = + requestHeaderDoc->getAuthnAuthzCollection(); + if (! authnAuthzCollectionVal.IsNull()) { + const SmartPtrCXmlElement authnAuthzCollectionXml = + thisXml->createAndAddElement("authnAuthzCollection"); + AuthnAuthzCollectionXml::add(authnAuthzCollectionVal, authnAuthzCollectionXml); + } + + const SmartPtrCProtocolCollectionDoc protocolCollectionVal = + requestHeaderDoc->getProtocolCollection(); + if (! protocolCollectionVal.IsNull()) { + const SmartPtrCXmlElement protocolCollectionXml = + thisXml->createAndAddElement("protocolCollection"); + ProtocolCollectionXml::add(protocolCollectionVal, protocolCollectionXml); + } + + const SmartPtrCPropertyCollectionDoc echoPropertyBagVal = + requestHeaderDoc->getEchoPropertyBag(); + if (! echoPropertyBagVal.IsNull()) { + const SmartPtrCXmlElement echoPropertyBagXml = + thisXml->createAndAddElement("echoPropertyBag"); + PropertyCollectionXml::add(echoPropertyBagVal, echoPropertyBagXml); + } + + const std::string versionVal = requestHeaderDoc->getVersion(); + CAF_CM_VALIDATE_STRING(versionVal); + thisXml->addAttribute("version", versionVal); + + const std::string createdDateTimeVal = requestHeaderDoc->getCreatedDateTime(); + CAF_CM_VALIDATE_STRING(createdDateTimeVal); + thisXml->addAttribute("createdDateTime", createdDateTimeVal); + + const std::string sessionIdVal = + BasePlatform::UuidToString(requestHeaderDoc->getSessionId()); + if (! sessionIdVal.empty()) { + thisXml->addAttribute("sessionId", sessionIdVal); + } + } + CAF_CM_EXIT; +} + +SmartPtrCRequestHeaderDoc RequestHeaderXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("RequestHeaderXml", "parse"); + + SmartPtrCRequestHeaderDoc requestHeaderDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const SmartPtrCXmlElement requestConfigXml = + thisXml->findRequiredChild("requestConfig"); + + SmartPtrCRequestConfigDoc requestConfigVal; + if (! requestConfigXml.IsNull()) { + requestConfigVal = RequestConfigXml::parse(requestConfigXml); + } + + const SmartPtrCXmlElement authnAuthzCollectionXml = + thisXml->findOptionalChild("authnAuthzCollection"); + + SmartPtrCAuthnAuthzCollectionDoc authnAuthzCollectionVal; + if (! authnAuthzCollectionXml.IsNull()) { + authnAuthzCollectionVal = AuthnAuthzCollectionXml::parse(authnAuthzCollectionXml); + } + + const SmartPtrCXmlElement protocolCollectionXml = + thisXml->findOptionalChild("protocolCollection"); + + SmartPtrCProtocolCollectionDoc protocolCollectionVal; + if (! protocolCollectionXml.IsNull()) { + protocolCollectionVal = ProtocolCollectionXml::parse(protocolCollectionXml); + } + + const SmartPtrCXmlElement echoPropertyBagXml = + thisXml->findOptionalChild("echoPropertyBag"); + + SmartPtrCPropertyCollectionDoc echoPropertyBagVal; + if (! echoPropertyBagXml.IsNull()) { + echoPropertyBagVal = PropertyCollectionXml::parse(echoPropertyBagXml); + } + + const std::string versionVal = + thisXml->findRequiredAttribute("version"); + + const std::string createdDateTimeVal = + thisXml->findRequiredAttribute("createdDateTime"); + + const std::string sessionIdStrVal = + thisXml->findOptionalAttribute("sessionId"); + UUID sessionIdVal = CAFCOMMON_GUID_NULL; + if (! sessionIdStrVal.empty()) { + BasePlatform::UuidFromString(sessionIdStrVal.c_str(), sessionIdVal); + } + + requestHeaderDoc.CreateInstance(); + requestHeaderDoc->initialize( + requestConfigVal, + authnAuthzCollectionVal, + protocolCollectionVal, + echoPropertyBagVal, + versionVal, + createdDateTimeVal, + sessionIdVal); + } + CAF_CM_EXIT; + + return requestHeaderDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestHeaderXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestHeaderXml.h new file mode 100644 index 000000000..1ced4b31a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestHeaderXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef RequestHeaderXml_h_ +#define RequestHeaderXml_h_ + +namespace Caf { + + /// Streams the RequestHeader class to/from XML + namespace RequestHeaderXml { + + /// Adds the RequestHeaderDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCRequestHeaderDoc requestHeaderDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the RequestHeaderDoc from the XML. + SmartPtrCRequestHeaderDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestInstanceParameterXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestInstanceParameterXml.cpp new file mode 100644 index 000000000..a83c0d895 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestInstanceParameterXml.cpp @@ -0,0 +1,105 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "RequestInstanceParameterXml.h" + +using namespace Caf; + +void RequestInstanceParameterXml::add( + const SmartPtrCRequestInstanceParameterDoc requestInstanceParameterDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("RequestInstanceParameterXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(requestInstanceParameterDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameVal = requestInstanceParameterDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::string classNamespaceVal = requestInstanceParameterDoc->getClassNamespace(); + CAF_CM_VALIDATE_STRING(classNamespaceVal); + thisXml->addAttribute("classNamespace", classNamespaceVal); + + const std::string classNameVal = requestInstanceParameterDoc->getClassName(); + CAF_CM_VALIDATE_STRING(classNameVal); + thisXml->addAttribute("className", classNameVal); + + const std::string classVersionVal = requestInstanceParameterDoc->getClassVersion(); + CAF_CM_VALIDATE_STRING(classVersionVal); + thisXml->addAttribute("classVersion", classVersionVal); + + const std::deque valueVal = + requestInstanceParameterDoc->getValue(); + if (! valueVal.empty()) { + for (TConstIterator > valueIter(valueVal); + valueIter; valueIter++) { + thisXml->appendValue(*valueIter); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCRequestInstanceParameterDoc RequestInstanceParameterXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("RequestInstanceParameterXml", "parse"); + + SmartPtrCRequestInstanceParameterDoc requestInstanceParameterDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const std::string classNamespaceStrVal = + thisXml->findRequiredAttribute("classNamespace"); + const std::string classNamespaceVal = classNamespaceStrVal; + + const std::string classNameStrVal = + thisXml->findRequiredAttribute("className"); + const std::string classNameVal = classNameStrVal; + + const std::string classVersionStrVal = + thisXml->findRequiredAttribute("classVersion"); + const std::string classVersionVal = classVersionStrVal; + + const CXmlElement::SmartPtrCElementCollection valueChildrenXml = + thisXml->getAllChildren(); + + std::deque valueVal; + if (! valueChildrenXml.IsNull() && ! valueChildrenXml->empty()) { + for (TConstIterator valueXmlIter(*valueChildrenXml); + valueXmlIter; valueXmlIter++) { + const SmartPtrCXmlElement valueXml = valueXmlIter->second; + const std::string valueDoc = valueXml->saveToStringRaw(); + valueVal.push_back(valueDoc); + } + } + + requestInstanceParameterDoc.CreateInstance(); + requestInstanceParameterDoc->initialize( + nameVal, + classNamespaceVal, + classNameVal, + classVersionVal, + valueVal); + } + CAF_CM_EXIT; + + return requestInstanceParameterDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestInstanceParameterXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestInstanceParameterXml.h new file mode 100644 index 000000000..8c0fd35b3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestInstanceParameterXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef RequestInstanceParameterXml_h_ +#define RequestInstanceParameterXml_h_ + +namespace Caf { + + /// Streams the RequestInstanceParameter class to/from XML + namespace RequestInstanceParameterXml { + + /// Adds the RequestInstanceParameterDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCRequestInstanceParameterDoc requestInstanceParameterDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the RequestInstanceParameterDoc from the XML. + SmartPtrCRequestInstanceParameterDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestParameterXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestParameterXml.cpp new file mode 100644 index 000000000..e4bdb1103 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestParameterXml.cpp @@ -0,0 +1,95 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "RequestParameterXml.h" + +using namespace Caf; + +void RequestParameterXml::add( + const SmartPtrCRequestParameterDoc requestParameterDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("RequestParameterXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(requestParameterDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameVal = requestParameterDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::string typeVal = + EnumConvertersXml::convertParameterTypeToString(requestParameterDoc->getType()); + CAF_CM_VALIDATE_STRING(typeVal); + thisXml->addAttribute("type", typeVal); + + const std::deque valueVal = + requestParameterDoc->getValue(); + CAF_CM_VALIDATE_STL(valueVal); + + if (! valueVal.empty()) { + for (TConstIterator > valueIter(valueVal); + valueIter; valueIter++) { + const SmartPtrCXmlElement valueXml = + thisXml->createAndAddElement("value"); + valueXml->setCDataValue(*valueIter); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCRequestParameterDoc RequestParameterXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("RequestParameterXml", "parse"); + + SmartPtrCRequestParameterDoc requestParameterDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const std::string typeStrVal = + thisXml->findRequiredAttribute("type"); + PARAMETER_TYPE typeVal = PARAMETER_NONE; + if (! typeStrVal.empty()) { + typeVal = EnumConvertersXml::convertStringToParameterType(typeStrVal); + } + + const CXmlElement::SmartPtrCElementCollection valueChildrenXml = + thisXml->findRequiredChildren("value"); + + std::deque valueVal; + if (! valueChildrenXml.IsNull() && ! valueChildrenXml->empty()) { + for (TConstIterator valueXmlIter(*valueChildrenXml); + valueXmlIter; valueXmlIter++) { + const SmartPtrCXmlElement valueXml = valueXmlIter->second; + const std::string valueDoc = valueXml->getCDataValue(); + valueVal.push_back(valueDoc); + } + } + + requestParameterDoc.CreateInstance(); + requestParameterDoc->initialize( + nameVal, + typeVal, + valueVal); + } + CAF_CM_EXIT; + + return requestParameterDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestParameterXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestParameterXml.h new file mode 100644 index 000000000..281173849 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestParameterXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef RequestParameterXml_h_ +#define RequestParameterXml_h_ + +namespace Caf { + + /// Streams the RequestParameter class to/from XML + namespace RequestParameterXml { + + /// Adds the RequestParameterDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCRequestParameterDoc requestParameterDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the RequestParameterDoc from the XML. + SmartPtrCRequestParameterDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestXml.cpp new file mode 100644 index 000000000..8e9aa88f4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestXml.cpp @@ -0,0 +1,40 @@ +/* + * Author: bwilliams + * Created: Nov 21, 2014 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "RequestXml.h" + +using namespace Caf; + +SmartPtrCXmlElement RequestXml::parseString( + const std::string& xml, + const std::string& rootName) { + CAF_CM_STATIC_FUNC_VALIDATE("RequestXml", "parseString"); + CAF_CM_VALIDATE_STRING(xml); + // rootName is optional + + SmartPtrCXmlElement rootXml = CXmlUtils::parseString(xml, rootName); + + return rootXml; +} + +SmartPtrCXmlElement RequestXml::parseFile( + const std::string& xml, + const std::string& rootName) { + CAF_CM_STATIC_FUNC_VALIDATE("RequestXml", "parseFile"); + CAF_CM_VALIDATE_STRING(xml); + // rootName is optional + + SmartPtrCXmlElement rootXml = CXmlUtils::parseFile(xml, rootName); + + return rootXml; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestXml.h new file mode 100644 index 000000000..71af67f6b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestXml.h @@ -0,0 +1,27 @@ +/* + * Author: bwilliams + * Created: Nov 21, 2014 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + */ + +#ifndef RequestXml_h_ +#define RequestXml_h_ + +namespace Caf { + + namespace RequestXml { + + SmartPtrCXmlElement CAFCORETYPESXML_LINKAGE parseString( + const std::string& xml, + const std::string& rootName); + + SmartPtrCXmlElement CAFCORETYPESXML_LINKAGE parseFile( + const std::string& xml, + const std::string& rootName); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/StatisticsXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/StatisticsXml.cpp new file mode 100644 index 000000000..9458565bd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/StatisticsXml.cpp @@ -0,0 +1,147 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "StatisticsXml.h" + +using namespace Caf; + +void StatisticsXml::add( + const SmartPtrCStatisticsDoc statisticsDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("StatisticsXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(statisticsDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const SmartPtrCPropertyCollectionDoc propertyCollectionVal = + statisticsDoc->getPropertyCollection(); + CAF_CM_VALIDATE_SMARTPTR(propertyCollectionVal); + + const SmartPtrCXmlElement propertyCollectionXml = + thisXml->createAndAddElement("propertyCollection"); + PropertyCollectionXml::add(propertyCollectionVal, propertyCollectionXml); + + const std::string providerJobNumVal = + CStringConv::toString(statisticsDoc->getProviderJobNum()); + if (! providerJobNumVal.empty()) { + thisXml->addAttribute("providerJobNum", providerJobNumVal); + } + + const std::string providerJobTotalVal = + CStringConv::toString(statisticsDoc->getProviderJobTotal()); + if (! providerJobTotalVal.empty()) { + thisXml->addAttribute("providerJobTotal", providerJobTotalVal); + } + + const std::string providerJobDurationSecsVal = + CStringConv::toString(statisticsDoc->getProviderJobDurationSecs()); + if (! providerJobDurationSecsVal.empty()) { + thisXml->addAttribute("providerJobDurationSecs", providerJobDurationSecsVal); + } + + const std::string pmeNumVal = + CStringConv::toString(statisticsDoc->getPmeNum()); + if (! pmeNumVal.empty()) { + thisXml->addAttribute("pmeNum", pmeNumVal); + } + + const std::string pmeTotalVal = + CStringConv::toString(statisticsDoc->getPmeTotal()); + if (! pmeTotalVal.empty()) { + thisXml->addAttribute("pmeTotal", pmeTotalVal); + } + + const std::string pmeDurationSecsVal = + CStringConv::toString(statisticsDoc->getPmeDurationSecs()); + if (! pmeDurationSecsVal.empty()) { + thisXml->addAttribute("pmeDurationSecs", pmeDurationSecsVal); + } + } + CAF_CM_EXIT; +} + +SmartPtrCStatisticsDoc StatisticsXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("StatisticsXml", "parse"); + + SmartPtrCStatisticsDoc statisticsDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const SmartPtrCXmlElement propertyCollectionXml = + thisXml->findRequiredChild("propertyCollection"); + + SmartPtrCPropertyCollectionDoc propertyCollectionVal; + if (! propertyCollectionXml.IsNull()) { + propertyCollectionVal = PropertyCollectionXml::parse(propertyCollectionXml); + } + + const std::string providerJobNumStrVal = + thisXml->findOptionalAttribute("providerJobNum"); + int32 providerJobNumVal = 0; + if (! providerJobNumStrVal.empty()) { + providerJobNumVal = CStringConv::fromString(providerJobNumStrVal); + } + + const std::string providerJobTotalStrVal = + thisXml->findOptionalAttribute("providerJobTotal"); + int32 providerJobTotalVal = 0; + if (! providerJobTotalStrVal.empty()) { + providerJobTotalVal = CStringConv::fromString(providerJobTotalStrVal); + } + + const std::string providerJobDurationSecsStrVal = + thisXml->findOptionalAttribute("providerJobDurationSecs"); + int32 providerJobDurationSecsVal = 0; + if (! providerJobDurationSecsStrVal.empty()) { + providerJobDurationSecsVal = CStringConv::fromString(providerJobDurationSecsStrVal); + } + + const std::string pmeNumStrVal = + thisXml->findOptionalAttribute("pmeNum"); + int32 pmeNumVal = 0; + if (! pmeNumStrVal.empty()) { + pmeNumVal = CStringConv::fromString(pmeNumStrVal); + } + + const std::string pmeTotalStrVal = + thisXml->findOptionalAttribute("pmeTotal"); + int32 pmeTotalVal = 0; + if (! pmeTotalStrVal.empty()) { + pmeTotalVal = CStringConv::fromString(pmeTotalStrVal); + } + + const std::string pmeDurationSecsStrVal = + thisXml->findOptionalAttribute("pmeDurationSecs"); + int32 pmeDurationSecsVal = 0; + if (! pmeDurationSecsStrVal.empty()) { + pmeDurationSecsVal = CStringConv::fromString(pmeDurationSecsStrVal); + } + + statisticsDoc.CreateInstance(); + statisticsDoc->initialize( + propertyCollectionVal, + providerJobNumVal, + providerJobTotalVal, + providerJobDurationSecsVal, + pmeNumVal, + pmeTotalVal, + pmeDurationSecsVal); + } + CAF_CM_EXIT; + + return statisticsDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/StatisticsXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/StatisticsXml.h new file mode 100644 index 000000000..80da1be57 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/StatisticsXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef StatisticsXml_h_ +#define StatisticsXml_h_ + +namespace Caf { + + /// Streams the Statistics class to/from XML + namespace StatisticsXml { + + /// Adds the StatisticsDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCStatisticsDoc statisticsDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the StatisticsDoc from the XML. + SmartPtrCStatisticsDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/stdafx.h new file mode 100644 index 000000000..2302e6e27 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/stdafx.h @@ -0,0 +1,28 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define CAFCORETYPESXML_LINKAGE __declspec(dllexport) +#else + #define CAFCORETYPESXML_LINKAGE +#endif + +#include +#include +#include + +#include "CafCoreTypesXmlInc.h" + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/CafInstallRequestXmlInc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/CafInstallRequestXmlInc.h new file mode 100644 index 000000000..2dee07831 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/CafInstallRequestXmlInc.h @@ -0,0 +1,29 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CafInstallRequestXml_Inc_h_ +#define CafInstallRequestXml_Inc_h_ + +#include "../CafCoreTypesXml/CafCoreTypesXmlLink.h" +#include "MinPackageElemXml.h" +#include "PackageDefnXml.h" +#include "FullPackageElemXml.h" +#include "GetInventoryJobXml.h" +#include "InstallProviderJobXml.h" +#include "UninstallProviderJobXml.h" +#include "InstallBatchXml.h" +#include "InstallRequestXml.h" +#include "InstallProviderSpecXml.h" +#include "InstallPackageSpecXml.h" +#include "CafInstallRequestXmlRoots.h" + +#endif /* CafInstallRequestXml_Inc_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/CafInstallRequestXmlLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/CafInstallRequestXmlLink.h new file mode 100644 index 000000000..331296b87 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/CafInstallRequestXmlLink.h @@ -0,0 +1,30 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CafInstallRequestXml_Link_h_ +#define CafInstallRequestXml_Link_h_ + +#ifndef CAFINSTALLREQUESTXML_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define CAFINSTALLREQUESTXML_LINKAGE __declspec(dllexport) + #else + #define CAFINSTALLREQUESTXML_LINKAGE __declspec(dllimport) + #endif + #else + #define CAFINSTALLREQUESTXML_LINKAGE + #endif +#endif + +#include "CafInstallRequestXmlInc.h" + +#endif /* CafInstallRequestXml_Link_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/CafInstallRequestXmlRoots.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/CafInstallRequestXmlRoots.cpp new file mode 100644 index 000000000..bed45ac24 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/CafInstallRequestXmlRoots.cpp @@ -0,0 +1,240 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +using namespace Caf; + +std::string XmlRoots::saveInstallRequestToString( + const SmartPtrCInstallRequestDoc installRequestDoc) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "saveInstallRequestToString"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(installRequestDoc); + + const std::string schemaNamespace = DocXmlUtils::getSchemaNamespace("fx"); + const std::string schemaLocation = DocXmlUtils::getSchemaLocation("fx/CafInstallRequest.xsd"); + + const SmartPtrCXmlElement rootXml = CXmlUtils::createRootElement( + "installRequest", schemaNamespace, schemaLocation); + InstallRequestXml::add(installRequestDoc, rootXml); + + rc = rootXml->saveToString(); + } + CAF_CM_EXIT; + + return rc; +} + +SmartPtrCInstallRequestDoc XmlRoots::parseInstallRequestFromString( + const std::string xml) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseInstallRequestFromString"); + + SmartPtrCInstallRequestDoc installRequestDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(xml); + + const SmartPtrCXmlElement rootXml = RequestXml::parseString(xml, "caf:installRequest"); + installRequestDoc = InstallRequestXml::parse(rootXml); + } + CAF_CM_EXIT; + + return installRequestDoc; +} + +void XmlRoots::saveInstallRequestToFile( + const SmartPtrCInstallRequestDoc installRequestDoc, + const std::string filePath) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("XmlRoots", "saveInstallRequestToFile"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(installRequestDoc); + CAF_CM_VALIDATE_STRING(filePath); + + CAF_CM_LOG_DEBUG_VA1("Saving to file - %s", filePath.c_str()); + + const std::string installRequestStr = + saveInstallRequestToString(installRequestDoc); + FileSystemUtils::saveTextFile(filePath, installRequestStr); + } + CAF_CM_EXIT; +} + +SmartPtrCInstallRequestDoc XmlRoots::parseInstallRequestFromFile( + const std::string filePath) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseInstallRequestFromFile"); + + SmartPtrCInstallRequestDoc installRequestDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filePath); + + const SmartPtrCXmlElement rootXml = RequestXml::parseFile(filePath, "caf:installRequest"); + installRequestDoc = InstallRequestXml::parse(rootXml); + } + CAF_CM_EXIT; + + return installRequestDoc; +} + +std::string XmlRoots::saveInstallProviderSpecToString( + const SmartPtrCInstallProviderSpecDoc installProviderSpecDoc) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "saveInstallProviderSpecToString"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(installProviderSpecDoc); + + const std::string schemaNamespace = DocXmlUtils::getSchemaNamespace("fx"); + const std::string schemaLocation = DocXmlUtils::getSchemaLocation("fx/CafInstallRequest.xsd"); + + const SmartPtrCXmlElement rootXml = CXmlUtils::createRootElement( + "installProviderSpec", schemaNamespace, schemaLocation); + InstallProviderSpecXml::add(installProviderSpecDoc, rootXml); + + rc = rootXml->saveToString(); + } + CAF_CM_EXIT; + + return rc; +} + +SmartPtrCInstallProviderSpecDoc XmlRoots::parseInstallProviderSpecFromString( + const std::string xml) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseInstallProviderSpecFromString"); + + SmartPtrCInstallProviderSpecDoc installProviderSpecDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(xml); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseString(xml, "caf:installProviderSpec"); + installProviderSpecDoc = InstallProviderSpecXml::parse(rootXml); + } + CAF_CM_EXIT; + + return installProviderSpecDoc; +} + +void XmlRoots::saveInstallProviderSpecToFile( + const SmartPtrCInstallProviderSpecDoc installProviderSpecDoc, + const std::string filePath) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("XmlRoots", "saveInstallProviderSpecToFile"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(installProviderSpecDoc); + CAF_CM_VALIDATE_STRING(filePath); + + CAF_CM_LOG_DEBUG_VA1("Saving to file - %s", filePath.c_str()); + + const std::string installProviderSpecStr = + saveInstallProviderSpecToString(installProviderSpecDoc); + FileSystemUtils::saveTextFile(filePath, installProviderSpecStr); + } + CAF_CM_EXIT; +} + +SmartPtrCInstallProviderSpecDoc XmlRoots::parseInstallProviderSpecFromFile( + const std::string filePath) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseInstallProviderSpecFromFile"); + + SmartPtrCInstallProviderSpecDoc installProviderSpecDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filePath); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseFile(filePath, "caf:installProviderSpec"); + installProviderSpecDoc = InstallProviderSpecXml::parse(rootXml); + } + CAF_CM_EXIT; + + return installProviderSpecDoc; +} + +std::string XmlRoots::saveInstallPackageSpecToString( + const SmartPtrCInstallPackageSpecDoc installPackageSpecDoc) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "saveInstallPackageSpecToString"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(installPackageSpecDoc); + + const std::string schemaNamespace = DocXmlUtils::getSchemaNamespace("fx"); + const std::string schemaLocation = DocXmlUtils::getSchemaLocation("fx/CafInstallRequest.xsd"); + + const SmartPtrCXmlElement rootXml = CXmlUtils::createRootElement( + "installPackageSpec", schemaNamespace, schemaLocation); + InstallPackageSpecXml::add(installPackageSpecDoc, rootXml); + + rc = rootXml->saveToString(); + } + CAF_CM_EXIT; + + return rc; +} + +SmartPtrCInstallPackageSpecDoc XmlRoots::parseInstallPackageSpecFromString( + const std::string xml) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseInstallPackageSpecFromString"); + + SmartPtrCInstallPackageSpecDoc installPackageSpecDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(xml); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseString(xml, "caf:installPackageSpec"); + installPackageSpecDoc = InstallPackageSpecXml::parse(rootXml); + } + CAF_CM_EXIT; + + return installPackageSpecDoc; +} + +void XmlRoots::saveInstallPackageSpecToFile( + const SmartPtrCInstallPackageSpecDoc installPackageSpecDoc, + const std::string filePath) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("XmlRoots", "saveInstallPackageSpecToFile"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(installPackageSpecDoc); + CAF_CM_VALIDATE_STRING(filePath); + + CAF_CM_LOG_DEBUG_VA1("Saving to file - %s", filePath.c_str()); + + const std::string installPackageSpecStr = + saveInstallPackageSpecToString(installPackageSpecDoc); + FileSystemUtils::saveTextFile(filePath, installPackageSpecStr); + } + CAF_CM_EXIT; +} + +SmartPtrCInstallPackageSpecDoc XmlRoots::parseInstallPackageSpecFromFile( + const std::string filePath) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseInstallPackageSpecFromFile"); + + SmartPtrCInstallPackageSpecDoc installPackageSpecDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filePath); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseFile(filePath, "caf:installPackageSpec"); + installPackageSpecDoc = InstallPackageSpecXml::parse(rootXml); + } + CAF_CM_EXIT; + + return installPackageSpecDoc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/CafInstallRequestXmlRoots.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/CafInstallRequestXmlRoots.h new file mode 100644 index 000000000..456bef686 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/CafInstallRequestXmlRoots.h @@ -0,0 +1,73 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CafInstallRequestXmlRoots_h_ +#define CafInstallRequestXmlRoots_h_ + +namespace Caf { + + namespace XmlRoots { + + /// Saves the InstallRequestDoc to a string. + std::string CAFINSTALLREQUESTXML_LINKAGE saveInstallRequestToString( + const SmartPtrCInstallRequestDoc installRequestDoc); + + /// Parses the InstallPackageSpecDoc from the string. + SmartPtrCInstallRequestDoc CAFINSTALLREQUESTXML_LINKAGE parseInstallRequestFromString( + const std::string xml); + + /// Saves the InstallRequestDoc to a file. + void CAFINSTALLREQUESTXML_LINKAGE saveInstallRequestToFile( + const SmartPtrCInstallRequestDoc installRequestDoc, + const std::string filePath); + + /// Parses the InstallPackageSpecDoc from the file. + SmartPtrCInstallRequestDoc CAFINSTALLREQUESTXML_LINKAGE parseInstallRequestFromFile( + const std::string filePath); + + /// Saves the InstallProviderSpecDoc to a string. + std::string CAFINSTALLREQUESTXML_LINKAGE saveInstallProviderSpecToString( + const SmartPtrCInstallProviderSpecDoc installProviderSpecDoc); + + /// Parses the InstallPackageSpecDoc from the string. + SmartPtrCInstallProviderSpecDoc CAFINSTALLREQUESTXML_LINKAGE parseInstallProviderSpecFromString( + const std::string xml); + + /// Saves the InstallProviderSpecDoc to a file. + void CAFINSTALLREQUESTXML_LINKAGE saveInstallProviderSpecToFile( + const SmartPtrCInstallProviderSpecDoc installProviderSpecDoc, + const std::string filePath); + + /// Parses the InstallPackageSpecDoc from the file. + SmartPtrCInstallProviderSpecDoc CAFINSTALLREQUESTXML_LINKAGE parseInstallProviderSpecFromFile( + const std::string filePath); + + /// Saves the InstallPackageSpecDoc to a string. + std::string CAFINSTALLREQUESTXML_LINKAGE saveInstallPackageSpecToString( + const SmartPtrCInstallPackageSpecDoc installPackageSpecDoc); + + /// Parses the InstallPackageSpecDoc from the string. + SmartPtrCInstallPackageSpecDoc CAFINSTALLREQUESTXML_LINKAGE parseInstallPackageSpecFromString( + const std::string xml); + + /// Saves the InstallPackageSpecDoc to a file. + void CAFINSTALLREQUESTXML_LINKAGE saveInstallPackageSpecToFile( + const SmartPtrCInstallPackageSpecDoc installPackageSpecDoc, + const std::string filePath); + + /// Parses the InstallPackageSpecDoc from the file. + SmartPtrCInstallPackageSpecDoc CAFINSTALLREQUESTXML_LINKAGE parseInstallPackageSpecFromFile( + const std::string filePath); + } +} + +#endif /* CafInstallRequestXmlRoots_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/FullPackageElemXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/FullPackageElemXml.cpp new file mode 100644 index 000000000..b315bb820 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/FullPackageElemXml.cpp @@ -0,0 +1,120 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "FullPackageElemXml.h" + +using namespace Caf; + +void FullPackageElemXml::add( + const SmartPtrCFullPackageElemDoc fullPackageElemDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("FullPackageElemXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(fullPackageElemDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string indexVal = + CStringConv::toString(fullPackageElemDoc->getIndex()); + CAF_CM_VALIDATE_STRING(indexVal); + thisXml->addAttribute("index", indexVal); + + const std::string packageNamespaceVal = fullPackageElemDoc->getPackageNamespace(); + CAF_CM_VALIDATE_STRING(packageNamespaceVal); + thisXml->addAttribute("packageNamespace", packageNamespaceVal); + + const std::string packageNameVal = fullPackageElemDoc->getPackageName(); + CAF_CM_VALIDATE_STRING(packageNameVal); + thisXml->addAttribute("packageName", packageNameVal); + + const std::string packageVersionVal = fullPackageElemDoc->getPackageVersion(); + CAF_CM_VALIDATE_STRING(packageVersionVal); + thisXml->addAttribute("packageVersion", packageVersionVal); + + const SmartPtrCPackageDefnDoc installPackageVal = + fullPackageElemDoc->getInstallPackage(); + CAF_CM_VALIDATE_SMARTPTR(installPackageVal); + + const SmartPtrCXmlElement installPackageXml = + thisXml->createAndAddElement("installPackage"); + PackageDefnXml::add(installPackageVal, installPackageXml); + + const SmartPtrCPackageDefnDoc uninstallPackageVal = + fullPackageElemDoc->getUninstallPackage(); + CAF_CM_VALIDATE_SMARTPTR(uninstallPackageVal); + + const SmartPtrCXmlElement uninstallPackageXml = + thisXml->createAndAddElement("uninstallPackage"); + PackageDefnXml::add(uninstallPackageVal, uninstallPackageXml); + } + CAF_CM_EXIT; +} + +SmartPtrCFullPackageElemDoc FullPackageElemXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("FullPackageElemXml", "parse"); + + SmartPtrCFullPackageElemDoc fullPackageElemDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string indexStrVal = + thisXml->findRequiredAttribute("index"); + int32 indexVal = 0; + if (! indexStrVal.empty()) { + indexVal = CStringConv::fromString(indexStrVal); + } + + const std::string packageNamespaceStrVal = + thisXml->findRequiredAttribute("packageNamespace"); + const std::string packageNamespaceVal = packageNamespaceStrVal; + + const std::string packageNameStrVal = + thisXml->findRequiredAttribute("packageName"); + const std::string packageNameVal = packageNameStrVal; + + const std::string packageVersionStrVal = + thisXml->findRequiredAttribute("packageVersion"); + const std::string packageVersionVal = packageVersionStrVal; + + const SmartPtrCXmlElement installPackageXml = + thisXml->findRequiredChild("installPackage"); + + SmartPtrCPackageDefnDoc installPackageVal; + if (! installPackageXml.IsNull()) { + installPackageVal = PackageDefnXml::parse(installPackageXml); + } + + const SmartPtrCXmlElement uninstallPackageXml = + thisXml->findRequiredChild("uninstallPackage"); + + SmartPtrCPackageDefnDoc uninstallPackageVal; + if (! uninstallPackageXml.IsNull()) { + uninstallPackageVal = PackageDefnXml::parse(uninstallPackageXml); + } + + fullPackageElemDoc.CreateInstance(); + fullPackageElemDoc->initialize( + indexVal, + packageNamespaceVal, + packageNameVal, + packageVersionVal, + installPackageVal, + uninstallPackageVal); + } + CAF_CM_EXIT; + + return fullPackageElemDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/FullPackageElemXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/FullPackageElemXml.h new file mode 100644 index 000000000..181ce0d70 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/FullPackageElemXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef FullPackageElemXml_h_ +#define FullPackageElemXml_h_ + +namespace Caf { + + /// Streams the FullPackageElem class to/from XML + namespace FullPackageElemXml { + + /// Adds the FullPackageElemDoc into the XML. + void CAFINSTALLREQUESTXML_LINKAGE add( + const SmartPtrCFullPackageElemDoc fullPackageElemDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the FullPackageElemDoc from the XML. + SmartPtrCFullPackageElemDoc CAFINSTALLREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/GetInventoryJobXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/GetInventoryJobXml.cpp new file mode 100644 index 000000000..b7fff8cb2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/GetInventoryJobXml.cpp @@ -0,0 +1,59 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "GetInventoryJobXml.h" + +using namespace Caf; + +void GetInventoryJobXml::add( + const SmartPtrCGetInventoryJobDoc getInventoryJobDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("GetInventoryJobXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(getInventoryJobDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string jobIdVal = + BasePlatform::UuidToString(getInventoryJobDoc->getJobId()); + CAF_CM_VALIDATE_STRING(jobIdVal); + thisXml->addAttribute("jobId", jobIdVal); + } + CAF_CM_EXIT; +} + +SmartPtrCGetInventoryJobDoc GetInventoryJobXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("GetInventoryJobXml", "parse"); + + SmartPtrCGetInventoryJobDoc getInventoryJobDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string jobIdStrVal = + thisXml->findRequiredAttribute("jobId"); + UUID jobIdVal = CAFCOMMON_GUID_NULL; + if (! jobIdStrVal.empty()) { + BasePlatform::UuidFromString(jobIdStrVal.c_str(), jobIdVal); + } + + getInventoryJobDoc.CreateInstance(); + getInventoryJobDoc->initialize( + jobIdVal); + } + CAF_CM_EXIT; + + return getInventoryJobDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/GetInventoryJobXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/GetInventoryJobXml.h new file mode 100644 index 000000000..a2d446ee4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/GetInventoryJobXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef GetInventoryJobXml_h_ +#define GetInventoryJobXml_h_ + +namespace Caf { + + /// Streams the GetInventoryJob class to/from XML + namespace GetInventoryJobXml { + + /// Adds the GetInventoryJobDoc into the XML. + void CAFINSTALLREQUESTXML_LINKAGE add( + const SmartPtrCGetInventoryJobDoc getInventoryJobDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the GetInventoryJobDoc from the XML. + SmartPtrCGetInventoryJobDoc CAFINSTALLREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallBatchXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallBatchXml.cpp new file mode 100644 index 000000000..cefb38676 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallBatchXml.cpp @@ -0,0 +1,97 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "InstallBatchXml.h" + +using namespace Caf; + +void InstallBatchXml::add( + const SmartPtrCInstallBatchDoc installBatchDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("InstallBatchXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(installBatchDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const SmartPtrCGetInventoryJobDoc getInventoryVal = + installBatchDoc->getGetInventory(); + if (! getInventoryVal.IsNull()) { + const SmartPtrCXmlElement getInventoryXml = + thisXml->createAndAddElement("getInventory"); + GetInventoryJobXml::add(getInventoryVal, getInventoryXml); + } + + const SmartPtrCInstallProviderJobDoc installProviderVal = + installBatchDoc->getInstallProvider(); + if (! installProviderVal.IsNull()) { + const SmartPtrCXmlElement installProviderXml = + thisXml->createAndAddElement("installProvider"); + InstallProviderJobXml::add(installProviderVal, installProviderXml); + } + + const SmartPtrCUninstallProviderJobDoc uninstallProviderVal = + installBatchDoc->getUninstallProvider(); + if (! uninstallProviderVal.IsNull()) { + const SmartPtrCXmlElement uninstallProviderXml = + thisXml->createAndAddElement("uninstallProvider"); + UninstallProviderJobXml::add(uninstallProviderVal, uninstallProviderXml); + } + } + CAF_CM_EXIT; +} + +SmartPtrCInstallBatchDoc InstallBatchXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("InstallBatchXml", "parse"); + + SmartPtrCInstallBatchDoc installBatchDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const SmartPtrCXmlElement getInventoryXml = + thisXml->findOptionalChild("getInventory"); + + SmartPtrCGetInventoryJobDoc getInventoryVal; + if (! getInventoryXml.IsNull()) { + getInventoryVal = GetInventoryJobXml::parse(getInventoryXml); + } + + const SmartPtrCXmlElement installProviderXml = + thisXml->findOptionalChild("installProvider"); + + SmartPtrCInstallProviderJobDoc installProviderVal; + if (! installProviderXml.IsNull()) { + installProviderVal = InstallProviderJobXml::parse(installProviderXml); + } + + const SmartPtrCXmlElement uninstallProviderXml = + thisXml->findOptionalChild("uninstallProvider"); + + SmartPtrCUninstallProviderJobDoc uninstallProviderVal; + if (! uninstallProviderXml.IsNull()) { + uninstallProviderVal = UninstallProviderJobXml::parse(uninstallProviderXml); + } + + installBatchDoc.CreateInstance(); + installBatchDoc->initialize( + getInventoryVal, + installProviderVal, + uninstallProviderVal); + } + CAF_CM_EXIT; + + return installBatchDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallBatchXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallBatchXml.h new file mode 100644 index 000000000..c49987857 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallBatchXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef InstallBatchXml_h_ +#define InstallBatchXml_h_ + +namespace Caf { + + /// Streams the InstallBatch class to/from XML + namespace InstallBatchXml { + + /// Adds the InstallBatchDoc into the XML. + void CAFINSTALLREQUESTXML_LINKAGE add( + const SmartPtrCInstallBatchDoc installBatchDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the InstallBatchDoc from the XML. + SmartPtrCInstallBatchDoc CAFINSTALLREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallPackageSpecXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallPackageSpecXml.cpp new file mode 100644 index 000000000..76c168d5b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallPackageSpecXml.cpp @@ -0,0 +1,137 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "InstallPackageSpecXml.h" + +using namespace Caf; + +void InstallPackageSpecXml::add( + const SmartPtrCInstallPackageSpecDoc installPackageSpecDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("InstallPackageSpecXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(installPackageSpecDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string packageNamespaceVal = installPackageSpecDoc->getPackageNamespace(); + CAF_CM_VALIDATE_STRING(packageNamespaceVal); + thisXml->addAttribute("packageNamespace", packageNamespaceVal); + + const std::string packageNameVal = installPackageSpecDoc->getPackageName(); + CAF_CM_VALIDATE_STRING(packageNameVal); + thisXml->addAttribute("packageName", packageNameVal); + + const std::string packageVersionVal = installPackageSpecDoc->getPackageVersion(); + CAF_CM_VALIDATE_STRING(packageVersionVal); + thisXml->addAttribute("packageVersion", packageVersionVal); + + const std::string startupAttachmentNameVal = installPackageSpecDoc->getStartupAttachmentName(); + CAF_CM_VALIDATE_STRING(startupAttachmentNameVal); + thisXml->addAttribute("startupAttachmentName", startupAttachmentNameVal); + + const std::string packageAttachmentNameVal = installPackageSpecDoc->getPackageAttachmentName(); + CAF_CM_VALIDATE_STRING(packageAttachmentNameVal); + thisXml->addAttribute("packageAttachmentName", packageAttachmentNameVal); + + const SmartPtrCAttachmentNameCollectionDoc supportingAttachmentNameCollectionVal = + installPackageSpecDoc->getSupportingAttachmentNameCollection(); + if (! supportingAttachmentNameCollectionVal.IsNull()) { + const SmartPtrCXmlElement supportingAttachmentNameCollectionXml = + thisXml->createAndAddElement("attachmentNameCollection"); + AttachmentNameCollectionXml::add(supportingAttachmentNameCollectionVal, supportingAttachmentNameCollectionXml); + } + + const SmartPtrCAttachmentCollectionDoc attachmentCollectionVal = + installPackageSpecDoc->getAttachmentCollection(); + CAF_CM_VALIDATE_SMARTPTR(attachmentCollectionVal); + + const SmartPtrCXmlElement attachmentCollectionXml = + thisXml->createAndAddElement("attachmentCollection"); + AttachmentCollectionXml::add(attachmentCollectionVal, attachmentCollectionXml); + + const std::string argumentsVal = installPackageSpecDoc->getArguments(); + if (! argumentsVal.empty()) { + thisXml->addAttribute("arguments", argumentsVal); + } + + thisXml->addAttribute("version", "1.0"); + } + CAF_CM_EXIT; +} + +SmartPtrCInstallPackageSpecDoc InstallPackageSpecXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("InstallPackageSpecXml", "parse"); + + SmartPtrCInstallPackageSpecDoc installPackageSpecDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string packageNamespaceStrVal = + thisXml->findRequiredAttribute("packageNamespace"); + const std::string packageNamespaceVal = packageNamespaceStrVal; + + const std::string packageNameStrVal = + thisXml->findRequiredAttribute("packageName"); + const std::string packageNameVal = packageNameStrVal; + + const std::string packageVersionStrVal = + thisXml->findRequiredAttribute("packageVersion"); + const std::string packageVersionVal = packageVersionStrVal; + + const std::string startupAttachmentNameStrVal = + thisXml->findRequiredAttribute("startupAttachmentName"); + const std::string startupAttachmentNameVal = startupAttachmentNameStrVal; + + const std::string packageAttachmentNameStrVal = + thisXml->findRequiredAttribute("packageAttachmentName"); + const std::string packageAttachmentNameVal = packageAttachmentNameStrVal; + + const SmartPtrCXmlElement supportingAttachmentNameCollectionXml = + thisXml->findOptionalChild("attachmentNameCollection"); + + SmartPtrCAttachmentNameCollectionDoc supportingAttachmentNameCollectionVal; + if (! supportingAttachmentNameCollectionXml.IsNull()) { + supportingAttachmentNameCollectionVal = AttachmentNameCollectionXml::parse(supportingAttachmentNameCollectionXml); + } + + const SmartPtrCXmlElement attachmentCollectionXml = + thisXml->findRequiredChild("attachmentCollection"); + + SmartPtrCAttachmentCollectionDoc attachmentCollectionVal; + if (! attachmentCollectionXml.IsNull()) { + attachmentCollectionVal = AttachmentCollectionXml::parse(attachmentCollectionXml); + } + + const std::string argumentsStrVal = + thisXml->findOptionalAttribute("arguments"); + const std::string argumentsVal = argumentsStrVal; + + installPackageSpecDoc.CreateInstance(); + installPackageSpecDoc->initialize( + packageNamespaceVal, + packageNameVal, + packageVersionVal, + startupAttachmentNameVal, + packageAttachmentNameVal, + supportingAttachmentNameCollectionVal, + attachmentCollectionVal, + argumentsVal); + } + CAF_CM_EXIT; + + return installPackageSpecDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallPackageSpecXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallPackageSpecXml.h new file mode 100644 index 000000000..33259ee7e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallPackageSpecXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef InstallPackageSpecXml_h_ +#define InstallPackageSpecXml_h_ + +namespace Caf { + + /// Streams the InstallPackageSpec class to/from XML + namespace InstallPackageSpecXml { + + /// Adds the InstallPackageSpecDoc into the XML. + void CAFINSTALLREQUESTXML_LINKAGE add( + const SmartPtrCInstallPackageSpecDoc installPackageSpecDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the InstallPackageSpecDoc from the XML. + SmartPtrCInstallPackageSpecDoc CAFINSTALLREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallProviderJobXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallProviderJobXml.cpp new file mode 100644 index 000000000..3eda372de --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallProviderJobXml.cpp @@ -0,0 +1,140 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "InstallProviderJobXml.h" + +using namespace Caf; + +void InstallProviderJobXml::add( + const SmartPtrCInstallProviderJobDoc installProviderJobDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("InstallProviderJobXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(installProviderJobDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdVal = + BasePlatform::UuidToString(installProviderJobDoc->getClientId()); + CAF_CM_VALIDATE_STRING(clientIdVal); + thisXml->addAttribute("clientId", clientIdVal); + + const std::string jobIdVal = + BasePlatform::UuidToString(installProviderJobDoc->getJobId()); + CAF_CM_VALIDATE_STRING(jobIdVal); + thisXml->addAttribute("jobId", jobIdVal); + + const std::string providerNamespaceVal = installProviderJobDoc->getProviderNamespace(); + CAF_CM_VALIDATE_STRING(providerNamespaceVal); + thisXml->addAttribute("providerNamespace", providerNamespaceVal); + + const std::string providerNameVal = installProviderJobDoc->getProviderName(); + CAF_CM_VALIDATE_STRING(providerNameVal); + thisXml->addAttribute("providerName", providerNameVal); + + const std::string providerVersionVal = installProviderJobDoc->getProviderVersion(); + CAF_CM_VALIDATE_STRING(providerVersionVal); + thisXml->addAttribute("providerVersion", providerVersionVal); + + const std::string packageOSTypeVal = + EnumConvertersXml::convertPackageOSTypeToString(installProviderJobDoc->getPackageOSType()); + CAF_CM_VALIDATE_STRING(packageOSTypeVal); + thisXml->addAttribute("packageOSType", packageOSTypeVal); + + const std::deque packageValVal = + installProviderJobDoc->getPackageCollection(); + CAF_CM_VALIDATE_STL(packageValVal); + + if (! packageValVal.empty()) { + const SmartPtrCXmlElement packageCollectionXml = + thisXml->createAndAddElement("packageCollection"); + for (TConstIterator > packageValIter(packageValVal); + packageValIter; packageValIter++) { + const SmartPtrCXmlElement packageValXml = + packageCollectionXml->createAndAddElement("package"); + FullPackageElemXml::add(*packageValIter, packageValXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCInstallProviderJobDoc InstallProviderJobXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("InstallProviderJobXml", "parse"); + + SmartPtrCInstallProviderJobDoc installProviderJobDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdStrVal = + thisXml->findRequiredAttribute("clientId"); + UUID clientIdVal = CAFCOMMON_GUID_NULL; + BasePlatform::UuidFromString(clientIdStrVal.c_str(), clientIdVal); + + const std::string jobIdStrVal = + thisXml->findRequiredAttribute("jobId"); + UUID jobIdVal = CAFCOMMON_GUID_NULL; + BasePlatform::UuidFromString(jobIdStrVal.c_str(), jobIdVal); + + const std::string providerNamespaceStrVal = + thisXml->findRequiredAttribute("providerNamespace"); + const std::string providerNamespaceVal = providerNamespaceStrVal; + + const std::string providerNameStrVal = + thisXml->findRequiredAttribute("providerName"); + const std::string providerNameVal = providerNameStrVal; + + const std::string providerVersionStrVal = + thisXml->findRequiredAttribute("providerVersion"); + const std::string providerVersionVal = providerVersionStrVal; + + const std::string packageOSTypeStrVal = + thisXml->findRequiredAttribute("packageOSType"); + PACKAGE_OS_TYPE packageOSTypeVal = PACKAGE_OS_NONE; + if (! packageOSTypeStrVal.empty()) { + packageOSTypeVal = EnumConvertersXml::convertStringToPackageOSType(packageOSTypeStrVal); + } + + const SmartPtrCXmlElement packageCollectionXml = + thisXml->findRequiredChild("packageCollection"); + const CXmlElement::SmartPtrCElementCollection packageValChildrenXml = + packageCollectionXml->findRequiredChildren("package"); + + std::deque packageValVal; + if (! packageValChildrenXml.IsNull() && ! packageValChildrenXml->empty()) { + for (TConstIterator packageValXmlIter(*packageValChildrenXml); + packageValXmlIter; packageValXmlIter++) { + const SmartPtrCXmlElement packageValXml = packageValXmlIter->second; + const SmartPtrCFullPackageElemDoc packageValDoc = + FullPackageElemXml::parse(packageValXml); + packageValVal.push_back(packageValDoc); + } + } + + installProviderJobDoc.CreateInstance(); + installProviderJobDoc->initialize( + clientIdVal, + jobIdVal, + providerNamespaceVal, + providerNameVal, + providerVersionVal, + packageOSTypeVal, + packageValVal); + } + CAF_CM_EXIT; + + return installProviderJobDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallProviderJobXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallProviderJobXml.h new file mode 100644 index 000000000..f1215fcec --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallProviderJobXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef InstallProviderJobXml_h_ +#define InstallProviderJobXml_h_ + +namespace Caf { + + /// Streams the InstallProviderJob class to/from XML + namespace InstallProviderJobXml { + + /// Adds the InstallProviderJobDoc into the XML. + void CAFINSTALLREQUESTXML_LINKAGE add( + const SmartPtrCInstallProviderJobDoc installProviderJobDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the InstallProviderJobDoc from the XML. + SmartPtrCInstallProviderJobDoc CAFINSTALLREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallProviderSpecXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallProviderSpecXml.cpp new file mode 100644 index 000000000..48d392907 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallProviderSpecXml.cpp @@ -0,0 +1,116 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "InstallProviderSpecXml.h" + +using namespace Caf; + +void InstallProviderSpecXml::add( + const SmartPtrCInstallProviderSpecDoc installProviderSpecDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("InstallProviderSpecXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(installProviderSpecDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdVal = + BasePlatform::UuidToString(installProviderSpecDoc->getClientId()); + CAF_CM_VALIDATE_STRING(clientIdVal); + thisXml->addAttribute("clientId", clientIdVal); + + const std::string providerNamespaceVal = installProviderSpecDoc->getProviderNamespace(); + CAF_CM_VALIDATE_STRING(providerNamespaceVal); + thisXml->addAttribute("providerNamespace", providerNamespaceVal); + + const std::string providerNameVal = installProviderSpecDoc->getProviderName(); + CAF_CM_VALIDATE_STRING(providerNameVal); + thisXml->addAttribute("providerName", providerNameVal); + + const std::string providerVersionVal = installProviderSpecDoc->getProviderVersion(); + CAF_CM_VALIDATE_STRING(providerVersionVal); + thisXml->addAttribute("providerVersion", providerVersionVal); + + const std::deque packageValVal = + installProviderSpecDoc->getPackageCollection(); + CAF_CM_VALIDATE_STL(packageValVal); + + if (! packageValVal.empty()) { + for (TConstIterator > packageValIter(packageValVal); + packageValIter; packageValIter++) { + const SmartPtrCXmlElement packageValXml = + thisXml->createAndAddElement("package"); + MinPackageElemXml::add(*packageValIter, packageValXml); + } + } + + thisXml->addAttribute("version", "1.0"); + } + CAF_CM_EXIT; +} + +SmartPtrCInstallProviderSpecDoc InstallProviderSpecXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("InstallProviderSpecXml", "parse"); + + SmartPtrCInstallProviderSpecDoc installProviderSpecDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdStrVal = + thisXml->findRequiredAttribute("clientId"); + UUID clientIdVal = CAFCOMMON_GUID_NULL; + if (! clientIdStrVal.empty()) { + BasePlatform::UuidFromString(clientIdStrVal.c_str(), clientIdVal); + } + + const std::string providerNamespaceStrVal = + thisXml->findRequiredAttribute("providerNamespace"); + const std::string providerNamespaceVal = providerNamespaceStrVal; + + const std::string providerNameStrVal = + thisXml->findRequiredAttribute("providerName"); + const std::string providerNameVal = providerNameStrVal; + + const std::string providerVersionStrVal = + thisXml->findRequiredAttribute("providerVersion"); + const std::string providerVersionVal = providerVersionStrVal; + + const CXmlElement::SmartPtrCElementCollection packageValChildrenXml = + thisXml->findRequiredChildren("package"); + + std::deque packageValVal; + if (! packageValChildrenXml.IsNull() && ! packageValChildrenXml->empty()) { + for (TConstIterator packageValXmlIter(*packageValChildrenXml); + packageValXmlIter; packageValXmlIter++) { + const SmartPtrCXmlElement packageValXml = packageValXmlIter->second; + const SmartPtrCMinPackageElemDoc packageValDoc = + MinPackageElemXml::parse(packageValXml); + packageValVal.push_back(packageValDoc); + } + } + + installProviderSpecDoc.CreateInstance(); + installProviderSpecDoc->initialize( + clientIdVal, + providerNamespaceVal, + providerNameVal, + providerVersionVal, + packageValVal); + } + CAF_CM_EXIT; + + return installProviderSpecDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallProviderSpecXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallProviderSpecXml.h new file mode 100644 index 000000000..bf91d3a63 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallProviderSpecXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef InstallProviderSpecXml_h_ +#define InstallProviderSpecXml_h_ + +namespace Caf { + + /// Streams the InstallProviderSpec class to/from XML + namespace InstallProviderSpecXml { + + /// Adds the InstallProviderSpecDoc into the XML. + void CAFINSTALLREQUESTXML_LINKAGE add( + const SmartPtrCInstallProviderSpecDoc installProviderSpecDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the InstallProviderSpecDoc from the XML. + SmartPtrCInstallProviderSpecDoc CAFINSTALLREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallRequestXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallRequestXml.cpp new file mode 100644 index 000000000..83d6f2d57 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallRequestXml.cpp @@ -0,0 +1,131 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "InstallRequestXml.h" + +using namespace Caf; + +void InstallRequestXml::add( + const SmartPtrCInstallRequestDoc installRequestDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("InstallRequestXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(installRequestDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdVal = + BasePlatform::UuidToString(installRequestDoc->getClientId()); + CAF_CM_VALIDATE_STRING(clientIdVal); + thisXml->addAttribute("clientId", clientIdVal); + + const std::string requestIdVal = + BasePlatform::UuidToString(installRequestDoc->getRequestId()); + CAF_CM_VALIDATE_STRING(requestIdVal); + thisXml->addAttribute("requestId", requestIdVal); + + const std::string pmeIdVal = installRequestDoc->getPmeId(); + CAF_CM_VALIDATE_STRING(pmeIdVal); + thisXml->addAttribute("pmeId", pmeIdVal); + + const SmartPtrCRequestHeaderDoc requestHeaderVal = + installRequestDoc->getRequestHeader(); + CAF_CM_VALIDATE_SMARTPTR(requestHeaderVal); + + const SmartPtrCXmlElement requestHeaderXml = + thisXml->createAndAddElement("requestHeader"); + RequestHeaderXml::add(requestHeaderVal, requestHeaderXml); + + const SmartPtrCInstallBatchDoc batchVal = + installRequestDoc->getBatch(); + CAF_CM_VALIDATE_SMARTPTR(batchVal); + + const SmartPtrCXmlElement batchXml = + thisXml->createAndAddElement("batch"); + InstallBatchXml::add(batchVal, batchXml); + + const SmartPtrCAttachmentCollectionDoc attachmentCollectionVal = + installRequestDoc->getAttachmentCollection(); + if (! attachmentCollectionVal.IsNull()) { + const SmartPtrCXmlElement attachmentCollectionXml = + thisXml->createAndAddElement("attachmentCollection"); + AttachmentCollectionXml::add(attachmentCollectionVal, attachmentCollectionXml); + } + } + CAF_CM_EXIT; +} + +SmartPtrCInstallRequestDoc InstallRequestXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("InstallRequestXml", "parse"); + + SmartPtrCInstallRequestDoc installRequestDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdStrVal = + thisXml->findRequiredAttribute("clientId"); + UUID clientIdVal = CAFCOMMON_GUID_NULL; + if (! clientIdStrVal.empty()) { + BasePlatform::UuidFromString(clientIdStrVal.c_str(), clientIdVal); + } + + const std::string requestIdStrVal = + thisXml->findRequiredAttribute("requestId"); + UUID requestIdVal = CAFCOMMON_GUID_NULL; + if (! requestIdStrVal.empty()) { + BasePlatform::UuidFromString(requestIdStrVal.c_str(), requestIdVal); + } + + const std::string pmeIdVal = + thisXml->findRequiredAttribute("pmeId"); + + const SmartPtrCXmlElement requestHeaderXml = + thisXml->findRequiredChild("requestHeader"); + + SmartPtrCRequestHeaderDoc requestHeaderVal; + if (! requestHeaderXml.IsNull()) { + requestHeaderVal = RequestHeaderXml::parse(requestHeaderXml); + } + + const SmartPtrCXmlElement batchXml = + thisXml->findRequiredChild("batch"); + + SmartPtrCInstallBatchDoc batchVal; + if (! batchXml.IsNull()) { + batchVal = InstallBatchXml::parse(batchXml); + } + + const SmartPtrCXmlElement attachmentCollectionXml = + thisXml->findOptionalChild("attachmentCollection"); + + SmartPtrCAttachmentCollectionDoc attachmentCollectionVal; + if (! attachmentCollectionXml.IsNull()) { + attachmentCollectionVal = AttachmentCollectionXml::parse(attachmentCollectionXml); + } + + installRequestDoc.CreateInstance(); + installRequestDoc->initialize( + clientIdVal, + requestIdVal, + pmeIdVal, + requestHeaderVal, + batchVal, + attachmentCollectionVal); + } + CAF_CM_EXIT; + + return installRequestDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallRequestXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallRequestXml.h new file mode 100644 index 000000000..585c4c52f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallRequestXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef InstallRequestXml_h_ +#define InstallRequestXml_h_ + +namespace Caf { + + /// Streams the InstallRequest class to/from XML + namespace InstallRequestXml { + + /// Adds the InstallRequestDoc into the XML. + void CAFINSTALLREQUESTXML_LINKAGE add( + const SmartPtrCInstallRequestDoc installRequestDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the InstallRequestDoc from the XML. + SmartPtrCInstallRequestDoc CAFINSTALLREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/MinPackageElemXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/MinPackageElemXml.cpp new file mode 100644 index 000000000..7541544f1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/MinPackageElemXml.cpp @@ -0,0 +1,86 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "MinPackageElemXml.h" + +using namespace Caf; + +void MinPackageElemXml::add( + const SmartPtrCMinPackageElemDoc minPackageElemDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MinPackageElemXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(minPackageElemDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string indexVal = + CStringConv::toString(minPackageElemDoc->getIndex()); + CAF_CM_VALIDATE_STRING(indexVal); + thisXml->addAttribute("index", indexVal); + + const std::string packageNamespaceVal = minPackageElemDoc->getPackageNamespace(); + CAF_CM_VALIDATE_STRING(packageNamespaceVal); + thisXml->addAttribute("packageNamespace", packageNamespaceVal); + + const std::string packageNameVal = minPackageElemDoc->getPackageName(); + CAF_CM_VALIDATE_STRING(packageNameVal); + thisXml->addAttribute("packageName", packageNameVal); + + const std::string packageVersionVal = minPackageElemDoc->getPackageVersion(); + CAF_CM_VALIDATE_STRING(packageVersionVal); + thisXml->addAttribute("packageVersion", packageVersionVal); + } + CAF_CM_EXIT; +} + +SmartPtrCMinPackageElemDoc MinPackageElemXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MinPackageElemXml", "parse"); + + SmartPtrCMinPackageElemDoc minPackageElemDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string indexStrVal = + thisXml->findRequiredAttribute("index"); + int32 indexVal = 0; + if (! indexStrVal.empty()) { + indexVal = CStringConv::fromString(indexStrVal); + } + + const std::string packageNamespaceStrVal = + thisXml->findRequiredAttribute("packageNamespace"); + const std::string packageNamespaceVal = packageNamespaceStrVal; + + const std::string packageNameStrVal = + thisXml->findRequiredAttribute("packageName"); + const std::string packageNameVal = packageNameStrVal; + + const std::string packageVersionStrVal = + thisXml->findRequiredAttribute("packageVersion"); + const std::string packageVersionVal = packageVersionStrVal; + + minPackageElemDoc.CreateInstance(); + minPackageElemDoc->initialize( + indexVal, + packageNamespaceVal, + packageNameVal, + packageVersionVal); + } + CAF_CM_EXIT; + + return minPackageElemDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/MinPackageElemXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/MinPackageElemXml.h new file mode 100644 index 000000000..3c6f894e0 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/MinPackageElemXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef MinPackageElemXml_h_ +#define MinPackageElemXml_h_ + +namespace Caf { + + /// Streams the MinPackageElem class to/from XML + namespace MinPackageElemXml { + + /// Adds the MinPackageElemDoc into the XML. + void CAFINSTALLREQUESTXML_LINKAGE add( + const SmartPtrCMinPackageElemDoc minPackageElemDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the MinPackageElemDoc from the XML. + SmartPtrCMinPackageElemDoc CAFINSTALLREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/PackageDefnXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/PackageDefnXml.cpp new file mode 100644 index 000000000..0ff471272 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/PackageDefnXml.cpp @@ -0,0 +1,91 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "PackageDefnXml.h" + +using namespace Caf; + +void PackageDefnXml::add( + const SmartPtrCPackageDefnDoc packageDefnDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("PackageDefnXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(packageDefnDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string startupAttachmentNameVal = packageDefnDoc->getStartupAttachmentName(); + CAF_CM_VALIDATE_STRING(startupAttachmentNameVal); + thisXml->addAttribute("startupAttachmentName", startupAttachmentNameVal); + + const std::string packageAttachmentNameVal = packageDefnDoc->getPackageAttachmentName(); + CAF_CM_VALIDATE_STRING(packageAttachmentNameVal); + thisXml->addAttribute("packageAttachmentName", packageAttachmentNameVal); + + const SmartPtrCAttachmentNameCollectionDoc supportingAttachmentNameCollectionVal = + packageDefnDoc->getSupportingAttachmentNameCollection(); + if (! supportingAttachmentNameCollectionVal.IsNull()) { + const SmartPtrCXmlElement supportingAttachmentNameCollectionXml = + thisXml->createAndAddElement("attachmentNameCollection"); + AttachmentNameCollectionXml::add(supportingAttachmentNameCollectionVal, supportingAttachmentNameCollectionXml); + } + + const std::string argumentsVal = packageDefnDoc->getArguments(); + if (! argumentsVal.empty()) { + thisXml->addAttribute("arguments", argumentsVal); + } + } + CAF_CM_EXIT; +} + +SmartPtrCPackageDefnDoc PackageDefnXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("PackageDefnXml", "parse"); + + SmartPtrCPackageDefnDoc packageDefnDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string startupAttachmentNameStrVal = + thisXml->findRequiredAttribute("startupAttachmentName"); + const std::string startupAttachmentNameVal = startupAttachmentNameStrVal; + + const std::string packageAttachmentNameStrVal = + thisXml->findRequiredAttribute("packageAttachmentName"); + const std::string packageAttachmentNameVal = packageAttachmentNameStrVal; + + const SmartPtrCXmlElement supportingAttachmentNameCollectionXml = + thisXml->findOptionalChild("attachmentNameCollection"); + + SmartPtrCAttachmentNameCollectionDoc supportingAttachmentNameCollectionVal; + if (! supportingAttachmentNameCollectionXml.IsNull()) { + supportingAttachmentNameCollectionVal = AttachmentNameCollectionXml::parse(supportingAttachmentNameCollectionXml); + } + + const std::string argumentsStrVal = + thisXml->findOptionalAttribute("arguments"); + const std::string argumentsVal = argumentsStrVal; + + packageDefnDoc.CreateInstance(); + packageDefnDoc->initialize( + startupAttachmentNameVal, + packageAttachmentNameVal, + supportingAttachmentNameCollectionVal, + argumentsVal); + } + CAF_CM_EXIT; + + return packageDefnDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/PackageDefnXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/PackageDefnXml.h new file mode 100644 index 000000000..00e32b954 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/PackageDefnXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef PackageDefnXml_h_ +#define PackageDefnXml_h_ + +namespace Caf { + + /// Streams the PackageDefn class to/from XML + namespace PackageDefnXml { + + /// Adds the PackageDefnDoc into the XML. + void CAFINSTALLREQUESTXML_LINKAGE add( + const SmartPtrCPackageDefnDoc packageDefnDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the PackageDefnDoc from the XML. + SmartPtrCPackageDefnDoc CAFINSTALLREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/UninstallProviderJobXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/UninstallProviderJobXml.cpp new file mode 100644 index 000000000..813a75889 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/UninstallProviderJobXml.cpp @@ -0,0 +1,108 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "UninstallProviderJobXml.h" + +using namespace Caf; + +void UninstallProviderJobXml::add( + const SmartPtrCUninstallProviderJobDoc uninstallProviderJobDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("UninstallProviderJobXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(uninstallProviderJobDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdVal = + BasePlatform::UuidToString(uninstallProviderJobDoc->getClientId()); + CAF_CM_VALIDATE_STRING(clientIdVal); + thisXml->addAttribute("clientId", clientIdVal); + + const std::string jobIdVal = + BasePlatform::UuidToString(uninstallProviderJobDoc->getJobId()); + CAF_CM_VALIDATE_STRING(jobIdVal); + thisXml->addAttribute("jobId", jobIdVal); + + const std::string providerNamespaceVal = uninstallProviderJobDoc->getProviderNamespace(); + CAF_CM_VALIDATE_STRING(providerNamespaceVal); + thisXml->addAttribute("providerNamespace", providerNamespaceVal); + + const std::string providerNameVal = uninstallProviderJobDoc->getProviderName(); + CAF_CM_VALIDATE_STRING(providerNameVal); + thisXml->addAttribute("providerName", providerNameVal); + + const std::string providerVersionVal = uninstallProviderJobDoc->getProviderVersion(); + CAF_CM_VALIDATE_STRING(providerVersionVal); + thisXml->addAttribute("providerVersion", providerVersionVal); + + const std::string packageOSTypeVal = + EnumConvertersXml::convertPackageOSTypeToString(uninstallProviderJobDoc->getPackageOSType()); + CAF_CM_VALIDATE_STRING(packageOSTypeVal); + thisXml->addAttribute("packageOSType", packageOSTypeVal); + } + CAF_CM_EXIT; +} + +SmartPtrCUninstallProviderJobDoc UninstallProviderJobXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("UninstallProviderJobXml", "parse"); + + SmartPtrCUninstallProviderJobDoc uninstallProviderJobDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdStrVal = + thisXml->findRequiredAttribute("clientId"); + UUID clientIdVal = CAFCOMMON_GUID_NULL; + BasePlatform::UuidFromString(clientIdStrVal.c_str(), clientIdVal); + + const std::string jobIdStrVal = + thisXml->findRequiredAttribute("jobId"); + UUID jobIdVal = CAFCOMMON_GUID_NULL; + BasePlatform::UuidFromString(jobIdStrVal.c_str(), jobIdVal); + + const std::string providerNamespaceStrVal = + thisXml->findRequiredAttribute("providerNamespace"); + const std::string providerNamespaceVal = providerNamespaceStrVal; + + const std::string providerNameStrVal = + thisXml->findRequiredAttribute("providerName"); + const std::string providerNameVal = providerNameStrVal; + + const std::string providerVersionStrVal = + thisXml->findRequiredAttribute("providerVersion"); + const std::string providerVersionVal = providerVersionStrVal; + + const std::string packageOSTypeStrVal = + thisXml->findRequiredAttribute("packageOSType"); + PACKAGE_OS_TYPE packageOSTypeVal = PACKAGE_OS_NONE; + if (! packageOSTypeStrVal.empty()) { + packageOSTypeVal = EnumConvertersXml::convertStringToPackageOSType(packageOSTypeStrVal); + } + + uninstallProviderJobDoc.CreateInstance(); + uninstallProviderJobDoc->initialize( + clientIdVal, + jobIdVal, + providerNamespaceVal, + providerNameVal, + providerVersionVal, + packageOSTypeVal); + } + CAF_CM_EXIT; + + return uninstallProviderJobDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/UninstallProviderJobXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/UninstallProviderJobXml.h new file mode 100644 index 000000000..6103a4103 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/UninstallProviderJobXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef UninstallProviderJobXml_h_ +#define UninstallProviderJobXml_h_ + +namespace Caf { + + /// Streams the UninstallProviderJob class to/from XML + namespace UninstallProviderJobXml { + + /// Adds the UninstallProviderJobDoc into the XML. + void CAFINSTALLREQUESTXML_LINKAGE add( + const SmartPtrCUninstallProviderJobDoc uninstallProviderJobDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the UninstallProviderJobDoc from the XML. + SmartPtrCUninstallProviderJobDoc CAFINSTALLREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/stdafx.h new file mode 100644 index 000000000..a93d0c3c4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/stdafx.h @@ -0,0 +1,28 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define CAFINSTALLREQUESTXML_LINKAGE __declspec(dllexport) +#else + #define CAFINSTALLREQUESTXML_LINKAGE +#endif + +#include +#include +#include + +#include "CafInstallRequestXmlInc.h" + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagRequestXml/DiagRequestXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagRequestXml/DiagRequestXml.cpp new file mode 100644 index 000000000..b5594a305 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagRequestXml/DiagRequestXml.cpp @@ -0,0 +1,114 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "DiagRequestXml.h" + +using namespace Caf; + +void DiagRequestXml::add( + const SmartPtrCDiagRequestDoc diagRequestDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DiagRequestXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(diagRequestDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdVal = + BasePlatform::UuidToString(diagRequestDoc->getClientId()); + CAF_CM_VALIDATE_STRING(clientIdVal); + thisXml->addAttribute("clientId", clientIdVal); + + const std::string requestIdVal = + BasePlatform::UuidToString(diagRequestDoc->getRequestId()); + CAF_CM_VALIDATE_STRING(requestIdVal); + thisXml->addAttribute("requestId", requestIdVal); + + const std::string pmeIdVal = diagRequestDoc->getPmeId(); + CAF_CM_VALIDATE_STRING(pmeIdVal); + thisXml->addAttribute("pmeId", pmeIdVal); + + const SmartPtrCRequestHeaderDoc requestHeaderVal = + diagRequestDoc->getRequestHeader(); + CAF_CM_VALIDATE_SMARTPTR(requestHeaderVal); + + const SmartPtrCXmlElement requestHeaderXml = + thisXml->createAndAddElement("requestHeader"); + RequestHeaderXml::add(requestHeaderVal, requestHeaderXml); + + const SmartPtrCDiagBatchDoc batchVal = + diagRequestDoc->getBatch(); + CAF_CM_VALIDATE_SMARTPTR(batchVal); + + const SmartPtrCXmlElement batchXml = + thisXml->createAndAddElement("batch"); + DiagBatchXml::add(batchVal, batchXml); + } + CAF_CM_EXIT; +} + +SmartPtrCDiagRequestDoc DiagRequestXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DiagRequestXml", "parse"); + + SmartPtrCDiagRequestDoc diagRequestDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdStrVal = + thisXml->findRequiredAttribute("clientId"); + UUID clientIdVal = CAFCOMMON_GUID_NULL; + if (! clientIdStrVal.empty()) { + BasePlatform::UuidFromString(clientIdStrVal.c_str(), clientIdVal); + } + + const std::string requestIdStrVal = + thisXml->findRequiredAttribute("requestId"); + UUID requestIdVal = CAFCOMMON_GUID_NULL; + if (! requestIdStrVal.empty()) { + BasePlatform::UuidFromString(requestIdStrVal.c_str(), requestIdVal); + } + + const std::string pmeIdVal = + thisXml->findRequiredAttribute("pmeId"); + + const SmartPtrCXmlElement requestHeaderXml = + thisXml->findRequiredChild("requestHeader"); + + SmartPtrCRequestHeaderDoc requestHeaderVal; + if (! requestHeaderXml.IsNull()) { + requestHeaderVal = RequestHeaderXml::parse(requestHeaderXml); + } + + const SmartPtrCXmlElement batchXml = + thisXml->findRequiredChild("batch"); + + SmartPtrCDiagBatchDoc batchVal; + if (! batchXml.IsNull()) { + batchVal = DiagBatchXml::parse(batchXml); + } + + diagRequestDoc.CreateInstance(); + diagRequestDoc->initialize( + clientIdVal, + requestIdVal, + pmeIdVal, + requestHeaderVal, + batchVal); + } + CAF_CM_EXIT; + + return diagRequestDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagRequestXml/DiagRequestXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagRequestXml/DiagRequestXml.h new file mode 100644 index 000000000..cfbdb4a5a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagRequestXml/DiagRequestXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef DiagRequestXml_h_ +#define DiagRequestXml_h_ + +namespace Caf { + + /// Streams the DiagRequest class to/from XML + namespace DiagRequestXml { + + /// Adds the DiagRequestDoc into the XML. + void DIAGREQUESTXML_LINKAGE add( + const SmartPtrCDiagRequestDoc diagRequestDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the DiagRequestDoc from the XML. + SmartPtrCDiagRequestDoc DIAGREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagRequestXml/DiagRequestXmlInc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagRequestXml/DiagRequestXmlInc.h new file mode 100644 index 000000000..6c52ce760 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagRequestXml/DiagRequestXmlInc.h @@ -0,0 +1,21 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef DiagRequestXml_Inc_h_ +#define DiagRequestXml_Inc_h_ + +#include "../CafCoreTypesXml/CafCoreTypesXmlLink.h" +#include "../DiagTypesXml/DiagTypesXmlLink.h" +#include "DiagRequestXml.h" +#include "DiagRequestXmlRoots.h" + +#endif /* DiagRequestXml_Inc_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagRequestXml/DiagRequestXmlLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagRequestXml/DiagRequestXmlLink.h new file mode 100644 index 000000000..2ad706676 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagRequestXml/DiagRequestXmlLink.h @@ -0,0 +1,30 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef DiagRequestXml_Link_h_ +#define DiagRequestXml_Link_h_ + +#ifndef DIAGREQUESTXML_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define DIAGREQUESTXML_LINKAGE __declspec(dllexport) + #else + #define DIAGREQUESTXML_LINKAGE __declspec(dllimport) + #endif + #else + #define DIAGREQUESTXML_LINKAGE + #endif +#endif + +#include "DiagRequestXmlInc.h" + +#endif /* DiagRequestXml_Link_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagRequestXml/DiagRequestXmlRoots.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagRequestXml/DiagRequestXmlRoots.cpp new file mode 100644 index 000000000..0f158a3ae --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagRequestXml/DiagRequestXmlRoots.cpp @@ -0,0 +1,90 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +using namespace Caf; + +std::string XmlRoots::saveDiagRequestToString( + const SmartPtrCDiagRequestDoc diagRequestDoc) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "saveDiagRequestToString"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(diagRequestDoc); + + const std::string schemaNamespace = DocXmlUtils::getSchemaNamespace("fx"); + const std::string schemaLocation = DocXmlUtils::getSchemaLocation("fx/DiagRequest.xsd"); + + const SmartPtrCXmlElement rootXml = CXmlUtils::createRootElement( + "diagRequest", schemaNamespace, schemaLocation); + DiagRequestXml::add(diagRequestDoc, rootXml); + + rc = rootXml->saveToString(); + } + CAF_CM_EXIT; + + return rc; +} + +SmartPtrCDiagRequestDoc XmlRoots::parseDiagRequestFromString( + const std::string xml) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseDiagRequestFromString"); + + SmartPtrCDiagRequestDoc diagRequestDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(xml); + + const SmartPtrCXmlElement rootXml = RequestXml::parseString(xml, "caf:diagRequest"); + diagRequestDoc = DiagRequestXml::parse(rootXml); + } + CAF_CM_EXIT; + + return diagRequestDoc; +} + +void XmlRoots::saveDiagRequestToFile( + const SmartPtrCDiagRequestDoc diagRequestDoc, + const std::string filePath) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("XmlRoots", "saveDiagRequestToFile"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(diagRequestDoc); + CAF_CM_VALIDATE_STRING(filePath); + + CAF_CM_LOG_DEBUG_VA1("Saving to file - %s", filePath.c_str()); + + const std::string diagRequestStr = + saveDiagRequestToString(diagRequestDoc); + FileSystemUtils::saveTextFile(filePath, diagRequestStr); + } + CAF_CM_EXIT; +} + +SmartPtrCDiagRequestDoc XmlRoots::parseDiagRequestFromFile( + const std::string filePath) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseDiagRequestFromFile"); + + SmartPtrCDiagRequestDoc diagRequestDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filePath); + + const SmartPtrCXmlElement rootXml = RequestXml::parseFile(filePath, "caf:diagRequest"); + diagRequestDoc = DiagRequestXml::parse(rootXml); + } + CAF_CM_EXIT; + + return diagRequestDoc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagRequestXml/DiagRequestXmlRoots.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagRequestXml/DiagRequestXmlRoots.h new file mode 100644 index 000000000..ef32eeb8c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagRequestXml/DiagRequestXmlRoots.h @@ -0,0 +1,39 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef DiagRequestXmlRoots_h_ +#define DiagRequestXmlRoots_h_ + +namespace Caf { + + namespace XmlRoots { + + /// Saves the DiagRequestDoc to a string. + std::string DIAGREQUESTXML_LINKAGE saveDiagRequestToString( + const SmartPtrCDiagRequestDoc diagRequestDoc); + + /// Parses the DiagRequestDoc from the string. + SmartPtrCDiagRequestDoc DIAGREQUESTXML_LINKAGE parseDiagRequestFromString( + const std::string xml); + + /// Saves the DiagRequestDoc to a file. + void DIAGREQUESTXML_LINKAGE saveDiagRequestToFile( + const SmartPtrCDiagRequestDoc diagRequestDoc, + const std::string filePath); + + /// Parses the DiagRequestDoc from the file. + SmartPtrCDiagRequestDoc DIAGREQUESTXML_LINKAGE parseDiagRequestFromFile( + const std::string filePath); + } +} + +#endif /* DiagRequestXmlRoots_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagRequestXml/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagRequestXml/stdafx.h new file mode 100644 index 000000000..c68f2715e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagRequestXml/stdafx.h @@ -0,0 +1,28 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define DIAGREQUESTXML_LINKAGE __declspec(dllexport) +#else + #define DIAGREQUESTXML_LINKAGE +#endif + +#include +#include +#include + +#include "DiagRequestXmlInc.h" + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagBatchXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagBatchXml.cpp new file mode 100644 index 000000000..6b07c1e25 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagBatchXml.cpp @@ -0,0 +1,97 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "DiagBatchXml.h" + +using namespace Caf; + +void DiagBatchXml::add( + const SmartPtrCDiagBatchDoc diagBatchDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DiagBatchXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(diagBatchDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const SmartPtrCDiagCollectInstancesDoc collectInstancesVal = + diagBatchDoc->getCollectInstances(); + if (! collectInstancesVal.IsNull()) { + const SmartPtrCXmlElement collectInstancesXml = + thisXml->createAndAddElement("collectInstances"); + DiagCollectInstancesXml::add(collectInstancesVal, collectInstancesXml); + } + + const SmartPtrCDiagSetValueCollectionDoc setValueCollectionVal = + diagBatchDoc->getSetValueCollection(); + if (! setValueCollectionVal.IsNull()) { + const SmartPtrCXmlElement setValueCollectionXml = + thisXml->createAndAddElement("setValueCollection"); + DiagSetValueCollectionXml::add(setValueCollectionVal, setValueCollectionXml); + } + + const SmartPtrCDiagDeleteValueCollectionDoc deleteValueCollectionVal = + diagBatchDoc->getDeleteValueCollection(); + if (! deleteValueCollectionVal.IsNull()) { + const SmartPtrCXmlElement deleteValueCollectionXml = + thisXml->createAndAddElement("deleteValueCollection"); + DiagDeleteValueCollectionXml::add(deleteValueCollectionVal, deleteValueCollectionXml); + } + } + CAF_CM_EXIT; +} + +SmartPtrCDiagBatchDoc DiagBatchXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DiagBatchXml", "parse"); + + SmartPtrCDiagBatchDoc diagBatchDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const SmartPtrCXmlElement collectInstancesXml = + thisXml->findOptionalChild("collectInstances"); + + SmartPtrCDiagCollectInstancesDoc collectInstancesVal; + if (! collectInstancesXml.IsNull()) { + collectInstancesVal = DiagCollectInstancesXml::parse(collectInstancesXml); + } + + const SmartPtrCXmlElement setValueCollectionXml = + thisXml->findOptionalChild("setValueCollection"); + + SmartPtrCDiagSetValueCollectionDoc setValueCollectionVal; + if (! setValueCollectionXml.IsNull()) { + setValueCollectionVal = DiagSetValueCollectionXml::parse(setValueCollectionXml); + } + + const SmartPtrCXmlElement deleteValueCollectionXml = + thisXml->findOptionalChild("deleteValueCollection"); + + SmartPtrCDiagDeleteValueCollectionDoc deleteValueCollectionVal; + if (! deleteValueCollectionXml.IsNull()) { + deleteValueCollectionVal = DiagDeleteValueCollectionXml::parse(deleteValueCollectionXml); + } + + diagBatchDoc.CreateInstance(); + diagBatchDoc->initialize( + collectInstancesVal, + setValueCollectionVal, + deleteValueCollectionVal); + } + CAF_CM_EXIT; + + return diagBatchDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagBatchXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagBatchXml.h new file mode 100644 index 000000000..92386e275 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagBatchXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef DiagBatchXml_h_ +#define DiagBatchXml_h_ + +namespace Caf { + + /// Streams the DiagBatch class to/from XML + namespace DiagBatchXml { + + /// Adds the DiagBatchDoc into the XML. + void DIAGTYPESXML_LINKAGE add( + const SmartPtrCDiagBatchDoc diagBatchDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the DiagBatchDoc from the XML. + SmartPtrCDiagBatchDoc DIAGTYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagCollectInstancesXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagCollectInstancesXml.cpp new file mode 100644 index 000000000..936f7e452 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagCollectInstancesXml.cpp @@ -0,0 +1,59 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "DiagCollectInstancesXml.h" + +using namespace Caf; + +void DiagCollectInstancesXml::add( + const SmartPtrCDiagCollectInstancesDoc diagCollectInstancesDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DiagCollectInstancesXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(diagCollectInstancesDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string jobIdVal = + BasePlatform::UuidToString(diagCollectInstancesDoc->getJobId()); + CAF_CM_VALIDATE_STRING(jobIdVal); + thisXml->addAttribute("jobId", jobIdVal); + } + CAF_CM_EXIT; +} + +SmartPtrCDiagCollectInstancesDoc DiagCollectInstancesXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DiagCollectInstancesXml", "parse"); + + SmartPtrCDiagCollectInstancesDoc diagCollectInstancesDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string jobIdStrVal = + thisXml->findRequiredAttribute("jobId"); + UUID jobIdVal = CAFCOMMON_GUID_NULL; + if (! jobIdStrVal.empty()) { + BasePlatform::UuidFromString(jobIdStrVal.c_str(), jobIdVal); + } + + diagCollectInstancesDoc.CreateInstance(); + diagCollectInstancesDoc->initialize( + jobIdVal); + } + CAF_CM_EXIT; + + return diagCollectInstancesDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagCollectInstancesXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagCollectInstancesXml.h new file mode 100644 index 000000000..33db81e56 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagCollectInstancesXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef DiagCollectInstancesXml_h_ +#define DiagCollectInstancesXml_h_ + +namespace Caf { + + /// Streams the DiagCollectInstances class to/from XML + namespace DiagCollectInstancesXml { + + /// Adds the DiagCollectInstancesDoc into the XML. + void DIAGTYPESXML_LINKAGE add( + const SmartPtrCDiagCollectInstancesDoc diagCollectInstancesDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the DiagCollectInstancesDoc from the XML. + SmartPtrCDiagCollectInstancesDoc DIAGTYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagDeleteValueCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagDeleteValueCollectionXml.cpp new file mode 100644 index 000000000..49c10794b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagDeleteValueCollectionXml.cpp @@ -0,0 +1,74 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "DiagDeleteValueCollectionXml.h" + +using namespace Caf; + +void DiagDeleteValueCollectionXml::add( + const SmartPtrCDiagDeleteValueCollectionDoc diagDeleteValueCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DiagDeleteValueCollectionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(diagDeleteValueCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque deleteValueVal = + diagDeleteValueCollectionDoc->getDeleteValueCollection(); + CAF_CM_VALIDATE_STL(deleteValueVal); + + if (! deleteValueVal.empty()) { + for (TConstIterator > deleteValueIter(deleteValueVal); + deleteValueIter; deleteValueIter++) { + const SmartPtrCXmlElement deleteValueXml = + thisXml->createAndAddElement("deleteValue"); + DiagDeleteValueXml::add(*deleteValueIter, deleteValueXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCDiagDeleteValueCollectionDoc DiagDeleteValueCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DiagDeleteValueCollectionXml", "parse"); + + SmartPtrCDiagDeleteValueCollectionDoc diagDeleteValueCollectionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection deleteValueChildrenXml = + thisXml->findRequiredChildren("deleteValue"); + + std::deque deleteValueVal; + if (! deleteValueChildrenXml.IsNull() && ! deleteValueChildrenXml->empty()) { + for (TConstIterator deleteValueXmlIter(*deleteValueChildrenXml); + deleteValueXmlIter; deleteValueXmlIter++) { + const SmartPtrCXmlElement deleteValueXml = deleteValueXmlIter->second; + const SmartPtrCDiagDeleteValueDoc deleteValueDoc = + DiagDeleteValueXml::parse(deleteValueXml); + deleteValueVal.push_back(deleteValueDoc); + } + } + + diagDeleteValueCollectionDoc.CreateInstance(); + diagDeleteValueCollectionDoc->initialize( + deleteValueVal); + } + CAF_CM_EXIT; + + return diagDeleteValueCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagDeleteValueCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagDeleteValueCollectionXml.h new file mode 100644 index 000000000..5c4b257b7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagDeleteValueCollectionXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef DiagDeleteValueCollectionXml_h_ +#define DiagDeleteValueCollectionXml_h_ + +namespace Caf { + + /// Streams the DiagDeleteValueCollection class to/from XML + namespace DiagDeleteValueCollectionXml { + + /// Adds the DiagDeleteValueCollectionDoc into the XML. + void DIAGTYPESXML_LINKAGE add( + const SmartPtrCDiagDeleteValueCollectionDoc diagDeleteValueCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the DiagDeleteValueCollectionDoc from the XML. + SmartPtrCDiagDeleteValueCollectionDoc DIAGTYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagDeleteValueXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagDeleteValueXml.cpp new file mode 100644 index 000000000..896e75b0f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagDeleteValueXml.cpp @@ -0,0 +1,85 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "DiagDeleteValueXml.h" + +using namespace Caf; + +void DiagDeleteValueXml::add( + const SmartPtrCDiagDeleteValueDoc diagDeleteValueDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DiagDeleteValueXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(diagDeleteValueDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string jobIdVal = + BasePlatform::UuidToString(diagDeleteValueDoc->getJobId()); + CAF_CM_VALIDATE_STRING(jobIdVal); + thisXml->addAttribute("jobId", jobIdVal); + + const std::string fileAliasVal = diagDeleteValueDoc->getFileAlias(); + CAF_CM_VALIDATE_STRING(fileAliasVal); + thisXml->addAttribute("fileAlias", fileAliasVal); + + const std::string valueNameVal = + diagDeleteValueDoc->getValueName(); + CAF_CM_VALIDATE_STRING(valueNameVal); + + const SmartPtrCXmlElement valueNameXml = + thisXml->createAndAddElement("valueName"); + valueNameXml->setValue(valueNameVal); + } + CAF_CM_EXIT; +} + +SmartPtrCDiagDeleteValueDoc DiagDeleteValueXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DiagDeleteValueXml", "parse"); + + SmartPtrCDiagDeleteValueDoc diagDeleteValueDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string jobIdStrVal = + thisXml->findRequiredAttribute("jobId"); + UUID jobIdVal = CAFCOMMON_GUID_NULL; + if (! jobIdStrVal.empty()) { + BasePlatform::UuidFromString(jobIdStrVal.c_str(), jobIdVal); + } + + const std::string fileAliasStrVal = + thisXml->findRequiredAttribute("fileAlias"); + const std::string fileAliasVal = fileAliasStrVal; + + const SmartPtrCXmlElement valueNameXml = + thisXml->findRequiredChild("valueName"); + + std::string valueNameVal; + if (! valueNameXml.IsNull()) { + valueNameVal = valueNameXml->getValue(); + } + + diagDeleteValueDoc.CreateInstance(); + diagDeleteValueDoc->initialize( + jobIdVal, + fileAliasVal, + valueNameVal); + } + CAF_CM_EXIT; + + return diagDeleteValueDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagDeleteValueXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagDeleteValueXml.h new file mode 100644 index 000000000..8742d7a90 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagDeleteValueXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef DiagDeleteValueXml_h_ +#define DiagDeleteValueXml_h_ + +namespace Caf { + + /// Streams the DiagDeleteValue class to/from XML + namespace DiagDeleteValueXml { + + /// Adds the DiagDeleteValueDoc into the XML. + void DIAGTYPESXML_LINKAGE add( + const SmartPtrCDiagDeleteValueDoc diagDeleteValueDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the DiagDeleteValueDoc from the XML. + SmartPtrCDiagDeleteValueDoc DIAGTYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagSetValueCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagSetValueCollectionXml.cpp new file mode 100644 index 000000000..6ee7d398d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagSetValueCollectionXml.cpp @@ -0,0 +1,74 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "DiagSetValueCollectionXml.h" + +using namespace Caf; + +void DiagSetValueCollectionXml::add( + const SmartPtrCDiagSetValueCollectionDoc diagSetValueCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DiagSetValueCollectionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(diagSetValueCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque setValueVal = + diagSetValueCollectionDoc->getSetValueCollection(); + CAF_CM_VALIDATE_STL(setValueVal); + + if (! setValueVal.empty()) { + for (TConstIterator > setValueIter(setValueVal); + setValueIter; setValueIter++) { + const SmartPtrCXmlElement setValueXml = + thisXml->createAndAddElement("setValue"); + DiagSetValueXml::add(*setValueIter, setValueXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCDiagSetValueCollectionDoc DiagSetValueCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DiagSetValueCollectionXml", "parse"); + + SmartPtrCDiagSetValueCollectionDoc diagSetValueCollectionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection setValueChildrenXml = + thisXml->findRequiredChildren("setValue"); + + std::deque setValueVal; + if (! setValueChildrenXml.IsNull() && ! setValueChildrenXml->empty()) { + for (TConstIterator setValueXmlIter(*setValueChildrenXml); + setValueXmlIter; setValueXmlIter++) { + const SmartPtrCXmlElement setValueXml = setValueXmlIter->second; + const SmartPtrCDiagSetValueDoc setValueDoc = + DiagSetValueXml::parse(setValueXml); + setValueVal.push_back(setValueDoc); + } + } + + diagSetValueCollectionDoc.CreateInstance(); + diagSetValueCollectionDoc->initialize( + setValueVal); + } + CAF_CM_EXIT; + + return diagSetValueCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagSetValueCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagSetValueCollectionXml.h new file mode 100644 index 000000000..00f7dbaca --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagSetValueCollectionXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef DiagSetValueCollectionXml_h_ +#define DiagSetValueCollectionXml_h_ + +namespace Caf { + + /// Streams the DiagSetValueCollection class to/from XML + namespace DiagSetValueCollectionXml { + + /// Adds the DiagSetValueCollectionDoc into the XML. + void DIAGTYPESXML_LINKAGE add( + const SmartPtrCDiagSetValueCollectionDoc diagSetValueCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the DiagSetValueCollectionDoc from the XML. + SmartPtrCDiagSetValueCollectionDoc DIAGTYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagSetValueXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagSetValueXml.cpp new file mode 100644 index 000000000..2f5f874cb --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagSetValueXml.cpp @@ -0,0 +1,85 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "DiagSetValueXml.h" + +using namespace Caf; + +void DiagSetValueXml::add( + const SmartPtrCDiagSetValueDoc diagSetValueDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DiagSetValueXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(diagSetValueDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string jobIdVal = + BasePlatform::UuidToString(diagSetValueDoc->getJobId()); + CAF_CM_VALIDATE_STRING(jobIdVal); + thisXml->addAttribute("jobId", jobIdVal); + + const std::string fileAliasVal = diagSetValueDoc->getFileAlias(); + CAF_CM_VALIDATE_STRING(fileAliasVal); + thisXml->addAttribute("fileAlias", fileAliasVal); + + const SmartPtrCPropertyDoc valueVal = + diagSetValueDoc->getValue(); + CAF_CM_VALIDATE_SMARTPTR(valueVal); + + const SmartPtrCXmlElement valueXml = + thisXml->createAndAddElement("value"); + PropertyXml::add(valueVal, valueXml); + } + CAF_CM_EXIT; +} + +SmartPtrCDiagSetValueDoc DiagSetValueXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DiagSetValueXml", "parse"); + + SmartPtrCDiagSetValueDoc diagSetValueDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string jobIdStrVal = + thisXml->findRequiredAttribute("jobId"); + UUID jobIdVal = CAFCOMMON_GUID_NULL; + if (! jobIdStrVal.empty()) { + BasePlatform::UuidFromString(jobIdStrVal.c_str(), jobIdVal); + } + + const std::string fileAliasStrVal = + thisXml->findRequiredAttribute("fileAlias"); + const std::string fileAliasVal = fileAliasStrVal; + + const SmartPtrCXmlElement valueXml = + thisXml->findRequiredChild("value"); + + SmartPtrCPropertyDoc valueVal; + if (! valueXml.IsNull()) { + valueVal = PropertyXml::parse(valueXml); + } + + diagSetValueDoc.CreateInstance(); + diagSetValueDoc->initialize( + jobIdVal, + fileAliasVal, + valueVal); + } + CAF_CM_EXIT; + + return diagSetValueDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagSetValueXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagSetValueXml.h new file mode 100644 index 000000000..619cbe05c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagSetValueXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef DiagSetValueXml_h_ +#define DiagSetValueXml_h_ + +namespace Caf { + + /// Streams the DiagSetValue class to/from XML + namespace DiagSetValueXml { + + /// Adds the DiagSetValueDoc into the XML. + void DIAGTYPESXML_LINKAGE add( + const SmartPtrCDiagSetValueDoc diagSetValueDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the DiagSetValueDoc from the XML. + SmartPtrCDiagSetValueDoc DIAGTYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagTypesXmlInc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagTypesXmlInc.h new file mode 100644 index 000000000..8ae7c3d64 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagTypesXmlInc.h @@ -0,0 +1,24 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef DiagTypesXml_Inc_h_ +#define DiagTypesXml_Inc_h_ + +#include "../CafCoreTypesXml/CafCoreTypesXmlLink.h" +#include "DiagCollectInstancesXml.h" +#include "DiagSetValueXml.h" +#include "DiagSetValueCollectionXml.h" +#include "DiagDeleteValueXml.h" +#include "DiagDeleteValueCollectionXml.h" +#include "DiagBatchXml.h" + +#endif /* DiagTypesXml_Inc_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagTypesXmlLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagTypesXmlLink.h new file mode 100644 index 000000000..22c4ec7e9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagTypesXmlLink.h @@ -0,0 +1,30 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef DiagTypesXml_Link_h_ +#define DiagTypesXml_Link_h_ + +#ifndef DIAGTYPESXML_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define DIAGTYPESXML_LINKAGE __declspec(dllexport) + #else + #define DIAGTYPESXML_LINKAGE __declspec(dllimport) + #endif + #else + #define DIAGTYPESXML_LINKAGE + #endif +#endif + +#include "DiagTypesXmlInc.h" + +#endif /* DiagTypesXml_Link_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/stdafx.h new file mode 100644 index 000000000..e2eecad27 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/stdafx.h @@ -0,0 +1,28 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define DIAGTYPESXML_LINKAGE __declspec(dllexport) +#else + #define DIAGTYPESXML_LINKAGE +#endif + +#include +#include +#include + +#include "DiagTypesXmlInc.h" + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtRequestXml/MgmtRequestXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtRequestXml/MgmtRequestXml.cpp new file mode 100644 index 000000000..6a3ee1469 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtRequestXml/MgmtRequestXml.cpp @@ -0,0 +1,129 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "MgmtRequestXml.h" + +using namespace Caf; + +void MgmtRequestXml::add( + const SmartPtrCMgmtRequestDoc mgmtRequestDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MgmtRequestXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(mgmtRequestDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdVal = + BasePlatform::UuidToString(mgmtRequestDoc->getClientId()); + CAF_CM_VALIDATE_STRING(clientIdVal); + thisXml->addAttribute("clientId", clientIdVal); + + const std::string requestIdVal = + BasePlatform::UuidToString(mgmtRequestDoc->getRequestId()); + CAF_CM_VALIDATE_STRING(requestIdVal); + thisXml->addAttribute("requestId", requestIdVal); + + const std::string pmeIdVal = mgmtRequestDoc->getPmeId(); + CAF_CM_VALIDATE_STRING(pmeIdVal); + thisXml->addAttribute("pmeId", pmeIdVal); + + const SmartPtrCRequestHeaderDoc requestHeaderVal = + mgmtRequestDoc->getRequestHeader(); + CAF_CM_VALIDATE_SMARTPTR(requestHeaderVal); + + const SmartPtrCXmlElement requestHeaderXml = + thisXml->createAndAddElement("requestHeader"); + RequestHeaderXml::add(requestHeaderVal, requestHeaderXml); + + const SmartPtrCMgmtBatchDoc batchVal = + mgmtRequestDoc->getBatch(); + CAF_CM_VALIDATE_SMARTPTR(batchVal); + + const SmartPtrCXmlElement batchXml = + thisXml->createAndAddElement("batch"); + MgmtBatchXml::add(batchVal, batchXml); + + const SmartPtrCAttachmentCollectionDoc attachmentCollectionVal = + mgmtRequestDoc->getAttachmentCollection(); + if (! attachmentCollectionVal.IsNull()) { + const SmartPtrCXmlElement attachmentCollectionXml = + thisXml->createAndAddElement("attachmentCollection"); + AttachmentCollectionXml::add(attachmentCollectionVal, attachmentCollectionXml); + } + } + CAF_CM_EXIT; +} + +SmartPtrCMgmtRequestDoc MgmtRequestXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MgmtRequestXml", "parse"); + + SmartPtrCMgmtRequestDoc mgmtRequestDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdStrVal = + thisXml->findRequiredAttribute("clientId"); + UUID clientIdVal = CAFCOMMON_GUID_NULL; + if (! clientIdStrVal.empty()) { + BasePlatform::UuidFromString(clientIdStrVal.c_str(), clientIdVal); + } + + const std::string requestIdStrVal = + thisXml->findRequiredAttribute("requestId"); + UUID requestIdVal = CAFCOMMON_GUID_NULL; + if (! requestIdStrVal.empty()) { + BasePlatform::UuidFromString(requestIdStrVal.c_str(), requestIdVal); + } + + const std::string pmeIdVal = + thisXml->findRequiredAttribute("pmeId"); + + const SmartPtrCXmlElement requestHeaderXml = + thisXml->findRequiredChild("requestHeader"); + SmartPtrCRequestHeaderDoc requestHeaderVal; + if (! requestHeaderXml.IsNull()) { + requestHeaderVal = RequestHeaderXml::parse(requestHeaderXml); + } + + const SmartPtrCXmlElement batchXml = + thisXml->findRequiredChild("batch"); + SmartPtrCMgmtBatchDoc batchVal; + if (! batchXml.IsNull()) { + batchVal = MgmtBatchXml::parse(batchXml); + } + + const SmartPtrCXmlElement attachmentCollectionXml = + thisXml->findOptionalChild("attachmentCollection"); + + SmartPtrCAttachmentCollectionDoc attachmentCollectionVal; + if (! attachmentCollectionXml.IsNull()) { + attachmentCollectionVal = AttachmentCollectionXml::parse(attachmentCollectionXml); + } + + mgmtRequestDoc.CreateInstance(); + mgmtRequestDoc->initialize( + clientIdVal, + requestIdVal, + pmeIdVal, + requestHeaderVal, + batchVal, + attachmentCollectionVal); + } + CAF_CM_EXIT; + + return mgmtRequestDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtRequestXml/MgmtRequestXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtRequestXml/MgmtRequestXml.h new file mode 100644 index 000000000..e0e61ae5d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtRequestXml/MgmtRequestXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef MgmtRequestXml_h_ +#define MgmtRequestXml_h_ + +namespace Caf { + + /// Streams the MgmtRequest class to/from XML + namespace MgmtRequestXml { + + /// Adds the MgmtRequestDoc into the XML. + void MGMTREQUESTXML_LINKAGE add( + const SmartPtrCMgmtRequestDoc mgmtRequestDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the MgmtRequestDoc from the XML. + SmartPtrCMgmtRequestDoc MGMTREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtRequestXml/MgmtRequestXmlInc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtRequestXml/MgmtRequestXmlInc.h new file mode 100644 index 000000000..646aa8229 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtRequestXml/MgmtRequestXmlInc.h @@ -0,0 +1,21 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef MgmtRequestXml_Inc_h_ +#define MgmtRequestXml_Inc_h_ + +#include "../CafCoreTypesXml/CafCoreTypesXmlLink.h" +#include "../MgmtTypesXml/MgmtTypesXmlLink.h" +#include "MgmtRequestXml.h" +#include "MgmtRequestXmlRoots.h" + +#endif /* MgmtRequestXml_Inc_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtRequestXml/MgmtRequestXmlLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtRequestXml/MgmtRequestXmlLink.h new file mode 100644 index 000000000..b0e5aae32 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtRequestXml/MgmtRequestXmlLink.h @@ -0,0 +1,30 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef MgmtRequestXml_Link_h_ +#define MgmtRequestXml_Link_h_ + +#ifndef MGMTREQUESTXML_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define MGMTREQUESTXML_LINKAGE __declspec(dllexport) + #else + #define MGMTREQUESTXML_LINKAGE __declspec(dllimport) + #endif + #else + #define MGMTREQUESTXML_LINKAGE + #endif +#endif + +#include "MgmtRequestXmlInc.h" + +#endif /* MgmtRequestXml_Link_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtRequestXml/MgmtRequestXmlRoots.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtRequestXml/MgmtRequestXmlRoots.cpp new file mode 100644 index 000000000..05d11097b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtRequestXml/MgmtRequestXmlRoots.cpp @@ -0,0 +1,90 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +using namespace Caf; + +std::string XmlRoots::saveMgmtRequestToString( + const SmartPtrCMgmtRequestDoc mgmtRequestDoc) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "saveMgmtRequestToString"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(mgmtRequestDoc); + + const std::string schemaNamespace = DocXmlUtils::getSchemaNamespace("fx"); + const std::string schemaLocation = DocXmlUtils::getSchemaLocation("fx/MgmtRequest.xsd"); + + const SmartPtrCXmlElement rootXml = CXmlUtils::createRootElement( + "mgmtRequest", schemaNamespace, schemaLocation); + MgmtRequestXml::add(mgmtRequestDoc, rootXml); + + rc = rootXml->saveToString(); + } + CAF_CM_EXIT; + + return rc; +} + +SmartPtrCMgmtRequestDoc XmlRoots::parseMgmtRequestFromString( + const std::string xml) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseMgmtRequestFromString"); + + SmartPtrCMgmtRequestDoc mgmtRequestDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(xml); + + const SmartPtrCXmlElement rootXml = RequestXml::parseString(xml, "caf:mgmtRequest"); + mgmtRequestDoc = MgmtRequestXml::parse(rootXml); + } + CAF_CM_EXIT; + + return mgmtRequestDoc; +} + +void XmlRoots::saveMgmtRequestToFile( + const SmartPtrCMgmtRequestDoc mgmtRequestDoc, + const std::string filePath) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("XmlRoots", "saveMgmtRequestToFile"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(mgmtRequestDoc); + CAF_CM_VALIDATE_STRING(filePath); + + CAF_CM_LOG_DEBUG_VA1("Saving to file - %s", filePath.c_str()); + + const std::string mgmtRequestStr = + saveMgmtRequestToString(mgmtRequestDoc); + FileSystemUtils::saveTextFile(filePath, mgmtRequestStr); + } + CAF_CM_EXIT; +} + +SmartPtrCMgmtRequestDoc XmlRoots::parseMgmtRequestFromFile( + const std::string filePath) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseMgmtRequestFromFile"); + + SmartPtrCMgmtRequestDoc mgmtRequestDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filePath); + + const SmartPtrCXmlElement rootXml = RequestXml::parseFile(filePath, "caf:mgmtRequest"); + mgmtRequestDoc = MgmtRequestXml::parse(rootXml); + } + CAF_CM_EXIT; + + return mgmtRequestDoc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtRequestXml/MgmtRequestXmlRoots.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtRequestXml/MgmtRequestXmlRoots.h new file mode 100644 index 000000000..3a97bcafc --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtRequestXml/MgmtRequestXmlRoots.h @@ -0,0 +1,39 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef MgmtRequestXmlRoots_h_ +#define MgmtRequestXmlRoots_h_ + +namespace Caf { + + namespace XmlRoots { + + /// Saves the MgmtRequestDoc to a string. + std::string MGMTREQUESTXML_LINKAGE saveMgmtRequestToString( + const SmartPtrCMgmtRequestDoc mgmtRequestDoc); + + /// Parses the MgmtRequestDoc from the string. + SmartPtrCMgmtRequestDoc MGMTREQUESTXML_LINKAGE parseMgmtRequestFromString( + const std::string xml); + + /// Saves the MgmtRequestDoc to a file. + void MGMTREQUESTXML_LINKAGE saveMgmtRequestToFile( + const SmartPtrCMgmtRequestDoc mgmtRequestDoc, + const std::string filePath); + + /// Parses the MgmtRequestDoc from the file. + SmartPtrCMgmtRequestDoc MGMTREQUESTXML_LINKAGE parseMgmtRequestFromFile( + const std::string filePath); + } +} + +#endif /* MgmtRequestXmlRoots_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtRequestXml/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtRequestXml/stdafx.h new file mode 100644 index 000000000..84ead66ea --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtRequestXml/stdafx.h @@ -0,0 +1,28 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define MGMTREQUESTXML_LINKAGE __declspec(dllexport) +#else + #define MGMTREQUESTXML_LINKAGE +#endif + +#include +#include +#include + +#include "MgmtRequestXmlInc.h" + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtBatchXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtBatchXml.cpp new file mode 100644 index 000000000..5fbb74a76 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtBatchXml.cpp @@ -0,0 +1,97 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "MgmtBatchXml.h" + +using namespace Caf; + +void MgmtBatchXml::add( + const SmartPtrCMgmtBatchDoc mgmtBatchDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MgmtBatchXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(mgmtBatchDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const SmartPtrCMgmtCollectSchemaDoc collectSchemaVal = + mgmtBatchDoc->getCollectSchema(); + if (! collectSchemaVal.IsNull()) { + const SmartPtrCXmlElement collectSchemaXml = + thisXml->createAndAddElement("collectSchema"); + MgmtCollectSchemaXml::add(collectSchemaVal, collectSchemaXml); + } + + const SmartPtrCMgmtCollectInstancesCollectionDoc collectInstancesCollectionVal = + mgmtBatchDoc->getCollectInstancesCollection(); + if (! collectInstancesCollectionVal.IsNull()) { + const SmartPtrCXmlElement collectInstancesCollectionXml = + thisXml->createAndAddElement("collectInstancesCollection"); + MgmtCollectInstancesCollectionXml::add(collectInstancesCollectionVal, collectInstancesCollectionXml); + } + + const SmartPtrCMgmtInvokeOperationCollectionDoc invokeOperationCollectionVal = + mgmtBatchDoc->getInvokeOperationCollection(); + if (! invokeOperationCollectionVal.IsNull()) { + const SmartPtrCXmlElement invokeOperationCollectionXml = + thisXml->createAndAddElement("invokeOperationCollection"); + MgmtInvokeOperationCollectionXml::add(invokeOperationCollectionVal, invokeOperationCollectionXml); + } + } + CAF_CM_EXIT; +} + +SmartPtrCMgmtBatchDoc MgmtBatchXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MgmtBatchXml", "parse"); + + SmartPtrCMgmtBatchDoc mgmtBatchDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const SmartPtrCXmlElement collectSchemaXml = + thisXml->findOptionalChild("collectSchema"); + + SmartPtrCMgmtCollectSchemaDoc collectSchemaVal; + if (! collectSchemaXml.IsNull()) { + collectSchemaVal = MgmtCollectSchemaXml::parse(collectSchemaXml); + } + + const SmartPtrCXmlElement collectInstancesCollectionXml = + thisXml->findOptionalChild("collectInstancesCollection"); + + SmartPtrCMgmtCollectInstancesCollectionDoc collectInstancesCollectionVal; + if (! collectInstancesCollectionXml.IsNull()) { + collectInstancesCollectionVal = MgmtCollectInstancesCollectionXml::parse(collectInstancesCollectionXml); + } + + const SmartPtrCXmlElement invokeOperationCollectionXml = + thisXml->findOptionalChild("invokeOperationCollection"); + + SmartPtrCMgmtInvokeOperationCollectionDoc invokeOperationCollectionVal; + if (! invokeOperationCollectionXml.IsNull()) { + invokeOperationCollectionVal = MgmtInvokeOperationCollectionXml::parse(invokeOperationCollectionXml); + } + + mgmtBatchDoc.CreateInstance(); + mgmtBatchDoc->initialize( + collectSchemaVal, + collectInstancesCollectionVal, + invokeOperationCollectionVal); + } + CAF_CM_EXIT; + + return mgmtBatchDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtBatchXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtBatchXml.h new file mode 100644 index 000000000..aa2c3b6c2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtBatchXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef MgmtBatchXml_h_ +#define MgmtBatchXml_h_ + +namespace Caf { + + /// Streams the MgmtBatch class to/from XML + namespace MgmtBatchXml { + + /// Adds the MgmtBatchDoc into the XML. + void MGMTTYPESXML_LINKAGE add( + const SmartPtrCMgmtBatchDoc mgmtBatchDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the MgmtBatchDoc from the XML. + SmartPtrCMgmtBatchDoc MGMTTYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtCollectInstancesCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtCollectInstancesCollectionXml.cpp new file mode 100644 index 000000000..58d2627e2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtCollectInstancesCollectionXml.cpp @@ -0,0 +1,74 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "MgmtCollectInstancesCollectionXml.h" + +using namespace Caf; + +void MgmtCollectInstancesCollectionXml::add( + const SmartPtrCMgmtCollectInstancesCollectionDoc mgmtCollectInstancesCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MgmtCollectInstancesCollectionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(mgmtCollectInstancesCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque collectInstancesVal = + mgmtCollectInstancesCollectionDoc->getCollectInstancesCollection(); + CAF_CM_VALIDATE_STL(collectInstancesVal); + + if (! collectInstancesVal.empty()) { + for (TConstIterator > collectInstancesIter(collectInstancesVal); + collectInstancesIter; collectInstancesIter++) { + const SmartPtrCXmlElement collectInstancesXml = + thisXml->createAndAddElement("collectInstances"); + MgmtCollectInstancesXml::add(*collectInstancesIter, collectInstancesXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCMgmtCollectInstancesCollectionDoc MgmtCollectInstancesCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MgmtCollectInstancesCollectionXml", "parse"); + + SmartPtrCMgmtCollectInstancesCollectionDoc mgmtCollectInstancesCollectionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection collectInstancesChildrenXml = + thisXml->findRequiredChildren("collectInstances"); + + std::deque collectInstancesVal; + if (! collectInstancesChildrenXml.IsNull() && ! collectInstancesChildrenXml->empty()) { + for (TConstIterator collectInstancesXmlIter(*collectInstancesChildrenXml); + collectInstancesXmlIter; collectInstancesXmlIter++) { + const SmartPtrCXmlElement collectInstancesXml = collectInstancesXmlIter->second; + const SmartPtrCMgmtCollectInstancesDoc collectInstancesDoc = + MgmtCollectInstancesXml::parse(collectInstancesXml); + collectInstancesVal.push_back(collectInstancesDoc); + } + } + + mgmtCollectInstancesCollectionDoc.CreateInstance(); + mgmtCollectInstancesCollectionDoc->initialize( + collectInstancesVal); + } + CAF_CM_EXIT; + + return mgmtCollectInstancesCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtCollectInstancesCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtCollectInstancesCollectionXml.h new file mode 100644 index 000000000..774a343af --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtCollectInstancesCollectionXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef MgmtCollectInstancesCollectionXml_h_ +#define MgmtCollectInstancesCollectionXml_h_ + +namespace Caf { + + /// Streams the MgmtCollectInstancesCollection class to/from XML + namespace MgmtCollectInstancesCollectionXml { + + /// Adds the MgmtCollectInstancesCollectionDoc into the XML. + void MGMTTYPESXML_LINKAGE add( + const SmartPtrCMgmtCollectInstancesCollectionDoc mgmtCollectInstancesCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the MgmtCollectInstancesCollectionDoc from the XML. + SmartPtrCMgmtCollectInstancesCollectionDoc MGMTTYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtCollectInstancesXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtCollectInstancesXml.cpp new file mode 100644 index 000000000..88cf0e1b6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtCollectInstancesXml.cpp @@ -0,0 +1,93 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "MgmtCollectInstancesXml.h" + +using namespace Caf; + +void MgmtCollectInstancesXml::add( + const SmartPtrCMgmtCollectInstancesDoc mgmtCollectInstancesDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MgmtCollectInstancesXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(mgmtCollectInstancesDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string jobIdVal = + BasePlatform::UuidToString(mgmtCollectInstancesDoc->getJobId()); + CAF_CM_VALIDATE_STRING(jobIdVal); + thisXml->addAttribute("jobId", jobIdVal); + + const SmartPtrCClassSpecifierDoc classSpecifierVal = + mgmtCollectInstancesDoc->getClassSpecifier(); + CAF_CM_VALIDATE_SMARTPTR(classSpecifierVal); + + const SmartPtrCXmlElement classSpecifierXml = + thisXml->createAndAddElement("classSpecifier"); + ClassSpecifierXml::add(classSpecifierVal, classSpecifierXml); + + const SmartPtrCParameterCollectionDoc parameterCollectionVal = + mgmtCollectInstancesDoc->getParameterCollection(); + if (! parameterCollectionVal.IsNull()) { + const SmartPtrCXmlElement parameterCollectionXml = + thisXml->createAndAddElement("parameterCollection"); + ParameterCollectionXml::add(parameterCollectionVal, parameterCollectionXml); + } + } + CAF_CM_EXIT; +} + +SmartPtrCMgmtCollectInstancesDoc MgmtCollectInstancesXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MgmtCollectInstancesXml", "parse"); + + SmartPtrCMgmtCollectInstancesDoc mgmtCollectInstancesDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string jobIdStrVal = + thisXml->findRequiredAttribute("jobId"); + UUID jobIdVal = CAFCOMMON_GUID_NULL; + if (! jobIdStrVal.empty()) { + BasePlatform::UuidFromString(jobIdStrVal.c_str(), jobIdVal); + } + + const SmartPtrCXmlElement classSpecifierXml = + thisXml->findRequiredChild("classSpecifier"); + + SmartPtrCClassSpecifierDoc classSpecifierVal; + if (! classSpecifierXml.IsNull()) { + classSpecifierVal = ClassSpecifierXml::parse(classSpecifierXml); + } + + const SmartPtrCXmlElement parameterCollectionXml = + thisXml->findOptionalChild("parameterCollection"); + + SmartPtrCParameterCollectionDoc parameterCollectionVal; + if (! parameterCollectionXml.IsNull()) { + parameterCollectionVal = ParameterCollectionXml::parse(parameterCollectionXml); + } + + mgmtCollectInstancesDoc.CreateInstance(); + mgmtCollectInstancesDoc->initialize( + jobIdVal, + classSpecifierVal, + parameterCollectionVal); + } + CAF_CM_EXIT; + + return mgmtCollectInstancesDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtCollectInstancesXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtCollectInstancesXml.h new file mode 100644 index 000000000..824034274 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtCollectInstancesXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef MgmtCollectInstancesXml_h_ +#define MgmtCollectInstancesXml_h_ + +namespace Caf { + + /// Streams the MgmtCollectInstances class to/from XML + namespace MgmtCollectInstancesXml { + + /// Adds the MgmtCollectInstancesDoc into the XML. + void MGMTTYPESXML_LINKAGE add( + const SmartPtrCMgmtCollectInstancesDoc mgmtCollectInstancesDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the MgmtCollectInstancesDoc from the XML. + SmartPtrCMgmtCollectInstancesDoc MGMTTYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtCollectSchemaXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtCollectSchemaXml.cpp new file mode 100644 index 000000000..9f1e7ce92 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtCollectSchemaXml.cpp @@ -0,0 +1,59 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "MgmtCollectSchemaXml.h" + +using namespace Caf; + +void MgmtCollectSchemaXml::add( + const SmartPtrCMgmtCollectSchemaDoc mgmtCollectSchemaDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MgmtCollectSchemaXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(mgmtCollectSchemaDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string jobIdVal = + BasePlatform::UuidToString(mgmtCollectSchemaDoc->getJobId()); + CAF_CM_VALIDATE_STRING(jobIdVal); + thisXml->addAttribute("jobId", jobIdVal); + } + CAF_CM_EXIT; +} + +SmartPtrCMgmtCollectSchemaDoc MgmtCollectSchemaXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MgmtCollectSchemaXml", "parse"); + + SmartPtrCMgmtCollectSchemaDoc mgmtCollectSchemaDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string jobIdStrVal = + thisXml->findRequiredAttribute("jobId"); + UUID jobIdVal = CAFCOMMON_GUID_NULL; + if (! jobIdStrVal.empty()) { + BasePlatform::UuidFromString(jobIdStrVal.c_str(), jobIdVal); + } + + mgmtCollectSchemaDoc.CreateInstance(); + mgmtCollectSchemaDoc->initialize( + jobIdVal); + } + CAF_CM_EXIT; + + return mgmtCollectSchemaDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtCollectSchemaXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtCollectSchemaXml.h new file mode 100644 index 000000000..652ed80ff --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtCollectSchemaXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef MgmtCollectSchemaXml_h_ +#define MgmtCollectSchemaXml_h_ + +namespace Caf { + + /// Streams the MgmtCollectSchema class to/from XML + namespace MgmtCollectSchemaXml { + + /// Adds the MgmtCollectSchemaDoc into the XML. + void MGMTTYPESXML_LINKAGE add( + const SmartPtrCMgmtCollectSchemaDoc mgmtCollectSchemaDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the MgmtCollectSchemaDoc from the XML. + SmartPtrCMgmtCollectSchemaDoc MGMTTYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtInvokeOperationCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtInvokeOperationCollectionXml.cpp new file mode 100644 index 000000000..d2239f796 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtInvokeOperationCollectionXml.cpp @@ -0,0 +1,74 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "MgmtInvokeOperationCollectionXml.h" + +using namespace Caf; + +void MgmtInvokeOperationCollectionXml::add( + const SmartPtrCMgmtInvokeOperationCollectionDoc mgmtInvokeOperationCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MgmtInvokeOperationCollectionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(mgmtInvokeOperationCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque invokeOperationVal = + mgmtInvokeOperationCollectionDoc->getInvokeOperationCollection(); + CAF_CM_VALIDATE_STL(invokeOperationVal); + + if (! invokeOperationVal.empty()) { + for (TConstIterator > invokeOperationIter(invokeOperationVal); + invokeOperationIter; invokeOperationIter++) { + const SmartPtrCXmlElement invokeOperationXml = + thisXml->createAndAddElement("invokeOperation"); + MgmtInvokeOperationXml::add(*invokeOperationIter, invokeOperationXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCMgmtInvokeOperationCollectionDoc MgmtInvokeOperationCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MgmtInvokeOperationCollectionXml", "parse"); + + SmartPtrCMgmtInvokeOperationCollectionDoc mgmtInvokeOperationCollectionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection invokeOperationChildrenXml = + thisXml->findRequiredChildren("invokeOperation"); + + std::deque invokeOperationVal; + if (! invokeOperationChildrenXml.IsNull() && ! invokeOperationChildrenXml->empty()) { + for (TConstIterator invokeOperationXmlIter(*invokeOperationChildrenXml); + invokeOperationXmlIter; invokeOperationXmlIter++) { + const SmartPtrCXmlElement invokeOperationXml = invokeOperationXmlIter->second; + const SmartPtrCMgmtInvokeOperationDoc invokeOperationDoc = + MgmtInvokeOperationXml::parse(invokeOperationXml); + invokeOperationVal.push_back(invokeOperationDoc); + } + } + + mgmtInvokeOperationCollectionDoc.CreateInstance(); + mgmtInvokeOperationCollectionDoc->initialize( + invokeOperationVal); + } + CAF_CM_EXIT; + + return mgmtInvokeOperationCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtInvokeOperationCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtInvokeOperationCollectionXml.h new file mode 100644 index 000000000..b68acf595 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtInvokeOperationCollectionXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef MgmtInvokeOperationCollectionXml_h_ +#define MgmtInvokeOperationCollectionXml_h_ + +namespace Caf { + + /// Streams the MgmtInvokeOperationCollection class to/from XML + namespace MgmtInvokeOperationCollectionXml { + + /// Adds the MgmtInvokeOperationCollectionDoc into the XML. + void MGMTTYPESXML_LINKAGE add( + const SmartPtrCMgmtInvokeOperationCollectionDoc mgmtInvokeOperationCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the MgmtInvokeOperationCollectionDoc from the XML. + SmartPtrCMgmtInvokeOperationCollectionDoc MGMTTYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtInvokeOperationXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtInvokeOperationXml.cpp new file mode 100644 index 000000000..17c458f6c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtInvokeOperationXml.cpp @@ -0,0 +1,93 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "MgmtInvokeOperationXml.h" + +using namespace Caf; + +void MgmtInvokeOperationXml::add( + const SmartPtrCMgmtInvokeOperationDoc mgmtInvokeOperationDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MgmtInvokeOperationXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(mgmtInvokeOperationDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string jobIdVal = + BasePlatform::UuidToString(mgmtInvokeOperationDoc->getJobId()); + CAF_CM_VALIDATE_STRING(jobIdVal); + thisXml->addAttribute("jobId", jobIdVal); + + const SmartPtrCClassSpecifierDoc classSpecifierVal = + mgmtInvokeOperationDoc->getClassSpecifier(); + CAF_CM_VALIDATE_SMARTPTR(classSpecifierVal); + + const SmartPtrCXmlElement classSpecifierXml = + thisXml->createAndAddElement("classSpecifier"); + ClassSpecifierXml::add(classSpecifierVal, classSpecifierXml); + + const SmartPtrCOperationDoc operationVal = + mgmtInvokeOperationDoc->getOperation(); + CAF_CM_VALIDATE_SMARTPTR(operationVal); + + const SmartPtrCXmlElement operationXml = + thisXml->createAndAddElement("operation"); + OperationXml::add(operationVal, operationXml); + } + CAF_CM_EXIT; +} + +SmartPtrCMgmtInvokeOperationDoc MgmtInvokeOperationXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MgmtInvokeOperationXml", "parse"); + + SmartPtrCMgmtInvokeOperationDoc mgmtInvokeOperationDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string jobIdStrVal = + thisXml->findRequiredAttribute("jobId"); + UUID jobIdVal = CAFCOMMON_GUID_NULL; + if (! jobIdStrVal.empty()) { + BasePlatform::UuidFromString(jobIdStrVal.c_str(), jobIdVal); + } + + const SmartPtrCXmlElement classSpecifierXml = + thisXml->findRequiredChild("classSpecifier"); + + SmartPtrCClassSpecifierDoc classSpecifierVal; + if (! classSpecifierXml.IsNull()) { + classSpecifierVal = ClassSpecifierXml::parse(classSpecifierXml); + } + + const SmartPtrCXmlElement operationXml = + thisXml->findRequiredChild("operation"); + + SmartPtrCOperationDoc operationVal; + if (! operationXml.IsNull()) { + operationVal = OperationXml::parse(operationXml); + } + + mgmtInvokeOperationDoc.CreateInstance(); + mgmtInvokeOperationDoc->initialize( + jobIdVal, + classSpecifierVal, + operationVal); + } + CAF_CM_EXIT; + + return mgmtInvokeOperationDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtInvokeOperationXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtInvokeOperationXml.h new file mode 100644 index 000000000..e3be25117 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtInvokeOperationXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef MgmtInvokeOperationXml_h_ +#define MgmtInvokeOperationXml_h_ + +namespace Caf { + + /// Streams the MgmtInvokeOperation class to/from XML + namespace MgmtInvokeOperationXml { + + /// Adds the MgmtInvokeOperationDoc into the XML. + void MGMTTYPESXML_LINKAGE add( + const SmartPtrCMgmtInvokeOperationDoc mgmtInvokeOperationDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the MgmtInvokeOperationDoc from the XML. + SmartPtrCMgmtInvokeOperationDoc MGMTTYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtTypesXmlInc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtTypesXmlInc.h new file mode 100644 index 000000000..6c3899a32 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtTypesXmlInc.h @@ -0,0 +1,24 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef MgmtTypesXml_Inc_h_ +#define MgmtTypesXml_Inc_h_ + +#include "../CafCoreTypesXml/CafCoreTypesXmlLink.h" +#include "MgmtCollectSchemaXml.h" +#include "MgmtCollectInstancesXml.h" +#include "MgmtInvokeOperationXml.h" +#include "MgmtCollectInstancesCollectionXml.h" +#include "MgmtInvokeOperationCollectionXml.h" +#include "MgmtBatchXml.h" + +#endif /* MgmtTypesXml_Inc_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtTypesXmlLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtTypesXmlLink.h new file mode 100644 index 000000000..a3b0b247b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtTypesXmlLink.h @@ -0,0 +1,30 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef MgmtTypesXml_Link_h_ +#define MgmtTypesXml_Link_h_ + +#ifndef MGMTTYPESXML_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define MGMTTYPESXML_LINKAGE __declspec(dllexport) + #else + #define MGMTTYPESXML_LINKAGE __declspec(dllimport) + #endif + #else + #define MGMTTYPESXML_LINKAGE + #endif +#endif + +#include "MgmtTypesXmlInc.h" + +#endif /* MgmtTypesXml_Link_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/stdafx.h new file mode 100644 index 000000000..c33af6db9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/stdafx.h @@ -0,0 +1,28 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define MGMTTYPESXML_LINKAGE __declspec(dllexport) +#else + #define MGMTTYPESXML_LINKAGE +#endif + +#include +#include +#include + +#include "MgmtTypesXmlInc.h" + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtBatchCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtBatchCollectionXml.cpp new file mode 100644 index 000000000..9ab76f671 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtBatchCollectionXml.cpp @@ -0,0 +1,74 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "MultiPmeMgmtBatchCollectionXml.h" + +using namespace Caf; + +void MultiPmeMgmtBatchCollectionXml::add( + const SmartPtrCMultiPmeMgmtBatchCollectionDoc multiPmeMgmtBatchCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MultiPmeMgmtBatchCollectionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(multiPmeMgmtBatchCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque multiPmeBatchVal = + multiPmeMgmtBatchCollectionDoc->getMultiPmeBatch(); + CAF_CM_VALIDATE_STL(multiPmeBatchVal); + + if (! multiPmeBatchVal.empty()) { + for (TConstIterator > multiPmeBatchIter(multiPmeBatchVal); + multiPmeBatchIter; multiPmeBatchIter++) { + const SmartPtrCXmlElement multiPmeBatchXml = + thisXml->createAndAddElement("multiPmeBatch"); + MultiPmeMgmtBatchXml::add(*multiPmeBatchIter, multiPmeBatchXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCMultiPmeMgmtBatchCollectionDoc MultiPmeMgmtBatchCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MultiPmeMgmtBatchCollectionXml", "parse"); + + SmartPtrCMultiPmeMgmtBatchCollectionDoc multiPmeMgmtBatchCollectionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection multiPmeBatchChildrenXml = + thisXml->findRequiredChildren("multiPmeBatch"); + + std::deque multiPmeBatchVal; + if (! multiPmeBatchChildrenXml.IsNull() && ! multiPmeBatchChildrenXml->empty()) { + for (TConstIterator multiPmeBatchXmlIter(*multiPmeBatchChildrenXml); + multiPmeBatchXmlIter; multiPmeBatchXmlIter++) { + const SmartPtrCXmlElement multiPmeBatchXml = multiPmeBatchXmlIter->second; + const SmartPtrCMultiPmeMgmtBatchDoc multiPmeBatchDoc = + MultiPmeMgmtBatchXml::parse(multiPmeBatchXml); + multiPmeBatchVal.push_back(multiPmeBatchDoc); + } + } + + multiPmeMgmtBatchCollectionDoc.CreateInstance(); + multiPmeMgmtBatchCollectionDoc->initialize( + multiPmeBatchVal); + } + CAF_CM_EXIT; + + return multiPmeMgmtBatchCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtBatchCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtBatchCollectionXml.h new file mode 100644 index 000000000..4a0a7f0b3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtBatchCollectionXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef MultiPmeMgmtBatchCollectionXml_h_ +#define MultiPmeMgmtBatchCollectionXml_h_ + +namespace Caf { + + /// Streams the MultiPmeMgmtBatchCollection class to/from XML + namespace MultiPmeMgmtBatchCollectionXml { + + /// Adds the MultiPmeMgmtBatchCollectionDoc into the XML. + void MULTIPMEMGMTREQUESTXML_LINKAGE add( + const SmartPtrCMultiPmeMgmtBatchCollectionDoc multiPmeMgmtBatchCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the MultiPmeMgmtBatchCollectionDoc from the XML. + SmartPtrCMultiPmeMgmtBatchCollectionDoc MULTIPMEMGMTREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtBatchXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtBatchXml.cpp new file mode 100644 index 000000000..48ddfb726 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtBatchXml.cpp @@ -0,0 +1,80 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "MultiPmeMgmtBatchXml.h" + +using namespace Caf; + +void MultiPmeMgmtBatchXml::add( + const SmartPtrCMultiPmeMgmtBatchDoc multiPmeMgmtBatchDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MultiPmeMgmtBatchXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(multiPmeMgmtBatchDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const SmartPtrCPmeIdCollectionDoc pmeIdCollectionVal = + multiPmeMgmtBatchDoc->getPmeIdCollection(); + CAF_CM_VALIDATE_SMARTPTR(pmeIdCollectionVal); + + const SmartPtrCXmlElement pmeIdCollectionXml = + thisXml->createAndAddElement("pmeIdCollection"); + PmeIdCollectionXml::add(pmeIdCollectionVal, pmeIdCollectionXml); + + const SmartPtrCMgmtBatchDoc batchVal = + multiPmeMgmtBatchDoc->getBatch(); + CAF_CM_VALIDATE_SMARTPTR(batchVal); + + const SmartPtrCXmlElement batchXml = + thisXml->createAndAddElement("batch"); + MgmtBatchXml::add(batchVal, batchXml); + } + CAF_CM_EXIT; +} + +SmartPtrCMultiPmeMgmtBatchDoc MultiPmeMgmtBatchXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MultiPmeMgmtBatchXml", "parse"); + + SmartPtrCMultiPmeMgmtBatchDoc multiPmeMgmtBatchDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const SmartPtrCXmlElement pmeIdCollectionXml = + thisXml->findRequiredChild("pmeIdCollection"); + + SmartPtrCPmeIdCollectionDoc pmeIdCollectionVal; + if (! pmeIdCollectionXml.IsNull()) { + pmeIdCollectionVal = PmeIdCollectionXml::parse(pmeIdCollectionXml); + } + + const SmartPtrCXmlElement batchXml = + thisXml->findRequiredChild("batch"); + + SmartPtrCMgmtBatchDoc batchVal; + if (! batchXml.IsNull()) { + batchVal = MgmtBatchXml::parse(batchXml); + } + + multiPmeMgmtBatchDoc.CreateInstance(); + multiPmeMgmtBatchDoc->initialize( + pmeIdCollectionVal, + batchVal); + } + CAF_CM_EXIT; + + return multiPmeMgmtBatchDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtBatchXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtBatchXml.h new file mode 100644 index 000000000..f80a7f09c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtBatchXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef MultiPmeMgmtBatchXml_h_ +#define MultiPmeMgmtBatchXml_h_ + +namespace Caf { + + /// Streams the MultiPmeMgmtBatch class to/from XML + namespace MultiPmeMgmtBatchXml { + + /// Adds the MultiPmeMgmtBatchDoc into the XML. + void MULTIPMEMGMTREQUESTXML_LINKAGE add( + const SmartPtrCMultiPmeMgmtBatchDoc multiPmeMgmtBatchDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the MultiPmeMgmtBatchDoc from the XML. + SmartPtrCMultiPmeMgmtBatchDoc MULTIPMEMGMTREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXml.cpp new file mode 100644 index 000000000..409bd165a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXml.cpp @@ -0,0 +1,106 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "MultiPmeMgmtRequestXml.h" + +using namespace Caf; + +void MultiPmeMgmtRequestXml::add( + const SmartPtrCMultiPmeMgmtRequestDoc multiPmeMgmtRequestDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MultiPmeMgmtRequestXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(multiPmeMgmtRequestDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdVal = + BasePlatform::UuidToString(multiPmeMgmtRequestDoc->getClientId()); + CAF_CM_VALIDATE_STRING(clientIdVal); + thisXml->addAttribute("clientId", clientIdVal); + + const std::string requestIdVal = + BasePlatform::UuidToString(multiPmeMgmtRequestDoc->getRequestId()); + CAF_CM_VALIDATE_STRING(requestIdVal); + thisXml->addAttribute("requestId", requestIdVal); + + const SmartPtrCRequestHeaderDoc requestHeaderVal = + multiPmeMgmtRequestDoc->getRequestHeader(); + CAF_CM_VALIDATE_SMARTPTR(requestHeaderVal); + + const SmartPtrCXmlElement requestHeaderXml = + thisXml->createAndAddElement("requestHeader"); + RequestHeaderXml::add(requestHeaderVal, requestHeaderXml); + + const SmartPtrCMultiPmeMgmtBatchCollectionDoc multiPmeBatchCollectionVal = + multiPmeMgmtRequestDoc->getMultiPmeBatchCollection(); + CAF_CM_VALIDATE_SMARTPTR(multiPmeBatchCollectionVal); + + const SmartPtrCXmlElement multiPmeBatchCollectionXml = + thisXml->createAndAddElement("multiPmeBatchCollection"); + MultiPmeMgmtBatchCollectionXml::add(multiPmeBatchCollectionVal, multiPmeBatchCollectionXml); + } + CAF_CM_EXIT; +} + +SmartPtrCMultiPmeMgmtRequestDoc MultiPmeMgmtRequestXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MultiPmeMgmtRequestXml", "parse"); + + SmartPtrCMultiPmeMgmtRequestDoc multiPmeMgmtRequestDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdStrVal = + thisXml->findRequiredAttribute("clientId"); + UUID clientIdVal = CAFCOMMON_GUID_NULL; + if (! clientIdStrVal.empty()) { + BasePlatform::UuidFromString(clientIdStrVal.c_str(), clientIdVal); + } + + const std::string requestIdStrVal = + thisXml->findRequiredAttribute("requestId"); + UUID requestIdVal = CAFCOMMON_GUID_NULL; + if (! requestIdStrVal.empty()) { + BasePlatform::UuidFromString(requestIdStrVal.c_str(), requestIdVal); + } + + const SmartPtrCXmlElement requestHeaderXml = + thisXml->findRequiredChild("requestHeader"); + + SmartPtrCRequestHeaderDoc requestHeaderVal; + if (! requestHeaderXml.IsNull()) { + requestHeaderVal = RequestHeaderXml::parse(requestHeaderXml); + } + + const SmartPtrCXmlElement multiPmeBatchCollectionXml = + thisXml->findRequiredChild("multiPmeBatchCollection"); + + SmartPtrCMultiPmeMgmtBatchCollectionDoc multiPmeBatchCollectionVal; + if (! multiPmeBatchCollectionXml.IsNull()) { + multiPmeBatchCollectionVal = MultiPmeMgmtBatchCollectionXml::parse(multiPmeBatchCollectionXml); + } + + multiPmeMgmtRequestDoc.CreateInstance(); + multiPmeMgmtRequestDoc->initialize( + clientIdVal, + requestIdVal, + requestHeaderVal, + multiPmeBatchCollectionVal); + } + CAF_CM_EXIT; + + return multiPmeMgmtRequestDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXml.h new file mode 100644 index 000000000..b5a1d53f7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef MultiPmeMgmtRequestXml_h_ +#define MultiPmeMgmtRequestXml_h_ + +namespace Caf { + + /// Streams the MultiPmeMgmtRequest class to/from XML + namespace MultiPmeMgmtRequestXml { + + /// Adds the MultiPmeMgmtRequestDoc into the XML. + void MULTIPMEMGMTREQUESTXML_LINKAGE add( + const SmartPtrCMultiPmeMgmtRequestDoc multiPmeMgmtRequestDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the MultiPmeMgmtRequestDoc from the XML. + SmartPtrCMultiPmeMgmtRequestDoc MULTIPMEMGMTREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXmlInc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXmlInc.h new file mode 100644 index 000000000..4243a3fb1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXmlInc.h @@ -0,0 +1,24 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef MultiPmeMgmtRequestXml_Inc_h_ +#define MultiPmeMgmtRequestXml_Inc_h_ + +#include "../CafCoreTypesXml/CafCoreTypesXmlLink.h" +#include "../MgmtTypesXml/MgmtTypesXmlLink.h" +#include "PmeIdCollectionXml.h" +#include "MultiPmeMgmtBatchXml.h" +#include "MultiPmeMgmtBatchCollectionXml.h" +#include "MultiPmeMgmtRequestXml.h" +#include "MultiPmeMgmtRequestXmlRoots.h" + +#endif /* MultiPmeMgmtRequestXml_Inc_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXmlLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXmlLink.h new file mode 100644 index 000000000..b2723c4c5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXmlLink.h @@ -0,0 +1,30 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef MultiPmeMgmtRequestXml_Link_h_ +#define MultiPmeMgmtRequestXml_Link_h_ + +#ifndef MULTIPMEMGMTREQUESTXML_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define MULTIPMEMGMTREQUESTXML_LINKAGE __declspec(dllexport) + #else + #define MULTIPMEMGMTREQUESTXML_LINKAGE __declspec(dllimport) + #endif + #else + #define MULTIPMEMGMTREQUESTXML_LINKAGE + #endif +#endif + +#include "MultiPmeMgmtRequestXmlInc.h" + +#endif /* MultiPmeMgmtRequestXml_Link_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXmlRoots.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXmlRoots.cpp new file mode 100644 index 000000000..84e1d3d5c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXmlRoots.cpp @@ -0,0 +1,90 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +using namespace Caf; + +std::string XmlRoots::saveMultiPmeMgmtRequestToString( + const SmartPtrCMultiPmeMgmtRequestDoc multiPmeMgmtRequestDoc) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "saveMultiPmeMgmtRequestToString"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(multiPmeMgmtRequestDoc); + + const std::string schemaNamespace = DocXmlUtils::getSchemaNamespace("fx"); + const std::string schemaLocation = DocXmlUtils::getSchemaLocation("fx/MultiPmeMgmtRequest.xsd"); + + const SmartPtrCXmlElement rootXml = CXmlUtils::createRootElement( + "multiPmeMgmtRequest", schemaNamespace, schemaLocation); + MultiPmeMgmtRequestXml::add(multiPmeMgmtRequestDoc, rootXml); + + rc = rootXml->saveToString(); + } + CAF_CM_EXIT; + + return rc; +} + +SmartPtrCMultiPmeMgmtRequestDoc XmlRoots::parseMultiPmeMgmtRequestFromString( + const std::string xml) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseMultiPmeMgmtRequestFromString"); + + SmartPtrCMultiPmeMgmtRequestDoc multiPmeMgmtRequestDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(xml); + + const SmartPtrCXmlElement rootXml = RequestXml::parseString(xml, "caf:multiPmeMgmtRequest"); + multiPmeMgmtRequestDoc = MultiPmeMgmtRequestXml::parse(rootXml); + } + CAF_CM_EXIT; + + return multiPmeMgmtRequestDoc; +} + +void XmlRoots::saveMultiPmeMgmtRequestToFile( + const SmartPtrCMultiPmeMgmtRequestDoc multiPmeMgmtRequestDoc, + const std::string filePath) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("XmlRoots", "saveMultiPmeMgmtRequestToFile"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(multiPmeMgmtRequestDoc); + CAF_CM_VALIDATE_STRING(filePath); + + CAF_CM_LOG_DEBUG_VA1("Saving to file - %s", filePath.c_str()); + + const std::string multiPmeMgmtRequestStr = + saveMultiPmeMgmtRequestToString(multiPmeMgmtRequestDoc); + FileSystemUtils::saveTextFile(filePath, multiPmeMgmtRequestStr); + } + CAF_CM_EXIT; +} + +SmartPtrCMultiPmeMgmtRequestDoc XmlRoots::parseMultiPmeMgmtRequestFromFile( + const std::string filePath) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseMultiPmeMgmtRequestFromFile"); + + SmartPtrCMultiPmeMgmtRequestDoc multiPmeMgmtRequestDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filePath); + + const SmartPtrCXmlElement rootXml = RequestXml::parseFile(filePath, "caf:multiPmeMgmtRequest"); + multiPmeMgmtRequestDoc = MultiPmeMgmtRequestXml::parse(rootXml); + } + CAF_CM_EXIT; + + return multiPmeMgmtRequestDoc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXmlRoots.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXmlRoots.h new file mode 100644 index 000000000..7b6e8a403 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXmlRoots.h @@ -0,0 +1,39 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef MultiPmeMgmtRequestXmlRoots_h_ +#define MultiPmeMgmtRequestXmlRoots_h_ + +namespace Caf { + + namespace XmlRoots { + + /// Saves the MultiPmeMgmtRequestDoc to a string. + std::string MULTIPMEMGMTREQUESTXML_LINKAGE saveMultiPmeMgmtRequestToString( + const SmartPtrCMultiPmeMgmtRequestDoc multiPmeMgmtRequestDoc); + + /// Parses the MultiPmeMgmtRequestDoc from the string. + SmartPtrCMultiPmeMgmtRequestDoc MULTIPMEMGMTREQUESTXML_LINKAGE parseMultiPmeMgmtRequestFromString( + const std::string xml); + + /// Saves the MultiPmeMgmtRequestDoc to a file. + void MULTIPMEMGMTREQUESTXML_LINKAGE saveMultiPmeMgmtRequestToFile( + const SmartPtrCMultiPmeMgmtRequestDoc multiPmeMgmtRequestDoc, + const std::string filePath); + + /// Parses the MultiPmeMgmtRequestDoc from the file. + SmartPtrCMultiPmeMgmtRequestDoc MULTIPMEMGMTREQUESTXML_LINKAGE parseMultiPmeMgmtRequestFromFile( + const std::string filePath); + } +} + +#endif /* MultiPmeMgmtRequestXmlRoots_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/PmeIdCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/PmeIdCollectionXml.cpp new file mode 100644 index 000000000..cd44f69db --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/PmeIdCollectionXml.cpp @@ -0,0 +1,75 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "PmeIdCollectionXml.h" + +using namespace Caf; + +void PmeIdCollectionXml::add( + const SmartPtrCPmeIdCollectionDoc pmeIdCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("PmeIdCollectionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(pmeIdCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque pmeIdVal = + pmeIdCollectionDoc->getPmeIdCollection(); + CAF_CM_VALIDATE_STL(pmeIdVal); + + if (! pmeIdVal.empty()) { + for (TConstIterator > pmeIdIter(pmeIdVal); + pmeIdIter; pmeIdIter++) { + const SmartPtrCXmlElement pmeIdXml = + thisXml->createAndAddElement("pmeId"); + pmeIdXml->setValue(*pmeIdIter); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCPmeIdCollectionDoc PmeIdCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("PmeIdCollectionXml", "parse"); + + SmartPtrCPmeIdCollectionDoc pmeIdCollectionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection pmeIdChildrenXml = + thisXml->findRequiredChildren("pmeId"); + + std::deque pmeIdVal; + if (! pmeIdChildrenXml.IsNull() && ! pmeIdChildrenXml->empty()) { + for (TConstIterator pmeIdXmlIter(*pmeIdChildrenXml); + pmeIdXmlIter; pmeIdXmlIter++) { + const SmartPtrCXmlElement pmeIdXml = pmeIdXmlIter->second; + + const std::string pmeIdDoc = pmeIdXml->getValue(); + + pmeIdVal.push_back(pmeIdDoc); + } + } + + pmeIdCollectionDoc.CreateInstance(); + pmeIdCollectionDoc->initialize( + pmeIdVal); + } + CAF_CM_EXIT; + + return pmeIdCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/PmeIdCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/PmeIdCollectionXml.h new file mode 100644 index 000000000..635882218 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/PmeIdCollectionXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef PmeIdCollectionXml_h_ +#define PmeIdCollectionXml_h_ + +namespace Caf { + + /// Streams the PmeIdCollection class to/from XML + namespace PmeIdCollectionXml { + + /// Adds the PmeIdCollectionDoc into the XML. + void MULTIPMEMGMTREQUESTXML_LINKAGE add( + const SmartPtrCPmeIdCollectionDoc pmeIdCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the PmeIdCollectionDoc from the XML. + SmartPtrCPmeIdCollectionDoc MULTIPMEMGMTREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/stdafx.h new file mode 100644 index 000000000..f0d58e6dd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/stdafx.h @@ -0,0 +1,28 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define MULTIPMEMGMTREQUESTXML_LINKAGE __declspec(dllexport) +#else + #define MULTIPMEMGMTREQUESTXML_LINKAGE +#endif + +#include +#include +#include + +#include "MultiPmeMgmtRequestXmlInc.h" + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXml.cpp new file mode 100644 index 000000000..fc161d6cd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXml.cpp @@ -0,0 +1,145 @@ +/* + * Author: bwilliams + * Created: July 3, 2015 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + */ + +#include "stdafx.h" +#include "PayloadEnvelopeXml.h" + +using namespace Caf; + +void PayloadEnvelopeXml::add( + const SmartPtrCPayloadEnvelopeDoc payloadEnvelopeDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("PayloadEnvelopeXml", "add"); + CAF_CM_VALIDATE_SMARTPTR(payloadEnvelopeDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdVal = + BasePlatform::UuidToString(payloadEnvelopeDoc->getClientId()); + if (! clientIdVal.empty()) { + thisXml->addAttribute("clientId", clientIdVal); + } + + const std::string requestIdVal = + BasePlatform::UuidToString(payloadEnvelopeDoc->getRequestId()); + if (! requestIdVal.empty()) { + thisXml->addAttribute("requestId", requestIdVal); + } + + const std::string pmeIdVal = payloadEnvelopeDoc->getPmeId(); + if (! pmeIdVal.empty()) { + thisXml->addAttribute("pmeId", pmeIdVal); + } + + const std::string payloadVersionVal = payloadEnvelopeDoc->getPayloadVersion(); + if (! payloadVersionVal.empty()) { + thisXml->addAttribute("payloadVersion", payloadVersionVal); + } + + const std::string payloadTypeVal = payloadEnvelopeDoc->getPayloadType(); + if (! payloadTypeVal.empty()) { + thisXml->addAttribute("payloadType", payloadTypeVal); + } + + const SmartPtrCAttachmentCollectionDoc attachmentCollectionVal = + payloadEnvelopeDoc->getAttachmentCollection(); + if (! attachmentCollectionVal.IsNull()) { + const SmartPtrCXmlElement attachmentCollectionXml = + thisXml->createAndAddElement("attachmentCollection"); + AttachmentCollectionXml::add(attachmentCollectionVal, attachmentCollectionXml); + } + + const SmartPtrCProtocolCollectionDoc protocolCollectionVal = + payloadEnvelopeDoc->getProtocolCollection(); + if (! protocolCollectionVal.IsNull()) { + const SmartPtrCXmlElement protocolCollectionXml = + thisXml->createAndAddElement("protocolCollection"); + ProtocolCollectionXml::add(protocolCollectionVal, protocolCollectionXml); + } + + const SmartPtrCPropertyCollectionDoc headerCollectionVal = + payloadEnvelopeDoc->getHeaderCollection(); + if (! headerCollectionVal.IsNull()) { + const SmartPtrCXmlElement headerCollectionXml = + thisXml->createAndAddElement("headerCollection"); + PropertyCollectionXml::add(headerCollectionVal, headerCollectionXml); + } + + const std::string versionVal = payloadEnvelopeDoc->getVersion().empty() ? "1.0" : payloadEnvelopeDoc->getVersion(); + thisXml->addAttribute("version", versionVal); +} + +SmartPtrCPayloadEnvelopeDoc PayloadEnvelopeXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("PayloadEnvelopeXml", "parse"); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdStrVal = + thisXml->findOptionalAttribute("clientId"); + UUID clientIdVal = CAFCOMMON_GUID_NULL; + if (! clientIdStrVal.empty()) { + BasePlatform::UuidFromString(clientIdStrVal.c_str(), clientIdVal); + } + + const std::string requestIdStrVal = + thisXml->findOptionalAttribute("requestId"); + UUID requestIdVal = CAFCOMMON_GUID_NULL; + if (! requestIdStrVal.empty()) { + BasePlatform::UuidFromString(requestIdStrVal.c_str(), requestIdVal); + } + + const std::string pmeIdVal = + thisXml->findOptionalAttribute("pmeId"); + + const std::string payloadTypeVal = + thisXml->findOptionalAttribute("payloadType"); + + const std::string payloadVersionVal = + thisXml->findOptionalAttribute("payloadVersion"); + + const SmartPtrCXmlElement attachmentCollectionXml = + thisXml->findOptionalChild("attachmentCollection"); + SmartPtrCAttachmentCollectionDoc attachmentCollectionVal; + if (! attachmentCollectionXml.IsNull()) { + attachmentCollectionVal = AttachmentCollectionXml::parse(attachmentCollectionXml); + } + + const SmartPtrCXmlElement protocolCollectionXml = + thisXml->findOptionalChild("protocolCollection"); + + SmartPtrCProtocolCollectionDoc protocolCollectionVal; + if (! protocolCollectionXml.IsNull()) { + protocolCollectionVal = ProtocolCollectionXml::parse(protocolCollectionXml); + } + + const SmartPtrCXmlElement headerCollectionXml = + thisXml->findOptionalChild("headerCollection"); + SmartPtrCPropertyCollectionDoc headerCollectionVal; + if (! headerCollectionXml.IsNull()) { + headerCollectionVal = PropertyCollectionXml::parse(headerCollectionXml); + } + + const std::string versionVal = + thisXml->findOptionalAttribute("version"); + + SmartPtrCPayloadEnvelopeDoc payloadEnvelopeDoc; + payloadEnvelopeDoc.CreateInstance(); + payloadEnvelopeDoc->initialize( + clientIdVal, + requestIdVal, + pmeIdVal, + payloadTypeVal, + payloadVersionVal, + attachmentCollectionVal, + protocolCollectionVal, + headerCollectionVal, + versionVal); + + return payloadEnvelopeDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXml.h new file mode 100644 index 000000000..ab4d365f8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: July 3, 2015 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef PayloadEnvelopeXml_h_ +#define PayloadEnvelopeXml_h_ + +namespace Caf { + + /// Streams the PayloadEnvelope class to/from XML + namespace PayloadEnvelopeXml { + + /// Adds the PayloadEnvelopeDoc into the XML. + void PAYLOADENVELOPEXML_LINKAGE add( + const SmartPtrCPayloadEnvelopeDoc payloadEnvelopeDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the PayloadEnvelopeDoc from the XML. + SmartPtrCPayloadEnvelopeDoc PAYLOADENVELOPEXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXmlInc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXmlInc.h new file mode 100644 index 000000000..6e35bd7d6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXmlInc.h @@ -0,0 +1,20 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef PayloadEnvelopeXml_Inc_h_ +#define PayloadEnvelopeXml_Inc_h_ + +#include "../CafCoreTypesXml/CafCoreTypesXmlLink.h" +#include "PayloadEnvelopeXml.h" +#include "PayloadEnvelopeXmlRoots.h" + +#endif /* PayloadEnvelopeXml_Inc_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXmlLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXmlLink.h new file mode 100644 index 000000000..82568b5fb --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXmlLink.h @@ -0,0 +1,30 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef PayloadEnvelopeXml_Link_h_ +#define PayloadEnvelopeXml_Link_h_ + +#ifndef PAYLOADENVELOPEXML_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define PAYLOADENVELOPEXML_LINKAGE __declspec(dllexport) + #else + #define PAYLOADENVELOPEXML_LINKAGE __declspec(dllimport) + #endif + #else + #define PAYLOADENVELOPEXML_LINKAGE + #endif +#endif + +#include "PayloadEnvelopeXmlInc.h" + +#endif /* PayloadEnvelopeXml_Link_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXmlRoots.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXmlRoots.cpp new file mode 100644 index 000000000..ea0de4d4d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXmlRoots.cpp @@ -0,0 +1,62 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +using namespace Caf; + +std::string XmlRoots::savePayloadEnvelopeToString( + const SmartPtrCPayloadEnvelopeDoc payloadEnvelopeDoc) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "savePayloadEnvelopeToString"); + CAF_CM_VALIDATE_SMARTPTR(payloadEnvelopeDoc); + + const std::string schemaNamespace = DocXmlUtils::getSchemaNamespace("fx"); + const std::string schemaLocation = DocXmlUtils::getSchemaLocation("fx/PayloadEnvelope.xsd"); + + const SmartPtrCXmlElement rootXml = CXmlUtils::createRootElement( + "payloadEnvelope", schemaNamespace, schemaLocation); + PayloadEnvelopeXml::add(payloadEnvelopeDoc, rootXml); + + return rootXml->saveToString(); +} + +SmartPtrCPayloadEnvelopeDoc XmlRoots::parsePayloadEnvelopeFromString( + const std::string xml) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parsePayloadEnvelopeFromString"); + CAF_CM_VALIDATE_STRING(xml); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseString(xml, "caf:payloadEnvelope"); + return PayloadEnvelopeXml::parse(rootXml); +} + +void XmlRoots::savePayloadEnvelopeToFile( + const SmartPtrCPayloadEnvelopeDoc payloadEnvelopeDoc, + const std::string filePath) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("XmlRoots", "savePayloadEnvelopeToFile"); + CAF_CM_VALIDATE_SMARTPTR(payloadEnvelopeDoc); + CAF_CM_VALIDATE_STRING(filePath); + + CAF_CM_LOG_DEBUG_VA1("Saving to file - %s", filePath.c_str()); + + const std::string payloadEnvelopeStr = + savePayloadEnvelopeToString(payloadEnvelopeDoc); + FileSystemUtils::saveTextFile(filePath, payloadEnvelopeStr); +} + +SmartPtrCPayloadEnvelopeDoc XmlRoots::parsePayloadEnvelopeFromFile( + const std::string filePath) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parsePayloadEnvelopeFromFile"); + CAF_CM_VALIDATE_STRING(filePath); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseFile(filePath, "caf:payloadEnvelope"); + return PayloadEnvelopeXml::parse(rootXml); +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXmlRoots.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXmlRoots.h new file mode 100644 index 000000000..5db4357eb --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXmlRoots.h @@ -0,0 +1,38 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef PayloadEnvelopeXmlRoots_h_ +#define PayloadEnvelopeXmlRoots_h_ + +namespace Caf { + + namespace XmlRoots { + /// Saves the PayloadEnvelopeDoc to a string. + std::string PAYLOADENVELOPEXML_LINKAGE savePayloadEnvelopeToString( + const SmartPtrCPayloadEnvelopeDoc payloadEnvelopeDoc); + + /// Parses the PayloadEnvelopeDoc from the string. + SmartPtrCPayloadEnvelopeDoc PAYLOADENVELOPEXML_LINKAGE parsePayloadEnvelopeFromString( + const std::string xml); + + /// Saves the PayloadEnvelopeDoc to a file. + void PAYLOADENVELOPEXML_LINKAGE savePayloadEnvelopeToFile( + const SmartPtrCPayloadEnvelopeDoc payloadEnvelopeDoc, + const std::string filePath); + + /// Parses the PayloadEnvelopeDoc from the file. + SmartPtrCPayloadEnvelopeDoc PAYLOADENVELOPEXML_LINKAGE parsePayloadEnvelopeFromFile( + const std::string filePath); + } +} + +#endif /* PayloadEnvelopeXmlRoots_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PayloadEnvelopeXml/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PayloadEnvelopeXml/stdafx.h new file mode 100644 index 000000000..79b4a5ccc --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PayloadEnvelopeXml/stdafx.h @@ -0,0 +1,28 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define PAYLOADENVELOPEXML_LINKAGE __declspec(dllexport) +#else + #define PAYLOADENVELOPEXML_LINKAGE +#endif + +#include +#include +#include + +#include "PayloadEnvelopeXmlInc.h" + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/AmqpBrokerCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/AmqpBrokerCollectionXml.cpp new file mode 100644 index 000000000..680e9ab55 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/AmqpBrokerCollectionXml.cpp @@ -0,0 +1,60 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (c) 2015 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + */ + +#include "stdafx.h" +#include "AmqpBrokerCollectionXml.h" + +using namespace Caf; + +void AmqpBrokerCollectionXml::add( + const SmartPtrCAmqpBrokerCollectionDoc amqpBrokerCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpBrokerCollectionXml", "add"); + CAF_CM_VALIDATE_SMARTPTR(amqpBrokerCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque amqpBrokerVal = + amqpBrokerCollectionDoc->getAmqpBroker(); + + if (! amqpBrokerVal.empty()) { + for (TConstIterator > amqpBrokerIter(amqpBrokerVal); + amqpBrokerIter; amqpBrokerIter++) { + const SmartPtrCXmlElement amqpBrokerXml = + thisXml->createAndAddElement("amqpBroker"); + AmqpBrokerXml::add(*amqpBrokerIter, amqpBrokerXml); + } + } +} + +SmartPtrCAmqpBrokerCollectionDoc AmqpBrokerCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpBrokerCollectionXml", "parse"); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection amqpBrokerChildrenXml = + thisXml->findOptionalChildren("amqpBroker"); + + std::deque amqpBrokerVal; + if (! amqpBrokerChildrenXml.IsNull() && ! amqpBrokerChildrenXml->empty()) { + for (TConstIterator amqpBrokerXmlIter(*amqpBrokerChildrenXml); + amqpBrokerXmlIter; amqpBrokerXmlIter++) { + const SmartPtrCXmlElement amqpBrokerXml = amqpBrokerXmlIter->second; + const SmartPtrCAmqpBrokerDoc amqpBrokerDoc = + AmqpBrokerXml::parse(amqpBrokerXml); + amqpBrokerVal.push_back(amqpBrokerDoc); + } + } + + SmartPtrCAmqpBrokerCollectionDoc amqpBrokerCollectionDoc; + amqpBrokerCollectionDoc.CreateInstance(); + amqpBrokerCollectionDoc->initialize(amqpBrokerVal); + + return amqpBrokerCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/AmqpBrokerCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/AmqpBrokerCollectionXml.h new file mode 100644 index 000000000..0fc2fe3e7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/AmqpBrokerCollectionXml.h @@ -0,0 +1,29 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (c) 2015 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + */ + +#ifndef AmqpBrokerCollectionXml_h_ +#define AmqpBrokerCollectionXml_h_ + +namespace Caf { + + /// Streams the AmqpBrokerCollection class to/from XML + namespace AmqpBrokerCollectionXml { + + /// Adds the AmqpBrokerCollectionDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCAmqpBrokerCollectionDoc amqpBrokerCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the AmqpBrokerCollectionDoc from the XML. + SmartPtrCAmqpBrokerCollectionDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/AmqpBrokerXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/AmqpBrokerXml.cpp new file mode 100644 index 000000000..b35b511cd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/AmqpBrokerXml.cpp @@ -0,0 +1,144 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (c) 2015 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + */ + +#include "stdafx.h" +#include "AmqpBrokerXml.h" + +using namespace Caf; + +void AmqpBrokerXml::add( + const SmartPtrCAmqpBrokerDoc amqpBrokerDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpBrokerXml", "add"); + CAF_CM_VALIDATE_SMARTPTR(amqpBrokerDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string amqpBrokerIdVal = amqpBrokerDoc->getAmqpBrokerId(); + if (! amqpBrokerIdVal.empty()) { + thisXml->addAttribute("amqpBrokerId", amqpBrokerIdVal); + } + + const std::string uriVal = amqpBrokerDoc->getUri(); + if (! uriVal.empty()) { + thisXml->addAttribute("uri", uriVal); + } + + const std::string tlsCertVal = amqpBrokerDoc->getTlsCert(); + if (! tlsCertVal.empty()) { + const SmartPtrCXmlElement tlsCertXml = thisXml->createAndAddElement("tlsCert"); + tlsCertXml->setValue(tlsCertVal); + } + + const std::string tlsProtocolVal = amqpBrokerDoc->getTlsProtocol(); + if (! tlsProtocolVal.empty()) { + thisXml->addAttribute("tlsProtocol", tlsProtocolVal); + } + + const Cdeqstr tlsCipherCollectionVal = amqpBrokerDoc->getTlsCipherCollection(); + if (! tlsCipherCollectionVal.empty()) { + const SmartPtrCXmlElement tlsCipherCollectionXml = + thisXml->createAndAddElement("tlsCipherCollection"); + for (TConstIterator > valueIter(tlsCipherCollectionVal); + valueIter; valueIter++) { + const SmartPtrCXmlElement valueXml = + tlsCipherCollectionXml->createAndAddElement("cipher"); + valueXml->setValue(*valueIter); + } + } + + const SmartPtrCCertCollectionDoc tlsCertCollectionVal = + amqpBrokerDoc->getTlsCertCollection(); + if (! tlsCertCollectionVal.IsNull()) { + const SmartPtrCXmlElement tlsCertCollectionXml = + thisXml->createAndAddElement("tlsCertCollection"); + CertCollectionXml::add(tlsCertCollectionVal, tlsCertCollectionXml); + } + + const std::string tlsCertPathVal = amqpBrokerDoc->getTlsCertPath(); + if (! tlsCertPathVal.empty()) { + thisXml->addAttribute("tlsCertPath", tlsCertPathVal); + } + + const SmartPtrCCertPathCollectionDoc tlsCertPathCollectionVal = + amqpBrokerDoc->getTlsCertPathCollection(); + if (! tlsCertPathCollectionVal.IsNull()) { + const SmartPtrCXmlElement tlsCertPathCollectionXml = + thisXml->createAndAddElement("tlsCertPathCollection"); + CertPathCollectionXml::add(tlsCertPathCollectionVal, tlsCertPathCollectionXml); + } +} + +SmartPtrCAmqpBrokerDoc AmqpBrokerXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpBrokerXml", "parse"); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string amqpBrokerIdVal = + thisXml->findOptionalAttribute("amqpBrokerId"); + + const std::string uriVal = + thisXml->findOptionalAttribute("uri"); + + std::string tlsCertVal; + const SmartPtrCXmlElement tlsCertXml = thisXml->findOptionalChild("tlsCert"); + if (tlsCertXml) { + tlsCertVal = tlsCertXml->getValue(); + } + + const std::string tlsProtocolVal = + thisXml->findOptionalAttribute("tlsProtocol"); + + const SmartPtrCXmlElement tlsCipherCollectionXml = + thisXml->findOptionalChild("tlsCipherCollection"); + std::deque tlsCipherCollectionVal; + if (! tlsCipherCollectionXml.IsNull()) { + const CXmlElement::SmartPtrCElementCollection valueCollectionXml = + tlsCipherCollectionXml->findOptionalChildren("cipher"); + if (! valueCollectionXml.IsNull() && ! valueCollectionXml->empty()) { + for (TConstIterator valueXmlIter(*valueCollectionXml); + valueXmlIter; valueXmlIter++) { + const SmartPtrCXmlElement valueXml = valueXmlIter->second; + const std::string valueDoc = valueXml->getValue(); + tlsCipherCollectionVal.push_back(valueDoc); + } + } + } + + const SmartPtrCXmlElement tlsCertCollectionXml = + thisXml->findOptionalChild("tlsCertCollection"); + SmartPtrCCertCollectionDoc tlsCertCollectionVal; + if (! tlsCertCollectionXml.IsNull()) { + tlsCertCollectionVal = CertCollectionXml::parse(tlsCertCollectionXml); + } + + const std::string tlsCertPathVal = + thisXml->findOptionalAttribute("tlsCertPath"); + + const SmartPtrCXmlElement tlsCertPathCollectionXml = + thisXml->findOptionalChild("tlsCertPathCollection"); + SmartPtrCCertPathCollectionDoc tlsCertPathCollectionVal; + if (! tlsCertPathCollectionXml.IsNull()) { + tlsCertPathCollectionVal = CertPathCollectionXml::parse(tlsCertPathCollectionXml); + } + + SmartPtrCAmqpBrokerDoc amqpBrokerDoc; + amqpBrokerDoc.CreateInstance(); + amqpBrokerDoc->initialize( + amqpBrokerIdVal, + uriVal, + tlsCertVal, + tlsProtocolVal, + tlsCipherCollectionVal, + tlsCertCollectionVal, + tlsCertPathVal, + tlsCertPathCollectionVal); + + return amqpBrokerDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/AmqpBrokerXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/AmqpBrokerXml.h new file mode 100644 index 000000000..c2c45dd29 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/AmqpBrokerXml.h @@ -0,0 +1,29 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (c) 2015 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + */ + +#ifndef AmqpBrokerXml_h_ +#define AmqpBrokerXml_h_ + +namespace Caf { + + /// Streams the AmqpBroker class to/from XML + namespace AmqpBrokerXml { + + /// Adds the AmqpBrokerDoc into the XML. + void PERSISTENCEXML_LINKAGE add( + const SmartPtrCAmqpBrokerDoc amqpBrokerDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the AmqpBrokerDoc from the XML. + SmartPtrCAmqpBrokerDoc PERSISTENCEXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/CertCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/CertCollectionXml.cpp new file mode 100644 index 000000000..a6e084911 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/CertCollectionXml.cpp @@ -0,0 +1,59 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (c) 2015 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + */ + +#include "stdafx.h" +#include "CertCollectionXml.h" + +using namespace Caf; + +void CertCollectionXml::add( + const SmartPtrCCertCollectionDoc certCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("CertCollectionXml", "add"); + CAF_CM_VALIDATE_SMARTPTR(certCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque certVal = + certCollectionDoc->getCert(); + + if (! certVal.empty()) { + for (TConstIterator > certIter(certVal); + certIter; certIter++) { + const SmartPtrCXmlElement certXml = + thisXml->createAndAddElement("cert"); + certXml->setValue(*certIter); + } + } +} + +SmartPtrCCertCollectionDoc CertCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("CertCollectionXml", "parse"); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection certChildrenXml = + thisXml->findOptionalChildren("cert"); + + std::deque certVal; + if (! certChildrenXml.IsNull() && ! certChildrenXml->empty()) { + for (TConstIterator certXmlIter(*certChildrenXml); + certXmlIter; certXmlIter++) { + const SmartPtrCXmlElement certXml = certXmlIter->second; + const std::string certDoc = certXml->getValue(); + certVal.push_back(certDoc); + } + } + + SmartPtrCCertCollectionDoc certCollectionDoc; + certCollectionDoc.CreateInstance(); + certCollectionDoc->initialize(certVal); + + return certCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/CertCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/CertCollectionXml.h new file mode 100644 index 000000000..878d72e81 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/CertCollectionXml.h @@ -0,0 +1,29 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (c) 2015 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + */ + +#ifndef CertCollectionXml_h_ +#define CertCollectionXml_h_ + +namespace Caf { + + /// Streams the CertCollection class to/from XML + namespace CertCollectionXml { + + /// Adds the CertCollectionDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCCertCollectionDoc certCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the CertCollectionDoc from the XML. + SmartPtrCCertCollectionDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/CertPathCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/CertPathCollectionXml.cpp new file mode 100644 index 000000000..c5f91dfd3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/CertPathCollectionXml.cpp @@ -0,0 +1,59 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (c) 2015 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + */ + +#include "stdafx.h" +#include "CertPathCollectionXml.h" + +using namespace Caf; + +void CertPathCollectionXml::add( + const SmartPtrCCertPathCollectionDoc certPathCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("CertPathCollectionXml", "add"); + CAF_CM_VALIDATE_SMARTPTR(certPathCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque certPathVal = + certPathCollectionDoc->getCertPath(); + + if (! certPathVal.empty()) { + for (TConstIterator > certPathIter(certPathVal); + certPathIter; certPathIter++) { + const SmartPtrCXmlElement certPathXml = + thisXml->createAndAddElement("certPath"); + certPathXml->setValue(*certPathIter); + } + } +} + +SmartPtrCCertPathCollectionDoc CertPathCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("CertPathCollectionXml", "parse"); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection certPathChildrenXml = + thisXml->findOptionalChildren("certPath"); + + std::deque certPathVal; + if (! certPathChildrenXml.IsNull() && ! certPathChildrenXml->empty()) { + for (TConstIterator certPathXmlIter(*certPathChildrenXml); + certPathXmlIter; certPathXmlIter++) { + const SmartPtrCXmlElement certPathXml = certPathXmlIter->second; + const std::string certPathDoc = certPathXml->getValue(); + certPathVal.push_back(certPathDoc); + } + } + + SmartPtrCCertPathCollectionDoc certPathCollectionDoc; + certPathCollectionDoc.CreateInstance(); + certPathCollectionDoc->initialize(certPathVal); + + return certPathCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/CertPathCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/CertPathCollectionXml.h new file mode 100644 index 000000000..7a1b1c503 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/CertPathCollectionXml.h @@ -0,0 +1,29 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (c) 2015 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + */ + +#ifndef CertPathCollectionXml_h_ +#define CertPathCollectionXml_h_ + +namespace Caf { + + /// Streams the CertPathCollection class to/from XML + namespace CertPathCollectionXml { + + /// Adds the CertPathCollectionDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCCertPathCollectionDoc certPathCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the CertPathCollectionDoc from the XML. + SmartPtrCCertPathCollectionDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/LocalSecurityXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/LocalSecurityXml.cpp new file mode 100644 index 000000000..036d9e7ef --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/LocalSecurityXml.cpp @@ -0,0 +1,83 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (c) 2015 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + */ + +#include "stdafx.h" +#include "LocalSecurityXml.h" + +using namespace Caf; + +void LocalSecurityXml::add( + const SmartPtrCLocalSecurityDoc localSecurityDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("LocalSecurityXml", "add"); + CAF_CM_VALIDATE_SMARTPTR(localSecurityDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string localIdVal = localSecurityDoc->getLocalId(); + if (! localIdVal.empty()) { + thisXml->addAttribute("localId", localIdVal); + } + + const std::string privateKeyVal = localSecurityDoc->getPrivateKey(); + if (! privateKeyVal.empty()) { + const SmartPtrCXmlElement privateKeyXml = thisXml->createAndAddElement("privateKey"); + privateKeyXml->setValue(privateKeyVal); + } + + const std::string certVal = localSecurityDoc->getCert(); + if (! certVal.empty()) { + const SmartPtrCXmlElement certXml = thisXml->createAndAddElement("cert"); + certXml->setValue(certVal); + } + + const std::string privateKeyPathVal = localSecurityDoc->getPrivateKeyPath(); + if (! privateKeyPathVal.empty()) { + thisXml->addAttribute("privateKeyPath", privateKeyPathVal); + } + + const std::string certPathVal = localSecurityDoc->getCertPath(); + if (! certPathVal.empty()) { + thisXml->addAttribute("certPath", certPathVal); + } +} + +SmartPtrCLocalSecurityDoc LocalSecurityXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("LocalSecurityXml", "parse"); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string localIdVal = thisXml->findOptionalAttribute("localId"); + + std::string privateKeyVal; + const SmartPtrCXmlElement privateKeyXml = thisXml->findOptionalChild("privateKey"); + if (privateKeyXml) { + privateKeyVal = privateKeyXml->getValue(); + } + + std::string certVal; + const SmartPtrCXmlElement certXml = thisXml->findOptionalChild("cert"); + if (certXml) { + certVal = certXml->getValue(); + } + + const std::string privateKeyPathVal = thisXml->findOptionalAttribute("privateKeyPath"); + const std::string certPathVal = thisXml->findOptionalAttribute("certPath"); + + SmartPtrCLocalSecurityDoc localSecurityDoc; + localSecurityDoc.CreateInstance(); + localSecurityDoc->initialize( + localIdVal, + privateKeyVal, + certVal, + privateKeyPathVal, + certPathVal); + + return localSecurityDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/LocalSecurityXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/LocalSecurityXml.h new file mode 100644 index 000000000..ed8781f66 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/LocalSecurityXml.h @@ -0,0 +1,29 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (c) 2015 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + */ + +#ifndef LocalSecurityXml_h_ +#define LocalSecurityXml_h_ + +namespace Caf { + + /// Streams the LocalSecurity class to/from XML + namespace LocalSecurityXml { + + /// Adds the LocalSecurityDoc into the XML. + void PERSISTENCEXML_LINKAGE add( + const SmartPtrCLocalSecurityDoc localSecurityDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the LocalSecurityDoc from the XML. + SmartPtrCLocalSecurityDoc PERSISTENCEXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/PersistenceProtocolXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/PersistenceProtocolXml.cpp new file mode 100644 index 000000000..ade7759fb --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/PersistenceProtocolXml.cpp @@ -0,0 +1,50 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (c) 2015 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + */ + +#include "stdafx.h" +#include "PersistenceProtocolXml.h" + +using namespace Caf; + +void PersistenceProtocolXml::add( + const SmartPtrCPersistenceProtocolDoc persistenceProtocolDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("PersistenceProtocolXml", "add"); + CAF_CM_VALIDATE_SMARTPTR(persistenceProtocolDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const SmartPtrCAmqpBrokerCollectionDoc amqpBrokerCollectionVal = + persistenceProtocolDoc->getAmqpBrokerCollection(); + if (! amqpBrokerCollectionVal.IsNull()) { + const SmartPtrCXmlElement amqpBrokerCollectionXml = + thisXml->createAndAddElement("amqpBrokerCollection"); + AmqpBrokerCollectionXml::add(amqpBrokerCollectionVal, amqpBrokerCollectionXml); + } +} + +SmartPtrCPersistenceProtocolDoc PersistenceProtocolXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("PersistenceProtocolXml", "parse"); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const SmartPtrCXmlElement amqpBrokerCollectionXml = + thisXml->findOptionalChild("amqpBrokerCollection"); + SmartPtrCAmqpBrokerCollectionDoc amqpBrokerCollectionVal; + if (! amqpBrokerCollectionXml.IsNull()) { + amqpBrokerCollectionVal = AmqpBrokerCollectionXml::parse(amqpBrokerCollectionXml); + } + + SmartPtrCPersistenceProtocolDoc persistenceProtocolDoc; + persistenceProtocolDoc.CreateInstance(); + persistenceProtocolDoc->initialize( + amqpBrokerCollectionVal); + + return persistenceProtocolDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/PersistenceProtocolXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/PersistenceProtocolXml.h new file mode 100644 index 000000000..369d459d3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/PersistenceProtocolXml.h @@ -0,0 +1,29 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (c) 2015 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + */ + +#ifndef PersistenceProtocolXml_h_ +#define PersistenceProtocolXml_h_ + +namespace Caf { + + /// Streams the PersistenceProtocol class to/from XML + namespace PersistenceProtocolXml { + + /// Adds the PersistenceProtocolDoc into the XML. + void PERSISTENCEXML_LINKAGE add( + const SmartPtrCPersistenceProtocolDoc persistenceProtocolDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the PersistenceProtocolDoc from the XML. + SmartPtrCPersistenceProtocolDoc PERSISTENCEXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/PersistenceXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/PersistenceXml.cpp new file mode 100644 index 000000000..8106c04e8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/PersistenceXml.cpp @@ -0,0 +1,89 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (c) 2015 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + */ + +#include "stdafx.h" +#include "PersistenceXml.h" + +using namespace Caf; + +void PersistenceXml::add( + const SmartPtrCPersistenceDoc persistenceDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("PersistenceXml", "add"); + CAF_CM_VALIDATE_SMARTPTR(persistenceDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const SmartPtrCLocalSecurityDoc localSecurityVal = + persistenceDoc->getLocalSecurity(); + if (! localSecurityVal.IsNull()) { + const SmartPtrCXmlElement localSecurityXml = + thisXml->createAndAddElement("localSecurity"); + LocalSecurityXml::add(localSecurityVal, localSecurityXml); + } + + const SmartPtrCRemoteSecurityCollectionDoc remoteSecurityCollectionVal = + persistenceDoc->getRemoteSecurityCollection(); + if (! remoteSecurityCollectionVal.IsNull()) { + const SmartPtrCXmlElement remoteSecurityCollectionXml = + thisXml->createAndAddElement("remoteSecurityCollection"); + RemoteSecurityCollectionXml::add(remoteSecurityCollectionVal, remoteSecurityCollectionXml); + } + + const SmartPtrCPersistenceProtocolDoc persistenceProtocolVal = + persistenceDoc->getPersistenceProtocol(); + if (! persistenceProtocolVal.IsNull()) { + const SmartPtrCXmlElement persistenceProtocolXml = + thisXml->createAndAddElement("persistenceProtocol"); + PersistenceProtocolXml::add(persistenceProtocolVal, persistenceProtocolXml); + } + + const std::string versionVal = persistenceDoc->getVersion().empty() ? "1.0" : persistenceDoc->getVersion(); + thisXml->addAttribute("version", versionVal); +} + +SmartPtrCPersistenceDoc PersistenceXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("PersistenceXml", "parse"); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const SmartPtrCXmlElement localSecurityXml = + thisXml->findOptionalChild("localSecurity"); + SmartPtrCLocalSecurityDoc localSecurityVal; + if (! localSecurityXml.IsNull()) { + localSecurityVal = LocalSecurityXml::parse(localSecurityXml); + } + + const SmartPtrCXmlElement remoteSecurityCollectionXml = + thisXml->findOptionalChild("remoteSecurityCollection"); + SmartPtrCRemoteSecurityCollectionDoc remoteSecurityCollectionVal; + if (! remoteSecurityCollectionXml.IsNull()) { + remoteSecurityCollectionVal = RemoteSecurityCollectionXml::parse(remoteSecurityCollectionXml); + } + + const SmartPtrCXmlElement persistenceProtocolXml = + thisXml->findOptionalChild("persistenceProtocol"); + SmartPtrCPersistenceProtocolDoc persistenceProtocolVal; + if (! persistenceProtocolXml.IsNull()) { + persistenceProtocolVal = PersistenceProtocolXml::parse(persistenceProtocolXml); + } + + const std::string versionVal = + thisXml->findOptionalAttribute("version"); + + SmartPtrCPersistenceDoc persistenceDoc; + persistenceDoc.CreateInstance(); + persistenceDoc->initialize( + localSecurityVal, + remoteSecurityCollectionVal, + persistenceProtocolVal, + versionVal); + + return persistenceDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/PersistenceXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/PersistenceXml.h new file mode 100644 index 000000000..585cf9cdd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/PersistenceXml.h @@ -0,0 +1,29 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (c) 2015 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + */ + +#ifndef PersistenceXml_h_ +#define PersistenceXml_h_ + +namespace Caf { + + /// Streams the Persistence class to/from XML + namespace PersistenceXml { + + /// Adds the PersistenceDoc into the XML. + void PERSISTENCEXML_LINKAGE add( + const SmartPtrCPersistenceDoc persistenceDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the PersistenceDoc from the XML. + SmartPtrCPersistenceDoc PERSISTENCEXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/PersistenceXmlInc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/PersistenceXmlInc.h new file mode 100644 index 000000000..064c499a9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/PersistenceXmlInc.h @@ -0,0 +1,26 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (c) 2015 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + */ + +#ifndef PersistenceXml_Inc_h_ +#define PersistenceXml_Inc_h_ + +#include "../CafCoreTypesXml/CafCoreTypesXmlLink.h" + +#include "CertCollectionXml.h" +#include "CertPathCollectionXml.h" +#include "AmqpBrokerXml.h" +#include "AmqpBrokerCollectionXml.h" +#include "RemoteSecurityXml.h" +#include "RemoteSecurityCollectionXml.h" +#include "LocalSecurityXml.h" +#include "PersistenceProtocolXml.h" +#include "PersistenceXml.h" +#include "PersistenceXmlRoots.h" + +#endif /* PersistenceXml_Inc_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/PersistenceXmlLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/PersistenceXmlLink.h new file mode 100644 index 000000000..4dbfbec54 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/PersistenceXmlLink.h @@ -0,0 +1,27 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (c) 2015 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + */ + +#ifndef PersistenceXml_Link_h_ +#define PersistenceXml_Link_h_ + +#ifndef PERSISTENCEXML_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define PERSISTENCEXML_LINKAGE __declspec(dllexport) + #else + #define PERSISTENCEXML_LINKAGE __declspec(dllimport) + #endif + #else + #define PERSISTENCEXML_LINKAGE + #endif +#endif + +#include "PersistenceXmlInc.h" + +#endif /* PersistenceXml_Link_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/PersistenceXmlRoots.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/PersistenceXmlRoots.cpp new file mode 100644 index 000000000..1f70411e9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/PersistenceXmlRoots.cpp @@ -0,0 +1,59 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (c) 2015 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + */ + +#include "stdafx.h" + +using namespace Caf; + +std::string XmlRoots::savePersistenceToString( + const SmartPtrCPersistenceDoc persistenceDoc) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "savePersistenceToString"); + CAF_CM_VALIDATE_SMARTPTR(persistenceDoc); + + const std::string schemaNamespace = DocXmlUtils::getSchemaNamespace("fx"); + const std::string schemaLocation = DocXmlUtils::getSchemaLocation("fx/Persistence.xsd"); + + const SmartPtrCXmlElement rootXml = CXmlUtils::createRootElement( + "persistence", schemaNamespace, schemaLocation); + PersistenceXml::add(persistenceDoc, rootXml); + + return rootXml->saveToString(); +} + +SmartPtrCPersistenceDoc XmlRoots::parsePersistenceFromString( + const std::string xml) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parsePersistenceFromString"); + CAF_CM_VALIDATE_STRING(xml); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseString(xml, "caf:persistence"); + return PersistenceXml::parse(rootXml); +} + +void XmlRoots::savePersistenceToFile( + const SmartPtrCPersistenceDoc persistenceDoc, + const std::string filePath) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("XmlRoots", "savePersistenceToFile"); + CAF_CM_VALIDATE_SMARTPTR(persistenceDoc); + CAF_CM_VALIDATE_STRING(filePath); + + CAF_CM_LOG_DEBUG_VA1("Saving to file - %s", filePath.c_str()); + + const std::string persistenceStr = + savePersistenceToString(persistenceDoc); + FileSystemUtils::saveTextFile(filePath, persistenceStr); +} + +SmartPtrCPersistenceDoc XmlRoots::parsePersistenceFromFile( + const std::string filePath) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parsePersistenceFromFile"); + CAF_CM_VALIDATE_STRING(filePath); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseFile(filePath, "caf:persistence"); + return PersistenceXml::parse(rootXml); +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/PersistenceXmlRoots.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/PersistenceXmlRoots.h new file mode 100644 index 000000000..044537e87 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/PersistenceXmlRoots.h @@ -0,0 +1,35 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (c) 2015 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + */ + +#ifndef PersistenceXmlRoots_h_ +#define PersistenceXmlRoots_h_ + +namespace Caf { + + namespace XmlRoots { + /// Saves the PersistenceDoc to a string. + std::string PERSISTENCEXML_LINKAGE savePersistenceToString( + const SmartPtrCPersistenceDoc persistenceDoc); + + /// Parses the PersistenceDoc from the string. + SmartPtrCPersistenceDoc PERSISTENCEXML_LINKAGE parsePersistenceFromString( + const std::string xml); + + /// Saves the PersistenceDoc to a file. + void PERSISTENCEXML_LINKAGE savePersistenceToFile( + const SmartPtrCPersistenceDoc persistenceDoc, + const std::string filePath); + + /// Parses the PersistenceDoc from the file. + SmartPtrCPersistenceDoc PERSISTENCEXML_LINKAGE parsePersistenceFromFile( + const std::string filePath); + } +} + +#endif /* PersistenceXmlRoots_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/RemoteSecurityCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/RemoteSecurityCollectionXml.cpp new file mode 100644 index 000000000..b4b3edf31 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/RemoteSecurityCollectionXml.cpp @@ -0,0 +1,60 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (c) 2015 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + */ + +#include "stdafx.h" +#include "RemoteSecurityCollectionXml.h" + +using namespace Caf; + +void RemoteSecurityCollectionXml::add( + const SmartPtrCRemoteSecurityCollectionDoc remoteSecurityCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("RemoteSecurityCollectionXml", "add"); + CAF_CM_VALIDATE_SMARTPTR(remoteSecurityCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque remoteSecurityVal = + remoteSecurityCollectionDoc->getRemoteSecurity(); + if (! remoteSecurityVal.empty()) { + for (TConstIterator > remoteSecurityIter(remoteSecurityVal); + remoteSecurityIter; remoteSecurityIter++) { + const SmartPtrCXmlElement remoteSecurityXml = + thisXml->createAndAddElement("remoteSecurity"); + RemoteSecurityXml::add(*remoteSecurityIter, remoteSecurityXml); + } + } +} + +SmartPtrCRemoteSecurityCollectionDoc RemoteSecurityCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("RemoteSecurityCollectionXml", "parse"); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection remoteSecurityChildrenXml = + thisXml->findOptionalChildren("remoteSecurity"); + + std::deque remoteSecurityVal; + if (! remoteSecurityChildrenXml.IsNull() && ! remoteSecurityChildrenXml->empty()) { + for (TConstIterator remoteSecurityXmlIter(*remoteSecurityChildrenXml); + remoteSecurityXmlIter; remoteSecurityXmlIter++) { + const SmartPtrCXmlElement remoteSecurityXml = remoteSecurityXmlIter->second; + const SmartPtrCRemoteSecurityDoc remoteSecurityDoc = + RemoteSecurityXml::parse(remoteSecurityXml); + remoteSecurityVal.push_back(remoteSecurityDoc); + } + } + + SmartPtrCRemoteSecurityCollectionDoc remoteSecurityCollectionDoc; + remoteSecurityCollectionDoc.CreateInstance(); + remoteSecurityCollectionDoc->initialize( + remoteSecurityVal); + + return remoteSecurityCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/RemoteSecurityCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/RemoteSecurityCollectionXml.h new file mode 100644 index 000000000..5073d65de --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/RemoteSecurityCollectionXml.h @@ -0,0 +1,29 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (c) 2015 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + */ + +#ifndef RemoteSecurityCollectionXml_h_ +#define RemoteSecurityCollectionXml_h_ + +namespace Caf { + + /// Streams the RemoteSecurityCollection class to/from XML + namespace RemoteSecurityCollectionXml { + + /// Adds the RemoteSecurityCollectionDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCRemoteSecurityCollectionDoc remoteSecurityCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the RemoteSecurityCollectionDoc from the XML. + SmartPtrCRemoteSecurityCollectionDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/RemoteSecurityXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/RemoteSecurityXml.cpp new file mode 100644 index 000000000..1bbc33971 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/RemoteSecurityXml.cpp @@ -0,0 +1,115 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (c) 2015 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + */ + +#include "stdafx.h" +#include "RemoteSecurityXml.h" + +using namespace Caf; + +void RemoteSecurityXml::add( + const SmartPtrCRemoteSecurityDoc remoteSecurityDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("RemoteSecurityXml", "add"); + CAF_CM_VALIDATE_SMARTPTR(remoteSecurityDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string remoteIdVal = remoteSecurityDoc->getRemoteId(); + if (! remoteIdVal.empty()) { + thisXml->addAttribute("remoteId", remoteIdVal); + } + + const std::string protocolNameVal = remoteSecurityDoc->getProtocolName(); + if (! protocolNameVal.empty()) { + thisXml->addAttribute("protocolName", protocolNameVal); + } + + const std::string cmsCertVal = remoteSecurityDoc->getCmsCert(); + if (! cmsCertVal.empty()) { + const SmartPtrCXmlElement cmsCertXml = thisXml->createAndAddElement("cmsCert"); + cmsCertXml->setValue(cmsCertVal); + } + + const std::string cmsCipherNameVal = remoteSecurityDoc->getCmsCipherName(); + if (! cmsCipherNameVal.empty()) { + thisXml->addAttribute("cmsCipherName", cmsCipherNameVal); + } + + const SmartPtrCCertCollectionDoc cmsCertCollectionVal = + remoteSecurityDoc->getCmsCertCollection(); + if (! cmsCertCollectionVal.IsNull()) { + const SmartPtrCXmlElement cmsCertCollectionXml = + thisXml->createAndAddElement("cmsCertCollection"); + CertCollectionXml::add(cmsCertCollectionVal, cmsCertCollectionXml); + } + + const std::string cmsCertPathVal = remoteSecurityDoc->getCmsCertPath(); + if (! cmsCertPathVal.empty()) { + thisXml->addAttribute("cmsCertPath", cmsCertPathVal); + } + + const SmartPtrCCertPathCollectionDoc cmsCertPathCollectionVal = + remoteSecurityDoc->getCmsCertPathCollection(); + if (! cmsCertPathCollectionVal.IsNull()) { + const SmartPtrCXmlElement cmsCertPathCollectionXml = + thisXml->createAndAddElement("cmsCertPathCollection"); + CertPathCollectionXml::add(cmsCertPathCollectionVal, cmsCertPathCollectionXml); + } +} + +SmartPtrCRemoteSecurityDoc RemoteSecurityXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("RemoteSecurityXml", "parse"); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string remoteIdVal = + thisXml->findOptionalAttribute("remoteId"); + + const std::string protocolNameVal = + thisXml->findOptionalAttribute("protocolName"); + + std::string cmsCertVal; + const SmartPtrCXmlElement cmsCertXml = thisXml->findOptionalChild("cmsCert"); + if (cmsCertXml) { + cmsCertVal = cmsCertXml->getValue(); + } + + const std::string cmsCipherNameVal = + thisXml->findOptionalAttribute("cmsCipherName"); + + const SmartPtrCXmlElement cmsCertCollectionXml = + thisXml->findOptionalChild("cmsCertCollection"); + SmartPtrCCertCollectionDoc cmsCertCollectionVal; + if (! cmsCertCollectionXml.IsNull()) { + cmsCertCollectionVal = CertCollectionXml::parse(cmsCertCollectionXml); + } + + const std::string cmsCertPathVal = + thisXml->findOptionalAttribute("cmsCertPath"); + + const SmartPtrCXmlElement cmsCertPathCollectionXml = + thisXml->findOptionalChild("cmsCertPathCollection"); + SmartPtrCCertPathCollectionDoc cmsCertPathCollectionVal; + if (! cmsCertPathCollectionXml.IsNull()) { + cmsCertPathCollectionVal = CertPathCollectionXml::parse(cmsCertPathCollectionXml); + } + + SmartPtrCRemoteSecurityDoc remoteSecurityDoc; + remoteSecurityDoc.CreateInstance(); + remoteSecurityDoc->initialize( + remoteIdVal, + protocolNameVal, + cmsCertVal, + cmsCipherNameVal, + cmsCertCollectionVal, + cmsCertPathVal, + cmsCertPathCollectionVal); + + return remoteSecurityDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/RemoteSecurityXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/RemoteSecurityXml.h new file mode 100644 index 000000000..5c580037c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/RemoteSecurityXml.h @@ -0,0 +1,29 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (c) 2015 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + */ + +#ifndef RemoteSecurityXml_h_ +#define RemoteSecurityXml_h_ + +namespace Caf { + + /// Streams the RemoteSecurity class to/from XML + namespace RemoteSecurityXml { + + /// Adds the RemoteSecurityDoc into the XML. + void PERSISTENCEXML_LINKAGE add( + const SmartPtrCRemoteSecurityDoc remoteSecurityDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the RemoteSecurityDoc from the XML. + SmartPtrCRemoteSecurityDoc PERSISTENCEXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/stdafx.h new file mode 100644 index 000000000..a16c32b0f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/stdafx.h @@ -0,0 +1,25 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (c) 2015 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define PERSISTENCEXML_LINKAGE __declspec(dllexport) +#else + #define PERSISTENCEXML_LINKAGE +#endif + +#include +#include +#include + +#include "PersistenceXmlInc.h" + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/ClassCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/ClassCollectionXml.cpp new file mode 100644 index 000000000..44fe107ae --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/ClassCollectionXml.cpp @@ -0,0 +1,74 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "ClassCollectionXml.h" + +using namespace Caf; + +void ClassCollectionXml::add( + const SmartPtrCClassCollectionDoc classCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ClassCollectionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(classCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque fullyQualifiedClassVal = + classCollectionDoc->getFullyQualifiedClass(); + CAF_CM_VALIDATE_STL(fullyQualifiedClassVal); + + if (! fullyQualifiedClassVal.empty()) { + for (TConstIterator > fullyQualifiedClassIter(fullyQualifiedClassVal); + fullyQualifiedClassIter; fullyQualifiedClassIter++) { + const SmartPtrCXmlElement fullyQualifiedClassXml = + thisXml->createAndAddElement("fullyQualifiedClass"); + FullyQualifiedClassGroupXml::add(*fullyQualifiedClassIter, fullyQualifiedClassXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCClassCollectionDoc ClassCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ClassCollectionXml", "parse"); + + SmartPtrCClassCollectionDoc classCollectionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection fullyQualifiedClassChildrenXml = + thisXml->findRequiredChildren("fullyQualifiedClass"); + + std::deque fullyQualifiedClassVal; + if (! fullyQualifiedClassChildrenXml.IsNull() && ! fullyQualifiedClassChildrenXml->empty()) { + for (TConstIterator fullyQualifiedClassXmlIter(*fullyQualifiedClassChildrenXml); + fullyQualifiedClassXmlIter; fullyQualifiedClassXmlIter++) { + const SmartPtrCXmlElement fullyQualifiedClassXml = fullyQualifiedClassXmlIter->second; + const SmartPtrCFullyQualifiedClassGroupDoc fullyQualifiedClassDoc = + FullyQualifiedClassGroupXml::parse(fullyQualifiedClassXml); + fullyQualifiedClassVal.push_back(fullyQualifiedClassDoc); + } + } + + classCollectionDoc.CreateInstance(); + classCollectionDoc->initialize( + fullyQualifiedClassVal); + } + CAF_CM_EXIT; + + return classCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/ClassCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/ClassCollectionXml.h new file mode 100644 index 000000000..b90c497a5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/ClassCollectionXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ClassCollectionXml_h_ +#define ClassCollectionXml_h_ + +namespace Caf { + + /// Streams the ClassCollection class to/from XML + namespace ClassCollectionXml { + + /// Adds the ClassCollectionDoc into the XML. + void PROVIDERINFRAXML_LINKAGE add( + const SmartPtrCClassCollectionDoc classCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ClassCollectionDoc from the XML. + SmartPtrCClassCollectionDoc PROVIDERINFRAXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/ProviderInfraXmlInc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/ProviderInfraXmlInc.h new file mode 100644 index 000000000..cc77e7003 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/ProviderInfraXmlInc.h @@ -0,0 +1,22 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ProviderInfraXml_Inc_h_ +#define ProviderInfraXml_Inc_h_ + +#include "../CafCoreTypesXml/CafCoreTypesXmlLink.h" +#include "ClassCollectionXml.h" +#include "ProviderRegXml.h" +#include "SchemaSummaryXml.h" +#include "ProviderInfraXmlRoots.h" + +#endif /* ProviderInfraXml_Inc_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/ProviderInfraXmlLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/ProviderInfraXmlLink.h new file mode 100644 index 000000000..2c94ba533 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/ProviderInfraXmlLink.h @@ -0,0 +1,30 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ProviderInfraXml_Link_h_ +#define ProviderInfraXml_Link_h_ + +#ifndef PROVIDERINFRAXML_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define PROVIDERINFRAXML_LINKAGE __declspec(dllexport) + #else + #define PROVIDERINFRAXML_LINKAGE __declspec(dllimport) + #endif + #else + #define PROVIDERINFRAXML_LINKAGE + #endif +#endif + +#include "ProviderInfraXmlInc.h" + +#endif /* ProviderInfraXml_Link_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/ProviderInfraXmlRoots.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/ProviderInfraXmlRoots.cpp new file mode 100644 index 000000000..181bdba53 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/ProviderInfraXmlRoots.cpp @@ -0,0 +1,165 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +using namespace Caf; + +std::string XmlRoots::saveProviderRegToString( + const SmartPtrCProviderRegDoc providerRegDoc) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "saveProviderRegToString"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(providerRegDoc); + + const std::string schemaNamespace = DocXmlUtils::getSchemaNamespace("fx"); + const std::string schemaLocation = DocXmlUtils::getSchemaLocation("fx/ProviderInfra.xsd"); + + const SmartPtrCXmlElement rootXml = CXmlUtils::createRootElement( + "providerReg", schemaNamespace, schemaLocation); + ProviderRegXml::add(providerRegDoc, rootXml); + + rc = rootXml->saveToString(); + } + CAF_CM_EXIT; + + return rc; +} + +SmartPtrCProviderRegDoc XmlRoots::parseProviderRegFromString( + const std::string xml) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseProviderRegFromString"); + + SmartPtrCProviderRegDoc providerRegDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(xml); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseString(xml, "caf:providerReg"); + providerRegDoc = ProviderRegXml::parse(rootXml); + } + CAF_CM_EXIT; + + return providerRegDoc; +} + +void XmlRoots::saveProviderRegToFile( + const SmartPtrCProviderRegDoc providerRegDoc, + const std::string filePath) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("XmlRoots", "saveProviderRegToFile"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(providerRegDoc); + CAF_CM_VALIDATE_STRING(filePath); + + CAF_CM_LOG_DEBUG_VA1("Saving to file - %s", filePath.c_str()); + + const std::string providerRegStr = + saveProviderRegToString(providerRegDoc); + FileSystemUtils::saveTextFile(filePath, providerRegStr); + } + CAF_CM_EXIT; +} + +SmartPtrCProviderRegDoc XmlRoots::parseProviderRegFromFile( + const std::string filePath) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseProviderRegFromFile"); + + SmartPtrCProviderRegDoc providerRegDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filePath); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseFile(filePath, "caf:providerReg"); + providerRegDoc = ProviderRegXml::parse(rootXml); + } + CAF_CM_EXIT; + + return providerRegDoc; +} + +std::string XmlRoots::saveSchemaSummaryToString( + const SmartPtrCSchemaSummaryDoc schemaSummaryDoc) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "saveSchemaSummaryToString"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(schemaSummaryDoc); + + const std::string schemaNamespace = DocXmlUtils::getSchemaNamespace("fx"); + const std::string schemaLocation = DocXmlUtils::getSchemaLocation("fx/ProviderInfra.xsd"); + + const SmartPtrCXmlElement rootXml = CXmlUtils::createRootElement( + "schemaSummary", schemaNamespace, schemaLocation); + SchemaSummaryXml::add(schemaSummaryDoc, rootXml); + + rc = rootXml->saveToString(); + } + CAF_CM_EXIT; + + return rc; +} + +SmartPtrCSchemaSummaryDoc XmlRoots::parseSchemaSummaryFromString( + const std::string xml) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseSchemaSummaryFromString"); + + SmartPtrCSchemaSummaryDoc schemaSummaryDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(xml); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseString(xml, "caf:schemaSummary"); + schemaSummaryDoc = SchemaSummaryXml::parse(rootXml); + } + CAF_CM_EXIT; + + return schemaSummaryDoc; +} + +void XmlRoots::saveSchemaSummaryToFile( + const SmartPtrCSchemaSummaryDoc schemaSummaryDoc, + const std::string filePath) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("XmlRoots", "saveSchemaSummaryToFile"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(schemaSummaryDoc); + CAF_CM_VALIDATE_STRING(filePath); + + CAF_CM_LOG_DEBUG_VA1("Saving to file - %s", filePath.c_str()); + + const std::string schemaSummaryStr = + saveSchemaSummaryToString(schemaSummaryDoc); + FileSystemUtils::saveTextFile(filePath, schemaSummaryStr); + } + CAF_CM_EXIT; +} + +SmartPtrCSchemaSummaryDoc XmlRoots::parseSchemaSummaryFromFile( + const std::string filePath) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseSchemaSummaryFromFile"); + + SmartPtrCSchemaSummaryDoc schemaSummaryDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filePath); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseFile(filePath, "caf:schemaSummary"); + schemaSummaryDoc = SchemaSummaryXml::parse(rootXml); + } + CAF_CM_EXIT; + + return schemaSummaryDoc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/ProviderInfraXmlRoots.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/ProviderInfraXmlRoots.h new file mode 100644 index 000000000..37fd3cdc8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/ProviderInfraXmlRoots.h @@ -0,0 +1,56 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ProviderInfraXmlRoots_h_ +#define ProviderInfraXmlRoots_h_ + +namespace Caf { + + namespace XmlRoots { + + /// Saves the ProviderRegDoc to a string. + std::string PROVIDERINFRAXML_LINKAGE saveProviderRegToString( + const SmartPtrCProviderRegDoc providerRegDoc); + + /// Parses the SchemaSummaryDoc from the string. + SmartPtrCProviderRegDoc PROVIDERINFRAXML_LINKAGE parseProviderRegFromString( + const std::string xml); + + /// Saves the ProviderRegDoc to a file. + void PROVIDERINFRAXML_LINKAGE saveProviderRegToFile( + const SmartPtrCProviderRegDoc providerRegDoc, + const std::string filePath); + + /// Parses the SchemaSummaryDoc from the file. + SmartPtrCProviderRegDoc PROVIDERINFRAXML_LINKAGE parseProviderRegFromFile( + const std::string filePath); + + /// Saves the SchemaSummaryDoc to a string. + std::string PROVIDERINFRAXML_LINKAGE saveSchemaSummaryToString( + const SmartPtrCSchemaSummaryDoc schemaSummaryDoc); + + /// Parses the SchemaSummaryDoc from the string. + SmartPtrCSchemaSummaryDoc PROVIDERINFRAXML_LINKAGE parseSchemaSummaryFromString( + const std::string xml); + + /// Saves the SchemaSummaryDoc to a file. + void PROVIDERINFRAXML_LINKAGE saveSchemaSummaryToFile( + const SmartPtrCSchemaSummaryDoc schemaSummaryDoc, + const std::string filePath); + + /// Parses the SchemaSummaryDoc from the file. + SmartPtrCSchemaSummaryDoc PROVIDERINFRAXML_LINKAGE parseSchemaSummaryFromFile( + const std::string filePath); + } +} + +#endif /* ProviderInfraXmlRoots_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/ProviderRegXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/ProviderRegXml.cpp new file mode 100644 index 000000000..c448e1645 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/ProviderRegXml.cpp @@ -0,0 +1,108 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "ProviderRegXml.h" + +using namespace Caf; + +void ProviderRegXml::add( + const SmartPtrCProviderRegDoc providerRegDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderRegXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(providerRegDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string providerNamespaceVal = providerRegDoc->getProviderNamespace(); + CAF_CM_VALIDATE_STRING(providerNamespaceVal); + thisXml->addAttribute("providerNamespace", providerNamespaceVal); + + const std::string providerNameVal = providerRegDoc->getProviderName(); + CAF_CM_VALIDATE_STRING(providerNameVal); + thisXml->addAttribute("providerName", providerNameVal); + + const std::string providerVersionVal = providerRegDoc->getProviderVersion(); + CAF_CM_VALIDATE_STRING(providerVersionVal); + thisXml->addAttribute("providerVersion", providerVersionVal); + + const std::string staleSecVal = + CStringConv::toString(providerRegDoc->getStaleSec()); + CAF_CM_VALIDATE_STRING(staleSecVal); + thisXml->addAttribute("staleSec", staleSecVal); + + const std::string isSchemaVisibleVal = providerRegDoc->getIsSchemaVisible() ? "true" : "false"; + CAF_CM_VALIDATE_STRING(isSchemaVisibleVal); + thisXml->addAttribute("isSchemaVisible", isSchemaVisibleVal); + + const std::string invokerRelPathVal = providerRegDoc->getInvokerRelPath(); + if (! invokerRelPathVal.empty()) { + thisXml->addAttribute("invokerRelPath", invokerRelPathVal); + } + } + CAF_CM_EXIT; +} + +SmartPtrCProviderRegDoc ProviderRegXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderRegXml", "parse"); + + SmartPtrCProviderRegDoc providerRegDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string providerNamespaceStrVal = + thisXml->findRequiredAttribute("providerNamespace"); + const std::string providerNamespaceVal = providerNamespaceStrVal; + + const std::string providerNameStrVal = + thisXml->findRequiredAttribute("providerName"); + const std::string providerNameVal = providerNameStrVal; + + const std::string providerVersionStrVal = + thisXml->findRequiredAttribute("providerVersion"); + const std::string providerVersionVal = providerVersionStrVal; + + const std::string staleSecStrVal = + thisXml->findRequiredAttribute("staleSec"); + int32 staleSecVal = 0; + if (! staleSecStrVal.empty()) { + staleSecVal = CStringConv::fromString(staleSecStrVal); + } + + const std::string isSchemaVisibleStrVal = + thisXml->findRequiredAttribute("isSchemaVisible"); + bool isSchemaVisibleVal = false; + if (! isSchemaVisibleStrVal.empty()) { + isSchemaVisibleVal = (isSchemaVisibleStrVal.compare("true") == 0) ? true : false; + } + + const std::string invokerRelPathStrVal = + thisXml->findOptionalAttribute("invokerRelPath"); + const std::string invokerRelPathVal = invokerRelPathStrVal; + + providerRegDoc.CreateInstance(); + providerRegDoc->initialize( + providerNamespaceVal, + providerNameVal, + providerVersionVal, + staleSecVal, + isSchemaVisibleVal, + invokerRelPathVal); + } + CAF_CM_EXIT; + + return providerRegDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/ProviderRegXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/ProviderRegXml.h new file mode 100644 index 000000000..11898e751 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/ProviderRegXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ProviderRegXml_h_ +#define ProviderRegXml_h_ + +namespace Caf { + + /// Streams the ProviderReg class to/from XML + namespace ProviderRegXml { + + /// Adds the ProviderRegDoc into the XML. + void PROVIDERINFRAXML_LINKAGE add( + const SmartPtrCProviderRegDoc providerRegDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ProviderRegDoc from the XML. + SmartPtrCProviderRegDoc PROVIDERINFRAXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/SchemaSummaryXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/SchemaSummaryXml.cpp new file mode 100644 index 000000000..d3f6e5303 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/SchemaSummaryXml.cpp @@ -0,0 +1,100 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "SchemaSummaryXml.h" + +using namespace Caf; + +void SchemaSummaryXml::add( + const SmartPtrCSchemaSummaryDoc schemaSummaryDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("SchemaSummaryXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(schemaSummaryDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string providerNamespaceVal = schemaSummaryDoc->getProviderNamespace(); + CAF_CM_VALIDATE_STRING(providerNamespaceVal); + thisXml->addAttribute("providerNamespace", providerNamespaceVal); + + const std::string providerNameVal = schemaSummaryDoc->getProviderName(); + CAF_CM_VALIDATE_STRING(providerNameVal); + thisXml->addAttribute("providerName", providerNameVal); + + const std::string providerVersionVal = schemaSummaryDoc->getProviderVersion(); + CAF_CM_VALIDATE_STRING(providerVersionVal); + thisXml->addAttribute("providerVersion", providerVersionVal); + + const SmartPtrCClassCollectionDoc classCollectionVal = + schemaSummaryDoc->getClassCollection(); + CAF_CM_VALIDATE_SMARTPTR(classCollectionVal); + + const SmartPtrCXmlElement classCollectionXml = + thisXml->createAndAddElement("classCollection"); + ClassCollectionXml::add(classCollectionVal, classCollectionXml); + + const std::string invokerPathVal = schemaSummaryDoc->getInvokerPath(); + if (! invokerPathVal.empty()) { + thisXml->addAttribute("invokerPath", invokerPathVal); + } + } + CAF_CM_EXIT; +} + +SmartPtrCSchemaSummaryDoc SchemaSummaryXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("SchemaSummaryXml", "parse"); + + SmartPtrCSchemaSummaryDoc schemaSummaryDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string providerNamespaceStrVal = + thisXml->findRequiredAttribute("providerNamespace"); + const std::string providerNamespaceVal = providerNamespaceStrVal; + + const std::string providerNameStrVal = + thisXml->findRequiredAttribute("providerName"); + const std::string providerNameVal = providerNameStrVal; + + const std::string providerVersionStrVal = + thisXml->findRequiredAttribute("providerVersion"); + const std::string providerVersionVal = providerVersionStrVal; + + const SmartPtrCXmlElement classCollectionXml = + thisXml->findRequiredChild("classCollection"); + + SmartPtrCClassCollectionDoc classCollectionVal; + if (! classCollectionXml.IsNull()) { + classCollectionVal = ClassCollectionXml::parse(classCollectionXml); + } + + const std::string invokerPathStrVal = + thisXml->findOptionalAttribute("invokerPath"); + const std::string invokerPathVal = invokerPathStrVal; + + schemaSummaryDoc.CreateInstance(); + schemaSummaryDoc->initialize( + providerNamespaceVal, + providerNameVal, + providerVersionVal, + classCollectionVal, + invokerPathVal); + } + CAF_CM_EXIT; + + return schemaSummaryDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/SchemaSummaryXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/SchemaSummaryXml.h new file mode 100644 index 000000000..67ec3712d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/SchemaSummaryXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef SchemaSummaryXml_h_ +#define SchemaSummaryXml_h_ + +namespace Caf { + + /// Streams the SchemaSummary class to/from XML + namespace SchemaSummaryXml { + + /// Adds the SchemaSummaryDoc into the XML. + void PROVIDERINFRAXML_LINKAGE add( + const SmartPtrCSchemaSummaryDoc schemaSummaryDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the SchemaSummaryDoc from the XML. + SmartPtrCSchemaSummaryDoc PROVIDERINFRAXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/stdafx.h new file mode 100644 index 000000000..4cb33aa0c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/stdafx.h @@ -0,0 +1,28 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define PROVIDERINFRAXML_LINKAGE __declspec(dllexport) +#else + #define PROVIDERINFRAXML_LINKAGE +#endif + +#include +#include +#include + +#include "ProviderInfraXmlInc.h" + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderBatchXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderBatchXml.cpp new file mode 100644 index 000000000..3949f7148 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderBatchXml.cpp @@ -0,0 +1,89 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "ProviderBatchXml.h" + +using namespace Caf; + +void ProviderBatchXml::add( + const SmartPtrCProviderBatchDoc providerBatchDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderBatchXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(providerBatchDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string outputDirVal = providerBatchDoc->getOutputDir(); + CAF_CM_VALIDATE_STRING(outputDirVal); + thisXml->addAttribute("outputDir", outputDirVal); + + const SmartPtrCProviderCollectInstancesCollectionDoc collectInstancesCollectionVal = + providerBatchDoc->getCollectInstancesCollection(); + if (! collectInstancesCollectionVal.IsNull()) { + const SmartPtrCXmlElement collectInstancesCollectionXml = + thisXml->createAndAddElement("collectInstancesCollection"); + ProviderCollectInstancesCollectionXml::add(collectInstancesCollectionVal, collectInstancesCollectionXml); + } + + const SmartPtrCProviderInvokeOperationCollectionDoc invokeOperationCollectionVal = + providerBatchDoc->getInvokeOperationCollection(); + if (! invokeOperationCollectionVal.IsNull()) { + const SmartPtrCXmlElement invokeOperationCollectionXml = + thisXml->createAndAddElement("invokeOperationCollection"); + ProviderInvokeOperationCollectionXml::add(invokeOperationCollectionVal, invokeOperationCollectionXml); + } + } + CAF_CM_EXIT; +} + +SmartPtrCProviderBatchDoc ProviderBatchXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderBatchXml", "parse"); + + SmartPtrCProviderBatchDoc providerBatchDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string outputDirStrVal = + thisXml->findRequiredAttribute("outputDir"); + const std::string outputDirVal = outputDirStrVal; + + const SmartPtrCXmlElement collectInstancesCollectionXml = + thisXml->findOptionalChild("collectInstancesCollection"); + + SmartPtrCProviderCollectInstancesCollectionDoc collectInstancesCollectionVal; + if (! collectInstancesCollectionXml.IsNull()) { + collectInstancesCollectionVal = ProviderCollectInstancesCollectionXml::parse(collectInstancesCollectionXml); + } + + const SmartPtrCXmlElement invokeOperationCollectionXml = + thisXml->findOptionalChild("invokeOperationCollection"); + + SmartPtrCProviderInvokeOperationCollectionDoc invokeOperationCollectionVal; + if (! invokeOperationCollectionXml.IsNull()) { + invokeOperationCollectionVal = ProviderInvokeOperationCollectionXml::parse(invokeOperationCollectionXml); + } + + providerBatchDoc.CreateInstance(); + providerBatchDoc->initialize( + outputDirVal, + collectInstancesCollectionVal, + invokeOperationCollectionVal); + } + CAF_CM_EXIT; + + return providerBatchDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderBatchXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderBatchXml.h new file mode 100644 index 000000000..4e55c4753 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderBatchXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ProviderBatchXml_h_ +#define ProviderBatchXml_h_ + +namespace Caf { + + /// Streams the ProviderBatch class to/from XML + namespace ProviderBatchXml { + + /// Adds the ProviderBatchDoc into the XML. + void PROVIDERREQUESTXML_LINKAGE add( + const SmartPtrCProviderBatchDoc providerBatchDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ProviderBatchDoc from the XML. + SmartPtrCProviderBatchDoc PROVIDERREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderCollectInstancesCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderCollectInstancesCollectionXml.cpp new file mode 100644 index 000000000..1bec93093 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderCollectInstancesCollectionXml.cpp @@ -0,0 +1,74 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "ProviderCollectInstancesCollectionXml.h" + +using namespace Caf; + +void ProviderCollectInstancesCollectionXml::add( + const SmartPtrCProviderCollectInstancesCollectionDoc providerCollectInstancesCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderCollectInstancesCollectionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(providerCollectInstancesCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque collectInstancesVal = + providerCollectInstancesCollectionDoc->getCollectInstances(); + CAF_CM_VALIDATE_STL(collectInstancesVal); + + if (! collectInstancesVal.empty()) { + for (TConstIterator > collectInstancesIter(collectInstancesVal); + collectInstancesIter; collectInstancesIter++) { + const SmartPtrCXmlElement collectInstancesXml = + thisXml->createAndAddElement("collectInstances"); + ProviderCollectInstancesXml::add(*collectInstancesIter, collectInstancesXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCProviderCollectInstancesCollectionDoc ProviderCollectInstancesCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderCollectInstancesCollectionXml", "parse"); + + SmartPtrCProviderCollectInstancesCollectionDoc providerCollectInstancesCollectionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection collectInstancesChildrenXml = + thisXml->findRequiredChildren("collectInstances"); + + std::deque collectInstancesVal; + if (! collectInstancesChildrenXml.IsNull() && ! collectInstancesChildrenXml->empty()) { + for (TConstIterator collectInstancesXmlIter(*collectInstancesChildrenXml); + collectInstancesXmlIter; collectInstancesXmlIter++) { + const SmartPtrCXmlElement collectInstancesXml = collectInstancesXmlIter->second; + const SmartPtrCProviderCollectInstancesDoc collectInstancesDoc = + ProviderCollectInstancesXml::parse(collectInstancesXml); + collectInstancesVal.push_back(collectInstancesDoc); + } + } + + providerCollectInstancesCollectionDoc.CreateInstance(); + providerCollectInstancesCollectionDoc->initialize( + collectInstancesVal); + } + CAF_CM_EXIT; + + return providerCollectInstancesCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderCollectInstancesCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderCollectInstancesCollectionXml.h new file mode 100644 index 000000000..741576f55 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderCollectInstancesCollectionXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ProviderCollectInstancesCollectionXml_h_ +#define ProviderCollectInstancesCollectionXml_h_ + +namespace Caf { + + /// Streams the ProviderCollectInstancesCollection class to/from XML + namespace ProviderCollectInstancesCollectionXml { + + /// Adds the ProviderCollectInstancesCollectionDoc into the XML. + void PROVIDERREQUESTXML_LINKAGE add( + const SmartPtrCProviderCollectInstancesCollectionDoc providerCollectInstancesCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ProviderCollectInstancesCollectionDoc from the XML. + SmartPtrCProviderCollectInstancesCollectionDoc PROVIDERREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderCollectInstancesXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderCollectInstancesXml.cpp new file mode 100644 index 000000000..af097c745 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderCollectInstancesXml.cpp @@ -0,0 +1,112 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "ProviderCollectInstancesXml.h" + +using namespace Caf; + +void ProviderCollectInstancesXml::add( + const SmartPtrCProviderCollectInstancesDoc providerCollectInstancesDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderCollectInstancesXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(providerCollectInstancesDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string classNamespaceVal = providerCollectInstancesDoc->getClassNamespace(); + CAF_CM_VALIDATE_STRING(classNamespaceVal); + thisXml->addAttribute("classNamespace", classNamespaceVal); + + const std::string classNameVal = providerCollectInstancesDoc->getClassName(); + CAF_CM_VALIDATE_STRING(classNameVal); + thisXml->addAttribute("className", classNameVal); + + const std::string classVersionVal = providerCollectInstancesDoc->getClassVersion(); + CAF_CM_VALIDATE_STRING(classVersionVal); + thisXml->addAttribute("classVersion", classVersionVal); + + const std::string jobIdVal = + BasePlatform::UuidToString(providerCollectInstancesDoc->getJobId()); + CAF_CM_VALIDATE_STRING(jobIdVal); + thisXml->addAttribute("jobId", jobIdVal); + + const std::string outputDirVal = providerCollectInstancesDoc->getOutputDir(); + CAF_CM_VALIDATE_STRING(outputDirVal); + thisXml->addAttribute("outputDir", outputDirVal); + + const SmartPtrCParameterCollectionDoc parameterCollectionVal = + providerCollectInstancesDoc->getParameterCollection(); + if (! parameterCollectionVal.IsNull()) { + const SmartPtrCXmlElement parameterCollectionXml = + thisXml->createAndAddElement("parameterCollection"); + ParameterCollectionXml::add(parameterCollectionVal, parameterCollectionXml); + } + } + CAF_CM_EXIT; +} + +SmartPtrCProviderCollectInstancesDoc ProviderCollectInstancesXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderCollectInstancesXml", "parse"); + + SmartPtrCProviderCollectInstancesDoc providerCollectInstancesDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string classNamespaceStrVal = + thisXml->findRequiredAttribute("classNamespace"); + const std::string classNamespaceVal = classNamespaceStrVal; + + const std::string classNameStrVal = + thisXml->findRequiredAttribute("className"); + const std::string classNameVal = classNameStrVal; + + const std::string classVersionStrVal = + thisXml->findRequiredAttribute("classVersion"); + const std::string classVersionVal = classVersionStrVal; + + const std::string jobIdStrVal = + thisXml->findRequiredAttribute("jobId"); + UUID jobIdVal = CAFCOMMON_GUID_NULL; + if (! jobIdStrVal.empty()) { + BasePlatform::UuidFromString(jobIdStrVal.c_str(), jobIdVal); + } + + const std::string outputDirStrVal = + thisXml->findRequiredAttribute("outputDir"); + const std::string outputDirVal = outputDirStrVal; + + const SmartPtrCXmlElement parameterCollectionXml = + thisXml->findOptionalChild("parameterCollection"); + + SmartPtrCParameterCollectionDoc parameterCollectionVal; + if (! parameterCollectionXml.IsNull()) { + parameterCollectionVal = ParameterCollectionXml::parse(parameterCollectionXml); + } + + providerCollectInstancesDoc.CreateInstance(); + providerCollectInstancesDoc->initialize( + classNamespaceVal, + classNameVal, + classVersionVal, + jobIdVal, + outputDirVal, + parameterCollectionVal); + } + CAF_CM_EXIT; + + return providerCollectInstancesDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderCollectInstancesXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderCollectInstancesXml.h new file mode 100644 index 000000000..e82a7f070 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderCollectInstancesXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ProviderCollectInstancesXml_h_ +#define ProviderCollectInstancesXml_h_ + +namespace Caf { + + /// Streams the ProviderCollectInstances class to/from XML + namespace ProviderCollectInstancesXml { + + /// Adds the ProviderCollectInstancesDoc into the XML. + void PROVIDERREQUESTXML_LINKAGE add( + const SmartPtrCProviderCollectInstancesDoc providerCollectInstancesDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ProviderCollectInstancesDoc from the XML. + SmartPtrCProviderCollectInstancesDoc PROVIDERREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderCollectSchemaRequestXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderCollectSchemaRequestXml.cpp new file mode 100644 index 000000000..2d54dabbf --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderCollectSchemaRequestXml.cpp @@ -0,0 +1,119 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "ProviderCollectSchemaRequestXml.h" + +using namespace Caf; + +void ProviderCollectSchemaRequestXml::add( + const SmartPtrCProviderCollectSchemaRequestDoc providerCollectSchemaRequestDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderCollectSchemaRequestXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(providerCollectSchemaRequestDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdVal = + BasePlatform::UuidToString(providerCollectSchemaRequestDoc->getClientId()); + CAF_CM_VALIDATE_STRING(clientIdVal); + thisXml->addAttribute("clientId", clientIdVal); + + const std::string requestIdVal = + BasePlatform::UuidToString(providerCollectSchemaRequestDoc->getRequestId()); + CAF_CM_VALIDATE_STRING(requestIdVal); + thisXml->addAttribute("requestId", requestIdVal); + + const std::string pmeIdVal = providerCollectSchemaRequestDoc->getPmeId(); + CAF_CM_VALIDATE_STRING(pmeIdVal); + thisXml->addAttribute("pmeId", pmeIdVal); + + const std::string jobIdVal = + BasePlatform::UuidToString(providerCollectSchemaRequestDoc->getJobId()); + CAF_CM_VALIDATE_STRING(jobIdVal); + thisXml->addAttribute("jobId", jobIdVal); + + const std::string outputDirVal = providerCollectSchemaRequestDoc->getOutputDir(); + CAF_CM_VALIDATE_STRING(outputDirVal); + thisXml->addAttribute("outputDir", outputDirVal); + + const SmartPtrCProviderRequestHeaderDoc requestHeaderVal = + providerCollectSchemaRequestDoc->getRequestHeader(); + CAF_CM_VALIDATE_SMARTPTR(requestHeaderVal); + + const SmartPtrCXmlElement requestHeaderXml = + thisXml->createAndAddElement("requestHeader"); + ProviderRequestHeaderXml::add(requestHeaderVal, requestHeaderXml); + } + CAF_CM_EXIT; +} + +SmartPtrCProviderCollectSchemaRequestDoc ProviderCollectSchemaRequestXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderCollectSchemaRequestXml", "parse"); + + SmartPtrCProviderCollectSchemaRequestDoc providerCollectSchemaRequestDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdStrVal = + thisXml->findRequiredAttribute("clientId"); + UUID clientIdVal = CAFCOMMON_GUID_NULL; + if (! clientIdStrVal.empty()) { + BasePlatform::UuidFromString(clientIdStrVal.c_str(), clientIdVal); + } + + const std::string requestIdStrVal = + thisXml->findRequiredAttribute("requestId"); + UUID requestIdVal = CAFCOMMON_GUID_NULL; + if (! requestIdStrVal.empty()) { + BasePlatform::UuidFromString(requestIdStrVal.c_str(), requestIdVal); + } + + const std::string pmeIdVal = + thisXml->findRequiredAttribute("pmeId"); + + const std::string jobIdStrVal = + thisXml->findRequiredAttribute("jobId"); + UUID jobIdVal = CAFCOMMON_GUID_NULL; + if (! jobIdStrVal.empty()) { + BasePlatform::UuidFromString(jobIdStrVal.c_str(), jobIdVal); + } + + const std::string outputDirStrVal = + thisXml->findRequiredAttribute("outputDir"); + const std::string outputDirVal = outputDirStrVal; + + const SmartPtrCXmlElement requestHeaderXml = + thisXml->findRequiredChild("requestHeader"); + + SmartPtrCProviderRequestHeaderDoc requestHeaderVal; + if (! requestHeaderXml.IsNull()) { + requestHeaderVal = ProviderRequestHeaderXml::parse(requestHeaderXml); + } + + providerCollectSchemaRequestDoc.CreateInstance(); + providerCollectSchemaRequestDoc->initialize( + clientIdVal, + requestIdVal, + pmeIdVal, + jobIdVal, + outputDirVal, + requestHeaderVal); + } + CAF_CM_EXIT; + + return providerCollectSchemaRequestDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderCollectSchemaRequestXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderCollectSchemaRequestXml.h new file mode 100644 index 000000000..a0e57720e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderCollectSchemaRequestXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ProviderCollectSchemaRequestXml_h_ +#define ProviderCollectSchemaRequestXml_h_ + +namespace Caf { + + /// Streams the ProviderCollectSchemaRequest class to/from XML + namespace ProviderCollectSchemaRequestXml { + + /// Adds the ProviderCollectSchemaRequestDoc into the XML. + void PROVIDERREQUESTXML_LINKAGE add( + const SmartPtrCProviderCollectSchemaRequestDoc providerCollectSchemaRequestDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ProviderCollectSchemaRequestDoc from the XML. + SmartPtrCProviderCollectSchemaRequestDoc PROVIDERREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderInvokeOperationCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderInvokeOperationCollectionXml.cpp new file mode 100644 index 000000000..b0ba5274d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderInvokeOperationCollectionXml.cpp @@ -0,0 +1,74 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "ProviderInvokeOperationCollectionXml.h" + +using namespace Caf; + +void ProviderInvokeOperationCollectionXml::add( + const SmartPtrCProviderInvokeOperationCollectionDoc providerInvokeOperationCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderInvokeOperationCollectionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(providerInvokeOperationCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque invokeOperationVal = + providerInvokeOperationCollectionDoc->getInvokeOperation(); + CAF_CM_VALIDATE_STL(invokeOperationVal); + + if (! invokeOperationVal.empty()) { + for (TConstIterator > invokeOperationIter(invokeOperationVal); + invokeOperationIter; invokeOperationIter++) { + const SmartPtrCXmlElement invokeOperationXml = + thisXml->createAndAddElement("invokeOperation"); + ProviderInvokeOperationXml::add(*invokeOperationIter, invokeOperationXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCProviderInvokeOperationCollectionDoc ProviderInvokeOperationCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderInvokeOperationCollectionXml", "parse"); + + SmartPtrCProviderInvokeOperationCollectionDoc providerInvokeOperationCollectionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection invokeOperationChildrenXml = + thisXml->findRequiredChildren("invokeOperation"); + + std::deque invokeOperationVal; + if (! invokeOperationChildrenXml.IsNull() && ! invokeOperationChildrenXml->empty()) { + for (TConstIterator invokeOperationXmlIter(*invokeOperationChildrenXml); + invokeOperationXmlIter; invokeOperationXmlIter++) { + const SmartPtrCXmlElement invokeOperationXml = invokeOperationXmlIter->second; + const SmartPtrCProviderInvokeOperationDoc invokeOperationDoc = + ProviderInvokeOperationXml::parse(invokeOperationXml); + invokeOperationVal.push_back(invokeOperationDoc); + } + } + + providerInvokeOperationCollectionDoc.CreateInstance(); + providerInvokeOperationCollectionDoc->initialize( + invokeOperationVal); + } + CAF_CM_EXIT; + + return providerInvokeOperationCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderInvokeOperationCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderInvokeOperationCollectionXml.h new file mode 100644 index 000000000..be54b281d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderInvokeOperationCollectionXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ProviderInvokeOperationCollectionXml_h_ +#define ProviderInvokeOperationCollectionXml_h_ + +namespace Caf { + + /// Streams the ProviderInvokeOperationCollection class to/from XML + namespace ProviderInvokeOperationCollectionXml { + + /// Adds the ProviderInvokeOperationCollectionDoc into the XML. + void PROVIDERREQUESTXML_LINKAGE add( + const SmartPtrCProviderInvokeOperationCollectionDoc providerInvokeOperationCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ProviderInvokeOperationCollectionDoc from the XML. + SmartPtrCProviderInvokeOperationCollectionDoc PROVIDERREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderInvokeOperationXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderInvokeOperationXml.cpp new file mode 100644 index 000000000..49f3a6ddd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderInvokeOperationXml.cpp @@ -0,0 +1,112 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "ProviderInvokeOperationXml.h" + +using namespace Caf; + +void ProviderInvokeOperationXml::add( + const SmartPtrCProviderInvokeOperationDoc providerInvokeOperationDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderInvokeOperationXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(providerInvokeOperationDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string classNamespaceVal = providerInvokeOperationDoc->getClassNamespace(); + CAF_CM_VALIDATE_STRING(classNamespaceVal); + thisXml->addAttribute("classNamespace", classNamespaceVal); + + const std::string classNameVal = providerInvokeOperationDoc->getClassName(); + CAF_CM_VALIDATE_STRING(classNameVal); + thisXml->addAttribute("className", classNameVal); + + const std::string classVersionVal = providerInvokeOperationDoc->getClassVersion(); + CAF_CM_VALIDATE_STRING(classVersionVal); + thisXml->addAttribute("classVersion", classVersionVal); + + const std::string jobIdVal = + BasePlatform::UuidToString(providerInvokeOperationDoc->getJobId()); + CAF_CM_VALIDATE_STRING(jobIdVal); + thisXml->addAttribute("jobId", jobIdVal); + + const std::string outputDirVal = providerInvokeOperationDoc->getOutputDir(); + CAF_CM_VALIDATE_STRING(outputDirVal); + thisXml->addAttribute("outputDir", outputDirVal); + + const SmartPtrCOperationDoc operationVal = + providerInvokeOperationDoc->getOperation(); + CAF_CM_VALIDATE_SMARTPTR(operationVal); + + const SmartPtrCXmlElement operationXml = + thisXml->createAndAddElement("operation"); + OperationXml::add(operationVal, operationXml); + } + CAF_CM_EXIT; +} + +SmartPtrCProviderInvokeOperationDoc ProviderInvokeOperationXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderInvokeOperationXml", "parse"); + + SmartPtrCProviderInvokeOperationDoc providerInvokeOperationDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string classNamespaceStrVal = + thisXml->findRequiredAttribute("classNamespace"); + const std::string classNamespaceVal = classNamespaceStrVal; + + const std::string classNameStrVal = + thisXml->findRequiredAttribute("className"); + const std::string classNameVal = classNameStrVal; + + const std::string classVersionStrVal = + thisXml->findRequiredAttribute("classVersion"); + const std::string classVersionVal = classVersionStrVal; + + const std::string jobIdStrVal = + thisXml->findRequiredAttribute("jobId"); + UUID jobIdVal = CAFCOMMON_GUID_NULL; + if (! jobIdStrVal.empty()) { + BasePlatform::UuidFromString(jobIdStrVal.c_str(), jobIdVal); + } + + const std::string outputDirStrVal = + thisXml->findRequiredAttribute("outputDir"); + const std::string outputDirVal = outputDirStrVal; + + const SmartPtrCXmlElement operationXml = + thisXml->findRequiredChild("operation"); + + SmartPtrCOperationDoc operationVal; + if (! operationXml.IsNull()) { + operationVal = OperationXml::parse(operationXml); + } + + providerInvokeOperationDoc.CreateInstance(); + providerInvokeOperationDoc->initialize( + classNamespaceVal, + classNameVal, + classVersionVal, + jobIdVal, + outputDirVal, + operationVal); + } + CAF_CM_EXIT; + + return providerInvokeOperationDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderInvokeOperationXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderInvokeOperationXml.h new file mode 100644 index 000000000..5cfe94b67 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderInvokeOperationXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ProviderInvokeOperationXml_h_ +#define ProviderInvokeOperationXml_h_ + +namespace Caf { + + /// Streams the ProviderInvokeOperation class to/from XML + namespace ProviderInvokeOperationXml { + + /// Adds the ProviderInvokeOperationDoc into the XML. + void PROVIDERREQUESTXML_LINKAGE add( + const SmartPtrCProviderInvokeOperationDoc providerInvokeOperationDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ProviderInvokeOperationDoc from the XML. + SmartPtrCProviderInvokeOperationDoc PROVIDERREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestConfigXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestConfigXml.cpp new file mode 100644 index 000000000..c7787a989 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestConfigXml.cpp @@ -0,0 +1,72 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "ProviderRequestConfigXml.h" + +using namespace Caf; + +void ProviderRequestConfigXml::add( + const SmartPtrCProviderRequestConfigDoc providerRequestConfigDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderRequestConfigXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(providerRequestConfigDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string responseFormatTypeVal = providerRequestConfigDoc->getResponseFormatType(); + CAF_CM_VALIDATE_STRING(responseFormatTypeVal); + thisXml->addAttribute("responseFormatType", responseFormatTypeVal); + + const SmartPtrCLoggingLevelCollectionDoc loggingLevelCollectionVal = + providerRequestConfigDoc->getLoggingLevelCollection(); + if (! loggingLevelCollectionVal.IsNull()) { + const SmartPtrCXmlElement loggingLevelCollectionXml = + thisXml->createAndAddElement("loggingLevelCollection"); + LoggingLevelCollectionXml::add(loggingLevelCollectionVal, loggingLevelCollectionXml); + } + } + CAF_CM_EXIT; +} + +SmartPtrCProviderRequestConfigDoc ProviderRequestConfigXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderRequestConfigXml", "parse"); + + SmartPtrCProviderRequestConfigDoc providerRequestConfigDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string responseFormatTypeStrVal = + thisXml->findRequiredAttribute("responseFormatType"); + const std::string responseFormatTypeVal = responseFormatTypeStrVal; + + const SmartPtrCXmlElement loggingLevelCollectionXml = + thisXml->findOptionalChild("loggingLevelCollection"); + + SmartPtrCLoggingLevelCollectionDoc loggingLevelCollectionVal; + if (! loggingLevelCollectionXml.IsNull()) { + loggingLevelCollectionVal = LoggingLevelCollectionXml::parse(loggingLevelCollectionXml); + } + + providerRequestConfigDoc.CreateInstance(); + providerRequestConfigDoc->initialize( + responseFormatTypeVal, + loggingLevelCollectionVal); + } + CAF_CM_EXIT; + + return providerRequestConfigDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestConfigXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestConfigXml.h new file mode 100644 index 000000000..9ccc746a2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestConfigXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ProviderRequestConfigXml_h_ +#define ProviderRequestConfigXml_h_ + +namespace Caf { + + /// Streams the ProviderRequestConfig class to/from XML + namespace ProviderRequestConfigXml { + + /// Adds the ProviderRequestConfigDoc into the XML. + void PROVIDERREQUESTXML_LINKAGE add( + const SmartPtrCProviderRequestConfigDoc providerRequestConfigDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ProviderRequestConfigDoc from the XML. + SmartPtrCProviderRequestConfigDoc PROVIDERREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestHeaderXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestHeaderXml.cpp new file mode 100644 index 000000000..237cf2507 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestHeaderXml.cpp @@ -0,0 +1,80 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "ProviderRequestHeaderXml.h" + +using namespace Caf; + +void ProviderRequestHeaderXml::add( + const SmartPtrCProviderRequestHeaderDoc providerRequestHeaderDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderRequestHeaderXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(providerRequestHeaderDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const SmartPtrCProviderRequestConfigDoc requestConfigVal = + providerRequestHeaderDoc->getRequestConfig(); + CAF_CM_VALIDATE_SMARTPTR(requestConfigVal); + + const SmartPtrCXmlElement requestConfigXml = + thisXml->createAndAddElement("requestConfig"); + ProviderRequestConfigXml::add(requestConfigVal, requestConfigXml); + + const SmartPtrCPropertyCollectionDoc echoPropertyBagVal = + providerRequestHeaderDoc->getEchoPropertyBag(); + if (! echoPropertyBagVal.IsNull()) { + const SmartPtrCXmlElement echoPropertyBagXml = + thisXml->createAndAddElement("echoPropertyBag"); + PropertyCollectionXml::add(echoPropertyBagVal, echoPropertyBagXml); + } + } + CAF_CM_EXIT; +} + +SmartPtrCProviderRequestHeaderDoc ProviderRequestHeaderXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderRequestHeaderXml", "parse"); + + SmartPtrCProviderRequestHeaderDoc providerRequestHeaderDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const SmartPtrCXmlElement requestConfigXml = + thisXml->findRequiredChild("requestConfig"); + + SmartPtrCProviderRequestConfigDoc requestConfigVal; + if (! requestConfigXml.IsNull()) { + requestConfigVal = ProviderRequestConfigXml::parse(requestConfigXml); + } + + const SmartPtrCXmlElement echoPropertyBagXml = + thisXml->findOptionalChild("echoPropertyBag"); + + SmartPtrCPropertyCollectionDoc echoPropertyBagVal; + if (! echoPropertyBagXml.IsNull()) { + echoPropertyBagVal = PropertyCollectionXml::parse(echoPropertyBagXml); + } + + providerRequestHeaderDoc.CreateInstance(); + providerRequestHeaderDoc->initialize( + requestConfigVal, + echoPropertyBagVal); + } + CAF_CM_EXIT; + + return providerRequestHeaderDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestHeaderXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestHeaderXml.h new file mode 100644 index 000000000..5a1648a5f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestHeaderXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ProviderRequestHeaderXml_h_ +#define ProviderRequestHeaderXml_h_ + +namespace Caf { + + /// Streams the ProviderRequestHeader class to/from XML + namespace ProviderRequestHeaderXml { + + /// Adds the ProviderRequestHeaderDoc into the XML. + void PROVIDERREQUESTXML_LINKAGE add( + const SmartPtrCProviderRequestHeaderDoc providerRequestHeaderDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ProviderRequestHeaderDoc from the XML. + SmartPtrCProviderRequestHeaderDoc PROVIDERREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestXml.cpp new file mode 100644 index 000000000..4b9ac997e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestXml.cpp @@ -0,0 +1,131 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "ProviderRequestXml.h" + +using namespace Caf; + +void ProviderRequestXml::add( + const SmartPtrCProviderRequestDoc providerRequestDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderRequestXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(providerRequestDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdVal = + BasePlatform::UuidToString(providerRequestDoc->getClientId()); + CAF_CM_VALIDATE_STRING(clientIdVal); + thisXml->addAttribute("clientId", clientIdVal); + + const std::string requestIdVal = + BasePlatform::UuidToString(providerRequestDoc->getRequestId()); + CAF_CM_VALIDATE_STRING(requestIdVal); + thisXml->addAttribute("requestId", requestIdVal); + + const std::string pmeIdVal = providerRequestDoc->getPmeId(); + CAF_CM_VALIDATE_STRING(pmeIdVal); + thisXml->addAttribute("pmeId", pmeIdVal); + + const SmartPtrCProviderRequestHeaderDoc requestHeaderVal = + providerRequestDoc->getRequestHeader(); + CAF_CM_VALIDATE_SMARTPTR(requestHeaderVal); + + const SmartPtrCXmlElement requestHeaderXml = + thisXml->createAndAddElement("requestHeader"); + ProviderRequestHeaderXml::add(requestHeaderVal, requestHeaderXml); + + const SmartPtrCProviderBatchDoc batchVal = + providerRequestDoc->getBatch(); + CAF_CM_VALIDATE_SMARTPTR(batchVal); + + const SmartPtrCXmlElement batchXml = + thisXml->createAndAddElement("batch"); + ProviderBatchXml::add(batchVal, batchXml); + + const SmartPtrCAttachmentCollectionDoc attachmentCollectionVal = + providerRequestDoc->getAttachmentCollection(); + if (! attachmentCollectionVal.IsNull()) { + const SmartPtrCXmlElement attachmentCollectionXml = + thisXml->createAndAddElement("attachmentCollection"); + AttachmentCollectionXml::add(attachmentCollectionVal, attachmentCollectionXml); + } + } + CAF_CM_EXIT; +} + +SmartPtrCProviderRequestDoc ProviderRequestXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderRequestXml", "parse"); + + SmartPtrCProviderRequestDoc providerRequestDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdStrVal = + thisXml->findRequiredAttribute("clientId"); + UUID clientIdVal = CAFCOMMON_GUID_NULL; + if (! clientIdStrVal.empty()) { + BasePlatform::UuidFromString(clientIdStrVal.c_str(), clientIdVal); + } + + const std::string requestIdStrVal = + thisXml->findRequiredAttribute("requestId"); + UUID requestIdVal = CAFCOMMON_GUID_NULL; + if (! requestIdStrVal.empty()) { + BasePlatform::UuidFromString(requestIdStrVal.c_str(), requestIdVal); + } + + const std::string pmeIdVal = + thisXml->findRequiredAttribute("pmeId"); + + const SmartPtrCXmlElement requestHeaderXml = + thisXml->findRequiredChild("requestHeader"); + + SmartPtrCProviderRequestHeaderDoc requestHeaderVal; + if (! requestHeaderXml.IsNull()) { + requestHeaderVal = ProviderRequestHeaderXml::parse(requestHeaderXml); + } + + const SmartPtrCXmlElement batchXml = + thisXml->findRequiredChild("batch"); + + SmartPtrCProviderBatchDoc batchVal; + if (! batchXml.IsNull()) { + batchVal = ProviderBatchXml::parse(batchXml); + } + + const SmartPtrCXmlElement attachmentCollectionXml = + thisXml->findOptionalChild("attachmentCollection"); + + SmartPtrCAttachmentCollectionDoc attachmentCollectionVal; + if (! attachmentCollectionXml.IsNull()) { + attachmentCollectionVal = AttachmentCollectionXml::parse(attachmentCollectionXml); + } + + providerRequestDoc.CreateInstance(); + providerRequestDoc->initialize( + clientIdVal, + requestIdVal, + pmeIdVal, + requestHeaderVal, + batchVal, + attachmentCollectionVal); + } + CAF_CM_EXIT; + + return providerRequestDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestXml.h new file mode 100644 index 000000000..ea6c4d1f4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ProviderRequestXml_h_ +#define ProviderRequestXml_h_ + +namespace Caf { + + /// Streams the ProviderRequest class to/from XML + namespace ProviderRequestXml { + + /// Adds the ProviderRequestDoc into the XML. + void PROVIDERREQUESTXML_LINKAGE add( + const SmartPtrCProviderRequestDoc providerRequestDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ProviderRequestDoc from the XML. + SmartPtrCProviderRequestDoc PROVIDERREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestXmlInc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestXmlInc.h new file mode 100644 index 000000000..d15f44aa3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestXmlInc.h @@ -0,0 +1,28 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ProviderRequestXml_Inc_h_ +#define ProviderRequestXml_Inc_h_ + +#include "../CafCoreTypesXml/CafCoreTypesXmlLink.h" +#include "ProviderRequestConfigXml.h" +#include "ProviderRequestHeaderXml.h" +#include "ProviderCollectInstancesXml.h" +#include "ProviderInvokeOperationXml.h" +#include "ProviderCollectInstancesCollectionXml.h" +#include "ProviderInvokeOperationCollectionXml.h" +#include "ProviderBatchXml.h" +#include "ProviderRequestXml.h" +#include "ProviderCollectSchemaRequestXml.h" +#include "ProviderRequestXmlRoots.h" + +#endif /* ProviderRequestXml_Inc_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestXmlLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestXmlLink.h new file mode 100644 index 000000000..d016c33bf --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestXmlLink.h @@ -0,0 +1,30 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ProviderRequestXml_Link_h_ +#define ProviderRequestXml_Link_h_ + +#ifndef PROVIDERREQUESTXML_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define PROVIDERREQUESTXML_LINKAGE __declspec(dllexport) + #else + #define PROVIDERREQUESTXML_LINKAGE __declspec(dllimport) + #endif + #else + #define PROVIDERREQUESTXML_LINKAGE + #endif +#endif + +#include "ProviderRequestXmlInc.h" + +#endif /* ProviderRequestXml_Link_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestXmlRoots.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestXmlRoots.cpp new file mode 100644 index 000000000..6b1ab881f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestXmlRoots.cpp @@ -0,0 +1,165 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +using namespace Caf; + +std::string XmlRoots::saveProviderCollectSchemaRequestToString( + const SmartPtrCProviderCollectSchemaRequestDoc providerCollectSchemaRequestDoc) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "saveProviderCollectSchemaRequestToString"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(providerCollectSchemaRequestDoc); + + const std::string schemaNamespace = DocXmlUtils::getSchemaNamespace("fx"); + const std::string schemaLocation = DocXmlUtils::getSchemaLocation("fx/ProviderRequest.xsd"); + + const SmartPtrCXmlElement rootXml = CXmlUtils::createRootElement( + "providerCollectSchemaRequest", schemaNamespace, schemaLocation); + ProviderCollectSchemaRequestXml::add(providerCollectSchemaRequestDoc, rootXml); + + rc = rootXml->saveToString(); + } + CAF_CM_EXIT; + + return rc; +} + +SmartPtrCProviderCollectSchemaRequestDoc XmlRoots::parseProviderCollectSchemaRequestFromString( + const std::string xml) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseProviderCollectSchemaRequestFromString"); + + SmartPtrCProviderCollectSchemaRequestDoc providerCollectSchemaRequestDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(xml); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseString(xml, "caf:providerCollectSchemaRequest"); + providerCollectSchemaRequestDoc = ProviderCollectSchemaRequestXml::parse(rootXml); + } + CAF_CM_EXIT; + + return providerCollectSchemaRequestDoc; +} + +void XmlRoots::saveProviderCollectSchemaRequestToFile( + const SmartPtrCProviderCollectSchemaRequestDoc providerCollectSchemaRequestDoc, + const std::string filePath) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("XmlRoots", "saveProviderCollectSchemaRequestToFile"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(providerCollectSchemaRequestDoc); + CAF_CM_VALIDATE_STRING(filePath); + + CAF_CM_LOG_DEBUG_VA1("Saving to file - %s", filePath.c_str()); + + const std::string providerCollectSchemaRequestStr = + saveProviderCollectSchemaRequestToString(providerCollectSchemaRequestDoc); + FileSystemUtils::saveTextFile(filePath, providerCollectSchemaRequestStr); + } + CAF_CM_EXIT; +} + +SmartPtrCProviderCollectSchemaRequestDoc XmlRoots::parseProviderCollectSchemaRequestFromFile( + const std::string filePath) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseProviderCollectSchemaRequestFromFile"); + + SmartPtrCProviderCollectSchemaRequestDoc providerCollectSchemaRequestDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filePath); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseFile(filePath, "caf:providerCollectSchemaRequest"); + providerCollectSchemaRequestDoc = ProviderCollectSchemaRequestXml::parse(rootXml); + } + CAF_CM_EXIT; + + return providerCollectSchemaRequestDoc; +} + +std::string XmlRoots::saveProviderRequestToString( + const SmartPtrCProviderRequestDoc providerRequestDoc) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "saveProviderRequestToString"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(providerRequestDoc); + + const std::string schemaNamespace = DocXmlUtils::getSchemaNamespace("fx"); + const std::string schemaLocation = DocXmlUtils::getSchemaLocation("fx/ProviderRequest.xsd"); + + const SmartPtrCXmlElement rootXml = CXmlUtils::createRootElement( + "providerRequest", schemaNamespace, schemaLocation); + ProviderRequestXml::add(providerRequestDoc, rootXml); + + rc = rootXml->saveToString(); + } + CAF_CM_EXIT; + + return rc; +} + +SmartPtrCProviderRequestDoc XmlRoots::parseProviderRequestFromString( + const std::string xml) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseProviderRequestFromString"); + + SmartPtrCProviderRequestDoc providerRequestDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(xml); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseString(xml, "caf:providerRequest"); + providerRequestDoc = ProviderRequestXml::parse(rootXml); + } + CAF_CM_EXIT; + + return providerRequestDoc; +} + +void XmlRoots::saveProviderRequestToFile( + const SmartPtrCProviderRequestDoc providerRequestDoc, + const std::string filePath) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("XmlRoots", "saveProviderRequestToFile"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(providerRequestDoc); + CAF_CM_VALIDATE_STRING(filePath); + + CAF_CM_LOG_DEBUG_VA1("Saving to file - %s", filePath.c_str()); + + const std::string providerRequestStr = + saveProviderRequestToString(providerRequestDoc); + FileSystemUtils::saveTextFile(filePath, providerRequestStr); + } + CAF_CM_EXIT; +} + +SmartPtrCProviderRequestDoc XmlRoots::parseProviderRequestFromFile( + const std::string filePath) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseProviderRequestFromFile"); + + SmartPtrCProviderRequestDoc providerRequestDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filePath); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseFile(filePath, "caf:providerRequest"); + providerRequestDoc = ProviderRequestXml::parse(rootXml); + } + CAF_CM_EXIT; + + return providerRequestDoc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestXmlRoots.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestXmlRoots.h new file mode 100644 index 000000000..3adfc8b60 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestXmlRoots.h @@ -0,0 +1,56 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ProviderRequestXmlRoots_h_ +#define ProviderRequestXmlRoots_h_ + +namespace Caf { + + namespace XmlRoots { + + /// Saves the ProviderCollectSchemaRequestDoc to a string. + std::string PROVIDERREQUESTXML_LINKAGE saveProviderCollectSchemaRequestToString( + const SmartPtrCProviderCollectSchemaRequestDoc providerCollectSchemaRequestDoc); + + /// Parses the ProviderCollectSchemaRequestDoc from the string. + SmartPtrCProviderCollectSchemaRequestDoc PROVIDERREQUESTXML_LINKAGE parseProviderCollectSchemaRequestFromString( + const std::string xml); + + /// Saves the ProviderCollectSchemaRequestDoc to a file. + void PROVIDERREQUESTXML_LINKAGE saveProviderCollectSchemaRequestToFile( + const SmartPtrCProviderCollectSchemaRequestDoc providerCollectSchemaRequestDoc, + const std::string filePath); + + /// Parses the ProviderCollectSchemaRequestDoc from the file. + SmartPtrCProviderCollectSchemaRequestDoc PROVIDERREQUESTXML_LINKAGE parseProviderCollectSchemaRequestFromFile( + const std::string filePath); + + /// Saves the ProviderRequestDoc to a string. + std::string PROVIDERREQUESTXML_LINKAGE saveProviderRequestToString( + const SmartPtrCProviderRequestDoc providerRequestDoc); + + /// Parses the ProviderCollectSchemaRequestDoc from the string. + SmartPtrCProviderRequestDoc PROVIDERREQUESTXML_LINKAGE parseProviderRequestFromString( + const std::string xml); + + /// Saves the ProviderRequestDoc to a file. + void PROVIDERREQUESTXML_LINKAGE saveProviderRequestToFile( + const SmartPtrCProviderRequestDoc providerRequestDoc, + const std::string filePath); + + /// Parses the ProviderCollectSchemaRequestDoc from the file. + SmartPtrCProviderRequestDoc PROVIDERREQUESTXML_LINKAGE parseProviderRequestFromFile( + const std::string filePath); + } +} + +#endif /* ProviderRequestXmlRoots_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/stdafx.h new file mode 100644 index 000000000..0cb81a211 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/stdafx.h @@ -0,0 +1,28 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define PROVIDERREQUESTXML_LINKAGE __declspec(dllexport) +#else + #define PROVIDERREQUESTXML_LINKAGE +#endif + +#include +#include +#include + +#include "ProviderRequestXmlInc.h" + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/CdifXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/CdifXml.cpp new file mode 100644 index 000000000..c42edb095 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/CdifXml.cpp @@ -0,0 +1,97 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "CdifXml.h" + +using namespace Caf; + +void CdifXml::add( + const SmartPtrCCdifDoc cdifDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("CdifXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(cdifDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const SmartPtrCRequestIdentifierDoc requestIdentifierVal = + cdifDoc->getRequestIdentifier(); + CAF_CM_VALIDATE_SMARTPTR(requestIdentifierVal); + + const SmartPtrCXmlElement requestIdentifierXml = + thisXml->createAndAddElement("requestIdentifier"); + RequestIdentifierXml::add(requestIdentifierVal, requestIdentifierXml); + + const SmartPtrCDefinitionObjectCollectionDoc definitionObjectCollectionVal = + cdifDoc->getDefinitionObjectCollection(); + if (! definitionObjectCollectionVal.IsNull()) { + const SmartPtrCXmlElement definitionObjectCollectionXml = + thisXml->createAndAddElement("definitionObjectCollection"); + DefinitionObjectCollectionXml::add(definitionObjectCollectionVal, definitionObjectCollectionXml); + } + + const SmartPtrCSchemaDoc schemaVal = + cdifDoc->getSchema(); + CAF_CM_VALIDATE_SMARTPTR(schemaVal); + + const SmartPtrCXmlElement schemaXml = + thisXml->createAndAddElement("schema"); + SchemaXml::add(schemaVal, schemaXml); + } + CAF_CM_EXIT; +} + +SmartPtrCCdifDoc CdifXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("CdifXml", "parse"); + + SmartPtrCCdifDoc cdifDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const SmartPtrCXmlElement requestIdentifierXml = + thisXml->findRequiredChild("requestIdentifier"); + + SmartPtrCRequestIdentifierDoc requestIdentifierVal; + if (! requestIdentifierXml.IsNull()) { + requestIdentifierVal = RequestIdentifierXml::parse(requestIdentifierXml); + } + + const SmartPtrCXmlElement definitionObjectCollectionXml = + thisXml->findOptionalChild("definitionObjectCollection"); + + SmartPtrCDefinitionObjectCollectionDoc definitionObjectCollectionVal; + if (! definitionObjectCollectionXml.IsNull()) { + definitionObjectCollectionVal = DefinitionObjectCollectionXml::parse(definitionObjectCollectionXml); + } + + const SmartPtrCXmlElement schemaXml = + thisXml->findRequiredChild("schema"); + + SmartPtrCSchemaDoc schemaVal; + if (! schemaXml.IsNull()) { + schemaVal = SchemaXml::parse(schemaXml); + } + + cdifDoc.CreateInstance(); + cdifDoc->initialize( + requestIdentifierVal, + definitionObjectCollectionVal, + schemaVal); + } + CAF_CM_EXIT; + + return cdifDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/CdifXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/CdifXml.h new file mode 100644 index 000000000..d0a4f88ed --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/CdifXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CdifXml_h_ +#define CdifXml_h_ + +namespace Caf { + + /// Streams the Cdif class to/from XML + namespace CdifXml { + + /// Adds the CdifDoc into the XML. + void PROVIDERRESULTSXML_LINKAGE add( + const SmartPtrCCdifDoc cdifDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the CdifDoc from the XML. + SmartPtrCCdifDoc PROVIDERRESULTSXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/DefinitionObjectCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/DefinitionObjectCollectionXml.cpp new file mode 100644 index 000000000..d1ae3dfa5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/DefinitionObjectCollectionXml.cpp @@ -0,0 +1,69 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "DefinitionObjectCollectionXml.h" + +using namespace Caf; + +void DefinitionObjectCollectionXml::add( + const SmartPtrCDefinitionObjectCollectionDoc definitionObjectCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DefinitionObjectCollectionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(definitionObjectCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque valueVal = + definitionObjectCollectionDoc->getValue(); + if (! valueVal.empty()) { + for (TConstIterator > valueIter(valueVal); + valueIter; valueIter++) { + thisXml->appendValue(*valueIter); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCDefinitionObjectCollectionDoc DefinitionObjectCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DefinitionObjectCollectionXml", "parse"); + + SmartPtrCDefinitionObjectCollectionDoc definitionObjectCollectionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection valueChildrenXml = + thisXml->getAllChildren(); + + std::deque valueVal; + if (! valueChildrenXml.IsNull() && ! valueChildrenXml->empty()) { + for (TConstIterator valueXmlIter(*valueChildrenXml); + valueXmlIter; valueXmlIter++) { + const SmartPtrCXmlElement valueXml = valueXmlIter->second; + const std::string valueDoc = valueXml->saveToStringRaw(); + valueVal.push_back(valueDoc); + } + } + + definitionObjectCollectionDoc.CreateInstance(); + definitionObjectCollectionDoc->initialize( + valueVal); + } + CAF_CM_EXIT; + + return definitionObjectCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/DefinitionObjectCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/DefinitionObjectCollectionXml.h new file mode 100644 index 000000000..385cfd24c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/DefinitionObjectCollectionXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef DefinitionObjectCollectionXml_h_ +#define DefinitionObjectCollectionXml_h_ + +namespace Caf { + + /// Streams the DefinitionObjectCollection class to/from XML + namespace DefinitionObjectCollectionXml { + + /// Adds the DefinitionObjectCollectionDoc into the XML. + void PROVIDERRESULTSXML_LINKAGE add( + const SmartPtrCDefinitionObjectCollectionDoc definitionObjectCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the DefinitionObjectCollectionDoc from the XML. + SmartPtrCDefinitionObjectCollectionDoc PROVIDERRESULTSXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/ProviderResultsXmlInc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/ProviderResultsXmlInc.h new file mode 100644 index 000000000..c0aacaaf3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/ProviderResultsXmlInc.h @@ -0,0 +1,24 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ProviderResultsXml_Inc_h_ +#define ProviderResultsXml_Inc_h_ + +#include "../CafCoreTypesXml/CafCoreTypesXmlLink.h" +#include "../SchemaTypesXml/SchemaTypesXmlLink.h" +#include "SchemaXml.h" +#include "CdifXml.h" +#include "RequestIdentifierXml.h" +#include "DefinitionObjectCollectionXml.h" +#include "ProviderResultsXmlRoots.h" + +#endif /* ProviderResultsXml_Inc_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/ProviderResultsXmlLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/ProviderResultsXmlLink.h new file mode 100644 index 000000000..c07267285 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/ProviderResultsXmlLink.h @@ -0,0 +1,30 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ProviderResultsXml_Link_h_ +#define ProviderResultsXml_Link_h_ + +#ifndef PROVIDERRESULTSXML_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define PROVIDERRESULTSXML_LINKAGE __declspec(dllexport) + #else + #define PROVIDERRESULTSXML_LINKAGE __declspec(dllimport) + #endif + #else + #define PROVIDERRESULTSXML_LINKAGE + #endif +#endif + +#include "ProviderResultsXmlInc.h" + +#endif /* ProviderResultsXml_Link_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/ProviderResultsXmlRoots.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/ProviderResultsXmlRoots.cpp new file mode 100644 index 000000000..71de0634f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/ProviderResultsXmlRoots.cpp @@ -0,0 +1,165 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +using namespace Caf; + +std::string XmlRoots::saveSchemaToString( + const SmartPtrCSchemaDoc schemaDoc) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "saveSchemaToString"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(schemaDoc); + + const std::string schemaNamespace = DocXmlUtils::getSchemaNamespace("cmdl"); + const std::string schemaLocation = DocXmlUtils::getSchemaLocation("cmdl/ProviderResults.xsd"); + + const SmartPtrCXmlElement rootXml = CXmlUtils::createRootElement( + "schema", schemaNamespace, schemaLocation); + SchemaXml::add(schemaDoc, rootXml); + + rc = rootXml->saveToString(); + } + CAF_CM_EXIT; + + return rc; +} + +SmartPtrCSchemaDoc XmlRoots::parseSchemaFromString( + const std::string xml) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseSchemaFromString"); + + SmartPtrCSchemaDoc schemaDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(xml); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseString(xml, "caf:schema"); + schemaDoc = SchemaXml::parse(rootXml); + } + CAF_CM_EXIT; + + return schemaDoc; +} + +void XmlRoots::saveSchemaToFile( + const SmartPtrCSchemaDoc schemaDoc, + const std::string filePath) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("XmlRoots", "saveSchemaToFile"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(schemaDoc); + CAF_CM_VALIDATE_STRING(filePath); + + CAF_CM_LOG_DEBUG_VA1("Saving to file - %s", filePath.c_str()); + + const std::string schemaStr = + saveSchemaToString(schemaDoc); + FileSystemUtils::saveTextFile(filePath, schemaStr); + } + CAF_CM_EXIT; +} + +SmartPtrCSchemaDoc XmlRoots::parseSchemaFromFile( + const std::string filePath) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseSchemaFromFile"); + + SmartPtrCSchemaDoc schemaDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filePath); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseFile(filePath, "caf:schema"); + schemaDoc = SchemaXml::parse(rootXml); + } + CAF_CM_EXIT; + + return schemaDoc; +} + +std::string XmlRoots::saveCdifToString( + const SmartPtrCCdifDoc cdifDoc) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "saveCdifToString"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(cdifDoc); + + const std::string schemaNamespace = DocXmlUtils::getSchemaNamespace("cmdl"); + const std::string schemaLocation = DocXmlUtils::getSchemaLocation("cmdl/ProviderResults.xsd"); + + const SmartPtrCXmlElement rootXml = CXmlUtils::createRootElement( + "cdif", schemaNamespace, schemaLocation); + CdifXml::add(cdifDoc, rootXml); + + rc = rootXml->saveToString(); + } + CAF_CM_EXIT; + + return rc; +} + +SmartPtrCCdifDoc XmlRoots::parseCdifFromString( + const std::string xml) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseCdifFromString"); + + SmartPtrCCdifDoc cdifDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(xml); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseString(xml, "caf:cdif"); + cdifDoc = CdifXml::parse(rootXml); + } + CAF_CM_EXIT; + + return cdifDoc; +} + +void XmlRoots::saveCdifToFile( + const SmartPtrCCdifDoc cdifDoc, + const std::string filePath) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("XmlRoots", "saveCdifToFile"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(cdifDoc); + CAF_CM_VALIDATE_STRING(filePath); + + CAF_CM_LOG_DEBUG_VA1("Saving to file - %s", filePath.c_str()); + + const std::string cdifStr = + saveCdifToString(cdifDoc); + FileSystemUtils::saveTextFile(filePath, cdifStr); + } + CAF_CM_EXIT; +} + +SmartPtrCCdifDoc XmlRoots::parseCdifFromFile( + const std::string filePath) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseCdifFromFile"); + + SmartPtrCCdifDoc cdifDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filePath); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseFile(filePath, "caf:cdif"); + cdifDoc = CdifXml::parse(rootXml); + } + CAF_CM_EXIT; + + return cdifDoc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/ProviderResultsXmlRoots.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/ProviderResultsXmlRoots.h new file mode 100644 index 000000000..679d21d24 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/ProviderResultsXmlRoots.h @@ -0,0 +1,56 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ProviderResultsXmlRoots_h_ +#define ProviderResultsXmlRoots_h_ + +namespace Caf { + + namespace XmlRoots { + + /// Saves the SchemaDoc to a string. + std::string PROVIDERRESULTSXML_LINKAGE saveSchemaToString( + const SmartPtrCSchemaDoc schemaDoc); + + /// Parses the DefinitionObjectCollectionDoc from the string. + SmartPtrCSchemaDoc PROVIDERRESULTSXML_LINKAGE parseSchemaFromString( + const std::string xml); + + /// Saves the SchemaDoc to a file. + void PROVIDERRESULTSXML_LINKAGE saveSchemaToFile( + const SmartPtrCSchemaDoc schemaDoc, + const std::string filePath); + + /// Parses the DefinitionObjectCollectionDoc from the file. + SmartPtrCSchemaDoc PROVIDERRESULTSXML_LINKAGE parseSchemaFromFile( + const std::string filePath); + + /// Saves the CdifDoc to a string. + std::string PROVIDERRESULTSXML_LINKAGE saveCdifToString( + const SmartPtrCCdifDoc cdifDoc); + + /// Parses the DefinitionObjectCollectionDoc from the string. + SmartPtrCCdifDoc PROVIDERRESULTSXML_LINKAGE parseCdifFromString( + const std::string xml); + + /// Saves the CdifDoc to a file. + void PROVIDERRESULTSXML_LINKAGE saveCdifToFile( + const SmartPtrCCdifDoc cdifDoc, + const std::string filePath); + + /// Parses the DefinitionObjectCollectionDoc from the file. + SmartPtrCCdifDoc PROVIDERRESULTSXML_LINKAGE parseCdifFromFile( + const std::string filePath); + } +} + +#endif /* ProviderResultsXmlRoots_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/RequestIdentifierXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/RequestIdentifierXml.cpp new file mode 100644 index 000000000..1c71f0a26 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/RequestIdentifierXml.cpp @@ -0,0 +1,126 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "RequestIdentifierXml.h" + +using namespace Caf; + +void RequestIdentifierXml::add( + const SmartPtrCRequestIdentifierDoc requestIdentifierDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("RequestIdentifierXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(requestIdentifierDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdVal = + BasePlatform::UuidToString(requestIdentifierDoc->getClientId()); + CAF_CM_VALIDATE_STRING(clientIdVal); + thisXml->addAttribute("clientId", clientIdVal); + + const std::string requestIdVal = + BasePlatform::UuidToString(requestIdentifierDoc->getRequestId()); + CAF_CM_VALIDATE_STRING(requestIdVal); + thisXml->addAttribute("requestId", requestIdVal); + + const std::string pmeIdVal = requestIdentifierDoc->getPmeId(); + CAF_CM_VALIDATE_STRING(pmeIdVal); + thisXml->addAttribute("pmeId", pmeIdVal); + + const std::string jobIdVal = + BasePlatform::UuidToString(requestIdentifierDoc->getJobId()); + CAF_CM_VALIDATE_STRING(jobIdVal); + thisXml->addAttribute("jobId", jobIdVal); + + const SmartPtrCActionClassDoc actionClassVal = + requestIdentifierDoc->getActionClass(); + CAF_CM_VALIDATE_SMARTPTR(actionClassVal); + + const SmartPtrCXmlElement actionClassXml = + thisXml->createAndAddElement("actionClass"); + ActionClassXml::add(actionClassVal, actionClassXml); + + const std::string sessionIdVal = + BasePlatform::UuidToString(requestIdentifierDoc->getSessionId()); + if (! sessionIdVal.empty()) { + thisXml->addAttribute("sessionId", sessionIdVal); + } + + thisXml->addAttribute("version", "1.0"); + } + CAF_CM_EXIT; +} + +SmartPtrCRequestIdentifierDoc RequestIdentifierXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("RequestIdentifierXml", "parse"); + + SmartPtrCRequestIdentifierDoc requestIdentifierDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdStrVal = + thisXml->findRequiredAttribute("clientId"); + UUID clientIdVal = CAFCOMMON_GUID_NULL; + if (! clientIdStrVal.empty()) { + BasePlatform::UuidFromString(clientIdStrVal.c_str(), clientIdVal); + } + + const std::string requestIdStrVal = + thisXml->findRequiredAttribute("requestId"); + UUID requestIdVal = CAFCOMMON_GUID_NULL; + if (! requestIdStrVal.empty()) { + BasePlatform::UuidFromString(requestIdStrVal.c_str(), requestIdVal); + } + + const std::string pmeIdVal = + thisXml->findRequiredAttribute("pmeId"); + + const std::string jobIdStrVal = + thisXml->findRequiredAttribute("jobId"); + UUID jobIdVal = CAFCOMMON_GUID_NULL; + if (! jobIdStrVal.empty()) { + BasePlatform::UuidFromString(jobIdStrVal.c_str(), jobIdVal); + } + + const SmartPtrCXmlElement actionClassXml = + thisXml->findRequiredChild("actionClass"); + + SmartPtrCActionClassDoc actionClassVal; + if (! actionClassXml.IsNull()) { + actionClassVal = ActionClassXml::parse(actionClassXml); + } + + const std::string sessionIdStrVal = + thisXml->findOptionalAttribute("sessionId"); + UUID sessionIdVal = CAFCOMMON_GUID_NULL; + if (! sessionIdStrVal.empty()) { + BasePlatform::UuidFromString(sessionIdStrVal.c_str(), sessionIdVal); + } + + requestIdentifierDoc.CreateInstance(); + requestIdentifierDoc->initialize( + clientIdVal, + requestIdVal, + pmeIdVal, + jobIdVal, + actionClassVal, + sessionIdVal); + } + CAF_CM_EXIT; + + return requestIdentifierDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/RequestIdentifierXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/RequestIdentifierXml.h new file mode 100644 index 000000000..b4e5a800a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/RequestIdentifierXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef RequestIdentifierXml_h_ +#define RequestIdentifierXml_h_ + +namespace Caf { + + /// Streams the RequestIdentifier class to/from XML + namespace RequestIdentifierXml { + + /// Adds the RequestIdentifierDoc into the XML. + void PROVIDERRESULTSXML_LINKAGE add( + const SmartPtrCRequestIdentifierDoc requestIdentifierDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the RequestIdentifierDoc from the XML. + SmartPtrCRequestIdentifierDoc PROVIDERRESULTSXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/SchemaXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/SchemaXml.cpp new file mode 100644 index 000000000..d82e886da --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/SchemaXml.cpp @@ -0,0 +1,150 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "SchemaXml.h" + +using namespace Caf; + +void SchemaXml::add( + const SmartPtrCSchemaDoc schemaDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("SchemaXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(schemaDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque dataClassVal = + schemaDoc->getDataClassCollection(); + if (! dataClassVal.empty()) { + for (TConstIterator > dataClassIter(dataClassVal); + dataClassIter; dataClassIter++) { + const SmartPtrCXmlElement dataClassXml = + thisXml->createAndAddElement("dataClass"); + DataClassXml::add(*dataClassIter, dataClassXml); + } + } + + const std::deque actionClassVal = + schemaDoc->getActionClassCollection(); + if (! actionClassVal.empty()) { + for (TConstIterator > actionClassIter(actionClassVal); + actionClassIter; actionClassIter++) { + const SmartPtrCXmlElement actionClassXml = + thisXml->createAndAddElement("actionClass"); + ActionClassXml::add(*actionClassIter, actionClassXml); + } + } + + const std::deque logicalRelationshipVal = + schemaDoc->getLogicalRelationshipCollection(); + if (! logicalRelationshipVal.empty()) { + for (TConstIterator > logicalRelationshipIter(logicalRelationshipVal); + logicalRelationshipIter; logicalRelationshipIter++) { + const SmartPtrCXmlElement logicalRelationshipXml = + thisXml->createAndAddElement("logicalRelationship"); + LogicalRelationshipXml::add(*logicalRelationshipIter, logicalRelationshipXml); + } + } + + const std::deque physicalRelationshipVal = + schemaDoc->getPhysicalRelationshipCollection(); + if (! physicalRelationshipVal.empty()) { + for (TConstIterator > physicalRelationshipIter(physicalRelationshipVal); + physicalRelationshipIter; physicalRelationshipIter++) { + const SmartPtrCXmlElement physicalRelationshipXml = + thisXml->createAndAddElement("physicalRelationship"); + PhysicalRelationshipXml::add(*physicalRelationshipIter, physicalRelationshipXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCSchemaDoc SchemaXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("SchemaXml", "parse"); + + SmartPtrCSchemaDoc schemaDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection dataClassChildrenXml = + thisXml->findOptionalChildren("dataClass"); + + std::deque dataClassVal; + if (! dataClassChildrenXml.IsNull() && ! dataClassChildrenXml->empty()) { + for (TConstIterator dataClassXmlIter(*dataClassChildrenXml); + dataClassXmlIter; dataClassXmlIter++) { + const SmartPtrCXmlElement dataClassXml = dataClassXmlIter->second; + const SmartPtrCDataClassDoc dataClassDoc = + DataClassXml::parse(dataClassXml); + dataClassVal.push_back(dataClassDoc); + } + } + + const CXmlElement::SmartPtrCElementCollection actionClassChildrenXml = + thisXml->findOptionalChildren("actionClass"); + + std::deque actionClassVal; + if (! actionClassChildrenXml.IsNull() && ! actionClassChildrenXml->empty()) { + for (TConstIterator actionClassXmlIter(*actionClassChildrenXml); + actionClassXmlIter; actionClassXmlIter++) { + const SmartPtrCXmlElement actionClassXml = actionClassXmlIter->second; + const SmartPtrCActionClassDoc actionClassDoc = + ActionClassXml::parse(actionClassXml); + actionClassVal.push_back(actionClassDoc); + } + } + + const CXmlElement::SmartPtrCElementCollection logicalRelationshipChildrenXml = + thisXml->findOptionalChildren("logicalRelationship"); + + std::deque logicalRelationshipVal; + if (! logicalRelationshipChildrenXml.IsNull() && ! logicalRelationshipChildrenXml->empty()) { + for (TConstIterator logicalRelationshipXmlIter(*logicalRelationshipChildrenXml); + logicalRelationshipXmlIter; logicalRelationshipXmlIter++) { + const SmartPtrCXmlElement logicalRelationshipXml = logicalRelationshipXmlIter->second; + const SmartPtrCLogicalRelationshipDoc logicalRelationshipDoc = + LogicalRelationshipXml::parse(logicalRelationshipXml); + logicalRelationshipVal.push_back(logicalRelationshipDoc); + } + } + + const CXmlElement::SmartPtrCElementCollection physicalRelationshipChildrenXml = + thisXml->findOptionalChildren("physicalRelationship"); + + std::deque physicalRelationshipVal; + if (! physicalRelationshipChildrenXml.IsNull() && ! physicalRelationshipChildrenXml->empty()) { + for (TConstIterator physicalRelationshipXmlIter(*physicalRelationshipChildrenXml); + physicalRelationshipXmlIter; physicalRelationshipXmlIter++) { + const SmartPtrCXmlElement physicalRelationshipXml = physicalRelationshipXmlIter->second; + const SmartPtrCPhysicalRelationshipDoc physicalRelationshipDoc = + PhysicalRelationshipXml::parse(physicalRelationshipXml); + physicalRelationshipVal.push_back(physicalRelationshipDoc); + } + } + + schemaDoc.CreateInstance(); + schemaDoc->initialize( + dataClassVal, + actionClassVal, + logicalRelationshipVal, + physicalRelationshipVal); + } + CAF_CM_EXIT; + + return schemaDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/SchemaXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/SchemaXml.h new file mode 100644 index 000000000..bcfb6232e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/SchemaXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef SchemaXml_h_ +#define SchemaXml_h_ + +namespace Caf { + + /// Streams the Schema class to/from XML + namespace SchemaXml { + + /// Adds the SchemaDoc into the XML. + void PROVIDERRESULTSXML_LINKAGE add( + const SmartPtrCSchemaDoc schemaDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the SchemaDoc from the XML. + SmartPtrCSchemaDoc PROVIDERRESULTSXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/stdafx.h new file mode 100644 index 000000000..cf260c33a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/stdafx.h @@ -0,0 +1,28 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define PROVIDERRESULTSXML_LINKAGE __declspec(dllexport) +#else + #define PROVIDERRESULTSXML_LINKAGE +#endif + +#include +#include +#include + +#include "ProviderResultsXmlInc.h" + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ErrorResponseXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ErrorResponseXml.cpp new file mode 100644 index 000000000..de0025f49 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ErrorResponseXml.cpp @@ -0,0 +1,114 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "ErrorResponseXml.h" + +using namespace Caf; + +void ErrorResponseXml::add( + const SmartPtrCErrorResponseDoc errorResponseDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ErrorResponseXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(errorResponseDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdVal = + BasePlatform::UuidToString(errorResponseDoc->getClientId()); + if (! clientIdVal.empty()) { + thisXml->addAttribute("clientId", clientIdVal); + } + + const std::string requestIdVal = + BasePlatform::UuidToString(errorResponseDoc->getRequestId()); + if (! requestIdVal.empty()) { + thisXml->addAttribute("requestId", requestIdVal); + } + + const std::string pmeIdVal = errorResponseDoc->getPmeId(); + if (! pmeIdVal.empty()) { + thisXml->addAttribute("pmeId", pmeIdVal); + } + + const SmartPtrCResponseHeaderDoc responseHeaderVal = + errorResponseDoc->getResponseHeader(); + if (! responseHeaderVal.IsNull()) { + const SmartPtrCXmlElement responseHeaderXml = + thisXml->createAndAddElement("responseHeader"); + ResponseHeaderXml::add(responseHeaderVal, responseHeaderXml); + } + + const std::string errorMessageVal = errorResponseDoc->getErrorMessage(); + if (! errorMessageVal.empty()) { + const SmartPtrCXmlElement errorMessageXml = + thisXml->createAndAddElement("errorMessage"); + errorMessageXml->setValue(errorMessageVal); + } + } + CAF_CM_EXIT; +} + +SmartPtrCErrorResponseDoc ErrorResponseXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ErrorResponseXml", "parse"); + + SmartPtrCErrorResponseDoc errorResponseDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdStrVal = + thisXml->findOptionalAttribute("clientId"); + UUID clientIdVal = CAFCOMMON_GUID_NULL; + if (! clientIdStrVal.empty()) { + BasePlatform::UuidFromString(clientIdStrVal.c_str(), clientIdVal); + } + + const std::string requestIdStrVal = + thisXml->findOptionalAttribute("requestId"); + UUID requestIdVal = CAFCOMMON_GUID_NULL; + if (! requestIdStrVal.empty()) { + BasePlatform::UuidFromString(requestIdStrVal.c_str(), requestIdVal); + } + + const std::string pmeIdVal = + thisXml->findOptionalAttribute("pmeId"); + + const SmartPtrCXmlElement responseHeaderXml = + thisXml->findOptionalChild("responseHeader"); + SmartPtrCResponseHeaderDoc responseHeaderVal; + if (! responseHeaderXml.IsNull()) { + responseHeaderVal = ResponseHeaderXml::parse(responseHeaderXml); + } + + const SmartPtrCXmlElement errorMessageXml = + thisXml->findOptionalChild("errorMessage"); + std::string errorMessageVal; + if (! errorMessageXml.IsNull()) { + errorMessageVal = errorMessageXml->getValue(); + } + + errorResponseDoc.CreateInstance(); + errorResponseDoc->initialize( + clientIdVal, + requestIdVal, + pmeIdVal, + responseHeaderVal, + errorMessageVal); + } + CAF_CM_EXIT; + + return errorResponseDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ErrorResponseXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ErrorResponseXml.h new file mode 100644 index 000000000..cec8000b2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ErrorResponseXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ErrorResponseXml_h_ +#define ErrorResponseXml_h_ + +namespace Caf { + + /// Streams the ErrorResponse class to/from XML + namespace ErrorResponseXml { + + /// Adds the ErrorResponseDoc into the XML. + void RESPONSEXML_LINKAGE add( + const SmartPtrCErrorResponseDoc errorResponseDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ErrorResponseDoc from the XML. + SmartPtrCErrorResponseDoc RESPONSEXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/EventKeyCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/EventKeyCollectionXml.cpp new file mode 100644 index 000000000..994ef8bec --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/EventKeyCollectionXml.cpp @@ -0,0 +1,74 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "EventKeyCollectionXml.h" + +using namespace Caf; + +void EventKeyCollectionXml::add( + const SmartPtrCEventKeyCollectionDoc eventKeyCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("EventKeyCollectionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(eventKeyCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque eventKeyVal = + eventKeyCollectionDoc->getEventKey(); + CAF_CM_VALIDATE_STL(eventKeyVal); + + if (! eventKeyVal.empty()) { + for (TConstIterator > eventKeyIter(eventKeyVal); + eventKeyIter; eventKeyIter++) { + const SmartPtrCXmlElement eventKeyXml = + thisXml->createAndAddElement("eventKey"); + EventKeyXml::add(*eventKeyIter, eventKeyXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCEventKeyCollectionDoc EventKeyCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("EventKeyCollectionXml", "parse"); + + SmartPtrCEventKeyCollectionDoc eventKeyCollectionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection eventKeyChildrenXml = + thisXml->findRequiredChildren("eventKey"); + + std::deque eventKeyVal; + if (! eventKeyChildrenXml.IsNull() && ! eventKeyChildrenXml->empty()) { + for (TConstIterator eventKeyXmlIter(*eventKeyChildrenXml); + eventKeyXmlIter; eventKeyXmlIter++) { + const SmartPtrCXmlElement eventKeyXml = eventKeyXmlIter->second; + const SmartPtrCEventKeyDoc eventKeyDoc = + EventKeyXml::parse(eventKeyXml); + eventKeyVal.push_back(eventKeyDoc); + } + } + + eventKeyCollectionDoc.CreateInstance(); + eventKeyCollectionDoc->initialize( + eventKeyVal); + } + CAF_CM_EXIT; + + return eventKeyCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/EventKeyCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/EventKeyCollectionXml.h new file mode 100644 index 000000000..114f1919d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/EventKeyCollectionXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef EventKeyCollectionXml_h_ +#define EventKeyCollectionXml_h_ + +namespace Caf { + + /// Streams the EventKeyCollection class to/from XML + namespace EventKeyCollectionXml { + + /// Adds the EventKeyCollectionDoc into the XML. + void RESPONSEXML_LINKAGE add( + const SmartPtrCEventKeyCollectionDoc eventKeyCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the EventKeyCollectionDoc from the XML. + SmartPtrCEventKeyCollectionDoc RESPONSEXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/EventKeyXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/EventKeyXml.cpp new file mode 100644 index 000000000..52073ce9d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/EventKeyXml.cpp @@ -0,0 +1,64 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "EventKeyXml.h" + +using namespace Caf; + +void EventKeyXml::add( + const SmartPtrCEventKeyDoc eventKeyDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("EventKeyXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(eventKeyDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameVal = eventKeyDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::string valueVal = eventKeyDoc->getValue(); + CAF_CM_VALIDATE_STRING(valueVal); + thisXml->addAttribute("value", valueVal); + } + CAF_CM_EXIT; +} + +SmartPtrCEventKeyDoc EventKeyXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("EventKeyXml", "parse"); + + SmartPtrCEventKeyDoc eventKeyDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const std::string valueStrVal = + thisXml->findRequiredAttribute("value"); + const std::string valueVal = valueStrVal; + + eventKeyDoc.CreateInstance(); + eventKeyDoc->initialize( + nameVal, + valueVal); + } + CAF_CM_EXIT; + + return eventKeyDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/EventKeyXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/EventKeyXml.h new file mode 100644 index 000000000..af1fcc822 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/EventKeyXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef EventKeyXml_h_ +#define EventKeyXml_h_ + +namespace Caf { + + /// Streams the EventKey class to/from XML + namespace EventKeyXml { + + /// Adds the EventKeyDoc into the XML. + void RESPONSEXML_LINKAGE add( + const SmartPtrCEventKeyDoc eventKeyDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the EventKeyDoc from the XML. + SmartPtrCEventKeyDoc RESPONSEXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/EventManifestXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/EventManifestXml.cpp new file mode 100644 index 000000000..e3ca7054c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/EventManifestXml.cpp @@ -0,0 +1,99 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "EventManifestXml.h" + +using namespace Caf; + +void EventManifestXml::add( + const SmartPtrCEventManifestDoc eventManifestDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("EventManifestXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(eventManifestDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string classNamespaceVal = eventManifestDoc->getClassNamespace(); + CAF_CM_VALIDATE_STRING(classNamespaceVal); + thisXml->addAttribute("classNamespace", classNamespaceVal); + + const std::string classNameVal = eventManifestDoc->getClassName(); + CAF_CM_VALIDATE_STRING(classNameVal); + thisXml->addAttribute("className", classNameVal); + + const std::string classVersionVal = eventManifestDoc->getClassVersion(); + CAF_CM_VALIDATE_STRING(classVersionVal); + thisXml->addAttribute("classVersion", classVersionVal); + + const std::string operationNameVal = eventManifestDoc->getOperationName(); + CAF_CM_VALIDATE_STRING(operationNameVal); + thisXml->addAttribute("operationName", operationNameVal); + + const SmartPtrCAttachmentCollectionDoc attachmentCollectionVal = + eventManifestDoc->getAttachmentCollection(); + CAF_CM_VALIDATE_SMARTPTR(attachmentCollectionVal); + + const SmartPtrCXmlElement attachmentCollectionXml = + thisXml->createAndAddElement("attachmentCollection"); + AttachmentCollectionXml::add(attachmentCollectionVal, attachmentCollectionXml); + } + CAF_CM_EXIT; +} + +SmartPtrCEventManifestDoc EventManifestXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("EventManifestXml", "parse"); + + SmartPtrCEventManifestDoc eventManifestDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string classNamespaceStrVal = + thisXml->findRequiredAttribute("classNamespace"); + const std::string classNamespaceVal = classNamespaceStrVal; + + const std::string classNameStrVal = + thisXml->findRequiredAttribute("className"); + const std::string classNameVal = classNameStrVal; + + const std::string classVersionStrVal = + thisXml->findRequiredAttribute("classVersion"); + const std::string classVersionVal = classVersionStrVal; + + const std::string operationNameStrVal = + thisXml->findRequiredAttribute("operationName"); + const std::string operationNameVal = operationNameStrVal; + + const SmartPtrCXmlElement attachmentCollectionXml = + thisXml->findRequiredChild("attachmentCollection"); + + SmartPtrCAttachmentCollectionDoc attachmentCollectionVal; + if (! attachmentCollectionXml.IsNull()) { + attachmentCollectionVal = AttachmentCollectionXml::parse(attachmentCollectionXml); + } + + eventManifestDoc.CreateInstance(); + eventManifestDoc->initialize( + classNamespaceVal, + classNameVal, + classVersionVal, + operationNameVal, + attachmentCollectionVal); + } + CAF_CM_EXIT; + + return eventManifestDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/EventManifestXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/EventManifestXml.h new file mode 100644 index 000000000..e922b89e4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/EventManifestXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef EventManifestXml_h_ +#define EventManifestXml_h_ + +namespace Caf { + + /// Streams the EventManifest class to/from XML + namespace EventManifestXml { + + /// Adds the EventManifestDoc into the XML. + void RESPONSEXML_LINKAGE add( + const SmartPtrCEventManifestDoc eventManifestDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the EventManifestDoc from the XML. + SmartPtrCEventManifestDoc RESPONSEXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ManifestCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ManifestCollectionXml.cpp new file mode 100644 index 000000000..bd86efd34 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ManifestCollectionXml.cpp @@ -0,0 +1,74 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "ManifestCollectionXml.h" + +using namespace Caf; + +void ManifestCollectionXml::add( + const SmartPtrCManifestCollectionDoc manifestCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ManifestCollectionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(manifestCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque manifestVal = + manifestCollectionDoc->getManifest(); + CAF_CM_VALIDATE_STL(manifestVal); + + if (! manifestVal.empty()) { + for (TConstIterator > manifestIter(manifestVal); + manifestIter; manifestIter++) { + const SmartPtrCXmlElement manifestXml = + thisXml->createAndAddElement("manifest"); + ManifestXml::add(*manifestIter, manifestXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCManifestCollectionDoc ManifestCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ManifestCollectionXml", "parse"); + + SmartPtrCManifestCollectionDoc manifestCollectionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection manifestChildrenXml = + thisXml->findRequiredChildren("manifest"); + + std::deque manifestVal; + if (! manifestChildrenXml.IsNull() && ! manifestChildrenXml->empty()) { + for (TConstIterator manifestXmlIter(*manifestChildrenXml); + manifestXmlIter; manifestXmlIter++) { + const SmartPtrCXmlElement manifestXml = manifestXmlIter->second; + const SmartPtrCManifestDoc manifestDoc = + ManifestXml::parse(manifestXml); + manifestVal.push_back(manifestDoc); + } + } + + manifestCollectionDoc.CreateInstance(); + manifestCollectionDoc->initialize( + manifestVal); + } + CAF_CM_EXIT; + + return manifestCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ManifestCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ManifestCollectionXml.h new file mode 100644 index 000000000..81613fb60 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ManifestCollectionXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ManifestCollectionXml_h_ +#define ManifestCollectionXml_h_ + +namespace Caf { + + /// Streams the ManifestCollection class to/from XML + namespace ManifestCollectionXml { + + /// Adds the ManifestCollectionDoc into the XML. + void RESPONSEXML_LINKAGE add( + const SmartPtrCManifestCollectionDoc manifestCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ManifestCollectionDoc from the XML. + SmartPtrCManifestCollectionDoc RESPONSEXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ManifestXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ManifestXml.cpp new file mode 100644 index 000000000..e1a6ed22f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ManifestXml.cpp @@ -0,0 +1,112 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "ManifestXml.h" + +using namespace Caf; + +void ManifestXml::add( + const SmartPtrCManifestDoc manifestDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ManifestXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(manifestDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string classNamespaceVal = manifestDoc->getClassNamespace(); + CAF_CM_VALIDATE_STRING(classNamespaceVal); + thisXml->addAttribute("classNamespace", classNamespaceVal); + + const std::string classNameVal = manifestDoc->getClassName(); + CAF_CM_VALIDATE_STRING(classNameVal); + thisXml->addAttribute("className", classNameVal); + + const std::string classVersionVal = manifestDoc->getClassVersion(); + CAF_CM_VALIDATE_STRING(classVersionVal); + thisXml->addAttribute("classVersion", classVersionVal); + + const std::string jobIdVal = + BasePlatform::UuidToString(manifestDoc->getJobId()); + CAF_CM_VALIDATE_STRING(jobIdVal); + thisXml->addAttribute("jobId", jobIdVal); + + const std::string operationNameVal = manifestDoc->getOperationName(); + CAF_CM_VALIDATE_STRING(operationNameVal); + thisXml->addAttribute("operationName", operationNameVal); + + const SmartPtrCAttachmentNameCollectionDoc attachmentNameCollectionVal = + manifestDoc->getAttachmentNameCollection(); + CAF_CM_VALIDATE_SMARTPTR(attachmentNameCollectionVal); + + const SmartPtrCXmlElement attachmentNameCollectionXml = + thisXml->createAndAddElement("attachmentNameCollection"); + AttachmentNameCollectionXml::add(attachmentNameCollectionVal, attachmentNameCollectionXml); + } + CAF_CM_EXIT; +} + +SmartPtrCManifestDoc ManifestXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ManifestXml", "parse"); + + SmartPtrCManifestDoc manifestDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string classNamespaceStrVal = + thisXml->findRequiredAttribute("classNamespace"); + const std::string classNamespaceVal = classNamespaceStrVal; + + const std::string classNameStrVal = + thisXml->findRequiredAttribute("className"); + const std::string classNameVal = classNameStrVal; + + const std::string classVersionStrVal = + thisXml->findRequiredAttribute("classVersion"); + const std::string classVersionVal = classVersionStrVal; + + const std::string jobIdStrVal = + thisXml->findRequiredAttribute("jobId"); + UUID jobIdVal = CAFCOMMON_GUID_NULL; + if (! jobIdStrVal.empty()) { + BasePlatform::UuidFromString(jobIdStrVal.c_str(), jobIdVal); + } + + const std::string operationNameStrVal = + thisXml->findRequiredAttribute("operationName"); + const std::string operationNameVal = operationNameStrVal; + + const SmartPtrCXmlElement attachmentNameCollectionXml = + thisXml->findRequiredChild("attachmentNameCollection"); + + SmartPtrCAttachmentNameCollectionDoc attachmentNameCollectionVal; + if (! attachmentNameCollectionXml.IsNull()) { + attachmentNameCollectionVal = AttachmentNameCollectionXml::parse(attachmentNameCollectionXml); + } + + manifestDoc.CreateInstance(); + manifestDoc->initialize( + classNamespaceVal, + classNameVal, + classVersionVal, + jobIdVal, + operationNameVal, + attachmentNameCollectionVal); + } + CAF_CM_EXIT; + + return manifestDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ManifestXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ManifestXml.h new file mode 100644 index 000000000..869bd79c2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ManifestXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ManifestXml_h_ +#define ManifestXml_h_ + +namespace Caf { + + /// Streams the Manifest class to/from XML + namespace ManifestXml { + + /// Adds the ManifestDoc into the XML. + void RESPONSEXML_LINKAGE add( + const SmartPtrCManifestDoc manifestDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ManifestDoc from the XML. + SmartPtrCManifestDoc RESPONSEXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ProviderEventResponseXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ProviderEventResponseXml.cpp new file mode 100644 index 000000000..bb9616802 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ProviderEventResponseXml.cpp @@ -0,0 +1,118 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "ProviderEventResponseXml.h" + +using namespace Caf; + +void ProviderEventResponseXml::add( + const SmartPtrCProviderEventResponseDoc providerEventResponseDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderEventResponseXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(providerEventResponseDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string pmeIdVal = providerEventResponseDoc->getPmeId(); + CAF_CM_VALIDATE_STRING(pmeIdVal); + thisXml->addAttribute("pmeId", pmeIdVal); + + const SmartPtrCResponseHeaderDoc responseHeaderVal = + providerEventResponseDoc->getResponseHeader(); + if (! responseHeaderVal.IsNull()) { + const SmartPtrCXmlElement responseHeaderXml = + thisXml->createAndAddElement("responseHeader"); + ResponseHeaderXml::add(responseHeaderVal, responseHeaderXml); + } + + const SmartPtrCEventManifestDoc manifestVal = + providerEventResponseDoc->getManifest(); + CAF_CM_VALIDATE_SMARTPTR(manifestVal); + + const SmartPtrCXmlElement manifestXml = + thisXml->createAndAddElement("manifest"); + EventManifestXml::add(manifestVal, manifestXml); + + const SmartPtrCEventKeyCollectionDoc eventKeyCollectionVal = + providerEventResponseDoc->getEventKeyCollection(); + if (! eventKeyCollectionVal.IsNull()) { + const SmartPtrCXmlElement eventKeyCollectionXml = + thisXml->createAndAddElement("eventKeyCollection"); + EventKeyCollectionXml::add(eventKeyCollectionVal, eventKeyCollectionXml); + } + + const SmartPtrCStatisticsDoc statisticsVal = + providerEventResponseDoc->getStatistics(); + if (! statisticsVal.IsNull()) { + const SmartPtrCXmlElement statisticsXml = + thisXml->createAndAddElement("statistics"); + StatisticsXml::add(statisticsVal, statisticsXml); + } + } + CAF_CM_EXIT; +} + +SmartPtrCProviderEventResponseDoc ProviderEventResponseXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderEventResponseXml", "parse"); + + SmartPtrCProviderEventResponseDoc providerEventResponseDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string pmeIdVal = + thisXml->findRequiredAttribute("pmeId"); + + const SmartPtrCXmlElement responseHeaderXml = + thisXml->findOptionalChild("responseHeader"); + SmartPtrCResponseHeaderDoc responseHeaderVal; + if (! responseHeaderXml.IsNull()) { + responseHeaderVal = ResponseHeaderXml::parse(responseHeaderXml); + } + + const SmartPtrCXmlElement manifestXml = + thisXml->findRequiredChild("manifest"); + SmartPtrCEventManifestDoc manifestVal; + if (! manifestXml.IsNull()) { + manifestVal = EventManifestXml::parse(manifestXml); + } + + const SmartPtrCXmlElement eventKeyCollectionXml = + thisXml->findOptionalChild("eventKeyCollection"); + SmartPtrCEventKeyCollectionDoc eventKeyCollectionVal; + if (! eventKeyCollectionXml.IsNull()) { + eventKeyCollectionVal = EventKeyCollectionXml::parse(eventKeyCollectionXml); + } + + const SmartPtrCXmlElement statisticsXml = + thisXml->findOptionalChild("statistics"); + SmartPtrCStatisticsDoc statisticsVal; + if (! statisticsXml.IsNull()) { + statisticsVal = StatisticsXml::parse(statisticsXml); + } + + providerEventResponseDoc.CreateInstance(); + providerEventResponseDoc->initialize( + pmeIdVal, + responseHeaderVal, + manifestVal, + eventKeyCollectionVal, + statisticsVal); + } + CAF_CM_EXIT; + + return providerEventResponseDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ProviderEventResponseXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ProviderEventResponseXml.h new file mode 100644 index 000000000..590c0c6db --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ProviderEventResponseXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ProviderEventResponseXml_h_ +#define ProviderEventResponseXml_h_ + +namespace Caf { + + /// Streams the ProviderEventResponse class to/from XML + namespace ProviderEventResponseXml { + + /// Adds the ProviderEventResponseDoc into the XML. + void RESPONSEXML_LINKAGE add( + const SmartPtrCProviderEventResponseDoc providerEventResponseDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ProviderEventResponseDoc from the XML. + SmartPtrCProviderEventResponseDoc RESPONSEXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ProviderResponseXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ProviderResponseXml.cpp new file mode 100644 index 000000000..111c77739 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ProviderResponseXml.cpp @@ -0,0 +1,147 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "ProviderResponseXml.h" + +using namespace Caf; + +void ProviderResponseXml::add( + const SmartPtrCProviderResponseDoc providerResponseDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderResponseXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(providerResponseDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdVal = + BasePlatform::UuidToString(providerResponseDoc->getClientId()); + if (! clientIdVal.empty()) { + thisXml->addAttribute("clientId", clientIdVal); + } + + const std::string requestIdVal = + BasePlatform::UuidToString(providerResponseDoc->getRequestId()); + if (! requestIdVal.empty()) { + thisXml->addAttribute("requestId", requestIdVal); + } + + const std::string pmeIdVal = providerResponseDoc->getPmeId(); + if (! pmeIdVal.empty()) { + thisXml->addAttribute("pmeId", pmeIdVal); + } + + const SmartPtrCResponseHeaderDoc responseHeaderVal = + providerResponseDoc->getResponseHeader(); + if (! responseHeaderVal.IsNull()) { + const SmartPtrCXmlElement responseHeaderXml = + thisXml->createAndAddElement("responseHeader"); + ResponseHeaderXml::add(responseHeaderVal, responseHeaderXml); + } + + const SmartPtrCManifestDoc manifestVal = + providerResponseDoc->getManifest(); + if (! manifestVal.IsNull()) { + const SmartPtrCXmlElement manifestXml = + thisXml->createAndAddElement("manifest"); + ManifestXml::add(manifestVal, manifestXml); + } + + const SmartPtrCAttachmentCollectionDoc attachmentCollectionVal = + providerResponseDoc->getAttachmentCollection(); + if (! attachmentCollectionVal.IsNull()) { + const SmartPtrCXmlElement attachmentCollectionXml = + thisXml->createAndAddElement("attachmentCollection"); + AttachmentCollectionXml::add(attachmentCollectionVal, attachmentCollectionXml); + } + + const SmartPtrCStatisticsDoc statisticsVal = + providerResponseDoc->getStatistics(); + if (! statisticsVal.IsNull()) { + const SmartPtrCXmlElement statisticsXml = + thisXml->createAndAddElement("statistics"); + StatisticsXml::add(statisticsVal, statisticsXml); + } + } + CAF_CM_EXIT; +} + +SmartPtrCProviderResponseDoc ProviderResponseXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderResponseXml", "parse"); + + SmartPtrCProviderResponseDoc providerResponseDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdStrVal = + thisXml->findOptionalAttribute("clientId"); + UUID clientIdVal = CAFCOMMON_GUID_NULL; + if (! clientIdStrVal.empty()) { + BasePlatform::UuidFromString(clientIdStrVal.c_str(), clientIdVal); + } + + const std::string requestIdStrVal = + thisXml->findOptionalAttribute("requestId"); + UUID requestIdVal = CAFCOMMON_GUID_NULL; + if (! requestIdStrVal.empty()) { + BasePlatform::UuidFromString(requestIdStrVal.c_str(), requestIdVal); + } + + const std::string pmeIdVal = + thisXml->findOptionalAttribute("pmeId"); + + const SmartPtrCXmlElement responseHeaderXml = + thisXml->findOptionalChild("responseHeader"); + SmartPtrCResponseHeaderDoc responseHeaderVal; + if (! responseHeaderXml.IsNull()) { + responseHeaderVal = ResponseHeaderXml::parse(responseHeaderXml); + } + + const SmartPtrCXmlElement manifestXml = + thisXml->findOptionalChild("manifest"); + SmartPtrCManifestDoc manifestVal; + if (! manifestXml.IsNull()) { + manifestVal = ManifestXml::parse(manifestXml); + } + + const SmartPtrCXmlElement attachmentCollectionXml = + thisXml->findOptionalChild("attachmentCollection"); + SmartPtrCAttachmentCollectionDoc attachmentCollectionVal; + if (! attachmentCollectionXml.IsNull()) { + attachmentCollectionVal = AttachmentCollectionXml::parse(attachmentCollectionXml); + } + + const SmartPtrCXmlElement statisticsXml = + thisXml->findOptionalChild("statistics"); + SmartPtrCStatisticsDoc statisticsVal; + if (! statisticsXml.IsNull()) { + statisticsVal = StatisticsXml::parse(statisticsXml); + } + + providerResponseDoc.CreateInstance(); + providerResponseDoc->initialize( + clientIdVal, + requestIdVal, + pmeIdVal, + responseHeaderVal, + manifestVal, + attachmentCollectionVal, + statisticsVal); + } + CAF_CM_EXIT; + + return providerResponseDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ProviderResponseXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ProviderResponseXml.h new file mode 100644 index 000000000..c1d901ce1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ProviderResponseXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ProviderResponseXml_h_ +#define ProviderResponseXml_h_ + +namespace Caf { + + /// Streams the ProviderResponse class to/from XML + namespace ProviderResponseXml { + + /// Adds the ProviderResponseDoc into the XML. + void RESPONSEXML_LINKAGE add( + const SmartPtrCProviderResponseDoc providerResponseDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ProviderResponseDoc from the XML. + SmartPtrCProviderResponseDoc RESPONSEXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ResponseHeaderXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ResponseHeaderXml.cpp new file mode 100644 index 000000000..c7f5180fa --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ResponseHeaderXml.cpp @@ -0,0 +1,101 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "ResponseHeaderXml.h" + +using namespace Caf; + +void ResponseHeaderXml::add( + const SmartPtrCResponseHeaderDoc responseHeaderDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ResponseHeaderXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(responseHeaderDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string versionVal = responseHeaderDoc->getVersion(); + CAF_CM_VALIDATE_STRING(versionVal); + thisXml->addAttribute("version", versionVal); + + const std::string createdDateTimeVal = responseHeaderDoc->getCreatedDateTime(); + CAF_CM_VALIDATE_STRING(createdDateTimeVal); + thisXml->addAttribute("createdDateTime", createdDateTimeVal); + + const std::string sequenceNumberVal = + CStringConv::toString(responseHeaderDoc->getSequenceNumber()); + CAF_CM_VALIDATE_STRING(sequenceNumberVal); + thisXml->addAttribute("sequenceNumber", sequenceNumberVal); + + const std::string isFinalResponseVal = responseHeaderDoc->getIsFinalResponse() ? "true" : "false"; + CAF_CM_VALIDATE_STRING(isFinalResponseVal); + thisXml->addAttribute("isFinalResponse", isFinalResponseVal); + + const std::string sessionIdVal = + BasePlatform::UuidToString(responseHeaderDoc->getSessionId()); + if (! sessionIdVal.empty()) { + thisXml->addAttribute("sessionId", sessionIdVal); + } + } + CAF_CM_EXIT; +} + +SmartPtrCResponseHeaderDoc ResponseHeaderXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ResponseHeaderXml", "parse"); + + SmartPtrCResponseHeaderDoc responseHeaderDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string versionVal = + thisXml->findRequiredAttribute("version"); + + const std::string createdDateTimeVal = + thisXml->findRequiredAttribute("createdDateTime"); + + const std::string sequenceNumberStrVal = + thisXml->findRequiredAttribute("sequenceNumber"); + uint32 sequenceNumberVal = 0; + if (! sequenceNumberStrVal.empty()) { + sequenceNumberVal = CStringConv::fromString(sequenceNumberStrVal); + } + + const std::string isFinalResponseStrVal = + thisXml->findRequiredAttribute("isFinalResponse"); + bool isFinalResponseVal = false; + if (! isFinalResponseStrVal.empty()) { + isFinalResponseVal = (isFinalResponseStrVal.compare("true") == 0) ? true : false; + } + + const std::string sessionIdStrVal = + thisXml->findOptionalAttribute("sessionId"); + UUID sessionIdVal = CAFCOMMON_GUID_NULL; + if (! sessionIdStrVal.empty()) { + BasePlatform::UuidFromString(sessionIdStrVal.c_str(), sessionIdVal); + } + + responseHeaderDoc.CreateInstance(); + responseHeaderDoc->initialize( + versionVal, + createdDateTimeVal, + sequenceNumberVal, + isFinalResponseVal, + sessionIdVal); + } + CAF_CM_EXIT; + + return responseHeaderDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ResponseHeaderXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ResponseHeaderXml.h new file mode 100644 index 000000000..07916295e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ResponseHeaderXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ResponseHeaderXml_h_ +#define ResponseHeaderXml_h_ + +namespace Caf { + + /// Streams the ResponseHeader class to/from XML + namespace ResponseHeaderXml { + + /// Adds the ResponseHeaderDoc into the XML. + void RESPONSEXML_LINKAGE add( + const SmartPtrCResponseHeaderDoc responseHeaderDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ResponseHeaderDoc from the XML. + SmartPtrCResponseHeaderDoc RESPONSEXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ResponseXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ResponseXml.cpp new file mode 100644 index 000000000..b722cf3b9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ResponseXml.cpp @@ -0,0 +1,148 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "ResponseXml.h" + +using namespace Caf; + +void ResponseXml::add( + const SmartPtrCResponseDoc responseDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ResponseXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(responseDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdVal = + BasePlatform::UuidToString(responseDoc->getClientId()); + if (! clientIdVal.empty()) { + thisXml->addAttribute("clientId", clientIdVal); + } + + const std::string requestIdVal = + BasePlatform::UuidToString(responseDoc->getRequestId()); + if (! requestIdVal.empty()) { + thisXml->addAttribute("requestId", requestIdVal); + } + + const std::string pmeIdVal = responseDoc->getPmeId(); + if (! pmeIdVal.empty()) { + thisXml->addAttribute("pmeId", pmeIdVal); + } + + const SmartPtrCResponseHeaderDoc responseHeaderVal = + responseDoc->getResponseHeader(); + if (! responseHeaderVal.IsNull()) { + const SmartPtrCXmlElement responseHeaderXml = + thisXml->createAndAddElement("responseHeader"); + ResponseHeaderXml::add(responseHeaderVal, responseHeaderXml); + } + + const SmartPtrCManifestCollectionDoc manifestCollectionVal = + responseDoc->getManifestCollection(); + if (! manifestCollectionVal.IsNull()) { + const SmartPtrCXmlElement manifestCollectionXml = + thisXml->createAndAddElement("manifestCollection"); + ManifestCollectionXml::add(manifestCollectionVal, manifestCollectionXml); + } + + const SmartPtrCAttachmentCollectionDoc attachmentCollectionVal = + responseDoc->getAttachmentCollection(); + if (! attachmentCollectionVal.IsNull()) { + const SmartPtrCXmlElement attachmentCollectionXml = + thisXml->createAndAddElement("attachmentCollection"); + AttachmentCollectionXml::add(attachmentCollectionVal, attachmentCollectionXml); + } + + const SmartPtrCStatisticsDoc statisticsVal = + responseDoc->getStatistics(); + if (! statisticsVal.IsNull()) { + const SmartPtrCXmlElement statisticsXml = + thisXml->createAndAddElement("statistics"); + StatisticsXml::add(statisticsVal, statisticsXml); + } + } + CAF_CM_EXIT; +} + +SmartPtrCResponseDoc ResponseXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ResponseXml", "parse"); + + SmartPtrCResponseDoc responseDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdStrVal = + thisXml->findOptionalAttribute("clientId"); + UUID clientIdVal = CAFCOMMON_GUID_NULL; + if (! clientIdStrVal.empty()) { + BasePlatform::UuidFromString(clientIdStrVal.c_str(), clientIdVal); + } + + const std::string requestIdStrVal = + thisXml->findOptionalAttribute("requestId"); + UUID requestIdVal = CAFCOMMON_GUID_NULL; + if (! requestIdStrVal.empty()) { + BasePlatform::UuidFromString(requestIdStrVal.c_str(), requestIdVal); + } + + const std::string pmeIdVal = + thisXml->findOptionalAttribute("pmeId"); + + const SmartPtrCXmlElement responseHeaderXml = + thisXml->findOptionalChild("responseHeader"); + SmartPtrCResponseHeaderDoc responseHeaderVal; + if (! responseHeaderXml.IsNull()) { + responseHeaderVal = ResponseHeaderXml::parse(responseHeaderXml); + } + + const SmartPtrCXmlElement manifestCollectionXml = + thisXml->findOptionalChild("manifestCollection"); + + SmartPtrCManifestCollectionDoc manifestCollectionVal; + if (! manifestCollectionXml.IsNull()) { + manifestCollectionVal = ManifestCollectionXml::parse(manifestCollectionXml); + } + + const SmartPtrCXmlElement attachmentCollectionXml = + thisXml->findOptionalChild("attachmentCollection"); + SmartPtrCAttachmentCollectionDoc attachmentCollectionVal; + if (! attachmentCollectionXml.IsNull()) { + attachmentCollectionVal = AttachmentCollectionXml::parse(attachmentCollectionXml); + } + + const SmartPtrCXmlElement statisticsXml = + thisXml->findOptionalChild("statistics"); + SmartPtrCStatisticsDoc statisticsVal; + if (! statisticsXml.IsNull()) { + statisticsVal = StatisticsXml::parse(statisticsXml); + } + + responseDoc.CreateInstance(); + responseDoc->initialize( + clientIdVal, + requestIdVal, + pmeIdVal, + responseHeaderVal, + manifestCollectionVal, + attachmentCollectionVal, + statisticsVal); + } + CAF_CM_EXIT; + + return responseDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ResponseXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ResponseXml.h new file mode 100644 index 000000000..12ce62447 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ResponseXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ResponseXml_h_ +#define ResponseXml_h_ + +namespace Caf { + + /// Streams the Response class to/from XML + namespace ResponseXml { + + /// Adds the ResponseDoc into the XML. + void RESPONSEXML_LINKAGE add( + const SmartPtrCResponseDoc responseDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ResponseDoc from the XML. + SmartPtrCResponseDoc RESPONSEXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ResponseXmlInc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ResponseXmlInc.h new file mode 100644 index 000000000..6b3cde3da --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ResponseXmlInc.h @@ -0,0 +1,29 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ResponseXml_Inc_h_ +#define ResponseXml_Inc_h_ + +#include "../CafCoreTypesXml/CafCoreTypesXmlLink.h" +#include "ManifestXml.h" +#include "EventManifestXml.h" +#include "ManifestCollectionXml.h" +#include "EventKeyXml.h" +#include "EventKeyCollectionXml.h" +#include "ProviderResponseXml.h" +#include "ProviderEventResponseXml.h" +#include "ResponseXml.h" +#include "ResponseHeaderXml.h" +#include "ErrorResponseXml.h" +#include "ResponseXmlRoots.h" + +#endif /* ResponseXml_Inc_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ResponseXmlLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ResponseXmlLink.h new file mode 100644 index 000000000..a6208436e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ResponseXmlLink.h @@ -0,0 +1,30 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ResponseXml_Link_h_ +#define ResponseXml_Link_h_ + +#ifndef RESPONSEXML_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define RESPONSEXML_LINKAGE __declspec(dllexport) + #else + #define RESPONSEXML_LINKAGE __declspec(dllimport) + #endif + #else + #define RESPONSEXML_LINKAGE + #endif +#endif + +#include "ResponseXmlInc.h" + +#endif /* ResponseXml_Link_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ResponseXmlRoots.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ResponseXmlRoots.cpp new file mode 100644 index 000000000..67add7d10 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ResponseXmlRoots.cpp @@ -0,0 +1,315 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +using namespace Caf; + +std::string XmlRoots::saveErrorResponseToString( + const SmartPtrCErrorResponseDoc errorResponseDoc) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "saveErrorResponseToString"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(errorResponseDoc); + + const std::string schemaNamespace = DocXmlUtils::getSchemaNamespace("fx"); + const std::string schemaLocation = DocXmlUtils::getSchemaLocation("fx/Response.xsd"); + + const SmartPtrCXmlElement rootXml = CXmlUtils::createRootElement( + "errorResponse", schemaNamespace, schemaLocation); + ErrorResponseXml::add(errorResponseDoc, rootXml); + + rc = rootXml->saveToString(); + } + CAF_CM_EXIT; + + return rc; +} + +SmartPtrCErrorResponseDoc XmlRoots::parseErrorResponseFromString( + const std::string xml) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseErrorResponseFromString"); + + SmartPtrCErrorResponseDoc errorResponseDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(xml); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseString(xml, "caf:errorResponse"); + errorResponseDoc = ErrorResponseXml::parse(rootXml); + } + CAF_CM_EXIT; + + return errorResponseDoc; +} + +void XmlRoots::saveErrorResponseToFile( + const SmartPtrCErrorResponseDoc errorResponseDoc, + const std::string filePath) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("XmlRoots", "saveErrorResponseToFile"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(errorResponseDoc); + CAF_CM_VALIDATE_STRING(filePath); + + CAF_CM_LOG_DEBUG_VA1("Saving to file - %s", filePath.c_str()); + + const std::string errorResponseStr = + saveErrorResponseToString(errorResponseDoc); + FileSystemUtils::saveTextFile(filePath, errorResponseStr); + } + CAF_CM_EXIT; +} + +SmartPtrCErrorResponseDoc XmlRoots::parseErrorResponseFromFile( + const std::string filePath) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseErrorResponseFromFile"); + + SmartPtrCErrorResponseDoc errorResponseDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filePath); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseFile(filePath, "caf:errorResponse"); + errorResponseDoc = ErrorResponseXml::parse(rootXml); + } + CAF_CM_EXIT; + + return errorResponseDoc; +} + +std::string XmlRoots::saveProviderResponseToString( + const SmartPtrCProviderResponseDoc providerResponseDoc) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "saveProviderResponseToString"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(providerResponseDoc); + + const std::string schemaNamespace = DocXmlUtils::getSchemaNamespace("fx"); + const std::string schemaLocation = DocXmlUtils::getSchemaLocation("fx/Response.xsd"); + + const SmartPtrCXmlElement rootXml = CXmlUtils::createRootElement( + "providerResponse", schemaNamespace, schemaLocation); + ProviderResponseXml::add(providerResponseDoc, rootXml); + + rc = rootXml->saveToString(); + } + CAF_CM_EXIT; + + return rc; +} + +SmartPtrCProviderResponseDoc XmlRoots::parseProviderResponseFromString( + const std::string xml) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseProviderResponseFromString"); + + SmartPtrCProviderResponseDoc providerResponseDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(xml); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseString(xml, "caf:providerResponse"); + providerResponseDoc = ProviderResponseXml::parse(rootXml); + } + CAF_CM_EXIT; + + return providerResponseDoc; +} + +void XmlRoots::saveProviderResponseToFile( + const SmartPtrCProviderResponseDoc providerResponseDoc, + const std::string filePath) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("XmlRoots", "saveProviderResponseToFile"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(providerResponseDoc); + CAF_CM_VALIDATE_STRING(filePath); + + CAF_CM_LOG_DEBUG_VA1("Saving to file - %s", filePath.c_str()); + + const std::string providerResponseStr = + saveProviderResponseToString(providerResponseDoc); + FileSystemUtils::saveTextFile(filePath, providerResponseStr); + } + CAF_CM_EXIT; +} + +SmartPtrCProviderResponseDoc XmlRoots::parseProviderResponseFromFile( + const std::string filePath) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseProviderResponseFromFile"); + + SmartPtrCProviderResponseDoc providerResponseDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filePath); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseFile(filePath, "caf:providerResponse"); + providerResponseDoc = ProviderResponseXml::parse(rootXml); + } + CAF_CM_EXIT; + + return providerResponseDoc; +} + +std::string XmlRoots::saveResponseToString( + const SmartPtrCResponseDoc responseDoc) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "saveResponseToString"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(responseDoc); + + const std::string schemaNamespace = DocXmlUtils::getSchemaNamespace("fx"); + const std::string schemaLocation = DocXmlUtils::getSchemaLocation("fx/Response.xsd"); + + const SmartPtrCXmlElement rootXml = CXmlUtils::createRootElement( + "response", schemaNamespace, schemaLocation); + ResponseXml::add(responseDoc, rootXml); + + rc = rootXml->saveToString(); + } + CAF_CM_EXIT; + + return rc; +} + +SmartPtrCResponseDoc XmlRoots::parseResponseFromString( + const std::string xml) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseResponseFromString"); + + SmartPtrCResponseDoc responseDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(xml); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseString(xml, "caf:response"); + responseDoc = ResponseXml::parse(rootXml); + } + CAF_CM_EXIT; + + return responseDoc; +} + +void XmlRoots::saveResponseToFile( + const SmartPtrCResponseDoc responseDoc, + const std::string filePath) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("XmlRoots", "saveResponseToFile"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(responseDoc); + CAF_CM_VALIDATE_STRING(filePath); + + CAF_CM_LOG_DEBUG_VA1("Saving to file - %s", filePath.c_str()); + + const std::string responseStr = + saveResponseToString(responseDoc); + FileSystemUtils::saveTextFile(filePath, responseStr); + } + CAF_CM_EXIT; +} + +SmartPtrCResponseDoc XmlRoots::parseResponseFromFile( + const std::string filePath) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseResponseFromFile"); + + SmartPtrCResponseDoc responseDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filePath); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseFile(filePath, "caf:response"); + responseDoc = ResponseXml::parse(rootXml); + } + CAF_CM_EXIT; + + return responseDoc; +} + +std::string XmlRoots::saveProviderEventResponseToString( + const SmartPtrCProviderEventResponseDoc providerEventResponseDoc) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "saveProviderEventResponseToString"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(providerEventResponseDoc); + + const std::string schemaNamespace = DocXmlUtils::getSchemaNamespace("fx"); + const std::string schemaLocation = DocXmlUtils::getSchemaLocation("fx/Response.xsd"); + + const SmartPtrCXmlElement rootXml = CXmlUtils::createRootElement( + "providerEventResponse", schemaNamespace, schemaLocation); + ProviderEventResponseXml::add(providerEventResponseDoc, rootXml); + + rc = rootXml->saveToString(); + } + CAF_CM_EXIT; + + return rc; +} + +SmartPtrCProviderEventResponseDoc XmlRoots::parseProviderEventResponseFromString( + const std::string xml) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseProviderEventResponseFromString"); + + SmartPtrCProviderEventResponseDoc providerEventResponseDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(xml); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseString(xml, "caf:providerEventResponse"); + providerEventResponseDoc = ProviderEventResponseXml::parse(rootXml); + } + CAF_CM_EXIT; + + return providerEventResponseDoc; +} + +void XmlRoots::saveProviderEventResponseToFile( + const SmartPtrCProviderEventResponseDoc providerEventResponseDoc, + const std::string filePath) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("XmlRoots", "saveProviderEventResponseToFile"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(providerEventResponseDoc); + CAF_CM_VALIDATE_STRING(filePath); + + CAF_CM_LOG_DEBUG_VA1("Saving to file - %s", filePath.c_str()); + + const std::string providerEventResponseStr = + saveProviderEventResponseToString(providerEventResponseDoc); + FileSystemUtils::saveTextFile(filePath, providerEventResponseStr); + } + CAF_CM_EXIT; +} + +SmartPtrCProviderEventResponseDoc XmlRoots::parseProviderEventResponseFromFile( + const std::string filePath) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseProviderEventResponseFromFile"); + + SmartPtrCProviderEventResponseDoc providerEventResponseDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filePath); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseFile(filePath, "caf:providerEventResponse"); + providerEventResponseDoc = ProviderEventResponseXml::parse(rootXml); + } + CAF_CM_EXIT; + + return providerEventResponseDoc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ResponseXmlRoots.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ResponseXmlRoots.h new file mode 100644 index 000000000..7510e8e41 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ResponseXmlRoots.h @@ -0,0 +1,90 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ResponseXmlRoots_h_ +#define ResponseXmlRoots_h_ + +namespace Caf { + + namespace XmlRoots { + + /// Saves the ErrorResponseDoc to a string. + std::string RESPONSEXML_LINKAGE saveErrorResponseToString( + const SmartPtrCErrorResponseDoc errorResponseDoc); + + /// Parses the ErrorResponseDoc from the string. + SmartPtrCErrorResponseDoc RESPONSEXML_LINKAGE parseErrorResponseFromString( + const std::string xml); + + /// Saves the ErrorResponseDoc to a file. + void RESPONSEXML_LINKAGE saveErrorResponseToFile( + const SmartPtrCErrorResponseDoc errorResponseDoc, + const std::string filePath); + + /// Parses the ErrorResponseDoc from the file. + SmartPtrCErrorResponseDoc RESPONSEXML_LINKAGE parseErrorResponseFromFile( + const std::string filePath); + + /// Saves the ProviderResponseDoc to a string. + std::string RESPONSEXML_LINKAGE saveProviderResponseToString( + const SmartPtrCProviderResponseDoc providerResponseDoc); + + /// Parses the ErrorResponseDoc from the string. + SmartPtrCProviderResponseDoc RESPONSEXML_LINKAGE parseProviderResponseFromString( + const std::string xml); + + /// Saves the ProviderResponseDoc to a file. + void RESPONSEXML_LINKAGE saveProviderResponseToFile( + const SmartPtrCProviderResponseDoc providerResponseDoc, + const std::string filePath); + + /// Parses the ErrorResponseDoc from the file. + SmartPtrCProviderResponseDoc RESPONSEXML_LINKAGE parseProviderResponseFromFile( + const std::string filePath); + + /// Saves the ResponseDoc to a string. + std::string RESPONSEXML_LINKAGE saveResponseToString( + const SmartPtrCResponseDoc responseDoc); + + /// Parses the ErrorResponseDoc from the string. + SmartPtrCResponseDoc RESPONSEXML_LINKAGE parseResponseFromString( + const std::string xml); + + /// Saves the ResponseDoc to a file. + void RESPONSEXML_LINKAGE saveResponseToFile( + const SmartPtrCResponseDoc responseDoc, + const std::string filePath); + + /// Parses the ErrorResponseDoc from the file. + SmartPtrCResponseDoc RESPONSEXML_LINKAGE parseResponseFromFile( + const std::string filePath); + + /// Saves the ProviderEventResponseDoc to a string. + std::string RESPONSEXML_LINKAGE saveProviderEventResponseToString( + const SmartPtrCProviderEventResponseDoc providerEventResponseDoc); + + /// Parses the ErrorResponseDoc from the string. + SmartPtrCProviderEventResponseDoc RESPONSEXML_LINKAGE parseProviderEventResponseFromString( + const std::string xml); + + /// Saves the ProviderEventResponseDoc to a file. + void RESPONSEXML_LINKAGE saveProviderEventResponseToFile( + const SmartPtrCProviderEventResponseDoc providerEventResponseDoc, + const std::string filePath); + + /// Parses the ErrorResponseDoc from the file. + SmartPtrCProviderEventResponseDoc RESPONSEXML_LINKAGE parseProviderEventResponseFromFile( + const std::string filePath); + } +} + +#endif /* ResponseXmlRoots_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/stdafx.h new file mode 100644 index 000000000..94f196168 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/stdafx.h @@ -0,0 +1,28 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define RESPONSEXML_LINKAGE __declspec(dllexport) +#else + #define RESPONSEXML_LINKAGE +#endif + +#include +#include +#include + +#include "ResponseXmlInc.h" + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ActionClassInstanceCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ActionClassInstanceCollectionXml.cpp new file mode 100644 index 000000000..d8c5b45a2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ActionClassInstanceCollectionXml.cpp @@ -0,0 +1,74 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "ActionClassInstanceCollectionXml.h" + +using namespace Caf; + +void ActionClassInstanceCollectionXml::add( + const SmartPtrCActionClassInstanceCollectionDoc actionClassInstanceCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ActionClassInstanceCollectionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(actionClassInstanceCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque actionClassInstanceVal = + actionClassInstanceCollectionDoc->getActionClassInstanceCollection(); + CAF_CM_VALIDATE_STL(actionClassInstanceVal); + + if (! actionClassInstanceVal.empty()) { + for (TConstIterator > actionClassInstanceIter(actionClassInstanceVal); + actionClassInstanceIter; actionClassInstanceIter++) { + const SmartPtrCXmlElement actionClassInstanceXml = + thisXml->createAndAddElement("actionClassInstance"); + ActionClassInstanceXml::add(*actionClassInstanceIter, actionClassInstanceXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCActionClassInstanceCollectionDoc ActionClassInstanceCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ActionClassInstanceCollectionXml", "parse"); + + SmartPtrCActionClassInstanceCollectionDoc actionClassInstanceCollectionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection actionClassInstanceChildrenXml = + thisXml->findRequiredChildren("actionClassInstance"); + + std::deque actionClassInstanceVal; + if (! actionClassInstanceChildrenXml.IsNull() && ! actionClassInstanceChildrenXml->empty()) { + for (TConstIterator actionClassInstanceXmlIter(*actionClassInstanceChildrenXml); + actionClassInstanceXmlIter; actionClassInstanceXmlIter++) { + const SmartPtrCXmlElement actionClassInstanceXml = actionClassInstanceXmlIter->second; + const SmartPtrCActionClassInstanceDoc actionClassInstanceDoc = + ActionClassInstanceXml::parse(actionClassInstanceXml); + actionClassInstanceVal.push_back(actionClassInstanceDoc); + } + } + + actionClassInstanceCollectionDoc.CreateInstance(); + actionClassInstanceCollectionDoc->initialize( + actionClassInstanceVal); + } + CAF_CM_EXIT; + + return actionClassInstanceCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ActionClassInstanceCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ActionClassInstanceCollectionXml.h new file mode 100644 index 000000000..61f8c8726 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ActionClassInstanceCollectionXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ActionClassInstanceCollectionXml_h_ +#define ActionClassInstanceCollectionXml_h_ + +namespace Caf { + + /// Streams the ActionClassInstanceCollection class to/from XML + namespace ActionClassInstanceCollectionXml { + + /// Adds the ActionClassInstanceCollectionDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCActionClassInstanceCollectionDoc actionClassInstanceCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ActionClassInstanceCollectionDoc from the XML. + SmartPtrCActionClassInstanceCollectionDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ActionClassInstanceXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ActionClassInstanceXml.cpp new file mode 100644 index 000000000..fd1f71b65 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ActionClassInstanceXml.cpp @@ -0,0 +1,90 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "ActionClassInstanceXml.h" + +using namespace Caf; + +void ActionClassInstanceXml::add( + const SmartPtrCActionClassInstanceDoc actionClassInstanceDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ActionClassInstanceXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(actionClassInstanceDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string namespaceValVal = actionClassInstanceDoc->getNamespaceVal(); + CAF_CM_VALIDATE_STRING(namespaceValVal); + thisXml->addAttribute("namespace", namespaceValVal); + + const std::string nameVal = actionClassInstanceDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::string versionVal = actionClassInstanceDoc->getVersion(); + CAF_CM_VALIDATE_STRING(versionVal); + thisXml->addAttribute("version", versionVal); + + const SmartPtrCInstanceOperationCollectionDoc instanceOperationCollectionVal = + actionClassInstanceDoc->getInstanceOperationCollection(); + CAF_CM_VALIDATE_SMARTPTR(instanceOperationCollectionVal); + + const SmartPtrCXmlElement instanceOperationCollectionXml = + thisXml->createAndAddElement("instanceOperationCollection"); + InstanceOperationCollectionXml::add(instanceOperationCollectionVal, instanceOperationCollectionXml); + } + CAF_CM_EXIT; +} + +SmartPtrCActionClassInstanceDoc ActionClassInstanceXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ActionClassInstanceXml", "parse"); + + SmartPtrCActionClassInstanceDoc actionClassInstanceDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string namespaceValStrVal = + thisXml->findRequiredAttribute("namespace"); + const std::string namespaceValVal = namespaceValStrVal; + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const std::string versionStrVal = + thisXml->findRequiredAttribute("version"); + const std::string versionVal = versionStrVal; + + const SmartPtrCXmlElement instanceOperationCollectionXml = + thisXml->findRequiredChild("instanceOperationCollection"); + + SmartPtrCInstanceOperationCollectionDoc instanceOperationCollectionVal; + if (! instanceOperationCollectionXml.IsNull()) { + instanceOperationCollectionVal = InstanceOperationCollectionXml::parse(instanceOperationCollectionXml); + } + + actionClassInstanceDoc.CreateInstance(); + actionClassInstanceDoc->initialize( + namespaceValVal, + nameVal, + versionVal, + instanceOperationCollectionVal); + } + CAF_CM_EXIT; + + return actionClassInstanceDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ActionClassInstanceXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ActionClassInstanceXml.h new file mode 100644 index 000000000..393d53942 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ActionClassInstanceXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ActionClassInstanceXml_h_ +#define ActionClassInstanceXml_h_ + +namespace Caf { + + /// Streams the ActionClassInstance class to/from XML + namespace ActionClassInstanceXml { + + /// Adds the ActionClassInstanceDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCActionClassInstanceDoc actionClassInstanceDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ActionClassInstanceDoc from the XML. + SmartPtrCActionClassInstanceDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ActionClassXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ActionClassXml.cpp new file mode 100644 index 000000000..63844e58d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ActionClassXml.cpp @@ -0,0 +1,136 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "ActionClassXml.h" + +using namespace Caf; + +void ActionClassXml::add( + const SmartPtrCActionClassDoc actionClassDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ActionClassXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(actionClassDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string namespaceValVal = actionClassDoc->getNamespaceVal(); + CAF_CM_VALIDATE_STRING(namespaceValVal); + thisXml->addAttribute("namespace", namespaceValVal); + + const std::string nameVal = actionClassDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::string versionVal = actionClassDoc->getVersion(); + CAF_CM_VALIDATE_STRING(versionVal); + thisXml->addAttribute("version", versionVal); + + const SmartPtrCCollectMethodDoc collectMethodVal = + actionClassDoc->getCollectMethod(); + if (! collectMethodVal.IsNull()) { + const SmartPtrCXmlElement collectMethodXml = + thisXml->createAndAddElement("collectMethod"); + CollectMethodXml::add(collectMethodVal, collectMethodXml); + } + + const std::deque methodVal = + actionClassDoc->getMethodCollection(); + if (! methodVal.empty()) { + for (TConstIterator > methodIter(methodVal); + methodIter; methodIter++) { + const SmartPtrCXmlElement methodXml = + thisXml->createAndAddElement("method"); + MethodXml::add(*methodIter, methodXml); + } + } + + const std::string displayNameVal = actionClassDoc->getDisplayName(); + if (! displayNameVal.empty()) { + thisXml->addAttribute("displayName", displayNameVal); + } + + const std::string descriptionVal = actionClassDoc->getDescription(); + if (! descriptionVal.empty()) { + thisXml->addAttribute("description", descriptionVal); + } + } + CAF_CM_EXIT; +} + +SmartPtrCActionClassDoc ActionClassXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ActionClassXml", "parse"); + + SmartPtrCActionClassDoc actionClassDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string namespaceValStrVal = + thisXml->findRequiredAttribute("namespace"); + const std::string namespaceValVal = namespaceValStrVal; + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const std::string versionStrVal = + thisXml->findRequiredAttribute("version"); + const std::string versionVal = versionStrVal; + + const SmartPtrCXmlElement collectMethodXml = + thisXml->findOptionalChild("collectMethod"); + + SmartPtrCCollectMethodDoc collectMethodVal; + if (! collectMethodXml.IsNull()) { + collectMethodVal = CollectMethodXml::parse(collectMethodXml); + } + + const CXmlElement::SmartPtrCElementCollection methodChildrenXml = + thisXml->findOptionalChildren("method"); + + std::deque methodVal; + if (! methodChildrenXml.IsNull() && ! methodChildrenXml->empty()) { + for (TConstIterator methodXmlIter(*methodChildrenXml); + methodXmlIter; methodXmlIter++) { + const SmartPtrCXmlElement methodXml = methodXmlIter->second; + const SmartPtrCMethodDoc methodDoc = + MethodXml::parse(methodXml); + methodVal.push_back(methodDoc); + } + } + + const std::string displayNameStrVal = + thisXml->findOptionalAttribute("displayName"); + const std::string displayNameVal = displayNameStrVal; + + const std::string descriptionStrVal = + thisXml->findOptionalAttribute("description"); + const std::string descriptionVal = descriptionStrVal; + + actionClassDoc.CreateInstance(); + actionClassDoc->initialize( + namespaceValVal, + nameVal, + versionVal, + collectMethodVal, + methodVal, + displayNameVal, + descriptionVal); + } + CAF_CM_EXIT; + + return actionClassDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ActionClassXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ActionClassXml.h new file mode 100644 index 000000000..ef2232801 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ActionClassXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ActionClassXml_h_ +#define ActionClassXml_h_ + +namespace Caf { + + /// Streams the ActionClass class to/from XML + namespace ActionClassXml { + + /// Adds the ActionClassDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCActionClassDoc actionClassDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ActionClassDoc from the XML. + SmartPtrCActionClassDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassCardinalityXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassCardinalityXml.cpp new file mode 100644 index 000000000..b6cff0fc5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassCardinalityXml.cpp @@ -0,0 +1,82 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "ClassCardinalityXml.h" + +using namespace Caf; + +void ClassCardinalityXml::add( + const SmartPtrCClassCardinalityDoc classCardinalityDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ClassCardinalityXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(classCardinalityDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string namespaceValVal = classCardinalityDoc->getNamespaceVal(); + CAF_CM_VALIDATE_STRING(namespaceValVal); + thisXml->addAttribute("namespace", namespaceValVal); + + const std::string nameVal = classCardinalityDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::string versionVal = classCardinalityDoc->getVersion(); + CAF_CM_VALIDATE_STRING(versionVal); + thisXml->addAttribute("version", versionVal); + + const std::string cardinalityVal = classCardinalityDoc->getCardinality(); + CAF_CM_VALIDATE_STRING(cardinalityVal); + thisXml->addAttribute("cardinality", cardinalityVal); + } + CAF_CM_EXIT; +} + +SmartPtrCClassCardinalityDoc ClassCardinalityXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ClassCardinalityXml", "parse"); + + SmartPtrCClassCardinalityDoc classCardinalityDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string namespaceValStrVal = + thisXml->findRequiredAttribute("namespace"); + const std::string namespaceValVal = namespaceValStrVal; + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const std::string versionStrVal = + thisXml->findRequiredAttribute("version"); + const std::string versionVal = versionStrVal; + + const std::string cardinalityStrVal = + thisXml->findRequiredAttribute("cardinality"); + const std::string cardinalityVal = cardinalityStrVal; + + classCardinalityDoc.CreateInstance(); + classCardinalityDoc->initialize( + namespaceValVal, + nameVal, + versionVal, + cardinalityVal); + } + CAF_CM_EXIT; + + return classCardinalityDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassCardinalityXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassCardinalityXml.h new file mode 100644 index 000000000..1cdaceb4b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassCardinalityXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ClassCardinalityXml_h_ +#define ClassCardinalityXml_h_ + +namespace Caf { + + /// Streams the ClassCardinality class to/from XML + namespace ClassCardinalityXml { + + /// Adds the ClassCardinalityDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCClassCardinalityDoc classCardinalityDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ClassCardinalityDoc from the XML. + SmartPtrCClassCardinalityDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassFieldXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassFieldXml.cpp new file mode 100644 index 000000000..f876b3f28 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassFieldXml.cpp @@ -0,0 +1,82 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "ClassFieldXml.h" + +using namespace Caf; + +void ClassFieldXml::add( + const SmartPtrCClassFieldDoc classFieldDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ClassFieldXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(classFieldDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string namespaceValVal = classFieldDoc->getNamespaceVal(); + CAF_CM_VALIDATE_STRING(namespaceValVal); + thisXml->addAttribute("namespace", namespaceValVal); + + const std::string nameVal = classFieldDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::string versionVal = classFieldDoc->getVersion(); + CAF_CM_VALIDATE_STRING(versionVal); + thisXml->addAttribute("version", versionVal); + + const std::string fieldVal = classFieldDoc->getField(); + CAF_CM_VALIDATE_STRING(fieldVal); + thisXml->addAttribute("field", fieldVal); + } + CAF_CM_EXIT; +} + +SmartPtrCClassFieldDoc ClassFieldXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ClassFieldXml", "parse"); + + SmartPtrCClassFieldDoc classFieldDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string namespaceValStrVal = + thisXml->findRequiredAttribute("namespace"); + const std::string namespaceValVal = namespaceValStrVal; + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const std::string versionStrVal = + thisXml->findRequiredAttribute("version"); + const std::string versionVal = versionStrVal; + + const std::string fieldStrVal = + thisXml->findRequiredAttribute("field"); + const std::string fieldVal = fieldStrVal; + + classFieldDoc.CreateInstance(); + classFieldDoc->initialize( + namespaceValVal, + nameVal, + versionVal, + fieldVal); + } + CAF_CM_EXIT; + + return classFieldDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassFieldXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassFieldXml.h new file mode 100644 index 000000000..873e83034 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassFieldXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ClassFieldXml_h_ +#define ClassFieldXml_h_ + +namespace Caf { + + /// Streams the ClassField class to/from XML + namespace ClassFieldXml { + + /// Adds the ClassFieldDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCClassFieldDoc classFieldDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ClassFieldDoc from the XML. + SmartPtrCClassFieldDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassIdentifierXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassIdentifierXml.cpp new file mode 100644 index 000000000..8df83bf48 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassIdentifierXml.cpp @@ -0,0 +1,73 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "ClassIdentifierXml.h" + +using namespace Caf; + +void ClassIdentifierXml::add( + const SmartPtrCClassIdentifierDoc classIdentifierDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ClassIdentifierXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(classIdentifierDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string namespaceValVal = classIdentifierDoc->getNamespaceVal(); + CAF_CM_VALIDATE_STRING(namespaceValVal); + thisXml->addAttribute("namespace", namespaceValVal); + + const std::string nameVal = classIdentifierDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::string versionVal = classIdentifierDoc->getVersion(); + CAF_CM_VALIDATE_STRING(versionVal); + thisXml->addAttribute("version", versionVal); + } + CAF_CM_EXIT; +} + +SmartPtrCClassIdentifierDoc ClassIdentifierXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ClassIdentifierXml", "parse"); + + SmartPtrCClassIdentifierDoc classIdentifierDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string namespaceValStrVal = + thisXml->findRequiredAttribute("namespace"); + const std::string namespaceValVal = namespaceValStrVal; + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const std::string versionStrVal = + thisXml->findRequiredAttribute("version"); + const std::string versionVal = versionStrVal; + + classIdentifierDoc.CreateInstance(); + classIdentifierDoc->initialize( + namespaceValVal, + nameVal, + versionVal); + } + CAF_CM_EXIT; + + return classIdentifierDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassIdentifierXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassIdentifierXml.h new file mode 100644 index 000000000..1ec9e9aaf --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassIdentifierXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ClassIdentifierXml_h_ +#define ClassIdentifierXml_h_ + +namespace Caf { + + /// Streams the ClassIdentifier class to/from XML + namespace ClassIdentifierXml { + + /// Adds the ClassIdentifierDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCClassIdentifierDoc classIdentifierDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ClassIdentifierDoc from the XML. + SmartPtrCClassIdentifierDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassInstancePropertyXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassInstancePropertyXml.cpp new file mode 100644 index 000000000..045f3416d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassInstancePropertyXml.cpp @@ -0,0 +1,142 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "ClassInstancePropertyXml.h" + +using namespace Caf; + +void ClassInstancePropertyXml::add( + const SmartPtrCClassInstancePropertyDoc classInstancePropertyDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ClassInstancePropertyXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(classInstancePropertyDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameVal = classInstancePropertyDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::deque typeVal = + classInstancePropertyDoc->getType(); + CAF_CM_VALIDATE_STL(typeVal); + + if (! typeVal.empty()) { + for (TConstIterator > typeIter(typeVal); + typeIter; typeIter++) { + const SmartPtrCXmlElement typeXml = + thisXml->createAndAddElement("type"); + ClassIdentifierXml::add(*typeIter, typeXml); + } + } + + const std::string requiredVal = classInstancePropertyDoc->getRequired() ? "true" : "false"; + if (! requiredVal.empty()) { + thisXml->addAttribute("required", requiredVal); + } + + const std::string transientValVal = classInstancePropertyDoc->getTransientVal() ? "true" : "false"; + if (! transientValVal.empty()) { + thisXml->addAttribute("transient", transientValVal); + } + + const std::string listVal = classInstancePropertyDoc->getList() ? "true" : "false"; + if (! listVal.empty()) { + thisXml->addAttribute("list", listVal); + } + + const std::string displayNameVal = classInstancePropertyDoc->getDisplayName(); + if (! displayNameVal.empty()) { + thisXml->addAttribute("displayName", displayNameVal); + } + + const std::string descriptionVal = classInstancePropertyDoc->getDescription(); + if (! descriptionVal.empty()) { + thisXml->addAttribute("description", descriptionVal); + } + } + CAF_CM_EXIT; +} + +SmartPtrCClassInstancePropertyDoc ClassInstancePropertyXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ClassInstancePropertyXml", "parse"); + + SmartPtrCClassInstancePropertyDoc classInstancePropertyDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const CXmlElement::SmartPtrCElementCollection typeChildrenXml = + thisXml->findRequiredChildren("type"); + + std::deque typeVal; + if (! typeChildrenXml.IsNull() && ! typeChildrenXml->empty()) { + for (TConstIterator typeXmlIter(*typeChildrenXml); + typeXmlIter; typeXmlIter++) { + const SmartPtrCXmlElement typeXml = typeXmlIter->second; + const SmartPtrCClassIdentifierDoc typeDoc = + ClassIdentifierXml::parse(typeXml); + typeVal.push_back(typeDoc); + } + } + + const std::string requiredStrVal = + thisXml->findOptionalAttribute("required"); + bool requiredVal = false; + if (! requiredStrVal.empty()) { + requiredVal = (requiredStrVal.compare("true") == 0) ? true : false; + } + + const std::string transientValStrVal = + thisXml->findOptionalAttribute("transient"); + bool transientValVal = false; + if (! transientValStrVal.empty()) { + transientValVal = (transientValStrVal.compare("true") == 0) ? true : false; + } + + const std::string listStrVal = + thisXml->findOptionalAttribute("list"); + bool listVal = false; + if (! listStrVal.empty()) { + listVal = (listStrVal.compare("true") == 0) ? true : false; + } + + const std::string displayNameStrVal = + thisXml->findOptionalAttribute("displayName"); + const std::string displayNameVal = displayNameStrVal; + + const std::string descriptionStrVal = + thisXml->findOptionalAttribute("description"); + const std::string descriptionVal = descriptionStrVal; + + classInstancePropertyDoc.CreateInstance(); + classInstancePropertyDoc->initialize( + nameVal, + typeVal, + requiredVal, + transientValVal, + listVal, + displayNameVal, + descriptionVal); + } + CAF_CM_EXIT; + + return classInstancePropertyDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassInstancePropertyXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassInstancePropertyXml.h new file mode 100644 index 000000000..4fe60e798 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassInstancePropertyXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ClassInstancePropertyXml_h_ +#define ClassInstancePropertyXml_h_ + +namespace Caf { + + /// Streams the ClassInstanceProperty class to/from XML + namespace ClassInstancePropertyXml { + + /// Adds the ClassInstancePropertyDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCClassInstancePropertyDoc classInstancePropertyDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ClassInstancePropertyDoc from the XML. + SmartPtrCClassInstancePropertyDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassPropertyXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassPropertyXml.cpp new file mode 100644 index 000000000..ef7be5574 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassPropertyXml.cpp @@ -0,0 +1,222 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "ClassPropertyXml.h" + +using namespace Caf; + +void ClassPropertyXml::add( + const SmartPtrCClassPropertyDoc classPropertyDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ClassPropertyXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(classPropertyDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameVal = classPropertyDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::string typeVal = + EnumConvertersXml::convertPropertyTypeToString(classPropertyDoc->getType()); + CAF_CM_VALIDATE_STRING(typeVal); + thisXml->addAttribute("type", typeVal); + + const std::deque valueVal = + classPropertyDoc->getValue(); + if (! valueVal.empty()) { + for (TConstIterator > valueIter(valueVal); + valueIter; valueIter++) { + const SmartPtrCXmlElement valueXml = + thisXml->createAndAddElement("value"); + valueXml->setValue(*valueIter); + } + } + + const std::string requiredVal = classPropertyDoc->getRequired() ? "true" : "false"; + if (! requiredVal.empty()) { + thisXml->addAttribute("required", requiredVal); + } + + const std::string keyVal = classPropertyDoc->getKey() ? "true" : "false"; + if (! keyVal.empty()) { + thisXml->addAttribute("key", keyVal); + } + + const std::string listVal = classPropertyDoc->getList() ? "true" : "false"; + if (! listVal.empty()) { + thisXml->addAttribute("list", listVal); + } + + const std::string caseSensitiveVal = classPropertyDoc->getCaseSensitive() ? "true" : "false"; + if (! caseSensitiveVal.empty()) { + thisXml->addAttribute("caseSensitive", caseSensitiveVal); + } + + const std::string transientValVal = classPropertyDoc->getTransientVal() ? "true" : "false"; + if (! transientValVal.empty()) { + thisXml->addAttribute("transient", transientValVal); + } + + const std::string defaultValVal = classPropertyDoc->getDefaultVal(); + if (! defaultValVal.empty()) { + thisXml->addAttribute("default", defaultValVal); + } + + const std::string validatorVal = + EnumConvertersXml::convertValidatorTypeToString(classPropertyDoc->getValidator()); + if (! validatorVal.empty()) { + thisXml->addAttribute("validator", validatorVal); + } + + const std::string upperRangeVal = classPropertyDoc->getUpperRange(); + if (! upperRangeVal.empty()) { + thisXml->addAttribute("upperRange", upperRangeVal); + } + + const std::string lowerRangeVal = classPropertyDoc->getLowerRange(); + if (! lowerRangeVal.empty()) { + thisXml->addAttribute("lowerRange", lowerRangeVal); + } + + const std::string displayNameVal = classPropertyDoc->getDisplayName(); + if (! displayNameVal.empty()) { + thisXml->addAttribute("displayName", displayNameVal); + } + + const std::string descriptionVal = classPropertyDoc->getDescription(); + if (! descriptionVal.empty()) { + thisXml->addAttribute("description", descriptionVal); + } + } + CAF_CM_EXIT; +} + +SmartPtrCClassPropertyDoc ClassPropertyXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ClassPropertyXml", "parse"); + + SmartPtrCClassPropertyDoc classPropertyDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const std::string typeStrVal = + thisXml->findRequiredAttribute("type"); + PROPERTY_TYPE typeVal = PROPERTY_NONE; + if (! typeStrVal.empty()) { + typeVal = EnumConvertersXml::convertStringToPropertyType(typeStrVal); + } + + const CXmlElement::SmartPtrCElementCollection valueChildrenXml = + thisXml->findOptionalChildren("value"); + + std::deque valueVal; + if (! valueChildrenXml.IsNull() && ! valueChildrenXml->empty()) { + for (TConstIterator valueXmlIter(*valueChildrenXml); + valueXmlIter; valueXmlIter++) { + const SmartPtrCXmlElement valueXml = valueXmlIter->second; + const std::string valueDoc = valueXml->getValue(); + valueVal.push_back(valueDoc); + } + } + + const std::string requiredStrVal = + thisXml->findOptionalAttribute("required"); + bool requiredVal = false; + if (! requiredStrVal.empty()) { + requiredVal = (requiredStrVal.compare("true") == 0) ? true : false; + } + + const std::string keyStrVal = + thisXml->findOptionalAttribute("key"); + bool keyVal = false; + if (! keyStrVal.empty()) { + keyVal = (keyStrVal.compare("true") == 0) ? true : false; + } + + const std::string listStrVal = + thisXml->findOptionalAttribute("list"); + bool listVal = false; + if (! listStrVal.empty()) { + listVal = (listStrVal.compare("true") == 0) ? true : false; + } + + const std::string caseSensitiveStrVal = + thisXml->findOptionalAttribute("caseSensitive"); + bool caseSensitiveVal = false; + if (! caseSensitiveStrVal.empty()) { + caseSensitiveVal = (caseSensitiveStrVal.compare("true") == 0) ? true : false; + } + + const std::string transientValStrVal = + thisXml->findOptionalAttribute("transient"); + bool transientValVal = false; + if (! transientValStrVal.empty()) { + transientValVal = (transientValStrVal.compare("true") == 0) ? true : false; + } + + const std::string defaultValStrVal = + thisXml->findOptionalAttribute("default"); + const std::string defaultValVal = defaultValStrVal; + + const std::string validatorStrVal = + thisXml->findOptionalAttribute("validator"); + VALIDATOR_TYPE validatorVal = VALIDATOR_NONE; + if (! validatorStrVal.empty()) { + validatorVal = EnumConvertersXml::convertStringToValidatorType(validatorStrVal); + } + + const std::string upperRangeStrVal = + thisXml->findOptionalAttribute("upperRange"); + const std::string upperRangeVal = upperRangeStrVal; + + const std::string lowerRangeStrVal = + thisXml->findOptionalAttribute("lowerRange"); + const std::string lowerRangeVal = lowerRangeStrVal; + + const std::string displayNameStrVal = + thisXml->findOptionalAttribute("displayName"); + const std::string displayNameVal = displayNameStrVal; + + const std::string descriptionStrVal = + thisXml->findOptionalAttribute("description"); + const std::string descriptionVal = descriptionStrVal; + + classPropertyDoc.CreateInstance(); + classPropertyDoc->initialize( + nameVal, + typeVal, + valueVal, + requiredVal, + keyVal, + listVal, + caseSensitiveVal, + transientValVal, + defaultValVal, + validatorVal, + upperRangeVal, + lowerRangeVal, + displayNameVal, + descriptionVal); + } + CAF_CM_EXIT; + + return classPropertyDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassPropertyXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassPropertyXml.h new file mode 100644 index 000000000..0b25d42c5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassPropertyXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ClassPropertyXml_h_ +#define ClassPropertyXml_h_ + +namespace Caf { + + /// Streams the ClassProperty class to/from XML + namespace ClassPropertyXml { + + /// Adds the ClassPropertyDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCClassPropertyDoc classPropertyDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ClassPropertyDoc from the XML. + SmartPtrCClassPropertyDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/CmdlMetadataXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/CmdlMetadataXml.cpp new file mode 100644 index 000000000..e708842d9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/CmdlMetadataXml.cpp @@ -0,0 +1,72 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "CmdlMetadataXml.h" + +using namespace Caf; + +void CmdlMetadataXml::add( + const SmartPtrCCmdlMetadataDoc cmdlMetadataDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("CmdlMetadataXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(cmdlMetadataDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameVal = cmdlMetadataDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::string valueVal = + cmdlMetadataDoc->getValue(); + CAF_CM_VALIDATE_STRING(valueVal); + + const SmartPtrCXmlElement valueXml = + thisXml->createAndAddElement("value"); + valueXml->setValue(valueVal); + } + CAF_CM_EXIT; +} + +SmartPtrCCmdlMetadataDoc CmdlMetadataXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("CmdlMetadataXml", "parse"); + + SmartPtrCCmdlMetadataDoc cmdlMetadataDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const SmartPtrCXmlElement valueXml = + thisXml->findRequiredChild("value"); + + std::string valueVal; + if (! valueXml.IsNull()) { + valueVal = valueXml->getValue(); + } + + cmdlMetadataDoc.CreateInstance(); + cmdlMetadataDoc->initialize( + nameVal, + valueVal); + } + CAF_CM_EXIT; + + return cmdlMetadataDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/CmdlMetadataXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/CmdlMetadataXml.h new file mode 100644 index 000000000..d0ec6acf5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/CmdlMetadataXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CmdlMetadataXml_h_ +#define CmdlMetadataXml_h_ + +namespace Caf { + + /// Streams the CmdlMetadata class to/from XML + namespace CmdlMetadataXml { + + /// Adds the CmdlMetadataDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCCmdlMetadataDoc cmdlMetadataDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the CmdlMetadataDoc from the XML. + SmartPtrCCmdlMetadataDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/CmdlUnionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/CmdlUnionXml.cpp new file mode 100644 index 000000000..53f0ccc91 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/CmdlUnionXml.cpp @@ -0,0 +1,73 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "CmdlUnionXml.h" + +using namespace Caf; + +void CmdlUnionXml::add( + const SmartPtrCCmdlUnionDoc cmdlUnionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("CmdlUnionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(cmdlUnionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string namespaceValVal = cmdlUnionDoc->getNamespaceVal(); + CAF_CM_VALIDATE_STRING(namespaceValVal); + thisXml->addAttribute("namespace", namespaceValVal); + + const std::string nameVal = cmdlUnionDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::string versionVal = cmdlUnionDoc->getVersion(); + CAF_CM_VALIDATE_STRING(versionVal); + thisXml->addAttribute("version", versionVal); + } + CAF_CM_EXIT; +} + +SmartPtrCCmdlUnionDoc CmdlUnionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("CmdlUnionXml", "parse"); + + SmartPtrCCmdlUnionDoc cmdlUnionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string namespaceValStrVal = + thisXml->findRequiredAttribute("namespace"); + const std::string namespaceValVal = namespaceValStrVal; + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const std::string versionStrVal = + thisXml->findRequiredAttribute("version"); + const std::string versionVal = versionStrVal; + + cmdlUnionDoc.CreateInstance(); + cmdlUnionDoc->initialize( + namespaceValVal, + nameVal, + versionVal); + } + CAF_CM_EXIT; + + return cmdlUnionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/CmdlUnionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/CmdlUnionXml.h new file mode 100644 index 000000000..f0ca49abe --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/CmdlUnionXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CmdlUnionXml_h_ +#define CmdlUnionXml_h_ + +namespace Caf { + + /// Streams the CmdlUnion class to/from XML + namespace CmdlUnionXml { + + /// Adds the CmdlUnionDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCCmdlUnionDoc cmdlUnionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the CmdlUnionDoc from the XML. + SmartPtrCCmdlUnionDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/CollectMethodXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/CollectMethodXml.cpp new file mode 100644 index 000000000..2ae0172b3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/CollectMethodXml.cpp @@ -0,0 +1,185 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "CollectMethodXml.h" + +using namespace Caf; + +void CollectMethodXml::add( + const SmartPtrCCollectMethodDoc collectMethodDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("CollectMethodXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(collectMethodDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameVal = collectMethodDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::deque parameterVal = + collectMethodDoc->getParameterCollection(); + if (! parameterVal.empty()) { + for (TConstIterator > parameterIter(parameterVal); + parameterIter; parameterIter++) { + const SmartPtrCXmlElement parameterXml = + thisXml->createAndAddElement("parameter"); + MethodParameterXml::add(*parameterIter, parameterXml); + } + } + + const std::deque instanceParameterVal = + collectMethodDoc->getInstanceParameterCollection(); + if (! instanceParameterVal.empty()) { + for (TConstIterator > instanceParameterIter(instanceParameterVal); + instanceParameterIter; instanceParameterIter++) { + const SmartPtrCXmlElement instanceParameterXml = + thisXml->createAndAddElement("instanceParameter"); + InstanceParameterXml::add(*instanceParameterIter, instanceParameterXml); + } + } + + const std::deque returnValVal = + collectMethodDoc->getReturnValCollection(); + if (! returnValVal.empty()) { + for (TConstIterator > returnValIter(returnValVal); + returnValIter; returnValIter++) { + const SmartPtrCXmlElement returnValXml = + thisXml->createAndAddElement("return"); + ClassIdentifierXml::add(*returnValIter, returnValXml); + } + } + + const std::deque eventValVal = + collectMethodDoc->getEventValCollection(); + if (! eventValVal.empty()) { + for (TConstIterator > eventValIter(eventValVal); + eventValIter; eventValIter++) { + const SmartPtrCXmlElement eventValXml = + thisXml->createAndAddElement("event"); + ClassIdentifierXml::add(*eventValIter, eventValXml); + } + } + + const std::deque errorVal = + collectMethodDoc->getErrorCollection(); + if (! errorVal.empty()) { + for (TConstIterator > errorIter(errorVal); + errorIter; errorIter++) { + const SmartPtrCXmlElement errorXml = + thisXml->createAndAddElement("error"); + ClassIdentifierXml::add(*errorIter, errorXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCCollectMethodDoc CollectMethodXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("CollectMethodXml", "parse"); + + SmartPtrCCollectMethodDoc collectMethodDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const CXmlElement::SmartPtrCElementCollection parameterChildrenXml = + thisXml->findOptionalChildren("parameter"); + + std::deque parameterVal; + if (! parameterChildrenXml.IsNull() && ! parameterChildrenXml->empty()) { + for (TConstIterator parameterXmlIter(*parameterChildrenXml); + parameterXmlIter; parameterXmlIter++) { + const SmartPtrCXmlElement parameterXml = parameterXmlIter->second; + const SmartPtrCMethodParameterDoc parameterDoc = + MethodParameterXml::parse(parameterXml); + parameterVal.push_back(parameterDoc); + } + } + + const CXmlElement::SmartPtrCElementCollection instanceParameterChildrenXml = + thisXml->findOptionalChildren("instanceParameter"); + + std::deque instanceParameterVal; + if (! instanceParameterChildrenXml.IsNull() && ! instanceParameterChildrenXml->empty()) { + for (TConstIterator instanceParameterXmlIter(*instanceParameterChildrenXml); + instanceParameterXmlIter; instanceParameterXmlIter++) { + const SmartPtrCXmlElement instanceParameterXml = instanceParameterXmlIter->second; + const SmartPtrCInstanceParameterDoc instanceParameterDoc = + InstanceParameterXml::parse(instanceParameterXml); + instanceParameterVal.push_back(instanceParameterDoc); + } + } + + const CXmlElement::SmartPtrCElementCollection returnValChildrenXml = + thisXml->findOptionalChildren("return"); + + std::deque returnValVal; + if (! returnValChildrenXml.IsNull() && ! returnValChildrenXml->empty()) { + for (TConstIterator returnValXmlIter(*returnValChildrenXml); + returnValXmlIter; returnValXmlIter++) { + const SmartPtrCXmlElement returnValXml = returnValXmlIter->second; + const SmartPtrCClassIdentifierDoc returnValDoc = + ClassIdentifierXml::parse(returnValXml); + returnValVal.push_back(returnValDoc); + } + } + + const CXmlElement::SmartPtrCElementCollection eventValChildrenXml = + thisXml->findOptionalChildren("event"); + + std::deque eventValVal; + if (! eventValChildrenXml.IsNull() && ! eventValChildrenXml->empty()) { + for (TConstIterator eventValXmlIter(*eventValChildrenXml); + eventValXmlIter; eventValXmlIter++) { + const SmartPtrCXmlElement eventValXml = eventValXmlIter->second; + const SmartPtrCClassIdentifierDoc eventValDoc = + ClassIdentifierXml::parse(eventValXml); + eventValVal.push_back(eventValDoc); + } + } + + const CXmlElement::SmartPtrCElementCollection errorChildrenXml = + thisXml->findOptionalChildren("error"); + + std::deque errorVal; + if (! errorChildrenXml.IsNull() && ! errorChildrenXml->empty()) { + for (TConstIterator errorXmlIter(*errorChildrenXml); + errorXmlIter; errorXmlIter++) { + const SmartPtrCXmlElement errorXml = errorXmlIter->second; + const SmartPtrCClassIdentifierDoc errorDoc = + ClassIdentifierXml::parse(errorXml); + errorVal.push_back(errorDoc); + } + } + + collectMethodDoc.CreateInstance(); + collectMethodDoc->initialize( + nameVal, + parameterVal, + instanceParameterVal, + returnValVal, + eventValVal, + errorVal); + } + CAF_CM_EXIT; + + return collectMethodDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/CollectMethodXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/CollectMethodXml.h new file mode 100644 index 000000000..891189bcc --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/CollectMethodXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CollectMethodXml_h_ +#define CollectMethodXml_h_ + +namespace Caf { + + /// Streams the CollectMethod class to/from XML + namespace CollectMethodXml { + + /// Adds the CollectMethodDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCCollectMethodDoc collectMethodDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the CollectMethodDoc from the XML. + SmartPtrCCollectMethodDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassInstanceCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassInstanceCollectionXml.cpp new file mode 100644 index 000000000..6ec9ec1db --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassInstanceCollectionXml.cpp @@ -0,0 +1,74 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "DataClassInstanceCollectionXml.h" + +using namespace Caf; + +void DataClassInstanceCollectionXml::add( + const SmartPtrCDataClassInstanceCollectionDoc dataClassInstanceCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DataClassInstanceCollectionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(dataClassInstanceCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque dataClassInstanceVal = + dataClassInstanceCollectionDoc->getDataClassInstanceCollection(); + CAF_CM_VALIDATE_STL(dataClassInstanceVal); + + if (! dataClassInstanceVal.empty()) { + for (TConstIterator > dataClassInstanceIter(dataClassInstanceVal); + dataClassInstanceIter; dataClassInstanceIter++) { + const SmartPtrCXmlElement dataClassInstanceXml = + thisXml->createAndAddElement("dataClassInstance"); + DataClassInstanceXml::add(*dataClassInstanceIter, dataClassInstanceXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCDataClassInstanceCollectionDoc DataClassInstanceCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DataClassInstanceCollectionXml", "parse"); + + SmartPtrCDataClassInstanceCollectionDoc dataClassInstanceCollectionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection dataClassInstanceChildrenXml = + thisXml->findRequiredChildren("dataClassInstance"); + + std::deque dataClassInstanceVal; + if (! dataClassInstanceChildrenXml.IsNull() && ! dataClassInstanceChildrenXml->empty()) { + for (TConstIterator dataClassInstanceXmlIter(*dataClassInstanceChildrenXml); + dataClassInstanceXmlIter; dataClassInstanceXmlIter++) { + const SmartPtrCXmlElement dataClassInstanceXml = dataClassInstanceXmlIter->second; + const SmartPtrCDataClassInstanceDoc dataClassInstanceDoc = + DataClassInstanceXml::parse(dataClassInstanceXml); + dataClassInstanceVal.push_back(dataClassInstanceDoc); + } + } + + dataClassInstanceCollectionDoc.CreateInstance(); + dataClassInstanceCollectionDoc->initialize( + dataClassInstanceVal); + } + CAF_CM_EXIT; + + return dataClassInstanceCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassInstanceCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassInstanceCollectionXml.h new file mode 100644 index 000000000..0c8d263f8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassInstanceCollectionXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef DataClassInstanceCollectionXml_h_ +#define DataClassInstanceCollectionXml_h_ + +namespace Caf { + + /// Streams the DataClassInstanceCollection class to/from XML + namespace DataClassInstanceCollectionXml { + + /// Adds the DataClassInstanceCollectionDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCDataClassInstanceCollectionDoc dataClassInstanceCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the DataClassInstanceCollectionDoc from the XML. + SmartPtrCDataClassInstanceCollectionDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassInstanceXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassInstanceXml.cpp new file mode 100644 index 000000000..780127d0d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassInstanceXml.cpp @@ -0,0 +1,168 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "DataClassInstanceXml.h" + +using namespace Caf; + +void DataClassInstanceXml::add( + const SmartPtrCDataClassInstanceDoc dataClassInstanceDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DataClassInstanceXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(dataClassInstanceDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string namespaceValVal = dataClassInstanceDoc->getNamespaceVal(); + CAF_CM_VALIDATE_STRING(namespaceValVal); + thisXml->addAttribute("namespace", namespaceValVal); + + const std::string nameVal = dataClassInstanceDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::string versionVal = dataClassInstanceDoc->getVersion(); + CAF_CM_VALIDATE_STRING(versionVal); + thisXml->addAttribute("version", versionVal); + + const std::deque cmdlMetadataVal = + dataClassInstanceDoc->getCmdlMetadataCollection(); + if (! cmdlMetadataVal.empty()) { + for (TConstIterator > cmdlMetadataIter(cmdlMetadataVal); + cmdlMetadataIter; cmdlMetadataIter++) { + const SmartPtrCXmlElement cmdlMetadataXml = + thisXml->createAndAddElement("cmdlMetadata"); + CmdlMetadataXml::add(*cmdlMetadataIter, cmdlMetadataXml); + } + } + + const std::deque propertyVal = + dataClassInstanceDoc->getPropertyCollection(); + if (! propertyVal.empty()) { + for (TConstIterator > propertyIter(propertyVal); + propertyIter; propertyIter++) { + const SmartPtrCXmlElement propertyXml = + thisXml->createAndAddElement("property"); + DataClassPropertyXml::add(*propertyIter, propertyXml); + } + } + + const std::deque instancePropertyVal = + dataClassInstanceDoc->getInstancePropertyCollection(); + if (! instancePropertyVal.empty()) { + for (TConstIterator > instancePropertyIter(instancePropertyVal); + instancePropertyIter; instancePropertyIter++) { + const SmartPtrCXmlElement instancePropertyXml = + thisXml->createAndAddElement("instanceProperty"); + DataClassSubInstanceXml::add(*instancePropertyIter, instancePropertyXml); + } + } + + const SmartPtrCCmdlUnionDoc cmdlUnionVal = + dataClassInstanceDoc->getCmdlUnion(); + if (! cmdlUnionVal.IsNull()) { + const SmartPtrCXmlElement cmdlUnionXml = + thisXml->createAndAddElement("cmdlUnion"); + CmdlUnionXml::add(cmdlUnionVal, cmdlUnionXml); + } + } + CAF_CM_EXIT; +} + +SmartPtrCDataClassInstanceDoc DataClassInstanceXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DataClassInstanceXml", "parse"); + + SmartPtrCDataClassInstanceDoc dataClassInstanceDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string namespaceValStrVal = + thisXml->findRequiredAttribute("namespace"); + const std::string namespaceValVal = namespaceValStrVal; + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const std::string versionStrVal = + thisXml->findRequiredAttribute("version"); + const std::string versionVal = versionStrVal; + + const CXmlElement::SmartPtrCElementCollection cmdlMetadataChildrenXml = + thisXml->findOptionalChildren("cmdlMetadata"); + + std::deque cmdlMetadataVal; + if (! cmdlMetadataChildrenXml.IsNull() && ! cmdlMetadataChildrenXml->empty()) { + for (TConstIterator cmdlMetadataXmlIter(*cmdlMetadataChildrenXml); + cmdlMetadataXmlIter; cmdlMetadataXmlIter++) { + const SmartPtrCXmlElement cmdlMetadataXml = cmdlMetadataXmlIter->second; + const SmartPtrCCmdlMetadataDoc cmdlMetadataDoc = + CmdlMetadataXml::parse(cmdlMetadataXml); + cmdlMetadataVal.push_back(cmdlMetadataDoc); + } + } + + const CXmlElement::SmartPtrCElementCollection propertyChildrenXml = + thisXml->findOptionalChildren("property"); + + std::deque propertyVal; + if (! propertyChildrenXml.IsNull() && ! propertyChildrenXml->empty()) { + for (TConstIterator propertyXmlIter(*propertyChildrenXml); + propertyXmlIter; propertyXmlIter++) { + const SmartPtrCXmlElement propertyXml = propertyXmlIter->second; + const SmartPtrCDataClassPropertyDoc propertyDoc = + DataClassPropertyXml::parse(propertyXml); + propertyVal.push_back(propertyDoc); + } + } + + const CXmlElement::SmartPtrCElementCollection instancePropertyChildrenXml = + thisXml->findOptionalChildren("instanceProperty"); + + std::deque instancePropertyVal; + if (! instancePropertyChildrenXml.IsNull() && ! instancePropertyChildrenXml->empty()) { + for (TConstIterator instancePropertyXmlIter(*instancePropertyChildrenXml); + instancePropertyXmlIter; instancePropertyXmlIter++) { + const SmartPtrCXmlElement instancePropertyXml = instancePropertyXmlIter->second; + const SmartPtrCDataClassSubInstanceDoc instancePropertyDoc = + DataClassSubInstanceXml::parse(instancePropertyXml); + instancePropertyVal.push_back(instancePropertyDoc); + } + } + + const SmartPtrCXmlElement cmdlUnionXml = + thisXml->findOptionalChild("cmdlUnion"); + + SmartPtrCCmdlUnionDoc cmdlUnionVal; + if (! cmdlUnionXml.IsNull()) { + cmdlUnionVal = CmdlUnionXml::parse(cmdlUnionXml); + } + + dataClassInstanceDoc.CreateInstance(); + dataClassInstanceDoc->initialize( + namespaceValVal, + nameVal, + versionVal, + cmdlMetadataVal, + propertyVal, + instancePropertyVal, + cmdlUnionVal); + } + CAF_CM_EXIT; + + return dataClassInstanceDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassInstanceXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassInstanceXml.h new file mode 100644 index 000000000..b23aaefd1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassInstanceXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef DataClassInstanceXml_h_ +#define DataClassInstanceXml_h_ + +namespace Caf { + + /// Streams the DataClassInstance class to/from XML + namespace DataClassInstanceXml { + + /// Adds the DataClassInstanceDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCDataClassInstanceDoc dataClassInstanceDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the DataClassInstanceDoc from the XML. + SmartPtrCDataClassInstanceDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassPropertyXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassPropertyXml.cpp new file mode 100644 index 000000000..7ce33da52 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassPropertyXml.cpp @@ -0,0 +1,100 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "DataClassPropertyXml.h" + +using namespace Caf; + +void DataClassPropertyXml::add( + const SmartPtrCDataClassPropertyDoc dataClassPropertyDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DataClassPropertyXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(dataClassPropertyDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameVal = dataClassPropertyDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::deque cmdlMetadataVal = + dataClassPropertyDoc->getCmdlMetadata(); + if (! cmdlMetadataVal.empty()) { + for (TConstIterator > cmdlMetadataIter(cmdlMetadataVal); + cmdlMetadataIter; cmdlMetadataIter++) { + const SmartPtrCXmlElement cmdlMetadataXml = + thisXml->createAndAddElement("cmdlMetadata"); + CmdlMetadataXml::add(*cmdlMetadataIter, cmdlMetadataXml); + } + } + + const std::string valueVal = + dataClassPropertyDoc->getValue(); + if (! valueVal.empty()) { + const SmartPtrCXmlElement valueXml = + thisXml->createAndAddElement("value"); + valueXml->setValue(valueVal); + } + } + CAF_CM_EXIT; +} + +SmartPtrCDataClassPropertyDoc DataClassPropertyXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DataClassPropertyXml", "parse"); + + SmartPtrCDataClassPropertyDoc dataClassPropertyDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const CXmlElement::SmartPtrCElementCollection cmdlMetadataChildrenXml = + thisXml->findOptionalChildren("cmdlMetadata"); + + std::deque cmdlMetadataVal; + if (! cmdlMetadataChildrenXml.IsNull() && ! cmdlMetadataChildrenXml->empty()) { + for (TConstIterator cmdlMetadataXmlIter(*cmdlMetadataChildrenXml); + cmdlMetadataXmlIter; cmdlMetadataXmlIter++) { + const SmartPtrCXmlElement cmdlMetadataXml = cmdlMetadataXmlIter->second; + const SmartPtrCCmdlMetadataDoc cmdlMetadataDoc = + CmdlMetadataXml::parse(cmdlMetadataXml); + cmdlMetadataVal.push_back(cmdlMetadataDoc); + } + } + + const SmartPtrCXmlElement valueXml = + thisXml->findOptionalChild("value"); + + std::string valueVal; + if (! valueXml.IsNull()) { + if (! valueXml.IsNull()) { + valueVal = valueXml->getValue(); + } + } + + dataClassPropertyDoc.CreateInstance(); + dataClassPropertyDoc->initialize( + nameVal, + cmdlMetadataVal, + valueVal); + } + CAF_CM_EXIT; + + return dataClassPropertyDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassPropertyXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassPropertyXml.h new file mode 100644 index 000000000..f3143ecb5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassPropertyXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef DataClassPropertyXml_h_ +#define DataClassPropertyXml_h_ + +namespace Caf { + + /// Streams the DataClassProperty class to/from XML + namespace DataClassPropertyXml { + + /// Adds the DataClassPropertyDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCDataClassPropertyDoc dataClassPropertyDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the DataClassPropertyDoc from the XML. + SmartPtrCDataClassPropertyDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassSubInstanceXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassSubInstanceXml.cpp new file mode 100644 index 000000000..e4a8f758d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassSubInstanceXml.cpp @@ -0,0 +1,150 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "DataClassSubInstanceXml.h" + +using namespace Caf; + +void DataClassSubInstanceXml::add( + const SmartPtrCDataClassSubInstanceDoc dataClassSubInstanceDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DataClassSubInstanceXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(dataClassSubInstanceDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameVal = dataClassSubInstanceDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::deque cmdlMetadataVal = + dataClassSubInstanceDoc->getCmdlMetadataCollection(); + if (! cmdlMetadataVal.empty()) { + for (TConstIterator > cmdlMetadataIter(cmdlMetadataVal); + cmdlMetadataIter; cmdlMetadataIter++) { + const SmartPtrCXmlElement cmdlMetadataXml = + thisXml->createAndAddElement("cmdlMetadata"); + CmdlMetadataXml::add(*cmdlMetadataIter, cmdlMetadataXml); + } + } + + const std::deque propertyVal = + dataClassSubInstanceDoc->getPropertyCollection(); + if (! propertyVal.empty()) { + for (TConstIterator > propertyIter(propertyVal); + propertyIter; propertyIter++) { + const SmartPtrCXmlElement propertyXml = + thisXml->createAndAddElement("property"); + DataClassPropertyXml::add(*propertyIter, propertyXml); + } + } + + const std::deque instancePropertyVal = + dataClassSubInstanceDoc->getInstancePropertyCollection(); + if (! instancePropertyVal.empty()) { + for (TConstIterator > instancePropertyIter(instancePropertyVal); + instancePropertyIter; instancePropertyIter++) { + const SmartPtrCXmlElement instancePropertyXml = + thisXml->createAndAddElement("instanceProperty"); + DataClassSubInstanceXml::add(*instancePropertyIter, instancePropertyXml); + } + } + + const SmartPtrCCmdlUnionDoc cmdlUnionVal = + dataClassSubInstanceDoc->getCmdlUnion(); + if (! cmdlUnionVal.IsNull()) { + const SmartPtrCXmlElement cmdlUnionXml = + thisXml->createAndAddElement("cmdlUnion"); + CmdlUnionXml::add(cmdlUnionVal, cmdlUnionXml); + } + } + CAF_CM_EXIT; +} + +SmartPtrCDataClassSubInstanceDoc DataClassSubInstanceXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DataClassSubInstanceXml", "parse"); + + SmartPtrCDataClassSubInstanceDoc dataClassSubInstanceDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const CXmlElement::SmartPtrCElementCollection cmdlMetadataChildrenXml = + thisXml->findOptionalChildren("cmdlMetadata"); + + std::deque cmdlMetadataVal; + if (! cmdlMetadataChildrenXml.IsNull() && ! cmdlMetadataChildrenXml->empty()) { + for (TConstIterator cmdlMetadataXmlIter(*cmdlMetadataChildrenXml); + cmdlMetadataXmlIter; cmdlMetadataXmlIter++) { + const SmartPtrCXmlElement cmdlMetadataXml = cmdlMetadataXmlIter->second; + const SmartPtrCCmdlMetadataDoc cmdlMetadataDoc = + CmdlMetadataXml::parse(cmdlMetadataXml); + cmdlMetadataVal.push_back(cmdlMetadataDoc); + } + } + + const CXmlElement::SmartPtrCElementCollection propertyChildrenXml = + thisXml->findOptionalChildren("property"); + + std::deque propertyVal; + if (! propertyChildrenXml.IsNull() && ! propertyChildrenXml->empty()) { + for (TConstIterator propertyXmlIter(*propertyChildrenXml); + propertyXmlIter; propertyXmlIter++) { + const SmartPtrCXmlElement propertyXml = propertyXmlIter->second; + const SmartPtrCDataClassPropertyDoc propertyDoc = + DataClassPropertyXml::parse(propertyXml); + propertyVal.push_back(propertyDoc); + } + } + + const CXmlElement::SmartPtrCElementCollection instancePropertyChildrenXml = + thisXml->findOptionalChildren("instanceProperty"); + + std::deque instancePropertyVal; + if (! instancePropertyChildrenXml.IsNull() && ! instancePropertyChildrenXml->empty()) { + for (TConstIterator instancePropertyXmlIter(*instancePropertyChildrenXml); + instancePropertyXmlIter; instancePropertyXmlIter++) { + const SmartPtrCXmlElement instancePropertyXml = instancePropertyXmlIter->second; + const SmartPtrCDataClassSubInstanceDoc instancePropertyDoc = + DataClassSubInstanceXml::parse(instancePropertyXml); + instancePropertyVal.push_back(instancePropertyDoc); + } + } + + const SmartPtrCXmlElement cmdlUnionXml = + thisXml->findOptionalChild("cmdlUnion"); + + SmartPtrCCmdlUnionDoc cmdlUnionVal; + if (! cmdlUnionXml.IsNull()) { + cmdlUnionVal = CmdlUnionXml::parse(cmdlUnionXml); + } + + dataClassSubInstanceDoc.CreateInstance(); + dataClassSubInstanceDoc->initialize( + nameVal, + cmdlMetadataVal, + propertyVal, + instancePropertyVal, + cmdlUnionVal); + } + CAF_CM_EXIT; + + return dataClassSubInstanceDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassSubInstanceXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassSubInstanceXml.h new file mode 100644 index 000000000..9fab66f6f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassSubInstanceXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef DataClassSubInstanceXml_h_ +#define DataClassSubInstanceXml_h_ + +namespace Caf { + + /// Streams the DataClassSubInstance class to/from XML + namespace DataClassSubInstanceXml { + + /// Adds the DataClassSubInstanceDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCDataClassSubInstanceDoc dataClassSubInstanceDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the DataClassSubInstanceDoc from the XML. + SmartPtrCDataClassSubInstanceDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassXml.cpp new file mode 100644 index 000000000..c38fce49a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassXml.cpp @@ -0,0 +1,171 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "DataClassXml.h" + +using namespace Caf; + +void DataClassXml::add( + const SmartPtrCDataClassDoc dataClassDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DataClassXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(dataClassDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string namespaceValVal = dataClassDoc->getNamespaceVal(); + CAF_CM_VALIDATE_STRING(namespaceValVal); + thisXml->addAttribute("namespace", namespaceValVal); + + const std::string nameVal = dataClassDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::string versionVal = dataClassDoc->getVersion(); + CAF_CM_VALIDATE_STRING(versionVal); + thisXml->addAttribute("version", versionVal); + + const std::deque propertyVal = + dataClassDoc->getPropertyCollection(); + if (! propertyVal.empty()) { + for (TConstIterator > propertyIter(propertyVal); + propertyIter; propertyIter++) { + const SmartPtrCXmlElement propertyXml = + thisXml->createAndAddElement("property"); + ClassPropertyXml::add(*propertyIter, propertyXml); + } + } + + const std::deque instancePropertyVal = + dataClassDoc->getInstancePropertyCollection(); + if (! instancePropertyVal.empty()) { + for (TConstIterator > instancePropertyIter(instancePropertyVal); + instancePropertyIter; instancePropertyIter++) { + const SmartPtrCXmlElement instancePropertyXml = + thisXml->createAndAddElement("instanceProperty"); + ClassInstancePropertyXml::add(*instancePropertyIter, instancePropertyXml); + } + } + + const std::string uniqueVal = dataClassDoc->getUnique() ? "true" : "false"; + if (! uniqueVal.empty()) { + thisXml->addAttribute("unique", uniqueVal); + } + + const std::string transientValVal = dataClassDoc->getTransientVal() ? "true" : "false"; + if (! transientValVal.empty()) { + thisXml->addAttribute("transient", transientValVal); + } + + const std::string displayNameVal = dataClassDoc->getDisplayName(); + if (! displayNameVal.empty()) { + thisXml->addAttribute("displayName", displayNameVal); + } + + const std::string descriptionVal = dataClassDoc->getDescription(); + if (! descriptionVal.empty()) { + thisXml->addAttribute("description", descriptionVal); + } + } + CAF_CM_EXIT; +} + +SmartPtrCDataClassDoc DataClassXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DataClassXml", "parse"); + + SmartPtrCDataClassDoc dataClassDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string namespaceValStrVal = + thisXml->findRequiredAttribute("namespace"); + const std::string namespaceValVal = namespaceValStrVal; + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const std::string versionStrVal = + thisXml->findRequiredAttribute("version"); + const std::string versionVal = versionStrVal; + + const CXmlElement::SmartPtrCElementCollection propertyChildrenXml = + thisXml->findOptionalChildren("property"); + + std::deque propertyVal; + if (! propertyChildrenXml.IsNull() && ! propertyChildrenXml->empty()) { + for (TConstIterator propertyXmlIter(*propertyChildrenXml); + propertyXmlIter; propertyXmlIter++) { + const SmartPtrCXmlElement propertyXml = propertyXmlIter->second; + const SmartPtrCClassPropertyDoc propertyDoc = + ClassPropertyXml::parse(propertyXml); + propertyVal.push_back(propertyDoc); + } + } + + const CXmlElement::SmartPtrCElementCollection instancePropertyChildrenXml = + thisXml->findOptionalChildren("instanceProperty"); + + std::deque instancePropertyVal; + if (! instancePropertyChildrenXml.IsNull() && ! instancePropertyChildrenXml->empty()) { + for (TConstIterator instancePropertyXmlIter(*instancePropertyChildrenXml); + instancePropertyXmlIter; instancePropertyXmlIter++) { + const SmartPtrCXmlElement instancePropertyXml = instancePropertyXmlIter->second; + const SmartPtrCClassInstancePropertyDoc instancePropertyDoc = + ClassInstancePropertyXml::parse(instancePropertyXml); + instancePropertyVal.push_back(instancePropertyDoc); + } + } + + const std::string uniqueStrVal = + thisXml->findOptionalAttribute("unique"); + bool uniqueVal = false; + if (! uniqueStrVal.empty()) { + uniqueVal = (uniqueStrVal.compare("true") == 0) ? true : false; + } + + const std::string transientValStrVal = + thisXml->findOptionalAttribute("transient"); + bool transientValVal = false; + if (! transientValStrVal.empty()) { + transientValVal = (transientValStrVal.compare("true") == 0) ? true : false; + } + + const std::string displayNameStrVal = + thisXml->findOptionalAttribute("displayName"); + const std::string displayNameVal = displayNameStrVal; + + const std::string descriptionStrVal = + thisXml->findOptionalAttribute("description"); + const std::string descriptionVal = descriptionStrVal; + + dataClassDoc.CreateInstance(); + dataClassDoc->initialize( + namespaceValVal, + nameVal, + versionVal, + propertyVal, + instancePropertyVal, + uniqueVal, + transientValVal, + displayNameVal, + descriptionVal); + } + CAF_CM_EXIT; + + return dataClassDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassXml.h new file mode 100644 index 000000000..046e27669 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef DataClassXml_h_ +#define DataClassXml_h_ + +namespace Caf { + + /// Streams the DataClass class to/from XML + namespace DataClassXml { + + /// Adds the DataClassDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCDataClassDoc dataClassDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the DataClassDoc from the XML. + SmartPtrCDataClassDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/InstanceOperationCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/InstanceOperationCollectionXml.cpp new file mode 100644 index 000000000..7d3832e37 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/InstanceOperationCollectionXml.cpp @@ -0,0 +1,74 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "InstanceOperationCollectionXml.h" + +using namespace Caf; + +void InstanceOperationCollectionXml::add( + const SmartPtrCInstanceOperationCollectionDoc instanceOperationCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("InstanceOperationCollectionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(instanceOperationCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque instanceOperationVal = + instanceOperationCollectionDoc->getInstanceOperationCollection(); + CAF_CM_VALIDATE_STL(instanceOperationVal); + + if (! instanceOperationVal.empty()) { + for (TConstIterator > instanceOperationIter(instanceOperationVal); + instanceOperationIter; instanceOperationIter++) { + const SmartPtrCXmlElement instanceOperationXml = + thisXml->createAndAddElement("instanceOperation"); + InstanceOperationXml::add(*instanceOperationIter, instanceOperationXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCInstanceOperationCollectionDoc InstanceOperationCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("InstanceOperationCollectionXml", "parse"); + + SmartPtrCInstanceOperationCollectionDoc instanceOperationCollectionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection instanceOperationChildrenXml = + thisXml->findRequiredChildren("instanceOperation"); + + std::deque instanceOperationVal; + if (! instanceOperationChildrenXml.IsNull() && ! instanceOperationChildrenXml->empty()) { + for (TConstIterator instanceOperationXmlIter(*instanceOperationChildrenXml); + instanceOperationXmlIter; instanceOperationXmlIter++) { + const SmartPtrCXmlElement instanceOperationXml = instanceOperationXmlIter->second; + const SmartPtrCInstanceOperationDoc instanceOperationDoc = + InstanceOperationXml::parse(instanceOperationXml); + instanceOperationVal.push_back(instanceOperationDoc); + } + } + + instanceOperationCollectionDoc.CreateInstance(); + instanceOperationCollectionDoc->initialize( + instanceOperationVal); + } + CAF_CM_EXIT; + + return instanceOperationCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/InstanceOperationCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/InstanceOperationCollectionXml.h new file mode 100644 index 000000000..99b6ce811 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/InstanceOperationCollectionXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef InstanceOperationCollectionXml_h_ +#define InstanceOperationCollectionXml_h_ + +namespace Caf { + + /// Streams the InstanceOperationCollection class to/from XML + namespace InstanceOperationCollectionXml { + + /// Adds the InstanceOperationCollectionDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCInstanceOperationCollectionDoc instanceOperationCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the InstanceOperationCollectionDoc from the XML. + SmartPtrCInstanceOperationCollectionDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/InstanceOperationXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/InstanceOperationXml.cpp new file mode 100644 index 000000000..e1a9d8fc2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/InstanceOperationXml.cpp @@ -0,0 +1,64 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "InstanceOperationXml.h" + +using namespace Caf; + +void InstanceOperationXml::add( + const SmartPtrCInstanceOperationDoc instanceOperationDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("InstanceOperationXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(instanceOperationDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string operationNameVal = instanceOperationDoc->getOperationName(); + CAF_CM_VALIDATE_STRING(operationNameVal); + thisXml->addAttribute("operationName", operationNameVal); + + const std::string monikerVal = instanceOperationDoc->getMoniker(); + CAF_CM_VALIDATE_STRING(monikerVal); + thisXml->addAttribute("moniker", monikerVal); + } + CAF_CM_EXIT; +} + +SmartPtrCInstanceOperationDoc InstanceOperationXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("InstanceOperationXml", "parse"); + + SmartPtrCInstanceOperationDoc instanceOperationDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string operationNameStrVal = + thisXml->findRequiredAttribute("operationName"); + const std::string operationNameVal = operationNameStrVal; + + const std::string monikerStrVal = + thisXml->findRequiredAttribute("moniker"); + const std::string monikerVal = monikerStrVal; + + instanceOperationDoc.CreateInstance(); + instanceOperationDoc->initialize( + operationNameVal, + monikerVal); + } + CAF_CM_EXIT; + + return instanceOperationDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/InstanceOperationXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/InstanceOperationXml.h new file mode 100644 index 000000000..bba0993d0 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/InstanceOperationXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef InstanceOperationXml_h_ +#define InstanceOperationXml_h_ + +namespace Caf { + + /// Streams the InstanceOperation class to/from XML + namespace InstanceOperationXml { + + /// Adds the InstanceOperationDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCInstanceOperationDoc instanceOperationDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the InstanceOperationDoc from the XML. + SmartPtrCInstanceOperationDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/InstanceParameterXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/InstanceParameterXml.cpp new file mode 100644 index 000000000..c026cd88d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/InstanceParameterXml.cpp @@ -0,0 +1,127 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "InstanceParameterXml.h" + +using namespace Caf; + +void InstanceParameterXml::add( + const SmartPtrCInstanceParameterDoc instanceParameterDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("InstanceParameterXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(instanceParameterDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameVal = instanceParameterDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::string instanceNamespaceVal = instanceParameterDoc->getInstanceNamespace(); + CAF_CM_VALIDATE_STRING(instanceNamespaceVal); + thisXml->addAttribute("instanceNamespace", instanceNamespaceVal); + + const std::string instanceNameVal = instanceParameterDoc->getInstanceName(); + CAF_CM_VALIDATE_STRING(instanceNameVal); + thisXml->addAttribute("instanceName", instanceNameVal); + + const std::string instanceVersionVal = instanceParameterDoc->getInstanceVersion(); + CAF_CM_VALIDATE_STRING(instanceVersionVal); + thisXml->addAttribute("instanceVersion", instanceVersionVal); + + const std::string isOptionalVal = instanceParameterDoc->getIsOptional() ? "true" : "false"; + CAF_CM_VALIDATE_STRING(isOptionalVal); + thisXml->addAttribute("isOptional", isOptionalVal); + + const std::string isListVal = instanceParameterDoc->getIsList() ? "true" : "false"; + if (! isListVal.empty()) { + thisXml->addAttribute("isList", isListVal); + } + + const std::string displayNameVal = instanceParameterDoc->getDisplayName(); + if (! displayNameVal.empty()) { + thisXml->addAttribute("displayName", displayNameVal); + } + + const std::string descriptionVal = instanceParameterDoc->getDescription(); + if (! descriptionVal.empty()) { + thisXml->addAttribute("description", descriptionVal); + } + } + CAF_CM_EXIT; +} + +SmartPtrCInstanceParameterDoc InstanceParameterXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("InstanceParameterXml", "parse"); + + SmartPtrCInstanceParameterDoc instanceParameterDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const std::string instanceNamespaceStrVal = + thisXml->findRequiredAttribute("instanceNamespace"); + const std::string instanceNamespaceVal = instanceNamespaceStrVal; + + const std::string instanceNameStrVal = + thisXml->findRequiredAttribute("instanceName"); + const std::string instanceNameVal = instanceNameStrVal; + + const std::string instanceVersionStrVal = + thisXml->findRequiredAttribute("instanceVersion"); + const std::string instanceVersionVal = instanceVersionStrVal; + + const std::string isOptionalStrVal = + thisXml->findRequiredAttribute("isOptional"); + bool isOptionalVal = false; + if (! isOptionalStrVal.empty()) { + isOptionalVal = (isOptionalStrVal.compare("true") == 0) ? true : false; + } + + const std::string isListStrVal = + thisXml->findOptionalAttribute("isList"); + bool isListVal = false; + if (! isListStrVal.empty()) { + isListVal = (isListStrVal.compare("true") == 0) ? true : false; + } + + const std::string displayNameStrVal = + thisXml->findOptionalAttribute("displayName"); + const std::string displayNameVal = displayNameStrVal; + + const std::string descriptionStrVal = + thisXml->findOptionalAttribute("description"); + const std::string descriptionVal = descriptionStrVal; + + instanceParameterDoc.CreateInstance(); + instanceParameterDoc->initialize( + nameVal, + instanceNamespaceVal, + instanceNameVal, + instanceVersionVal, + isOptionalVal, + isListVal, + displayNameVal, + descriptionVal); + } + CAF_CM_EXIT; + + return instanceParameterDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/InstanceParameterXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/InstanceParameterXml.h new file mode 100644 index 000000000..153ebc378 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/InstanceParameterXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef InstanceParameterXml_h_ +#define InstanceParameterXml_h_ + +namespace Caf { + + /// Streams the InstanceParameter class to/from XML + namespace InstanceParameterXml { + + /// Adds the InstanceParameterDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCInstanceParameterDoc instanceParameterDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the InstanceParameterDoc from the XML. + SmartPtrCInstanceParameterDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/JoinTypeXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/JoinTypeXml.cpp new file mode 100644 index 000000000..1839fb5b6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/JoinTypeXml.cpp @@ -0,0 +1,103 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "JoinTypeXml.h" + +using namespace Caf; + +void JoinTypeXml::add( + const SmartPtrCJoinTypeDoc joinTypeDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("JoinTypeXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(joinTypeDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string operandVal = + EnumConvertersXml::convertOperatorTypeToString(joinTypeDoc->getOperand()); + CAF_CM_VALIDATE_STRING(operandVal); + thisXml->addAttribute("operand", operandVal); + + const SmartPtrCClassFieldDoc dataClassLeftVal = + joinTypeDoc->getDataClassLeft(); + CAF_CM_VALIDATE_SMARTPTR(dataClassLeftVal); + + const SmartPtrCXmlElement dataClassLeftXml = + thisXml->createAndAddElement("dataClassLeft"); + ClassFieldXml::add(dataClassLeftVal, dataClassLeftXml); + + const SmartPtrCClassFieldDoc dataClassRightVal = + joinTypeDoc->getDataClassRight(); + CAF_CM_VALIDATE_SMARTPTR(dataClassRightVal); + + const SmartPtrCXmlElement dataClassRightXml = + thisXml->createAndAddElement("dataClassRight"); + ClassFieldXml::add(dataClassRightVal, dataClassRightXml); + + const std::string descriptionVal = joinTypeDoc->getDescription(); + if (! descriptionVal.empty()) { + thisXml->addAttribute("description", descriptionVal); + } + } + CAF_CM_EXIT; +} + +SmartPtrCJoinTypeDoc JoinTypeXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("JoinTypeXml", "parse"); + + SmartPtrCJoinTypeDoc joinTypeDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string operandStrVal = + thisXml->findRequiredAttribute("operand"); + OPERATOR_TYPE operandVal = OPERATOR_NONE; + if (! operandStrVal.empty()) { + operandVal = EnumConvertersXml::convertStringToOperatorType(operandStrVal); + } + + const SmartPtrCXmlElement dataClassLeftXml = + thisXml->findRequiredChild("dataClassLeft"); + + SmartPtrCClassFieldDoc dataClassLeftVal; + if (! dataClassLeftXml.IsNull()) { + dataClassLeftVal = ClassFieldXml::parse(dataClassLeftXml); + } + + const SmartPtrCXmlElement dataClassRightXml = + thisXml->findRequiredChild("dataClassRight"); + + SmartPtrCClassFieldDoc dataClassRightVal; + if (! dataClassRightXml.IsNull()) { + dataClassRightVal = ClassFieldXml::parse(dataClassRightXml); + } + + const std::string descriptionStrVal = + thisXml->findOptionalAttribute("description"); + const std::string descriptionVal = descriptionStrVal; + + joinTypeDoc.CreateInstance(); + joinTypeDoc->initialize( + operandVal, + dataClassLeftVal, + dataClassRightVal, + descriptionVal); + } + CAF_CM_EXIT; + + return joinTypeDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/JoinTypeXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/JoinTypeXml.h new file mode 100644 index 000000000..29e2c491c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/JoinTypeXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef JoinTypeXml_h_ +#define JoinTypeXml_h_ + +namespace Caf { + + /// Streams the JoinType class to/from XML + namespace JoinTypeXml { + + /// Adds the JoinTypeDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCJoinTypeDoc joinTypeDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the JoinTypeDoc from the XML. + SmartPtrCJoinTypeDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/LogicalRelationshipXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/LogicalRelationshipXml.cpp new file mode 100644 index 000000000..a9977d377 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/LogicalRelationshipXml.cpp @@ -0,0 +1,158 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "LogicalRelationshipXml.h" + +using namespace Caf; + +void LogicalRelationshipXml::add( + const SmartPtrCLogicalRelationshipDoc logicalRelationshipDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("LogicalRelationshipXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(logicalRelationshipDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string namespaceValVal = logicalRelationshipDoc->getNamespaceVal(); + CAF_CM_VALIDATE_STRING(namespaceValVal); + thisXml->addAttribute("namespace", namespaceValVal); + + const std::string nameVal = logicalRelationshipDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::string versionVal = logicalRelationshipDoc->getVersion(); + CAF_CM_VALIDATE_STRING(versionVal); + thisXml->addAttribute("version", versionVal); + + const std::string arityVal = + EnumConvertersXml::convertArityTypeToString(logicalRelationshipDoc->getArity()); + CAF_CM_VALIDATE_STRING(arityVal); + thisXml->addAttribute("arity", arityVal); + + const SmartPtrCClassCardinalityDoc dataClassLeftVal = + logicalRelationshipDoc->getDataClassLeft(); + CAF_CM_VALIDATE_SMARTPTR(dataClassLeftVal); + + const SmartPtrCXmlElement dataClassLeftXml = + thisXml->createAndAddElement("dataClassLeft"); + ClassCardinalityXml::add(dataClassLeftVal, dataClassLeftXml); + + const SmartPtrCClassCardinalityDoc dataClassRightVal = + logicalRelationshipDoc->getDataClassRight(); + CAF_CM_VALIDATE_SMARTPTR(dataClassRightVal); + + const SmartPtrCXmlElement dataClassRightXml = + thisXml->createAndAddElement("dataClassRight"); + ClassCardinalityXml::add(dataClassRightVal, dataClassRightXml); + + const std::deque joinVal = + logicalRelationshipDoc->getJoinCollection(); + CAF_CM_VALIDATE_STL(joinVal); + + if (! joinVal.empty()) { + for (TConstIterator > joinIter(joinVal); + joinIter; joinIter++) { + const SmartPtrCXmlElement joinXml = + thisXml->createAndAddElement("join"); + JoinTypeXml::add(*joinIter, joinXml); + } + } + + const std::string descriptionVal = logicalRelationshipDoc->getDescription(); + if (! descriptionVal.empty()) { + thisXml->addAttribute("description", descriptionVal); + } + } + CAF_CM_EXIT; +} + +SmartPtrCLogicalRelationshipDoc LogicalRelationshipXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("LogicalRelationshipXml", "parse"); + + SmartPtrCLogicalRelationshipDoc logicalRelationshipDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string namespaceValStrVal = + thisXml->findRequiredAttribute("namespace"); + const std::string namespaceValVal = namespaceValStrVal; + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const std::string versionStrVal = + thisXml->findRequiredAttribute("version"); + const std::string versionVal = versionStrVal; + + const std::string arityStrVal = + thisXml->findRequiredAttribute("arity"); + ARITY_TYPE arityVal = ARITY_NONE; + if (! arityStrVal.empty()) { + arityVal = EnumConvertersXml::convertStringToArityType(arityStrVal); + } + + const SmartPtrCXmlElement dataClassLeftXml = + thisXml->findRequiredChild("dataClassLeft"); + + SmartPtrCClassCardinalityDoc dataClassLeftVal; + if (! dataClassLeftXml.IsNull()) { + dataClassLeftVal = ClassCardinalityXml::parse(dataClassLeftXml); + } + + const SmartPtrCXmlElement dataClassRightXml = + thisXml->findRequiredChild("dataClassRight"); + + SmartPtrCClassCardinalityDoc dataClassRightVal; + if (! dataClassRightXml.IsNull()) { + dataClassRightVal = ClassCardinalityXml::parse(dataClassRightXml); + } + + const CXmlElement::SmartPtrCElementCollection joinChildrenXml = + thisXml->findRequiredChildren("join"); + + std::deque joinVal; + if (! joinChildrenXml.IsNull() && ! joinChildrenXml->empty()) { + for (TConstIterator joinXmlIter(*joinChildrenXml); + joinXmlIter; joinXmlIter++) { + const SmartPtrCXmlElement joinXml = joinXmlIter->second; + const SmartPtrCJoinTypeDoc joinDoc = + JoinTypeXml::parse(joinXml); + joinVal.push_back(joinDoc); + } + } + + const std::string descriptionStrVal = + thisXml->findOptionalAttribute("description"); + const std::string descriptionVal = descriptionStrVal; + + logicalRelationshipDoc.CreateInstance(); + logicalRelationshipDoc->initialize( + namespaceValVal, + nameVal, + versionVal, + arityVal, + dataClassLeftVal, + dataClassRightVal, + joinVal, + descriptionVal); + } + CAF_CM_EXIT; + + return logicalRelationshipDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/LogicalRelationshipXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/LogicalRelationshipXml.h new file mode 100644 index 000000000..4497f3eaa --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/LogicalRelationshipXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef LogicalRelationshipXml_h_ +#define LogicalRelationshipXml_h_ + +namespace Caf { + + /// Streams the LogicalRelationship class to/from XML + namespace LogicalRelationshipXml { + + /// Adds the LogicalRelationshipDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCLogicalRelationshipDoc logicalRelationshipDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the LogicalRelationshipDoc from the XML. + SmartPtrCLogicalRelationshipDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/MethodParameterXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/MethodParameterXml.cpp new file mode 100644 index 000000000..a2ac3d06d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/MethodParameterXml.cpp @@ -0,0 +1,123 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "MethodParameterXml.h" + +using namespace Caf; + +void MethodParameterXml::add( + const SmartPtrCMethodParameterDoc methodParameterDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MethodParameterXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(methodParameterDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameVal = methodParameterDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::string typeVal = + EnumConvertersXml::convertParameterTypeToString(methodParameterDoc->getType()); + CAF_CM_VALIDATE_STRING(typeVal); + thisXml->addAttribute("type", typeVal); + + const std::string isOptionalVal = methodParameterDoc->getIsOptional() ? "true" : "false"; + CAF_CM_VALIDATE_STRING(isOptionalVal); + thisXml->addAttribute("isOptional", isOptionalVal); + + const std::string isListVal = methodParameterDoc->getIsList() ? "true" : "false"; + if (! isListVal.empty()) { + thisXml->addAttribute("isList", isListVal); + } + + const std::string defaultValVal = methodParameterDoc->getDefaultVal(); + if (! defaultValVal.empty()) { + thisXml->addAttribute("default", defaultValVal); + } + + const std::string displayNameVal = methodParameterDoc->getDisplayName(); + if (! displayNameVal.empty()) { + thisXml->addAttribute("displayName", displayNameVal); + } + + const std::string descriptionVal = methodParameterDoc->getDescription(); + if (! descriptionVal.empty()) { + thisXml->addAttribute("description", descriptionVal); + } + } + CAF_CM_EXIT; +} + +SmartPtrCMethodParameterDoc MethodParameterXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MethodParameterXml", "parse"); + + SmartPtrCMethodParameterDoc methodParameterDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const std::string typeStrVal = + thisXml->findRequiredAttribute("type"); + PARAMETER_TYPE typeVal = PARAMETER_NONE; + if (! typeStrVal.empty()) { + typeVal = EnumConvertersXml::convertStringToParameterType(typeStrVal); + } + + const std::string isOptionalStrVal = + thisXml->findRequiredAttribute("isOptional"); + bool isOptionalVal = false; + if (! isOptionalStrVal.empty()) { + isOptionalVal = (isOptionalStrVal.compare("true") == 0) ? true : false; + } + + const std::string isListStrVal = + thisXml->findOptionalAttribute("isList"); + bool isListVal = false; + if (! isListStrVal.empty()) { + isListVal = (isListStrVal.compare("true") == 0) ? true : false; + } + + const std::string defaultValStrVal = + thisXml->findOptionalAttribute("default"); + const std::string defaultValVal = defaultValStrVal; + + const std::string displayNameStrVal = + thisXml->findOptionalAttribute("displayName"); + const std::string displayNameVal = displayNameStrVal; + + const std::string descriptionStrVal = + thisXml->findOptionalAttribute("description"); + const std::string descriptionVal = descriptionStrVal; + + methodParameterDoc.CreateInstance(); + methodParameterDoc->initialize( + nameVal, + typeVal, + isOptionalVal, + isListVal, + defaultValVal, + displayNameVal, + descriptionVal); + } + CAF_CM_EXIT; + + return methodParameterDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/MethodParameterXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/MethodParameterXml.h new file mode 100644 index 000000000..5da6e04b9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/MethodParameterXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef MethodParameterXml_h_ +#define MethodParameterXml_h_ + +namespace Caf { + + /// Streams the MethodParameter class to/from XML + namespace MethodParameterXml { + + /// Adds the MethodParameterDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCMethodParameterDoc methodParameterDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the MethodParameterDoc from the XML. + SmartPtrCMethodParameterDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/MethodXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/MethodXml.cpp new file mode 100644 index 000000000..6dd7c2579 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/MethodXml.cpp @@ -0,0 +1,205 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "MethodXml.h" + +using namespace Caf; + +void MethodXml::add( + const SmartPtrCMethodDoc methodDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MethodXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(methodDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameVal = methodDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::deque parameterVal = + methodDoc->getParameterCollection(); + if (! parameterVal.empty()) { + for (TConstIterator > parameterIter(parameterVal); + parameterIter; parameterIter++) { + const SmartPtrCXmlElement parameterXml = + thisXml->createAndAddElement("parameter"); + MethodParameterXml::add(*parameterIter, parameterXml); + } + } + + const std::deque instanceParameterVal = + methodDoc->getInstanceParameterCollection(); + if (! instanceParameterVal.empty()) { + for (TConstIterator > instanceParameterIter(instanceParameterVal); + instanceParameterIter; instanceParameterIter++) { + const SmartPtrCXmlElement instanceParameterXml = + thisXml->createAndAddElement("instanceParameter"); + InstanceParameterXml::add(*instanceParameterIter, instanceParameterXml); + } + } + + const std::deque returnValVal = + methodDoc->getReturnValCollection(); + if (! returnValVal.empty()) { + for (TConstIterator > returnValIter(returnValVal); + returnValIter; returnValIter++) { + const SmartPtrCXmlElement returnValXml = + thisXml->createAndAddElement("return"); + ClassIdentifierXml::add(*returnValIter, returnValXml); + } + } + + const std::deque eventValVal = + methodDoc->getEventValCollection(); + if (! eventValVal.empty()) { + for (TConstIterator > eventValIter(eventValVal); + eventValIter; eventValIter++) { + const SmartPtrCXmlElement eventValXml = + thisXml->createAndAddElement("event"); + ClassIdentifierXml::add(*eventValIter, eventValXml); + } + } + + const std::deque errorVal = + methodDoc->getErrorCollection(); + if (! errorVal.empty()) { + for (TConstIterator > errorIter(errorVal); + errorIter; errorIter++) { + const SmartPtrCXmlElement errorXml = + thisXml->createAndAddElement("error"); + ClassIdentifierXml::add(*errorIter, errorXml); + } + } + + const std::string displayNameVal = methodDoc->getDisplayName(); + if (! displayNameVal.empty()) { + thisXml->addAttribute("displayName", displayNameVal); + } + + const std::string descriptionVal = methodDoc->getDescription(); + if (! descriptionVal.empty()) { + thisXml->addAttribute("description", descriptionVal); + } + } + CAF_CM_EXIT; +} + +SmartPtrCMethodDoc MethodXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MethodXml", "parse"); + + SmartPtrCMethodDoc methodDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const CXmlElement::SmartPtrCElementCollection parameterChildrenXml = + thisXml->findOptionalChildren("parameter"); + + std::deque parameterVal; + if (! parameterChildrenXml.IsNull() && ! parameterChildrenXml->empty()) { + for (TConstIterator parameterXmlIter(*parameterChildrenXml); + parameterXmlIter; parameterXmlIter++) { + const SmartPtrCXmlElement parameterXml = parameterXmlIter->second; + const SmartPtrCMethodParameterDoc parameterDoc = + MethodParameterXml::parse(parameterXml); + parameterVal.push_back(parameterDoc); + } + } + + const CXmlElement::SmartPtrCElementCollection instanceParameterChildrenXml = + thisXml->findOptionalChildren("instanceParameter"); + + std::deque instanceParameterVal; + if (! instanceParameterChildrenXml.IsNull() && ! instanceParameterChildrenXml->empty()) { + for (TConstIterator instanceParameterXmlIter(*instanceParameterChildrenXml); + instanceParameterXmlIter; instanceParameterXmlIter++) { + const SmartPtrCXmlElement instanceParameterXml = instanceParameterXmlIter->second; + const SmartPtrCInstanceParameterDoc instanceParameterDoc = + InstanceParameterXml::parse(instanceParameterXml); + instanceParameterVal.push_back(instanceParameterDoc); + } + } + + const CXmlElement::SmartPtrCElementCollection returnValChildrenXml = + thisXml->findOptionalChildren("return"); + + std::deque returnValVal; + if (! returnValChildrenXml.IsNull() && ! returnValChildrenXml->empty()) { + for (TConstIterator returnValXmlIter(*returnValChildrenXml); + returnValXmlIter; returnValXmlIter++) { + const SmartPtrCXmlElement returnValXml = returnValXmlIter->second; + const SmartPtrCClassIdentifierDoc returnValDoc = + ClassIdentifierXml::parse(returnValXml); + returnValVal.push_back(returnValDoc); + } + } + + const CXmlElement::SmartPtrCElementCollection eventValChildrenXml = + thisXml->findOptionalChildren("event"); + + std::deque eventValVal; + if (! eventValChildrenXml.IsNull() && ! eventValChildrenXml->empty()) { + for (TConstIterator eventValXmlIter(*eventValChildrenXml); + eventValXmlIter; eventValXmlIter++) { + const SmartPtrCXmlElement eventValXml = eventValXmlIter->second; + const SmartPtrCClassIdentifierDoc eventValDoc = + ClassIdentifierXml::parse(eventValXml); + eventValVal.push_back(eventValDoc); + } + } + + const CXmlElement::SmartPtrCElementCollection errorChildrenXml = + thisXml->findOptionalChildren("error"); + + std::deque errorVal; + if (! errorChildrenXml.IsNull() && ! errorChildrenXml->empty()) { + for (TConstIterator errorXmlIter(*errorChildrenXml); + errorXmlIter; errorXmlIter++) { + const SmartPtrCXmlElement errorXml = errorXmlIter->second; + const SmartPtrCClassIdentifierDoc errorDoc = + ClassIdentifierXml::parse(errorXml); + errorVal.push_back(errorDoc); + } + } + + const std::string displayNameStrVal = + thisXml->findOptionalAttribute("displayName"); + const std::string displayNameVal = displayNameStrVal; + + const std::string descriptionStrVal = + thisXml->findOptionalAttribute("description"); + const std::string descriptionVal = descriptionStrVal; + + methodDoc.CreateInstance(); + methodDoc->initialize( + nameVal, + parameterVal, + instanceParameterVal, + returnValVal, + eventValVal, + errorVal, + displayNameVal, + descriptionVal); + } + CAF_CM_EXIT; + + return methodDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/MethodXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/MethodXml.h new file mode 100644 index 000000000..25617e4ed --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/MethodXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef MethodXml_h_ +#define MethodXml_h_ + +namespace Caf { + + /// Streams the Method class to/from XML + namespace MethodXml { + + /// Adds the MethodDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCMethodDoc methodDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the MethodDoc from the XML. + SmartPtrCMethodDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/PhysicalRelationshipXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/PhysicalRelationshipXml.cpp new file mode 100644 index 000000000..6c0f47e63 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/PhysicalRelationshipXml.cpp @@ -0,0 +1,130 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "PhysicalRelationshipXml.h" + +using namespace Caf; + +void PhysicalRelationshipXml::add( + const SmartPtrCPhysicalRelationshipDoc physicalRelationshipDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("PhysicalRelationshipXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(physicalRelationshipDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string namespaceValVal = physicalRelationshipDoc->getNamespaceVal(); + CAF_CM_VALIDATE_STRING(namespaceValVal); + thisXml->addAttribute("namespace", namespaceValVal); + + const std::string nameVal = physicalRelationshipDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::string versionVal = physicalRelationshipDoc->getVersion(); + CAF_CM_VALIDATE_STRING(versionVal); + thisXml->addAttribute("version", versionVal); + + const std::string arityVal = + EnumConvertersXml::convertArityTypeToString(physicalRelationshipDoc->getArity()); + CAF_CM_VALIDATE_STRING(arityVal); + thisXml->addAttribute("arity", arityVal); + + const SmartPtrCClassCardinalityDoc dataClassLeftVal = + physicalRelationshipDoc->getDataClassLeft(); + CAF_CM_VALIDATE_SMARTPTR(dataClassLeftVal); + + const SmartPtrCXmlElement dataClassLeftXml = + thisXml->createAndAddElement("dataClassLeft"); + ClassCardinalityXml::add(dataClassLeftVal, dataClassLeftXml); + + const SmartPtrCClassCardinalityDoc dataClassRightVal = + physicalRelationshipDoc->getDataClassRight(); + CAF_CM_VALIDATE_SMARTPTR(dataClassRightVal); + + const SmartPtrCXmlElement dataClassRightXml = + thisXml->createAndAddElement("dataClassRight"); + ClassCardinalityXml::add(dataClassRightVal, dataClassRightXml); + + const std::string descriptionVal = physicalRelationshipDoc->getDescription(); + if (! descriptionVal.empty()) { + thisXml->addAttribute("description", descriptionVal); + } + } + CAF_CM_EXIT; +} + +SmartPtrCPhysicalRelationshipDoc PhysicalRelationshipXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("PhysicalRelationshipXml", "parse"); + + SmartPtrCPhysicalRelationshipDoc physicalRelationshipDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string namespaceValStrVal = + thisXml->findRequiredAttribute("namespace"); + const std::string namespaceValVal = namespaceValStrVal; + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const std::string versionStrVal = + thisXml->findRequiredAttribute("version"); + const std::string versionVal = versionStrVal; + + const std::string arityStrVal = + thisXml->findRequiredAttribute("arity"); + ARITY_TYPE arityVal = ARITY_NONE; + if (! arityStrVal.empty()) { + arityVal = EnumConvertersXml::convertStringToArityType(arityStrVal); + } + + const SmartPtrCXmlElement dataClassLeftXml = + thisXml->findRequiredChild("dataClassLeft"); + + SmartPtrCClassCardinalityDoc dataClassLeftVal; + if (! dataClassLeftXml.IsNull()) { + dataClassLeftVal = ClassCardinalityXml::parse(dataClassLeftXml); + } + + const SmartPtrCXmlElement dataClassRightXml = + thisXml->findRequiredChild("dataClassRight"); + + SmartPtrCClassCardinalityDoc dataClassRightVal; + if (! dataClassRightXml.IsNull()) { + dataClassRightVal = ClassCardinalityXml::parse(dataClassRightXml); + } + + const std::string descriptionStrVal = + thisXml->findOptionalAttribute("description"); + const std::string descriptionVal = descriptionStrVal; + + physicalRelationshipDoc.CreateInstance(); + physicalRelationshipDoc->initialize( + namespaceValVal, + nameVal, + versionVal, + arityVal, + dataClassLeftVal, + dataClassRightVal, + descriptionVal); + } + CAF_CM_EXIT; + + return physicalRelationshipDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/PhysicalRelationshipXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/PhysicalRelationshipXml.h new file mode 100644 index 000000000..cf4d1c232 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/PhysicalRelationshipXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef PhysicalRelationshipXml_h_ +#define PhysicalRelationshipXml_h_ + +namespace Caf { + + /// Streams the PhysicalRelationship class to/from XML + namespace PhysicalRelationshipXml { + + /// Adds the PhysicalRelationshipDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCPhysicalRelationshipDoc physicalRelationshipDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the PhysicalRelationshipDoc from the XML. + SmartPtrCPhysicalRelationshipDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/RelationshipXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/RelationshipXml.cpp new file mode 100644 index 000000000..c1e8bca9e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/RelationshipXml.cpp @@ -0,0 +1,130 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" +#include "RelationshipXml.h" + +using namespace Caf; + +void RelationshipXml::add( + const SmartPtrCRelationshipDoc relationshipDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("RelationshipXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(relationshipDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string namespaceValVal = relationshipDoc->getNamespaceVal(); + CAF_CM_VALIDATE_STRING(namespaceValVal); + thisXml->addAttribute("namespace", namespaceValVal); + + const std::string nameVal = relationshipDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::string versionVal = relationshipDoc->getVersion(); + CAF_CM_VALIDATE_STRING(versionVal); + thisXml->addAttribute("version", versionVal); + + const std::string arityVal = + EnumConvertersXml::convertArityTypeToString(relationshipDoc->getArity()); + CAF_CM_VALIDATE_STRING(arityVal); + thisXml->addAttribute("arity", arityVal); + + const SmartPtrCClassCardinalityDoc dataClassLeftVal = + relationshipDoc->getDataClassLeft(); + CAF_CM_VALIDATE_SMARTPTR(dataClassLeftVal); + + const SmartPtrCXmlElement dataClassLeftXml = + thisXml->createAndAddElement("dataClassLeft"); + ClassCardinalityXml::add(dataClassLeftVal, dataClassLeftXml); + + const SmartPtrCClassCardinalityDoc dataClassRightVal = + relationshipDoc->getDataClassRight(); + CAF_CM_VALIDATE_SMARTPTR(dataClassRightVal); + + const SmartPtrCXmlElement dataClassRightXml = + thisXml->createAndAddElement("dataClassRight"); + ClassCardinalityXml::add(dataClassRightVal, dataClassRightXml); + + const std::string descriptionVal = relationshipDoc->getDescription(); + if (! descriptionVal.empty()) { + thisXml->addAttribute("description", descriptionVal); + } + } + CAF_CM_EXIT; +} + +SmartPtrCRelationshipDoc RelationshipXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("RelationshipXml", "parse"); + + SmartPtrCRelationshipDoc relationshipDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string namespaceValStrVal = + thisXml->findRequiredAttribute("namespace"); + const std::string namespaceValVal = namespaceValStrVal; + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const std::string versionStrVal = + thisXml->findRequiredAttribute("version"); + const std::string versionVal = versionStrVal; + + const std::string arityStrVal = + thisXml->findRequiredAttribute("arity"); + ARITY_TYPE arityVal = ARITY_NONE; + if (! arityStrVal.empty()) { + arityVal = EnumConvertersXml::convertStringToArityType(arityStrVal); + } + + const SmartPtrCXmlElement dataClassLeftXml = + thisXml->findRequiredChild("dataClassLeft"); + + SmartPtrCClassCardinalityDoc dataClassLeftVal; + if (! dataClassLeftXml.IsNull()) { + dataClassLeftVal = ClassCardinalityXml::parse(dataClassLeftXml); + } + + const SmartPtrCXmlElement dataClassRightXml = + thisXml->findRequiredChild("dataClassRight"); + + SmartPtrCClassCardinalityDoc dataClassRightVal; + if (! dataClassRightXml.IsNull()) { + dataClassRightVal = ClassCardinalityXml::parse(dataClassRightXml); + } + + const std::string descriptionStrVal = + thisXml->findOptionalAttribute("description"); + const std::string descriptionVal = descriptionStrVal; + + relationshipDoc.CreateInstance(); + relationshipDoc->initialize( + namespaceValVal, + nameVal, + versionVal, + arityVal, + dataClassLeftVal, + dataClassRightVal, + descriptionVal); + } + CAF_CM_EXIT; + + return relationshipDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/RelationshipXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/RelationshipXml.h new file mode 100644 index 000000000..ff35f041b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/RelationshipXml.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef RelationshipXml_h_ +#define RelationshipXml_h_ + +namespace Caf { + + /// Streams the Relationship class to/from XML + namespace RelationshipXml { + + /// Adds the RelationshipDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCRelationshipDoc relationshipDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the RelationshipDoc from the XML. + SmartPtrCRelationshipDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/SchemaTypesXmlInc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/SchemaTypesXmlInc.h new file mode 100644 index 000000000..f1ac62d38 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/SchemaTypesXmlInc.h @@ -0,0 +1,43 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef SchemaTypesXml_Inc_h_ +#define SchemaTypesXml_Inc_h_ + +#include "../CafCoreTypesXml/CafCoreTypesXmlLink.h" +#include "ClassPropertyXml.h" +#include "ClassInstancePropertyXml.h" +#include "MethodParameterXml.h" +#include "InstanceParameterXml.h" +#include "ClassIdentifierXml.h" +#include "MethodXml.h" +#include "CollectMethodXml.h" +#include "ClassCardinalityXml.h" +#include "ClassFieldXml.h" +#include "RelationshipXml.h" +#include "PhysicalRelationshipXml.h" +#include "JoinTypeXml.h" +#include "LogicalRelationshipXml.h" +#include "DataClassXml.h" +#include "CmdlMetadataXml.h" +#include "CmdlUnionXml.h" +#include "DataClassPropertyXml.h" +#include "DataClassSubInstanceXml.h" +#include "DataClassInstanceXml.h" +#include "DataClassInstanceCollectionXml.h" +#include "InstanceOperationXml.h" +#include "InstanceOperationCollectionXml.h" +#include "ActionClassInstanceXml.h" +#include "ActionClassInstanceCollectionXml.h" +#include "ActionClassXml.h" + +#endif /* SchemaTypesXml_Inc_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/SchemaTypesXmlLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/SchemaTypesXmlLink.h new file mode 100644 index 000000000..44425cb11 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/SchemaTypesXmlLink.h @@ -0,0 +1,30 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef SchemaTypesXml_Link_h_ +#define SchemaTypesXml_Link_h_ + +#ifndef SCHEMATYPESXML_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define SCHEMATYPESXML_LINKAGE __declspec(dllexport) + #else + #define SCHEMATYPESXML_LINKAGE __declspec(dllimport) + #endif + #else + #define SCHEMATYPESXML_LINKAGE + #endif +#endif + +#include "SchemaTypesXmlInc.h" + +#endif /* SchemaTypesXml_Link_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/stdafx.h new file mode 100644 index 000000000..972c435f1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/stdafx.h @@ -0,0 +1,28 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define SCHEMATYPESXML_LINKAGE __declspec(dllexport) +#else + #define SCHEMATYPESXML_LINKAGE +#endif + +#include +#include +#include + +#include "SchemaTypesXmlInc.h" + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CBacktraceUtils.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CBacktraceUtils.cpp new file mode 100644 index 000000000..e9b4308ed --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CBacktraceUtils.cpp @@ -0,0 +1,143 @@ +/*k + * Author: bwilliams + * Created: Oct 30, 2014 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "stdlib.h" +#include "CBacktraceUtils.h" +#include + +#ifdef WIN32 +#include "StackWalker.h" +#else +#include +#include +#endif + +using namespace Caf; + +#ifdef WIN32 +class StackWalkerToDeque : public StackWalker { +public: + StackWalkerToDeque() : depth(0) {} + + std::deque getBacktrace() { + return backtrace; + } + +private: + static const int STACK_DEPTH_IGNORE = 3; + int depth; + std::deque backtrace; + +protected: + virtual void OnSymInit(LPCSTR szSearchPath, DWORD symOptions, LPCSTR szUserName) { + // Do nothing to suppress default OnSymInit output + } + + virtual void OnLoadModule(LPCSTR img, LPCSTR mod, DWORD64 baseAddr, DWORD size, DWORD result, LPCSTR symType, LPCSTR pdbName, ULONGLONG fileVersion) { + // Do nothing to suppress default OnLoadModule output + } + + virtual void OnDbgHelpErr(LPCSTR szFuncName, DWORD gle, DWORD64 addr){ + // Do nothing to suppress default OnDbgHelpErr output + } + + virtual void OnOutput(LPCSTR szText) { + try { + std::string line = szText; + if (STACK_DEPTH_IGNORE < depth++) { + backtrace.push_back(CStringUtils::trimRight(line)); + } + } catch (...) { + backtrace.push_back("CBacktraceUtils::getBacktrace() threw an exception"); + } + } +}; + +std::deque CBacktraceUtils::getBacktrace() { + StackWalkerToDeque sw; + sw.ShowCallstack(); + return sw.getBacktrace(); +} + +#else +std::deque CBacktraceUtils::getBacktrace() { + char** messages = NULL; + std::deque backtrace; + try { + const int32 maxStackEntries = 50; + void *stackEntries[maxStackEntries]; + const size_t size = ::backtrace(stackEntries, maxStackEntries); + + messages = ::backtrace_symbols(stackEntries, size); + + /* skip first stack frame (points here) */ + for (size_t i = 1; i < size && messages != NULL; ++i) { + const std::string name = demangleName(messages[i]); + backtrace.push_back(name); + } + } + catch (...) { + backtrace.push_back("CBacktraceUtils::getBacktrace() threw an exception"); + } + + if (NULL != messages) { + ::free(messages); + } + + return backtrace; +} + +std::string CBacktraceUtils::demangleName(char* name) { + std::string rc; + if (NULL != name) { + char* mangled_name = 0; + char* offset_begin = 0; + char* offset_end = 0; + + // find parentheses and +address offset surrounding mangled name + for (char *p = name; *p; ++p) { + if (*p == '(') { + mangled_name = p; + } else if (*p == '+') { + offset_begin = p; + } else if (*p == ')') { + offset_end = p; + break; + } + } + + // if the line could be processed, attempt to demangle the symbol + if (mangled_name && offset_begin && offset_end && mangled_name < offset_begin) { + *mangled_name++ = '\0'; + *offset_begin++ = '\0'; + *offset_end++ = '\0'; + + int32 status; + char* real_name = abi::__cxa_demangle(mangled_name, 0, 0, &status); + + // if demangling is successful, output the demangled function name + if (status == 0) { + rc = real_name; + } + // otherwise, output the mangled function name + else { + rc = mangled_name; + } + + ::free(real_name); + } + // otherwise, print the whole line + else { + rc = name; + } + } + + return rc; +} +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CBacktraceUtils.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CBacktraceUtils.h new file mode 100644 index 000000000..08067d3ff --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CBacktraceUtils.h @@ -0,0 +1,33 @@ +/* + * Author: bwilliams + * Created: Oct 30, 2014 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CBacktraceUtils_H_ +#define CBacktraceUtils_H_ + +namespace Caf { + +// See http://stackoverflow.com/questions/77005/how-to-generate-a-stacktrace-when-my-gcc-c-app-crashes +class EXCEPTION_LINKAGE CBacktraceUtils { +public: + static std::deque getBacktrace(); + +#ifndef WIN32 +private: + static std::string demangleName(char* name); +#endif + +private: + CBacktraceUtils(); + ~CBacktraceUtils(); + CBacktraceUtils(const CBacktraceUtils&); + CBacktraceUtils& operator=(const CBacktraceUtils&); +}; + +} + +#endif /* CBacktraceUtils_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CCafException.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CCafException.cpp new file mode 100644 index 000000000..bcc5011fd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CCafException.cpp @@ -0,0 +1,147 @@ +/* + * Author: mdonahue + * Created: Jan 13, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CCafException.h" +#include +#include +#include "CBacktraceUtils.h" + +using namespace Caf; + +CCafException::CCafException() : + _refCnt(0), + _isPopulated(false), + _exceptionClassName("CCafException"), + _errorCode(S_OK), + _backtrace(NULL) { +} + +CCafException::CCafException(const std::string& exceptionClassName) : + _refCnt(0), + _isPopulated(false), + _exceptionClassName(exceptionClassName), + _errorCode(S_OK), + _backtrace(NULL) { +} + +CCafException::~CCafException() { + if (_backtrace != NULL) { + delete _backtrace; + } +} + +void CCafException::throwSelf() { + throw this; +} + +void CCafException::throwAddRefedSelf() { + this->AddRef(); + throw this; +} + +void CCafException::AddRef() { + g_atomic_int_inc(&_refCnt); +} + +void CCafException::Release() { + if (g_atomic_int_dec_and_test(&_refCnt)) { + delete this; + } +} + +void CCafException::QueryInterface(const IID&, void**) { + throw std::runtime_error("QueryInterface not supported"); +} + +void CCafException::populate( + const std::string& message, + const HRESULT errorCode, + const std::string& className, + const std::string& funcName) { + _message = message; + _className = className; + _funcName = funcName; + _errorCode = HRESULT_FROM_WIN32(errorCode); + if (_backtrace != NULL) { + delete _backtrace; + } + _backtrace = new std::deque(CBacktraceUtils::getBacktrace()); + _isPopulated = true; +} + +void CCafException::populateVA( + const HRESULT errorCode, + const std::string& className, + const std::string& funcName, + const char* format, + ...) { + char buffer[1024]; + va_list args; + va_start(args, format); +#ifdef WIN32 + // Returns -1 if the buffer is truncated. + const int rc = vsnprintf_s(buffer, 1024, _TRUNCATE, format, args); + if ((rc > 0) || (rc == -1)) { +#else + if (vsnprintf(buffer, 1024, format, args) > 0) { +#endif + _message = buffer; + } else { + _message = "*** PopulateVA() INTERNAL ERROR: UNABLE TO FORMAT MESSAGE ***"; + } + va_end(args); + _className = className; + _funcName = funcName; + _errorCode = HRESULT_FROM_WIN32(errorCode); + if (_backtrace != NULL) { + delete _backtrace; + } + _backtrace = new std::deque(CBacktraceUtils::getBacktrace()); + _isPopulated = true; +} + +bool CCafException::isPopulated() const { + return _isPopulated; +} + +std::string CCafException::getExceptionClassName() const { + return _exceptionClassName; +} + +std::string CCafException::getMsg() const { + return _message; +} + +std::string CCafException::getClassName() const { + return _className; +} + +std::string CCafException::getFuncName() const { + return _funcName; +} + +HRESULT CCafException::getError() const { + return _errorCode; +} + +std::deque* CCafException::getBacktrace() const { + return _backtrace; +} + +std::string CCafException::getFullMsg() const { + std::string msg("["); + msg += _exceptionClassName; + msg += "] "; + msg += _className; + msg += "::"; + msg += _funcName; + msg += "() "; + msg += _message; + return msg; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CCafException.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CCafException.h new file mode 100644 index 000000000..b0ae817dc --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CCafException.h @@ -0,0 +1,79 @@ +/* + * Author: mdonahue + * Created: Jan 13, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CCAFEXCEPTION_H_ +#define CCAFEXCEPTION_H_ + +namespace Caf { + +class EXCEPTION_LINKAGE CCafException : public ICafObject { +public: + CCafException(); + + CCafException(const std::string& exceptionClassName); + + virtual ~CCafException(); + + virtual void throwSelf(); + + virtual void throwAddRefedSelf(); + + void AddRef(); + + void Release(); + + void QueryInterface(const IID&, void**); + + void populate( + const std::string& message, + const HRESULT errorCode, + const std::string& className, + const std::string& funcName); + + void populateVA(const HRESULT errorCode, + const std::string& className, + const std::string& funcName, + const char* format, + ...); + + bool isPopulated() const; + + std::string getExceptionClassName() const; + + virtual std::string getMsg() const; + + std::string getClassName() const; + + std::string getFuncName() const; + + HRESULT getError() const; + + std::deque* getBacktrace() const; + + virtual std::string getFullMsg() const; + +private: + gint _refCnt; + bool _isPopulated; + +protected: + std::string _exceptionClassName; + HRESULT _errorCode; + std::string _message; + std::string _className; + std::string _funcName; + std::deque* _backtrace; + + CCafException(const CCafException&); + CCafException& operator=(const CCafException&); +}; +CAF_DECLARE_SMART_POINTER(CCafException); + +} + +#endif /* CCAFEXCEPTION_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CCafExceptionEx.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CCafExceptionEx.cpp new file mode 100644 index 000000000..2ef073a14 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CCafExceptionEx.cpp @@ -0,0 +1,45 @@ +/* + * Created on: Oct 6, 2011 + * Author: mdonahue + * + * Copyright (c) 2011 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CCafExceptionEx.h" + +using namespace Caf; + +// General Runtime Exceptions +CAF_CM_DEFINE_EXCEPTION_CLASS(AccessDeniedException); +CAF_CM_DEFINE_EXCEPTION_CLASS(NullPointerException); +CAF_CM_DEFINE_EXCEPTION_CLASS(BufferOverflowException); +CAF_CM_DEFINE_EXCEPTION_CLASS(BufferUnderflowException); +CAF_CM_DEFINE_EXCEPTION_CLASS(InvalidArgumentException); +CAF_CM_DEFINE_EXCEPTION_CLASS(IllegalStateException); +CAF_CM_DEFINE_EXCEPTION_CLASS(IndexOutOfBoundsException); +CAF_CM_DEFINE_EXCEPTION_CLASS(NoSuchElementException); +CAF_CM_DEFINE_EXCEPTION_CLASS(DuplicateElementException); +CAF_CM_DEFINE_EXCEPTION_CLASS(UnsupportedOperationException); +CAF_CM_DEFINE_EXCEPTION_CLASS(UnsupportedVersionException); +CAF_CM_DEFINE_EXCEPTION_CLASS(InvalidHandleException); +CAF_CM_DEFINE_EXCEPTION_CLASS(TimeoutException); +CAF_CM_DEFINE_EXCEPTION_CLASS(NoSuchInterfaceException); +CAF_CM_DEFINE_EXCEPTION_CLASS(ProcessFailedException); + +// AppConfig Exceptions +CAF_CM_DEFINE_EXCEPTION_CLASS(NoSuchConfigSectionException); +CAF_CM_DEFINE_EXCEPTION_CLASS(NoSuchConfigValueException); + +// Dynamic Library Exception +CAF_CM_DEFINE_EXCEPTION_CLASS(LibraryFailedToLoadException); +CAF_CM_DEFINE_EXCEPTION_CLASS(NoSuchMethodException); + +// I/O Exceptions +CAF_CM_DEFINE_EXCEPTION_CLASS(IOException); +CAF_CM_DEFINE_EXCEPTION_CLASS(EOFException); +CAF_CM_DEFINE_EXCEPTION_CLASS(FileNotFoundException); +CAF_CM_DEFINE_EXCEPTION_CLASS(PathNotFoundException); +CAF_CM_DEFINE_EXCEPTION_CLASS(FileLockedException); + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CCafExceptionEx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CCafExceptionEx.h new file mode 100644 index 000000000..3895f44ab --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CCafExceptionEx.h @@ -0,0 +1,69 @@ +/* + * Created on: Oct 6, 2011 + * Author: mdonahue + * + * Copyright (c) 2011 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CCAFEXCEPTIONEX_H_ +#define CCAFEXCEPTIONEX_H_ + + +#define CAF_CM_DECLARE_EXCEPTION_CLASS(_exclass_) \ +class EXCEPTION_LINKAGE _exclass_ : public Caf::CCafException { \ +public: \ + _exclass_(); \ + virtual ~_exclass_(); \ + void throwSelf(); \ + void throwAddRefedSelf(); \ +private: \ + _exclass_(const _exclass_ &); \ + _exclass_ & operator=(const _exclass_ &); \ +}; \ +typedef TCafSmartPtr<_exclass_, TCafObject<_exclass_> > SmartPtr##_exclass_ + +#define CAF_CM_DEFINE_EXCEPTION_CLASS(_exclass_) \ + _exclass_::_exclass_() : CCafException( #_exclass_ ) {} \ + _exclass_::~_exclass_() {} \ + void _exclass_::throwSelf() { throw this; } \ + void _exclass_::throwAddRefedSelf() { this->AddRef(); throw this; } + +namespace Caf { + +// General Runtime Exceptions +CAF_CM_DECLARE_EXCEPTION_CLASS(AccessDeniedException); +CAF_CM_DECLARE_EXCEPTION_CLASS(NullPointerException); +CAF_CM_DECLARE_EXCEPTION_CLASS(BufferOverflowException); +CAF_CM_DECLARE_EXCEPTION_CLASS(BufferUnderflowException); +CAF_CM_DECLARE_EXCEPTION_CLASS(InvalidArgumentException); +CAF_CM_DECLARE_EXCEPTION_CLASS(IllegalStateException); +CAF_CM_DECLARE_EXCEPTION_CLASS(IndexOutOfBoundsException); +CAF_CM_DECLARE_EXCEPTION_CLASS(NoSuchElementException); +CAF_CM_DECLARE_EXCEPTION_CLASS(DuplicateElementException); +CAF_CM_DECLARE_EXCEPTION_CLASS(UnsupportedOperationException); +CAF_CM_DECLARE_EXCEPTION_CLASS(UnsupportedVersionException); +CAF_CM_DECLARE_EXCEPTION_CLASS(InvalidHandleException); +CAF_CM_DECLARE_EXCEPTION_CLASS(TimeoutException); +CAF_CM_DECLARE_EXCEPTION_CLASS(NoSuchInterfaceException); +CAF_CM_DECLARE_EXCEPTION_CLASS(ProcessFailedException); + +// AppConfig Exceptions +CAF_CM_DECLARE_EXCEPTION_CLASS(NoSuchConfigSectionException); +CAF_CM_DECLARE_EXCEPTION_CLASS(NoSuchConfigValueException); + +// Dynamic Library Exception +CAF_CM_DECLARE_EXCEPTION_CLASS(LibraryFailedToLoadException); +CAF_CM_DECLARE_EXCEPTION_CLASS(NoSuchMethodException); + +// I/O Exceptions +CAF_CM_DECLARE_EXCEPTION_CLASS(IOException); +CAF_CM_DECLARE_EXCEPTION_CLASS(EOFException); +CAF_CM_DECLARE_EXCEPTION_CLASS(FileNotFoundException); +CAF_CM_DECLARE_EXCEPTION_CLASS(PathNotFoundException); +CAF_CM_DECLARE_EXCEPTION_CLASS(FileLockedException); + +} + +#endif + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CValidate.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CValidate.cpp new file mode 100644 index 000000000..6a5fd62e1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CValidate.cpp @@ -0,0 +1,256 @@ +/* + * Author: bwilliams + * Created: Jan 21, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CValidate.h" + +using namespace Caf; + +// Some helper macros that make is easy to validate input arguments. +#define CAF_EXCEPTION_VALIDATE(_valmsg_, _variable_text_ ) \ + CAF_CM_EXCEPTION_VA2(E_INVALIDARG, "%s %s", _valmsg_, _variable_text_) + +void CValidate::constructed(const bool value, const char* className, const char* funcName) { + CAF_CM_STATIC_FUNC(className, funcName); + + CAF_CM_ENTER { + if (! value ) { + CAF_CM_EXCEPTION_VA0(ERROR_INVALID_STATE, _sPRECOND_ISCONSTRUCTED); + } + } + CAF_CM_EXIT; +} + +void CValidate::initialized(const bool value, const char* className, const char* funcName) { + CAF_CM_STATIC_FUNC(className, funcName); + + CAF_CM_ENTER { + if (! value ) { + CAF_CM_EXCEPTION_VA0(OLE_E_BLANK, _sPRECOND_ISINITIALIZED); + } + } + CAF_CM_EXIT; +} + +void CValidate::notInitialized(const bool value, const char* className, const char* funcName) { + CAF_CM_STATIC_FUNC(className, funcName); + + CAF_CM_ENTER { + if (value ) { + CAF_CM_EXCEPTION_VA0(ERROR_ALREADY_INITIALIZED, _sPRECOND_ISNOTINITIALIZED); + } + } + CAF_CM_EXIT; +} + +void CValidate::notEmptyStr(const std::string& value, const char* name, const char* className, const char* funcName) { + CAF_CM_STATIC_FUNC(className, funcName); + + CAF_CM_ENTER { + if (value.length() == 0 ) { + CAF_EXCEPTION_VALIDATE(_sVALIDATE_STRINGEMPTY, name); + } + } + CAF_CM_EXIT; +} + +void CValidate::notEmptyStr(const std::wstring& value, const char* name, const char* className, const char* funcName) { + CAF_CM_STATIC_FUNC(className, funcName); + + CAF_CM_ENTER { + if (value.length() == 0 ) { + CAF_EXCEPTION_VALIDATE(_sVALIDATE_STRINGEMPTY, name); + } + } + CAF_CM_EXIT; +} + +void CValidate::notEmptyUuid(const UUID value, const char* name, const char* className, const char* funcName) { + CAF_CM_STATIC_FUNC(className, funcName); + + CAF_CM_ENTER { + if (::IsEqualGUID(value, CAFCOMMON_GUID_NULL) ) { + CAF_EXCEPTION_VALIDATE(_sVALIDATE_GUID, name); + } + } + CAF_CM_EXIT; +} + +void CValidate::notNullOrEmptyStr(const char* value, const char* name, const char* className, const char* funcName) { + CAF_CM_STATIC_FUNC(className, funcName); + + CAF_CM_ENTER { + if (NULL == value) { + CAF_EXCEPTION_VALIDATE(_sVALIDATE_STRINGPTRNULL, name); + } + if (value[ 0 ] == '\0' ) { + CAF_EXCEPTION_VALIDATE(_sVALIDATE_STRINGPTREMPTY, name); + } + } + CAF_CM_EXIT; +} + +void CValidate::notNullOrEmptyStr(const wchar_t* value, const char* name, const char* className, const char* funcName) { + CAF_CM_STATIC_FUNC(className, funcName); + + CAF_CM_ENTER { + if (NULL == value) { + CAF_EXCEPTION_VALIDATE(_sVALIDATE_STRINGPTRNULL, name); + } + if (value[ 0 ] == L'\0') { + CAF_EXCEPTION_VALIDATE(_sVALIDATE_STRINGPTREMPTY, name); + } + } + CAF_CM_EXIT; +} + +void CValidate::notNullOrEmptyPtrArr(const void** value, const char* name, const char* className, const char* funcName) { + CAF_CM_STATIC_FUNC(className, funcName); + + CAF_CM_ENTER { + if (NULL == value) { + CAF_EXCEPTION_VALIDATE( _sVALIDATE_PTRARRAYNULL, name); + } + if (NULL == value[ 0 ]) { + CAF_EXCEPTION_VALIDATE( _sVALIDATE_PTRARRAYEMPTY, name); + } + } + CAF_CM_EXIT; +} + +void CValidate::notNullInterface(const ICafObject* value, const char* name, const char* className, const char* funcName) { + CAF_CM_STATIC_FUNC(className, funcName); + + CAF_CM_ENTER { + if (NULL == value) { + CAF_EXCEPTION_VALIDATE(_sVALIDATE_INTERFACE, name); + } + } + CAF_CM_EXIT; +} + +void CValidate::notNullPtr(const void* value, const char* name, const char* className, const char* funcName) { + CAF_CM_STATIC_FUNC(className, funcName); + + CAF_CM_ENTER { + if (NULL == value) { + CAF_EXCEPTION_VALIDATE(_sVALIDATE_NOTNULL, name); + } + } + CAF_CM_EXIT; +} + +void CValidate::nullPtr(const void* value, const char* name, const char* className, const char* funcName) { + CAF_CM_STATIC_FUNC(className, funcName); + + CAF_CM_ENTER { + if (NULL != value) { + CAF_EXCEPTION_VALIDATE(_sVALIDATE_NULL, name); + } + } + CAF_CM_EXIT; +} + +void CValidate::zero(const int32 value, const char* name, const char* className, const char* funcName) { + CAF_CM_STATIC_FUNC(className, funcName); + + CAF_CM_ENTER { + if (value != 0 ) { + CAF_EXCEPTION_VALIDATE(_sVALIDATE_ZERO, name); + } + } + CAF_CM_EXIT; +} + +void CValidate::notZero(const int32 value, const char* name, const char* className, const char* funcName) { + CAF_CM_STATIC_FUNC(className, funcName); + + CAF_CM_ENTER { + if (value == 0 ) { + CAF_EXCEPTION_VALIDATE(_sVALIDATE_ISNOTZERO, name); + } + } + CAF_CM_EXIT; +} + +void CValidate::positive(const int32 value, const char* name, const char* className, const char* funcName) { + CAF_CM_STATIC_FUNC(className, funcName); + + CAF_CM_ENTER { + if (value <= 0 ) { + CAF_EXCEPTION_VALIDATE(_sVALIDATE_POSITIVE, name); + } + } + CAF_CM_EXIT; +} + +void CValidate::negative(const int32 value, const char* name, const char* className, const char* funcName) { + CAF_CM_STATIC_FUNC(className, funcName); + + CAF_CM_ENTER { + if (value >= 0 ) { + CAF_EXCEPTION_VALIDATE(_sVALIDATE_NEGATIVE, name); + } + } + CAF_CM_EXIT; +} + +void CValidate::nonNegative(const int32 value, const char* name, const char* className, const char* funcName) { + CAF_CM_STATIC_FUNC(className, funcName); + + CAF_CM_ENTER { + if (value < 0 ) { + CAF_EXCEPTION_VALIDATE(_sVALIDATE_NONNEGATIVE, name); + } + } + CAF_CM_EXIT; +} + +void CValidate::nonNegative64(const int64 value, const char* name, const char* className, const char* funcName) { + CAF_CM_STATIC_FUNC(className, funcName); + + CAF_CM_ENTER { + if (value < 0 ) { + CAF_EXCEPTION_VALIDATE(_sVALIDATE_NONNEGATIVE, name); + } + } + CAF_CM_EXIT; +} + +void CValidate::isTrue(const bool value, const char* name, const char* className, const char* funcName) { + CAF_CM_STATIC_FUNC(className, funcName); + + CAF_CM_ENTER { + if (! value ) { + CAF_EXCEPTION_VALIDATE(_sVALIDATE_BOOL, name); + } + } + CAF_CM_EXIT; +} + +void CValidate::notEmptyStl(const size_t value, const char* name, const char* className, const char* funcName) { + CAF_CM_STATIC_FUNC(className, funcName); + + CAF_CM_ENTER { + if (value < 1) { + CAF_EXCEPTION_VALIDATE(_sVALIDATE_STL, name); + } + } + CAF_CM_EXIT; +} + +void CValidate::emptyStl(const size_t value, const char* name, const char* className, const char* funcName) { + CAF_CM_STATIC_FUNC(className, funcName); + + CAF_CM_ENTER { + if (value != 0) { + CAF_EXCEPTION_VALIDATE(_sVALIDATE_STL_EMPTY, name); + } + } + CAF_CM_EXIT; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CValidate.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CValidate.h new file mode 100644 index 000000000..54b3736c7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CValidate.h @@ -0,0 +1,44 @@ +/* + * Author: bwilliams + * Created: Jan 21, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CVALIDATE_H_ +#define CVALIDATE_H_ + +namespace Caf { + +class EXCEPTION_LINKAGE CValidate { +public: + static void constructed(const bool value, const char* className, const char* funcName); + static void initialized(const bool value, const char* className, const char* funcName); + static void notInitialized(const bool value, const char* className, const char* funcName); + static void notEmptyStr(const std::string& value, const char* name, const char* className, const char* funcName); + static void notEmptyStr(const std::wstring& value, const char* name, const char* className, const char* funcName); + static void notEmptyUuid(const UUID value, const char* name, const char* className, const char* funcName); + static void notNullOrEmptyStr(const char* value, const char* name, const char* className, const char* funcName); + static void notNullOrEmptyStr(const wchar_t* value, const char* name, const char* className, const char* funcName); + static void notNullOrEmptyPtrArr(const void** value, const char* name, const char* className, const char* funcName); + static void notNullInterface(const ICafObject* value, const char* name, const char* className, const char* funcName); + static void notNullPtr(const void* value, const char* name, const char* className, const char* funcName); + static void nullPtr(const void* value, const char* name, const char* className, const char* funcName); + static void zero(const int32 value, const char* name, const char* className, const char* funcName); + static void notZero(const int32 value, const char* name, const char* className, const char* funcName); + static void positive(const int32 value, const char* name, const char* className, const char* funcName); + static void negative(const int32 value, const char* name, const char* className, const char* funcName); + static void nonNegative(const int32 value, const char* name, const char* className, const char* funcName); + static void nonNegative64(const int64 value, const char* name, const char* className, const char* funcName); + static void isTrue(const bool value, const char* name, const char* className, const char* funcName); + static void notEmptyStl(const size_t value, const char* name, const char* className, const char* funcName); + static void emptyStl(const size_t value, const char* name, const char* className, const char* funcName); + +private: + CAF_CM_DECLARE_NOCREATE(CValidate); +}; + +} + +#endif /* CVALIDATE_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/ClassMacros.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/ClassMacros.h new file mode 100644 index 000000000..adb11f129 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/ClassMacros.h @@ -0,0 +1,97 @@ +/* + * Author: mdonahue + * Created: Jan 13, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CLASSMACROS_H_ +#define CLASSMACROS_H_ + +// Prevents class creation +#define CAF_CM_DECLARE_NOCREATE(_classname_) \ + private:\ + _classname_();\ + ~_classname_();\ + _classname_(const _classname_&);\ + _classname_& operator=(const _classname_&) + +// Prevents copying +#define CAF_CM_DECLARE_NOCOPY(_classname_) \ + private:\ + _classname_(const _classname_&);\ + _classname_& operator=(const _classname_&) + +// Initializes the members of the class +#define CAF_CM_INIT( _ClassName_ ) _cm_className_( _ClassName_ ) + +// Sets up a class method for parameter validation only +#define CAF_CM_FUNCNAME_VALIDATE( _szFuncNameIn_ ) \ + const char * _cm_funcName_ = _szFuncNameIn_ + +// Sets up a class method for exception handling/parameter validation +#define CAF_CM_FUNCNAME( _szFuncNameIn_ ) \ + CAF_CM_FUNCNAME_VALIDATE ( _szFuncNameIn_); \ + CCafException* _cm_exception_ = NULL + +#define CAF_CM_CREATE \ + private: \ + const char * _cm_className_ + +#define CAF_CM_STATIC_FUNC_VALIDATE( _szScope_, _szFuncName_ ) \ + const char * _cm_className_ = _szScope_; \ + CAF_CM_FUNCNAME_VALIDATE( _szFuncName_ ) + +#define CAF_CM_STATIC_FUNC( _szScope_, _szFuncName_ ) \ + const char * _cm_className_ = _szScope_; \ + CAF_CM_FUNCNAME( _szFuncName_ ) + +#define CAF_CM_GET_FUNCNAME _cm_funcName_ + +#define CAF_CM_GET_CLASSNAME _cm_className_ + +#define CAF_CM_ENTER (void)0; + +#define CAF_CM_EXIT (void)0 + +#define CAF_CM_UPTLINE (void)0 + +// Class-level thread safety macros +#define CAF_CM_CREATE_THREADSAFE \ + private: \ + mutable Caf::SmartPtrCAutoRecMutex _cm_mutex_ + +#define CAF_CM_INIT_THREADSAFE \ + _cm_mutex_.CreateInstance(); \ + _cm_mutex_->initialize() + +#define CAF_CM_ENTER_AND_LOCK \ + Caf::CAutoMutexLockUnlock _auto_lock_unlock(_cm_mutex_); \ + CAF_CM_ENTER + +#define CAF_CM_UNLOCK_AND_EXIT CAF_CM_EXIT + +#define CAF_CM_LOCK _cm_mutex_->lock() + +#define CAF_CM_UNLOCK _cm_mutex_->unlock() + + +#define CAF_CM_LOCK_UNLOCK Caf::CAutoMutexLockUnlock _auto_lock_unlock(_cm_mutex_) + +#define CAF_CM_UNLOCK_LOCK Caf::CAutoMutexUnlockLock _auto_unlock_lock(_cm_mutex_) + +#define CAF_CM_LOCK_UNLOCK_LOG Caf::CAutoMutexLockUnlock _auto_lock_unlock(_cm_mutex_, CAF_CM_GET_CLASSNAME, CAF_CM_GET_FUNCNAME, __LINE__) + +#define CAF_CM_UNLOCK_LOCK_LOG Caf::CAutoMutexUnlockLock _auto_unlock_lock(_cm_mutex_, CAF_CM_GET_CLASSNAME, CAF_CM_GET_FUNCNAME, __LINE__) + + +#define CAF_CM_LOCK_UNLOCK1(_this_mutex_) Caf::CAutoMutexLockUnlock _auto_lock_unlock1(_this_mutex_) + +#define CAF_CM_UNLOCK_LOCK1(_this_mutex_) Caf::CAutoMutexUnlockLock _auto_unlock_lock1(_this_mutex_) + +#define CAF_CM_LOCK_UNLOCK1_LOG(_this_mutex_) Caf::CAutoMutexLockUnlock _auto_lock_unlock1(_this_mutex_, CAF_CM_GET_CLASSNAME, CAF_CM_GET_FUNCNAME, __LINE__) + +#define CAF_CM_UNLOCK_LOCK1_LOG(_this_mutex_) Caf::CAutoMutexUnlockLock _auto_unlock_lock1(_this_mutex_, CAF_CM_GET_CLASSNAME, CAF_CM_GET_FUNCNAME, __LINE__) + +#endif /* CLASSMACROS_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/ExceptionExMacros.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/ExceptionExMacros.h new file mode 100644 index 000000000..fd2116355 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/ExceptionExMacros.h @@ -0,0 +1,68 @@ +/* + * Created on: Oct 6, 2011 + * Author: mdonahue + * + * Copyright (c) 2011 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef EXEXCEPTIONEXMACROS_H_ +#define EXEXCEPTIONEXMACROS_H_ + +#define CAF_CM_EXCEPTIONEX_VA0(_exclass_, _code_, _msg_) \ + { \ + _cm_exception_ = new _exclass_(); \ + _cm_exception_->populate(_msg_, _code_, _cm_className_, _cm_funcName_); \ + _cm_exception_->AddRef(); \ + throw static_cast<_exclass_*>(_cm_exception_); \ + } + +#define CAF_CM_EXCEPTIONEX_VA1(_exclass_, _code_, _fmt_, _arg1_) \ + { \ + _cm_exception_ = new _exclass_(); \ + _cm_exception_->populateVA(_code_, _cm_className_, _cm_funcName_, _fmt_, _arg1_); \ + _cm_exception_->AddRef(); \ + throw static_cast<_exclass_*>(_cm_exception_); \ + } + +#define CAF_CM_EXCEPTIONEX_VA2(_exclass_, _code_, _fmt_, _arg1_, _arg2_) \ + { \ + _cm_exception_ = new _exclass_(); \ + _cm_exception_->populateVA(_code_, _cm_className_, _cm_funcName_, _fmt_, _arg1_, _arg2_); \ + _cm_exception_->AddRef(); \ + throw static_cast<_exclass_*>(_cm_exception_); \ + } + +#define CAF_CM_EXCEPTIONEX_VA3(_exclass_, _code_, _fmt_, _arg1_, _arg2_, _arg3_) \ + { \ + _cm_exception_ = new _exclass_(); \ + _cm_exception_->populateVA(_code_, _cm_className_, _cm_funcName_, _fmt_, _arg1_, _arg2_, _arg3_); \ + _cm_exception_->AddRef(); \ + throw static_cast<_exclass_*>(_cm_exception_); \ + } + +#define CAF_CM_EXCEPTIONEX_VA4(_exclass_, _code_, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_) \ + { \ + _cm_exception_ = new _exclass_(); \ + _cm_exception_->populateVA(_code_, _cm_className_, _cm_funcName_, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_); \ + _cm_exception_->AddRef(); \ + throw static_cast<_exclass_*>(_cm_exception_); \ + } + +#define CAF_CM_EXCEPTIONEX_VA5(_exclass_, _code_, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_) \ + { \ + _cm_exception_ = new _exclass_(); \ + _cm_exception_->populateVA(_code_, _cm_className_, _cm_funcName_, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_); \ + _cm_exception_->AddRef(); \ + throw static_cast<_exclass_*>(_cm_exception_); \ + } + +#define CAF_CM_EXCEPTIONEX_VA6(_exclass_, _code_, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_, _arg6_) \ + { \ + _cm_exception_ = new _exclass_(); \ + _cm_exception_->populateVA(_code_, _cm_className_, _cm_funcName_, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_, _arg6_); \ + _cm_exception_->AddRef(); \ + throw static_cast<_exclass_*>(_cm_exception_); \ + } + +#endif /* EXEXCEPTIONEXMACROS_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/ExceptionLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/ExceptionLink.h new file mode 100644 index 000000000..eccbacd58 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/ExceptionLink.h @@ -0,0 +1,35 @@ +/* + * Author: mdonahue + * Created: Jan 13, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef EXCEPTIONLINK_H_ +#define EXCEPTIONLINK_H_ + +#ifndef EXCEPTION_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define EXCEPTION_LINKAGE __declspec(dllexport) + #else + #define EXCEPTION_LINKAGE __declspec(dllimport) + #endif + #else + #define EXCEPTION_LINKAGE + #endif +#endif + +#include "CBacktraceUtils.h" +#include "CCafException.h" +#include "ClassMacros.h" +#include "ExceptionMacros.h" +#include "CCafExceptionEx.h" +#include "ExceptionExMacros.h" +#include "CValidate.h" +#include "ValidationMacros.h" +#include "ValidationMacrosRaw.h" +#include "StatusMacros.h" + +#endif /* EXCEPTIONLINK_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/ExceptionMacros.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/ExceptionMacros.h new file mode 100644 index 000000000..d4429df7d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/ExceptionMacros.h @@ -0,0 +1,158 @@ +/* + * Author: mdonahue + * Created: Jan 26, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef EXCEPTIONMACROS_H_ +#define EXCEPTIONMACROS_H_ + +#define CAF_CM_EXCEPTION_EFAIL( _msg_ ) \ + { \ + _cm_exception_ = new Caf::CCafException(); \ + _cm_exception_->populate(_msg_, E_FAIL, _cm_className_, _cm_funcName_); \ + _cm_exception_->AddRef(); \ + throw _cm_exception_; \ + } + +#define CAF_CM_EXCEPTION_VA0(_code_, _msg_) \ + { \ + _cm_exception_ = new Caf::CCafException(); \ + _cm_exception_->populate(_msg_, _code_, _cm_className_, _cm_funcName_); \ + _cm_exception_->AddRef(); \ + throw _cm_exception_; \ + } + +#define CAF_CM_EXCEPTION_VA1(_code_, _fmt_, _arg1_) \ + { \ + _cm_exception_ = new Caf::CCafException(); \ + _cm_exception_->populateVA(_code_, _cm_className_, _cm_funcName_, _fmt_, _arg1_); \ + _cm_exception_->AddRef(); \ + throw _cm_exception_; \ + } + +#define CAF_CM_EXCEPTION_VA2(_code_, _fmt_, _arg1_, _arg2_) \ + { \ + _cm_exception_ = new Caf::CCafException(); \ + _cm_exception_->populateVA(_code_, _cm_className_, _cm_funcName_, _fmt_, _arg1_, _arg2_); \ + _cm_exception_->AddRef(); \ + throw _cm_exception_; \ + } + +#define CAF_CM_EXCEPTION_VA3(_code_, _fmt_, _arg1_, _arg2_, _arg3_) \ + { \ + _cm_exception_ = new Caf::CCafException(); \ + _cm_exception_->populateVA(_code_, _cm_className_, _cm_funcName_, _fmt_, _arg1_, _arg2_, _arg3_); \ + _cm_exception_->AddRef(); \ + throw _cm_exception_; \ + } + +#define CAF_CM_EXCEPTION_VA4(_code_, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_) \ + { \ + _cm_exception_ = new Caf::CCafException(); \ + _cm_exception_->populateVA(_code_, _cm_className_, _cm_funcName_, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_); \ + _cm_exception_->AddRef(); \ + throw _cm_exception_; \ + } + +#define CAF_CM_EXCEPTION_VA5(_code_, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_) \ + { \ + _cm_exception_ = new Caf::CCafException(); \ + _cm_exception_->populateVA(_code_, _cm_className_, _cm_funcName_, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_); \ + _cm_exception_->AddRef(); \ + throw _cm_exception_; \ + } + +#define CAF_CM_EXCEPTION_VA6(_code_, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_, _arg6_) \ + { \ + _cm_exception_ = new Caf::CCafException(); \ + _cm_exception_->populateVA(_code_, _cm_className_, _cm_funcName_, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_, _arg6_); \ + _cm_exception_->AddRef(); \ + throw _cm_exception_; \ + } + + +#define CAF_CM_CLEAREXCEPTION \ + if(NULL != _cm_exception_) { _cm_exception_->Release(); _cm_exception_ = NULL; } + +#define CAF_CM_ISEXCEPTION \ + ((NULL == _cm_exception_) ? false : true) + +#define CAF_CM_EXCEPTION_GET_FULLMSG \ + (NULL == _cm_exception_) ? std::string() : _cm_exception_->getFullMsg() + +#define CAF_CM_EXCEPTION_GET_MSG \ + (NULL == _cm_exception_) ? std::string() : _cm_exception_->getMsg() + +#define CAF_CM_EXCEPTION_GET_ERROR \ + (NULL == _cm_exception_) ? S_OK : _cm_exception_->getError() + +#define CAF_CM_THROWEXCEPTION \ + if(NULL != _cm_exception_) { _cm_exception_->throwSelf(); } + +#define CAF_CM_GETEXCEPTION \ + _cm_exception_ + +// Catch exceptions and turn them into CafException +#define CAF_CM_CATCH_CAF \ + catch (CCafException* _catchException_) { \ + if(NULL == _cm_exception_) { \ + _cm_exception_ = _catchException_; \ + } \ + } + +#define CAF_CM_CATCH_HRESULT \ + catch (HRESULT& _catchException_) { \ + _cm_exception_ = new Caf::CCafException(); \ + _cm_exception_->populate("HRESULT Exception", _catchException_, _cm_className_, _cm_funcName_); \ + _cm_exception_->AddRef(); \ + } + +#define CAF_CM_CATCH_STL \ + catch (exception& _catchException_) { \ + const std::string _msg_ = std::string("STL Exception: " ) + std::string( _catchException_.what() ); \ + _cm_exception_ = new Caf::CCafException(); \ + _cm_exception_->populate(_msg_, E_FAIL, _cm_className_, _cm_funcName_); \ + _cm_exception_->AddRef(); \ + } + +#define CAF_CM_CATCH_STD \ + catch (const std::exception& _catchException_) { \ + const std::string _msg_ = std::string("STD Exception: " ) + std::string( _catchException_.what() ); \ + _cm_exception_ = new Caf::CCafException(); \ + _cm_exception_->populate(_msg_, E_FAIL, _cm_className_, _cm_funcName_); \ + _cm_exception_->AddRef(); \ + } + +#define CAF_CM_CATCH_DEFAULT \ + catch (...) { \ + _cm_exception_ = new Caf::CCafException(); \ + _cm_exception_->populate("Default Exception", E_FAIL, _cm_className_, _cm_funcName_); \ + _cm_exception_->AddRef(); \ + } + +#define CAF_CM_CATCH_GERROR \ + catch (GError* _catchException_) { \ + _cm_exception_ = new Caf::CCafException(); \ + _cm_exception_->populate(_catchException_->message, _catchException_->code, _cm_className_, _cm_funcName_); \ + _cm_exception_->AddRef(); \ + g_error_free(_catchException_); \ + } + +#define CAF_CM_THROW_GERROR(_err_) { \ + _cm_exception_ = new Caf::CCafException(); \ + _cm_exception_->populate(_err_->message, _err_->code, _cm_className_, _cm_funcName_); \ + _cm_exception_->AddRef(); \ + g_error_free(_err_); \ + _cm_exception_->throwSelf(); } + +#define CAF_CM_CATCH_ALL \ + CAF_CM_CATCH_CAF \ + CAF_CM_CATCH_HRESULT \ + CAF_CM_CATCH_STD \ + CAF_CM_CATCH_GERROR \ + CAF_CM_CATCH_DEFAULT + +#endif /* EXCEPTIONMACROS_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/StackWalker.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/StackWalker.cpp new file mode 100644 index 000000000..904b13f32 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/StackWalker.cpp @@ -0,0 +1,1353 @@ +/********************************************************************** + * + * StackWalker.cpp + * http://stackwalker.codeplex.com/ + * + * + * History: + * 2005-07-27 v1 - First public release on http://www.codeproject.com/ + * http://www.codeproject.com/threads/StackWalker.asp + * 2005-07-28 v2 - Changed the params of the constructor and ShowCallstack + * (to simplify the usage) + * 2005-08-01 v3 - Changed to use 'CONTEXT_FULL' instead of CONTEXT_ALL + * (should also be enough) + * - Changed to compile correctly with the PSDK of VC7.0 + * (GetFileVersionInfoSizeA and GetFileVersionInfoA is wrongly defined: + * it uses LPSTR instead of LPCSTR as first paremeter) + * - Added declarations to support VC5/6 without using 'dbghelp.h' + * - Added a 'pUserData' member to the ShowCallstack function and the + * PReadProcessMemoryRoutine declaration (to pass some user-defined data, + * which can be used in the readMemoryFunction-callback) + * 2005-08-02 v4 - OnSymInit now also outputs the OS-Version by default + * - Added example for doing an exception-callstack-walking in main.cpp + * (thanks to owillebo: http://www.codeproject.com/script/profile/whos_who.asp?id=536268) + * 2005-08-05 v5 - Removed most Lint (http://www.gimpel.com/) errors... thanks to Okko Willeboordse! + * 2008-08-04 v6 - Fixed Bug: Missing LEAK-end-tag + * http://www.codeproject.com/KB/applications/leakfinder.aspx?msg=2502890#xx2502890xx + * Fixed Bug: Compiled with "WIN32_LEAN_AND_MEAN" + * http://www.codeproject.com/KB/applications/leakfinder.aspx?msg=1824718#xx1824718xx + * Fixed Bug: Compiling with "/Wall" + * http://www.codeproject.com/KB/threads/StackWalker.aspx?msg=2638243#xx2638243xx + * Fixed Bug: Now checking SymUseSymSrv + * http://www.codeproject.com/KB/threads/StackWalker.aspx?msg=1388979#xx1388979xx + * Fixed Bug: Support for recursive function calls + * http://www.codeproject.com/KB/threads/StackWalker.aspx?msg=1434538#xx1434538xx + * Fixed Bug: Missing FreeLibrary call in "GetModuleListTH32" + * http://www.codeproject.com/KB/threads/StackWalker.aspx?msg=1326923#xx1326923xx + * Fixed Bug: SymDia is number 7, not 9! + * 2008-09-11 v7 For some (undocumented) reason, dbhelp.h is needing a packing of 8! + * Thanks to Teajay which reported the bug... + * http://www.codeproject.com/KB/applications/leakfinder.aspx?msg=2718933#xx2718933xx + * 2008-11-27 v8 Debugging Tools for Windows are now stored in a different directory + * Thanks to Luiz Salamon which reported this "bug"... + * http://www.codeproject.com/KB/threads/StackWalker.aspx?msg=2822736#xx2822736xx + * 2009-04-10 v9 License slihtly corrected ( replaced) + * 2009-11-01 v10 Moved to http://stackwalker.codeplex.com/ + * 2009-11-02 v11 Now try to use IMAGEHLP_MODULE64_V3 if available + * 2010-04-15 v12 Added support for VS2010 RTM + * 2010-05-25 v13 Now using secure MyStrcCpy. Thanks to luke.simon: + * http://www.codeproject.com/KB/applications/leakfinder.aspx?msg=3477467#xx3477467xx + * 2013-01-07 v14 Runtime Check Error VS2010 Debug Builds fixed: + * http://stackwalker.codeplex.com/workitem/10511 + * + * + * LICENSE (http://www.opensource.org/licenses/bsd-license.php) + * + * Copyright (c) 2005-2013, Jochen Kalmbach + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 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. + * Neither the name of Jochen Kalmbach 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 COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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. + * + **********************************************************************/ +#include +#include +#include +#include +#pragma comment(lib, "version.lib") // for "VerQueryValue" +#pragma warning(disable:4826) + +#include "StackWalker.h" + + +// If VC7 and later, then use the shipped 'dbghelp.h'-file +#pragma pack(push,8) +#if _MSC_VER >= 1300 +#include +#else +// inline the important dbghelp.h-declarations... +typedef enum { + SymNone = 0, + SymCoff, + SymCv, + SymPdb, + SymExport, + SymDeferred, + SymSym, + SymDia, + SymVirtual, + NumSymTypes +} SYM_TYPE; +typedef struct _IMAGEHLP_LINE64 { + DWORD SizeOfStruct; // set to sizeof(IMAGEHLP_LINE64) + PVOID Key; // internal + DWORD LineNumber; // line number in file + PCHAR FileName; // full filename + DWORD64 Address; // first instruction of line +} IMAGEHLP_LINE64, *PIMAGEHLP_LINE64; +typedef struct _IMAGEHLP_MODULE64 { + DWORD SizeOfStruct; // set to sizeof(IMAGEHLP_MODULE64) + DWORD64 BaseOfImage; // base load address of module + DWORD ImageSize; // virtual size of the loaded module + DWORD TimeDateStamp; // date/time stamp from pe header + DWORD CheckSum; // checksum from the pe header + DWORD NumSyms; // number of symbols in the symbol table + SYM_TYPE SymType; // type of symbols loaded + CHAR ModuleName[32]; // module name + CHAR ImageName[256]; // image name + CHAR LoadedImageName[256]; // symbol file name +} IMAGEHLP_MODULE64, *PIMAGEHLP_MODULE64; +typedef struct _IMAGEHLP_SYMBOL64 { + DWORD SizeOfStruct; // set to sizeof(IMAGEHLP_SYMBOL64) + DWORD64 Address; // virtual address including dll base address + DWORD Size; // estimated size of symbol, can be zero + DWORD Flags; // info about the symbols, see the SYMF defines + DWORD MaxNameLength; // maximum size of symbol name in 'Name' + CHAR Name[1]; // symbol name (null terminated string) +} IMAGEHLP_SYMBOL64, *PIMAGEHLP_SYMBOL64; +typedef enum { + AddrMode1616, + AddrMode1632, + AddrModeReal, + AddrModeFlat +} ADDRESS_MODE; +typedef struct _tagADDRESS64 { + DWORD64 Offset; + WORD Segment; + ADDRESS_MODE Mode; +} ADDRESS64, *LPADDRESS64; +typedef struct _KDHELP64 { + DWORD64 Thread; + DWORD ThCallbackStack; + DWORD ThCallbackBStore; + DWORD NextCallback; + DWORD FramePointer; + DWORD64 KiCallUserMode; + DWORD64 KeUserCallbackDispatcher; + DWORD64 SystemRangeStart; + DWORD64 Reserved[8]; +} KDHELP64, *PKDHELP64; +typedef struct _tagSTACKFRAME64 { + ADDRESS64 AddrPC; // program counter + ADDRESS64 AddrReturn; // return address + ADDRESS64 AddrFrame; // frame pointer + ADDRESS64 AddrStack; // stack pointer + ADDRESS64 AddrBStore; // backing store pointer + PVOID FuncTableEntry; // pointer to pdata/fpo or NULL + DWORD64 Params[4]; // possible arguments to the function + BOOL Far; // WOW far call + BOOL Virtual; // is this a virtual frame? + DWORD64 Reserved[3]; + KDHELP64 KdHelp; +} STACKFRAME64, *LPSTACKFRAME64; +typedef +BOOL +(__stdcall *PREAD_PROCESS_MEMORY_ROUTINE64)( + HANDLE hProcess, + DWORD64 qwBaseAddress, + PVOID lpBuffer, + DWORD nSize, + LPDWORD lpNumberOfBytesRead + ); +typedef +PVOID +(__stdcall *PFUNCTION_TABLE_ACCESS_ROUTINE64)( + HANDLE hProcess, + DWORD64 AddrBase + ); +typedef +DWORD64 +(__stdcall *PGET_MODULE_BASE_ROUTINE64)( + HANDLE hProcess, + DWORD64 Address + ); +typedef +DWORD64 +(__stdcall *PTRANSLATE_ADDRESS_ROUTINE64)( + HANDLE hProcess, + HANDLE hThread, + LPADDRESS64 lpaddr + ); +#define SYMOPT_CASE_INSENSITIVE 0x00000001 +#define SYMOPT_UNDNAME 0x00000002 +#define SYMOPT_DEFERRED_LOADS 0x00000004 +#define SYMOPT_NO_CPP 0x00000008 +#define SYMOPT_LOAD_LINES 0x00000010 +#define SYMOPT_OMAP_FIND_NEAREST 0x00000020 +#define SYMOPT_LOAD_ANYTHING 0x00000040 +#define SYMOPT_IGNORE_CVREC 0x00000080 +#define SYMOPT_NO_UNQUALIFIED_LOADS 0x00000100 +#define SYMOPT_FAIL_CRITICAL_ERRORS 0x00000200 +#define SYMOPT_EXACT_SYMBOLS 0x00000400 +#define SYMOPT_ALLOW_ABSOLUTE_SYMBOLS 0x00000800 +#define SYMOPT_IGNORE_NT_SYMPATH 0x00001000 +#define SYMOPT_INCLUDE_32BIT_MODULES 0x00002000 +#define SYMOPT_PUBLICS_ONLY 0x00004000 +#define SYMOPT_NO_PUBLICS 0x00008000 +#define SYMOPT_AUTO_PUBLICS 0x00010000 +#define SYMOPT_NO_IMAGE_SEARCH 0x00020000 +#define SYMOPT_SECURE 0x00040000 +#define SYMOPT_DEBUG 0x80000000 +#define UNDNAME_COMPLETE (0x0000) // Enable full undecoration +#define UNDNAME_NAME_ONLY (0x1000) // Crack only the name for primary declaration; +#endif // _MSC_VER < 1300 +#pragma pack(pop) + +// Some missing defines (for VC5/6): +#ifndef INVALID_FILE_ATTRIBUTES +#define INVALID_FILE_ATTRIBUTES ((DWORD)-1) +#endif + + +// secure-CRT_functions are only available starting with VC8 +#if _MSC_VER < 1400 +#define strcpy_s(dst, len, src) strcpy(dst, src) +#define strncpy_s(dst, len, src, maxLen) strncpy(dst, len, src) +#define strcat_s(dst, len, src) strcat(dst, src) +#define _snprintf_s _snprintf +#define _tcscat_s _tcscat +#endif + +static void MyStrCpy(char* szDest, size_t nMaxDestSize, const char* szSrc) +{ + if (nMaxDestSize <= 0) return; + strncpy_s(szDest, nMaxDestSize, szSrc, _TRUNCATE); + szDest[nMaxDestSize-1] = 0; // INFO: _TRUNCATE will ensure that it is nul-terminated; but with older compilers (<1400) it uses "strncpy" and this does not!) +} // MyStrCpy + +// Normally it should be enough to use 'CONTEXT_FULL' (better would be 'CONTEXT_ALL') +#define USED_CONTEXT_FLAGS CONTEXT_FULL + + +class StackWalkerInternal +{ +public: + StackWalkerInternal(StackWalker *parent, HANDLE hProcess) + { + m_parent = parent; + m_hDbhHelp = NULL; + pSC = NULL; + m_hProcess = hProcess; + m_szSymPath = NULL; + pSFTA = NULL; + pSGLFA = NULL; + pSGMB = NULL; + pSGMI = NULL; + pSGO = NULL; + pSGSFA = NULL; + pSI = NULL; + pSLM = NULL; + pSSO = NULL; + pSW = NULL; + pUDSN = NULL; + pSGSP = NULL; + } + ~StackWalkerInternal() + { + if (pSC != NULL) + pSC(m_hProcess); // SymCleanup + if (m_hDbhHelp != NULL) + FreeLibrary(m_hDbhHelp); + m_hDbhHelp = NULL; + m_parent = NULL; + if(m_szSymPath != NULL) + free(m_szSymPath); + m_szSymPath = NULL; + } + BOOL Init(LPCSTR szSymPath) + { + if (m_parent == NULL) + return FALSE; + // Dynamically load the Entry-Points for dbghelp.dll: + // First try to load the newsest one from + TCHAR szTemp[4096]; + // But before wqe do this, we first check if the ".local" file exists + if (GetModuleFileName(NULL, szTemp, 4096) > 0) + { + _tcscat_s(szTemp, _T(".local")); + if (GetFileAttributes(szTemp) == INVALID_FILE_ATTRIBUTES) + { + // ".local" file does not exist, so we can try to load the dbghelp.dll from the "Debugging Tools for Windows" + // Ok, first try the new path according to the archtitecture: +#ifdef _M_IX86 + if ( (m_hDbhHelp == NULL) && (GetEnvironmentVariable(_T("ProgramFiles"), szTemp, 4096) > 0) ) + { + _tcscat_s(szTemp, _T("\\Debugging Tools for Windows (x86)\\dbghelp.dll")); + // now check if the file exists: + if (GetFileAttributes(szTemp) != INVALID_FILE_ATTRIBUTES) + { + m_hDbhHelp = LoadLibrary(szTemp); + } + } +#elif _M_X64 + if ( (m_hDbhHelp == NULL) && (GetEnvironmentVariable(_T("ProgramFiles"), szTemp, 4096) > 0) ) + { + _tcscat_s(szTemp, _T("\\Debugging Tools for Windows (x64)\\dbghelp.dll")); + // now check if the file exists: + if (GetFileAttributes(szTemp) != INVALID_FILE_ATTRIBUTES) + { + m_hDbhHelp = LoadLibrary(szTemp); + } + } +#elif _M_IA64 + if ( (m_hDbhHelp == NULL) && (GetEnvironmentVariable(_T("ProgramFiles"), szTemp, 4096) > 0) ) + { + _tcscat_s(szTemp, _T("\\Debugging Tools for Windows (ia64)\\dbghelp.dll")); + // now check if the file exists: + if (GetFileAttributes(szTemp) != INVALID_FILE_ATTRIBUTES) + { + m_hDbhHelp = LoadLibrary(szTemp); + } + } +#endif + // If still not found, try the old directories... + if ( (m_hDbhHelp == NULL) && (GetEnvironmentVariable(_T("ProgramFiles"), szTemp, 4096) > 0) ) + { + _tcscat_s(szTemp, _T("\\Debugging Tools for Windows\\dbghelp.dll")); + // now check if the file exists: + if (GetFileAttributes(szTemp) != INVALID_FILE_ATTRIBUTES) + { + m_hDbhHelp = LoadLibrary(szTemp); + } + } +#if defined _M_X64 || defined _M_IA64 + // Still not found? Then try to load the (old) 64-Bit version: + if ( (m_hDbhHelp == NULL) && (GetEnvironmentVariable(_T("ProgramFiles"), szTemp, 4096) > 0) ) + { + _tcscat_s(szTemp, _T("\\Debugging Tools for Windows 64-Bit\\dbghelp.dll")); + if (GetFileAttributes(szTemp) != INVALID_FILE_ATTRIBUTES) + { + m_hDbhHelp = LoadLibrary(szTemp); + } + } +#endif + } + } + if (m_hDbhHelp == NULL) // if not already loaded, try to load a default-one + m_hDbhHelp = LoadLibrary( _T("dbghelp.dll") ); + if (m_hDbhHelp == NULL) + return FALSE; + pSI = (tSI) GetProcAddress(m_hDbhHelp, "SymInitialize" ); + pSC = (tSC) GetProcAddress(m_hDbhHelp, "SymCleanup" ); + + pSW = (tSW) GetProcAddress(m_hDbhHelp, "StackWalk64" ); + pSGO = (tSGO) GetProcAddress(m_hDbhHelp, "SymGetOptions" ); + pSSO = (tSSO) GetProcAddress(m_hDbhHelp, "SymSetOptions" ); + + pSFTA = (tSFTA) GetProcAddress(m_hDbhHelp, "SymFunctionTableAccess64" ); + pSGLFA = (tSGLFA) GetProcAddress(m_hDbhHelp, "SymGetLineFromAddr64" ); + pSGMB = (tSGMB) GetProcAddress(m_hDbhHelp, "SymGetModuleBase64" ); + pSGMI = (tSGMI) GetProcAddress(m_hDbhHelp, "SymGetModuleInfo64" ); + pSGSFA = (tSGSFA) GetProcAddress(m_hDbhHelp, "SymGetSymFromAddr64" ); + pUDSN = (tUDSN) GetProcAddress(m_hDbhHelp, "UnDecorateSymbolName" ); + pSLM = (tSLM) GetProcAddress(m_hDbhHelp, "SymLoadModule64" ); + pSGSP =(tSGSP) GetProcAddress(m_hDbhHelp, "SymGetSearchPath" ); + + if ( pSC == NULL || pSFTA == NULL || pSGMB == NULL || pSGMI == NULL || + pSGO == NULL || pSGSFA == NULL || pSI == NULL || pSSO == NULL || + pSW == NULL || pUDSN == NULL || pSLM == NULL ) + { + FreeLibrary(m_hDbhHelp); + m_hDbhHelp = NULL; + pSC = NULL; + return FALSE; + } + + // SymInitialize + if (szSymPath != NULL) + m_szSymPath = _strdup(szSymPath); + if (this->pSI(m_hProcess, m_szSymPath, FALSE) == FALSE) + this->m_parent->OnDbgHelpErr("SymInitialize", GetLastError(), 0); + + DWORD symOptions = this->pSGO(); // SymGetOptions + symOptions |= SYMOPT_LOAD_LINES; + symOptions |= SYMOPT_FAIL_CRITICAL_ERRORS; + //symOptions |= SYMOPT_NO_PROMPTS; + // SymSetOptions + symOptions = this->pSSO(symOptions); + + char buf[StackWalker::STACKWALK_MAX_NAMELEN] = {0}; + if (this->pSGSP != NULL) + { + if (this->pSGSP(m_hProcess, buf, StackWalker::STACKWALK_MAX_NAMELEN) == FALSE) + this->m_parent->OnDbgHelpErr("SymGetSearchPath", GetLastError(), 0); + } + char szUserName[1024] = {0}; + DWORD dwSize = 1024; + GetUserNameA(szUserName, &dwSize); + this->m_parent->OnSymInit(buf, symOptions, szUserName); + + return TRUE; + } + + StackWalker *m_parent; + + HMODULE m_hDbhHelp; + HANDLE m_hProcess; + LPSTR m_szSymPath; + +#pragma pack(push,8) +typedef struct IMAGEHLP_MODULE64_V3 { + DWORD SizeOfStruct; // set to sizeof(IMAGEHLP_MODULE64) + DWORD64 BaseOfImage; // base load address of module + DWORD ImageSize; // virtual size of the loaded module + DWORD TimeDateStamp; // date/time stamp from pe header + DWORD CheckSum; // checksum from the pe header + DWORD NumSyms; // number of symbols in the symbol table + SYM_TYPE SymType; // type of symbols loaded + CHAR ModuleName[32]; // module name + CHAR ImageName[256]; // image name + CHAR LoadedImageName[256]; // symbol file name + // new elements: 07-Jun-2002 + CHAR LoadedPdbName[256]; // pdb file name + DWORD CVSig; // Signature of the CV record in the debug directories + CHAR CVData[MAX_PATH * 3]; // Contents of the CV record + DWORD PdbSig; // Signature of PDB + GUID PdbSig70; // Signature of PDB (VC 7 and up) + DWORD PdbAge; // DBI age of pdb + BOOL PdbUnmatched; // loaded an unmatched pdb + BOOL DbgUnmatched; // loaded an unmatched dbg + BOOL LineNumbers; // we have line number information + BOOL GlobalSymbols; // we have internal symbol information + BOOL TypeInfo; // we have type information + // new elements: 17-Dec-2003 + BOOL SourceIndexed; // pdb supports source server + BOOL Publics; // contains public symbols +}; + +typedef struct IMAGEHLP_MODULE64_V2 { + DWORD SizeOfStruct; // set to sizeof(IMAGEHLP_MODULE64) + DWORD64 BaseOfImage; // base load address of module + DWORD ImageSize; // virtual size of the loaded module + DWORD TimeDateStamp; // date/time stamp from pe header + DWORD CheckSum; // checksum from the pe header + DWORD NumSyms; // number of symbols in the symbol table + SYM_TYPE SymType; // type of symbols loaded + CHAR ModuleName[32]; // module name + CHAR ImageName[256]; // image name + CHAR LoadedImageName[256]; // symbol file name +}; +#pragma pack(pop) + + + // SymCleanup() + typedef BOOL (__stdcall *tSC)( IN HANDLE hProcess ); + tSC pSC; + + // SymFunctionTableAccess64() + typedef PVOID (__stdcall *tSFTA)( HANDLE hProcess, DWORD64 AddrBase ); + tSFTA pSFTA; + + // SymGetLineFromAddr64() + typedef BOOL (__stdcall *tSGLFA)( IN HANDLE hProcess, IN DWORD64 dwAddr, + OUT PDWORD pdwDisplacement, OUT PIMAGEHLP_LINE64 Line ); + tSGLFA pSGLFA; + + // SymGetModuleBase64() + typedef DWORD64 (__stdcall *tSGMB)( IN HANDLE hProcess, IN DWORD64 dwAddr ); + tSGMB pSGMB; + + // SymGetModuleInfo64() + typedef BOOL (__stdcall *tSGMI)( IN HANDLE hProcess, IN DWORD64 dwAddr, OUT IMAGEHLP_MODULE64_V3 *ModuleInfo ); + tSGMI pSGMI; + + // SymGetOptions() + typedef DWORD (__stdcall *tSGO)( VOID ); + tSGO pSGO; + + // SymGetSymFromAddr64() + typedef BOOL (__stdcall *tSGSFA)( IN HANDLE hProcess, IN DWORD64 dwAddr, + OUT PDWORD64 pdwDisplacement, OUT PIMAGEHLP_SYMBOL64 Symbol ); + tSGSFA pSGSFA; + + // SymInitialize() + typedef BOOL (__stdcall *tSI)( IN HANDLE hProcess, IN PSTR UserSearchPath, IN BOOL fInvadeProcess ); + tSI pSI; + + // SymLoadModule64() + typedef DWORD64 (__stdcall *tSLM)( IN HANDLE hProcess, IN HANDLE hFile, + IN PSTR ImageName, IN PSTR ModuleName, IN DWORD64 BaseOfDll, IN DWORD SizeOfDll ); + tSLM pSLM; + + // SymSetOptions() + typedef DWORD (__stdcall *tSSO)( IN DWORD SymOptions ); + tSSO pSSO; + + // StackWalk64() + typedef BOOL (__stdcall *tSW)( + DWORD MachineType, + HANDLE hProcess, + HANDLE hThread, + LPSTACKFRAME64 StackFrame, + PVOID ContextRecord, + PREAD_PROCESS_MEMORY_ROUTINE64 ReadMemoryRoutine, + PFUNCTION_TABLE_ACCESS_ROUTINE64 FunctionTableAccessRoutine, + PGET_MODULE_BASE_ROUTINE64 GetModuleBaseRoutine, + PTRANSLATE_ADDRESS_ROUTINE64 TranslateAddress ); + tSW pSW; + + // UnDecorateSymbolName() + typedef DWORD (__stdcall WINAPI *tUDSN)( PCSTR DecoratedName, PSTR UnDecoratedName, + DWORD UndecoratedLength, DWORD Flags ); + tUDSN pUDSN; + + typedef BOOL (__stdcall WINAPI *tSGSP)(HANDLE hProcess, PSTR SearchPath, DWORD SearchPathLength); + tSGSP pSGSP; + + +private: + // **************************************** ToolHelp32 ************************ + #define MAX_MODULE_NAME32 255 + #define TH32CS_SNAPMODULE 0x00000008 + #pragma pack( push, 8 ) + typedef struct tagMODULEENTRY32 + { + DWORD dwSize; + DWORD th32ModuleID; // This module + DWORD th32ProcessID; // owning process + DWORD GlblcntUsage; // Global usage count on the module + DWORD ProccntUsage; // Module usage count in th32ProcessID's context + BYTE * modBaseAddr; // Base address of module in th32ProcessID's context + DWORD modBaseSize; // Size in bytes of module starting at modBaseAddr + HMODULE hModule; // The hModule of this module in th32ProcessID's context + char szModule[MAX_MODULE_NAME32 + 1]; + char szExePath[MAX_PATH]; + } MODULEENTRY32; + typedef MODULEENTRY32 * PMODULEENTRY32; + typedef MODULEENTRY32 * LPMODULEENTRY32; + #pragma pack( pop ) + + BOOL GetModuleListTH32(HANDLE hProcess, DWORD pid) + { + // CreateToolhelp32Snapshot() + typedef HANDLE (__stdcall *tCT32S)(DWORD dwFlags, DWORD th32ProcessID); + // Module32First() + typedef BOOL (__stdcall *tM32F)(HANDLE hSnapshot, LPMODULEENTRY32 lpme); + // Module32Next() + typedef BOOL (__stdcall *tM32N)(HANDLE hSnapshot, LPMODULEENTRY32 lpme); + + // try both dlls... + const TCHAR *dllname[] = { _T("kernel32.dll"), _T("tlhelp32.dll") }; + HINSTANCE hToolhelp = NULL; + tCT32S pCT32S = NULL; + tM32F pM32F = NULL; + tM32N pM32N = NULL; + + HANDLE hSnap; + MODULEENTRY32 me; + me.dwSize = sizeof(me); + BOOL keepGoing; + size_t i; + + for (i = 0; i<(sizeof(dllname) / sizeof(dllname[0])); i++ ) + { + hToolhelp = LoadLibrary( dllname[i] ); + if (hToolhelp == NULL) + continue; + pCT32S = (tCT32S) GetProcAddress(hToolhelp, "CreateToolhelp32Snapshot"); + pM32F = (tM32F) GetProcAddress(hToolhelp, "Module32First"); + pM32N = (tM32N) GetProcAddress(hToolhelp, "Module32Next"); + if ( (pCT32S != NULL) && (pM32F != NULL) && (pM32N != NULL) ) + break; // found the functions! + FreeLibrary(hToolhelp); + hToolhelp = NULL; + } + + if (hToolhelp == NULL) + return FALSE; + + hSnap = pCT32S( TH32CS_SNAPMODULE, pid ); + if (hSnap == (HANDLE) -1) + { + FreeLibrary(hToolhelp); + return FALSE; + } + + keepGoing = !!pM32F( hSnap, &me ); + int cnt = 0; + while (keepGoing) + { + this->LoadModule(hProcess, me.szExePath, me.szModule, (DWORD64) me.modBaseAddr, me.modBaseSize); + cnt++; + keepGoing = !!pM32N( hSnap, &me ); + } + CloseHandle(hSnap); + FreeLibrary(hToolhelp); + if (cnt <= 0) + return FALSE; + return TRUE; + } // GetModuleListTH32 + + // **************************************** PSAPI ************************ + typedef struct _MODULEINFO { + LPVOID lpBaseOfDll; + DWORD SizeOfImage; + LPVOID EntryPoint; + } MODULEINFO, *LPMODULEINFO; + + BOOL GetModuleListPSAPI(HANDLE hProcess) + { + // EnumProcessModules() + typedef BOOL (__stdcall *tEPM)(HANDLE hProcess, HMODULE *lphModule, DWORD cb, LPDWORD lpcbNeeded ); + // GetModuleFileNameEx() + typedef DWORD (__stdcall *tGMFNE)(HANDLE hProcess, HMODULE hModule, LPSTR lpFilename, DWORD nSize ); + // GetModuleBaseName() + typedef DWORD (__stdcall *tGMBN)(HANDLE hProcess, HMODULE hModule, LPSTR lpFilename, DWORD nSize ); + // GetModuleInformation() + typedef BOOL (__stdcall *tGMI)(HANDLE hProcess, HMODULE hModule, LPMODULEINFO pmi, DWORD nSize ); + + HINSTANCE hPsapi; + tEPM pEPM; + tGMFNE pGMFNE; + tGMBN pGMBN; + tGMI pGMI; + + DWORD i; + //ModuleEntry e; + DWORD cbNeeded; + MODULEINFO mi; + HMODULE *hMods = 0; + char *tt = NULL; + char *tt2 = NULL; + const SIZE_T TTBUFLEN = 8096; + int cnt = 0; + + hPsapi = LoadLibrary( _T("psapi.dll") ); + if (hPsapi == NULL) + return FALSE; + + pEPM = (tEPM) GetProcAddress( hPsapi, "EnumProcessModules" ); + pGMFNE = (tGMFNE) GetProcAddress( hPsapi, "GetModuleFileNameExA" ); + pGMBN = (tGMFNE) GetProcAddress( hPsapi, "GetModuleBaseNameA" ); + pGMI = (tGMI) GetProcAddress( hPsapi, "GetModuleInformation" ); + if ( (pEPM == NULL) || (pGMFNE == NULL) || (pGMBN == NULL) || (pGMI == NULL) ) + { + // we couldn´t find all functions + FreeLibrary(hPsapi); + return FALSE; + } + + hMods = (HMODULE*) malloc(sizeof(HMODULE) * (TTBUFLEN / sizeof(HMODULE))); + tt = (char*) malloc(sizeof(char) * TTBUFLEN); + tt2 = (char*) malloc(sizeof(char) * TTBUFLEN); + if ( (hMods == NULL) || (tt == NULL) || (tt2 == NULL) ) + goto cleanup; + + if ( ! pEPM( hProcess, hMods, TTBUFLEN, &cbNeeded ) ) + { + //_ftprintf(fLogFile, _T("%lu: EPM failed, GetLastError = %lu\n"), g_dwShowCount, gle ); + goto cleanup; + } + + if ( cbNeeded > TTBUFLEN ) + { + //_ftprintf(fLogFile, _T("%lu: More than %lu module handles. Huh?\n"), g_dwShowCount, lenof( hMods ) ); + goto cleanup; + } + + for ( i = 0; i < cbNeeded / sizeof(hMods[0]); i++ ) + { + // base address, size + pGMI(hProcess, hMods[i], &mi, sizeof(mi)); + // image file name + tt[0] = 0; + pGMFNE(hProcess, hMods[i], tt, TTBUFLEN ); + // module name + tt2[0] = 0; + pGMBN(hProcess, hMods[i], tt2, TTBUFLEN ); + + DWORD dwRes = this->LoadModule(hProcess, tt, tt2, (DWORD64) mi.lpBaseOfDll, mi.SizeOfImage); + if (dwRes != ERROR_SUCCESS) + this->m_parent->OnDbgHelpErr("LoadModule", dwRes, 0); + cnt++; + } + + cleanup: + if (hPsapi != NULL) FreeLibrary(hPsapi); + if (tt2 != NULL) free(tt2); + if (tt != NULL) free(tt); + if (hMods != NULL) free(hMods); + + return cnt != 0; + } // GetModuleListPSAPI + + DWORD LoadModule(HANDLE hProcess, LPCSTR img, LPCSTR mod, DWORD64 baseAddr, DWORD size) + { + CHAR *szImg = _strdup(img); + CHAR *szMod = _strdup(mod); + DWORD result = ERROR_SUCCESS; + if ( (szImg == NULL) || (szMod == NULL) ) + result = ERROR_NOT_ENOUGH_MEMORY; + else + { + if (pSLM(hProcess, 0, szImg, szMod, baseAddr, size) == 0) + result = GetLastError(); + } + ULONGLONG fileVersion = 0; + if ( (m_parent != NULL) && (szImg != NULL) ) + { + // try to retrive the file-version: + if ( (this->m_parent->m_options & StackWalker::RetrieveFileVersion) != 0) + { + VS_FIXEDFILEINFO *fInfo = NULL; + DWORD dwHandle; + DWORD dwSize = GetFileVersionInfoSizeA(szImg, &dwHandle); + if (dwSize > 0) + { + LPVOID vData = malloc(dwSize); + if (vData != NULL) + { + if (GetFileVersionInfoA(szImg, dwHandle, dwSize, vData) != 0) + { + UINT len; + TCHAR szSubBlock[] = _T("\\"); + if (VerQueryValue(vData, szSubBlock, (LPVOID*) &fInfo, &len) == 0) + fInfo = NULL; + else + { + fileVersion = ((ULONGLONG)fInfo->dwFileVersionLS) + ((ULONGLONG)fInfo->dwFileVersionMS << 32); + } + } + free(vData); + } + } + } + + // Retrive some additional-infos about the module + IMAGEHLP_MODULE64_V3 Module; + const char *szSymType = "-unknown-"; + if (this->GetModuleInfo(hProcess, baseAddr, &Module) != FALSE) + { + switch(Module.SymType) + { + case SymNone: + szSymType = "-nosymbols-"; + break; + case SymCoff: // 1 + szSymType = "COFF"; + break; + case SymCv: // 2 + szSymType = "CV"; + break; + case SymPdb: // 3 + szSymType = "PDB"; + break; + case SymExport: // 4 + szSymType = "-exported-"; + break; + case SymDeferred: // 5 + szSymType = "-deferred-"; + break; + case SymSym: // 6 + szSymType = "SYM"; + break; + case 7: // SymDia: + szSymType = "DIA"; + break; + case 8: //SymVirtual: + szSymType = "Virtual"; + break; + } + } + LPCSTR pdbName = Module.LoadedImageName; + if (Module.LoadedPdbName[0] != 0) + pdbName = Module.LoadedPdbName; + this->m_parent->OnLoadModule(img, mod, baseAddr, size, result, szSymType, pdbName, fileVersion); + } + if (szImg != NULL) free(szImg); + if (szMod != NULL) free(szMod); + return result; + } +public: + BOOL LoadModules(HANDLE hProcess, DWORD dwProcessId) + { + // first try toolhelp32 + if (GetModuleListTH32(hProcess, dwProcessId)) + return true; + // then try psapi + return GetModuleListPSAPI(hProcess); + } + + + BOOL GetModuleInfo(HANDLE hProcess, DWORD64 baseAddr, IMAGEHLP_MODULE64_V3 *pModuleInfo) + { + memset(pModuleInfo, 0, sizeof(IMAGEHLP_MODULE64_V3)); + if(this->pSGMI == NULL) + { + SetLastError(ERROR_DLL_INIT_FAILED); + return FALSE; + } + // First try to use the larger ModuleInfo-Structure + pModuleInfo->SizeOfStruct = sizeof(IMAGEHLP_MODULE64_V3); + void *pData = malloc(4096); // reserve enough memory, so the bug in v6.3.5.1 does not lead to memory-overwrites... + if (pData == NULL) + { + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + return FALSE; + } + memcpy(pData, pModuleInfo, sizeof(IMAGEHLP_MODULE64_V3)); + static bool s_useV3Version = true; + if (s_useV3Version) + { + if (this->pSGMI(hProcess, baseAddr, (IMAGEHLP_MODULE64_V3*) pData) != FALSE) + { + // only copy as much memory as is reserved... + memcpy(pModuleInfo, pData, sizeof(IMAGEHLP_MODULE64_V3)); + pModuleInfo->SizeOfStruct = sizeof(IMAGEHLP_MODULE64_V3); + free(pData); + return TRUE; + } + s_useV3Version = false; // to prevent unneccessarry calls with the larger struct... + } + + // could not retrive the bigger structure, try with the smaller one (as defined in VC7.1)... + pModuleInfo->SizeOfStruct = sizeof(IMAGEHLP_MODULE64_V2); + memcpy(pData, pModuleInfo, sizeof(IMAGEHLP_MODULE64_V2)); + if (this->pSGMI(hProcess, baseAddr, (IMAGEHLP_MODULE64_V3*) pData) != FALSE) + { + // only copy as much memory as is reserved... + memcpy(pModuleInfo, pData, sizeof(IMAGEHLP_MODULE64_V2)); + pModuleInfo->SizeOfStruct = sizeof(IMAGEHLP_MODULE64_V2); + free(pData); + return TRUE; + } + free(pData); + SetLastError(ERROR_DLL_INIT_FAILED); + return FALSE; + } +}; + +// ############################################################# +StackWalker::StackWalker(DWORD dwProcessId, HANDLE hProcess) +{ + this->m_options = OptionsAll; + this->m_modulesLoaded = FALSE; + this->m_hProcess = hProcess; + this->m_sw = new StackWalkerInternal(this, this->m_hProcess); + this->m_dwProcessId = dwProcessId; + this->m_szSymPath = NULL; + this->m_MaxRecursionCount = 1000; +} +StackWalker::StackWalker(int options, LPCSTR szSymPath, DWORD dwProcessId, HANDLE hProcess) +{ + this->m_options = options; + this->m_modulesLoaded = FALSE; + this->m_hProcess = hProcess; + this->m_sw = new StackWalkerInternal(this, this->m_hProcess); + this->m_dwProcessId = dwProcessId; + if (szSymPath != NULL) + { + this->m_szSymPath = _strdup(szSymPath); + this->m_options |= SymBuildPath; + } + else + this->m_szSymPath = NULL; + this->m_MaxRecursionCount = 1000; +} + +StackWalker::~StackWalker() +{ + if (m_szSymPath != NULL) + free(m_szSymPath); + m_szSymPath = NULL; + if (this->m_sw != NULL) + delete this->m_sw; + this->m_sw = NULL; +} + +BOOL StackWalker::LoadModules() +{ + if (this->m_sw == NULL) + { + SetLastError(ERROR_DLL_INIT_FAILED); + return FALSE; + } + if (m_modulesLoaded != FALSE) + return TRUE; + + // Build the sym-path: + char *szSymPath = NULL; + if ( (this->m_options & SymBuildPath) != 0) + { + const size_t nSymPathLen = 4096; + szSymPath = (char*) malloc(nSymPathLen); + if (szSymPath == NULL) + { + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + return FALSE; + } + szSymPath[0] = 0; + // Now first add the (optional) provided sympath: + if (this->m_szSymPath != NULL) + { + strcat_s(szSymPath, nSymPathLen, this->m_szSymPath); + strcat_s(szSymPath, nSymPathLen, ";"); + } + + strcat_s(szSymPath, nSymPathLen, ".;"); + + const size_t nTempLen = 1024; + char szTemp[nTempLen]; + // Now add the current directory: + if (GetCurrentDirectoryA(nTempLen, szTemp) > 0) + { + szTemp[nTempLen-1] = 0; + strcat_s(szSymPath, nSymPathLen, szTemp); + strcat_s(szSymPath, nSymPathLen, ";"); + } + + // Now add the path for the main-module: + if (GetModuleFileNameA(NULL, szTemp, nTempLen) > 0) + { + szTemp[nTempLen-1] = 0; + for (char *p = (szTemp+strlen(szTemp)-1); p >= szTemp; --p) + { + // locate the rightmost path separator + if ( (*p == '\\') || (*p == '/') || (*p == ':') ) + { + *p = 0; + break; + } + } // for (search for path separator...) + if (strlen(szTemp) > 0) + { + strcat_s(szSymPath, nSymPathLen, szTemp); + strcat_s(szSymPath, nSymPathLen, ";"); + } + } + if (GetEnvironmentVariableA("_NT_SYMBOL_PATH", szTemp, nTempLen) > 0) + { + szTemp[nTempLen-1] = 0; + strcat_s(szSymPath, nSymPathLen, szTemp); + strcat_s(szSymPath, nSymPathLen, ";"); + } + if (GetEnvironmentVariableA("_NT_ALTERNATE_SYMBOL_PATH", szTemp, nTempLen) > 0) + { + szTemp[nTempLen-1] = 0; + strcat_s(szSymPath, nSymPathLen, szTemp); + strcat_s(szSymPath, nSymPathLen, ";"); + } + if (GetEnvironmentVariableA("SYSTEMROOT", szTemp, nTempLen) > 0) + { + szTemp[nTempLen-1] = 0; + strcat_s(szSymPath, nSymPathLen, szTemp); + strcat_s(szSymPath, nSymPathLen, ";"); + // also add the "system32"-directory: + strcat_s(szTemp, nTempLen, "\\system32"); + strcat_s(szSymPath, nSymPathLen, szTemp); + strcat_s(szSymPath, nSymPathLen, ";"); + } + + if ( (this->m_options & SymUseSymSrv) != 0) + { + if (GetEnvironmentVariableA("SYSTEMDRIVE", szTemp, nTempLen) > 0) + { + szTemp[nTempLen-1] = 0; + strcat_s(szSymPath, nSymPathLen, "SRV*"); + strcat_s(szSymPath, nSymPathLen, szTemp); + strcat_s(szSymPath, nSymPathLen, "\\websymbols"); + strcat_s(szSymPath, nSymPathLen, "*http://msdl.microsoft.com/download/symbols;"); + } + else + strcat_s(szSymPath, nSymPathLen, "SRV*c:\\websymbols*http://msdl.microsoft.com/download/symbols;"); + } + } // if SymBuildPath + + // First Init the whole stuff... + BOOL bRet = this->m_sw->Init(szSymPath); + if (szSymPath != NULL) free(szSymPath); szSymPath = NULL; + if (bRet == FALSE) + { + this->OnDbgHelpErr("Error while initializing dbghelp.dll", 0, 0); + SetLastError(ERROR_DLL_INIT_FAILED); + return FALSE; + } + + bRet = this->m_sw->LoadModules(this->m_hProcess, this->m_dwProcessId); + if (bRet != FALSE) + m_modulesLoaded = TRUE; + return bRet; +} + + +// The following is used to pass the "userData"-Pointer to the user-provided readMemoryFunction +// This has to be done due to a problem with the "hProcess"-parameter in x64... +// Because this class is in no case multi-threading-enabled (because of the limitations +// of dbghelp.dll) it is "safe" to use a static-variable +static StackWalker::PReadProcessMemoryRoutine s_readMemoryFunction = NULL; +static LPVOID s_readMemoryFunction_UserData = NULL; + +BOOL StackWalker::ShowCallstack(HANDLE hThread, const CONTEXT *context, PReadProcessMemoryRoutine readMemoryFunction, LPVOID pUserData) +{ + CONTEXT c; + CallstackEntry csEntry; + IMAGEHLP_SYMBOL64 *pSym = NULL; + StackWalkerInternal::IMAGEHLP_MODULE64_V3 Module; + IMAGEHLP_LINE64 Line; + int frameNum; + bool bLastEntryCalled = true; + int curRecursionCount = 0; + + if (m_modulesLoaded == FALSE) + this->LoadModules(); // ignore the result... + + if (this->m_sw->m_hDbhHelp == NULL) + { + SetLastError(ERROR_DLL_INIT_FAILED); + return FALSE; + } + + s_readMemoryFunction = readMemoryFunction; + s_readMemoryFunction_UserData = pUserData; + + if (context == NULL) + { + // If no context is provided, capture the context + // See: https://stackwalker.codeplex.com/discussions/446958 +#if _WIN32_WINNT <= 0x0501 + // If we need to support XP, we need to use the "old way", because "GetThreadId" is not available! + if (hThread == GetCurrentThread()) +#else + if (GetThreadId(hThread) == GetCurrentThreadId()) +#endif + { + GET_CURRENT_CONTEXT_STACKWALKER_CODEPLEX(c, USED_CONTEXT_FLAGS); + } + else + { + SuspendThread(hThread); + memset(&c, 0, sizeof(CONTEXT)); + c.ContextFlags = USED_CONTEXT_FLAGS; + if (GetThreadContext(hThread, &c) == FALSE) + { + ResumeThread(hThread); + return FALSE; + } + } + } + else + c = *context; + + // init STACKFRAME for first call + STACKFRAME64 s; // in/out stackframe + memset(&s, 0, sizeof(s)); + DWORD imageType; +#ifdef _M_IX86 + // normally, call ImageNtHeader() and use machine info from PE header + imageType = IMAGE_FILE_MACHINE_I386; + s.AddrPC.Offset = c.Eip; + s.AddrPC.Mode = AddrModeFlat; + s.AddrFrame.Offset = c.Ebp; + s.AddrFrame.Mode = AddrModeFlat; + s.AddrStack.Offset = c.Esp; + s.AddrStack.Mode = AddrModeFlat; +#elif _M_X64 + imageType = IMAGE_FILE_MACHINE_AMD64; + s.AddrPC.Offset = c.Rip; + s.AddrPC.Mode = AddrModeFlat; + s.AddrFrame.Offset = c.Rsp; + s.AddrFrame.Mode = AddrModeFlat; + s.AddrStack.Offset = c.Rsp; + s.AddrStack.Mode = AddrModeFlat; +#elif _M_IA64 + imageType = IMAGE_FILE_MACHINE_IA64; + s.AddrPC.Offset = c.StIIP; + s.AddrPC.Mode = AddrModeFlat; + s.AddrFrame.Offset = c.IntSp; + s.AddrFrame.Mode = AddrModeFlat; + s.AddrBStore.Offset = c.RsBSP; + s.AddrBStore.Mode = AddrModeFlat; + s.AddrStack.Offset = c.IntSp; + s.AddrStack.Mode = AddrModeFlat; +#else +#error "Platform not supported!" +#endif + + pSym = (IMAGEHLP_SYMBOL64 *) malloc(sizeof(IMAGEHLP_SYMBOL64) + STACKWALK_MAX_NAMELEN); + if (!pSym) goto cleanup; // not enough memory... + memset(pSym, 0, sizeof(IMAGEHLP_SYMBOL64) + STACKWALK_MAX_NAMELEN); + pSym->SizeOfStruct = sizeof(IMAGEHLP_SYMBOL64); + pSym->MaxNameLength = STACKWALK_MAX_NAMELEN; + + memset(&Line, 0, sizeof(Line)); + Line.SizeOfStruct = sizeof(Line); + + memset(&Module, 0, sizeof(Module)); + Module.SizeOfStruct = sizeof(Module); + + for (frameNum = 0; ; ++frameNum ) + { + // get next stack frame (StackWalk64(), SymFunctionTableAccess64(), SymGetModuleBase64()) + // if this returns ERROR_INVALID_ADDRESS (487) or ERROR_NOACCESS (998), you can + // assume that either you are done, or that the stack is so hosed that the next + // deeper frame could not be found. + // CONTEXT need not to be suplied if imageTyp is IMAGE_FILE_MACHINE_I386! + if ( ! this->m_sw->pSW(imageType, this->m_hProcess, hThread, &s, &c, myReadProcMem, this->m_sw->pSFTA, this->m_sw->pSGMB, NULL) ) + { + // INFO: "StackWalk64" does not set "GetLastError"... + this->OnDbgHelpErr("StackWalk64", 0, s.AddrPC.Offset); + break; + } + + csEntry.offset = s.AddrPC.Offset; + csEntry.name[0] = 0; + csEntry.undName[0] = 0; + csEntry.undFullName[0] = 0; + csEntry.offsetFromSmybol = 0; + csEntry.offsetFromLine = 0; + csEntry.lineFileName[0] = 0; + csEntry.lineNumber = 0; + csEntry.loadedImageName[0] = 0; + csEntry.moduleName[0] = 0; + if (s.AddrPC.Offset == s.AddrReturn.Offset) + { + if ( (this->m_MaxRecursionCount > 0) && (curRecursionCount > m_MaxRecursionCount) ) + { + this->OnDbgHelpErr("StackWalk64-Endless-Callstack!", 0, s.AddrPC.Offset); + break; + } + curRecursionCount++; + } + else + curRecursionCount = 0; + if (s.AddrPC.Offset != 0) + { + // we seem to have a valid PC + // show procedure info (SymGetSymFromAddr64()) + if (this->m_sw->pSGSFA(this->m_hProcess, s.AddrPC.Offset, &(csEntry.offsetFromSmybol), pSym) != FALSE) + { + MyStrCpy(csEntry.name, STACKWALK_MAX_NAMELEN, pSym->Name); + // UnDecorateSymbolName() + this->m_sw->pUDSN( pSym->Name, csEntry.undName, STACKWALK_MAX_NAMELEN, UNDNAME_NAME_ONLY ); + this->m_sw->pUDSN( pSym->Name, csEntry.undFullName, STACKWALK_MAX_NAMELEN, UNDNAME_COMPLETE ); + } + else + { + this->OnDbgHelpErr("SymGetSymFromAddr64", GetLastError(), s.AddrPC.Offset); + } + + // show line number info, NT5.0-method (SymGetLineFromAddr64()) + if (this->m_sw->pSGLFA != NULL ) + { // yes, we have SymGetLineFromAddr64() + if (this->m_sw->pSGLFA(this->m_hProcess, s.AddrPC.Offset, &(csEntry.offsetFromLine), &Line) != FALSE) + { + csEntry.lineNumber = Line.LineNumber; + MyStrCpy(csEntry.lineFileName, STACKWALK_MAX_NAMELEN, Line.FileName); + } + else + { + this->OnDbgHelpErr("SymGetLineFromAddr64", GetLastError(), s.AddrPC.Offset); + } + } // yes, we have SymGetLineFromAddr64() + + // show module info (SymGetModuleInfo64()) + if (this->m_sw->GetModuleInfo(this->m_hProcess, s.AddrPC.Offset, &Module ) != FALSE) + { // got module info OK + switch ( Module.SymType ) + { + case SymNone: + csEntry.symTypeString = "-nosymbols-"; + break; + case SymCoff: + csEntry.symTypeString = "COFF"; + break; + case SymCv: + csEntry.symTypeString = "CV"; + break; + case SymPdb: + csEntry.symTypeString = "PDB"; + break; + case SymExport: + csEntry.symTypeString = "-exported-"; + break; + case SymDeferred: + csEntry.symTypeString = "-deferred-"; + break; + case SymSym: + csEntry.symTypeString = "SYM"; + break; +#if API_VERSION_NUMBER >= 9 + case SymDia: + csEntry.symTypeString = "DIA"; + break; +#endif + case 8: //SymVirtual: + csEntry.symTypeString = "Virtual"; + break; + default: + //_snprintf( ty, sizeof(ty), "symtype=%ld", (long) Module.SymType ); + csEntry.symTypeString = NULL; + break; + } + + MyStrCpy(csEntry.moduleName, STACKWALK_MAX_NAMELEN, Module.ModuleName); + csEntry.baseOfImage = Module.BaseOfImage; + MyStrCpy(csEntry.loadedImageName, STACKWALK_MAX_NAMELEN, Module.LoadedImageName); + } // got module info OK + else + { + this->OnDbgHelpErr("SymGetModuleInfo64", GetLastError(), s.AddrPC.Offset); + } + } // we seem to have a valid PC + + CallstackEntryType et = nextEntry; + if (frameNum == 0) + et = firstEntry; + bLastEntryCalled = false; + this->OnCallstackEntry(et, csEntry); + + if (s.AddrReturn.Offset == 0) + { + bLastEntryCalled = true; + this->OnCallstackEntry(lastEntry, csEntry); + SetLastError(ERROR_SUCCESS); + break; + } + } // for ( frameNum ) + + cleanup: + if (pSym) free( pSym ); + + if (bLastEntryCalled == false) + this->OnCallstackEntry(lastEntry, csEntry); + + if (context == NULL) + ResumeThread(hThread); + + return TRUE; +} + +BOOL __stdcall StackWalker::myReadProcMem( + HANDLE hProcess, + DWORD64 qwBaseAddress, + PVOID lpBuffer, + DWORD nSize, + LPDWORD lpNumberOfBytesRead + ) +{ + if (s_readMemoryFunction == NULL) + { + SIZE_T st; + BOOL bRet = ReadProcessMemory(hProcess, (LPVOID) qwBaseAddress, lpBuffer, nSize, &st); + *lpNumberOfBytesRead = (DWORD) st; + //printf("ReadMemory: hProcess: %p, baseAddr: %p, buffer: %p, size: %d, read: %d, result: %d\n", hProcess, (LPVOID) qwBaseAddress, lpBuffer, nSize, (DWORD) st, (DWORD) bRet); + return bRet; + } + else + { + return s_readMemoryFunction(hProcess, qwBaseAddress, lpBuffer, nSize, lpNumberOfBytesRead, s_readMemoryFunction_UserData); + } +} + +void StackWalker::OnLoadModule(LPCSTR img, LPCSTR mod, DWORD64 baseAddr, DWORD size, DWORD result, LPCSTR symType, LPCSTR pdbName, ULONGLONG fileVersion) +{ + CHAR buffer[STACKWALK_MAX_NAMELEN]; + if (fileVersion == 0) + _snprintf_s(buffer, STACKWALK_MAX_NAMELEN, "%s:%s (%p), size: %d (result: %d), SymType: '%s', PDB: '%s'\n", img, mod, (LPVOID) baseAddr, size, result, symType, pdbName); + else + { + DWORD v4 = (DWORD) (fileVersion & 0xFFFF); + DWORD v3 = (DWORD) ((fileVersion>>16) & 0xFFFF); + DWORD v2 = (DWORD) ((fileVersion>>32) & 0xFFFF); + DWORD v1 = (DWORD) ((fileVersion>>48) & 0xFFFF); + _snprintf_s(buffer, STACKWALK_MAX_NAMELEN, "%s:%s (%p), size: %d (result: %d), SymType: '%s', PDB: '%s', fileVersion: %d.%d.%d.%d\n", img, mod, (LPVOID) baseAddr, size, result, symType, pdbName, v1, v2, v3, v4); + } + OnOutput(buffer); +} + +void StackWalker::OnCallstackEntry(CallstackEntryType eType, CallstackEntry &entry) +{ + CHAR buffer[STACKWALK_MAX_NAMELEN]; + if ( (eType != lastEntry) && (entry.offset != 0) ) + { + if (entry.name[0] == 0) + MyStrCpy(entry.name, STACKWALK_MAX_NAMELEN, "(function-name not available)"); + if (entry.undName[0] != 0) + MyStrCpy(entry.name, STACKWALK_MAX_NAMELEN, entry.undName); + if (entry.undFullName[0] != 0) + MyStrCpy(entry.name, STACKWALK_MAX_NAMELEN, entry.undFullName); + if (entry.lineFileName[0] == 0) + { + MyStrCpy(entry.lineFileName, STACKWALK_MAX_NAMELEN, "(filename not available)"); + if (entry.moduleName[0] == 0) + MyStrCpy(entry.moduleName, STACKWALK_MAX_NAMELEN, "(module-name not available)"); + _snprintf_s(buffer, STACKWALK_MAX_NAMELEN, "%p (%s): %s: %s\n", (LPVOID) entry.offset, entry.moduleName, entry.lineFileName, entry.name); + } + else + _snprintf_s(buffer, STACKWALK_MAX_NAMELEN, "%s (%d): %s\n", entry.lineFileName, entry.lineNumber, entry.name); + buffer[STACKWALK_MAX_NAMELEN-1] = 0; + OnOutput(buffer); + } +} + +void StackWalker::OnDbgHelpErr(LPCSTR szFuncName, DWORD gle, DWORD64 addr) +{ + CHAR buffer[STACKWALK_MAX_NAMELEN]; + _snprintf_s(buffer, STACKWALK_MAX_NAMELEN, "ERROR: %s, GetLastError: %d (Address: %p)\n", szFuncName, gle, (LPVOID) addr); + OnOutput(buffer); +} + +void StackWalker::OnSymInit(LPCSTR szSearchPath, DWORD symOptions, LPCSTR szUserName) +{ + CHAR buffer[STACKWALK_MAX_NAMELEN]; + _snprintf_s(buffer, STACKWALK_MAX_NAMELEN, "SymInit: Symbol-SearchPath: '%s', symOptions: %d, UserName: '%s'\n", szSearchPath, symOptions, szUserName); + OnOutput(buffer); + // Also display the OS-version +#if _MSC_VER <= 1200 + OSVERSIONINFOA ver; + ZeroMemory(&ver, sizeof(OSVERSIONINFOA)); + ver.dwOSVersionInfoSize = sizeof(ver); + if (GetVersionExA(&ver) != FALSE) + { + _snprintf_s(buffer, STACKWALK_MAX_NAMELEN, "OS-Version: %d.%d.%d (%s)\n", + ver.dwMajorVersion, ver.dwMinorVersion, ver.dwBuildNumber, + ver.szCSDVersion); + OnOutput(buffer); + } +#else + OSVERSIONINFOEXA ver; + ZeroMemory(&ver, sizeof(OSVERSIONINFOEXA)); + ver.dwOSVersionInfoSize = sizeof(ver); + if (GetVersionExA( (OSVERSIONINFOA*) &ver) != FALSE) + { + _snprintf_s(buffer, STACKWALK_MAX_NAMELEN, "OS-Version: %d.%d.%d (%s) 0x%x-0x%x\n", + ver.dwMajorVersion, ver.dwMinorVersion, ver.dwBuildNumber, + ver.szCSDVersion, ver.wSuiteMask, ver.wProductType); + OnOutput(buffer); + } +#endif +} + +void StackWalker::OnOutput(LPCSTR buffer) +{ + OutputDebugStringA(buffer); +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/StackWalker.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/StackWalker.h new file mode 100644 index 000000000..9a69d086c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/StackWalker.h @@ -0,0 +1,214 @@ +/********************************************************************** + * + * StackWalker.h + * + * + * + * LICENSE (http://www.opensource.org/licenses/bsd-license.php) + * + * Copyright (c) 2005-2009, Jochen Kalmbach + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 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. + * Neither the name of Jochen Kalmbach 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 COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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. + * + * **********************************************************************/ +// #pragma once is supported starting with _MCS_VER 1000, +// so we need not to check the version (because we only support _MSC_VER >= 1100)! +#pragma once + +#include + +// special defines for VC5/6 (if no actual PSDK is installed): +#if _MSC_VER < 1300 +typedef unsigned __int64 DWORD64, *PDWORD64; +#if defined(_WIN64) +typedef unsigned __int64 SIZE_T, *PSIZE_T; +#else +typedef unsigned long SIZE_T, *PSIZE_T; +#endif +#endif // _MSC_VER < 1300 + +class StackWalkerInternal; // forward +class StackWalker +{ +public: + typedef enum StackWalkOptions + { + // No addition info will be retrived + // (only the address is available) + RetrieveNone = 0, + + // Try to get the symbol-name + RetrieveSymbol = 1, + + // Try to get the line for this symbol + RetrieveLine = 2, + + // Try to retrieve the module-infos + RetrieveModuleInfo = 4, + + // Also retrieve the version for the DLL/EXE + RetrieveFileVersion = 8, + + // Contains all the abouve + RetrieveVerbose = 0xF, + + // Generate a "good" symbol-search-path + SymBuildPath = 0x10, + + // Also use the public Microsoft-Symbol-Server + SymUseSymSrv = 0x20, + + // Contains all the abouve "Sym"-options + SymAll = 0x30, + + // Contains all options (default) + OptionsAll = 0x3F + } StackWalkOptions; + + StackWalker( + int options = OptionsAll, // 'int' is by design, to combine the enum-flags + LPCSTR szSymPath = NULL, + DWORD dwProcessId = GetCurrentProcessId(), + HANDLE hProcess = GetCurrentProcess() + ); + StackWalker(DWORD dwProcessId, HANDLE hProcess); + virtual ~StackWalker(); + + typedef BOOL (__stdcall *PReadProcessMemoryRoutine)( + HANDLE hProcess, + DWORD64 qwBaseAddress, + PVOID lpBuffer, + DWORD nSize, + LPDWORD lpNumberOfBytesRead, + LPVOID pUserData // optional data, which was passed in "ShowCallstack" + ); + + BOOL LoadModules(); + + BOOL ShowCallstack( + HANDLE hThread = GetCurrentThread(), + const CONTEXT *context = NULL, + PReadProcessMemoryRoutine readMemoryFunction = NULL, + LPVOID pUserData = NULL // optional to identify some data in the 'readMemoryFunction'-callback + ); + +#if _MSC_VER >= 1300 +// due to some reasons, the "STACKWALK_MAX_NAMELEN" must be declared as "public" +// in older compilers in order to use it... starting with VC7 we can declare it as "protected" +protected: +#endif + enum { STACKWALK_MAX_NAMELEN = 1024 }; // max name length for found symbols + +protected: + // Entry for each Callstack-Entry + typedef struct CallstackEntry + { + DWORD64 offset; // if 0, we have no valid entry + CHAR name[STACKWALK_MAX_NAMELEN]; + CHAR undName[STACKWALK_MAX_NAMELEN]; + CHAR undFullName[STACKWALK_MAX_NAMELEN]; + DWORD64 offsetFromSmybol; + DWORD offsetFromLine; + DWORD lineNumber; + CHAR lineFileName[STACKWALK_MAX_NAMELEN]; + DWORD symType; + LPCSTR symTypeString; + CHAR moduleName[STACKWALK_MAX_NAMELEN]; + DWORD64 baseOfImage; + CHAR loadedImageName[STACKWALK_MAX_NAMELEN]; + } CallstackEntry; + + typedef enum CallstackEntryType {firstEntry, nextEntry, lastEntry}; + + virtual void OnSymInit(LPCSTR szSearchPath, DWORD symOptions, LPCSTR szUserName); + virtual void OnLoadModule(LPCSTR img, LPCSTR mod, DWORD64 baseAddr, DWORD size, DWORD result, LPCSTR symType, LPCSTR pdbName, ULONGLONG fileVersion); + virtual void OnCallstackEntry(CallstackEntryType eType, CallstackEntry &entry); + virtual void OnDbgHelpErr(LPCSTR szFuncName, DWORD gle, DWORD64 addr); + virtual void OnOutput(LPCSTR szText); + + StackWalkerInternal *m_sw; + HANDLE m_hProcess; + DWORD m_dwProcessId; + BOOL m_modulesLoaded; + LPSTR m_szSymPath; + + int m_options; + int m_MaxRecursionCount; + + static BOOL __stdcall myReadProcMem(HANDLE hProcess, DWORD64 qwBaseAddress, PVOID lpBuffer, DWORD nSize, LPDWORD lpNumberOfBytesRead); + + friend StackWalkerInternal; +}; // class StackWalker + + +// The "ugly" assembler-implementation is needed for systems before XP +// If you have a new PSDK and you only compile for XP and later, then you can use +// the "RtlCaptureContext" +// Currently there is no define which determines the PSDK-Version... +// So we just use the compiler-version (and assumes that the PSDK is +// the one which was installed by the VS-IDE) + +// INFO: If you want, you can use the RtlCaptureContext if you only target XP and later... +// But I currently use it in x64/IA64 environments... +//#if defined(_M_IX86) && (_WIN32_WINNT <= 0x0500) && (_MSC_VER < 1400) + +#if defined(_M_IX86) +#ifdef CURRENT_THREAD_VIA_EXCEPTION +// TODO: The following is not a "good" implementation, +// because the callstack is only valid in the "__except" block... +#define GET_CURRENT_CONTEXT_STACKWALKER_CODEPLEX(c, contextFlags) \ + do { \ + memset(&c, 0, sizeof(CONTEXT)); \ + EXCEPTION_POINTERS *pExp = NULL; \ + __try { \ + throw 0; \ + } __except( ( (pExp = GetExceptionInformation()) ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_EXECUTE_HANDLER)) {} \ + if (pExp != NULL) \ + memcpy(&c, pExp->ContextRecord, sizeof(CONTEXT)); \ + c.ContextFlags = contextFlags; \ + } while(0); +#else +// The following should be enough for walking the callstack... +#define GET_CURRENT_CONTEXT_STACKWALKER_CODEPLEX(c, contextFlags) \ + do { \ + memset(&c, 0, sizeof(CONTEXT)); \ + c.ContextFlags = contextFlags; \ + __asm call x \ + __asm x: pop eax \ + __asm mov c.Eip, eax \ + __asm mov c.Ebp, ebp \ + __asm mov c.Esp, esp \ + } while(0); +#endif + +#else + +// The following is defined for x86 (XP and higher), x64 and IA64: +#define GET_CURRENT_CONTEXT_STACKWALKER_CODEPLEX(c, contextFlags) \ + do { \ + memset(&c, 0, sizeof(CONTEXT)); \ + c.ContextFlags = contextFlags; \ + RtlCaptureContext(&c); \ +} while(0); +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/StatusMacros.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/StatusMacros.h new file mode 100644 index 000000000..72b05abc9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/StatusMacros.h @@ -0,0 +1,33 @@ +/* + * Author: mdonahue + * Created: Jan 13, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef STATUSMACROS_H_ +#define STATUSMACROS_H_ + +typedef std::pair CCafStatus; + +#define CAF_CM_VALIDATE_STATUS(_status_) \ + { \ + CCafStatus _int_status_ = _status_; \ + if (_int_status_.first != S_OK) \ + CAF_CM_EXCEPTION_VA0(_int_status_.first, _int_status_.second.c_str()); \ + } + +#define CAF_CM_STATUS _status_ + +#define CAF_CM_INIT_STATUS CCafStatus CAF_CM_STATUS = std::make_pair(S_OK, ""); + +#define CAF_CM_SET_STATUS_FROM_EXCEPTION(_arg_) \ + { \ + if (_arg_->isPopulated()) \ + CAF_CM_STATUS = std::make_pair(_arg_->getError(), _arg_->getMsg()); \ + else \ + CAF_CM_STATUS = std::make_pair(E_FAIL, "Unknown exception"); \ + } + +#endif /* STATUSMACROS_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/ValidationMacros.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/ValidationMacros.h new file mode 100644 index 000000000..edc5eb92a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/ValidationMacros.h @@ -0,0 +1,121 @@ +/* + * Author: mdonahue + * Created: Jan 13, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef VALIDATIONMACROS_H_ +#define VALIDATIONMACROS_H_ + +// Used internally by some of these macros. +#define CAF_CM_EXCEPTION_VALIDATE( _valmsg_, _variable_text_ ) \ + CAF_CM_EXCEPTION_VA2(E_INVALIDARG, "%s %s", _valmsg_, _variable_text_) + +// Some helper macros that make it easy to validate that the object pre-conditions have been met. +#define CAF_CM_PRECOND_ISCONSTRUCTED( _bIsConstucted_ ) \ + CValidate::constructed(_bIsConstucted_, _cm_className_, _cm_funcName_) + +#define CAF_CM_PRECOND_ISINITIALIZED( _bIsInitialized_ ) \ + CValidate::initialized(_bIsInitialized_, _cm_className_, _cm_funcName_) + +#define CAF_CM_PRECOND_ISNOTINITIALIZED( _bIsInitialized_ ) \ + CValidate::notInitialized(_bIsInitialized_, _cm_className_, _cm_funcName_) + +// Some helper macros that make is easy to validate input arguments. +#define CAF_CM_VALIDATE_STRING( _validate_ ) \ + CValidate::notEmptyStr(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATE_STRINGPTRW( _validate_ ) \ + CValidate::notNullOrEmptyStr(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATE_STRINGPTRA( _validate_ ) \ + CValidate::notNullOrEmptyStr(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATE_ZERO( _validate_) \ + CValidate::zero(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATE_NOTZERO( _validate_) \ + CValidate::notZero(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATE_POSITIVE( _validate_ ) \ + CValidate::positive(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATE_NEGATIVE( _validate_ ) \ + CValidate::negative(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATE_NONNEGATIVE( _validate_ ) \ + CValidate::nonNegative(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATE_NONNEGATIVE_INT64( _validate_ ) \ + CValidate::nonNegative64(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATE_BOOL( _validate_ ) \ + CValidate::isTrue(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATE_GUID( _validate_ ) \ + CValidate::notEmptyUuid(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATE_INTERFACE( _validate_ ) \ + CValidate::notNullInterface(_validate_.GetNonAddRefedInterface(), #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATE_INTERFACEPTR( _validate_ ) \ + CValidate::notNullInterface(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATE_PTR( _validate_ ) \ + CValidate::notNullPtr(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATE_NULLPTR( _validate_ ) \ + CValidate::nullPtr(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATE_SMARTPTR( _validate_ ) \ + CValidate::notNullPtr(_validate_.GetNonAddRefedInterface(), #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATE_PTRARRAY( _validate_ ) \ + CValidate::notNullOrEmptyPtrArr(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATE_STL( _validate_ ) \ + CValidate::notEmptyStl(_validate_.size(), #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATE_STL_EMPTY( _validate_ ) \ + CValidate::emptyStl(_validate_.size(), #_validate_, _cm_className_, _cm_funcName_) + +// Not included in CValidate either because these macros are not currently used or because +// the types are too varied to include in a class. +#define CAF_CM_VALIDATE_STL_ITERATOR( _stlContainer_, _stlIterator ) \ + if( _stlIterator == _stlContainer_.end() ) \ + CAF_CM_EXCEPTION_VALIDATE( _sVALIDATE_STL_ITERATOR, #_stlContainer_ ) + +#define CAF_CM_VALIDATE_SMARTSTL_NOTEMPTY( _validate_ ) \ + if( _validate_.IsNull() || _validate_->empty() ) \ + CAF_CM_EXCEPTION_VALIDATE( _sVALIDATE_STL, #_validate_ ) + +#define CAF_CM_VALIDATE_COND_VA1( _cond_, _fmt_, _arg1_ ) \ + if(! (_cond_) ) { \ + const std::string _fullfmt_ = std::string(#_cond_) + " - " + std::string(_fmt_); \ + CAF_CM_EXCEPTION_VA1(E_INVALIDARG, _fullfmt_.c_str(), _arg1_); \ + } + +#define CAF_CM_VALIDATE_COND_VA2( _cond_, _fmt_, _arg1_, _arg2_ ) \ + if(! (_cond_) ) { \ + const std::string _fullfmt_ = std::string(#_cond_) + " - " + std::string(_fmt_); \ + CAF_CM_EXCEPTION_VA2(E_INVALIDARG, _fullfmt_.c_str(), _arg1_, _arg2_); \ + } + +#define CAF_CM_VALIDATE_COND_VA3( _cond_, _fmt_, _arg1_, _arg2_, _arg3_ ) \ + if(! (_cond_) ) { \ + const std::string _fullfmt_ = std::string(#_cond_) + " - " + std::string(_fmt_); \ + CAF_CM_EXCEPTION_VA3(E_INVALIDARG, _fullfmt_.c_str(), _arg1_, _arg2_, _arg3_); \ + } + +// Generic assert +#define CAF_CM_ASSERT(_exp_) \ + if (!(_exp_)) \ + CAF_CM_EXCEPTION_VA2(E_FAIL, "%s %s", _sASSERT_FAILED, #_exp_ ) + +#define CAF_CM_ASSERT_MSG(_exp_, _msg_) \ + if (!(_exp_)) \ + CAF_CM_EXCEPTION_VA1( E_FAIL, "%s", _msg_ ); + +#endif /* VALIDATIONMACROS_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/ValidationMacrosRaw.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/ValidationMacrosRaw.h new file mode 100644 index 000000000..279dcd43c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/ValidationMacrosRaw.h @@ -0,0 +1,77 @@ +/* + * Author: mdonahue + * Created: Jan 13, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef VALIDATIONMACROSRAW_H_ +#define VALIDATIONMACROSRAW_H_ + +// Some helper macros that make it easy to validate that the object pre-conditions have been met. +#define CAF_CM_PRECONDRAW_ISCONSTRUCTED( _cm_className_, _cm_funcName_, _bIsConstucted_ ) \ + CValidate::constructed(_bIsConstucted_, _cm_className_, _cm_funcName_) + +#define CAF_CM_PRECONDRAW_ISINITIALIZED( _cm_className_, _cm_funcName_, _bIsInitialized_ ) \ + CValidate::initialized(_bIsInitialized_, _cm_className_, _cm_funcName_) + +#define CAF_CM_PRECONDRAW_ISNOTINITIALIZED( _cm_className_, _cm_funcName_, _bIsInitialized_ ) \ + CValidate::notInitialized(_bIsInitialized_, _cm_className_, _cm_funcName_) + +// Some helper macros that make is easy to validate input arguments. +#define CAF_CM_VALIDATERAW_STRING( _cm_className_, _cm_funcName_, _validate_ ) \ + CValidate::notEmptyStr(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATERAW_STRINGPTRW( _cm_className_, _cm_funcName_, _validate_ ) \ + CValidate::notNullOrEmptyStr(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATERAW_STRINGPTRA( _cm_className_, _cm_funcName_, _validate_ ) \ + CValidate::notNullOrEmptyStr(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATERAW_ZERO( _cm_className_, _cm_funcName_, _validate_) \ + CValidate::zero(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATERAW_NOTZERO( _cm_className_, _cm_funcName_, _validate_) \ + CValidate::notZero(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATERAW_POSITIVE( _cm_className_, _cm_funcName_, _validate_ ) \ + CValidate::positive(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATERAW_NEGATIVE( _cm_className_, _cm_funcName_, _validate_ ) \ + CValidate::negative(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATERAW_NONNEGATIVE( _cm_className_, _cm_funcName_, _validate_ ) \ + CValidate::nonNegative(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATERAW_BOOL( _cm_className_, _cm_funcName_, _validate_ ) \ + CValidate::isTrue(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATERAW_GUID( _cm_className_, _cm_funcName_, _validate_ ) \ + CValidate::notEmptyUuid(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATERAW_INTERFACE( _cm_className_, _cm_funcName_, _validate_ ) \ + CValidate::notNullInterface(_validate_.GetNonAddRefedInterface(), #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATERAW_INTERFACEPTR( _cm_className_, _cm_funcName_, _validate_ ) \ + CValidate::notNullInterface(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATERAW_PTR( _cm_className_, _cm_funcName_, _validate_ ) \ + CValidate::notNullPtr(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATERAW_NULLPTR( _cm_className_, _cm_funcName_, _validate_ ) \ + CValidate::nullPtr(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATERAW_SMARTPTR( _cm_className_, _cm_funcName_, _validate_ ) \ + CValidate::notNullPtr(_validate_.GetNonAddRefedInterface(), #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATERAW_PTRARRAY( _cm_className_, _cm_funcName_, _validate_ ) \ + CValidate::notNullOrEmptyPtrArr(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATERAW_STL( _cm_className_, _cm_funcName_, _validate_ ) \ + CValidate::notEmptyStl(_validate_.size(), #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATERAW_STL_EMPTY( _cm_className_, _cm_funcName_, _validate_ ) \ + CValidate::emptyStl(_validate_.size(), #_validate_, _cm_className_, _cm_funcName_) + +#endif /* VALIDATIONMACROSRAW_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/stdafx.h new file mode 100644 index 000000000..de990ff49 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/stdafx.h @@ -0,0 +1,26 @@ +/* + * Author: mdonahue + * Created: Jan 13, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define EXCEPTION_LINKAGE __declspec(dllexport) + #define COMMONAGGREGATOR_LINKAGE __declspec(dllexport) +#else + #define EXCEPTION_LINKAGE + #define COMMONAGGREGATOR_LINKAGE +#endif + +#include +#include "../Globals/CommonGlobalsLink.h" +#include "CCafException.h" +#include "ClassMacros.h" +#include "ExceptionMacros.h" + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Globals/CafContracts.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Globals/CafContracts.cpp new file mode 100644 index 000000000..8078038e0 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Globals/CafContracts.cpp @@ -0,0 +1,69 @@ +/* + * Author: bwilliams + * Created: 10/19/2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include + +namespace Caf { + const char* _sConfigTmpDir = "tmp_dir"; + const char* _sConfigInputDir = "input_dir"; + const char* _sConfigOutputDir = "output_dir"; + const char* _sConfigSchemaCacheDir = "schema_cache_dir"; + const char* _sConfigProviderRegDir = "provider_reg_dir"; + const char* _sConfigInstallDir = "install_dir"; + const char* _sConfigInvokersDir = "invokers_dir"; + const char* _sConfigProvidersDir = "providers_dir"; + const char* _sConfigCommonPackagesDir = "common_packages_dir"; + const char* _sConfigWorkingDir = "working_dir"; + const char* _sConfigPrivateKeyFile = "private_key_file"; + const char* _sConfigCertFile = "cert_file"; + + const char* _sProviderHostArea = "providerHost"; + const char* _sManagementAgentArea = "managementAgent"; + + const char* _sSchemaSummaryFilename = "schemaSummary.xml"; + const char* _sProviderResponseFilename = "providerResponse.xml"; + const char* _sStdoutFilename = "_provider_stdout_"; + const char* _sStderrFilename = "_provider_stderr_"; + + const char* _sPayloadRequestFilename = "payloadRequest.xml"; + const char* _sResponseFilename = "response.xml"; + const char* _sErrorResponseFilename = "errorResponse.xml"; + const char* _sProviderRequestFilename = "providerRequest.xml"; + const char* _sInfraErrFilename = "_infraError_"; + + // FxProviderFx related string constants + const char* _sObjIdProviderDriver = "com.vmware.commonagent.providerfx.providerdriver"; + const char* _sObjIdProviderCdifFormatter = "com.vmware.commonagent.providerfx.providercdifformatter"; + + // MA related string constants + const char* _sObjIdCollectSchemaExecutor = "com.vmware.commonagent.maintegration.collectschemaexecutor"; + const char* _sObjIdProviderCollectSchemaExecutor = "com.vmware.commonagent.maintegration.providercollectschemaexecutor"; + const char* _sObjIdProviderExecutor = "com.vmware.commonagent.maintegration.providerexecutor"; + const char* _sObjIdSinglePmeRequestSplitterInstance = "com.vmware.commonagent.maintegration.singlepmerequestsplitterinstance"; + const char* _sObjIdSinglePmeRequestSplitter = "com.vmware.commonagent.maintegration.singlepmerequestsplitter"; + const char* _sObjIdDiagToMgmtRequestTransformerInstance = "com.vmware.commonagent.maintegration.diagtomgmtrequesttransformerinstance"; + const char* _sObjIdDiagToMgmtRequestTransformer = "com.vmware.commonagent.maintegration.diagtomgmtrequesttransformer"; + const char* _sObjIdInstallToMgmtRequestTransformerInstance = "com.vmware.commonagent.maintegration.installtomgmtrequesttransformerinstance"; + const char* _sObjIdInstallToMgmtRequestTransformer = "com.vmware.commonagent.maintegration.installtomgmtrequesttransformer"; + const char* _sObjIdPersistenceNamespaceDb = "com.vmware.commonagent.maintegration.persistencenamespacedb"; + const char* _sObjIdConfigEnv = "com.vmware.commonagent.maintegration.configenv"; + + const char* _sObjIdAttachmentRequestTransformerInstance = "com.vmware.commonagent.maintegration.attachmentrequesttransformerinstance"; + const char* _sObjIdAttachmentRequestTransformer = "com.vmware.commonagent.maintegration.attachmentrequesttransformer"; + const char* _sObjIdVersionTransformerInstance = "com.vmware.commonagent.maintegration.versiontransformerinstance"; + const char* _sObjIdVersionTransformer = "com.vmware.commonagent.maintegration.versiontransformer"; + + // Framework related string constants + const char* _sObjIdErrorToResponseTransformerInstance = "com.vmware.commonagent.cafintegration.errortoresponsetransformerinstance"; + const char* _sObjIdErrorToResponseTransformer = "com.vmware.commonagent.cafintegration.errortoresponsetransformer"; + const char* _sObjIdPayloadHeaderEnricherInstance = "com.vmware.commonagent.cafintegration.payloadheaderenricherinstance"; + const char* _sObjIdPayloadHeaderEnricher = "com.vmware.commonagent.cafintegration.payloadheaderenricher"; + const char* _sObjIdEnvelopeToPayloadTransformerInstance = "com.vmware.commonagent.cafintegration.envelopetopayloadtransformerinstance"; + const char* _sObjIdEnvelopeToPayloadTransformer = "com.vmware.commonagent.cafintegration.envelopetopayloadtransformer"; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Globals/ClassMacroStrings.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Globals/ClassMacroStrings.cpp new file mode 100644 index 000000000..037d01f73 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Globals/ClassMacroStrings.cpp @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2011 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "ClassMacroStrings.h" + +const char _sPRECOND_ISCONSTRUCTED[] = "Pre-condition failed because object was not constructed successfully"; +const char _sPRECOND_ISINITIALIZED[] = "Pre-condition failed because object was not initialized successfully"; +const char _sPRECOND_ISNOTINITIALIZED[] = "Pre-condition failed because object has already been initialized"; +const char _sPRECOND_ISNOTREADONLY[] = "Pre-condition failed because the object is read-only."; + +const char _sVALIDATE_STRINGEMPTY[] ="Invalid Argument because a string is empty:"; +const char _sVALIDATE_STRINGPTRNULL[] ="Invalid Argument because a string pointer is null:"; +const char _sVALIDATE_STRINGPTREMPTY[] ="Invalid Argument because a string pointer is empty:"; +const char _sVALIDATE_PTRARRAYNULL[] ="Invalid Argument because a pointer array is null:"; +const char _sVALIDATE_PTRARRAYEMPTY[] ="Invalid Argument because a pointer array is empty:"; +const char _sVALIDATE_STL[] ="Invalid Argument because an STL container is empty:"; +const char _sVALIDATE_STL_EMPTY[] ="Invalid Argument because an STL container is not empty:"; +const char _sVALIDATE_STL_ITERATOR[] ="Invalid Argument because an STL iterator is at the end of the containter:"; +const char _sVALIDATE_INTERFACE[] ="Invalid Argument because an interface is NULL:"; +const char _sVALIDATE_ZERO[] ="Invalid Argument because a number is not equal to zero:"; +const char _sVALIDATE_ISNOTZERO[] ="Invalid Argument because a number is equal to zero:"; +const char _sVALIDATE_POSITIVE[] ="Invalid Argument because a number is less-than or equal-to zero:"; +const char _sVALIDATE_NEGATIVE[] ="Invalid Argument because a number is greater-than or equal-to zero:"; +const char _sVALIDATE_NONNEGATIVE[] ="Invalid Argument because a number is less-than zero:"; +const char _sVALIDATE_NOTNULL[] ="Invalid Argument is NULL:"; +const char _sVALIDATE_NULL[] ="Invalid Argument must be NULL:"; +const char _sVALIDATE_BOOL[] ="Invalid Argument because a bool is false:"; +const char _sVALIDATE_GUID[] ="Invalid Argument because a GUID is NULL:"; +const char _sASSERT_FAILED[] ="Assertion failed:"; diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Globals/ClassMacroStrings.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Globals/ClassMacroStrings.h new file mode 100644 index 000000000..1c6c0f7b2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Globals/ClassMacroStrings.h @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2011 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _Common_ClassMacroStrings_H +#define _Common_ClassMacroStrings_H + +extern COMMONGLOBALS_LINKAGE const char _sPRECOND_ISCONSTRUCTED[]; +extern COMMONGLOBALS_LINKAGE const char _sPRECOND_ISINITIALIZED[]; +extern COMMONGLOBALS_LINKAGE const char _sPRECOND_ISNOTINITIALIZED[]; +extern COMMONGLOBALS_LINKAGE const char _sPRECOND_ISNOTREADONLY[]; +extern COMMONGLOBALS_LINKAGE const char _sVALIDATE_STRINGEMPTY[]; +extern COMMONGLOBALS_LINKAGE const char _sVALIDATE_STRINGPTRNULL[]; +extern COMMONGLOBALS_LINKAGE const char _sVALIDATE_STRINGPTREMPTY[]; +extern COMMONGLOBALS_LINKAGE const char _sVALIDATE_PTRARRAYNULL[]; +extern COMMONGLOBALS_LINKAGE const char _sVALIDATE_PTRARRAYEMPTY[]; +extern COMMONGLOBALS_LINKAGE const char _sVALIDATE_STL[]; +extern COMMONGLOBALS_LINKAGE const char _sVALIDATE_STL_EMPTY[]; +extern COMMONGLOBALS_LINKAGE const char _sVALIDATE_STL_ITERATOR[]; +extern COMMONGLOBALS_LINKAGE const char _sVALIDATE_INTERFACE[]; +extern COMMONGLOBALS_LINKAGE const char _sVALIDATE_ZERO[]; +extern COMMONGLOBALS_LINKAGE const char _sVALIDATE_ISNOTZERO[]; +extern COMMONGLOBALS_LINKAGE const char _sVALIDATE_POSITIVE[]; +extern COMMONGLOBALS_LINKAGE const char _sVALIDATE_NEGATIVE[]; +extern COMMONGLOBALS_LINKAGE const char _sVALIDATE_NONNEGATIVE[]; +extern COMMONGLOBALS_LINKAGE const char _sVALIDATE_NOTNULL[]; +extern COMMONGLOBALS_LINKAGE const char _sVALIDATE_NULL[]; +extern COMMONGLOBALS_LINKAGE const char _sVALIDATE_BOOL[]; +extern COMMONGLOBALS_LINKAGE const char _sVALIDATE_GUID[]; +extern COMMONGLOBALS_LINKAGE const char _sASSERT_FAILED[]; + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Globals/CommonDefines.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Globals/CommonDefines.cpp new file mode 100644 index 000000000..06847c34d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Globals/CommonDefines.cpp @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2011 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CommonDefines.h" + +namespace Caf { + const char* _sAppConfigGlobalParamRootDir = "root_dir"; + const char* _sAppConfigGlobalParamDataDir = "data_dir"; + const char* _sAppConfigGlobalParamLogDir = "log_dir"; + const char* _sAppConfigGlobalParamLogConfigFile = "log_config_file"; + const char* _sAppConfigGlobalParamInputDir = "input_dir"; + const char* _sAppConfigGlobalParamOutputDir = "output_dir"; + const char* _sAppConfigGlobalParamDbDir = "db_dir"; + const char* _sAppConfigGlobalThreadStackSizeKb = "thread_stack_size_kb"; + + const GUID CAFCOMMON_GUID_NULL = {0}; + +#ifdef WIN32 + const char* CAFCOMMON_PATH_DELIM = "\\"; + const char CAFCOMMON_PATH_DELIM_CHAR = '\\'; +#else + const char* CAFCOMMON_PATH_DELIM = "/"; + const char CAFCOMMON_PATH_DELIM_CHAR = '/'; +#endif +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Globals/CommonDefines.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Globals/CommonDefines.h new file mode 100644 index 000000000..696d080fd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Globals/CommonDefines.h @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2011 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _Common_CommonDefines_H +#define _Common_CommonDefines_H + +namespace Caf { + // AppConfig common parameter names + extern COMMONGLOBALS_LINKAGE const char* _sAppConfigGlobalParamRootDir; + extern COMMONGLOBALS_LINKAGE const char* _sAppConfigGlobalParamDataDir; + extern COMMONGLOBALS_LINKAGE const char* _sAppConfigGlobalParamLogDir; + extern COMMONGLOBALS_LINKAGE const char* _sAppConfigGlobalParamLogConfigFile; + extern COMMONGLOBALS_LINKAGE const char* _sAppConfigGlobalParamInputDir; + extern COMMONGLOBALS_LINKAGE const char* _sAppConfigGlobalParamOutputDir; + extern COMMONGLOBALS_LINKAGE const char* _sAppConfigGlobalParamDbDir; + extern COMMONGLOBALS_LINKAGE const char* _sAppConfigGlobalThreadStackSizeKb; + + extern COMMONGLOBALS_LINKAGE const GUID CAFCOMMON_GUID_NULL; + + extern COMMONGLOBALS_LINKAGE const char* CAFCOMMON_PATH_DELIM; + extern COMMONGLOBALS_LINKAGE const char CAFCOMMON_PATH_DELIM_CHAR; +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Globals/CommonGlobalsLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Globals/CommonGlobalsLink.h new file mode 100644 index 000000000..a451325e0 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Globals/CommonGlobalsLink.h @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef Common_CommonGlobalsLink_h_ +#define Common_CommonGlobalsLink_h_ + +#ifndef COMMONGLOBALS_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define COMMONGLOBALS_LINKAGE __declspec(dllexport) + #else + #define COMMONGLOBALS_LINKAGE __declspec(dllimport) + #endif + #else + #define COMMONGLOBALS_LINKAGE + #endif +#endif + +#include "CommonDefines.h" +#include "ClassMacroStrings.h" + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Globals/Integration.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Globals/Integration.cpp new file mode 100644 index 000000000..1db391d17 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Globals/Integration.cpp @@ -0,0 +1,17 @@ +/* + * Author: bwilliams + * Created: 10/19/2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "../../include/Integration.h" + +namespace Caf { + const char* _sObjIdIntegrationObjectFactory = "com.vmware.commonagent.integration.objectfactory"; + const char* _sObjIdErrorChannel = "com.vmware.commonagent.integration.channels.errorchannel"; + const char* _sObjIdNullChannel = "com.vmware.commonagent.integration.channels.nullchannel"; + const char* _sObjIdHeaderExpressionInvoker = "com.vmware.commonagent.integration.headerexpressioninvoker"; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Globals/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Globals/stdafx.h new file mode 100644 index 000000000..8067b04c0 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Globals/stdafx.h @@ -0,0 +1,12 @@ +/* + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef stdafx_h_ +#define stdafx_h_ + +#include +#include "CommonGlobalsLink.h" + +#endif // #ifndef stdafx_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/ICafObject.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/ICafObject.h new file mode 100644 index 000000000..2f57e60e8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/ICafObject.h @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _ICafObject_H_ +#define _ICafObject_H_ + +/** + * @brief + * The base interface all classes must support in order to support lifetime management + * and interface retrieval. + *

+ * Object lifetime is managed through the AddRef() and Release() methods. Pointers + * to supported interfaces on the object - in the form of TCafSmartPtr - are + * retrieved using the QueryInterface() method. + *

+ * Interfaces and classes are candidates for QueryInterface() if they declare + * a unique identifier for the interface or class. The identifier is a + * UUID and is declared using the CAF_DECL_UUID macro. + *

+ * Example interface declaration: + *

+ * 
+ * struct __declspcec(novtable) IMyInterface {
+ *
+ * 	CAF_DECL_UUID("6AECA0A4-C6B1-4A43-9769-C5A8F56F0B52")
+ *
+ * 	virtual void Foo() = 0;
+ * };
+ * 
+ * 
+ */ +struct __declspec(novtable) ICafObject { + CAF_DECL_UUID("d285ff70-2314-11e0-ac64-0800200c9a66") + + /** @brief Increment the object's reference count */ + virtual void AddRef() = 0; + + /** + * @brief Decrement the object's reference count + *

+ * The object will be destroyed when the count reaches zero. + */ + virtual void Release() = 0; + + /** + * @brief Retrieve an interface on the object + * @param IID the interface's UUID + * @param ppv the address into which the retrieve interface's pointer + * will be stored + */ + virtual void QueryInterface(const IID&, void** ppv) = 0; +}; + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CBeanPropertiesHelper.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CBeanPropertiesHelper.cpp new file mode 100644 index 000000000..12a33132b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CBeanPropertiesHelper.cpp @@ -0,0 +1,95 @@ +/* + * Author: bwilliams + * Created: Jul 2009 + * + * Copyright (c) 2009-2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CBeanPropertiesHelper.h" + +using namespace Caf; + +SmartPtrCBeanPropertiesHelper CBeanPropertiesHelper::create( + const IBean::Cprops& properties) { + SmartPtrCBeanPropertiesHelper rc; + rc.CreateInstance(); + rc->initialize(properties); + + return rc; +} + +CBeanPropertiesHelper::CBeanPropertiesHelper(void) : + m_isInitialized(false), + CAF_CM_INIT("CBeanPropertiesHelper") { +} + +CBeanPropertiesHelper::~CBeanPropertiesHelper(void) { +} + +void CBeanPropertiesHelper::initialize( + const IBean::Cprops& properties) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(m_isInitialized); + + _properties = properties; + m_isInitialized = true; +} + +std::string CBeanPropertiesHelper::getRequiredString( + const std::string& key) const { + CAF_CM_FUNCNAME("getRequiredString"); + CAF_CM_PRECOND_ISINITIALIZED(m_isInitialized); + CAF_CM_VALIDATE_STRING(key); + + const IBean::Cprops::const_iterator iter = _properties.find(key); + if (_properties.end() == iter) { + CAF_CM_EXCEPTION_VA1(E_FAIL, + "Required property not found - %s", key.c_str()); + } + + return iter->second; +} + +std::string CBeanPropertiesHelper::getOptionalString( + const std::string& key, + const std::string& defaultVal) const { + CAF_CM_FUNCNAME_VALIDATE("getOptionalString"); + CAF_CM_PRECOND_ISINITIALIZED(m_isInitialized); + CAF_CM_VALIDATE_STRING(key); + + std::string rc = defaultVal; + const IBean::Cprops::const_iterator iter = _properties.find(key); + if (_properties.end() != iter) { + rc = iter->second; + } + + return rc; +} + +bool CBeanPropertiesHelper::getRequiredBool( + const std::string& key) const { + CAF_CM_FUNCNAME_VALIDATE("getRequiredBool"); + CAF_CM_PRECOND_ISINITIALIZED(m_isInitialized); + CAF_CM_VALIDATE_STRING(key); + + const std::string val = getRequiredString(key); + return (val.compare("true") == 0); +} + +bool CBeanPropertiesHelper::getOptionalBool( + const std::string& key, + const bool defaultValue) const { + CAF_CM_FUNCNAME_VALIDATE("getOptionalBool"); + CAF_CM_PRECOND_ISINITIALIZED(m_isInitialized); + CAF_CM_VALIDATE_STRING(key); + + bool rc = defaultValue; + const IBean::Cprops::const_iterator iter = _properties.find(key); + if (_properties.end() != iter) { + rc = (iter->second.compare("true") == 0); + } + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CBeanPropertiesHelper.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CBeanPropertiesHelper.h new file mode 100644 index 000000000..23c3d6e83 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CBeanPropertiesHelper.h @@ -0,0 +1,55 @@ +/* + * Author: bwilliams + * Created: Jul 2009 + * + * Copyright (c) 2009-2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CBeanPropertiesHelper_h_ +#define CBeanPropertiesHelper_h_ + +namespace Caf { + +CAF_DECLARE_CLASS_AND_SMART_POINTER(CBeanPropertiesHelper); + +class INTEGRATIONCAF_LINKAGE CBeanPropertiesHelper { +public: + static SmartPtrCBeanPropertiesHelper create( + const IBean::Cprops& properties); + +public: + CBeanPropertiesHelper(); + virtual ~CBeanPropertiesHelper(); + +public: + void initialize( + const IBean::Cprops& properties); + +public: + std::string getRequiredString( + const std::string& key) const; + + std::string getOptionalString( + const std::string& key, + const std::string& defaultVal = std::string()) const; + + bool getRequiredBool( + const std::string& key) const; + + bool getOptionalBool( + const std::string& key, + const bool defaultVal = false) const; + +private: + bool m_isInitialized; + IBean::Cprops _properties; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CBeanPropertiesHelper); +}; + +} + +#endif // #ifndef CBeanPropertiesHelper_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessageCreator.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessageCreator.cpp new file mode 100644 index 000000000..95e66f631 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessageCreator.cpp @@ -0,0 +1,431 @@ +/* + * Author: bwilliams + * Created: Jul 2009 + * + * Copyright (c) 2009-2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CCafMessageCreator.h" + +using namespace Caf; + +SmartPtrIIntMessage CCafMessageCreator::createPayloadEnvelope( + const SmartPtrCResponseDoc& response, + const std::string& relFilename, + const IIntMessage::SmartPtrCHeaders& headers) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessageCreator", "createPayloadEnvelope"); + CAF_CM_VALIDATE_SMARTPTR(response); + CAF_CM_VALIDATE_STRING(relFilename); + + SmartPtrCCafMessageHeadersWriter messageHeadersWriter = + CCafMessageHeadersWriter::create(); + messageHeadersWriter->setRelFilename(relFilename); + + const SmartPtrIIntMessage rc = createPayloadEnvelope( + "response", + XmlRoots::saveResponseToString(response), + response->getClientId(), + response->getRequestId(), + response->getPmeId(), + response->getResponseHeader()->getVersion(), + messageHeadersWriter->getHeaders(), + headers, + response->getAttachmentCollection()); + + return rc; +} + +SmartPtrIIntMessage CCafMessageCreator::createPayloadEnvelope( + const SmartPtrCErrorResponseDoc& errorResponse, + const std::string& relFilename, + const IIntMessage::SmartPtrCHeaders& headers) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessageCreator", "createPayloadEnvelope"); + CAF_CM_VALIDATE_SMARTPTR(errorResponse); + CAF_CM_VALIDATE_STRING(relFilename); + + SmartPtrCCafMessageHeadersWriter messageHeadersWriter = + CCafMessageHeadersWriter::create(); + messageHeadersWriter->setRelFilename(relFilename); + + const SmartPtrIIntMessage rc = createPayloadEnvelope( + "errorResponse", + XmlRoots::saveErrorResponseToString(errorResponse), + errorResponse->getClientId(), + errorResponse->getRequestId(), + errorResponse->getPmeId(), + errorResponse->getResponseHeader()->getVersion(), + messageHeadersWriter->getHeaders(), + headers); + + return rc; +} + +SmartPtrIIntMessage CCafMessageCreator::createPayloadEnvelope( + const SmartPtrCMgmtRequestDoc& mgmtRequest, + const IIntMessage::SmartPtrCHeaders& headers) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessageCreator", "createPayloadEnvelope"); + CAF_CM_VALIDATE_SMARTPTR(mgmtRequest); + + const SmartPtrIIntMessage rc = createPayloadEnvelope( + "mgmtRequest", + XmlRoots::saveMgmtRequestToString(mgmtRequest), + mgmtRequest->getClientId(), + mgmtRequest->getRequestId(), + mgmtRequest->getPmeId(), + mgmtRequest->getRequestHeader()->getVersion(), + IIntMessage::SmartPtrCHeaders(), + headers, + mgmtRequest->getAttachmentCollection(), + mgmtRequest->getRequestHeader()->getProtocolCollection()); + + return rc; +} + +SmartPtrIIntMessage CCafMessageCreator::createPayloadEnvelope( + const SmartPtrCPayloadEnvelopeDoc& payloadEnvelope, + const std::deque& attachmentCollection, + const IIntMessage::SmartPtrCHeaders& newHeaders, + const IIntMessage::SmartPtrCHeaders& origHeaders) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessageCreator", "createPayloadEnvelope"); + CAF_CM_VALIDATE_SMARTPTR(payloadEnvelope); + + SmartPtrCPayloadEnvelopeDoc payloadEnvelopeNew = payloadEnvelope; + if (attachmentCollection.size() > 0) { + SmartPtrCAttachmentCollectionDoc attachmentCollectionDoc; + attachmentCollectionDoc.CreateInstance(); + attachmentCollectionDoc->initialize(attachmentCollection); + + payloadEnvelopeNew.CreateInstance(); + payloadEnvelopeNew->initialize( + payloadEnvelope->getClientId(), + payloadEnvelope->getRequestId(), + payloadEnvelope->getPmeId(), + payloadEnvelope->getPayloadType(), + payloadEnvelope->getPayloadVersion(), + attachmentCollectionDoc, + payloadEnvelope->getProtocolCollection(), + payloadEnvelope->getHeaderCollection(), + payloadEnvelope->getVersion()); + } + + const std::string payloadEnvelopeStr = + XmlRoots::savePayloadEnvelopeToString(payloadEnvelopeNew); + + SmartPtrCIntMessage messageImpl; + messageImpl.CreateInstance(); + messageImpl->initializeStr(payloadEnvelopeStr, newHeaders, origHeaders); + + return messageImpl; +} + +SmartPtrIIntMessage CCafMessageCreator::createFromProviderResponse( + const SmartPtrCDynamicByteArray& providerResponse, + const std::string& relFilename, + const IIntMessage::SmartPtrCHeaders& headers) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessageCreator", "createFromProviderResponse"); + CAF_CM_VALIDATE_SMARTPTR(providerResponse); + CAF_CM_VALIDATE_STRING(relFilename); + + SmartPtrCCafMessageHeadersWriter messageHeadersWriter = + CCafMessageHeadersWriter::create(); + messageHeadersWriter->setPayloadType("providerResponse"); + messageHeadersWriter->setRelFilename(relFilename); + + SmartPtrCIntMessage messageImpl; + messageImpl.CreateInstance(); + messageImpl->initialize(providerResponse, + messageHeadersWriter->getHeaders(), headers); + + return messageImpl; +} + +SmartPtrIIntMessage CCafMessageCreator::create( + const SmartPtrCDynamicByteArray payload, + const std::deque& attachmentCollection, + const IIntMessage::SmartPtrCHeaders& headers) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessageCreator", "create"); + CAF_CM_VALIDATE_SMARTPTR(payload); + + const std::string payloadStr = reinterpret_cast(payload->getPtr()); + const SmartPtrCXmlElement payloadXml = + CXmlUtils::parseString(payloadStr, std::string()); + + payloadXml->removeChild("attachmentCollection"); + if (! attachmentCollection.empty()) { + SmartPtrCAttachmentCollectionDoc attachmentCollectionDoc; + attachmentCollectionDoc.CreateInstance(); + attachmentCollectionDoc->initialize(attachmentCollection); + + const SmartPtrCXmlElement attachmentCollectionXml = + payloadXml->createAndAddElement("attachmentCollection"); + AttachmentCollectionXml::add(attachmentCollectionDoc, attachmentCollectionXml); + } + + SmartPtrCIntMessage messageImpl; + messageImpl.CreateInstance(); + messageImpl->initializeStr( + payloadXml->saveToString(), CIntMessage::SmartPtrCHeaders(), headers); + + return messageImpl; +} + +SmartPtrIIntMessage CCafMessageCreator::create( + const SmartPtrCMgmtRequestDoc& mgmtRequest, + const IIntMessage::SmartPtrCHeaders& headers) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessageCreator", "create"); + CAF_CM_VALIDATE_SMARTPTR(mgmtRequest); + + const std::string mgmtRequestStr = + XmlRoots::saveMgmtRequestToString(mgmtRequest); + + SmartPtrCCafMessageHeadersWriter messageHeadersWriter = + CCafMessageHeadersWriter::create(); + messageHeadersWriter->setPayloadType("mgmtRequest"); + + SmartPtrCIntMessage messageImpl; + messageImpl.CreateInstance(); + messageImpl->initializeStr(mgmtRequestStr, + messageHeadersWriter->getHeaders(), headers); + + return messageImpl; +} + +SmartPtrIIntMessage CCafMessageCreator::create( + const SmartPtrCDiagRequestDoc& diagRequest, + const IIntMessage::SmartPtrCHeaders& headers) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessageCreator", "create"); + CAF_CM_VALIDATE_SMARTPTR(diagRequest); + + const std::string diagRequestStr = + XmlRoots::saveDiagRequestToString(diagRequest); + + SmartPtrCCafMessageHeadersWriter messageHeadersWriter = + CCafMessageHeadersWriter::create(); + messageHeadersWriter->setPayloadType("diagRequest"); + + SmartPtrCIntMessage messageImpl; + messageImpl.CreateInstance(); + messageImpl->initializeStr(diagRequestStr, + messageHeadersWriter->getHeaders(), headers); + + return messageImpl; +} + +SmartPtrIIntMessage CCafMessageCreator::create( + const SmartPtrCInstallRequestDoc& installRequest, + const IIntMessage::SmartPtrCHeaders& headers) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessageCreator", "create"); + CAF_CM_VALIDATE_SMARTPTR(installRequest); + + const std::string installRequestStr = + XmlRoots::saveInstallRequestToString(installRequest); + + SmartPtrCCafMessageHeadersWriter messageHeadersWriter = + CCafMessageHeadersWriter::create(); + messageHeadersWriter->setPayloadType("installRequest"); + + SmartPtrCIntMessage messageImpl; + messageImpl.CreateInstance(); + messageImpl->initializeStr(installRequestStr, + messageHeadersWriter->getHeaders(), headers); + + return messageImpl; +} + +SmartPtrIIntMessage CCafMessageCreator::create( + const SmartPtrCProviderRegDoc& providerReg, + const IIntMessage::SmartPtrCHeaders& headers) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessageCreator", "create"); + CAF_CM_VALIDATE_SMARTPTR(providerReg); + + const std::string installRequestStr = + XmlRoots::saveProviderRegToString(providerReg); + + SmartPtrCCafMessageHeadersWriter messageHeadersWriter = + CCafMessageHeadersWriter::create(); + messageHeadersWriter->setPayloadType("providerReg"); + + SmartPtrCIntMessage messageImpl; + messageImpl.CreateInstance(); + messageImpl->initializeStr(installRequestStr, + messageHeadersWriter->getHeaders(), headers); + + return messageImpl; +} + +SmartPtrIIntMessage CCafMessageCreator::create( + const SmartPtrCProviderCollectSchemaRequestDoc& providerCollectSchemaRequest, + const std::string& relFilename, + const std::string& relDirectory, + const IIntMessage::SmartPtrCHeaders& headers) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessageCreator", "create"); + CAF_CM_VALIDATE_SMARTPTR(providerCollectSchemaRequest); + CAF_CM_VALIDATE_STRING(relFilename); + CAF_CM_VALIDATE_STRING(relDirectory); + + const std::string providerCollectSchemaRequestMem = + XmlRoots::saveProviderCollectSchemaRequestToString(providerCollectSchemaRequest); + + SmartPtrCCafMessageHeadersWriter messageHeadersWriter = + CCafMessageHeadersWriter::create(); + messageHeadersWriter->setPayloadType("providerCollectSchemaRequest"); + messageHeadersWriter->setRelFilename(relFilename); + messageHeadersWriter->setRelDirectory(relDirectory); + + SmartPtrCIntMessage messageImpl; + messageImpl.CreateInstance(); + messageImpl->initializeStr(providerCollectSchemaRequestMem, + messageHeadersWriter->getHeaders(), headers); + + return messageImpl; +} + +SmartPtrIIntMessage CCafMessageCreator::create( + const SmartPtrCProviderRequestDoc& providerRequest, + const std::string& relFilename, + const std::string& relDirectory, + const std::string& providerUri, + const IIntMessage::SmartPtrCHeaders& headers) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessageCreator", "create"); + CAF_CM_VALIDATE_SMARTPTR(providerRequest); + CAF_CM_VALIDATE_STRING(relFilename); + CAF_CM_VALIDATE_STRING(relDirectory); + + SmartPtrCProviderRequestHeaderDoc requestHeader = providerRequest->getRequestHeader(); + SmartPtrCPropertyCollectionDoc propertyBag = requestHeader->getEchoPropertyBag(); + + std::deque newProperties; + if (!propertyBag.IsNull()) { + newProperties.assign(propertyBag->getProperty().begin(), propertyBag->getProperty().end()); + } + + std::deque relDirectoryValue(1, relDirectory); + SmartPtrCPropertyDoc relDirectoryProp; + relDirectoryProp.CreateInstance(); + relDirectoryProp->initialize("relDirectory", PROPERTY_STRING, relDirectoryValue); + newProperties.push_back(relDirectoryProp); + + std::deque providerUriValue(1, providerUri); + SmartPtrCPropertyDoc providerUriProp; + providerUriProp.CreateInstance(); + providerUriProp->initialize("providerUri", PROPERTY_STRING, providerUriValue); + newProperties.push_back(providerUriProp); + + SmartPtrCPropertyCollectionDoc newPropertyBag; + newPropertyBag.CreateInstance(); + newPropertyBag->initialize(newProperties); + + SmartPtrCProviderRequestHeaderDoc newRequestHeader; + newRequestHeader.CreateInstance(); + newRequestHeader->initialize(requestHeader->getRequestConfig(), newPropertyBag); + + SmartPtrCProviderRequestDoc newProviderRequest; + newProviderRequest.CreateInstance(); + newProviderRequest->initialize(providerRequest->getClientId(), + providerRequest->getRequestId(), providerRequest->getPmeId(), newRequestHeader, + providerRequest->getBatch(), providerRequest->getAttachmentCollection()); + + const std::string providerRequestMem = + XmlRoots::saveProviderRequestToString(newProviderRequest); + + SmartPtrCCafMessageHeadersWriter messageHeadersWriter = + CCafMessageHeadersWriter::create(); + messageHeadersWriter->setPayloadType("providerRequest"); + messageHeadersWriter->setRelFilename(relFilename); + messageHeadersWriter->setRelDirectory(relDirectory); + + if (! providerUri.empty()) { + messageHeadersWriter->setProviderUri(providerUri); + } + + SmartPtrCIntMessage messageImpl; + messageImpl.CreateInstance(); + messageImpl->initializeStr(providerRequestMem, + messageHeadersWriter->getHeaders(), headers); + + return messageImpl; +} + +SmartPtrIIntMessage CCafMessageCreator::createPayloadEnvelope( + const std::string& payloadType, + const std::string& payloadStr, + const UUID& clientId, + const UUID& requestId, + const std::string& pmeId, + const std::string& payloadVersion, + const IIntMessage::SmartPtrCHeaders& newHeaders, + const IIntMessage::SmartPtrCHeaders& origHeaders, + const SmartPtrCAttachmentCollectionDoc& attachmentCollection, + const SmartPtrCProtocolCollectionDoc& protocolCollection) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CCafMessageCreator", "createPayloadEnvelope"); + CAF_CM_VALIDATE_STRING(payloadStr); + CAF_CM_VALIDATE_GUID(clientId); + CAF_CM_VALIDATE_GUID(requestId); + CAF_CM_VALIDATE_STRING(pmeId); + CAF_CM_VALIDATE_STRING(payloadType); + CAF_CM_VALIDATE_STRING(payloadVersion); + + const std::string outputDir = + AppConfigUtils::getRequiredString(_sAppConfigGlobalParamOutputDir); + + const std::string destAttachmentFilename = + BasePlatform::UuidToString(requestId) + "-EnvelopePayload.xml"; + const std::string destAttachmentPath = FileSystemUtils::buildPath( + outputDir, destAttachmentFilename); + const std::string destAttachmentUri = + "file:///" + destAttachmentPath + "?relPath=" + destAttachmentFilename; + + const SmartPtrCDynamicByteArray payload = + CCafMessagePayload::createBufferFromStr(payloadStr); + FileSystemUtils::saveByteFile(destAttachmentPath, payload); + + const std::string cmsPolicyStr = AppConfigUtils::getRequiredString( + "security", "cms_policy"); + const CMS_POLICY cmsPolicy = + EnumConvertersXml::convertStringToCmsPolicy(cmsPolicyStr); + + SmartPtrCAttachmentDoc envelopePayloadAttachment; + envelopePayloadAttachment.CreateInstance(); + envelopePayloadAttachment->initialize("_EnvelopePayload_", "EnvelopePayload", + destAttachmentUri, false, cmsPolicy); + + std::deque attachmentCollectionNew; + if (! attachmentCollection.IsNull()) { + attachmentCollectionNew = attachmentCollection->getAttachment(); + } + attachmentCollectionNew.push_back(envelopePayloadAttachment); + + SmartPtrCAttachmentCollectionDoc attachmentCollectionDocNew; + attachmentCollectionDocNew.CreateInstance(); + attachmentCollectionDocNew->initialize(attachmentCollectionNew); + + SmartPtrCPayloadEnvelopeDoc payloadEnvelope; + payloadEnvelope.CreateInstance(); + payloadEnvelope->initialize( + clientId, + requestId, + pmeId, + payloadType, + payloadVersion, + attachmentCollectionDocNew, + protocolCollection); + + const std::string payloadEnvelopeStr = + XmlRoots::savePayloadEnvelopeToString(payloadEnvelope); + + const CIntMessage::SmartPtrCHeaders mergedHeaders = + CIntMessage::mergeHeaders(newHeaders, origHeaders); + + SmartPtrCCafMessageHeadersWriter messageHeadersWriter = + CCafMessageHeadersWriter::create(); + messageHeadersWriter->setPayloadType(payloadType); + + SmartPtrCIntMessage messageImpl; + messageImpl.CreateInstance(); + messageImpl->initializeStr( + payloadEnvelopeStr, messageHeadersWriter->getHeaders(), mergedHeaders); + + return messageImpl; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessageCreator.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessageCreator.h new file mode 100644 index 000000000..5381b0ece --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessageCreator.h @@ -0,0 +1,99 @@ +/* + * Author: bwilliams + * Created: Jul 2009 + * + * Copyright (c) 2009-2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CCafMessageCreator_h_ +#define CCafMessageCreator_h_ + +namespace Caf { + +CAF_DECLARE_CLASS_AND_SMART_POINTER(CCafMessageCreator); + +class INTEGRATIONCAF_LINKAGE CCafMessageCreator { +public: + static SmartPtrIIntMessage createPayloadEnvelope( + const SmartPtrCResponseDoc& response, + const std::string& relFilename, + const IIntMessage::SmartPtrCHeaders& headers = IIntMessage::SmartPtrCHeaders()); + + static SmartPtrIIntMessage createPayloadEnvelope( + const SmartPtrCErrorResponseDoc& errorResponse, + const std::string& relFilename, + const IIntMessage::SmartPtrCHeaders& headers = IIntMessage::SmartPtrCHeaders()); + + static SmartPtrIIntMessage createPayloadEnvelope( + const SmartPtrCMgmtRequestDoc& mgmtRequest, + const IIntMessage::SmartPtrCHeaders& headers = IIntMessage::SmartPtrCHeaders()); + + static SmartPtrIIntMessage createPayloadEnvelope( + const SmartPtrCPayloadEnvelopeDoc& payloadEnvelope, + const std::deque& attachmentCollection, + const IIntMessage::SmartPtrCHeaders& newHeaders = IIntMessage::SmartPtrCHeaders(), + const IIntMessage::SmartPtrCHeaders& origHeaders = IIntMessage::SmartPtrCHeaders()); + +public: + static SmartPtrIIntMessage createFromProviderResponse( + const SmartPtrCDynamicByteArray& providerResponse, + const std::string& relFilename, + const IIntMessage::SmartPtrCHeaders& headers = IIntMessage::SmartPtrCHeaders()); + +public: + static SmartPtrIIntMessage create( + const SmartPtrCDynamicByteArray payload, + const std::deque& attachmentCollection, + const IIntMessage::SmartPtrCHeaders& headers = IIntMessage::SmartPtrCHeaders()); + +public: + static SmartPtrIIntMessage create( + const SmartPtrCMgmtRequestDoc& mgmtRequest, + const IIntMessage::SmartPtrCHeaders& headers = IIntMessage::SmartPtrCHeaders()); + + static SmartPtrIIntMessage create( + const SmartPtrCDiagRequestDoc& diagRequest, + const IIntMessage::SmartPtrCHeaders& headers = IIntMessage::SmartPtrCHeaders()); + + static SmartPtrIIntMessage create( + const SmartPtrCInstallRequestDoc& installRequest, + const IIntMessage::SmartPtrCHeaders& headers = IIntMessage::SmartPtrCHeaders()); + + static SmartPtrIIntMessage create( + const SmartPtrCProviderRegDoc& providerReg, + const IIntMessage::SmartPtrCHeaders& headers = IIntMessage::SmartPtrCHeaders()); + + static SmartPtrIIntMessage create( + const SmartPtrCProviderCollectSchemaRequestDoc& providerCollectSchemaRequest, + const std::string& relFilename, + const std::string& relDirectory, + const IIntMessage::SmartPtrCHeaders& headers = IIntMessage::SmartPtrCHeaders()); + + static SmartPtrIIntMessage create( + const SmartPtrCProviderRequestDoc& providerRequest, + const std::string& relFilename, + const std::string& relDirectory, + const std::string& providerUri, + const IIntMessage::SmartPtrCHeaders& headers = IIntMessage::SmartPtrCHeaders()); + +private: + static SmartPtrIIntMessage createPayloadEnvelope( + const std::string& payloadType, + const std::string& payloadStr, + const UUID& clientId, + const UUID& requestId, + const std::string& pmeId, + const std::string& payloadVersion, + const IIntMessage::SmartPtrCHeaders& newHeaders = IIntMessage::SmartPtrCHeaders(), + const IIntMessage::SmartPtrCHeaders& origHeaders = IIntMessage::SmartPtrCHeaders(), + const SmartPtrCAttachmentCollectionDoc& attachmentCollection = SmartPtrCAttachmentCollectionDoc(), + const SmartPtrCProtocolCollectionDoc& protocolCollection = SmartPtrCProtocolCollectionDoc()); + +private: + CAF_CM_DECLARE_NOCREATE(CCafMessageCreator); +}; + +} + +#endif // #ifndef CCafMessageCreator_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessageHeaders.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessageHeaders.cpp new file mode 100644 index 000000000..0b099e141 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessageHeaders.cpp @@ -0,0 +1,414 @@ +/* + * Author: bwilliams + * Created: Jul 2009 + * + * Copyright (c) 2009-2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CCafMessageHeaders.h" + +using namespace Caf; + +SmartPtrCCafMessageHeaders CCafMessageHeaders::create( + const IIntMessage::SmartPtrCHeaders& headers) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessageHeaders", "create"); + CAF_CM_VALIDATE_SMARTPTR(headers); + + SmartPtrCCafMessageHeaders rc; + rc.CreateInstance(); + rc->initialize(headers); + + return rc; +} + +CCafMessageHeaders::CCafMessageHeaders(void) : + _isInitialized(false), + CAF_CM_INIT_LOG("CCafMessageHeaders") { +} + +CCafMessageHeaders::~CCafMessageHeaders(void) { +} + +void CCafMessageHeaders::initialize( + const IIntMessage::SmartPtrCHeaders& headers) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(headers); + + _headers = headers; + _isInitialized = true; +} + +IIntMessage::SmartPtrCHeaders CCafMessageHeaders::getHeaders() const { + CAF_CM_FUNCNAME_VALIDATE("getHeaders"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _headers; +} + +std::string CCafMessageHeaders::getPayloadType() const { + CAF_CM_FUNCNAME_VALIDATE("getPayloadType"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return getRequiredStr("payloadType"); +} + +std::string CCafMessageHeaders::getPayloadTypeOpt( + const std::string& defaultVal) const { + CAF_CM_FUNCNAME_VALIDATE("getPayloadTypeOpt"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + std::string rcStr = getOptionalStr("payloadType"); + if (rcStr.empty()) { + rcStr = defaultVal; + } + + return rcStr; +} + +std::string CCafMessageHeaders::getVersion() const { + CAF_CM_FUNCNAME_VALIDATE("getVersion"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return getRequiredStr("version"); +} + +std::string CCafMessageHeaders::getVersionOpt( + const std::string& defaultVal) const { + CAF_CM_FUNCNAME_VALIDATE("getVersionOpt"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + std::string rcStr = getOptionalStr("version"); + if (rcStr.empty()) { + rcStr = defaultVal; + } + + return rcStr; +} + +UUID CCafMessageHeaders::getClientId() const { + CAF_CM_FUNCNAME_VALIDATE("getClientId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + UUID rc; + const std::string rcStr = getClientIdStr(); + BasePlatform::UuidFromString(rcStr.c_str(), rc); + return rc; +} + +std::string CCafMessageHeaders::getClientIdStr() const { + CAF_CM_FUNCNAME_VALIDATE("getClientIdStr"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return getRequiredStr("clientId"); +} + +UUID CCafMessageHeaders::getClientIdOpt( + const UUID defaultVal) const { + CAF_CM_FUNCNAME_VALIDATE("getClientIdOpt"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + UUID rc = defaultVal; + const std::string rcStr = getClientIdStrOpt(); + if (! rcStr.empty()) { + BasePlatform::UuidFromString(rcStr.c_str(), rc); + } + + return rc; +} + +std::string CCafMessageHeaders::getClientIdStrOpt( + const std::string& defaultVal) const { + CAF_CM_FUNCNAME_VALIDATE("getClientIdStrOpt"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + std::string rcStr = getOptionalStr("clientId"); + if (rcStr.empty()) { + rcStr = defaultVal; + } + + return rcStr; +} + +UUID CCafMessageHeaders::getRequestId() const { + CAF_CM_FUNCNAME_VALIDATE("getRequestId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + UUID rc; + const std::string rcStr = getRequestIdStr(); + BasePlatform::UuidFromString(rcStr.c_str(), rc); + return rc; +} + +std::string CCafMessageHeaders::getRequestIdStr() const { + CAF_CM_FUNCNAME_VALIDATE("getRequestIdStr"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return getRequiredStr("requestId"); +} + +UUID CCafMessageHeaders::getRequestIdOpt( + const UUID defaultVal) const { + CAF_CM_FUNCNAME_VALIDATE("getRequestIdOpt"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + UUID rc = defaultVal; + const std::string rcStr = getRequestIdStrOpt(); + if (! rcStr.empty()) { + BasePlatform::UuidFromString(rcStr.c_str(), rc); + } + + return rc; +} + +std::string CCafMessageHeaders::getRequestIdStrOpt( + const std::string& defaultVal) const { + CAF_CM_FUNCNAME_VALIDATE("getRequestIdStrOpt"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + std::string rcStr = getOptionalStr("requestId"); + if (rcStr.empty()) { + rcStr = defaultVal; + } + + return rcStr; +} + +std::string CCafMessageHeaders::getPmeId() const { + CAF_CM_FUNCNAME_VALIDATE("getPmeId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return getRequiredStr("pmeId"); +} + +std::string CCafMessageHeaders::getPmeIdOpt( + const std::string& defaultVal) const { + CAF_CM_FUNCNAME_VALIDATE("getPmeIdOpt"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + std::string rcStr = getOptionalStr("pmeId"); + if (rcStr.empty()) { + rcStr = defaultVal; + } + + return rcStr; +} + +UUID CCafMessageHeaders::getSessionId() const { + CAF_CM_FUNCNAME_VALIDATE("getSessionId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + UUID rc; + const std::string rcStr = getSessionIdStr(); + BasePlatform::UuidFromString(rcStr.c_str(), rc); + return rc; +} + +std::string CCafMessageHeaders::getSessionIdStr() const { + CAF_CM_FUNCNAME_VALIDATE("getSessionIdStr"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return getRequiredStr("sessionId"); +} + +UUID CCafMessageHeaders::getSessionIdOpt( + const UUID defaultVal) const { + CAF_CM_FUNCNAME_VALIDATE("getSessionIdOpt"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + UUID rc = defaultVal; + const std::string rcStr = getSessionIdStrOpt(); + if (! rcStr.empty()) { + BasePlatform::UuidFromString(rcStr.c_str(), rc); + } + + return rc; +} + +std::string CCafMessageHeaders::getSessionIdStrOpt( + const std::string& defaultVal) const { + CAF_CM_FUNCNAME_VALIDATE("getSessionIdStrOpt"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + std::string rcStr = getOptionalStr("sessionId"); + if (rcStr.empty()) { + rcStr = defaultVal; + } + + return rcStr; +} + +std::string CCafMessageHeaders::getRelDirectory() const { + CAF_CM_FUNCNAME_VALIDATE("getRelDirectory"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return getRequiredStr("relDirectory"); +} + +std::string CCafMessageHeaders::getRelDirectoryOpt( + const std::string& defaultVal) const { + CAF_CM_FUNCNAME_VALIDATE("getRelDirectoryOpt"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + std::string rcStr = getOptionalStr("relDirectory"); + if (rcStr.empty()) { + rcStr = defaultVal; + } + + return rcStr; +} + +std::string CCafMessageHeaders::getRelFilename() const { + CAF_CM_FUNCNAME_VALIDATE("getRelFilename"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return getRequiredStr(FileHeaders::_sFILENAME); +} + +std::string CCafMessageHeaders::getRelFilenameOpt( + const std::string& defaultVal) const { + CAF_CM_FUNCNAME_VALIDATE("getRelFilenameOpt"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + std::string rcStr = getOptionalStr(FileHeaders::_sFILENAME); + if (rcStr.empty()) { + rcStr = defaultVal; + } + + return rcStr; +} + +std::string CCafMessageHeaders::getProviderUri() const { + CAF_CM_FUNCNAME_VALIDATE("getProviderUri"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return getRequiredStr("providerUri"); +} + +std::string CCafMessageHeaders::getProviderUriOpt( + const std::string& defaultVal) const { + CAF_CM_FUNCNAME_VALIDATE("getProviderUriOpt"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + std::string rcStr = getOptionalStr("providerUri"); + if (rcStr.empty()) { + rcStr = defaultVal; + } + + return rcStr; +} + +std::string CCafMessageHeaders::getFlowDirection() const { + CAF_CM_FUNCNAME_VALIDATE("getFlowDirection"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return getRequiredStr("cafcomm.internal.msgflow"); +} + +std::string CCafMessageHeaders::getFlowDirectionOpt( + const std::string& defaultVal) const { + CAF_CM_FUNCNAME_VALIDATE("getFlowDirectionOpt"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + std::string rcStr = getOptionalStr("cafcomm.internal.msgflow"); + if (rcStr.empty()) { + rcStr = defaultVal; + } + + return rcStr; +} + +std::string CCafMessageHeaders::getRequiredStr( + const std::string& key) const { + CAF_CM_FUNCNAME_VALIDATE("getRequiredStr"); + CAF_CM_VALIDATE_STRING(key); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return findRequiredHeader(key)->toString(); +} + +std::string CCafMessageHeaders::getOptionalStr( + const std::string& key, + const std::string& defaultVal) const { + CAF_CM_FUNCNAME_VALIDATE("getOptionalStr"); + CAF_CM_VALIDATE_STRING(key); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + std::string rcStr = defaultVal; + const SmartPtrIVariant valueVar = findOptionalHeader(key); + if (! valueVar.IsNull()) { + rcStr = valueVar->toString(); + } + + return rcStr; +} + +bool CCafMessageHeaders::getRequiredBool( + const std::string& key) const { + CAF_CM_FUNCNAME_VALIDATE("getRequiredBool"); + CAF_CM_VALIDATE_STRING(key); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const SmartPtrIVariant valueVar = findRequiredHeader(key); + CAF_CM_VALIDATE_BOOL(valueVar->isBool()); + + const std::string valueStr = valueVar->toString(); + CAF_CM_LOG_DEBUG_VA2("key: %s, value: %s", key.c_str(), valueStr.c_str()); + + return (valueStr.compare("true") == 0); +} + +bool CCafMessageHeaders::getOptionalBool( + const std::string& key, + const bool defaultVal) const { + CAF_CM_FUNCNAME_VALIDATE("getOptionalBool"); + CAF_CM_VALIDATE_STRING(key); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const SmartPtrIVariant valueVar = findOptionalHeader(key); + + bool rc = defaultVal; + if (! valueVar.IsNull()) { + CAF_CM_VALIDATE_BOOL(valueVar->isBool()); + + const std::string valueStr = valueVar->toString(); + CAF_CM_LOG_DEBUG_VA2("key: %s, value: %s", key.c_str(), valueStr.c_str()); + + rc = (valueStr.compare("true") == 0); + } + + return rc; +} + +SmartPtrIVariant CCafMessageHeaders::findOptionalHeader( + const std::string& key) const { + CAF_CM_FUNCNAME_VALIDATE("findOptionalHeader"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(key); + + SmartPtrIVariant value; + + IIntMessage::CHeaders::const_iterator headerIter = _headers->find(key); + if (headerIter != _headers->end()) { + value = headerIter->second.first; + } + + return value; +} + +SmartPtrIVariant CCafMessageHeaders::findRequiredHeader( + const std::string& key) const { + CAF_CM_FUNCNAME("findRequiredHeader"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(key); + + IIntMessage::CHeaders::const_iterator headerIter = _headers->find(key); + if (headerIter == _headers->end()) { + CAF_CM_EXCEPTIONEX_VA1(NoSuchElementException, ERROR_NOT_FOUND, + "Key not found in headers - %s", key.c_str()); + } + + return headerIter->second.first; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessageHeaders.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessageHeaders.h new file mode 100644 index 000000000..37be4dcd8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessageHeaders.h @@ -0,0 +1,135 @@ +/* + * Author: bwilliams + * Created: Jul 2009 + * + * Copyright (c) 2009-2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CCafMessageHeaders_h_ +#define CCafMessageHeaders_h_ + +namespace Caf { + +CAF_DECLARE_CLASS_AND_SMART_POINTER(CCafMessageHeaders); + +class INTEGRATIONCAF_LINKAGE CCafMessageHeaders { +public: + static SmartPtrCCafMessageHeaders create( + const IIntMessage::SmartPtrCHeaders& headers); + +public: + CCafMessageHeaders(); + virtual ~CCafMessageHeaders(); + +public: + IIntMessage::SmartPtrCHeaders getHeaders() const; + +public: + std::string getPayloadType() const; + + std::string getPayloadTypeOpt( + const std::string& defaultVal = std::string()) const; + +public: + std::string getVersion() const; + + std::string getVersionOpt( + const std::string& defaultVal = "1.0") const; + +public: + UUID getClientId() const; + std::string getClientIdStr() const; + + UUID getClientIdOpt( + const UUID defaultVal = CAFCOMMON_GUID_NULL) const; + std::string getClientIdStrOpt( + const std::string& defaultVal = std::string()) const; + +public: + UUID getRequestId() const; + std::string getRequestIdStr() const; + + UUID getRequestIdOpt( + const UUID defaultVal = CAFCOMMON_GUID_NULL) const; + std::string getRequestIdStrOpt( + const std::string& defaultVal = std::string()) const; + +public: + std::string getPmeId() const; + + std::string getPmeIdOpt( + const std::string& defaultVal = std::string()) const; + +public: + UUID getSessionId() const; + std::string getSessionIdStr() const; + + UUID getSessionIdOpt( + const UUID defaultVal = CAFCOMMON_GUID_NULL) const; + std::string getSessionIdStrOpt( + const std::string& defaultVal = std::string()) const; + +public: + std::string getRelDirectory() const; + + std::string getRelDirectoryOpt( + const std::string& defaultVal = std::string()) const; + +public: + std::string getRelFilename() const; + + std::string getRelFilenameOpt( + const std::string& defaultVal) const; + +public: + std::string getProviderUri() const; + + std::string getProviderUriOpt( + const std::string& defaultVal) const; + +public: + std::string getFlowDirection() const; + + std::string getFlowDirectionOpt( + const std::string& defaultVal) const; + +public: + std::string getRequiredStr( + const std::string& key) const; + + std::string getOptionalStr( + const std::string& key, + const std::string& defaultVal = std::string()) const; + + bool getRequiredBool( + const std::string& key) const; + + bool getOptionalBool( + const std::string& key, + const bool defaultVal = false) const; + +private: + void initialize( + const IIntMessage::SmartPtrCHeaders& headers); + +private: + SmartPtrIVariant findOptionalHeader( + const std::string& key) const; + + SmartPtrIVariant findRequiredHeader( + const std::string& key) const; + +private: + bool _isInitialized; + IIntMessage::SmartPtrCHeaders _headers; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CCafMessageHeaders); +}; + +} + +#endif // #ifndef CCafMessageHeaders_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessageHeadersWriter.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessageHeadersWriter.cpp new file mode 100644 index 000000000..fe026625f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessageHeadersWriter.cpp @@ -0,0 +1,220 @@ +/* + * Author: bwilliams + * Created: Jul 2009 + * + * Copyright (c) 2009-2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CCafMessageHeadersWriter.h" + +using namespace Caf; + +SmartPtrCCafMessageHeadersWriter CCafMessageHeadersWriter::create() { + SmartPtrCCafMessageHeadersWriter rc; + rc.CreateInstance(); + rc->initialize(); + + return rc; +} + +CCafMessageHeadersWriter::CCafMessageHeadersWriter(void) : + _isInitialized(false), + CAF_CM_INIT("CCafMessageHeadersWriter") { +} + +CCafMessageHeadersWriter::~CCafMessageHeadersWriter(void) { +} + +void CCafMessageHeadersWriter::initialize() { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _headers.CreateInstance(); + _isInitialized = true; +} + +IIntMessage::SmartPtrCHeaders CCafMessageHeadersWriter::getHeaders() const { + CAF_CM_FUNCNAME_VALIDATE("getHeaders"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _headers; +} + +void CCafMessageHeadersWriter::setPayloadType( + const std::string& payloadType) { + CAF_CM_FUNCNAME_VALIDATE("setPayloadType"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(payloadType); + + insertString("payloadType", payloadType); +} + +void CCafMessageHeadersWriter::setVersion( + const std::string& version) { + CAF_CM_FUNCNAME_VALIDATE("setVersion"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(version); + + insertString("version", version); +} + +void CCafMessageHeadersWriter::setPayloadVersion( + const std::string& payloadVersion) { + CAF_CM_FUNCNAME_VALIDATE("setPayloadVersion"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(payloadVersion); + + insertString("payloadVersion", payloadVersion); +} + +void CCafMessageHeadersWriter::setClientId( + const UUID& clientId) { + CAF_CM_FUNCNAME_VALIDATE("setClientId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + std::string clientIdStr = BasePlatform::UuidToString(clientId); + insertString("clientId", clientIdStr); +} + +void CCafMessageHeadersWriter::setClientId( + const std::string& clientIdStr) { + CAF_CM_FUNCNAME_VALIDATE("setClientId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(clientIdStr); + + insertString("clientId", clientIdStr); +} + +void CCafMessageHeadersWriter::setRequestId( + const UUID& requestId) { + CAF_CM_FUNCNAME_VALIDATE("setRequestId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + std::string requestIdStr = BasePlatform::UuidToString(requestId); + insertString("requestId", requestIdStr); +} + +void CCafMessageHeadersWriter::setRequestId( + const std::string& requestIdStr) { + CAF_CM_FUNCNAME_VALIDATE("setRequestId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(requestIdStr); + + insertString("requestId", requestIdStr); +} + +void CCafMessageHeadersWriter::setPmeId( + const std::string& pmeId) { + CAF_CM_FUNCNAME_VALIDATE("setPmeId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(pmeId); + + insertString("pmeId", pmeId); +} + +void CCafMessageHeadersWriter::setSessionId( + const UUID& sessionId) { + CAF_CM_FUNCNAME_VALIDATE("setSessionId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + std::string sessionIdStr = BasePlatform::UuidToString(sessionId); + insertString("sessionId", sessionIdStr); +} + +void CCafMessageHeadersWriter::setSessionId( + const std::string& sessionIdStr) { + CAF_CM_FUNCNAME_VALIDATE("setSessionId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(sessionIdStr); + + insertString("sessionId", sessionIdStr); +} + +void CCafMessageHeadersWriter::setRelDirectory( + const std::string& relDirectory) { + CAF_CM_FUNCNAME_VALIDATE("setRelDirectory"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(relDirectory); + + insertString("relDirectory", relDirectory); +} + +void CCafMessageHeadersWriter::setRelFilename( + const std::string& relFilename) { + CAF_CM_FUNCNAME_VALIDATE("setRelFilename"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(relFilename); + + insertString(FileHeaders::_sFILENAME, relFilename); +} + +void CCafMessageHeadersWriter::setProviderUri( + const std::string& providerUri) { + CAF_CM_FUNCNAME_VALIDATE("setProviderUri"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(providerUri); + + insertString("providerUri", providerUri); +} + +void CCafMessageHeadersWriter::setIsThrowable( + const bool& isThrowable) { + CAF_CM_FUNCNAME_VALIDATE("setIsThrowable"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + insertBool(MessageHeaders::_sIS_THROWABLE, isThrowable); +} + +void CCafMessageHeadersWriter::setIsMultiPart( + const bool& isMultiPart) { + CAF_CM_FUNCNAME_VALIDATE("setIsMultiPart"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + insertBool(MessageHeaders::_sMULTIPART, isMultiPart); +} + +void CCafMessageHeadersWriter::setProtocol( + const std::string& protocol) { + CAF_CM_FUNCNAME_VALIDATE("setProtocol"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(protocol); + + insertString(MessageHeaders::_sPROTOCOL_TYPE, protocol); +} + +void CCafMessageHeadersWriter::setProtocolAddress( + const std::string& protocolAddress) { + CAF_CM_FUNCNAME_VALIDATE("setProtocolAddress"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(protocolAddress); + + insertString(MessageHeaders::_sPROTOCOL_CONNSTR, protocolAddress); +} + +void CCafMessageHeadersWriter::setFlowDirection( + const std::string& flowDirection) { + CAF_CM_FUNCNAME_VALIDATE("setFlowDirection"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(flowDirection); + + insertString("cafcomm.internal.msgflow", flowDirection); +} + +void CCafMessageHeadersWriter::insertString( + const std::string& key, + const std::string& value) { + CAF_CM_FUNCNAME_VALIDATE("insertString"); + CAF_CM_VALIDATE_STRING(key); + CAF_CM_VALIDATE_STRING(value); + _headers->insert(std::make_pair(key, std::make_pair(CVariant::createString(value), SmartPtrICafObject()))); +} + +void CCafMessageHeadersWriter::insertBool( + const std::string& key, + const bool& value) { + CAF_CM_FUNCNAME_VALIDATE("insertBool"); + CAF_CM_VALIDATE_STRING(key); + _headers->insert(std::make_pair(key, std::make_pair(CVariant::createBool(value), SmartPtrICafObject()))); +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessageHeadersWriter.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessageHeadersWriter.h new file mode 100644 index 000000000..7fec99951 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessageHeadersWriter.h @@ -0,0 +1,87 @@ +/* + * Author: bwilliams + * Created: Jul 2009 + * + * Copyright (c) 2009-2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CCafMessageHeadersWriter_h_ +#define CCafMessageHeadersWriter_h_ + +namespace Caf { + +CAF_DECLARE_CLASS_AND_SMART_POINTER(CCafMessageHeadersWriter); + +class INTEGRATIONCAF_LINKAGE CCafMessageHeadersWriter { +public: + static SmartPtrCCafMessageHeadersWriter create(); + +public: + CCafMessageHeadersWriter(); + virtual ~CCafMessageHeadersWriter(); + +public: + IIntMessage::SmartPtrCHeaders getHeaders() const; + +public: + void setPayloadType(const std::string& payloadType); + + void setVersion(const std::string& version); + + void setPayloadVersion(const std::string& payloadVersion); + + void setClientId(const UUID& clientId); + + void setClientId(const std::string& clientIdStr); + + void setRequestId(const UUID& requestId); + + void setRequestId(const std::string& requestIdStr); + + void setPmeId(const std::string& pmeId); + + void setSessionId(const UUID& sessionId); + + void setSessionId(const std::string& sessionId); + + void setRelDirectory(const std::string& relDirectory); + + void setRelFilename(const std::string& relFilename); + + void setProviderUri(const std::string& providerUri); + + void setIsThrowable(const bool& isThrowable); + + void setIsMultiPart(const bool& isMultiPart); + + void setProtocol(const std::string& protocol); + + void setProtocolAddress(const std::string& protocolAddress); + + void setFlowDirection(const std::string& flowDirection); + +public: + void insertString( + const std::string& key, + const std::string& value); + + void insertBool( + const std::string& key, + const bool& value); + +private: + void initialize(); + +private: + bool _isInitialized; + IIntMessage::SmartPtrCHeaders _headers; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CCafMessageHeadersWriter); +}; + +} + +#endif // #ifndef CCafMessageHeadersWriter_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessagePayload.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessagePayload.cpp new file mode 100644 index 000000000..623d0e50e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessagePayload.cpp @@ -0,0 +1,190 @@ +/* + * Author: bwilliams + * Created: Jul 2009 + * + * Copyright (c) 2009-2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CCafMessagePayload.h" + +#include + +using namespace Caf; + +SmartPtrCCafMessagePayload CCafMessagePayload::create( + const SmartPtrCDynamicByteArray& payload, + const std::string& payloadType) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessagePayload", "create"); + CAF_CM_VALIDATE_SMARTPTR(payload); + + SmartPtrCCafMessagePayload rc; + rc.CreateInstance(); + rc->initialize(payload, payloadType); + + return rc; +} + +SmartPtrCCafMessagePayload CCafMessagePayload::createFromFile( + const std::string& payloadFile, + const std::string& payloadType) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessagePayload", "createFromFile"); + CAF_CM_VALIDATE_STRING(payloadFile); + + const SmartPtrCDynamicByteArray payload = + FileSystemUtils::loadByteFile(payloadFile); + + return create(payload, payloadType); +} + +SmartPtrCCafMessagePayload CCafMessagePayload::createFromStr( + const std::string& payloadStr, + const std::string& payloadType) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessagePayload", "createFromStr"); + CAF_CM_VALIDATE_STRING(payloadStr); + + SmartPtrCDynamicByteArray payload = createBufferFromStr(payloadStr); + + SmartPtrCCafMessagePayload rc; + rc.CreateInstance(); + rc->initialize(payload, payloadType); + + return rc; +} + +SmartPtrCDynamicByteArray CCafMessagePayload::createBufferFromStr( + const std::string& payloadStr) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessagePayload", "createBufferFromStr"); + CAF_CM_VALIDATE_STRING(payloadStr); + + SmartPtrCDynamicByteArray rc; + rc.CreateInstance(); + rc->allocateBytes(static_cast(payloadStr.length())); + rc->memCpy(payloadStr.c_str(), static_cast(payloadStr.length())); + + return rc; +} + +SmartPtrCDynamicByteArray CCafMessagePayload::createBufferFromFile( + const std::string& payloadFile) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessagePayload", "createBufferFromFile"); + CAF_CM_VALIDATE_STRING(payloadFile); + + return FileSystemUtils::loadByteFile(payloadFile); +} + +void CCafMessagePayload::saveToFile( + const SmartPtrCDynamicByteArray& payload, + const std::string& payloadPath) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessagePayload", "saveToFile"); + CAF_CM_VALIDATE_SMARTPTR(payload); + CAF_CM_VALIDATE_STRING(payloadPath); + + FileSystemUtils::saveByteFile(payloadPath, + payload->getPtr(), payload->getByteCount()); +} + +std::string CCafMessagePayload::saveToStr( + const SmartPtrCDynamicByteArray& payload) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessagePayload", "saveToStr"); + CAF_CM_VALIDATE_SMARTPTR(payload); + + return reinterpret_cast(payload->getPtr()); +} + +CCafMessagePayload::CCafMessagePayload(void) : + _isInitialized(false), + CAF_CM_INIT("CCafMessagePayload") { +} + +CCafMessagePayload::~CCafMessagePayload(void) { +} + +void CCafMessagePayload::initialize( + const SmartPtrCDynamicByteArray& payload, + const std::string& payloadType, + const std::string& encoding) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(payload); + CAF_CM_VALIDATE_STRING(encoding); + CAF_CM_VALIDATE_BOOL(encoding.compare("xml") == 0); + + _payload = payload; + _encoding = encoding; + _payloadStr = saveToStr(payload); + _payloadXml = CXmlUtils::parseString(_payloadStr, payloadType); + + _isInitialized = true; +} + +std::string CCafMessagePayload::getPayloadStr() const { + CAF_CM_FUNCNAME_VALIDATE("getPayloadStr"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _payloadStr; +} + +SmartPtrCDynamicByteArray CCafMessagePayload::getPayload() const { + CAF_CM_FUNCNAME_VALIDATE("getPayload"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _payload; +} + +std::string CCafMessagePayload::getVersion() const { + CAF_CM_FUNCNAME_VALIDATE("getVersion"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + SmartPtrCXmlElement headerXml = _payloadXml->findOptionalChild("requestHeader"); + if (headerXml.IsNull()) { + headerXml = _payloadXml->findOptionalChild("responseHeader"); + } + + std::string rc; + if (headerXml.IsNull()) { + rc = _payloadXml->findRequiredAttribute("version"); + } else { + rc = headerXml->findRequiredAttribute("version"); + } + + return rc; +} + +SmartPtrCRequestHeaderDoc CCafMessagePayload::getRequestHeader() const { + CAF_CM_FUNCNAME_VALIDATE("getRequestHeader"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const SmartPtrCXmlElement requestHeaderXml = + _payloadXml->findRequiredChild("requestHeader"); + return RequestHeaderXml::parse(requestHeaderXml); +} + +SmartPtrCManifestDoc CCafMessagePayload::getManifest() const { + CAF_CM_FUNCNAME_VALIDATE("getManifest"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const SmartPtrCXmlElement manifestXml = + _payloadXml->findRequiredChild("manifest"); + + return ManifestXml::parse(manifestXml); +} + +std::deque CCafMessagePayload::getEventKeyCollection() const { + CAF_CM_FUNCNAME_VALIDATE("getEventKeyCollection"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + std::deque rc; + + SmartPtrCXmlElement eventKeyCollectionXml = + _payloadXml->findOptionalChild("eventKeyCollection"); + if (eventKeyCollectionXml) { + const SmartPtrCEventKeyCollectionDoc eventKeyCollection = + EventKeyCollectionXml::parse(eventKeyCollectionXml); + + rc = eventKeyCollection->getEventKey(); + } + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessagePayload.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessagePayload.h new file mode 100644 index 000000000..8b73ae38f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessagePayload.h @@ -0,0 +1,87 @@ +/* + * Author: bwilliams + * Created: Jul 2009 + * + * Copyright (c) 2009-2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CCafMessagePayload_h_ +#define CCafMessagePayload_h_ + +#include + +namespace Caf { + +CAF_DECLARE_CLASS_AND_SMART_POINTER(CCafMessagePayload); + +class INTEGRATIONCAF_LINKAGE CCafMessagePayload { +public: + static SmartPtrCCafMessagePayload create( + const SmartPtrCDynamicByteArray& payload, + const std::string& payloadType = std::string()); + + static SmartPtrCCafMessagePayload createFromFile( + const std::string& payloadFile, + const std::string& payloadType = std::string()); + + static SmartPtrCCafMessagePayload createFromStr( + const std::string& payloadStr, + const std::string& payloadType = std::string()); + +public: + static SmartPtrCDynamicByteArray createBufferFromStr( + const std::string& payloadStr); + + static SmartPtrCDynamicByteArray createBufferFromFile( + const std::string& payloadFile); + +public: + static void saveToFile( + const SmartPtrCDynamicByteArray& payload, + const std::string& payloadPath); + + static std::string saveToStr( + const SmartPtrCDynamicByteArray& payload); + +public: + CCafMessagePayload(); + virtual ~CCafMessagePayload(); + +public: + std::string getPayloadStr() const; + + SmartPtrCDynamicByteArray getPayload() const; + +public: + std::string getVersion() const; + +public: + SmartPtrCRequestHeaderDoc getRequestHeader() const; + + SmartPtrCManifestDoc getManifest() const; + + std::deque getEventKeyCollection() const; + +private: + void initialize( + const SmartPtrCDynamicByteArray& payload, + const std::string& payloadType = std::string(), + const std::string& encoding = "xml"); + +private: + bool _isInitialized; + + std::string _encoding; + SmartPtrCDynamicByteArray _payload; + std::string _payloadStr; + SmartPtrCXmlElement _payloadXml; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CCafMessagePayload); +}; + +} + +#endif // #ifndef CCafMessagePayload_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessagePayloadParser.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessagePayloadParser.cpp new file mode 100644 index 000000000..7e626dd6a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessagePayloadParser.cpp @@ -0,0 +1,85 @@ +/* + * Author: bwilliams + * Created: Jul 2009 + * + * Copyright (c) 2009-2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CCafMessagePayloadParser.h" + +using namespace Caf; + +SmartPtrCPayloadEnvelopeDoc CCafMessagePayloadParser::getPayloadEnvelope( + const SmartPtrCDynamicByteArray& payload) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessagePayloadParser", "getPayloadEnvelope"); + CAF_CM_VALIDATE_SMARTPTR(payload); + + return PayloadEnvelopeXml::parse(bufferToXml(payload, "caf:payloadEnvelope")); +} + +SmartPtrCInstallProviderJobDoc CCafMessagePayloadParser::getInstallProviderJob( + const SmartPtrCDynamicByteArray& payload) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessagePayloadParser", "getInstallProviderJob"); + CAF_CM_VALIDATE_SMARTPTR(payload); + + return InstallProviderJobXml::parse(bufferToXml(payload, "caf:cafInstallProviderJob")); +} + +SmartPtrCUninstallProviderJobDoc CCafMessagePayloadParser::getUninstallProviderJob( + const SmartPtrCDynamicByteArray& payload) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessagePayloadParser", "getUninstallProviderJob"); + CAF_CM_VALIDATE_SMARTPTR(payload); + + return UninstallProviderJobXml::parse(bufferToXml(payload, "caf:cafUninstallProviderJob")); +} + +SmartPtrCProviderRequestDoc CCafMessagePayloadParser::getProviderRequest( + const SmartPtrCDynamicByteArray& payload) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessagePayloadParser", "getProviderRequest"); + CAF_CM_VALIDATE_SMARTPTR(payload); + + return XmlRoots::parseProviderRequestFromString(bufferToStr(payload)); +} + +SmartPtrCProviderRegDoc CCafMessagePayloadParser::getProviderReg( + const SmartPtrCDynamicByteArray& payload) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessagePayloadParser", "getProviderReg"); + CAF_CM_VALIDATE_SMARTPTR(payload); + + return XmlRoots::parseProviderRegFromString(bufferToStr(payload)); +} + +SmartPtrCInstallRequestDoc CCafMessagePayloadParser::getInstallRequest( + const SmartPtrCDynamicByteArray& payload) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessagePayloadParser", "getInstallRequest"); + CAF_CM_VALIDATE_SMARTPTR(payload); + + return XmlRoots::parseInstallRequestFromString(bufferToStr(payload)); +} + +SmartPtrCMgmtRequestDoc CCafMessagePayloadParser::getMgmtRequest( + const SmartPtrCDynamicByteArray& payload) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessagePayloadParser", "getMgmtRequest"); + CAF_CM_VALIDATE_SMARTPTR(payload); + + return XmlRoots::parseMgmtRequestFromString(bufferToStr(payload)); +} + +SmartPtrCXmlElement CCafMessagePayloadParser::bufferToXml( + const SmartPtrCDynamicByteArray& payload, + const std::string& payloadType) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessagePayloadParser", "bufferToXml"); + CAF_CM_VALIDATE_SMARTPTR(payload); + + return CXmlUtils::parseString(bufferToStr(payload), payloadType); +} + +std::string CCafMessagePayloadParser::bufferToStr( + const SmartPtrCDynamicByteArray& payload) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessagePayloadParser", "bufferToStr"); + CAF_CM_VALIDATE_SMARTPTR(payload); + + return reinterpret_cast(payload->getPtr()); +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessagePayloadParser.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessagePayloadParser.h new file mode 100644 index 000000000..6a0f5ae9d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessagePayloadParser.h @@ -0,0 +1,53 @@ +/* + * Author: bwilliams + * Created: Jul 2009 + * + * Copyright (c) 2009-2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CCafMessagePayloadParser_h_ +#define CCafMessagePayloadParser_h_ + +namespace Caf { + +CAF_DECLARE_CLASS_AND_SMART_POINTER(CCafMessagePayloadParser); + +class INTEGRATIONCAF_LINKAGE CCafMessagePayloadParser { +public: + static SmartPtrCPayloadEnvelopeDoc getPayloadEnvelope( + const SmartPtrCDynamicByteArray& payload); + + static SmartPtrCInstallProviderJobDoc getInstallProviderJob( + const SmartPtrCDynamicByteArray& payload); + + static SmartPtrCUninstallProviderJobDoc getUninstallProviderJob( + const SmartPtrCDynamicByteArray& payload); + + static SmartPtrCProviderRequestDoc getProviderRequest( + const SmartPtrCDynamicByteArray& payload); + + static SmartPtrCProviderRegDoc getProviderReg( + const SmartPtrCDynamicByteArray& payload); + + static SmartPtrCInstallRequestDoc getInstallRequest( + const SmartPtrCDynamicByteArray& payload); + + static SmartPtrCMgmtRequestDoc getMgmtRequest( + const SmartPtrCDynamicByteArray& payload); + +private: + static SmartPtrCXmlElement bufferToXml( + const SmartPtrCDynamicByteArray& payload, + const std::string& payloadType = std::string()); + + static std::string bufferToStr( + const SmartPtrCDynamicByteArray& payload); + +private: + CAF_CM_DECLARE_NOCREATE(CCafMessagePayloadParser); +}; + +} + +#endif // #ifndef CCafMessagePayloadParser_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/IntegrationCafLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/IntegrationCafLink.h new file mode 100644 index 000000000..b9521bf1c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/IntegrationCafLink.h @@ -0,0 +1,31 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef INTEGRATIONCAFLINK_H_ +#define INTEGRATIONCAFLINK_H_ + +#ifndef INTEGRATIONCAF_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define INTEGRATIONCAF_LINKAGE __declspec(dllexport) + #else + #define INTEGRATIONCAF_LINKAGE __declspec(dllimport) + #endif + #else + #define INTEGRATIONCAF_LINKAGE + #endif +#endif + +#include "CCafMessagePayload.h" +#include "CBeanPropertiesHelper.h" +#include "CCafMessageHeadersWriter.h" +#include "CCafMessageCreator.h" +#include "CCafMessageHeaders.h" +#include "CCafMessagePayloadParser.h" + +#endif /* INTEGRATIONCAFLINK_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/stdafx.h new file mode 100644 index 000000000..819347ff6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/stdafx.h @@ -0,0 +1,24 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define INTEGRATIONCAF_LINKAGE __declspec(dllexport) +#else + #define INTEGRATIONCAF_LINKAGE +#endif + +#include +#include +#include +#include +#include + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CAbstractMessageChannel.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CAbstractMessageChannel.cpp new file mode 100644 index 000000000..cd0460175 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CAbstractMessageChannel.cpp @@ -0,0 +1,66 @@ +/* + * Created on: Jan 26, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CAbstractMessageChannel.h" + +CAbstractMessageChannel::CAbstractMessageChannel() : + CAF_CM_INIT("CAbstractMessageChannel") { +} + +CAbstractMessageChannel::~CAbstractMessageChannel() { +} + +bool CAbstractMessageChannel::send( + const SmartPtrIIntMessage& message) { + return send(message, -1); +} + +bool CAbstractMessageChannel::send( + const SmartPtrIIntMessage& message, + const int32 timeout) { + CAF_CM_FUNCNAME_VALIDATE("send"); + CAF_CM_VALIDATE_INTERFACE(message); + + // Call all interceptors' preSend() + SmartPtrIIntMessage intMessage = message; + SmartPtrIMessageChannel channel(this); + for (TSmartIterator > interceptor(_interceptors); + interceptor; + interceptor++) { + intMessage = interceptor->preSend(intMessage, channel); + if (!intMessage) { + break; + } + } + + // If an interceptor returned NULL then we're done + bool sent = false; + if (intMessage) { + // Send the message through the subclass doSend() + sent = doSend(intMessage, timeout); + + // Call the interceptors' postSend() + for (TSmartIterator > interceptor(_interceptors); + interceptor; + interceptor++) { + interceptor->postSend(intMessage, channel, sent); + } + } + + return sent; +} + +void CAbstractMessageChannel::setInterceptors( + const IChannelInterceptorSupport::InterceptorCollection& interceptors) { + _interceptors = interceptors; +} + +std::list CAbstractMessageChannel::getInterceptors() const { + return _interceptors; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CAbstractMessageChannel.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CAbstractMessageChannel.h new file mode 100644 index 000000000..a10032441 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CAbstractMessageChannel.h @@ -0,0 +1,58 @@ +/* + * Created on: Jan 26, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CABSTRACTMESSAGECHANNEL_H_ +#define CABSTRACTMESSAGECHANNEL_H_ + +namespace Caf { +/** + * Base class for {@link IMessageChannel} implementations providing common + * properties and method implementations including {@link IChannelInterceptor interceptors}. + */ +class INTEGRATIONCORE_LINKAGE CAbstractMessageChannel : + public IMessageChannel, + public IChannelInterceptorSupport { +public: + CAbstractMessageChannel(); + virtual ~CAbstractMessageChannel(); + +public: // IMessageChannel + bool send( + const SmartPtrIIntMessage& message); + + bool send( + const SmartPtrIIntMessage& message, + const int32 timeout); + +public: // IChannelInterceptorSupport + void setInterceptors( + const IChannelInterceptorSupport::InterceptorCollection& interceptors); + +protected: + /** + * Subclasses must implement this method. A non-negative timeout indicates + * how int32 to wait if the channel is at capacity. If the value is 0 it must + * return immediately with or without success. A negative timeout value + * indicates that the method should block until either the message is accepted + * or the blocking thread is interrupted. + */ + virtual bool doSend( + const SmartPtrIIntMessage& message, + int32 timeout) = 0; + +protected: + std::list getInterceptors() const; + +private: + std::list _interceptors; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CAbstractMessageChannel); +}; +} + +#endif /* CABSTRACTMESSAGECHANNEL_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CAbstractMessageRouter.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CAbstractMessageRouter.cpp new file mode 100644 index 000000000..c994d347a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CAbstractMessageRouter.cpp @@ -0,0 +1,92 @@ +/* + * Created on: Aug 9, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CAbstractMessageRouter.h" + +using namespace Caf; + +CAbstractMessageRouter::CAbstractMessageRouter() : + _ignoreSendFailures(false), + _sendTimeout(-1), + _isInitialized(false), + CAF_CM_INIT_LOG("CAbstractMessageRouter") { +} + +CAbstractMessageRouter::~CAbstractMessageRouter() { +} + +void CAbstractMessageRouter::init() { + init(SmartPtrIMessageChannel(), false, -1); +} + +void CAbstractMessageRouter::init( + const SmartPtrIMessageChannel& defaultOutputChannel, + const bool ignoreSendFailures, + const int32 sendTimeout) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + // defaultOutputChannel may be NULL + + _defaultOutputChannel = defaultOutputChannel; + _ignoreSendFailures = ignoreSendFailures; + _sendTimeout = sendTimeout; + _isInitialized = true; +} + +void CAbstractMessageRouter::routeMessage(const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME("routeMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + bool isSent = false; + + ChannelCollection channels; + try { + channels = getTargetChannels(message); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + + for (TSmartConstIterator channelIter(channels); + channelIter; + channelIter++) { + try { + SmartPtrIMessageChannel channel(*channelIter); + CAF_CM_VALIDATE_INTERFACE(channel); + channel->send(message, _sendTimeout); + isSent = true; + } + CAF_CM_CATCH_ALL; + if (CAF_CM_ISEXCEPTION && _ignoreSendFailures) { + CAF_CM_LOG_DEBUG_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + } + CAF_CM_THROWEXCEPTION; + } + + if (!isSent) { + if (_defaultOutputChannel) { + _defaultOutputChannel->send(message, _sendTimeout); + } else { + if (channels.size()) { + CAF_CM_EXCEPTIONEX_VA0( + MessageDeliveryException, + 0, + "failed to send message to resolved channel(s) " + "and no default output channel defined"); + } else { + CAF_CM_EXCEPTIONEX_VA0( + MessageDeliveryException, + 0, + "no channel resolved by router and no default " + "output channel defined"); + } + } + } +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CAbstractMessageRouter.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CAbstractMessageRouter.h new file mode 100644 index 000000000..d4cb0e5e7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CAbstractMessageRouter.h @@ -0,0 +1,48 @@ +/* + * Created on: Aug 9, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CAbstractMessageRouter_h +#define CAbstractMessageRouter_h + +namespace Caf { + +class INTEGRATIONCORE_LINKAGE CAbstractMessageRouter : public IMessageRouter { +public: + CAbstractMessageRouter(); + virtual ~CAbstractMessageRouter(); + + void init(); + + void init( + const SmartPtrIMessageChannel& defaultOutputChannel, + const bool ignoreSendFailures, + const int32 sendTimeout); + + virtual void routeMessage( + const SmartPtrIIntMessage& message); + +protected: + typedef std::deque ChannelCollection; + virtual ChannelCollection getTargetChannels( + const SmartPtrIIntMessage& message) = 0; + +private: + SmartPtrIMessageChannel _defaultOutputChannel; + bool _ignoreSendFailures; + int32 _sendTimeout; + +private: + bool _isInitialized; + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CAbstractMessageRouter); +}; + +} + +#endif /* CAbstractMessageRouter_h */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CAbstractPollableChannel.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CAbstractPollableChannel.cpp new file mode 100644 index 000000000..41de333fd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CAbstractPollableChannel.cpp @@ -0,0 +1,83 @@ +/* + * Created on: Jan 26, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CAbstractPollableChannel.h" + +CAbstractPollableChannel::CAbstractPollableChannel() : + CAF_CM_INIT("CAbstractPollableChannel") { +} + +CAbstractPollableChannel::~CAbstractPollableChannel() { +} + +SmartPtrIIntMessage CAbstractPollableChannel::receive() { + return receive(-1); +} + +SmartPtrIIntMessage CAbstractPollableChannel::receive(const int32 timeout) { + SmartPtrIIntMessage message; + CAF_CM_ENTER { + std::list interceptors = getInterceptors(); + SmartPtrIMessageChannel channel(this); + bool preReceiveOk = true; + for (TSmartIterator > interceptor(interceptors); + interceptor && preReceiveOk; + interceptor++) { + preReceiveOk = interceptor->preReceive(channel); + } + + if (preReceiveOk) { + message = doReceive(timeout); + for (TSmartIterator > interceptor(interceptors); + interceptor && message; + interceptor++) { + message = interceptor->postReceive(message, channel); + } + } + } + CAF_CM_EXIT; + return message; +} + +SmartPtrCPollerMetadata CAbstractPollableChannel::getPollerMetadata() const { + CAF_CM_FUNCNAME_VALIDATE("getPollerMetadata"); + CAF_CM_VALIDATE_SMARTPTR(_pollerMetadata); + return _pollerMetadata; +} + +void CAbstractPollableChannel::setPollerMetadata(const SmartPtrCPollerMetadata& pollerMetadata) { + CAF_CM_FUNCNAME_VALIDATE("setPollerMetadata"); + CAF_CM_VALIDATE_SMARTPTR(pollerMetadata); + _pollerMetadata = pollerMetadata; +} + +void CAbstractPollableChannel::setPollerMetadata(const SmartPtrIDocument& pollerDoc) { + // pollerDoc is optional + + CAF_CM_ENTER { + _pollerMetadata.CreateInstance(); + _pollerMetadata->putFixedRate(1000); + _pollerMetadata->putMaxMessagesPerPoll(1); + + if (pollerDoc) { + const std::string maxMessagesPerPollStr = pollerDoc->findOptionalAttribute("max-messages-per-poll"); + if (!maxMessagesPerPollStr.empty()) { + const uint32 maxMessagesPerPoll = CStringConv::fromString(maxMessagesPerPollStr); + _pollerMetadata->putMaxMessagesPerPoll(maxMessagesPerPoll); + } + + const std::string fixedRateStr = pollerDoc->findOptionalAttribute("fixed-rate"); + if (!fixedRateStr.empty()) { + const uint32 fixedRate = CStringConv::fromString(fixedRateStr); + _pollerMetadata->putFixedRate(fixedRate); + } + } + } + CAF_CM_EXIT; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CAbstractPollableChannel.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CAbstractPollableChannel.h new file mode 100644 index 000000000..de848faeb --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CAbstractPollableChannel.h @@ -0,0 +1,52 @@ +/* + * Created on: Jan 26, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CABSTRACTPOLLABLECHANNEL_H_ +#define CABSTRACTPOLLABLECHANNEL_H_ + +#include "CAbstractMessageChannel.h" + +namespace Caf { + +/** + * Base class for pollable channels + */ +class INTEGRATIONCORE_LINKAGE CAbstractPollableChannel : + public CAbstractMessageChannel, + public IPollableChannel { +public: + CAbstractPollableChannel(); + virtual ~CAbstractPollableChannel(); + +public: + SmartPtrIIntMessage receive(); + SmartPtrIIntMessage receive(const int32 timeout); + SmartPtrCPollerMetadata getPollerMetadata() const; + +protected: + /** + * Subclasses must implement this method. A non-negative timeout indicates + * how int32 to wait if the channel is empty (if the value is 0, it must + * return immediately with or without success). A negative timeout value + * indicates that the method should block until either a message is + * available or the blocking thread is interrupted. + */ + virtual SmartPtrIIntMessage doReceive(const int32 timeout) = 0; + + void setPollerMetadata(const SmartPtrCPollerMetadata& pollerMetadata); + + void setPollerMetadata(const SmartPtrIDocument& pollerDoc); + +private: + SmartPtrCPollerMetadata _pollerMetadata; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CAbstractPollableChannel); +}; +} + +#endif /* CABSTRACTPOLLABLECHANNEL_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CBroadcastingDispatcher.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CBroadcastingDispatcher.cpp new file mode 100644 index 000000000..2a6d2d852 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CBroadcastingDispatcher.cpp @@ -0,0 +1,129 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CBroadcastingDispatcher.h" + +using namespace Caf; + +CBroadcastingDispatcher::CBroadcastingDispatcher() : + _isInitialized(false), + CAF_CM_INIT_LOG("CBroadcastingDispatcher") { +} + +CBroadcastingDispatcher::~CBroadcastingDispatcher() { +} + +void CBroadcastingDispatcher::initialize( + const SmartPtrIErrorHandler& errorHandler) { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(errorHandler); + + _errorHandler = errorHandler; + _messageHandlerCollection.CreateInstance(); + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +void CBroadcastingDispatcher::addHandler( + const SmartPtrIMessageHandler& messageHandler) { + CAF_CM_FUNCNAME_VALIDATE("addHandler"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(messageHandler); + + const void* handlerPtr = messageHandler.GetNonAddRefedInterface(); + _messageHandlerCollection->insert(std::make_pair(handlerPtr, messageHandler)); + +#ifdef __x86_64__ + CAF_CM_LOG_DEBUG_VA1("Added handler - %llX", handlerPtr); +#else + CAF_CM_LOG_DEBUG_VA1("Added handler - %X", handlerPtr); +#endif + } + CAF_CM_EXIT; +} + +void CBroadcastingDispatcher::removeHandler( + const SmartPtrIMessageHandler& messageHandler) { + CAF_CM_FUNCNAME_VALIDATE("removeHandler"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(messageHandler); + + const void* handlerPtr = messageHandler.GetNonAddRefedInterface(); + _messageHandlerCollection->erase(handlerPtr); + +#ifdef __x86_64__ + CAF_CM_LOG_DEBUG_VA1("Removed handler - %llX", handlerPtr); +#else + CAF_CM_LOG_DEBUG_VA1("Removed handler - %X", handlerPtr); +#endif + } + CAF_CM_EXIT; +} + +bool CBroadcastingDispatcher::dispatch( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME("dispatch"); + + bool isMessageHandled = false; + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + for (TSmartConstMapIterator messageHandlerIter(*_messageHandlerCollection); + messageHandlerIter; messageHandlerIter++) { + const SmartPtrIMessageHandler messageHandler = *messageHandlerIter; + +#ifdef __x86_64__ + CAF_CM_LOG_DEBUG_VA1("Dispatching to handler - %llX", messageHandlerIter.getKey()); +#else + CAF_CM_LOG_DEBUG_VA1("Dispatching to handler - %X", messageHandlerIter.getKey()); +#endif + + try { + messageHandler->handleMessage(message); + isMessageHandled = true; + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + + try { + if (CAF_CM_ISEXCEPTION) { + CAF_CM_VALIDATE_INTERFACE(messageHandler); + SmartPtrIIntMessage savedMessage = messageHandler->getSavedMessage(); + if (savedMessage.IsNull()) { + savedMessage = message; + } + + SmartPtrCIntException intException; + intException.CreateInstance(); + intException->initialize(CAF_CM_GETEXCEPTION); + _errorHandler->handleError(intException, savedMessage); + + CAF_CM_CLEAREXCEPTION; + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + } + } + CAF_CM_EXIT; + + return isMessageHandled; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CBroadcastingDispatcher.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CBroadcastingDispatcher.h new file mode 100644 index 000000000..25afd8d6a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CBroadcastingDispatcher.h @@ -0,0 +1,54 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CBroadcastingDispatcher_h_ +#define CBroadcastingDispatcher_h_ + +namespace Caf { + +/// Sends responses/errors back to the client. +class INTEGRATIONCORE_LINKAGE CBroadcastingDispatcher : + public IMessageDispatcher { +public: + CBroadcastingDispatcher(); + virtual ~CBroadcastingDispatcher(); + +public: + void initialize( + const SmartPtrIErrorHandler& errorHandler); + +public: // IMessageDispatcher + void addHandler( + const SmartPtrIMessageHandler& messageHandler); + + void removeHandler( + const SmartPtrIMessageHandler& messageHandler); + + bool dispatch( + const SmartPtrIIntMessage& message); + +private: + typedef std::map CIntMessageHandlerCollection; + CAF_DECLARE_SMART_POINTER(CIntMessageHandlerCollection); + +private: + bool _isInitialized; + SmartPtrIErrorHandler _errorHandler; + SmartPtrCIntMessageHandlerCollection _messageHandlerCollection; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CBroadcastingDispatcher); +}; + +CAF_DECLARE_SMART_POINTER(CBroadcastingDispatcher); + +} + +#endif // #ifndef CBroadcastingDispatcher_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CChannelInterceptorAdapter.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CChannelInterceptorAdapter.cpp new file mode 100644 index 000000000..7fae12eb2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CChannelInterceptorAdapter.cpp @@ -0,0 +1,39 @@ +/* + * Created on: Jan 25, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CChannelInterceptorAdapter.h" + +CChannelInterceptorAdapter::CChannelInterceptorAdapter() { +} + +CChannelInterceptorAdapter::~CChannelInterceptorAdapter() { +} + +SmartPtrIIntMessage& CChannelInterceptorAdapter::preSend( + SmartPtrIIntMessage& message, + SmartPtrIMessageChannel&) { + return message; +} + +void CChannelInterceptorAdapter::postSend( + SmartPtrIIntMessage&, + SmartPtrIMessageChannel&, + bool) { +} + +bool CChannelInterceptorAdapter::preReceive( + SmartPtrIMessageChannel&) { + return true; +} + +SmartPtrIIntMessage& CChannelInterceptorAdapter::postReceive( + SmartPtrIIntMessage& message, + SmartPtrIMessageChannel&) { + return message; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CChannelInterceptorAdapter.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CChannelInterceptorAdapter.h new file mode 100644 index 000000000..3b244755a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CChannelInterceptorAdapter.h @@ -0,0 +1,46 @@ +/* + * Created on: Jan 25, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CCHANNELINTERCEPTORADAPTER_H_ +#define CCHANNELINTERCEPTORADAPTER_H_ + +namespace Caf { + +/** + * A {@link IChannelInterceptor} with no-op method implementations so that + * subclasses do not have to implement all of th einterface's methods. + */ +class INTEGRATIONCORE_LINKAGE CChannelInterceptorAdapter : public IChannelInterceptor { +public: + CChannelInterceptorAdapter(); + virtual ~CChannelInterceptorAdapter(); + +public: // IChannelInterceptor + virtual SmartPtrIIntMessage& preSend( + SmartPtrIIntMessage& message, + SmartPtrIMessageChannel& channel); + + virtual void postSend( + SmartPtrIIntMessage& message, + SmartPtrIMessageChannel& channel, + bool sent); + + virtual bool preReceive( + SmartPtrIMessageChannel& channel); + + virtual SmartPtrIIntMessage& postReceive( + SmartPtrIIntMessage& message, + SmartPtrIMessageChannel& channel); + +private: + CAF_CM_DECLARE_NOCOPY(CChannelInterceptorAdapter); +}; + +} + +#endif /* CCHANNELINTERCEPTORADAPTER_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CChannelResolver.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CChannelResolver.cpp new file mode 100644 index 000000000..26b87d112 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CChannelResolver.cpp @@ -0,0 +1,83 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CChannelResolver.h" + +using namespace Caf; + +CChannelResolver::CChannelResolver() : + _isInitialized(false), + CAF_CM_INIT("CChannelResolver") { +} + +CChannelResolver::~CChannelResolver() { +} + +void CChannelResolver::initialize( + const SmartPtrCIntegrationObjectCollection& integrationObjectCollection) { + CAF_CM_FUNCNAME("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTSTL_NOTEMPTY(integrationObjectCollection); + + _integrationObjectCollection = integrationObjectCollection; + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +SmartPtrIMessageChannel CChannelResolver::resolveChannelName( + const std::string& channelName) const { + CAF_CM_FUNCNAME("resolveChannelName"); + + SmartPtrIMessageChannel messageChannel; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(channelName); + + const SmartPtrIIntegrationObject integrationObject = + resolveChannelNameToObject(channelName); + + messageChannel.QueryInterface(integrationObject, false); + if (messageChannel.IsNull()) { + CAF_CM_EXCEPTIONEX_VA1(NoSuchElementException, ERROR_NOT_FOUND, + "Integration object is not a message channel - %s", channelName.c_str()); + } + } + CAF_CM_EXIT; + + return messageChannel; +} + +SmartPtrIIntegrationObject CChannelResolver::resolveChannelNameToObject( + const std::string& channelName) const { + CAF_CM_FUNCNAME("resolveChannelNameToObject"); + + SmartPtrIIntegrationObject integrationObject; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(channelName); + + const CIntegrationObjectCollection::const_iterator integrationObjectCollectionIter = + _integrationObjectCollection->find(channelName); + if (integrationObjectCollectionIter == _integrationObjectCollection->end()) { + CAF_CM_EXCEPTIONEX_VA1(NoSuchElementException, ERROR_NOT_FOUND, + "Bean with given ID not found - %s", channelName.c_str()); + } + + integrationObject = integrationObjectCollectionIter->second; + } + CAF_CM_EXIT; + + return integrationObject; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CChannelResolver.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CChannelResolver.h new file mode 100644 index 000000000..9a8da53e6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CChannelResolver.h @@ -0,0 +1,44 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CChannelResolver_h_ +#define CChannelResolver_h_ + +namespace Caf { + +class INTEGRATIONCORE_LINKAGE CChannelResolver : + public IChannelResolver { +public: + CChannelResolver(); + virtual ~CChannelResolver(); + +public: + void initialize( + const SmartPtrCIntegrationObjectCollection& integrationObjectCollection); + +public: // IChannelResolver + SmartPtrIMessageChannel resolveChannelName( + const std::string& channelName) const; + + SmartPtrIIntegrationObject resolveChannelNameToObject( + const std::string& channelName) const; + +private: + bool _isInitialized; + SmartPtrCIntegrationObjectCollection _integrationObjectCollection; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CChannelResolver); +}; + +CAF_DECLARE_SMART_POINTER(CChannelResolver); + +} + +#endif // #ifndef CChannelResolver_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CDocument.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CDocument.cpp new file mode 100644 index 000000000..8088ff01a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CDocument.cpp @@ -0,0 +1,295 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CDocument.h" + +using namespace Caf; + +CDocument::CDocument() : + _isInitialized(false), + CAF_CM_INIT("CDocument") { +} + +CDocument::~CDocument() { +} + +void CDocument::initialize( + const SmartPtrCXmlElement& xmlElement) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(xmlElement); + + _xmlElement = xmlElement; + + // iterate over all attributes and resolve the attribute values + // for environment and appConfig value references + SmartPtrIAppConfig appConfig = getAppConfig(); + std::deque stack; + stack.push_back(_xmlElement); + while (stack.size()) { + SmartPtrCXmlElement element = stack.front(); + stack.pop_front(); + CXmlElement::SmartPtrCAttributeCollection attributes = element->getAllAttributes(); + for (TConstMapIterator attribute(*attributes); + attribute; + attribute++) { + element->setAttribute( + attribute.getKey(), + appConfig->resolveValue(*attribute)); + } + CXmlElement::SmartPtrCElementCollection children = element->getAllChildren(); + std::transform( + children->begin(), + children->end(), + std::insert_iterator >(stack, stack.end()), + select2nd()); + } + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +SmartPtrCXmlElement CDocument::getXmlElement() const { + CAF_CM_FUNCNAME_VALIDATE("getXmlElement"); + + SmartPtrCXmlElement rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _xmlElement; + } + CAF_CM_EXIT; + + return rc; +} + +std::string CDocument::findRequiredAttribute(const std::string& name) const { + CAF_CM_FUNCNAME_VALIDATE("findRequiredAttribute"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _xmlElement->findRequiredAttribute(name); + } + CAF_CM_EXIT; + + return rc; +} + +std::string CDocument::findOptionalAttribute(const std::string& name) const { + CAF_CM_FUNCNAME_VALIDATE("findOptionalAttribute"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _xmlElement->findOptionalAttribute(name); + } + CAF_CM_EXIT; + + return rc; +} + +SmartPtrIDocument CDocument::findRequiredChild(const std::string& name) const { + CAF_CM_FUNCNAME_VALIDATE("findRequiredChild"); + + SmartPtrIDocument rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + const SmartPtrCXmlElement child = _xmlElement->findRequiredChild(name); + + SmartPtrCDocument document; + document.CreateInstance(); + document->initialize(child); + + rc = document; + } + CAF_CM_EXIT; + + return rc; +} + +SmartPtrIDocument CDocument::findOptionalChild(const std::string& name) const { + CAF_CM_FUNCNAME_VALIDATE("findOptionalChild"); + + SmartPtrIDocument rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + const SmartPtrCXmlElement child = _xmlElement->findOptionalChild(name); + if (! child.IsNull()) { + SmartPtrCDocument document; + document.CreateInstance(); + document->initialize(child); + + rc = document; + } + } + CAF_CM_EXIT; + + return rc; +} + +IDocument::SmartPtrCAttributeCollection CDocument::getAllAttributes() const { + CAF_CM_FUNCNAME_VALIDATE("getAllAttributes"); + + IDocument::SmartPtrCAttributeCollection rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + rc.CreateInstance(); + + const CXmlElement::SmartPtrCAttributeCollection attributesXml = + _xmlElement->getAllAttributes(); + for (TConstIterator attributeXmlIter(*attributesXml); + attributeXmlIter; attributeXmlIter++) { + rc->insert(std::make_pair(attributeXmlIter->first, attributeXmlIter->second)); + } + } + CAF_CM_EXIT; + + return rc; +} + +IDocument::SmartPtrCChildCollection CDocument::getAllChildren() const { + CAF_CM_FUNCNAME_VALIDATE("getAllChildren"); + + IDocument::SmartPtrCChildCollection rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + rc.CreateInstance(); + + const CXmlElement::SmartPtrCElementCollection childrenXml = + _xmlElement->getAllChildren(); + for (TConstIterator childXmlIter(*childrenXml); + childXmlIter; childXmlIter++) { + SmartPtrCDocument document; + document.CreateInstance(); + document->initialize(childXmlIter->second); + + rc->insert(std::make_pair(childXmlIter->first, document)); + } + } + CAF_CM_EXIT; + + return rc; +} + +IDocument::SmartPtrCOrderedChildCollection CDocument::getAllChildrenInOrder() const { + CAF_CM_FUNCNAME_VALIDATE("getAllChildrenInOrder"); + + IDocument::SmartPtrCOrderedChildCollection rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + rc.CreateInstance(); + + const CXmlElement::SmartPtrCOrderedElementCollection childrenXml = + _xmlElement->getAllChildrenInOrder(); + for (TConstIterator childXmlIter(*childrenXml); + childXmlIter; childXmlIter++) { + SmartPtrCDocument document; + document.CreateInstance(); + document->initialize(*childXmlIter); + rc->push_back(document); + } + } + CAF_CM_EXIT; + + return rc; +} + +std::string CDocument::getName() const { + CAF_CM_FUNCNAME_VALIDATE("getName"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _xmlElement->getName(); + } + CAF_CM_EXIT; + + return rc; +} + +std::string CDocument::getValue() const { + CAF_CM_FUNCNAME_VALIDATE("getValue"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _xmlElement->getValue(); + } + CAF_CM_EXIT; + + return rc; +} + +std::string CDocument::getPath() const { + CAF_CM_FUNCNAME_VALIDATE("getPath"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _xmlElement->getPath(); + } + CAF_CM_EXIT; + + return rc; +} + +void CDocument::saveToFile(const std::string& filename) const { + CAF_CM_FUNCNAME_VALIDATE("saveToFile"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _xmlElement->saveToFile(filename); + } + CAF_CM_EXIT; +} + +std::string CDocument::saveToString() const { + CAF_CM_FUNCNAME_VALIDATE("saveToString"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _xmlElement->saveToString(); + } + CAF_CM_EXIT; + + return rc; +} + +std::string CDocument::saveToStringRaw() const { + CAF_CM_FUNCNAME_VALIDATE("saveToStringRaw"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _xmlElement->saveToStringRaw(); + } + CAF_CM_EXIT; + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CDocument.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CDocument.h new file mode 100644 index 000000000..40eddee68 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CDocument.h @@ -0,0 +1,53 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CDocument_h_ +#define CDocument_h_ + +namespace Caf { + +class INTEGRATIONCORE_LINKAGE CDocument : + public IDocument { +public: + CDocument(); + virtual ~CDocument(); + +public: + void initialize(const SmartPtrCXmlElement& xmlElement); + SmartPtrCXmlElement getXmlElement() const; + +public: // IDocument + std::string findRequiredAttribute(const std::string& name) const; + std::string findOptionalAttribute(const std::string& name) const; + SmartPtrIDocument findRequiredChild(const std::string& name) const; + SmartPtrIDocument findOptionalChild(const std::string& name) const; + SmartPtrCAttributeCollection getAllAttributes() const; + SmartPtrCChildCollection getAllChildren() const; + SmartPtrCOrderedChildCollection getAllChildrenInOrder() const; + std::string getName() const; + std::string getValue() const; + std::string getPath() const; + +public: // IDocument Save operations + void saveToFile(const std::string& filename) const; + std::string saveToString() const; + std::string saveToStringRaw() const; + +private: + bool _isInitialized; + SmartPtrCXmlElement _xmlElement; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CDocument); +}; + +CAF_DECLARE_SMART_POINTER(CDocument); +} + +#endif // #ifndef CDocument_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CErrorHandler.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CErrorHandler.cpp new file mode 100644 index 000000000..1db6a928b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CErrorHandler.cpp @@ -0,0 +1,89 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "MessageHeaders.h" +#include "CErrorHandler.h" + +using namespace Caf; + +CErrorHandler::CErrorHandler() : + _isInitialized(false), + CAF_CM_INIT_LOG("CErrorHandler") { +} + +CErrorHandler::~CErrorHandler() { +} + +void CErrorHandler::initialize( + const SmartPtrIChannelResolver& channelResolver, + const SmartPtrIMessageChannel& errorMessageChannel) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + CAF_CM_VALIDATE_INTERFACE(errorMessageChannel); + + _channelResolver = channelResolver; + _errorMessageChannel = errorMessageChannel; + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +void CErrorHandler::handleError( + const SmartPtrIThrowable& throwable, + const SmartPtrIIntMessage& message) const { + CAF_CM_FUNCNAME_VALIDATE("handleError"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(throwable); + // message is optional + + bool isThrowable = false; + if (! message.IsNull()) { + const std::string isThrowableStr = + message->findOptionalHeaderAsString(MessageHeaders::_sIS_THROWABLE); + isThrowable = + (isThrowableStr.empty() || (isThrowableStr.compare("false") == 0)) ? false : true; + } + + if (isThrowable) { + CAF_CM_LOG_ERROR_VA2("Error already handled - MsgErr: %s, Thrown: %s", + message->getPayloadStr().c_str(), throwable->getFullMsg().c_str()); + } else { + CIntMessageHeaders messageHeaders; + messageHeaders.insertString(MessageHeaders::_sIS_THROWABLE, "true"); + + const IIntMessage::SmartPtrCHeaders origHeaders = + message.IsNull() ? IIntMessage::SmartPtrCHeaders() : message->getHeaders(); + + SmartPtrCIntMessage messageImpl; + messageImpl.CreateInstance(); + messageImpl->initializeStr(throwable->getFullMsg(), + messageHeaders.getHeaders(), origHeaders); + + const SmartPtrIIntMessage newMessage = messageImpl; + + const std::string errorChannelRef = + newMessage->findOptionalHeaderAsString(MessageHeaders::_sERROR_CHANNEL); + + SmartPtrIMessageChannel errorMessageChannel = _errorMessageChannel; + if (! errorChannelRef.empty()) { + CAF_CM_LOG_INFO_VA1("Using alternate error channel - %s", errorChannelRef.c_str()); + errorMessageChannel = _channelResolver->resolveChannelName(errorChannelRef); + } + + errorMessageChannel->send(newMessage); + } + } + CAF_CM_EXIT; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CErrorHandler.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CErrorHandler.h new file mode 100644 index 000000000..e399dd280 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CErrorHandler.h @@ -0,0 +1,44 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CErrorHandler_h_ +#define CErrorHandler_h_ + +namespace Caf { + +class INTEGRATIONCORE_LINKAGE CErrorHandler : + public IErrorHandler { +public: + CErrorHandler(); + virtual ~CErrorHandler(); + +public: + void initialize( + const SmartPtrIChannelResolver& channelResolver, + const SmartPtrIMessageChannel& errorMessageChannel); + +public: // IErrorHandler + void handleError( + const SmartPtrIThrowable& throwable, + const SmartPtrIIntMessage& message) const; + +private: + bool _isInitialized; + SmartPtrIChannelResolver _channelResolver; + SmartPtrIMessageChannel _errorMessageChannel; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CErrorHandler); +}; + +CAF_DECLARE_SMART_POINTER(CErrorHandler); +} + +#endif // #ifndef CErrorHandler_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CExpressionHandler.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CExpressionHandler.cpp new file mode 100644 index 000000000..932df9469 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CExpressionHandler.cpp @@ -0,0 +1,130 @@ +/* + * Created on: Jul 23, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CExpressionHandler.h" + +using namespace Caf; + +CExpressionHandler::CExpressionHandler() : + _isInitialized(false), + CAF_CM_INIT("CExpressionHandler") { +} + +CExpressionHandler::~CExpressionHandler() { +} + +void CExpressionHandler::init( + const SmartPtrIAppConfig& appConfig, + const SmartPtrIAppContext& appContext, + const std::string& expression) { + CAF_CM_FUNCNAME("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appConfig); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_STRING(expression); + + CCafRegex regex; + regex.initialize("\\@(\\w+)\\.(\\w+)\\((.*)\\)"); + if (!regex.isMatched(expression)) { + CAF_CM_EXCEPTIONEX_VA1( + InvalidArgumentException, + 0, + "Invalid expression syntax '%s'", + expression.c_str()); + } + _beanName = regex.match(expression, 1); + _methodName = regex.match(expression, 2); + if (!_beanName.length() || !_methodName.length()) { + CAF_CM_EXCEPTIONEX_VA1( + InvalidArgumentException, + 0, + "Invalid expression syntax '%s'", + expression.c_str()); + } + + SmartPtrIBean bean = appContext->getBean(_beanName); + _invoker.QueryInterface(bean, false); + if (!_invoker) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchInterfaceException, + 0, + "bean '%s' does not support the IExpressionInvoker interface", + _beanName.c_str()); + } + + const std::string paramSubstr = regex.match(expression, 3); + Cdeqstr paramExprs = CStringUtils::split(paramSubstr, ','); + CCafRegex regexLiteral; + regexLiteral.initialize("'(.*)'"); + for (TConstIterator paramExpr(paramExprs); paramExpr; paramExpr++) { + std::string trimmedExpr = CStringUtils::trim(*paramExpr); + if (regexLiteral.isMatched(trimmedExpr)) { + std::string val = regexLiteral.match(trimmedExpr, 1); + if (val.length()) { + _methodParams.push_back(appConfig->resolveValue(val)); + } else { + _methodParams.push_back(""); + } + } else { + CAF_CM_EXCEPTIONEX_VA1( + InvalidArgumentException, + 0, + "Invalid expression syntax '%s'", + expression.c_str()); + } + } + _isInitialized = true; +} + +SmartPtrIVariant CExpressionHandler::evaluate(const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("evaluate"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _invoker->invokeExpression(_methodName, _methodParams, message); +} + +std::string CExpressionHandler::getBeanName() const { + CAF_CM_FUNCNAME_VALIDATE("getBeanName"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _beanName; +} + +std::string CExpressionHandler::getMethodName() const { + CAF_CM_FUNCNAME_VALIDATE("getMethodName"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _methodName; +} + +Cdeqstr CExpressionHandler::getMethodParameters() const { + CAF_CM_FUNCNAME_VALIDATE("getMethodParameters"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _methodParams; +} + +std::string CExpressionHandler::toString() const { + std::stringstream result; + result + << "invoke @" + << _beanName + << '.' + << _methodName + << '('; + bool first = true; + for (TConstIterator param(_methodParams); param; param++) { + if (!first) { + result << ", "; + } + result + << '\'' + << *param + << '\''; + first = false; + } + result << ')'; + return result.str(); +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CExpressionHandler.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CExpressionHandler.h new file mode 100644 index 000000000..b3feb4bd1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CExpressionHandler.h @@ -0,0 +1,48 @@ +/* + * Created on: Jul 23, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CEXPRESSIONHANDLER_H_ +#define CEXPRESSIONHANDLER_H_ + +namespace Caf { + +class INTEGRATIONCORE_LINKAGE CExpressionHandler { +public: + CExpressionHandler(); + virtual ~CExpressionHandler(); + + void init( + const SmartPtrIAppConfig& appConfig, + const SmartPtrIAppContext& appContext, + const std::string& expression); + + SmartPtrIVariant evaluate(const SmartPtrIIntMessage& message); + + std::string getBeanName() const; + + std::string getMethodName() const; + + Cdeqstr getMethodParameters() const; + + std::string toString() const; + +private: + bool _isInitialized; + SmartPtrIExpressionInvoker _invoker; + std::string _beanName; + std::string _methodName; + Cdeqstr _methodParams; + + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CExpressionHandler); +}; +CAF_DECLARE_SMART_POINTER(CExpressionHandler); + +} + +#endif /* CEXPRESSIONHANDLER_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CIntException.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CIntException.cpp new file mode 100644 index 000000000..991807fcd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CIntException.cpp @@ -0,0 +1,96 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CIntException.h" + +#define CAF_CM_DEFINE_INTEGRATION_EXCEPTION_CLASS(_exclass_) \ + _exclass_::_exclass_() : CCafException( #_exclass_ ) {} \ + _exclass_::~_exclass_() {} \ + void _exclass_::throwSelf() { throw this; } + +using namespace Caf; + +CAF_CM_DEFINE_INTEGRATION_EXCEPTION_CLASS(FatalListenerStartupException) +CAF_CM_DEFINE_INTEGRATION_EXCEPTION_CLASS(ListenerExecutionFailedException) +CAF_CM_DEFINE_INTEGRATION_EXCEPTION_CLASS(MessageDeliveryException) + +CIntException::CIntException() : + _isInitialized(false), + _errorCode(0), + _backtrace(NULL), + CAF_CM_INIT("CIntException") { +} + +CIntException::~CIntException() { +} + +void CIntException::initialize(const CCafException* cafException) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_PTR(cafException); + + _exceptionClassName = cafException->getExceptionClassName(); + _message = cafException->getMsg(); + _className = cafException->getClassName(); + _funcName = cafException->getFuncName(); + _errorCode = cafException->getError(); + _backtrace = cafException->getBacktrace(); + _fullMsg = cafException->getFullMsg(); + + _isInitialized = true; +} + +std::string CIntException::getExceptionClassName() const { + CAF_CM_FUNCNAME_VALIDATE("getExceptionClassName"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _exceptionClassName; +} + +std::string CIntException::getMsg() const { + CAF_CM_FUNCNAME_VALIDATE("getMsg"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _message; +} + +std::string CIntException::getClassName() const { + CAF_CM_FUNCNAME_VALIDATE("getClassName"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _className; +} + +std::string CIntException::getFuncName() const { + CAF_CM_FUNCNAME_VALIDATE("getFuncName"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _funcName; +} + +HRESULT CIntException::getError() const { + CAF_CM_FUNCNAME_VALIDATE("getError"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _errorCode; +} + +std::deque* CIntException::getBacktrace() const { + CAF_CM_FUNCNAME_VALIDATE("getBacktrace"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _backtrace; +} + +std::string CIntException::getFullMsg() const { + CAF_CM_FUNCNAME_VALIDATE("getFullMsg"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _fullMsg; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CIntException.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CIntException.h new file mode 100644 index 000000000..c5c7a7430 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CIntException.h @@ -0,0 +1,69 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CIntException_h_ +#define CIntException_h_ + +namespace Caf { + +class INTEGRATIONCORE_LINKAGE CIntException : + public IThrowable { +public: + CIntException(); + virtual ~CIntException(); + +public: + void initialize(const CCafException* cafException); + +public: // IThrowable + std::string getExceptionClassName() const; + std::string getMsg() const; + std::string getClassName() const; + std::string getFuncName() const; + HRESULT getError() const; + std::deque* getBacktrace() const; + std::string getFullMsg() const; + +private: + bool _isInitialized; + std::string _exceptionClassName; + HRESULT _errorCode; + std::string _message; + std::string _className; + std::string _funcName; + std::deque* _backtrace; + std::string _fullMsg; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CIntException); +}; + +CAF_DECLARE_SMART_POINTER(CIntException); + +#define CAF_CM_DECLARE_INTEGRATION_EXCEPTION_CLASS(_exclass_) \ +class INTEGRATIONCORE_LINKAGE _exclass_ : public Caf::CCafException { \ +public: \ + _exclass_(); \ + virtual ~_exclass_(); \ + void throwSelf(); \ +private: \ + _exclass_(const _exclass_ &); \ + _exclass_ & operator=(const _exclass_ &); \ +}; + +// Exceptions specific to integration +CAF_CM_DECLARE_INTEGRATION_EXCEPTION_CLASS(FatalListenerStartupException) + +CAF_CM_DECLARE_INTEGRATION_EXCEPTION_CLASS(ListenerExecutionFailedException) + +CAF_CM_DECLARE_INTEGRATION_EXCEPTION_CLASS(MessageDeliveryException) + +} + +#endif // #ifndef CIntException_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CIntMessage.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CIntMessage.cpp new file mode 100644 index 000000000..4ebe9dce9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CIntMessage.cpp @@ -0,0 +1,235 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CIntException.h" + +using namespace Caf; + +CIntMessage::CIntMessage() : + _isInitialized(false), + _messageId(CAFCOMMON_GUID_NULL), + CAF_CM_INIT("CIntMessage") { +} + +CIntMessage::~CIntMessage() { +} + +CIntMessage::SmartPtrCHeaders CIntMessage::mergeHeaders( + const SmartPtrCHeaders& newHeaders, + const SmartPtrCHeaders& origHeaders) { + CIntMessage::SmartPtrCHeaders headers; + headers.CreateInstance(); + + if (newHeaders) { + std::copy( + newHeaders->begin(), + newHeaders->end(), + std::inserter( + *headers, + headers->end())); + } + if (origHeaders) { + std::copy( + origHeaders->begin(), + origHeaders->end(), + std::inserter( + *headers, + headers->end())); + } + + return headers; +} + +void CIntMessage::initializeStr( + const std::string& payloadStr, + const SmartPtrCHeaders& newHeaders, + const SmartPtrCHeaders& origHeaders) { + CAF_CM_FUNCNAME_VALIDATE("initializeStr"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + std::string payloadStrTmp = payloadStr; + if (payloadStr.empty()) { + payloadStrTmp = ""; + } + + SmartPtrCDynamicByteArray payload; + payload.CreateInstance(); + payload->allocateBytes(payloadStrTmp.length()); + payload->memCpy(payloadStrTmp.c_str(), payloadStrTmp.length()); + + initialize(payload, newHeaders, origHeaders); +} + +void CIntMessage::initialize( + const SmartPtrCDynamicByteArray& payload, + const SmartPtrCHeaders& newHeaders, + const SmartPtrCHeaders& origHeaders) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + // payload is optional + // newHeaders are optional + // origHeaders are optional + + _payload = payload; + ::UuidCreate(&_messageId); + + _headers = mergeHeaders(newHeaders, origHeaders); + + IIntMessage::CHeaders::iterator header = _headers->find(MessageHeaders::_sID); + if (_headers->end() == header) { + _headers->insert(std::make_pair(MessageHeaders::_sID, + std::make_pair(CVariant::createString(CStringUtils::createRandomUuid()), SmartPtrICafObject()))); + } + header = _headers->find(MessageHeaders::_sTIMESTAMP); + if (_headers->end() == header) { + _headers->insert(std::make_pair(MessageHeaders::_sTIMESTAMP, + std::make_pair(CVariant::createUint64(CDateTimeUtils::getTimeMs()), SmartPtrICafObject()))); + } + _isInitialized = true; + } + CAF_CM_EXIT; +} + +SmartPtrCDynamicByteArray CIntMessage::getPayload() const { + CAF_CM_FUNCNAME_VALIDATE("getPayload"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _payload; +} + +std::string CIntMessage::getPayloadStr() const { + CAF_CM_FUNCNAME_VALIDATE("getPayloadStr"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return reinterpret_cast(_payload->getPtr()); +} + +UUID CIntMessage::getMessageId() const { + CAF_CM_FUNCNAME_VALIDATE("getMessageId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _messageId; +} + +std::string CIntMessage::getMessageIdStr() const { + CAF_CM_FUNCNAME_VALIDATE("getMessageIdStr"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return BasePlatform::UuidToString(_messageId); +} + +IIntMessage::SmartPtrCHeaders CIntMessage::getHeaders() const { + CAF_CM_FUNCNAME_VALIDATE("getHeaders"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _headers; +} + +SmartPtrIVariant CIntMessage::findOptionalHeader( + const std::string& key) const { + CAF_CM_FUNCNAME_VALIDATE("findOptionalHeader"); + + SmartPtrIVariant value; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(key); + + CHeaders::const_iterator headerIter = _headers->find(key); + if (headerIter != _headers->end()) { + value = headerIter->second.first; + } + } + CAF_CM_EXIT; + + return value; +} + +SmartPtrIVariant CIntMessage::findRequiredHeader( + const std::string& key) const { + CAF_CM_FUNCNAME("findRequiredHeader"); + + SmartPtrIVariant value; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(key); + + CHeaders::const_iterator headerIter = _headers->find(key); + if (headerIter == _headers->end()) { + CAF_CM_EXCEPTIONEX_VA1(NoSuchElementException, ERROR_NOT_FOUND, + "Key not found in headers - %s", key.c_str()); + } + + value = headerIter->second.first; + } + CAF_CM_EXIT; + + return value; +} + +std::string CIntMessage::findOptionalHeaderAsString( + const std::string& key) const { + std::string valueStr; + SmartPtrIVariant value = findOptionalHeader(key); + if (value) { + valueStr = value->toString(); + } + return valueStr; +} + +std::string CIntMessage::findRequiredHeaderAsString( + const std::string& key) const { + std::string valueStr; + SmartPtrIVariant value = findRequiredHeader(key); + if (value) { + valueStr = value->toString(); + } + return valueStr; +} + +SmartPtrICafObject CIntMessage::findOptionalObjectHeader( + const std::string& key) const { + CAF_CM_FUNCNAME_VALIDATE("findOptionalObjectHeader"); + + SmartPtrICafObject value; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(key); + + CHeaders::const_iterator headerIter = _headers->find(key); + if (headerIter != _headers->end()) { + value = headerIter->second.second; + } + } + CAF_CM_EXIT; + + return value; +} + +SmartPtrICafObject CIntMessage::findRequiredObjectHeader( + const std::string& key) const { + CAF_CM_FUNCNAME("findRequiredObjectHeader"); + + SmartPtrICafObject value; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(key); + + CHeaders::const_iterator headerIter = _headers->find(key); + if (headerIter == _headers->end()) { + CAF_CM_EXCEPTIONEX_VA1(NoSuchElementException, ERROR_NOT_FOUND, + "Key not found in headers - %s", key.c_str()); + } + + value = headerIter->second.second; + } + CAF_CM_EXIT; + + return value; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CIntMessage.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CIntMessage.h new file mode 100644 index 000000000..7244fe3ab --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CIntMessage.h @@ -0,0 +1,80 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CIntMessage_h_ +#define CIntMessage_h_ + +namespace Caf { + +class INTEGRATIONCORE_LINKAGE CIntMessage : + public IIntMessage { +public: + static SmartPtrCHeaders mergeHeaders( + const SmartPtrCHeaders& newHeaders, + const SmartPtrCHeaders& origHeaders); + +public: + CIntMessage(); + virtual ~CIntMessage(); + +public: + void initializeStr( + const std::string& payloadStr, + const SmartPtrCHeaders& newHeaders, + const SmartPtrCHeaders& origHeaders); + + void initialize( + const SmartPtrCDynamicByteArray& payload, + const SmartPtrCHeaders& newHeaders, + const SmartPtrCHeaders& origHeaders); + +public: // IIntMessage + SmartPtrCDynamicByteArray getPayload() const; + + std::string getPayloadStr() const; + + UUID getMessageId() const; + + std::string getMessageIdStr() const; + + SmartPtrCHeaders getHeaders() const; + + SmartPtrIVariant findOptionalHeader( + const std::string& key) const; + + SmartPtrIVariant findRequiredHeader( + const std::string& key) const; + + std::string findOptionalHeaderAsString( + const std::string& key) const; + + std::string findRequiredHeaderAsString( + const std::string& key) const; + + SmartPtrICafObject findOptionalObjectHeader( + const std::string& key) const; + + SmartPtrICafObject findRequiredObjectHeader( + const std::string& key) const; + +private: + bool _isInitialized; + UUID _messageId; + SmartPtrCDynamicByteArray _payload; + SmartPtrCHeaders _headers; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CIntMessage); +}; + +CAF_DECLARE_SMART_POINTER(CIntMessage); + +} + +#endif // #ifndef _IntegrationContracts_CIntMessage_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CIntMessageHeaders.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CIntMessageHeaders.cpp new file mode 100644 index 000000000..4c858e389 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CIntMessageHeaders.cpp @@ -0,0 +1,127 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CIntException.h" + +using namespace Caf; + +CIntMessageHeaders::CIntMessageHeaders() : + CAF_CM_INIT("CIntMessageHeaders") { + _headers.CreateInstance(); +} + +CIntMessageHeaders::~CIntMessageHeaders() { +} + +IIntMessage::SmartPtrCHeaders CIntMessageHeaders::getHeaders() const { + return _headers; +} + +void CIntMessageHeaders::clear() { + _headers.CreateInstance(); +} + +void CIntMessageHeaders::insertString( + const std::string& key, + const std::string& value) { + CAF_CM_FUNCNAME_VALIDATE("insertString"); + CAF_CM_VALIDATE_STRING(key); + CAF_CM_VALIDATE_STRING(value); + _headers->insert(std::make_pair(key, std::make_pair(CVariant::createString(value), SmartPtrICafObject()))); +} + +void CIntMessageHeaders::insertStringOpt( + const std::string& key, + const std::string& value) { + CAF_CM_FUNCNAME_VALIDATE("insertStringOpt"); + CAF_CM_VALIDATE_STRING(key); + _headers->insert(std::make_pair(key, std::make_pair(CVariant::createString(value), SmartPtrICafObject()))); +} + +void CIntMessageHeaders::insertInt64( + const std::string& key, + const int64& value) { + CAF_CM_FUNCNAME_VALIDATE("insertInt64"); + CAF_CM_VALIDATE_STRING(key); + _headers->insert(std::make_pair(key, std::make_pair(CVariant::createInt64(value), SmartPtrICafObject()))); +} + +void CIntMessageHeaders::insertUint64( + const std::string& key, + const uint64& value) { + CAF_CM_FUNCNAME_VALIDATE("insertUint64"); + CAF_CM_VALIDATE_STRING(key); + _headers->insert(std::make_pair(key, std::make_pair(CVariant::createUint64(value), SmartPtrICafObject()))); +} + +void CIntMessageHeaders::insertInt32( + const std::string& key, + const int32& value) { + CAF_CM_FUNCNAME_VALIDATE("insertInt32"); + CAF_CM_VALIDATE_STRING(key); + _headers->insert(std::make_pair(key, std::make_pair(CVariant::createInt32(value), SmartPtrICafObject()))); +} + +void CIntMessageHeaders::insertUint32( + const std::string& key, + const uint32& value) { + CAF_CM_FUNCNAME_VALIDATE("insertUint32"); + CAF_CM_VALIDATE_STRING(key); + _headers->insert(std::make_pair(key, std::make_pair(CVariant::createUint32(value), SmartPtrICafObject()))); +} + +void CIntMessageHeaders::insertInt16( + const std::string& key, + const int16& value) { + CAF_CM_FUNCNAME_VALIDATE("insertInt16"); + CAF_CM_VALIDATE_STRING(key); + _headers->insert(std::make_pair(key, std::make_pair(CVariant::createInt16(value), SmartPtrICafObject()))); +} + +void CIntMessageHeaders::insertUint16( + const std::string& key, + const uint16& value) { + CAF_CM_FUNCNAME_VALIDATE("insertUint16"); + CAF_CM_VALIDATE_STRING(key); + _headers->insert(std::make_pair(key, std::make_pair(CVariant::createUint16(value), SmartPtrICafObject()))); +} + +void CIntMessageHeaders::insertUint8( + const std::string& key, + const uint8& value) { + CAF_CM_FUNCNAME_VALIDATE("insertUint8"); + CAF_CM_VALIDATE_STRING(key); + _headers->insert(std::make_pair(key, std::make_pair(CVariant::createUint8(value), SmartPtrICafObject()))); +} + +void CIntMessageHeaders::insertBool( + const std::string& key, + const bool& value) { + CAF_CM_FUNCNAME_VALIDATE("insertBool"); + CAF_CM_VALIDATE_STRING(key); + _headers->insert(std::make_pair(key, std::make_pair(CVariant::createBool(value), SmartPtrICafObject()))); +} + +void CIntMessageHeaders::insertVariant( + const std::string& key, + const SmartPtrIVariant& variant) { + CAF_CM_FUNCNAME_VALIDATE("insertVariant"); + CAF_CM_VALIDATE_STRING(key); + CAF_CM_VALIDATE_SMARTPTR(variant); + _headers->insert(std::make_pair(key, std::make_pair(variant, SmartPtrICafObject()))); +} + +void CIntMessageHeaders::insertObject( + const std::string& key, + const SmartPtrICafObject& cafObject) { + CAF_CM_FUNCNAME_VALIDATE("insertObject"); + CAF_CM_VALIDATE_STRING(key); + CAF_CM_VALIDATE_SMARTPTR(cafObject); + _headers->insert(std::make_pair(key, std::make_pair(SmartPtrIVariant(), cafObject))); +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CIntMessageHeaders.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CIntMessageHeaders.h new file mode 100644 index 000000000..450a6f6d9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CIntMessageHeaders.h @@ -0,0 +1,84 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CIntMessageHeaders_h_ +#define CIntMessageHeaders_h_ + +namespace Caf { + +class INTEGRATIONCORE_LINKAGE CIntMessageHeaders { +public: + CIntMessageHeaders(); + virtual ~CIntMessageHeaders(); + +public: + IIntMessage::SmartPtrCHeaders getHeaders() const; + + void clear(); + + void insertString( + const std::string& key, + const std::string& value); + + void insertStringOpt( + const std::string& key, + const std::string& value); + + void insertInt64( + const std::string& key, + const int64& value); + + void insertUint64( + const std::string& key, + const uint64& value); + + void insertInt32( + const std::string& key, + const int32& value); + + void insertUint32( + const std::string& key, + const uint32& value); + + void insertInt16( + const std::string& key, + const int16& value); + + void insertUint16( + const std::string& key, + const uint16& value); + + void insertUint8( + const std::string& key, + const uint8& value); + + void insertBool( + const std::string& key, + const bool& value); + + void insertVariant( + const std::string& key, + const SmartPtrIVariant& variant); + + void insertObject( + const std::string& key, + const SmartPtrICafObject& cafObject); + +private: + IIntMessage::SmartPtrCHeaders _headers; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CIntMessageHeaders); +}; + +CAF_DECLARE_SMART_POINTER(CIntMessageHeaders); + +} + +#endif // #ifndef _IntegrationContracts_CIntMessageHeaders_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CIntegrationAppContext.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CIntegrationAppContext.cpp new file mode 100644 index 000000000..9f8ddbdd3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CIntegrationAppContext.cpp @@ -0,0 +1,642 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CIntegrationAppContext.h" + +using namespace Caf; + +CIntegrationAppContext::CIntegrationAppContext() : + _isInitialized(false), + _isIntegrationObjectCollectionReady(false), + CAF_CM_INIT_LOG("CIntegrationAppContext") { +} + +CIntegrationAppContext::~CIntegrationAppContext() { + if (_weakSelfReference) { + _weakSelfReference->set(NULL); + } +} + +void CIntegrationAppContext::initialize(const uint32 timeoutMs) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + const std::string beanConfigPath = getDefaultBeanConfigPath(); + initialize(timeoutMs, beanConfigPath); +} + +void CIntegrationAppContext::initialize( + const uint32 timeoutMs, + const std::string& beanConfigPath) { + CAF_CM_FUNCNAME("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(beanConfigPath); + + _weakSelfReference.CreateInstance(); + _weakSelfReference->set(this); + + const Cdeqstr beanConfigPathCollection = + getBeanConfigFiles(beanConfigPath); + + _applicationContext.CreateInstance(); + _applicationContext->initialize(beanConfigPathCollection); + const IAppContext::SmartPtrCBeans contextBeans = + _applicationContext->getBeans(); + + _integrationObjectCollection = assign(contextBeans, beanConfigPathCollection); + + // Set context aware objects' appContext reference + for (TSmartConstMapIterator object(*_integrationObjectCollection); + object; + object++) { + SmartPtrIIntegrationAppContextAware contextAwareObj; + contextAwareObj.QueryInterface(*object, false); + if (contextAwareObj) { + contextAwareObj->setIntegrationAppContext(_weakSelfReference); + } + } + + // Inject channel interceptors + injectChannelInterceptors(_integrationObjectCollection); + _isIntegrationObjectCollectionReady = true; + + // Create the channel resolver and wire up the integration objects + SmartPtrCChannelResolver channelResolver; + channelResolver.CreateInstance(); + channelResolver->initialize(_integrationObjectCollection); + _channelResolver = channelResolver; + wire(_applicationContext, _integrationObjectCollection, _channelResolver); + + // Build up the collection of ILifecycle objects and determine + // the startup order. + // + // ISmartLifecycle objects will provide a phase number to state their + // desired relative load order. + // + // ILifecycle objects do not provide phase and will be set to order: + // 0 - non-message producing + // 1 - message producing + for (TSmartConstMapIterator object(*_integrationObjectCollection); + object; + object++) { + SmartPtrILifecycle lifecycleObj; + lifecycleObj.QueryInterface(*object, false); + if (lifecycleObj) { + SmartPtrISmartLifecycle smartLifecycleObj; + smartLifecycleObj.QueryInterface(*object, false); + if (smartLifecycleObj) { + SmartPtrIPhased phasedObj; + phasedObj.QueryInterface(*object, false); + if (phasedObj) { + _lifecycleBeans.insert( + LifecycleBeans::value_type( + phasedObj->getPhase(), + lifecycleObj)); + } else { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchInterfaceException, + 0, + "ISmartLifecycle object '%s' must also " + "support the IPhased interface.", + object.getKey().c_str()); + } + } else { + SmartPtrIMessageProducer messageProducer; + messageProducer.QueryInterface(*object, false); + _lifecycleBeans.insert( + LifecycleBeans::value_type( + messageProducer && messageProducer->isMessageProducer() ? 1 : 0, + lifecycleObj)); + } + } + } + + if (_lifecycleBeans.size() && CAF_CM_IS_LOG_DEBUG_ENABLED) { + CAF_CM_LOG_DEBUG_VA0("Lifecycle startup order:"); + for (TSmartConstMultimapIterator lcBean(_lifecycleBeans); + lcBean; + lcBean++) { + SmartPtrIIntegrationObject obj; + obj.QueryInterface(*lcBean); + CAF_CM_LOG_DEBUG_VA2( + " [phase=%d][id=%s]", + lcBean.getKey(), + obj->getId().c_str()); + } + } + + // Start the lifecycle objects + startStop(_lifecycleBeans, timeoutMs, true); + + _isInitialized = true; +} + +void CIntegrationAppContext::terminate(const uint32 timeoutMs) { + CAF_CM_FUNCNAME("terminate"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + try { + _weakSelfReference->set(NULL); + startStop(_lifecycleBeans, timeoutMs, false); + _isInitialized = false; + _isIntegrationObjectCollectionReady = false; + _channelResolver = NULL; + _integrationObjectCollection->clear(); + _integrationObjectCollection = NULL; + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + + try { + _applicationContext->terminate(); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + + try { + _applicationContext = NULL; + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; +} + +SmartPtrIIntegrationObject CIntegrationAppContext::getIntegrationObject( + const std::string& id) const { + CAF_CM_FUNCNAME("getIntegrationObject"); + CAF_CM_VALIDATE_STRING(id); + CAF_CM_PRECOND_ISINITIALIZED(_isIntegrationObjectCollectionReady); + + CIntegrationObjectCollection::const_iterator objIter = + _integrationObjectCollection->find(id); + SmartPtrIIntegrationObject object; + if (objIter != _integrationObjectCollection->end()) { + object = objIter->second; + } else { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchElementException, + 0, + "Integration object [id=%s] is not in the collection", + id.c_str()); + } + + return object; +} + +void CIntegrationAppContext::getIntegrationObject(const IID& iid, void **ppv) const { + CAF_CM_FUNCNAME("getIntegrationObject"); + CAF_CM_PRECOND_ISINITIALIZED(_isIntegrationObjectCollectionReady); + CAF_CM_VALIDATE_PTR(ppv); + + for (TSmartConstMapIterator objIter(*_integrationObjectCollection); + objIter; + objIter++) { + void *result; + (*objIter).QueryInterface(iid, &result); + if (result) { + if (*ppv) { + CAF_CM_EXCEPTIONEX_VA1( + DuplicateElementException, + 0, + "More than one integration object [iid=%s] was found.", + BasePlatform::UuidToString(iid).c_str()); + } else { + *ppv = result; + } + } + } + + if (!*ppv) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchElementException, + 0, + "Integration object [iid=%s] is not in the collection", + BasePlatform::UuidToString(iid).c_str()); + } +} + +IIntegrationAppContext::SmartPtrCObjectCollection +CIntegrationAppContext::getIntegrationObjects(const IID& iid) const { + CAF_CM_FUNCNAME_VALIDATE("getIntegrationObjects"); + + SmartPtrCObjectCollection collection; + collection.CreateInstance(); + CAF_CM_PRECOND_ISINITIALIZED(_isIntegrationObjectCollectionReady); + for (TSmartMapIterator objIter(*_integrationObjectCollection); + objIter; + objIter++) { + void *result; + (*objIter).QueryInterface(iid, &result); + if (result) { + collection->push_back(*objIter); + objIter->Release(); + } + } + + return collection; +} + +SmartPtrIBean CIntegrationAppContext::getBean(const std::string& name) const { + CAF_CM_FUNCNAME_VALIDATE("getBean"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(name); + + return _applicationContext->getBean(name); +} + +SmartPtrIMessageChannel CIntegrationAppContext::resolveChannelName( + const std::string& channelName) const { + CAF_CM_FUNCNAME_VALIDATE("resolveChannelName"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(channelName); + + return _channelResolver->resolveChannelName(channelName); +} + +SmartPtrIIntegrationObject CIntegrationAppContext::resolveChannelNameToObject( + const std::string& channelName) const { + CAF_CM_FUNCNAME_VALIDATE("resolveChannelNameToObject"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(channelName); + + return _channelResolver->resolveChannelNameToObject(channelName); +} + +SmartPtrCIntegrationObjectCollection CIntegrationAppContext::assign( + const IAppContext::SmartPtrCBeans& contextBeans, + const Cdeqstr& beanConfigPathCollection) const { + CAF_CM_FUNCNAME("assign"); + CAF_CM_VALIDATE_SMARTPTR(contextBeans); + CAF_CM_VALIDATE_STL(beanConfigPathCollection); + + SmartPtrCIntegrationObjectCollection integrationObjectCollection; + integrationObjectCollection.CreateInstance(); + addBuiltIn("nullChannelBean", contextBeans, integrationObjectCollection); + addBuiltIn("errorChannelBean", contextBeans, integrationObjectCollection); + + // Parse the bean config file + for (TConstIterator beanConfigPathIter(beanConfigPathCollection); + beanConfigPathIter; beanConfigPathIter++) { + const std::string beanConfigPath = *beanConfigPathIter; + + const SmartPtrCXmlElement configBeanRoot = CXmlUtils::parseFile(beanConfigPath, "caf:beans"); + const CXmlElement::SmartPtrCElementCollection configBeanChildren = + configBeanRoot->getAllChildren(); + for (TSmartConstMapIterator configBeanIter(*configBeanChildren); + configBeanIter; configBeanIter++) { + const SmartPtrCXmlElement configBean = *configBeanIter; + + // if the child is anything but a bean... + if ((configBean->getName() != "bean") && (configBean->getName() != "import")) { + SmartPtrCDocument document; + document.CreateInstance(); + document->initialize(configBean); + const SmartPtrIDocument configSection = document; + + SmartPtrIIntegrationObject integrationObject; + for (TSmartConstMapIterator contextBeanIter(*contextBeans); + contextBeanIter; contextBeanIter++) { + const SmartPtrIBean contextBean = *contextBeanIter; + + SmartPtrIIntegrationComponent integrationComponent; + integrationComponent.QueryInterface(contextBean, false); + + if (!integrationComponent.IsNull() && + integrationComponent->isResponsible(configSection)) { + integrationObject = integrationComponent->createObject(configSection); + if (!integrationObject) { + CAF_CM_EXCEPTIONEX_VA2( + NullPointerException, + 0, + "Component took responsibility for section - beanId: %s," + " section: %s - but createObject() returned NULL", + contextBeanIter.getKey().c_str(), + configSection->getName().c_str()); + } + + CAF_CM_LOG_DEBUG_VA3( + "Component took responsibility for section - beanId: %s, section: %s, id: %s", + contextBeanIter.getKey().c_str(), configSection->getName().c_str(), integrationObject->getId().c_str()); + + break; + } + } + + if (integrationObject.IsNull()) { + CAF_CM_EXCEPTIONEX_VA1(NoSuchElementException, ERROR_NOT_FOUND, + "Nothing took responsibility for the section: %s", + configBean->saveToStringRaw().c_str()); + } + + const std::string id = integrationObject->getId(); + if (integrationObjectCollection->find(id) != integrationObjectCollection->end()) { + CAF_CM_EXCEPTIONEX_VA1(DuplicateElementException, ERROR_ALREADY_EXISTS, + "Duplicate id: %s", id.c_str()); + } + + integrationObjectCollection->insert(std::make_pair(id, integrationObject)); + } + } + } + + return integrationObjectCollection; +} + +void CIntegrationAppContext::injectChannelInterceptors( + const SmartPtrCIntegrationObjectCollection& integrationObjectCollection) const { + CAF_CM_FUNCNAME("injectChannelInterceptors"); + CAF_CM_VALIDATE_SMARTPTR(integrationObjectCollection); + CAF_CM_LOG_DEBUG_VA0("Searching for Channels and ChannelInterceptors"); + + // Build two collections: Channels and ChannelInterceptors + // ChannelInterceptors are wired in order, if specified. + // Order does not need to be unique. Multiple interceptors at the same + // order will be wired in first-seen order. + typedef std::multimap CChannelInterceptorMap; + CChannelInterceptorMap channelInterceptors; + typedef std::list CChannelList; + CChannelList channels; + for (TSmartConstMapIterator object(*integrationObjectCollection); + object; + object++) { + SmartPtrIMessageChannel channel; + channel.QueryInterface(*object, false); + if (channel) { + channels.push_back(channel); + } else { + SmartPtrIChannelInterceptorInstance interceptorInstance; + interceptorInstance.QueryInterface(*object, false); + if (interceptorInstance) { + channelInterceptors.insert( + CChannelInterceptorMap::value_type( + interceptorInstance->getOrder(), + interceptorInstance)); + } + } + } + + if (channelInterceptors.size()) { + // For each channel create a list of ChannelInterceptors that + // apply to it and add the list to the channel. + for (TSmartConstIterator channel(channels); + channel; + channel++) { + // Get the channel id + SmartPtrIIntegrationObject integrationObj; + integrationObj.QueryInterface(*channel); + const std::string channelId = integrationObj->getId(); + + // Channels must support the IChannelInterceptorSupport interface + SmartPtrIChannelInterceptorSupport interceptorSupport; + interceptorSupport.QueryInterface(*channel, false); + if (!interceptorSupport) { + CAF_CM_EXCEPTIONEX_VA1( + UnsupportedOperationException, + E_NOINTERFACE, + "Channel [%s] does not support the required " + "IChannelInterceptorSupport interface", + channelId.c_str()); + } + + IChannelInterceptorSupport::InterceptorCollection interceptors; + for (TSmartConstMultimapIterator interceptorInstance(channelInterceptors); + interceptorInstance; + interceptorInstance++) { + integrationObj.QueryInterface(*interceptorInstance); + const std::string interceptorId = integrationObj->getId(); + if (interceptorInstance->isChannelIdMatched(channelId)) { + CAF_CM_LOG_DEBUG_VA3( + "Adding interceptor [id=%s order=%d] to channel [%s]", + interceptorId.c_str(), + interceptorInstance->getOrder(), + channelId.c_str()); + SmartPtrIChannelInterceptor interceptor; + interceptor.QueryInterface(*interceptorInstance); + interceptors.push_back(interceptor); + } + } + + if (interceptors.size()) { + interceptorSupport->setInterceptors(interceptors); + } + } + } else { + CAF_CM_LOG_DEBUG_VA0("No ChannelInterceptors were found"); + } +} + +void CIntegrationAppContext::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrCIntegrationObjectCollection& integrationObjectCollection, + const SmartPtrCChannelResolver& channelResolver) const { + CAF_CM_FUNCNAME_VALIDATE("wire"); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_SMARTPTR(integrationObjectCollection); + + for (TSmartConstMapIterator integrationObjectIter(*integrationObjectCollection); + integrationObjectIter; integrationObjectIter++) { + const SmartPtrIIntegrationObject integrationObject = *integrationObjectIter; + + SmartPtrIIntegrationComponentInstance integrationComponentInstance; + integrationComponentInstance.QueryInterface(integrationObject, false); + if (integrationComponentInstance) { + CAF_CM_LOG_DEBUG_VA1( + "Wiring - id: %s", integrationObject->getId().c_str()); + integrationComponentInstance->wire(appContext, channelResolver); + } + } +} + +void CIntegrationAppContext::startStop( + const LifecycleBeans& lifecycleBeans, + const uint32 timeoutMs, + const bool isStart) const { + CAF_CM_FUNCNAME("startStop"); + + if (isStart) { + for (LifecycleBeans::const_iterator lifecycleObjIter = lifecycleBeans.begin(); + lifecycleObjIter != lifecycleBeans.end(); + ++lifecycleObjIter) { + SmartPtrILifecycle lifecycleObj = lifecycleObjIter->second; + SmartPtrIIntegrationObject integrationObj; + integrationObj.QueryInterface(lifecycleObj, true); + bool bAutoStart = true; + SmartPtrISmartLifecycle smartLifecycleObj; + smartLifecycleObj.QueryInterface(lifecycleObj, false); + if (smartLifecycleObj) { + bAutoStart = smartLifecycleObj->isAutoStartup(); + } + if (bAutoStart) { + CAF_CM_LOG_DEBUG_VA2( + "Starting lifecycle object [phase:%d][id:%s]", + lifecycleObjIter->first, + integrationObj->getId().c_str()); + lifecycleObj->start(timeoutMs); + } else { + CAF_CM_LOG_DEBUG_VA2( + "Skipping lifecycle object start [phase:%d][id:%s] " + "because isAutoStartup=false", + lifecycleObjIter->first, + integrationObj->getId().c_str()); + } + } + } else { + for (LifecycleBeans::const_reverse_iterator lifecycleObjIter = lifecycleBeans.rbegin(); + lifecycleObjIter != lifecycleBeans.rend(); + ++lifecycleObjIter) { + try { + SmartPtrILifecycle lifecycleObj = lifecycleObjIter->second; + SmartPtrIIntegrationObject integrationObj; + integrationObj.QueryInterface(lifecycleObj, true); + CAF_CM_LOG_DEBUG_VA2( + "Stopping lifecycle object [phase:%d][id:%s]", + lifecycleObjIter->first, + integrationObj->getId().c_str()); + lifecycleObj->stop(timeoutMs); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_ERROR_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + } + } +} + +void CIntegrationAppContext::addBuiltIn( + const std::string& beanId, + const IAppContext::SmartPtrCBeans& beans, + SmartPtrCIntegrationObjectCollection& integrationObjectCollection) const { + CAF_CM_FUNCNAME_VALIDATE("addBuiltIn"); + CAF_CM_VALIDATE_STRING(beanId); + CAF_CM_VALIDATE_SMARTPTR(beans); + CAF_CM_VALIDATE_SMARTPTR(integrationObjectCollection); + + const SmartPtrIDocument configSection; + + const IAppContext::CBeans::const_iterator beanIter = beans->find(beanId); + if (beanIter != beans->end()) { + const SmartPtrIBean bean = beanIter->second; + + SmartPtrIIntegrationComponent integrationComponent; + integrationComponent.QueryInterface(bean, false); + + if (!integrationComponent.IsNull()) { + const SmartPtrIIntegrationObject integrationObject = + integrationComponent->createObject(configSection); + + const std::string id = integrationObject->getId(); + integrationObjectCollection->insert(std::make_pair(id, integrationObject)); + } + } +} + +std::string CIntegrationAppContext::getDefaultBeanConfigPath() const { + CAF_CM_FUNCNAME("getDefaultBeanConfigPath"); + + // Get the bean config file + const std::string appConfigKey = "bean_config_file"; + std::string beanConfigPath = AppConfigUtils::getRequiredString(appConfigKey); + beanConfigPath = CStringUtils::expandEnv(beanConfigPath); + if (!FileSystemUtils::doesFileExist(beanConfigPath)) { + CAF_CM_EXCEPTIONEX_VA2(FileNotFoundException, ERROR_FILE_NOT_FOUND, + "The bean config file does not exist - appConfigKey: %s, file: %s", + appConfigKey.c_str(), beanConfigPath.c_str()); + } + + return beanConfigPath; +} + +Cdeqstr CIntegrationAppContext::getBeanConfigFiles( + const std::string& beanConfigPath) const { + CAF_CM_FUNCNAME("getBeanConfigFiles"); + CAF_CM_VALIDATE_STRING(beanConfigPath); + + // Get the bean config file + const std::string beanConfigPathExp = CStringUtils::expandEnv(beanConfigPath); + if (!FileSystemUtils::doesFileExist(beanConfigPathExp)) { + CAF_CM_EXCEPTIONEX_VA1(FileNotFoundException, ERROR_FILE_NOT_FOUND, + "The bean config file does not exist - file: %s", + beanConfigPathExp.c_str()); + } + + CAF_CM_LOG_DEBUG_VA1("Adding bean file - %s", beanConfigPathExp.c_str()); + Cdeqstr beanConfigPathCollection; + beanConfigPathCollection.push_front(beanConfigPathExp); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseFile(beanConfigPathExp, "caf:beans"); + const CXmlElement::SmartPtrCElementCollection beanChildrenXml = rootXml->getAllChildren(); + CAF_CM_VALIDATE_SMARTPTR(beanChildrenXml); + + const std::string beanConfigDirname = FileSystemUtils::getDirname(beanConfigPathExp); + for (TSmartConstMapIterator beanXmlIter(*beanChildrenXml); + beanXmlIter; beanXmlIter++) { + if (beanXmlIter.getKey().compare("import") == 0) { + const SmartPtrCXmlElement importXml = *beanXmlIter; + const std::string import = importXml->findRequiredAttribute("resource"); + const std::string importExp = CStringUtils::expandEnv(import); + + std::string importPath = FileSystemUtils::buildPath(beanConfigDirname, importExp); + if (! FileSystemUtils::doesFileExist(importPath)) { + importPath = importExp; + if (! FileSystemUtils::doesFileExist(importPath)) { + CAF_CM_EXCEPTIONEX_VA2(FileNotFoundException, ERROR_FILE_NOT_FOUND, + "Import does not exist - origFile: %s, importPath: %s", + beanConfigPath.c_str(), importPath.c_str()); + } + } + + CAF_CM_LOG_DEBUG_VA1("Adding bean file - %s", importPath.c_str()); + beanConfigPathCollection.push_front(importPath); + } + } + + return beanConfigPathCollection; +} + +CIntegrationAppContext:: +CIntegrationAppContextWeakReference::CIntegrationAppContextWeakReference() : + _context(NULL), + CAF_CM_INIT("CIntegrationAppContext") { + CAF_CM_INIT_THREADSAFE; +} + +void CIntegrationAppContext:: +CIntegrationAppContextWeakReference::set(CIntegrationAppContext *context) { + CAF_CM_LOCK_UNLOCK; + _context = context; +} + +SmartPtrIIntegrationObject CIntegrationAppContext:: +CIntegrationAppContextWeakReference::getIntegrationObject( + const std::string& id) const { + CAF_CM_FUNCNAME_VALIDATE("getIntegrtationObject"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_context); + return _context->getIntegrationObject(id); +} + +void CIntegrationAppContext:: +CIntegrationAppContextWeakReference::getIntegrationObject( + const IID& iid, + void **ppv) const { + CAF_CM_FUNCNAME_VALIDATE("getIntegrtationObject"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_context); + _context->getIntegrationObject(iid, ppv); +} + +IIntegrationAppContext::SmartPtrCObjectCollection CIntegrationAppContext:: +CIntegrationAppContextWeakReference::getIntegrationObjects( + const IID& iid) const { + CAF_CM_FUNCNAME_VALIDATE("getIntegrtationObjects"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_context); + return _context->getIntegrationObjects(iid); +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CIntegrationAppContext.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CIntegrationAppContext.h new file mode 100644 index 000000000..945416c2e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CIntegrationAppContext.h @@ -0,0 +1,121 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CIntegrationAppContext_h_ +#define CIntegrationAppContext_h_ + +#include "../../Common/CApplicationContext.h" + +namespace Caf { + +class INTEGRATIONCORE_LINKAGE CIntegrationAppContext : + public IIntegrationAppContext, + public IAppContext, + public IChannelResolver { +public: + CIntegrationAppContext(); + virtual ~CIntegrationAppContext(); + +public: + void initialize(const uint32 timeoutMs); + void initialize(const uint32 timeoutMs, const std::string& beanConfigPath); + void terminate(const uint32 timeoutMs); + +public: // IIntegrationAppContext + SmartPtrIIntegrationObject getIntegrationObject(const std::string& id) const; + void getIntegrationObject(const IID& iid, void **ppv) const; + SmartPtrCObjectCollection getIntegrationObjects(const IID& iid) const; + +public: // IAppContext + SmartPtrIBean getBean(const std::string& name) const; + +public: // IChannelResolver + SmartPtrIMessageChannel resolveChannelName( + const std::string& channelName) const; + + SmartPtrIIntegrationObject resolveChannelNameToObject( + const std::string& channelName) const; + +private: + typedef std::multimap LifecycleBeans; + +private: + SmartPtrCIntegrationObjectCollection assign( + const IAppContext::SmartPtrCBeans& contextBeans, + const Cdeqstr& beanConfigPathCollection) const; + + void injectChannelInterceptors( + const SmartPtrCIntegrationObjectCollection& integrationObjectCollection) const; + + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrCIntegrationObjectCollection& integrationObjectCollection, + const SmartPtrCChannelResolver& channelResolver) const; + + void startStop( + const LifecycleBeans& lifecycleBeans, + const uint32 timeoutMs, + const bool isStart) const; + + SmartPtrCXmlElement getBeanConfigRoot() const; + + void addBuiltIn( + const std::string& beanId, + const IAppContext::SmartPtrCBeans& beans, + SmartPtrCIntegrationObjectCollection& integrationObjectCollection) const; + + std::string getDefaultBeanConfigPath() const; + + Cdeqstr getBeanConfigFiles( + const std::string& beanConfigPath) const; + +private: + class CIntegrationAppContextWeakReference : public IIntegrationAppContext { + public: + CIntegrationAppContextWeakReference(); + + void set(CIntegrationAppContext *context); + + SmartPtrIIntegrationObject getIntegrationObject( + const std::string& id) const; + + void getIntegrationObject( + const IID& iid, + void **ppv) const; + + IIntegrationAppContext::SmartPtrCObjectCollection getIntegrationObjects( + const IID& iid) const; + + private: + CIntegrationAppContext *_context; + CAF_CM_CREATE; + CAF_CM_CREATE_THREADSAFE; + CAF_CM_DECLARE_NOCOPY(CIntegrationAppContextWeakReference); + }; + CAF_DECLARE_SMART_POINTER(CIntegrationAppContextWeakReference); + +private: + bool _isInitialized; + bool _isIntegrationObjectCollectionReady; + SmartPtrCApplicationContext _applicationContext; + SmartPtrCChannelResolver _channelResolver; + SmartPtrCIntegrationObjectCollection _integrationObjectCollection; + SmartPtrCIntegrationAppContextWeakReference _weakSelfReference; + LifecycleBeans _lifecycleBeans; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CIntegrationAppContext); +}; + +CAF_DECLARE_SMART_POINTER(CIntegrationAppContext); + +} + +#endif // #ifndef CIntegrationAppContext_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CMessageHandler.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CMessageHandler.cpp new file mode 100644 index 000000000..cd435c662 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CMessageHandler.cpp @@ -0,0 +1,162 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CMessageHandler.h" + +using namespace Caf; + +CMessageHandler::CMessageHandler() : + _isInitialized(false), + CAF_CM_INIT_LOG("CMessageHandler") { +} + +CMessageHandler::~CMessageHandler() { +} + +void CMessageHandler::initialize( + const std::string& inputId, + const SmartPtrIMessageChannel& outputMessageChannel, + const SmartPtrICafObject& messageHandlerObj) { + CAF_CM_FUNCNAME("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(inputId); + // outputMessageChannel is optional + // + // messageHandlerObj optional but if provided must be one of + // ITransformer + // IMessageProcessor + // IMessageSplitter + // IMessageRouter + // IMessageHandler + // + // messageHandlerObj may also support IErrorProcessor + + _inputId = inputId; + _outputMessageChannel = outputMessageChannel; + + if (messageHandlerObj) { + _transformer.QueryInterface(messageHandlerObj, false); + _errorProcessor.QueryInterface(messageHandlerObj, false); + _messageProcessor.QueryInterface(messageHandlerObj, false); + _messageSplitter.QueryInterface(messageHandlerObj, false); + _messageRouter.QueryInterface(messageHandlerObj, false); + _messageHandler.QueryInterface(messageHandlerObj, false); + if (!_transformer && + !_errorProcessor && + !_messageProcessor && + !_messageSplitter && + !_messageRouter && + !_messageHandler) { + CAF_CM_EXCEPTIONEX_VA1( + InvalidArgumentException, + 0, + "The messageHandler object '%s' does not have " + "a supported endpoint interface", + _inputId.c_str()); + } + } + + _isInitialized = true; +} + +std::string CMessageHandler::getInputId() const { + CAF_CM_FUNCNAME_VALIDATE("getInputId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _inputId; +} + +void CMessageHandler::handleMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME("handleMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + _savedMessage = message; + + const std::string isThrowableStr = + message->findOptionalHeaderAsString(MessageHeaders::_sIS_THROWABLE); + const bool isThrowable = + (isThrowableStr.empty() || (isThrowableStr.compare("false") == 0)) ? false : true; + + if (isThrowable) { + if (! _errorProcessor.IsNull()) { + _savedMessage = _errorProcessor->processErrorMessage(message); + if (_savedMessage.IsNull()) { + CAF_CM_LOG_WARN_VA1( + "Error processing did not return a message - %s", _inputId.c_str()); + } else { + CAF_CM_VALIDATE_INTERFACE(_outputMessageChannel); + _outputMessageChannel->send(_savedMessage); + } + } else { + CAF_CM_EXCEPTIONEX_VA1(IllegalStateException, ERROR_INVALID_STATE, + "Nothing handled the throwable message - %s", _inputId.c_str()); + } + } else { + if (_inputId.compare("errorChannel") == 0) { + CAF_CM_LOG_WARN_VA1( + "Received non-error on error channel - %s", _inputId.c_str()); + } else if (! _messageSplitter.IsNull()) { + const IMessageSplitter::SmartPtrCMessageCollection outputMessageCollection = + _messageSplitter->splitMessage(message); + if (outputMessageCollection.IsNull() || outputMessageCollection->empty()) { + CAF_CM_LOG_WARN_VA1( + "Splitter did not split the message - %s", _inputId.c_str()); + } else { + CAF_CM_VALIDATE_INTERFACE(_outputMessageChannel); + for (TSmartConstIterator outputMessageIter(*outputMessageCollection); + outputMessageIter; outputMessageIter++) { + _savedMessage = *outputMessageIter; + _outputMessageChannel->send(_savedMessage); + } + } + } else if (! _messageRouter.IsNull()) { + CAF_CM_VALIDATE_BOOL(_outputMessageChannel.IsNull()); + _messageRouter->routeMessage(message); + } else if (! _messageProcessor.IsNull()) { + _savedMessage = _messageProcessor->processMessage(message); + if (_savedMessage.IsNull()) { + CAF_CM_LOG_WARN_VA1( + "Message processing did not return a message - %s", _inputId.c_str()); + } else { + CAF_CM_VALIDATE_INTERFACE(_outputMessageChannel); + _outputMessageChannel->send(_savedMessage); + } + } else if (! _transformer.IsNull()) { + _savedMessage = _transformer->transformMessage(message); + if (_savedMessage.IsNull()) { + CAF_CM_LOG_WARN_VA1( + "Transform did not return a message - %s", _inputId.c_str()); + } else { + CAF_CM_VALIDATE_INTERFACE(_outputMessageChannel); + _outputMessageChannel->send(_savedMessage); + } + } else if (! _messageHandler.IsNull()) { + _messageHandler->handleMessage(message); + } else if (! _outputMessageChannel.IsNull()) { + _outputMessageChannel->send(message); + } else { + CAF_CM_EXCEPTIONEX_VA1(IllegalStateException, ERROR_INVALID_STATE, + "Nothing handled the message - %s", _inputId.c_str()); + } + } +} + +SmartPtrIIntMessage CMessageHandler::getSavedMessage() const { + CAF_CM_FUNCNAME_VALIDATE("getSavedMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _savedMessage; +} + +void CMessageHandler::clearSavedMessage() { + CAF_CM_FUNCNAME_VALIDATE("clearSavedMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _savedMessage = NULL; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CMessageHandler.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CMessageHandler.h new file mode 100644 index 000000000..02153ec44 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CMessageHandler.h @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CMessageHandler_h_ +#define CMessageHandler_h_ + +namespace Caf { + +class INTEGRATIONCORE_LINKAGE CMessageHandler : public IMessageHandler { +public: + CMessageHandler(); + virtual ~CMessageHandler(); + +public: + void initialize( + const std::string& inputId, + const SmartPtrIMessageChannel& outputMessageChannel, + const SmartPtrICafObject& messageHandlerObj); + +public: + std::string getInputId() const; + +public: // IMessageHandler + void handleMessage( + const SmartPtrIIntMessage& message); + SmartPtrIIntMessage getSavedMessage() const; + void clearSavedMessage(); + +private: + bool _isInitialized; + std::string _inputId; + SmartPtrIIntMessage _savedMessage; + + SmartPtrIMessageChannel _outputMessageChannel; + SmartPtrITransformer _transformer; + SmartPtrIMessageProcessor _messageProcessor; + SmartPtrIErrorProcessor _errorProcessor; + SmartPtrIMessageSplitter _messageSplitter; + SmartPtrIMessageRouter _messageRouter; + SmartPtrIMessageHandler _messageHandler; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CMessageHandler); +}; + +CAF_DECLARE_SMART_POINTER(CMessageHandler); + +} + +#endif // #ifndef CMessageHandler_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CMessageHeaderUtils.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CMessageHeaderUtils.cpp new file mode 100644 index 000000000..7b05f82b7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CMessageHeaderUtils.cpp @@ -0,0 +1,210 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (c) 2012 Vmware, Inc-> All rights reserved-> + * -- VMware Confidential + * + */ + +#include "stdafx.h" +#include "CMessageHeaderUtils.h" + +using namespace Caf; + +/* + * Created on: Nov 19, 2014 + * Author: bwilliams + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CMessageHeaderUtils.h" + +using namespace Caf; + +std::string CMessageHeaderUtils::getStringReq( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag) { + CAF_CM_STATIC_FUNC("CMessageHeaderUtils", "getStringReq"); + + if (headers->find(tag) == headers->end()) { + CAF_CM_EXCEPTION_VA1(ERROR_NOT_FOUND, "Header not found: %s", tag.c_str()); + } + return getStringOpt(headers, tag); +} + +std::string CMessageHeaderUtils::getStringOpt( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag) { + + std::string rc = 0; + IIntMessage::CHeaders::const_iterator iter = headers->find(tag); + if (iter != headers->end()) { + rc = iter->second.first->toString(); + } + return rc; +} + +uint8 CMessageHeaderUtils::getUint8Req( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag) { + CAF_CM_STATIC_FUNC("CMessageHeaderUtils", "getUint8Req"); + + if (headers->find(tag) == headers->end()) { + CAF_CM_EXCEPTION_VA1(ERROR_NOT_FOUND, "Header not found: %s", tag.c_str()); + } + return getUint8Opt(headers, tag); +} + +uint8 CMessageHeaderUtils::getUint8Opt( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag) { + + uint8 rc = 0; + IIntMessage::CHeaders::const_iterator header = headers->find(tag); + if (header != headers->end()) { + if (g_variant_is_of_type(header->second.first->get(), G_VARIANT_TYPE_BYTE)) { + rc = g_variant_get_byte(header->second.first->get()); + } else { + rc = CStringConv::fromString(header->second.first->toString()); + } + } + return rc; +} + +uint16 CMessageHeaderUtils::getUint16Req( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag) { + CAF_CM_STATIC_FUNC("CMessageHeaderUtils", "getUint16Req"); + + if (headers->find(tag) == headers->end()) { + CAF_CM_EXCEPTION_VA1(ERROR_NOT_FOUND, "Header not found: %s", tag.c_str()); + } + return getUint16Opt(headers, tag); +} + +uint16 CMessageHeaderUtils::getUint16Opt( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag) { + + uint16 rc = 0; + IIntMessage::CHeaders::const_iterator header = headers->find(tag); + if (header != headers->end()) { + if (g_variant_is_of_type(header->second.first->get(), G_VARIANT_TYPE_UINT16)) { + rc = g_variant_get_uint16(header->second.first->get()); + } else { + rc = CStringConv::fromString(header->second.first->toString()); + } + } + return rc; +} + +uint32 CMessageHeaderUtils::getUint32Req( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag) { + CAF_CM_STATIC_FUNC("CMessageHeaderUtils", "getUint32Req"); + + if (headers->find(tag) == headers->end()) { + CAF_CM_EXCEPTION_VA1(ERROR_NOT_FOUND, "Header not found: %s", tag.c_str()); + } + return getUint32Opt(headers, tag); +} + +uint32 CMessageHeaderUtils::getUint32Opt( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag) { + + uint32 rc = 0; + IIntMessage::CHeaders::const_iterator header = headers->find(tag); + if (header != headers->end()) { + if (g_variant_is_of_type(header->second.first->get(), G_VARIANT_TYPE_UINT32)) { + rc = g_variant_get_uint32(header->second.first->get()); + } else { + rc = CStringConv::fromString(header->second.first->toString()); + } + } + return rc; +} + +uint64 CMessageHeaderUtils::getUint64Req( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag) { + CAF_CM_STATIC_FUNC("CMessageHeaderUtils", "getUint64Req"); + + if (headers->find(tag) == headers->end()) { + CAF_CM_EXCEPTION_VA1(ERROR_NOT_FOUND, "Header not found: %s", tag.c_str()); + } + return getUint64Opt(headers, tag); +} + +uint64 CMessageHeaderUtils::getUint64Opt( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag) { + + uint64 rc = 0; + IIntMessage::CHeaders::const_iterator header = headers->find(tag); + if (header != headers->end()) { + if (g_variant_is_of_type(header->second.first->get(), G_VARIANT_TYPE_UINT64)) { + rc = g_variant_get_uint64(header->second.first->get()); + } else { + rc = CStringConv::fromString(header->second.first->toString()); + } + } + return rc; +} + +bool CMessageHeaderUtils::getBoolReq( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag) { + CAF_CM_STATIC_FUNC("CMessageHeaderUtils", "getBoolReq"); + + if (headers->find(tag) == headers->end()) { + CAF_CM_EXCEPTION_VA1(ERROR_NOT_FOUND, "Header not found: %s", tag.c_str()); + } + return getBoolOpt(headers, tag); +} + +bool CMessageHeaderUtils::getBoolOpt( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag) { + + bool rc = false; + IIntMessage::CHeaders::const_iterator header = headers->find(tag); + if (header != headers->end()) { + if (g_variant_is_of_type(header->second.first->get(), G_VARIANT_TYPE_BOOLEAN)) { + rc = g_variant_get_boolean(header->second.first->get()); + } else { + const std::string val = header->second.first->toString(); + + rc = true; + if ((val == "0") + || (g_ascii_strncasecmp(val.c_str(), "false", val.length()) == 0)) { + rc = false; + } + } + } + return rc; +} + +void CMessageHeaderUtils::log( + const IIntMessage::SmartPtrCHeaders& headers, + const log4cpp::Priority::PriorityLevel priorityLevel) { + CAF_CM_STATIC_FUNC_LOG_ONLY("CMessageHeaderUtils", "log"); + + if (_logger.isPriorityEnabled(priorityLevel)) { + for (IIntMessage::CHeaders::const_iterator headerIter = headers->begin(); + headerIter != headers->end(); + headerIter++) { + std::stringstream logMessage; + logMessage << '[' + << headerIter->first + << '=' + << headerIter->second.first->toString() + << ']'; + _logger.logVA(priorityLevel, _cm_funcName_, __LINE__, logMessage.str().c_str()); + } + } +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CMessageHeaderUtils.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CMessageHeaderUtils.h new file mode 100644 index 000000000..a2e1500ba --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CMessageHeaderUtils.h @@ -0,0 +1,75 @@ +/* + * Created on: Nov 19, 2014 + * Author: bwilliams + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + * + */ + +#ifndef CMessageHeaderUtils_h_ +#define CMessageHeaderUtils_h_ + +namespace Caf { + +class INTEGRATIONCORE_LINKAGE CMessageHeaderUtils { +public: + static std::string getStringReq( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag); + + static std::string getStringOpt( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag); + + static uint8 getUint8Req( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag); + + static uint8 getUint8Opt( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag); + + static uint16 getUint16Req( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag); + + static uint16 getUint16Opt( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag); + + static uint32 getUint32Req( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag); + + static uint32 getUint32Opt( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag); + + static uint64 getUint64Req( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag); + + static uint64 getUint64Opt( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag); + + static bool getBoolReq( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag); + + static bool getBoolOpt( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag); + + static void log( + const IIntMessage::SmartPtrCHeaders& headers, + const log4cpp::Priority::PriorityLevel priorityLevel = log4cpp::Priority::DEBUG); + +private: + CAF_CM_DECLARE_NOCREATE(CMessageHeaderUtils); +}; + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CMessagingTemplate.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CMessagingTemplate.cpp new file mode 100644 index 000000000..c47f070fe --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CMessagingTemplate.cpp @@ -0,0 +1,143 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CMessagingTemplate.h" + +using namespace Caf; + +CMessagingTemplate::CMessagingTemplate() : + _isInitialized(false), + _isRunning(false), + CAF_CM_INIT_LOG("CMessagingTemplate") { +} + +CMessagingTemplate::~CMessagingTemplate() { +} + +void CMessagingTemplate::initialize( + const SmartPtrIChannelResolver& channelResolver, + const SmartPtrIIntegrationObject& inputIntegrationObject, + const SmartPtrIMessageChannel& errorMessageChannel, + const SmartPtrIMessageChannel& outputMessageChannel, + const SmartPtrICafObject& messageHandlerObj) { + CAF_CM_FUNCNAME("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + CAF_CM_VALIDATE_INTERFACE(inputIntegrationObject); + CAF_CM_VALIDATE_INTERFACE(errorMessageChannel); + // outputMessageChannel is optional + // + // messageHandlerObj optional but if provided must be one of + // ITransformer + // IMessageProcessor + // IMessageSplitter + // IMessageRouter + // IMessageHandler + // + // messageHandlerObj may also support IErrorProcessor + + _inputId = inputIntegrationObject->getId(); + + SmartPtrCMessageHandler messageHandler; + messageHandler.CreateInstance(); + messageHandler->initialize( + _inputId, + outputMessageChannel, + messageHandlerObj); + + SmartPtrIPollableChannel inputPollableChannel; + inputPollableChannel.QueryInterface(inputIntegrationObject, false); + _inputSubscribableChannel.QueryInterface(inputIntegrationObject, false); + + if (! _inputSubscribableChannel.IsNull()) { + _messagingTemplateHandler.CreateInstance(); + _messagingTemplateHandler->initialize(messageHandler); + } else if (! inputPollableChannel.IsNull()) { + _taskExecutor = createTaskExecutor( + channelResolver, messageHandler, inputPollableChannel, errorMessageChannel); + } else { + CAF_CM_EXCEPTIONEX_VA1(NoSuchElementException, ERROR_NOT_FOUND, + "Input object does not support any required interfaces - %s", _inputId.c_str()); + } + + _isInitialized = true; +} + +void CMessagingTemplate::start(const uint32 timeoutMs) { + CAF_CM_FUNCNAME("start"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + if (! _taskExecutor.IsNull()) { + CAF_CM_LOG_DEBUG_VA1("Executing task - %s", _inputId.c_str()); + _taskExecutor->execute(timeoutMs); + } else if (! _inputSubscribableChannel.IsNull()) { + CAF_CM_LOG_DEBUG_VA1("Subscribing handler - %s", _inputId.c_str()); + _inputSubscribableChannel->subscribe(_messagingTemplateHandler); + } else { + CAF_CM_EXCEPTIONEX_VA1(IllegalStateException, E_UNEXPECTED, + "Nothing to start: %s", _inputId.c_str()); + } +} + +void CMessagingTemplate::stop(const uint32 timeoutMs) { + CAF_CM_FUNCNAME("stop"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CAF_CM_LOG_DEBUG_VA0("Stopping"); + + if (! _taskExecutor.IsNull()) { + CAF_CM_LOG_DEBUG_VA1("Canceling task - %s", _inputId.c_str()); + _taskExecutor->cancel(timeoutMs); + } else if (! _inputSubscribableChannel.IsNull()) { + CAF_CM_LOG_DEBUG_VA1("Unsubscribing handler - %s", _inputId.c_str()); + _inputSubscribableChannel->unsubscribe(_messagingTemplateHandler); + } else { + CAF_CM_EXCEPTIONEX_VA1(IllegalStateException, E_UNEXPECTED, + "Nothing to stop: %s", _inputId.c_str()); + } +} + +bool CMessagingTemplate::isRunning() const { + CAF_CM_FUNCNAME_VALIDATE("isRunning"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + bool isRunning = true; + if (! _taskExecutor.IsNull()) { + isRunning = (_taskExecutor->getState() == ITaskExecutor::ETaskStateStarted); + } + + return isRunning; +} + +SmartPtrITaskExecutor CMessagingTemplate::createTaskExecutor( + const SmartPtrIChannelResolver& channelResolver, + const SmartPtrCMessageHandler& messageHandler, + const SmartPtrIPollableChannel& inputPollableChannel, + const SmartPtrIMessageChannel& errorMessageChannel) const { + CAF_CM_FUNCNAME_VALIDATE("createTaskExecutor"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + CAF_CM_VALIDATE_SMARTPTR(messageHandler); + CAF_CM_VALIDATE_INTERFACE(inputPollableChannel); + CAF_CM_VALIDATE_INTERFACE(errorMessageChannel); + + SmartPtrCErrorHandler errorHandler; + errorHandler.CreateInstance(); + errorHandler->initialize(channelResolver, errorMessageChannel); + + SmartPtrCSourcePollingChannelAdapter sourcePollingChannelAdapter; + sourcePollingChannelAdapter.CreateInstance(); + sourcePollingChannelAdapter->initialize(messageHandler, inputPollableChannel, errorHandler); + + SmartPtrCSimpleAsyncTaskExecutor simpleAsyncTaskExecutor; + simpleAsyncTaskExecutor.CreateInstance(); + simpleAsyncTaskExecutor->initialize(sourcePollingChannelAdapter, errorHandler); + + return simpleAsyncTaskExecutor; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CMessagingTemplate.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CMessagingTemplate.h new file mode 100644 index 000000000..4c3cc0f9f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CMessagingTemplate.h @@ -0,0 +1,59 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CMessagingTemplate_h_ +#define CMessagingTemplate_h_ + +namespace Caf { + +class INTEGRATIONCORE_LINKAGE CMessagingTemplate : + public ILifecycle { +public: + CMessagingTemplate(); + virtual ~CMessagingTemplate(); + +public: + void initialize( + const SmartPtrIChannelResolver& channelResolver, + const SmartPtrIIntegrationObject& inputIntegrationObject, + const SmartPtrIMessageChannel& errorMessageChannel, + const SmartPtrIMessageChannel& outputMessageChannel, + const SmartPtrICafObject& messageHandlerObj); + +public: // ILifecycle + void start(const uint32 timeoutMs); + void stop(const uint32 timeoutMs); + bool isRunning() const; + +private: + bool _isInitialized; + bool _isRunning; + std::string _inputId; + + SmartPtrISubscribableChannel _inputSubscribableChannel; + SmartPtrCMessagingTemplateHandler _messagingTemplateHandler; + SmartPtrITaskExecutor _taskExecutor; + +private: + SmartPtrITaskExecutor createTaskExecutor( + const SmartPtrIChannelResolver& channelResolver, + const SmartPtrCMessageHandler& messageHandler, + const SmartPtrIPollableChannel& inputPollableChannel, + const SmartPtrIMessageChannel& errorMessageChannel) const; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CMessagingTemplate); +}; + +CAF_DECLARE_SMART_POINTER(CMessagingTemplate); + +} + +#endif // #ifndef CMessagingTemplate_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CMessagingTemplateHandler.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CMessagingTemplateHandler.cpp new file mode 100644 index 000000000..485f709d1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CMessagingTemplateHandler.cpp @@ -0,0 +1,51 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CMessagingTemplateHandler.h" + +using namespace Caf; + +CMessagingTemplateHandler::CMessagingTemplateHandler() : + _isInitialized(false), + CAF_CM_INIT("CMessagingTemplateHandler") { +} + +CMessagingTemplateHandler::~CMessagingTemplateHandler() { +} + +void CMessagingTemplateHandler::initialize( + const SmartPtrIMessageHandler& messageHandler) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(messageHandler); + + _messageHandler = messageHandler; + _isInitialized = true; +} + +void CMessagingTemplateHandler::handleMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("handleMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + _messageHandler->handleMessage(message); +} + +SmartPtrIIntMessage CMessagingTemplateHandler::getSavedMessage() const { + CAF_CM_FUNCNAME_VALIDATE("getSavedMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _messageHandler->getSavedMessage(); +} + +void CMessagingTemplateHandler::clearSavedMessage() { + CAF_CM_FUNCNAME_VALIDATE("clearSavedMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _messageHandler->clearSavedMessage();; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CMessagingTemplateHandler.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CMessagingTemplateHandler.h new file mode 100644 index 000000000..853d0cf48 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CMessagingTemplateHandler.h @@ -0,0 +1,44 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CMessagingTemplateHandler_h_ +#define CMessagingTemplateHandler_h_ + +namespace Caf { + +class INTEGRATIONCORE_LINKAGE CMessagingTemplateHandler : + public IMessageHandler { +public: + CMessagingTemplateHandler(); + virtual ~CMessagingTemplateHandler(); + +public: + void initialize( + const SmartPtrIMessageHandler& messageHandler); + +public: // IMessageHandler + void handleMessage( + const SmartPtrIIntMessage& message); + SmartPtrIIntMessage getSavedMessage() const; + void clearSavedMessage(); + +private: + bool _isInitialized; + + SmartPtrIMessageHandler _messageHandler; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CMessagingTemplateHandler); +}; + +CAF_DECLARE_SMART_POINTER(CMessagingTemplateHandler); + +} + +#endif // #ifndef CMessagingTemplateHandler_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CSimpleAsyncTaskExecutor.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CSimpleAsyncTaskExecutor.cpp new file mode 100644 index 000000000..0698e1d55 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CSimpleAsyncTaskExecutor.cpp @@ -0,0 +1,186 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CSimpleAsyncTaskExecutor.h" + +using namespace Caf; + +CSimpleAsyncTaskExecutor::CSimpleAsyncTaskExecutor() : + _isInitialized(false), + CAF_CM_INIT_LOG("CSimpleAsyncTaskExecutor") { + CAF_CM_FUNCNAME("CSimpleAsyncTaskExecutor"); + + try { + CAF_THREADSIGNAL_INIT; + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; +} + +CSimpleAsyncTaskExecutor::~CSimpleAsyncTaskExecutor() { +} + +void CSimpleAsyncTaskExecutor::initialize( + const SmartPtrIRunnable& runnable, + const SmartPtrIErrorHandler& errorHandler) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(runnable); + CAF_CM_VALIDATE_INTERFACE(errorHandler); + + _state.CreateInstance(); + _state->initialize(runnable, errorHandler); + + _isInitialized = true; +} + +void CSimpleAsyncTaskExecutor::execute( + const uint32 timeoutMs) { + CAF_CM_FUNCNAME("execute"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + if (ITaskExecutor::ETaskStateNotStarted == _state->getState()) { + // The mutex must be locked before calling waitForStart + // and before letting the thread spin up to avoid + // a race condition. See g_cond_timed_wait() + // + // Scope the CAF_THREADSIGNAL_LOCK_UNLOCK so that the + // mutex is guaranteed to unlock + { + CAF_CM_LOG_DEBUG_VA0("Starting the thread"); + CAF_THREADSIGNAL_LOCK_UNLOCK; + CThreadData threadData = std::make_pair( + CAF_THREADSIGNAL_MUTEX, + _state.GetNonAddRefedInterface()); + CThreadUtils::start(threadFunc, &threadData); + _state->waitForStart(CAF_THREADSIGNAL_MUTEX, timeoutMs); + } + if (_state->getState() != ITaskExecutor::ETaskStateStarted) { + CAF_CM_EXCEPTION_VA1(ERROR_INVALID_STATE, "Not Started: %s", _state->getStateStr().c_str()); + } + } else if (ITaskExecutor::ETaskStateStarted != _state->getState()) { + CAF_CM_EXCEPTION_VA1(ERROR_INVALID_STATE, "Invalid State: %s", _state->getStateStr().c_str()); + } + + CAF_CM_LOG_INFO_VA0("Started"); +} + +void CSimpleAsyncTaskExecutor::cancel( + const uint32 timeoutMs) { + CAF_CM_FUNCNAME("cancel"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + if (ITaskExecutor::ETaskStateStarted == _state->getState()) { + CAF_CM_LOG_INFO_VA0("Stopping"); + _state->setState(ITaskExecutor::ETaskStateStopping); + } + + if (ITaskExecutor::ETaskStateStopping == _state->getState()) { + _state->getRunnable()->cancel(); + + // The mutex must be locked before calling waitForStop + // and before letting the thread spin up to avoid + // a race condition. See g_cond_timed_wait() + // + // Scope the CAF_THREADSIGNAL_LOCK_UNLOCK so that the + // mutex is guaranteed to unlock + { + CAF_THREADSIGNAL_LOCK_UNLOCK; + _state->waitForStop(CAF_THREADSIGNAL_MUTEX, timeoutMs); + } + + if (_state->getState() != ITaskExecutor::ETaskStateFinished) { + CAF_CM_EXCEPTION_VA1(ERROR_INVALID_STATE, "Not Stopped: %s", + _state->getStateStr().c_str()); + } + } else if (!((ITaskExecutor::ETaskStateFinished == _state->getState()) || + (ITaskExecutor::ETaskStateFailed == _state->getState()))) { + CAF_CM_EXCEPTION_VA1(ERROR_INVALID_STATE, "Invalid State: %s", + _state->getStateStr().c_str()); + } + + CAF_CM_LOG_INFO_VA0("Stopped"); +} + +ITaskExecutor::ETaskState CSimpleAsyncTaskExecutor::getState() const { + CAF_CM_FUNCNAME_VALIDATE("getState"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _state->getState(); +} + +void* CSimpleAsyncTaskExecutor::threadFunc(void* data) { + CAF_CM_STATIC_FUNC_LOG("CSimpleAsyncTaskExecutor", "threadFunc"); + + SmartPtrCSimpleAsyncTaskExecutorState state; + SmartPtrCAutoMutex mutex; + + try { + CAF_CM_VALIDATE_PTR(data); + CThreadData *threadData = static_cast(data); + CAF_CM_VALIDATE_PTR(threadData->first); + CAF_CM_VALIDATE_PTR(threadData->second); + mutex = threadData->first; + state = static_cast(threadData->second); + CAF_CM_VALIDATE_SMARTPTR(state); + + try { + CAF_CM_LOCK_UNLOCK1(mutex); + state->setState(ITaskExecutor::ETaskStateStarted); + state->signalStart(); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + + if (!CAF_CM_ISEXCEPTION) { + try { + state->getRunnable()->run(); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + } + + try { + if (CAF_CM_ISEXCEPTION) { + state->setState(ITaskExecutor::ETaskStateFailed); + + SmartPtrCIntException intException; + intException.CreateInstance(); + intException->initialize(CAF_CM_GETEXCEPTION); + state->getErrorHandler()->handleError(intException, SmartPtrIIntMessage()); + + CAF_CM_CLEAREXCEPTION; + } else { + state->setState(ITaskExecutor::ETaskStateFinished); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + + CAF_CM_LOG_INFO_VA0("**** Thread exiting ****"); + if (! state.IsNull()) { + try { + CAF_CM_VALIDATE_PTR(mutex); + CAF_CM_LOCK_UNLOCK1(mutex); + state->detach(); + state->signalStop(); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + } + + return NULL; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CSimpleAsyncTaskExecutor.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CSimpleAsyncTaskExecutor.h new file mode 100644 index 000000000..cf67abf8c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CSimpleAsyncTaskExecutor.h @@ -0,0 +1,49 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CSimpleAsyncTaskExecutor_h_ +#define CSimpleAsyncTaskExecutor_h_ + +namespace Caf { + +class INTEGRATIONCORE_LINKAGE CSimpleAsyncTaskExecutor : + public ITaskExecutor { +public: + CSimpleAsyncTaskExecutor(); + virtual ~CSimpleAsyncTaskExecutor(); + +public: + void initialize( + const SmartPtrIRunnable& runnable, + const SmartPtrIErrorHandler& errorHandler); + +public: // ITaskExecutor + void execute(const uint32 timeoutMs); + void cancel(const uint32 timeoutMs); + ETaskState getState() const; + +private: + static void* threadFunc(void* data); + +private: + bool _isInitialized; + SmartPtrCSimpleAsyncTaskExecutorState _state; + typedef std::pair CThreadData; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_THREADSIGNAL_CREATE; + CAF_CM_DECLARE_NOCOPY(CSimpleAsyncTaskExecutor); +}; + +CAF_DECLARE_SMART_POINTER(CSimpleAsyncTaskExecutor); + +} + +#endif // #ifndef CSimpleAsyncTaskExecutor_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CSimpleAsyncTaskExecutorState.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CSimpleAsyncTaskExecutorState.cpp new file mode 100644 index 000000000..f11fc9c02 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CSimpleAsyncTaskExecutorState.cpp @@ -0,0 +1,148 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CSimpleAsyncTaskExecutorState.h" + +using namespace Caf; + +CSimpleAsyncTaskExecutorState::CSimpleAsyncTaskExecutorState() : + _isInitialized(false), + _runnableState(ITaskExecutor::ETaskStateNotStarted), + CAF_CM_INIT_LOG("CSimpleAsyncTaskExecutorState") { + CAF_CM_INIT_THREADSAFE; +} + +CSimpleAsyncTaskExecutorState::~CSimpleAsyncTaskExecutorState() { +} + +void CSimpleAsyncTaskExecutorState::initialize( + const SmartPtrIRunnable& runnable, + const SmartPtrIErrorHandler& errorHandler) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(runnable); + CAF_CM_VALIDATE_INTERFACE(errorHandler); + + _runnable = runnable; + _errorHandler = errorHandler; + + _threadSignalStart.initialize("Start"); + _threadSignalStop.initialize("Stop"); + + _isInitialized = true; +} + +ITaskExecutor::ETaskState CSimpleAsyncTaskExecutorState::getState() const { + CAF_CM_FUNCNAME_VALIDATE("getState"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _runnableState; +} + +std::string CSimpleAsyncTaskExecutorState::getStateStr() const { + CAF_CM_FUNCNAME_VALIDATE("getStateStr"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + std::string rc; + switch(getState()) { + case ITaskExecutor::ETaskStateNotStarted: + rc = "NotStarted"; + break; + case ITaskExecutor::ETaskStateStarted: + rc = "Started"; + break; + case ITaskExecutor::ETaskStateStopping: + rc = "Stopping"; + break; + case ITaskExecutor::ETaskStateFinished: + rc = "Finished"; + break; + case ITaskExecutor::ETaskStateFailed: + rc = "Failed"; + break; + default: + rc = "Unknown"; + break; + } + + return rc; +} + +void CSimpleAsyncTaskExecutorState::setState( + const ITaskExecutor::ETaskState runnableState) { + CAF_CM_FUNCNAME_VALIDATE("setState"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + _runnableState = runnableState; +} + +SmartPtrIRunnable CSimpleAsyncTaskExecutorState::getRunnable() const { + CAF_CM_FUNCNAME_VALIDATE("getRunnable"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _runnable; +} + +SmartPtrIErrorHandler CSimpleAsyncTaskExecutorState::getErrorHandler() const { + CAF_CM_FUNCNAME_VALIDATE("getErrorHandler"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _errorHandler; +} + +void CSimpleAsyncTaskExecutorState::signalStart() { + CAF_CM_FUNCNAME_VALIDATE("signalStart"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CAF_CM_LOG_DEBUG_VA1("Signal (%s)", _threadSignalStart.getName().c_str()); + _threadSignalStart.signal(); +} + +void CSimpleAsyncTaskExecutorState::waitForStart( + SmartPtrCAutoMutex& mutex, + const uint32 timeoutMs) { + CAF_CM_FUNCNAME_VALIDATE("waitForStart"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CAF_CM_LOG_DEBUG_VA2("Wait (%s) - waitMs: %d", _threadSignalStart.getName().c_str(), timeoutMs); + _threadSignalStart.wait(mutex, timeoutMs); +} + +void CSimpleAsyncTaskExecutorState::signalStop() { + CAF_CM_FUNCNAME_VALIDATE("signalStop"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CAF_CM_LOG_DEBUG_VA1("Signal (%s)", _threadSignalStop.getName().c_str()); + _threadSignalStop.signal(); +} + +void CSimpleAsyncTaskExecutorState::detach() { + CAF_CM_FUNCNAME_VALIDATE("detach"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + _runnable = NULL; + _errorHandler = NULL; +} + +void CSimpleAsyncTaskExecutorState::waitForStop( + SmartPtrCAutoMutex& mutex, + const uint32 timeoutMs) { + CAF_CM_FUNCNAME_VALIDATE("waitForStop"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CAF_CM_LOG_DEBUG_VA2("Wait (%s) - waitMs: %d", _threadSignalStop.getName().c_str(), timeoutMs); + _threadSignalStop.wait(mutex, timeoutMs); +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CSimpleAsyncTaskExecutorState.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CSimpleAsyncTaskExecutorState.h new file mode 100644 index 000000000..5b33f3645 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CSimpleAsyncTaskExecutorState.h @@ -0,0 +1,60 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CSimpleAsyncTaskExecutorState_h_ +#define CSimpleAsyncTaskExecutorState_h_ + +namespace Caf { + +class INTEGRATIONCORE_LINKAGE CSimpleAsyncTaskExecutorState { +public: + CSimpleAsyncTaskExecutorState(); + virtual ~CSimpleAsyncTaskExecutorState(); + +public: + void initialize( + const SmartPtrIRunnable& runnable, + const SmartPtrIErrorHandler& errorHandler); + + SmartPtrIRunnable getRunnable() const; + SmartPtrIErrorHandler getErrorHandler() const; + ITaskExecutor::ETaskState getState() const; + std::string getStateStr() const; + + void setState(const ITaskExecutor::ETaskState runnableState); + + void signalStart(); + void waitForStart(SmartPtrCAutoMutex& mutex, const uint32 timeoutMs); + + void signalStop(); + void waitForStop(SmartPtrCAutoMutex& mutex, const uint32 timeoutMs); + + void detach(); + +private: + bool _isInitialized; + ITaskExecutor::ETaskState _runnableState; + SmartPtrIRunnable _runnable; + SmartPtrIErrorHandler _errorHandler; + std::string _exceptionMessage; + + CThreadSignal _threadSignalStart; + CThreadSignal _threadSignalStop; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_CREATE_THREADSAFE; + CAF_CM_DECLARE_NOCOPY(CSimpleAsyncTaskExecutorState); +}; + +CAF_DECLARE_SMART_POINTER(CSimpleAsyncTaskExecutorState); + +} + +#endif // #ifndef CSimpleAsyncTaskExecutorState_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CSourcePollingChannelAdapter.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CSourcePollingChannelAdapter.cpp new file mode 100644 index 000000000..0ec9b2e93 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CSourcePollingChannelAdapter.cpp @@ -0,0 +1,139 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CSourcePollingChannelAdapter.h" + +using namespace Caf; + +CSourcePollingChannelAdapter::CSourcePollingChannelAdapter() : + _isInitialized(false), + _isCancelled(false), + _isTimeoutSet(false), + _timeout(0), + CAF_CM_INIT_LOG("CSourcePollingChannelAdapter") { + CAF_CM_INIT_THREADSAFE; +} + +CSourcePollingChannelAdapter::~CSourcePollingChannelAdapter() { +} + +void CSourcePollingChannelAdapter::initialize( + const SmartPtrIMessageHandler& messageHandler, + const SmartPtrIPollableChannel& inputPollableChannel, + const SmartPtrIErrorHandler& errorHandler) { + + initialize( + messageHandler, + inputPollableChannel, + errorHandler, + 0); + _isTimeoutSet = false; +} + +void CSourcePollingChannelAdapter::initialize( + const SmartPtrIMessageHandler& messageHandler, + const SmartPtrIPollableChannel& inputPollableChannel, + const SmartPtrIErrorHandler& errorHandler, + const int32 timeout) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(messageHandler); + CAF_CM_VALIDATE_INTERFACE(inputPollableChannel); + CAF_CM_VALIDATE_INTERFACE(errorHandler); + + _messageHandler = messageHandler; + _inputPollableChannel = inputPollableChannel; + _pollerMetadata = inputPollableChannel->getPollerMetadata(); + _errorHandler = errorHandler; + _timeout = timeout; + _isTimeoutSet = true; + + _isInitialized = true; +} + +void CSourcePollingChannelAdapter::run() { + CAF_CM_FUNCNAME("run"); + + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + uint32 messageCount = 0; + SmartPtrIIntMessage message; + while (! getIsCancelled()) { + try { + if (_isTimeoutSet) { + message = _inputPollableChannel->receive(_timeout); + } else { + message = _inputPollableChannel->receive(); + } + if (! message.IsNull()) { + messageCount++; + _messageHandler->handleMessage(message); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + + if (CAF_CM_ISEXCEPTION) { + SmartPtrIIntMessage savedMessage = _messageHandler->getSavedMessage(); + if (savedMessage.IsNull()) { + savedMessage = message; + } + + SmartPtrCIntException intException; + intException.CreateInstance(); + intException->initialize(CAF_CM_GETEXCEPTION); + _errorHandler->handleError(intException, savedMessage); + + CAF_CM_CLEAREXCEPTION; + } + + if (message.IsNull() + || (messageCount >= _pollerMetadata->getMaxMessagesPerPoll())) { + CThreadUtils::sleep(_pollerMetadata->getFixedRate()); + messageCount = 0; + } + } + + CAF_CM_LOG_DEBUG_VA0("Finished"); +} + +void CSourcePollingChannelAdapter::cancel() { + CAF_CM_FUNCNAME_VALIDATE("cancel"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CAF_CM_LOG_DEBUG_VA0("Canceling"); + setIsCancelled(true); +} + +bool CSourcePollingChannelAdapter::getIsCancelled() const { + CAF_CM_FUNCNAME_VALIDATE("getIsCancelled"); + + bool isCancelled = false; + + CAF_CM_ENTER_AND_LOCK { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + isCancelled = _isCancelled; + } + CAF_CM_UNLOCK_AND_EXIT; + + return isCancelled; +} + +void CSourcePollingChannelAdapter::setIsCancelled( + const bool isCancelled) { + CAF_CM_FUNCNAME_VALIDATE("setIsCancelled"); + + CAF_CM_ENTER_AND_LOCK { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + _isCancelled = isCancelled; + } + CAF_CM_UNLOCK_AND_EXIT; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CSourcePollingChannelAdapter.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CSourcePollingChannelAdapter.h new file mode 100644 index 000000000..f90e2b0d5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CSourcePollingChannelAdapter.h @@ -0,0 +1,61 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CSourcePollingChannelAdapter_h_ +#define CSourcePollingChannelAdapter_h_ + +namespace Caf { + +class INTEGRATIONCORE_LINKAGE CSourcePollingChannelAdapter : + public IRunnable { +public: + CSourcePollingChannelAdapter(); + virtual ~CSourcePollingChannelAdapter(); + +public: + void initialize( + const SmartPtrIMessageHandler& messageHandler, + const SmartPtrIPollableChannel& inputPollableChannel, + const SmartPtrIErrorHandler& errorHandler); + + void initialize( + const SmartPtrIMessageHandler& messageHandler, + const SmartPtrIPollableChannel& inputPollableChannel, + const SmartPtrIErrorHandler& errorHandler, + const int32 timeout); + +public: // IRunnable + void run(); + void cancel(); + +private: + bool getIsCancelled() const; + void setIsCancelled(const bool isCancelled); + +private: + bool _isInitialized; + bool _isCancelled; + bool _isTimeoutSet; + int32 _timeout; + SmartPtrIMessageHandler _messageHandler; + SmartPtrIPollableChannel _inputPollableChannel; + SmartPtrIErrorHandler _errorHandler; + SmartPtrCPollerMetadata _pollerMetadata; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_CREATE_THREADSAFE; + CAF_CM_DECLARE_NOCOPY(CSourcePollingChannelAdapter); +}; + +CAF_DECLARE_SMART_POINTER(CSourcePollingChannelAdapter); + +} + +#endif // #ifndef CSourcePollingChannelAdapter_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CUnicastingDispatcher.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CUnicastingDispatcher.cpp new file mode 100644 index 000000000..c35ed3278 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CUnicastingDispatcher.cpp @@ -0,0 +1,112 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CUnicastingDispatcher.h" + +using namespace Caf; + +CUnicastingDispatcher::CUnicastingDispatcher() : + _isInitialized(false), + CAF_CM_INIT_LOG("CUnicastingDispatcher") { +} + +CUnicastingDispatcher::~CUnicastingDispatcher() { +} + +void CUnicastingDispatcher::initialize( + const SmartPtrIErrorHandler& errorHandler) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(errorHandler); + + _errorHandler = errorHandler; + _messageHandlerCollection.CreateInstance(); + + _isInitialized = true; +} + +void CUnicastingDispatcher::addHandler( + const SmartPtrIMessageHandler& messageHandler) { + CAF_CM_FUNCNAME_VALIDATE("addHandler"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(messageHandler); + + const void* handlerPtr = messageHandler.GetNonAddRefedInterface(); + _messageHandlerCollection->insert(std::make_pair(handlerPtr, messageHandler)); + +#ifdef __x86_64__ + CAF_CM_LOG_DEBUG_VA1("Added handler - %llX", handlerPtr); +#else + CAF_CM_LOG_DEBUG_VA1("Added handler - %X", handlerPtr); +#endif +} + +void CUnicastingDispatcher::removeHandler( + const SmartPtrIMessageHandler& messageHandler) { + CAF_CM_FUNCNAME_VALIDATE("removeHandler"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(messageHandler); + + const void* handlerPtr = messageHandler.GetNonAddRefedInterface(); + _messageHandlerCollection->erase(handlerPtr); + +#ifdef __x86_64__ + CAF_CM_LOG_DEBUG_VA1("Removed handler - %llX", handlerPtr); +#else + CAF_CM_LOG_DEBUG_VA1("Removed handler - %X", handlerPtr); +#endif +} + +bool CUnicastingDispatcher::dispatch( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME("dispatch"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + bool isMessageHandled = false; + + for (TSmartConstMapIterator messageHandlerIter(*_messageHandlerCollection); + ! isMessageHandled && messageHandlerIter; messageHandlerIter++) { + const SmartPtrIMessageHandler messageHandler = *messageHandlerIter; + +#ifdef __x86_64__ + CAF_CM_LOG_DEBUG_VA1("Dispatching to handler - %llX", messageHandlerIter.getKey()); +#else + CAF_CM_LOG_DEBUG_VA1("Dispatching to handler - %X", messageHandlerIter.getKey()); +#endif + try { + messageHandler->handleMessage(message); + isMessageHandled = true; + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + + try { + if (CAF_CM_ISEXCEPTION) { + CAF_CM_VALIDATE_INTERFACE(messageHandler); + SmartPtrIIntMessage savedMessage = messageHandler->getSavedMessage(); + if (savedMessage.IsNull()) { + savedMessage = message; + } + + SmartPtrCIntException intException; + intException.CreateInstance(); + intException->initialize(CAF_CM_GETEXCEPTION); + _errorHandler->handleError(intException, savedMessage); + + CAF_CM_CLEAREXCEPTION; + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + } + + return isMessageHandled; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CUnicastingDispatcher.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CUnicastingDispatcher.h new file mode 100644 index 000000000..47992fbcc --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CUnicastingDispatcher.h @@ -0,0 +1,54 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CUnicastingDispatcher_h_ +#define CUnicastingDispatcher_h_ + +namespace Caf { + +/// Sends responses/errors back to the client. +class INTEGRATIONCORE_LINKAGE CUnicastingDispatcher : + public IMessageDispatcher { +public: + CUnicastingDispatcher(); + virtual ~CUnicastingDispatcher(); + +public: + void initialize( + const SmartPtrIErrorHandler& errorHandler); + +public: // IMessageDispatcher + void addHandler( + const SmartPtrIMessageHandler& messageHandler); + + void removeHandler( + const SmartPtrIMessageHandler& messageHandler); + + bool dispatch( + const SmartPtrIIntMessage& message); + +private: + typedef std::map CIntMessageHandlerCollection; + CAF_DECLARE_SMART_POINTER(CIntMessageHandlerCollection); + +private: + bool _isInitialized; + SmartPtrIErrorHandler _errorHandler; + SmartPtrCIntMessageHandlerCollection _messageHandlerCollection; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CUnicastingDispatcher); +}; + +CAF_DECLARE_SMART_POINTER(CUnicastingDispatcher); + +} + +#endif // #ifndef CUnicastingDispatcher_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/FileHeaders.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/FileHeaders.cpp new file mode 100644 index 000000000..5810af068 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/FileHeaders.cpp @@ -0,0 +1,17 @@ +/* + * Author: bwilliams + * Created: 10/19/2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "FileHeaders.h" + +namespace Caf { + namespace FileHeaders { + const char* _sFILENAME = "file_name"; + const char* _sORIGINAL_FILE = "file_originalFile"; + } +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/FileHeaders.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/FileHeaders.h new file mode 100644 index 000000000..ae6c8bbf8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/FileHeaders.h @@ -0,0 +1,20 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef FileHeadersInc_h_ +#define FileHeadersInc_h_ + +namespace Caf { + namespace FileHeaders { + extern INTEGRATIONCORE_LINKAGE const char* _sFILENAME; + extern INTEGRATIONCORE_LINKAGE const char* _sORIGINAL_FILE; + } +} + +#endif // #ifndef FileHeadersInc_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/IntegrationCoreLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/IntegrationCoreLink.h new file mode 100644 index 000000000..0b2753912 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/IntegrationCoreLink.h @@ -0,0 +1,48 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef INTEGRATIONCORELINK_H_ +#define INTEGRATIONCORELINK_H_ + +#ifndef INTEGRATIONCORE_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define INTEGRATIONCORE_LINKAGE __declspec(dllexport) + #else + #define INTEGRATIONCORE_LINKAGE __declspec(dllimport) + #endif + #else + #define INTEGRATIONCORE_LINKAGE + #endif +#endif + +#include "FileHeaders.h" +#include "MessageHeaders.h" +#include "CIntMessageHeaders.h" +#include "CIntMessage.h" +#include "CDocument.h" +#include "CMessageHandler.h" +#include "CErrorHandler.h" +#include "CIntException.h" +#include "CChannelResolver.h" +#include "CIntegrationAppContext.h" +#include "CSimpleAsyncTaskExecutorState.h" +#include "CSimpleAsyncTaskExecutor.h" +#include "CSourcePollingChannelAdapter.h" +#include "CBroadcastingDispatcher.h" +#include "CUnicastingDispatcher.h" +#include "CChannelInterceptorAdapter.h" +#include "CAbstractMessageChannel.h" +#include "CAbstractPollableChannel.h" +#include "CMessagingTemplateHandler.h" +#include "CMessagingTemplate.h" +#include "CExpressionHandler.h" +#include "CAbstractMessageRouter.h" +#include "CMessageHeaderUtils.h" + +#endif /* INTEGRATIONCORELINK_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/MessageHeaders.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/MessageHeaders.cpp new file mode 100644 index 000000000..00ebc282d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/MessageHeaders.cpp @@ -0,0 +1,58 @@ +/* + * Author: bwilliams + * Created: 10/19/2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "MessageHeaders.h" + +namespace Caf { + namespace MessageHeaders { + // UUID stored as a string + const char* _sID = "id"; + + // int64 + const char* _sTIMESTAMP = "timestamp"; + + // string + const char* _sCORRELATION_ID = "correlationId"; + + // string + const char* _sREPLY_CHANNEL = "replyChannel"; + + // string + const char* _sERROR_CHANNEL = "errorChannel"; + + // int64 + const char* _sEXPIRATION_DATE = "expirationDate"; + + // int32 + const char* _sPRIORITY = "priority"; + + // int32 + const char* _sSEQUENCE_NUMBER = "sequenceNumber"; + + // int32 + const char* _sSEQUENCE_SIZE = "sequenceSize"; + + const char* _sIS_THROWABLE = "_isThrowable_"; + + // string + const char* _sREQUEST_ID = "caf.msg.requestid"; + + // boolean + const char* _sMULTIPART = "caf.msg.multipart"; + + // string + const char* _sMULTIPART_WORKING_DIR = "cafcomm.internal.multipart-working-dir"; + + // string + const char* _sPROTOCOL_TYPE = "caf.protocolType"; + + // string + const char* _sPROTOCOL_CONNSTR = "caf.connStr"; + } +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/MessageHeaders.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/MessageHeaders.h new file mode 100644 index 000000000..836b92b38 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/MessageHeaders.h @@ -0,0 +1,64 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef MessageHeadersInc_h_ +#define MessageHeadersInc_h_ + +namespace Caf { + namespace MessageHeaders { + // UUID stored as a string + extern INTEGRATIONCORE_LINKAGE const char* _sID; + + // int64 + extern INTEGRATIONCORE_LINKAGE const char* _sTIMESTAMP; + + // string + extern INTEGRATIONCORE_LINKAGE const char* _sCORRELATION_ID; + + // string + extern INTEGRATIONCORE_LINKAGE const char* _sREPLY_CHANNEL; + + // string + extern INTEGRATIONCORE_LINKAGE const char* _sERROR_CHANNEL; + + // int64 + extern INTEGRATIONCORE_LINKAGE const char* _sEXPIRATION_DATE; + + // int32 + extern INTEGRATIONCORE_LINKAGE const char* _sPRIORITY; + + // int32 + extern INTEGRATIONCORE_LINKAGE const char* _sSEQUENCE_NUMBER; + + // int32 + extern INTEGRATIONCORE_LINKAGE const char* _sSEQUENCE_SIZE; + + extern INTEGRATIONCORE_LINKAGE const char* _sIS_THROWABLE; + + // string + extern INTEGRATIONCORE_LINKAGE const char* _sREQUEST_ID; + + // boolean + extern INTEGRATIONCORE_LINKAGE const char* _sMULTIPART; + + // string + extern INTEGRATIONCORE_LINKAGE const char* _sMULTIPART_WORKING_DIR; + + // string + extern INTEGRATIONCORE_LINKAGE const char* _sMESSAGE_TYPE; + + // string + extern INTEGRATIONCORE_LINKAGE const char* _sPROTOCOL_TYPE; + + // string + extern INTEGRATIONCORE_LINKAGE const char* _sPROTOCOL_CONNSTR; + } +}; + +#endif // #ifndef MessageHeadersInc_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/stdafx.h new file mode 100644 index 000000000..2b96f1c9c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/stdafx.h @@ -0,0 +1,41 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define INTEGRATIONCORE_LINKAGE __declspec(dllexport) +#else + #define INTEGRATIONCORE_LINKAGE +#endif + +#include +#include + +#include "FileHeaders.h" +#include "MessageHeaders.h" +#include "CIntMessageHeaders.h" +#include "CIntMessage.h" +#include "CDocument.h" +#include "CMessageHandler.h" +#include "CErrorHandler.h" +#include "CIntException.h" +#include "CChannelResolver.h" +#include "CIntegrationAppContext.h" +#include "CSimpleAsyncTaskExecutorState.h" +#include "CSimpleAsyncTaskExecutor.h" +#include "CSourcePollingChannelAdapter.h" +#include "CBroadcastingDispatcher.h" +#include "CUnicastingDispatcher.h" + +#include "CMessagingTemplateHandler.h" +#include "CMessagingTemplate.h" + + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Logging/CLogger.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Logging/CLogger.cpp new file mode 100644 index 000000000..582b8c7e0 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Logging/CLogger.cpp @@ -0,0 +1,109 @@ +/* + * Author: bwilliams + * Created: 1/14/2011 + * + * Copyright (c) 2009-2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CLogger.h" + +using namespace Caf; + +CLogger::CLogger(const char* className) : + _category(log4cpp::Category::getInstance(className)) { +} + +CLogger::~CLogger() { +} + +void CLogger::log( + const log4cpp::Priority::PriorityLevel priority, + const char* funcName, + const int32 lineNumber, + const CCafException* cafException) const { + + if(_category.isPriorityEnabled(priority) && (NULL != cafException)) { + logVA(priority, funcName, lineNumber, "0x%08X %s", cafException->getError(), + cafException->getFullMsg().c_str()); + logBacktrace(log4cpp::Priority::INFO, funcName, lineNumber, + *cafException->getBacktrace()); + } +} + +void CLogger::logMessage( + const log4cpp::Priority::PriorityLevel priority, + const char* funcName, + const int32 lineNumber, + const char* message) const { + + if(_category.isPriorityEnabled(priority)) { + std::stringstream fullMsg; + fullMsg << + funcName << "|" << + lineNumber << "|" << + message; + + _category.log(priority, fullMsg.str()); + } +} + +void CLogger::logVA( + const log4cpp::Priority::PriorityLevel priority, + const char* funcName, + const int32 lineNumber, + const char* format, + ...) const { + + const int16 logLineLen = 1024; + if(_category.isPriorityEnabled(priority)) { + char buffer [logLineLen]; + va_list args; + va_start(args, format); +#ifdef WIN32 + // Returns -1 if the buffer is truncated. + const int rc = vsnprintf_s(buffer, logLineLen, _TRUNCATE, format, args); + if (! ((rc > 0) || (rc == -1))) { + ::strcpy_s(buffer, "*** INTERNAL ERROR: UNABLE TO FORMAT MESSAGE ***"); +#else + const int rc = vsnprintf(buffer, logLineLen, format, args); + if (! (rc > 0)) { + ::strcpy(buffer, "*** INTERNAL ERROR: UNABLE TO FORMAT MESSAGE ***"); +#endif + } + + std::stringstream fullMsg; + fullMsg << + funcName << "|" << + lineNumber << "|" << + buffer; + + _category.log(priority, fullMsg.str()); + + va_end(args); + } +} + +bool CLogger::isPriorityEnabled(const log4cpp::Priority::PriorityLevel priority) const { + return _category.isPriorityEnabled(priority); +} + +void CLogger::logBacktrace( + const log4cpp::Priority::PriorityLevel priority, + const char* funcName, + const int32 lineNumber, + const std::deque& backtrace) const { + + if (backtrace.empty()) { + logVA(priority, funcName, lineNumber, "Backtrace is empty"); + } else { + for (std::deque::const_iterator iter = backtrace.begin(); + iter != backtrace.end(); iter++) { + std::string name = *iter; + if (!name.empty()) { + logVA(priority, funcName, lineNumber, "%s", name.c_str()); + } + } + } +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Logging/CLogger.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Logging/CLogger.h new file mode 100644 index 000000000..e053ea3e4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Logging/CLogger.h @@ -0,0 +1,58 @@ +/* + * Author: bwilliams + * Created: 1/14/2011 + * + * Copyright (c) 2009-2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CLogger_h_ +#define CLogger_h_ + +namespace Caf { + +class LOGGING_LINKAGE CLogger +{ +public: + CLogger(const char* className); + virtual ~CLogger(); + +public: + void log( + const log4cpp::Priority::PriorityLevel priority, + const char* funcName, + const int32 lineNumber, + const CCafException* cafException) const; + + void logMessage( + const log4cpp::Priority::PriorityLevel priority, + const char* funcName, + const int32 lineNumber, + const char* message) const; + + void logVA( + const log4cpp::Priority::PriorityLevel priority, + const char* funcName, + const int32 lineNumber, + const char* format, + ...) const; + + void logBacktrace( + const log4cpp::Priority::PriorityLevel priority, + const char* funcName, + const int32 lineNumber, + const std::deque& backtrace) const; + + bool isPriorityEnabled(const log4cpp::Priority::PriorityLevel priority) const; + +private: + log4cpp::Category& _category; + +private: + CLogger(const CLogger&); + CLogger& operator=(const CLogger&); +}; + +} + +#endif // #define CLogger_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Logging/LoggingLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Logging/LoggingLink.h new file mode 100644 index 000000000..4124ee92d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Logging/LoggingLink.h @@ -0,0 +1,38 @@ +/* + * Author: bwilliams + * Created: Jan 13, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef LOGGINGLINK_H_ +#define LOGGINGLINK_H_ + +#ifndef LOGGING_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define LOGGING_LINKAGE __declspec(dllexport) + #else + #define LOGGING_LINKAGE __declspec(dllimport) + #endif + #else + #define LOGGING_LINKAGE + #endif +#endif + +#include +#include +#define LOG4CPP_FIX_ERROR_COLLISION 1 +#include +#include +#include +#include +#include + +#include "../Exception/ExceptionLink.h" + +#include "CLogger.h" +#include "LoggingMacros.h" + +#endif /* LOGGINGLINK_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Logging/LoggingMacros.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Logging/LoggingMacros.h new file mode 100644 index 000000000..38ef95916 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Logging/LoggingMacros.h @@ -0,0 +1,249 @@ +/* + * Author: bwilliams + * Created: 1/14/2011 + * + * Copyright (c) 2009-2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef LoggingMacros_h_ +#define LoggingMacros_h_ + +#define CAF_CM_CREATE_LOG \ + private: \ + CLogger _logger + +#define CAF_CM_INIT_LOG( _className_ ) \ + _cm_className_( _className_ ), \ + _logger(_className_) + +#define CAF_CM_STATIC_FUNC_LOG_VALIDATE( _scope_, _funcName_ ) \ + CLogger _logger(_scope_); \ + CAF_CM_STATIC_FUNC_VALIDATE( _scope_, _funcName_ ) + +#define CAF_CM_STATIC_FUNC_LOG_ONLY( _scope_, _funcName_ ) \ + CLogger _logger(_scope_); \ + CAF_CM_FUNCNAME_VALIDATE( _funcName_ ) + +#define CAF_CM_STATIC_FUNC_LOG( _scope_, _funcName_ ) \ + CLogger _logger(_scope_); \ + CAF_CM_STATIC_FUNC( _scope_, _funcName_ ) + +#define CAF_CM_IS_LOG_ENABLED(_priorityLevel_) (_logger.isPriorityEnabled(_priorityLevel_)) +#define CAF_CM_IS_LOG_DEBUG_ENABLED (_logger.isPriorityEnabled(log4cpp::Priority::DEBUG)) +#define CAF_CM_IS_LOG_INFO_ENABLED (_logger.isPriorityEnabled(log4cpp::Priority::INFO)) +#define CAF_CM_IS_LOG_WARN_ENABLED (_logger.isPriorityEnabled(log4cpp::Priority::WARN)) +#define CAF_CM_IS_LOG_ERROR_ENABLED (_logger.isPriorityEnabled(log4cpp::Priority::ERROR)) +#define CAF_CM_IS_LOG_CRIT_ENABLED (_logger.isPriorityEnabled(log4cpp::Priority::CRIT)) + +/* + * Provide priority level + */ +#define CAF_CM_LOG_CAFEXCEPTION(_priorityLevel_) { \ + _logger.log(_priorityLevel_, _cm_funcName_, __LINE__, _cm_exception_); \ + } + +#define CAF_CM_LOG_VA0(_priorityLevel_, _msg_) { \ + _logger.logMessage(_priorityLevel_, _cm_funcName_, __LINE__, _msg_); \ + } + +#define CAF_CM_LOG_VA1(_priorityLevel_, _fmt_, _arg1_) { \ + _logger.logVA(_priorityLevel_, _cm_funcName_, __LINE__, _fmt_, _arg1_); \ + } + +#define CAF_CM_LOG_VA2(_priorityLevel_, _fmt_, _arg1_, _arg2_) { \ + _logger.logVA(_priorityLevel_, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_); \ + } + +#define CAF_CM_LOG_VA3(_priorityLevel_, _fmt_, _arg1_, _arg2_, _arg3_) { \ + _logger.logVA(_priorityLevel_, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_); \ + } + +#define CAF_CM_LOG_VA4(_priorityLevel_, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_) { \ + _logger.logVA(_priorityLevel_, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_); \ + } + +#define CAF_CM_LOG_VA5(_priorityLevel_, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_) { \ + _logger.logVA(_priorityLevel_, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_); \ + } + +#define CAF_CM_LOG_VA6(_priorityLevel_, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_, _arg6_) { \ + _logger.logVA(_priorityLevel_, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_, _arg6_); \ + } + +/* + * Debug Macros + */ +#define CAF_CM_LOG_DEBUG_CAFEXCEPTION { \ + _logger.log(log4cpp::Priority::DEBUG, _cm_funcName_, __LINE__, _cm_exception_); \ + } + +#define CAF_CM_LOG_DEBUG_VA0(_msg_) { \ + _logger.logMessage(log4cpp::Priority::DEBUG, _cm_funcName_, __LINE__, _msg_); \ + } + +#define CAF_CM_LOG_DEBUG_VA1(_fmt_, _arg1_) { \ + _logger.logVA(log4cpp::Priority::DEBUG, _cm_funcName_, __LINE__, _fmt_, _arg1_); \ + } + +#define CAF_CM_LOG_DEBUG_VA2(_fmt_, _arg1_, _arg2_) { \ + _logger.logVA(log4cpp::Priority::DEBUG, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_); \ + } + +#define CAF_CM_LOG_DEBUG_VA3(_fmt_, _arg1_, _arg2_, _arg3_) { \ + _logger.logVA(log4cpp::Priority::DEBUG, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_); \ + } + +#define CAF_CM_LOG_DEBUG_VA4(_fmt_, _arg1_, _arg2_, _arg3_, _arg4_) { \ + _logger.logVA(log4cpp::Priority::DEBUG, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_); \ + } + +#define CAF_CM_LOG_DEBUG_VA5(_fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_) { \ + _logger.logVA(log4cpp::Priority::DEBUG, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_); \ + } + +#define CAF_CM_LOG_DEBUG_VA6(_fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_, _arg6_) { \ + _logger.logVA(log4cpp::Priority::DEBUG, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_, _arg6_); \ + } + +/* + * Info Macros + */ +#define CAF_CM_LOG_INFO_CAFEXCEPTION { \ + _logger.log(log4cpp::Priority::INFO, _cm_funcName_, __LINE__, _cm_exception_); \ + } + +#define CAF_CM_LOG_INFO_VA0(_msg_) { \ + _logger.logMessage(log4cpp::Priority::INFO, _cm_funcName_, __LINE__, _msg_); \ + } + +#define CAF_CM_LOG_INFO_VA1(_fmt_, _arg1_) { \ + _logger.logVA(log4cpp::Priority::INFO, _cm_funcName_, __LINE__, _fmt_, _arg1_); \ + } + +#define CAF_CM_LOG_INFO_VA2(_fmt_, _arg1_, _arg2_) { \ + _logger.logVA(log4cpp::Priority::INFO, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_); \ + } + +#define CAF_CM_LOG_INFO_VA3(_fmt_, _arg1_, _arg2_, _arg3_) { \ + _logger.logVA(log4cpp::Priority::INFO, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_); \ + } + +#define CAF_CM_LOG_INFO_VA4(_fmt_, _arg1_, _arg2_, _arg3_, _arg4_) { \ + _logger.logVA(log4cpp::Priority::INFO, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_); \ + } + +#define CAF_CM_LOG_INFO_VA5(_fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_) { \ + _logger.logVA(log4cpp::Priority::INFO, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_); \ + } + +#define CAF_CM_LOG_INFO_VA6(_fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_, _arg6_) { \ + _logger.logVA(log4cpp::Priority::INFO, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_, _arg6_); \ + } + +/* + * Warn Macros + */ +#define CAF_CM_LOG_WARN_CAFEXCEPTION { \ + _logger.log(log4cpp::Priority::WARN, _cm_funcName_, __LINE__, _cm_exception_); \ + } + +#define CAF_CM_LOG_WARN_VA0(_msg_) { \ + _logger.logMessage(log4cpp::Priority::WARN, _cm_funcName_, __LINE__, _msg_); \ + } + +#define CAF_CM_LOG_WARN_VA1(_fmt_, _arg1_) { \ + _logger.logVA(log4cpp::Priority::WARN, _cm_funcName_, __LINE__, _fmt_, _arg1_); \ + } + +#define CAF_CM_LOG_WARN_VA2(_fmt_, _arg1_, _arg2_) { \ + _logger.logVA(log4cpp::Priority::WARN, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_); \ + } + +#define CAF_CM_LOG_WARN_VA3(_fmt_, _arg1_, _arg2_, _arg3_) { \ + _logger.logVA(log4cpp::Priority::WARN, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_); \ + } + +#define CAF_CM_LOG_WARN_VA4(_fmt_, _arg1_, _arg2_, _arg3_, _arg4_) { \ + _logger.logVA(log4cpp::Priority::WARN, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_); \ + } + +#define CAF_CM_LOG_WARN_VA5(_fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_) { \ + _logger.logVA(log4cpp::Priority::WARN, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_); \ + } + +#define CAF_CM_LOG_WARN_VA6(_fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_, _arg6_) { \ + _logger.logVA(log4cpp::Priority::WARN, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_, _arg6_); \ + } + +/* + * Error Macros + */ +#define CAF_CM_LOG_ERROR_CAFEXCEPTION { \ + _logger.log(log4cpp::Priority::ERROR, _cm_funcName_, __LINE__, _cm_exception_); \ + } + +#define CAF_CM_LOG_ERROR_VA0(_msg_) { \ + _logger.logMessage(log4cpp::Priority::ERROR, _cm_funcName_, __LINE__, _msg_); \ + } + +#define CAF_CM_LOG_ERROR_VA1(_fmt_, _arg1_) { \ + _logger.logVA(log4cpp::Priority::ERROR, _cm_funcName_, __LINE__, _fmt_, _arg1_); \ + } + +#define CAF_CM_LOG_ERROR_VA2(_fmt_, _arg1_, _arg2_) { \ + _logger.logVA(log4cpp::Priority::ERROR, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_); \ + } + +#define CAF_CM_LOG_ERROR_VA3(_fmt_, _arg1_, _arg2_, _arg3_) { \ + _logger.logVA(log4cpp::Priority::ERROR, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_); \ + } + +#define CAF_CM_LOG_ERROR_VA4(_fmt_, _arg1_, _arg2_, _arg3_, _arg4_) { \ + _logger.logVA(log4cpp::Priority::ERROR, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_); \ + } + +#define CAF_CM_LOG_ERROR_VA5(_fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_) { \ + _logger.logVA(log4cpp::Priority::ERROR, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_); \ + } + +#define CAF_CM_LOG_ERROR_VA6(_fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_, _arg6_) { \ + _logger.logVA(log4cpp::Priority::ERROR, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_, _arg6_); \ + } + +/* + * Crit Macros + */ +#define CAF_CM_LOG_CRIT_CAFEXCEPTION { \ + _logger.log(log4cpp::Priority::CRIT, _cm_funcName_, __LINE__, _cm_exception_); \ + } + +#define CAF_CM_LOG_CRIT_VA0(_msg_) { \ + _logger.logMessage(log4cpp::Priority::CRIT, _cm_funcName_, __LINE__, _msg_); \ + } + +#define CAF_CM_LOG_CRIT_VA1(_fmt_, _arg1_) { \ + _logger.logVA(log4cpp::Priority::CRIT, _cm_funcName_, __LINE__, _fmt_, _arg1_); \ + } + +#define CAF_CM_LOG_CRIT_VA2(_fmt_, _arg1_, _arg2_) { \ + _logger.logVA(log4cpp::Priority::CRIT, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_); \ + } + +#define CAF_CM_LOG_CRIT_VA3(_fmt_, _arg1_, _arg2_, _arg3_) { \ + _logger.logVA(log4cpp::Priority::CRIT, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_); \ + } + +#define CAF_CM_LOG_CRIT_VA4(_fmt_, _arg1_, _arg2_, _arg3_, _arg4_) { \ + _logger.logVA(log4cpp::Priority::CRIT, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_); \ + } + +#define CAF_CM_LOG_CRIT_VA5(_fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_) { \ + _logger.logVA(log4cpp::Priority::CRIT, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_); \ + } + +#define CAF_CM_LOG_CRIT_VA6(_fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_, _arg6_) { \ + _logger.logVA(log4cpp::Priority::CRIT, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_, _arg6_); \ + } + +#endif // #define LoggingMacros_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Logging/log4cpp_config b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Logging/log4cpp_config new file mode 100644 index 000000000..2f1b769af --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Logging/log4cpp_config @@ -0,0 +1,24 @@ +log4j.rootCategory=DEBUG, myfile +log4j.category.CTest1=NOTSET + +log4j.appender.console=org.apache.log4j.ConsoleAppender +log4j.appender.console.layout=org.apache.log4j.BasicLayout + +log4j.appender.myfile=org.apache.log4j.FileAppender +log4j.appender.myfile.fileName=log4cpp_file.log +#log4j.appender.myfile.layout=org.apache.log4j.BasicLayout +#log4j.appender.myfile.layout=org.apache.log4j.SimpleLayout +log4j.appender.myfile.layout=org.apache.log4j.PatternLayout +log4j.appender.myfile.layout.ConversionPattern=%p|%d{ISO8601}|%t|%c|%m%n +#log4j.appender.myfile.layout.ConversionPattern=c=%c|d=%d|m=%m|p=%p|r=%r|t=%t|x=%x|%n +#log4j.appender.myfile.layout.ConversionPattern=%-6r [%15.15t] %-5p %30.30c %x - %m%n + +log4j.appender.rolling=org.apache.log4j.RollingFileAppender +log4j.appender.rolling.fileName=log4cpp_rolling.log + +log4j.appender.rolling.MaxFileSize=100KB +# Keep one backup file +log4j.appender.rolling.MaxBackupIndex=1 + +log4j.appender.rolling.layout=org.apache.log4j.PatternLayout +log4j.appender.rolling.layout.ConversionPattern=%-6r [%15.15t] %-5p %30.30c %x - %m%n diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Logging/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Logging/stdafx.h new file mode 100644 index 000000000..7bddb789f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Logging/stdafx.h @@ -0,0 +1,35 @@ +/* + * Author: mdonahue + * Created: Jan 13, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define LOGGING_LINKAGE __declspec(dllexport) + #define COMMONAGGREGATOR_LINKAGE __declspec(dllexport) +#else + #define LOGGING_LINKAGE + #define COMMONAGGREGATOR_LINKAGE +#endif + +#include +#include +#include +#define LOG4CPP_FIX_ERROR_COLLISION 1 +#include +//#include +//#include +//#include +//#include + +#include "../Exception/ExceptionLink.h" + +#include "CLogger.h" +#include "LoggingMacros.h" + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Memory/DynamicArray/DynamicArrayInc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Memory/DynamicArray/DynamicArrayInc.h new file mode 100644 index 000000000..76b2cee62 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Memory/DynamicArray/DynamicArrayInc.h @@ -0,0 +1,50 @@ +/////////////////////////////////////////////////////////////////////////////////////////// +// +// Author: Michael Donahue +// +// Created: 05/03/2004 +// +// Copyright (c) 2011 Vmware, Inc. All rights reserved. +// -- VMware Confidential +// +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifndef DynamicArrayInc_h_ +#define DynamicArrayInc_h_ + +#include "SDynamicArrayMallocAllocator.h" + +namespace Caf { + +template +class TDynamicArray; + +template +class TCharAdapter; + +template +class TWCharAdapter; + +template +class TByteAdapter; + +typedef TDynamicArray CDynamicByteArray; +typedef TCharAdapter > > CDynamicCharArray; +typedef TWCharAdapter > > CDynamicWCharArray; + +} + +#include "TDynamicArray.h" +#include "TByteAdapter.h" +#include "TCharAdapter.h" +#include "TWCharAdapter.h" + +namespace Caf { + +CAF_DECLARE_SMART_POINTER(CDynamicByteArray); +CAF_DECLARE_SMART_POINTER(CDynamicCharArray); +CAF_DECLARE_SMART_POINTER(CDynamicWCharArray); + +} + +#endif // #ifdef DynamicArrayInc_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Memory/DynamicArray/SDynamicArrayMallocAllocator.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Memory/DynamicArray/SDynamicArrayMallocAllocator.h new file mode 100644 index 000000000..cca952358 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Memory/DynamicArray/SDynamicArrayMallocAllocator.h @@ -0,0 +1,30 @@ +/* + * Author: mdonahue + * Created: Feb 15, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef SDYNAMICARRAYMALLOCALLOCATOR_H_ +#define SDYNAMICARRAYMALLOCALLOCATOR_H_ + +namespace Caf { + +struct SDynamicArrayMallocAllocator { + static void* allocMemory( const uint32 cdwAllocSize ) + { + return ::malloc( cdwAllocSize ); + } + + static void freeMemory( void* pvFree ) + { + if ( NULL != pvFree ) + { + ::free( pvFree ); + } + } +}; +} + +#endif /* SDYNAMICARRAYMALLOCALLOCATOR_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Memory/DynamicArray/TByteAdapter.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Memory/DynamicArray/TByteAdapter.h new file mode 100644 index 000000000..f0e881ae8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Memory/DynamicArray/TByteAdapter.h @@ -0,0 +1,104 @@ +////////////////////////////////////////////////////////////////////////////// +// +// $Workfile: TByteAdapter.h $ +// +// Author: Phil Smith +// +// Purpose: This template provides the ability to use a ${TDynamicArray} +// or a TStaticArray where a byte pointer is required. It +// provides a const byte* pointer conversion operator for use +// when read only access is required and a function to get the +// pointer for write access. Use the byte adapter as follows: +// TByteAdapter > +// +// Predefined character array objects CEcmCharArray and +// CEcmWCharArray which use the byte adapter have been provided +// in EcmCommonStaticMinDepInc.h. +// +// Created: Tuesday, August 20, 2002 10:00:00 AM +// +// Copyright (c) 2011 Vmware, Inc. All rights reserved. +// -- VMware Confidential +// +// Modification History: +// +// $Log: //wpbuild01/PvcsData/ECM_40/archives/ECM_41/WinNT/Source/CommonAgtCol/Cpp/EcmCommonStaticMinDep/TByteAdapter.h-arc $ +// +// Rev 1.4 17 Sep 2003 09:43:12 Michael.Donahue +// Implemented hooks for new library model +// +// Rev 1.3 31 Oct 2002 13:58:02 Greg.Burk +// Modified as per code review recomendations. +// +// Rev 1.2 15 Oct 2002 17:22:58 Phillip.Smith +// Documentation updates. +// +// Rev 1.0 09 Oct 2002 13:42:12 brian.williams +// Initial revision. +// +////////////////////////////////////////////////////////////////////////////// +#ifndef _TByteAdapter_H_ +#define _TByteAdapter_H_ + +namespace Caf { + +template +class TByteAdapter : public T +{ +public: + ////////////////////////////////////////////////////////////////////////// + // Default Constructor + ////////////////////////////////////////////////////////////////////////// + TByteAdapter(const wchar_t * pwszDesc = NULL) {} + + ////////////////////////////////////////////////////////////////////////// + // Destructor + ////////////////////////////////////////////////////////////////////////// + ~TByteAdapter() {} + + ////////////////////////////////////////////////////////////////////////// + // GetNonConstBytePtr + // + // Get non-const pointer to internal data converted to btye *. + // This function should be used only when you must get a pointer that is + // to be written to, and you should always call the ${TDynamicArray::Verify()} + // function after modifying the data pointed to by this pointer or passing + // the pointer to a function that modifies the data pointed to by this + // pointer. + ////////////////////////////////////////////////////////////////////////// + byte * getNonConstBytePtr() + { + this->verify(); + return reinterpret_cast(this->getNonConstPtr()); + } + + ////////////////////////////////////////////////////////////////////////// + // GetBytePtr + // + // Get const pointer to internal data converted to btye *. + ////////////////////////////////////////////////////////////////////////// + const byte * getBytePtr() const + { + this->verify(); + return reinterpret_cast(this->getPtr()); + } + + ////////////////////////////////////////////////////////////////////////// + // const byte Conversion Operator + // + // Get const pointer to internal data converted to btye *. + ////////////////////////////////////////////////////////////////////////// + operator const byte * () const + { + this->verify(); + return reinterpret_cast(this->getPtr()); + } + +private: + TByteAdapter(const TByteAdapter & crRhs); + TByteAdapter & operator=(const TByteAdapter & crRhs); +}; + +} + +#endif // _TByteAdapter_H_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Memory/DynamicArray/TCharAdapter.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Memory/DynamicArray/TCharAdapter.h new file mode 100644 index 000000000..15574a3f9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Memory/DynamicArray/TCharAdapter.h @@ -0,0 +1,401 @@ +////////////////////////////////////////////////////////////////////////////// +// +// $Workfile: TCharAdapter.h $ +// +// Author: Greg Burk +// +// Purpose: This template provides an adapter for TDynamicArray (or +// other types of "safe" array classes) that exposes functions +// that are useful when working with an array of type char. +// +// A typedef of this class is already defined and should be +// used instead of explicitly using this class. The typedef +// is CEcmCharArray. +// +// Created: Friday, October 18, 2002 1:50:32 PM +// +// Copyright (c) 2011 Vmware, Inc. All rights reserved. +// -- VMware Confidential +// +// Modification History: +// +// $Log: //wpbuild01/PvcsData/ECM_40/archives/ECM_41/WinNT/Source/CommonAgtCol/Cpp/EcmCommonStaticMinDep/TCharAdapter.h-arc $ +// +// Rev 1.3 10 Oct 2003 08:49:24 Michael.Donahue +// Fixed bug in StrCpy +// +// Rev 1.2 17 Sep 2003 09:43:12 Michael.Donahue +// Implemented hooks for new library model +// +// Rev 1.1 16 Jan 2003 11:17:52 Greg.Burk +// Made changes necessary to accomodate new CEcmBasicString class and changes to CEcmString. +// +// Rev 1.0 31 Oct 2002 10:43:06 Greg.Burk +// Initial Revision +// +////////////////////////////////////////////////////////////////////////////// +#ifndef _TCharAdapter_H_ +#define _TCharAdapter_H_ + +#include + +namespace Caf { + +template +class TCharAdapter : public T +{ +public: + ////////////////////////////////////////////////////////////////////////// + // Default Constructor + ////////////////////////////////////////////////////////////////////////// + TCharAdapter() {} + + ////////////////////////////////////////////////////////////////////////// + // Conversion Constructor + ////////////////////////////////////////////////////////////////////////// + TCharAdapter(const wchar_t * rhs) + { + wideToMultiByte(rhs); + } + + ////////////////////////////////////////////////////////////////////////// + // Conversion Constructor + ////////////////////////////////////////////////////////////////////////// + TCharAdapter(const char * rhs) + { + (*this) = rhs; + } + + ////////////////////////////////////////////////////////////////////////// + // Destructor + ////////////////////////////////////////////////////////////////////////// + ~TCharAdapter() {} + + ////////////////////////////////////////////////////////////////////////// + // Assignment operator + ////////////////////////////////////////////////////////////////////////// + TCharAdapter& operator=(const wchar_t * rhs) + { + wideToMultiByte(rhs); + return *this; + } + + ////////////////////////////////////////////////////////////////////////// + // Assignment operator + ////////////////////////////////////////////////////////////////////////// + TCharAdapter& operator=(const char * rhs) + { + const uint32 culLength = ::strlen(rhs); + + if(culLength > 0) + { + this->allocateELements(culLength); + strnCpy(rhs, culLength); + } + + return *this; + } + + ////////////////////////////////////////////////////////////////////////////// + // MakeLower() + // + // Converts all of the upper-case characters in this string to lower-case. + ////////////////////////////////////////////////////////////////////////////// + void makeLower() + { + // Pre-validation. + this->verifySentinal(); + + if(!this->IsNull()) + { + strlwr(this->m_ptData); + } + + // Post-validation. + this->verifySentinal(); + } + + ////////////////////////////////////////////////////////////////////////// + // MakeUpper + // + // Converts all of the lower-case characters in this array to upper-case. + ////////////////////////////////////////////////////////////////////////// + void makeUpper() + { + // Pre-validation. + this->verifySentinal(); + + if(!this->isNull()) + { + strupr(this->m_ptData); + } + + // Post-validation. + this->verifySentinal(); + } + + ////////////////////////////////////////////////////////////////////////// + // Reverse + // + // Reverses the characters in the array. + ////////////////////////////////////////////////////////////////////////// + void reverse() + { + // Pre-validation. + this->verifySentinal(); + + if(!this->isNull()) + { + strrev( this->m_ptData ); + } + + // Post-validation. + this->verifySentinal(); + } + + ////////////////////////////////////////////////////////////////////////// + // StrLen + // + // Return the length of the string. + ////////////////////////////////////////////////////////////////////////// + size_t strLen() const + { + size_t stRetVal = 0; + + // Pre-validation. + this->verifySentinal(); + this->verifyNotNull(); + + // Delegate to CEcmCtr. + stRetVal = ::strlen(this->m_ptData); + + // Post-validation. + this->verifyLength(static_cast(stRetVal)); + + return stRetVal; + } + + ////////////////////////////////////////////////////////////////////////// + // StrCpy + // + // Make a copy of the string into the buffer. + ////////////////////////////////////////////////////////////////////////// + TCharAdapter & strCpy(const char * cpszSource) + { + // Pre-validation. + this->verifySentinal(); + this->verifyNotNull(); + + // Get the length of the source string. + uint32 dwSourceLength = ::strlen(cpszSource); + + // Make sure the string will fit if we copy it. + this->verifyLength(dwSourceLength); + + // Copy the string into the buffer. + ::strcpy(this->m_ptData, cpszSource); + + // Post-validation. + this->verifySentinal(); + + return (*this); + } + + ////////////////////////////////////////////////////////////////////////// + // StrnCpy + // + // Make a copy of the string into the buffer upto culCount characters. + ////////////////////////////////////////////////////////////////////////// + TCharAdapter & strnCpy(const char * cpszSource, const uint32 culCount) + { + // Pre-validation. + this->verifySentinal(); + this->verifyNotNull(); + + // Make sure the string will fit if we copy it. + this->verifyLength(culCount); + + // Copy the string into the buffer. + ::strncpy(this->m_ptData, cpszSource, culCount); + + // Post-validation. + this->verifySentinal(); + + return (*this); + } + + ////////////////////////////////////////////////////////////////////////// + // StrStr + // + // Find the substring cpszSubString in the array. Returns the pointer to + // the first occurance of the substring in the array or NULL if the + // substring is not found. + ////////////////////////////////////////////////////////////////////////// + const char * strStr(const char * cpszSubString) const + { + const char * cpszRetVal = NULL; + + // Pre-validation. + this->verifySentinal(); + this->verifyNotNull(); + + // Find the substring. + cpszRetVal = ::strstr(this->m_ptData, cpszSubString); + + // Post-validation. + this->verifySentinal(); + + return cpszRetVal; + } + + ////////////////////////////////////////////////////////////////////////// + // StrCmp + // + // Compare the cpszString to this array. + ////////////////////////////////////////////////////////////////////////// + int32 strCmp(const char * cpszString) const + { + int32 iRetVal = 0; + + // Pre-validation. + this->verifySentinal(); + this->verifyNotNull(); + + // Compare the strings. + iRetVal = ::strcmp(this->m_ptData, cpszString); + + return iRetVal; + } + + ////////////////////////////////////////////////////////////////////////// + // StriCmp + // + // Compare the cpszString to this array (case insensitive). + ////////////////////////////////////////////////////////////////////////// + int32 striCmp(const char * cpszString) const + { + int32 iRetVal = 0; + + // Pre-validation. + this->verifySentinal(); + this->verifyNotNull(); + + // Compare the strings. + iRetVal = stricmp(this->m_ptData, cpszString); + + return iRetVal; + } + + ////////////////////////////////////////////////////////////////////////// + // StrnCmp + // + // Compare the cpszString to this array up to culCount characters. + ////////////////////////////////////////////////////////////////////////// + int32 strnCmp(const char * cpszString, const uint32 culCount) const + { + int32 iRetVal = 0; + + // Pre-validation. + this->erifySentinal(); + this->verifyNotNull(); + + // Make sure the comparison can take place with in our array bounds. + this->verifyLength(culCount); + + // Compare the strings. + iRetVal = strncmp(this->m_ptData, cpszString, culCount); + + return iRetVal; + } + + ////////////////////////////////////////////////////////////////////////// + // StrChr + // + // Find the first occurrence of the specified character in the string. + ////////////////////////////////////////////////////////////////////////// + const char * strChr(char cCharacter) const + { + const char * cpszRetVal = 0; + + // Pre-validation. + this->erifySentinal(); + this->verifyNotNull(); + + // Compare the strings. + cpszRetVal = ::strchr(this->m_ptData, cCharacter); + + return cpszRetVal; + } + +private: + void wideToMultiByte(const wchar_t* cpwszSource) + { + // Calculate the length of the source. + const uint32 cdwSourceLen = cpwszSource ? ::wcslen( cpwszSource ) : 0; + + // Convert the wide strings to multibyte. + if( cdwSourceLen > 0 ) + { + // This appears to be allocating twice as much memory as is needed, but + // this is the way W2A is implemented and W2A seems to convert some + // strings that will not convert where the destination is the same + // length (in characters) as the source. + this->allocateElements( cdwSourceLen * sizeof( wchar_t ) ); + + int32 iRet; +#ifdef WIN32 + iRet = ::WideCharToMultiByte( + CP_ACP, + 0, + cpwszSource, + -1, + GetNonConstPtr(), + GetLength(), + NULL, + NULL ); +#else + iRet = ::wcstombs( this->getNonConstPtr(), + cpwszSource, + this->getByteCount() ); + // wcstombs returns -1 for error or the length + // not including the NULL, so we must increment + // to match the windows version + iRet++; +#endif + + if( 0 == iRet ) + { + this->freeArray(); + } + else + { + // + // Must ReAllocate in order to have the proper char length + // The char array was allocated based on wchar_t + // + // no need to include the NULL terminator + // returned by WideCharToMultiByte() + // + this->rellocateElements( iRet - 1 ); + } + } + else if( cpwszSource != NULL ) + { + // This chunk of code is important. If the source + // string is empty, return an empty string, not + // a NULL pointer! + this->allocateElements(0); + } + + // Verify array. + this->verifySentinal(); + } + +private: + TCharAdapter(const TCharAdapter & crRhs); + TCharAdapter & operator=(const TCharAdapter & crRhs); +}; + +} + +#endif // _TCharAdapter_H_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Memory/DynamicArray/TDynamicArray.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Memory/DynamicArray/TDynamicArray.h new file mode 100644 index 000000000..3b8f2319d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Memory/DynamicArray/TDynamicArray.h @@ -0,0 +1,1087 @@ +////////////////////////////////////////////////////////////////////////////// +// +// Author: Greg Burk +// +// Purpose: This template provides a way to create an array that has +// certain safety features that help solve some of the problems +// often created by arrays in C++. You can create an array of +// any type. The safety features of this class include array +// bounds checking (indexes out of range), automatic +// initialization, and automatic destruction. It also provides +// some features to check the integrity of the array. This is +// especially useful when you get and pass the raw pointer to +// the array into a third party function (i.e. Windows API). +// +// The ${TDynamicArray::verify()} function is used for this +// purpose. It does two primary things: +// +// 1) When the array is allocated, some extra space is allocated +// for some sentinel bytes. These bytes are checked to make +// sure they are still intact when verify() is called. +// +// 2) When the array is allocated, the address of the memory +// that was allocated is stored and is XORed with a known +// bit pattern and the result is also stored. When verify() +// is called, this pattern is XORed again with the address +// and the result should be the original pattern. +// +// If either of the above checks fails, an exception is thrown. +// The primary weakness of this strategy is that the call to +// verify() is left up to the user. If the raw pointer is passed +// and something gets messed up, if verify() was not called, the +// problem won't be discovered until the next time a function +// that calls verify() (most do) is called. This will cause us +// to loose the context in which the problem occurred. +// +// Created: Wednesday, August 07, 2002 2:27:39 PM +// +// Copyright (c) 2011 Vmware, Inc. All rights reserved. +// -- VMware Confidential +// +////////////////////////////////////////////////////////////////////////////// +#ifndef _TDynamicArray_H_ +#define _TDynamicArray_H_ + +#include + +namespace Caf { + +////////////////////////////////////////////////////////////////////////////// +// Define sentinel bit pattern. +////////////////////////////////////////////////////////////////////////////// +#ifdef __x86_64__ +static const uint64 gs_ulDynamicArraySentinelBitPattern = (0xAAAAAAAAAAAAAAAA); +#else +static const uint32 gs_ulDynamicArraySentinelBitPattern = (0xAAAAAAAA); +#endif +static const uint32 gs_ulDynamicArraySentinelElementCount = (3); + +template +class TDynamicArray { +public: + typedef T Type; + + ////////////////////////////////////////////////////////////////////////// + // Default Constructor + ////////////////////////////////////////////////////////////////////////// + TDynamicArray() : + CAF_CM_INIT("TDynamicArray"), + _sentinelBits(gs_ulDynamicArraySentinelBitPattern), + _isSentinelSet(false), + _elementCount(0), + _elementIndex(0), + _byteCount(0), + _data(NULL) { + // Initialize the sentinel buffers. + ::memset(_sentinelBytes, 0, sizeof(_sentinelBytes)); + } + + ////////////////////////////////////////////////////////////////////////// + // Destructor + ////////////////////////////////////////////////////////////////////////// + virtual ~TDynamicArray() { + CAF_CM_FUNCNAME("~TDynamicArray"); + try { + freeArray(); + } + CAF_CM_CATCH_ALL; + CAF_CM_CLEAREXCEPTION; + } + + ////////////////////////////////////////////////////////////////////////// + // PutDescription + // + // Assign description to object instance. + ////////////////////////////////////////////////////////////////////////// + void putDescription(const char * pszDesc) { + CAF_CM_FUNCNAME_VALIDATE("putDescription"); + CAF_CM_VALIDATE_STRINGPTRA(pszDesc); + _description = pszDesc; + } + + ////////////////////////////////////////////////////////////////////////// + // GetPtr + // + // Get const pointer to internal data + ////////////////////////////////////////////////////////////////////////// + const T * getPtr() const { + // Pre-validation. + verifySentinel(); + + // Get pointer. + const T * rc = _data; + + return rc; + } + + ////////////////////////////////////////////////////////////////////////// + // GetNonConstPtr + // + // Get non-const pointer to internal data. This function should be used + // only when you must get a pointer that is to be written to, and you + // should always call the ${TDynamicArray::verify()} function after modifying the data + // pointed to by this pointer or passing the pointer to a function that + // modifies the data pointed to by this pointer. + ////////////////////////////////////////////////////////////////////////// + T * getNonConstPtr() { + // Pre-validation. + verifySentinel(); + + // Get pointer. + T * rc = _data; + + return rc; + } + + ////////////////////////////////////////////////////////////////////////// + // const Conversion Operator + ////////////////////////////////////////////////////////////////////////// + operator const T *() const { + // Pre-validation. + verifySentinel(); + + // Get pointer. + const T * rc = _data; + + return rc; + } + + ////////////////////////////////////////////////////////////////////////// + // GetPtrAt + // + // Returns a const pointer to the internal array at a given index + ////////////////////////////////////////////////////////////////////////// + const T * getPtrAt(const uint32 elementIndex) const { + // Pre-validation. + verifyNotNull(); + verifySentinel(); + verifyElementCount(elementIndex); + + // Get the pointer at the index specified. + const T * rc = &_data[elementIndex]; + + return rc; + } + + ////////////////////////////////////////////////////////////////////////// + // GetNonConstPtrAt + // + // Returns a non-const pointer to the internal array at a given index. + // This function should be used only when you must get a pointer that is + // to be written to, and you should always call the ${TDynamicArray::verify()} + // function after modifying the data pointed to by this pointer or passing + // the pointer to a function that modifies the data pointed to by this + // pointer. + ////////////////////////////////////////////////////////////////////////// + T * getNonConstPtrAt(const uint32 elementIndex) { + // Pre-validation. + verifyNotNull(); + verifySentinel(); + verifyElementCount(elementIndex); + + // Get the pointer at the index specified. + T * rc = &_data[elementIndex]; + + return rc; + } + + ////////////////////////////////////////////////////////////////////////// + // GetAt + // + // Returns the array element at a given index + ////////////////////////////////////////////////////////////////////////// + T getAt(const uint32 elementIndex) const { + // Pre-validation. + verifyNotNull(); + verifySentinel(); + verifyElementCount(elementIndex); + + // Get the pointer at the index specified. + T tRetVal = _data[elementIndex]; + + return tRetVal; + } + + ////////////////////////////////////////////////////////////////////////// + // getPtrAtCurrentPos + // + // Returns a const pointer to the internal array at the current position. + ////////////////////////////////////////////////////////////////////////// + const T * getPtrAtCurrentPos() const { + return getPtrAt(_elementIndex); + } + + ////////////////////////////////////////////////////////////////////////// + // getNonConstPtrAtCurrentPos + // + // Returns a non-const pointer to the internal array at the current position. + // This function should be used only when you must get a pointer that is + // to be written to, and you should always call the ${TDynamicArray::verify()} + // function after modifying the data pointed to by this pointer or passing + // the pointer to a function that modifies the data pointed to by this + // pointer. + ////////////////////////////////////////////////////////////////////////// + T * getNonConstPtrAtCurrentPos() { + return getNonConstPtrAt(_elementIndex); + } + + ////////////////////////////////////////////////////////////////////////// + // GetAtCurrentPos + // + // Returns the array element at the current position + ////////////////////////////////////////////////////////////////////////// + T getAtCurrentPos() const { + return getAt(_elementIndex); + } + + ////////////////////////////////////////////////////////////////////////// + // SetAt + // + // Sets the array element at a given index + ////////////////////////////////////////////////////////////////////////// + void setAt( + const uint32 elementIndex, + const T value) { + // Pre-validation. + verifyNotNull(); + verifySentinel(); + verifyElementCount(elementIndex); + + // Set the pointer at the index specified. + _data[elementIndex] = value; + } + + ////////////////////////////////////////////////////////////////////////// + // getElementCount + // + // Returns the number of array elements. + ////////////////////////////////////////////////////////////////////////// + uint32 getElementCount() const { + return _elementCount; + } + + ////////////////////////////////////////////////////////////////////////// + // getByteCount + // + // Returns the size of the array in bytes. + ////////////////////////////////////////////////////////////////////////// + uint32 getByteCount() const { + return _byteCount; + } + + ////////////////////////////////////////////////////////////////////////// + // getByteCountSize + // + // Returns the size of the array in bytes. + ////////////////////////////////////////////////////////////////////////// + size_t getByteCountSize() const { + return static_cast(_byteCount); + } + + ////////////////////////////////////////////////////////////////////////// + // IsNull + // + // Returns true if the pointer to the internal array is null or false if + // the array is not null + ////////////////////////////////////////////////////////////////////////// + bool isNull() const { + return ((NULL == _data) ? true : false); + } + + ////////////////////////////////////////////////////////////////////////// + // verify + // + // Verifies that the array is still properly bound and in good shape. + ////////////////////////////////////////////////////////////////////////// + void verify() const { + // verify. + verifySentinel(); + } + + ////////////////////////////////////////////////////////////////////////// + // Allocate + // + // Allocates a new array on the heap (elementCount = number of elements) + ////////////////////////////////////////////////////////////////////////// + TDynamicArray & allocateElements(const uint32 elementCount) { + // Free the previous array if it exists. + freeArray(); + + // Call internal allocation function to actually allocate the + // array buffer. + internalAllocate(elementCount); + + return (*this); + } + + ////////////////////////////////////////////////////////////////////////// + // AllocateBytes + // + // Allocates a new array on the heap. + ////////////////////////////////////////////////////////////////////////// + TDynamicArray & allocateBytes(const size_t byteCount) { + return allocateBytes(static_cast(byteCount)); + } + + ////////////////////////////////////////////////////////////////////////// + // AllocateBytes + // + // Allocates a new array on the heap. + ////////////////////////////////////////////////////////////////////////// + TDynamicArray & allocateBytes(const uint32 byteCount) { + // Calculate actual number of array elements to allocate based on + // the byte length. + const uint32 elementCount = byteCountToElementCount(byteCount); + + // Delegate to Allocate(). + allocateElements(elementCount); + + return (*this); + } + + ////////////////////////////////////////////////////////////////////////// + // ReAllocate + // + // Reallocates a array on the heap, keeping original contents. + // culLength = number of elements + ////////////////////////////////////////////////////////////////////////// + TDynamicArray & reallocateElements(const uint32 elementCount) { + CAF_CM_FUNCNAME("reallocateElements"); + + // Declare variables to hold copy of original information. + uint32 origElementIndex = 0; + uint32 origByteCount = 0; + T * origData = NULL; + + try { + // Pre-validation. + verifySentinel(); + + // Create a temporary copy of the original buffer and length. + origElementIndex = _elementIndex; + origByteCount = _byteCount; + origData = _data; + + // Reset the data pointer, length, and byte length. + _data = NULL; + _elementCount = 0; + _elementIndex = 0; + _byteCount = 0; + + // Reset the sentinel set flag. + _isSentinelSet = false; + + // Call internal allocation function to actually allocate the + // array buffer. + internalAllocate(elementCount); + + // Copy the original into the new if it exists. + if((origData != NULL) && (origByteCount > 0)) { + // Calculate the number of bytes to copy. + const uint32 bytesToCopy = + (_byteCount < origByteCount) ? _byteCount : origByteCount; + + // Copy the bytes. + ::memcpy(_data, origData, bytesToCopy); + + const uint32 elementsToCopy = byteCountToElementCount(bytesToCopy); + _elementIndex = + (elementsToCopy < origElementIndex) ? elementsToCopy : origElementIndex; + } + + // verify the sentinel bytes. + verifySentinel(); + } + CAF_CM_CATCH_ALL; + + // Delete the original buffer if non-null. + if (origData) { + Allocator::freeMemory(origData); + } + + CAF_CM_THROWEXCEPTION; + + return (*this); + } + + ////////////////////////////////////////////////////////////////////////// + // Grow + // + // Increases the size of the array by the length + // (number of elements) supplied + ////////////////////////////////////////////////////////////////////////// + TDynamicArray & grow(const uint32 elementCount) { + reallocateElements(_elementCount + elementCount); + + return (*this); + } + + ////////////////////////////////////////////////////////////////////////// + // ReAllocateBytes + // + // Reallocates a array on the heap, keeping original contents. + ////////////////////////////////////////////////////////////////////////// + TDynamicArray & reallocateBytes(const size_t byteCount) { + return reallocateBytes(static_cast(byteCount)); + } + + ////////////////////////////////////////////////////////////////////////// + // ReAllocateBytes + // + // Reallocates a array on the heap, keeping original contents. + ////////////////////////////////////////////////////////////////////////// + TDynamicArray & reallocateBytes(const uint32 byteCount) { + // Calculate actual number of array elements to allocate based + // on the byte length. + const uint32 elementCount = byteCountToElementCount(byteCount); + + // Delegate to ReAllocate() function. + reallocateElements(elementCount); + + return (*this); + } + + ////////////////////////////////////////////////////////////////////////// + // Free + // + // Frees the memory for the array. + ////////////////////////////////////////////////////////////////////////// + void freeArray() { + // Free the buffer if it exists. + if (_data) { + verifySentinel(); + + // Zeroize the buffer for cryptographic purposes + ::memset(_data, 0, _byteCount); + + Allocator::freeMemory(_data); + _data = NULL; + + // Reset to initial value. + _sentinelBits = gs_ulDynamicArraySentinelBitPattern; + } + + // Reset the length and byte length. + _elementCount = 0; + _elementIndex = 0; + _byteCount = 0; + + // Reset the sentinel set flag. + _isSentinelSet = false; + } + + ////////////////////////////////////////////////////////////////////////// + // ArrayCpy + // + // Copies the array entries from crArray into this array. + ////////////////////////////////////////////////////////////////////////// + void arrayCpy(const TDynamicArray & crArray) { + // Make sure reference is not to this. + if (this != &crArray) { + // Pre-validation. + verifyNotNull(); + verifyByteCount(crArray.getByteCount()); + verifySentinel(); + crArray.verifySentinel(); + + // Reinitialize this array. + memSet(); + + // Copy the array. + memcpy(_data, crArray.getPtr(), crArray.getByteCount()); + + // Post-validation. + verifySentinel(); + } + } + + ////////////////////////////////////////////////////////////////////////// + // ArrayCmp + // + // Compare this array with crArray. Compares the entire array, so arrays + // must be equal size to evaluate to equal. + ////////////////////////////////////////////////////////////////////////// + int32 arrayCmp(const TDynamicArray & crArray) const { + int32 iRetVal = 0; + + // Make sure reference is not to this. + if (this != &crArray) { + // Pre-validation. + verifySentinel(); + crArray.verifySentinel(); + + // Make sure the arrays are the same length. + if ((_data == NULL) && (crArray._data == NULL)) { + iRetVal = 0; + } else if (getByteCount() == crArray.getByteCount()) { + // Compare the array. + iRetVal = ::memcmp(_data, crArray.getPtr(), getByteCount()); + } else { + iRetVal = (getByteCount() > crArray.getByteCount()) ? 1 : -1; + } + + // Post-validation. + verifySentinel(); + } + + return iRetVal; + } + + ////////////////////////////////////////////////////////////////////////// + // ArrayPrepend + // + // Prepend this array with the provided array. This call will grow the + // array by the size of the provided array. + ////////////////////////////////////////////////////////////////////////// + void arrayPrepend(const TDynamicArray & crArray) { + CAF_CM_FUNCNAME("arrayPrepend"); + + // Declare variables to hold copy of original information. + uint32 origByteCount = 0; + uint32 origElementCount = 0; + T * origData = NULL; + + try { + // Pre-validation. + verifySentinel(); + + // Create a temporary copy of the original buffer and length. + origData = _data; + origByteCount = _byteCount; + origElementCount = _elementCount; + + // Reset the data pointer, length, and byte length. + _data = NULL; + _elementCount = 0; + _elementIndex = 0; + _byteCount = 0; + + // Reset the sentinel set flag. + _isSentinelSet = false; + + // Call internal allocation function to actually allocate the + // array buffer. + internalAllocate(origElementCount + crArray.getElementCount()); + + // Get an intermediate pointer to the internal buffer. + T * tempData = _data; + + // Copy the provided data into the new buffer if it exists. + if((crArray.getPtr() != NULL) && (crArray.getByteCount() > 0)) { + // Copy the bytes. + ::memcpy(tempData, crArray.getPtr(), crArray.getByteCount()); + + // Advance the pointer to the end of the data just copied. + tempData += crArray.getElementCount(); + } + + // Copy the original into the new if it exists. + if((origData != NULL) && (origByteCount > 0)) { + // Copy the bytes. + ::memcpy(tempData, origData, origByteCount); + } + + // verify the sentinel bytes. + verifySentinel(); + } + CAF_CM_CATCH_ALL; + + // Delete the original buffer if non-null. + if (origData) { + Allocator::freeMemory(origData); + } + + CAF_CM_THROWEXCEPTION; + } + + ////////////////////////////////////////////////////////////////////////// + // ArrayAppend + // + // Append this array with the provided array. This call will grow the + // array by the size of the provided array. + ////////////////////////////////////////////////////////////////////////// + void arrayAppend(const TDynamicArray & crArray) { + CAF_CM_FUNCNAME("arrayAppend"); + + // Declare variables to hold copy of original information. + uint32 origByteCount = 0; + uint32 origElementCount = 0; + uint32 origElementIndex = 0; + T * origData = NULL; + + try { + // Pre-validation. + verifySentinel(); + + // Create a temporary copy of the original buffer and length. + origData = _data; + origByteCount = _byteCount; + origElementCount = _elementCount; + origElementIndex = _elementIndex; + + // Reset the data pointer, length, and byte length. + _data = NULL; + _elementCount = 0; + _elementIndex = 0; + _byteCount = 0; + + // Reset the sentinel set flag. + _isSentinelSet = false; + + // Call internal allocation function to actually allocate the + // array buffer. + internalAllocate(origElementCount + crArray.getElementCount()); + + // Get an intermediate pointer to the internal buffer. + T * tempData = _data; + + // Copy the original into the new if it exists. + if((origData != NULL) && (origByteCount > 0)) + { + // Copy the bytes. + ::memcpy(tempData, origData, origByteCount); + + // Advance the pointer to the end of the data just copied. + tempData += origElementCount; + } + + // Copy the provided data into the new buffer if it exists. + if((crArray.getPtr() != NULL) && (crArray.getByteCount() > 0)) { + // Copy the bytes. + ::memcpy(tempData, crArray.getPtr(), crArray.getByteCount()); + } + + _elementIndex = origElementIndex; + + // verify the sentinel bytes. + verifySentinel(); + } + CAF_CM_CATCH_ALL; + + // Delete the original buffer if non-null. + if (origData) { + Allocator::freeMemory(origData); + } + } + + ////////////////////////////////////////////////////////////////////////// + // MemSet + // + // Initializes the array by filling it with the fillValue. + ////////////////////////////////////////////////////////////////////////// + void memSet(const byte fillValue = 0) { + // Pre-validation. + verifyNotNull(); + verifySentinel(); + + // Initialize the buffer. + ::memset(_data, fillValue, _byteCount); + _elementIndex = 0; + + // Post-validation. + verifySentinel(); + } + + ////////////////////////////////////////////////////////////////////////// + // MemCpy + // + // Copy the memory from sourceData into this array up to byteCount bytes. + ////////////////////////////////////////////////////////////////////////// + void memCpy( + const void * sourceData, + const size_t byteCount) { + memCpy(sourceData, static_cast(byteCount)); + } + + ////////////////////////////////////////////////////////////////////////// + // MemCpy + // + // Copy the memory from sourceData into this array up to byteCount bytes. + ////////////////////////////////////////////////////////////////////////// + void memCpy( + const void * sourceData, + const uint32 byteCount) { + // Pre-validation. + verifyNotNull(); + verifySentinel(); + + // Make sure the data will fit if we copy it. + verifyByteCount(byteCount); + + // Copy the data. + ::memcpy(_data, sourceData, byteCount); + _elementIndex = 0; + + // Post-validation. + verifySentinel(); + } + + ////////////////////////////////////////////////////////////////////////// + // MemAppend + // + // Append the memory from sourceData into this array up to byteCount bytes. + ////////////////////////////////////////////////////////////////////////// + void memAppend( + const void * sourceData, + const size_t byteCount) { + memAppend(sourceData, static_cast(byteCount)); + } + + ////////////////////////////////////////////////////////////////////////// + // MemAppend + // + // Append the memory from sourceData into this array up to byteCount bytes. + ////////////////////////////////////////////////////////////////////////// + void memAppend( + const void * sourceData, + const uint32 byteCount) { + // Pre-validation. + verifyNotNull(); + verifySentinel(); + + // Make sure the data will fit if we copy it. + const uint32 startingByteCount = elementCountToByteCount(_elementIndex); + verifyByteCount(startingByteCount + byteCount); + + // Copy the data. + ::memcpy(_data + _elementIndex, sourceData, byteCount); + _elementIndex += byteCountToElementCount(byteCount); + + // Post-validation. + verifySentinel(); + } + + ////////////////////////////////////////////////////////////////////////// + // MemCmp + // + // Compare the memory from sourceData with this array up to byteCount bytes. + ////////////////////////////////////////////////////////////////////////// + int32 memCmp( + const void * sourceData, + const size_t byteCount) { + return memCmp(sourceData, static_cast(byteCount)); + } + + ////////////////////////////////////////////////////////////////////////// + // MemCmp + // + // Compare the memory from sourceData with this array up to byteCount bytes. + ////////////////////////////////////////////////////////////////////////// + int32 memCmp( + const void * sourceData, + const uint32 byteCount) const { + CAF_CM_FUNCNAME_VALIDATE("memCmp"); + CAF_CM_VALIDATE_PTR(sourceData); + CAF_CM_VALIDATE_POSITIVE(byteCount); + + // Pre-validation. + verifySentinel(); + + // Make sure the comparison can take place within our array bounds. + verifyByteCount(byteCount); + + // Do comparison. + int32 iRetVal = 0; + if ((_data == NULL) && (sourceData == NULL)) { + iRetVal = 0; + } else { + iRetVal = ::memcmp(_data, sourceData, byteCount); + } + + // Post-validation. + verifySentinel(); + + return iRetVal; + } + + ////////////////////////////////////////////////////////////////////////// + // MemiCmp + // + // Compare the memory from sourceData with this array up to byteCount bytes + // (case insensitive). + ////////////////////////////////////////////////////////////////////////// + int32 memiCmp( + const void * sourceData, + const size_t byteCount) { + return memiCmp(sourceData, static_cast(byteCount)); + } + + ////////////////////////////////////////////////////////////////////////// + // MemiCmp + // + // Compare the memory from sourceData with this array up to byteCount bytes + // (case insensitive). + ////////////////////////////////////////////////////////////////////////// + int32 memiCmp( + const void * sourceData, + const uint32 byteCount) const { + CAF_CM_FUNCNAME_VALIDATE("memiCmp"); + CAF_CM_VALIDATE_PTR(sourceData); + CAF_CM_VALIDATE_POSITIVE(byteCount); + + // Pre-validation. + verifySentinel(); + + // Make sure the comparison can take place within our array bounds. + verifyByteCount(byteCount); + + // Do comparison. + int32 iRetVal = 0; + if ((_data == NULL) && (sourceData == NULL)) { + iRetVal = 0; + } else { + iRetVal = memicmp(_data, sourceData, byteCount); + } + + // Post-validation. + verifySentinel(); + + return iRetVal; + } + + ////////////////////////////////////////////////////////////////////////// + // incrementElementIndex + // + // Increments the current position of the index into the buffer. + ////////////////////////////////////////////////////////////////////////// + void incrementCurrentPos(const uint32 elementCount) { + CAF_CM_FUNCNAME("incrementCurrentPos"); + + if ((_elementIndex + elementCount) > _elementCount) { + CAF_CM_EXCEPTION_VA3(ERROR_INSUFFICIENT_BUFFER, + "Current position is longer than the total size for '%s' - currentPos: %d, totalLen: %d", + _description.c_str(), _elementIndex + elementCount, _elementCount); + } + + _elementIndex += elementCount; + } + + ////////////////////////////////////////////////////////////////////////// + // resetElementIndex + // + // Resets the current position of the index into the buffer. + ////////////////////////////////////////////////////////////////////////// + void resetCurrentPos() { + _elementIndex = 0; + } + + ////////////////////////////////////////////////////////////////////////// + // getByteCountFromCurrentPos + // + // Returns the size of the array in bytes from the current position. + ////////////////////////////////////////////////////////////////////////// + uint32 getByteCountFromCurrentPos() const { + const uint32 byteIndex = elementCountToByteCount(_elementIndex); + return (_byteCount - byteIndex); + } + +private: + ////////////////////////////////////////////////////////////////////////// + // internalAllocate (Private) + // + // Set the sentinel bytes at the end of the array. + ////////////////////////////////////////////////////////////////////////// + void internalAllocate(const uint32 elementCount) { + CAF_CM_FUNCNAME("internalAllocate"); + + // This function assumes the calling function has freed any pre- + // existing array. + CAF_CM_VALIDATE_NULLPTR(_data); + CAF_CM_VALIDATE_ZERO(_elementCount); + CAF_CM_VALIDATE_ZERO(_byteCount); + + // Allocate the new buffer. This buffer is + _data = static_cast(Allocator::allocMemory( + sizeof(T) * (elementCount + gs_ulDynamicArraySentinelElementCount))); + + // verify that the allocation succeeded. + if (!_data) { + CAF_CM_EXCEPTION_VA1(ERROR_OUTOFMEMORY, "Array allocation failed for '%s'", + _description.c_str()); + } + + // Set sentinel bits +#ifdef __x86_64__ + _sentinelBits = reinterpret_cast(_data) + ^ gs_ulDynamicArraySentinelBitPattern; +#else + _sentinelBits = reinterpret_cast(_data) ^ gs_ulDynamicArraySentinelBitPattern; +#endif + + // Initialize the new buffer. + ::memset(_data, 0, + ((elementCount + gs_ulDynamicArraySentinelElementCount) * sizeof(T))); + + // Set the length and byte length. + _elementCount = elementCount; + _elementIndex = 0; + _byteCount = elementCountToByteCount(elementCount); + + // Set the sentinel bytes. + setSentinel(); + + // verify the sentinel bytes. + verifySentinel(); + } + + ////////////////////////////////////////////////////////////////////////// + // SetSentinel (Private) + // + // Set the sentinel bytes at the end of the array. + ////////////////////////////////////////////////////////////////////////// + void setSentinel() { + // Set the sentinel characters. + for (uint32 ulIndex = 0; ulIndex < (2 * sizeof(T)); ++ulIndex) { + // Set the sentinel bytes at the end of the array. + reinterpret_cast(_data)[(_byteCount + ulIndex + sizeof(T))] = + ((ulIndex % 2) == 0) ? 0xFF : 0xDD; + + // Make a copy of the sentinel bytes for later comparison. + _sentinelBytes[ulIndex + sizeof(T)] = ((ulIndex % 2) == 0) ? 0xFF : 0xDD; + } + + // Set the flag indicating the sentinel is set. + _isSentinelSet = true; + } + + ////////////////////////////////////////////////////////////////////////// + // verifyByteCount (Private) + // + // Verifies that the byte length supplied is not longer than the array + // byte length. + ////////////////////////////////////////////////////////////////////////// + void verifyByteCount(const uint32 byteCount) const { + CAF_CM_FUNCNAME("verifyByteCount"); + + if (byteCount > _byteCount) { + CAF_CM_EXCEPTION_VA3(ERROR_INVALID_INDEX, "The byte length specified [%d] " + "exceeds the array length [%d] for '%s'", byteCount, _byteCount, + _description.c_str()); + } + } + + ////////////////////////////////////////////////////////////////////////// + // verifyElementCount (Private) + // + // Verifies that the index supplied does not go past end of the array. + ////////////////////////////////////////////////////////////////////////// + void verifyElementCount(const uint32 elementCount) const { + CAF_CM_FUNCNAME("verifyElementCount"); + + if (elementCount >= _elementCount) { + CAF_CM_EXCEPTION_VA3(ERROR_INVALID_INDEX, "The index specified [%d] is " + "beyond the array bounds [%d] for '%s'", elementCount, (_elementCount - 1), + _description.c_str()); + } + } + + uint32 byteCountToElementCount(const uint32 byteCount) const { + uint32 rc = 0; + if (byteCount > 0) { + rc = (byteCount / sizeof(T)) + (byteCount % sizeof(T)); + } + + return rc; + } + + uint32 elementCountToByteCount(const uint32 elementCount) const { + return (elementCount * sizeof(T)); + } + +protected: + ////////////////////////////////////////////////////////////////////////// + // verifySentinel (Private) + // + // Verifies that the sentinel bytes are still intact. + ////////////////////////////////////////////////////////////////////////// + void verifySentinel() const { + CAF_CM_FUNCNAME("verifySentinel"); + + if (_isSentinelSet) { +#ifdef __x86_64__ + if ((_sentinelBits ^ reinterpret_cast(_data)) + != gs_ulDynamicArraySentinelBitPattern) +#else + if ((_sentinelBits ^ reinterpret_cast(_data)) != + gs_ulDynamicArraySentinelBitPattern) +#endif + { + CAF_CM_EXCEPTION_VA1(ERROR_INVALID_DATA, + "The sentinel BITS for array '%s' are no longer valid.", + _description.c_str()); + } else if (::memcmp(_sentinelBytes, + (reinterpret_cast(_data) + _byteCount), + sizeof(_sentinelBytes)) != 0) { + CAF_CM_EXCEPTION_VA1(ERROR_INVALID_DATA, + "The sential BYTES for array '%s' are no longer valid.", + _description.c_str()); + } + } else if (_sentinelBits != gs_ulDynamicArraySentinelBitPattern) { + CAF_CM_EXCEPTION_VA1(ERROR_INVALID_DATA, + "The sential BITS for array '%s' are no longer valid.", _description.c_str()); + } + } + + ////////////////////////////////////////////////////////////////////////// + // verifyNotNull (Private) + // + // Verifies that the data pointer is not null. + ////////////////////////////////////////////////////////////////////////// + void verifyNotNull() const { + CAF_CM_FUNCNAME("verifyNotNull"); + + if (NULL == _data) { + CAF_CM_EXCEPTION_VA1(E_POINTER, "The pointer to the array is null for '%s'", + _description.c_str()); + } + } + +private: + TDynamicArray(const TDynamicArray & crRhs); + TDynamicArray & operator=(const TDynamicArray & crRhs); + +#ifdef WIN32 + ////////////////////////////////////////////////////////////////////////// + // Operator[] (Private) + // + // We need to provide an implementation to satisfy the VC8 compiler + // even though we never intend this method to be called. + ////////////////////////////////////////////////////////////////////////// + T operator[](size_t) + { + // Yes, this code looks very wrong, however, DO NOT REMOVE it! + // It is here to supply an implementation that doesn't generate + // compiler warnings. This method will never be called. + T* tpRetVal = NULL; + return *tpRetVal; + } +#endif + +private: + CAF_CM_CREATE; + byte _sentinelBytes[gs_ulDynamicArraySentinelElementCount * sizeof(T)]; +#ifdef __x86_64__ + uint64 _sentinelBits; +#else + uint32 _sentinelBits; +#endif + bool _isSentinelSet; + + // NOTE: ...Count are not zero-relative, ...Index are zero-relative. + + // An element is the template type (e.g. wchar_t), so the element count + // is the number of these template types in the array. + uint32 _elementCount; + uint32 _elementIndex; + + // The number of bytes consumed by the array of template types. + uint32 _byteCount; + +protected: + std::string _description; + T * _data; +}; + +} + +#endif // _TDynamicArray_H_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Memory/DynamicArray/TWCharAdapter.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Memory/DynamicArray/TWCharAdapter.h new file mode 100644 index 000000000..f72d37f94 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Memory/DynamicArray/TWCharAdapter.h @@ -0,0 +1,370 @@ +////////////////////////////////////////////////////////////////////////////// +// +// $Workfile: TWCharAdapter.h $ +// +// Author: Greg Burk +// +// Purpose: This template provides an adapter for TDynamicArray (or +// other types of "safe" array classes) that exposes functions +// that are useful when working with an array of type wchar_t. +// +// A typedef of this class is already defined and should be +// used instead of explicitly using this class. The typedef +// is CEcmWCharArray. +// +// Created: Friday, October 18, 2002 1:59:49 PM +// +// Copyright (c) 2011 Vmware, Inc. All rights reserved. +// -- VMware Confidential +// +// Modification History: +// +// $Log: //wpbuild01/PvcsData/ECM_40/archives/ECM_41/WinNT/Source/CommonAgtCol/Cpp/EcmCommonStaticMinDep/TWCharAdapter.h-arc $ +// +// Rev 1.2 17 Sep 2003 09:43:16 Michael.Donahue +// Implemented hooks for new library model +// +// Rev 1.1 16 Jan 2003 11:17:54 Greg.Burk +// Made changes necessary to accomodate new CEcmBasicString class and changes to CEcmString. +// +// Rev 1.0 31 Oct 2002 10:43:08 Greg.Burk +// Initial Revision +// +////////////////////////////////////////////////////////////////////////////// +#ifndef _TWCharAdapter_H_ +#define _TWCharAdapter_H_ + +namespace Caf { + +template +class TWCharAdapter : public T +{ +public: + ////////////////////////////////////////////////////////////////////////// + // Default Constructor + ////////////////////////////////////////////////////////////////////////// + TWCharAdapter() {} + + ////////////////////////////////////////////////////////////////////////// + // Conversion Constructor + ////////////////////////////////////////////////////////////////////////// + TWCharAdapter(const char * rhs) + { + multiByteToWide(rhs); + } + + ////////////////////////////////////////////////////////////////////////// + // Conversion Constructor + ////////////////////////////////////////////////////////////////////////// + TWCharAdapter(const wchar_t * rhs) + { + (*this) = rhs; + } + + ////////////////////////////////////////////////////////////////////////// + // Destructor + ////////////////////////////////////////////////////////////////////////// + ~TWCharAdapter() {} + + ////////////////////////////////////////////////////////////////////////// + // Assignment operator + ////////////////////////////////////////////////////////////////////////// + TWCharAdapter& operator=(const char * rhs) + { + multiByteToWide(rhs); + return *this; + } + + ////////////////////////////////////////////////////////////////////////// + // Assignment operator + ////////////////////////////////////////////////////////////////////////// + TWCharAdapter& operator=(const wchar_t * rhs) + { + const uint32 culLength = ::wcslen(rhs); + + if(culLength > 0) + { + this->allocateElements(culLength); + wcsnCpy(rhs, culLength); + } + return *this; + } + + ////////////////////////////////////////////////////////////////////////////// + // MakeLower() + // + // Converts all of the upper-case characters in this string to lower-case. + ////////////////////////////////////////////////////////////////////////////// + void makeLower() + { + // Pre-validation. + this->verifySentinal(); + + if(!this->isNull()) + { + wcslwr(this->m_ptData); + } + + // Post-validation. + this->verifySentinal(); + } + + ////////////////////////////////////////////////////////////////////////// + // MakeUpper + // + // Converts all of the lower-case characters in this array to upper-case. + ////////////////////////////////////////////////////////////////////////// + void makeUpper() + { + // Pre-validation. + this->verifySentinal(); + + if(!this->isNull()) + { + wcsupr(this->m_ptData); + } + + // Post-validation. + this->verifySentinal(); + } + + ////////////////////////////////////////////////////////////////////////// + // Reverse + // + // Reverses the characters in the array. + ////////////////////////////////////////////////////////////////////////// + void reverse() + { + // Pre-validation. + this->verifySentinal(); + + if(!this->isNull()) + { + wcsrev(this->m_ptData); + } + + // Post-validation. + this->verifySentinal(); + } + + ////////////////////////////////////////////////////////////////////////// + // WcsLen + // + // Return the length of the string. + ////////////////////////////////////////////////////////////////////////// + size_t wcsLen() const + { + size_t stRetVal = 0; + this->verifySentinal(); + this->verifyNotNull(); + stRetVal = ::wcslen(this->m_ptData, this->m_strDesc); + this->verifyLength(static_cast(stRetVal)); + return stRetVal; + } + + ////////////////////////////////////////////////////////////////////////// + // WcsCpy + // + // Make a copy of the string into the buffer. + ////////////////////////////////////////////////////////////////////////// + TWCharAdapter & wcsCpy(const wchar_t * cpwszSource) + { + // Pre-validation. + this->verifySentinal(); + this->verifyNotNull(); + + // Get the length of the source string. + uint32 dwSourceLength = ::wcslen(cpwszSource); + + // Make sure the string will fit if we copy it. + this->verifyLength(dwSourceLength); + + // Copy the string into the buffer. + ::wcscpy(this->m_ptData, cpwszSource); + + // Post-validation. + this->verifySentinal(); + + return (*this); + } + + ////////////////////////////////////////////////////////////////////////// + // WcsnCpy + // + // Make a copy of the string into the buffer upto culCount characters. + ////////////////////////////////////////////////////////////////////////// + TWCharAdapter & wcsnCpy(const wchar_t * cpwszSource, const uint32 culCount) + { + // Pre-validation. + this->verifySentinal(); + this->verifyNotNull(); + + // Make sure the string will fit if we copy it. + this->verifyLength(culCount); + + // Copy the string into the buffer. + ::wcsncpy(this->m_ptData, cpwszSource, culCount); + + // Post-validation. + this->verifySentinal(); + + return (*this); + } + + ////////////////////////////////////////////////////////////////////////// + // WcsStr + // + // Find the substring cpwszSubString in the array. Returns the pointer to + // the first occurance of the substring in the array or NULL if the + // substring is not found. + ////////////////////////////////////////////////////////////////////////// + const wchar_t * wcsStr(const wchar_t * cpwszSubString) const + { + wchar_t * pwszRetVal = NULL; + + // Pre-validation. + this->verifySentinal(); + this->verifyNotNull(); + + // Find the substring. + pwszRetVal = ::wcsstr(this->m_ptData, cpwszSubString); + + // Post-validation. + this->verifySentinal(); + + return pwszRetVal; + } + + ////////////////////////////////////////////////////////////////////////// + // WcsCmp + // + // Compare the cpwszString to this array. + ////////////////////////////////////////////////////////////////////////// + int32 wcsCmp(const wchar_t * cpwszString) const + { + int32 iRetVal = 0; + + // Pre-validation. + this->verifySentinal(); + this->verifyNotNull(); + + // Compare the strings. + iRetVal = ::wcscmp(this->m_ptData, cpwszString); + + return iRetVal; + } + + ////////////////////////////////////////////////////////////////////////// + // WcsiCmp + // + // Compare the cpwszString to this array (case insensitive). + ////////////////////////////////////////////////////////////////////////// + int32 wcsiCmp(const wchar_t * cpwszString) const + { + int32 iRetVal = 0; + + // Pre-validation. + this->verifySentinal(); + this->verifyNotNull(); + + // Compare the strings. + iRetVal = wcsicmp(this->m_ptData, cpwszString); + + return iRetVal; + } + + ////////////////////////////////////////////////////////////////////////// + // WcsnCmp + // + // Compare the cpwszString to this array up to culCount characters. + ////////////////////////////////////////////////////////////////////////// + int32 wcsnCmp(const wchar_t * cpwszString, const uint32 culCount) const + { + int32 iRetVal = 0; + + // Pre-validation. + this->verifySentinal(); + this->verifyNotNull(); + + // Make sure the comparison can take place with in our array bounds. + this->verifyLength(culCount); + + // Compare the strings. + iRetVal = wcsncmp(this->m_ptData, cpwszString, culCount); + + return iRetVal; + } + + ////////////////////////////////////////////////////////////////////////// + // WcsChr + // + // Find the first occurrence of the specified character in the string. + ////////////////////////////////////////////////////////////////////////// + wchar_t * wcsChr(wchar_t wcCharacter) const + { + wchar_t * pwszRetVal = 0; + + // Pre-validation. + this->verifySentinal(); + this->verifyNotNull(); + + // Compare the strings. + pwszRetVal = ::wcschr(this->m_ptData, wcCharacter); + + return pwszRetVal; + } + +private: + void multiByteToWide(const char* cpszSource) + { + // Calculate the length of the source. + const uint32 cdwSourceLen = cpszSource ? ::strlen( cpszSource ) : 0; + + // Convert the multibyte strings to wide. + if( cdwSourceLen > 0 ) + { + this->allocateElements(cdwSourceLen); + int32 iRet; +#ifdef WIN32 + iRet = ::MultiByteToWideChar( + CP_ACP, + 0, + cpszSource, + cdwSourceLen, + GetNonConstPtr(), + GetLength() ); +#else + iRet = ::mbstowcs( this->getNonConstPtr(), cpszSource, cdwSourceLen ); + // mbstowcs returns -1 on error or the number of + // characters without the null terminator, so + // we can increase it by 1 for the null or to 0 for + // the error condition below + if ( 0 != iRet ) + iRet++; +#endif + + if( 0 == iRet ) + { + this->freeArray(); + } + } + else if( cpszSource != NULL ) + { + // This chunk of code is important. If the source + // string is empty, return an empty string, not + // a NULL pointer! + this->allocateElements(0); + } + + // Verify array. + this->verifySentinal(); + } + +private: + TWCharAdapter(const TWCharAdapter & crRhs); + TWCharAdapter & operator=(const TWCharAdapter & crRhs); +}; + +} + +#endif // _TWCharAdapter_H_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/PlatformApi.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/PlatformApi.cpp new file mode 100644 index 000000000..7fd0a7328 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/PlatformApi.cpp @@ -0,0 +1,43 @@ +/* + * Created: Nov 14, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ +#include "stdafx.h" +#include "PlatformApi.h" + +std::string BasePlatform::PlatformApi::GetApiErrorMessage(const uint32 code) { + char *buffer = NULL; + uint32 msgLen = ::FormatMessageA( + FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER, + 0, + code, + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + reinterpret_cast(&buffer), + 0, + NULL); + if (msgLen == 0) { + // try again by stripping away the HRESULT_FROM_WIN32 bits + // in case this error code was translated first. + uint32 subcode = HRESULT_CODE(code); + msgLen = ::FormatMessageA( + FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER, + 0, + code, + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + reinterpret_cast(&buffer), + 0, + NULL); + } + + // strip ending CRLFs + while (msgLen && (('\n' == buffer[msgLen-1]) || ('\r' == buffer[msgLen-1]))) { + buffer[msgLen-1] = 0; + --msgLen; + } + + std::string message = msgLen ? std::string(buffer) : std::string(); + ::LocalFree(buffer); + return message; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/PlatformApi.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/PlatformApi.h new file mode 100644 index 000000000..96d339537 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/PlatformApi.h @@ -0,0 +1,18 @@ +/* + * Created: Nov 14, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + + #ifndef BasePlatform_PlatformApi_h_ + #define BasePlatform_PlatformApi_h_ + + namespace BasePlatform { + namespace PlatformApi { + + std::string BASEPLATFORM_LINKAGE GetApiErrorMessage(const uint32 code); + + }} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/PlatformDefines.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/PlatformDefines.h new file mode 100644 index 000000000..f6d74f355 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/PlatformDefines.h @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef PLATFORM_DEFINES_H +#define PLATFORM_DEFINES_H + +#ifdef WIN32 + #ifdef _WIN64 + typedef uint64 SUBSYS_INTPTR; + const SUBSYS_INTPTR SUBSYS_INTPTR_INVALID = 0xffffffffffffffff; + #else + typedef uint32 SUBSYS_INTPTR; + const SUBSYS_INTPTR SUBSYS_INTPTR_INVALID = 0xffffffff; + #endif +#else + +#ifdef __x86_64__ +typedef uint64_t SUBSYS_INTPTR; +const SUBSYS_INTPTR SUBSYS_INTPTR_INVALID = 0xffffffffffffffff; +#else +typedef uint32_t SUBSYS_INTPTR; +const SUBSYS_INTPTR SUBSYS_INTPTR_INVALID = 0xffffffff; +#endif +const uint32 DLL_PROCESS_ATTACH = 1; +const uint32 DLL_PROCESS_DETACH = 2; + +#ifndef TRUE +#define TRUE true +#endif + +#ifndef FALSE +#define FALSE false +#endif + +#endif + +#endif // #ifndef PLATFORM_DEFINES_H diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/PlatformErrors.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/PlatformErrors.h new file mode 100644 index 000000000..ba02c21ec --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/PlatformErrors.h @@ -0,0 +1,172 @@ +/* + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef PLATFORMERRORS_H_ +#define PLATFORMERRORS_H_ + +#ifdef WIN32 + +#include + +#else + +const HRESULT S_OK = 0; +const HRESULT S_FALSE = 1; +const HRESULT E_FAIL = 0x80004005; +const HRESULT E_NOTIMPL = 0x80004001; +const HRESULT E_INVALIDARG = 0x80070057; +const HRESULT E_OUTOFMEMORY = 0x8007000E; +const HRESULT E_POINTER = 0x80004003; +const HRESULT E_NOINTERFACE = 0x80004002; +const HRESULT E_UNEXPECTED = 0x8000FFFF; + +const HRESULT OLE_E_BLANK = 0x80040007; + +const HRESULT ERROR_SUCCESS = 0; +const HRESULT NO_ERROR = 0; +const HRESULT ERROR_INVALID_FUNCTION= 1; +const HRESULT ERROR_FILE_NOT_FOUND = 2; +const HRESULT ERROR_PATH_NOT_FOUND = 3; +const HRESULT ERROR_ACCESS_DENIED = 5; +const HRESULT ERROR_INVALID_HANDLE = 6; +const HRESULT ERROR_INVALID_DATA = 13; +const HRESULT ERROR_OUTOFMEMORY = 14; +const HRESULT ERROR_NOT_SAME_DEVICE= 17; +const HRESULT ERROR_HANDLE_EOF = 38; +const HRESULT ERROR_NOT_SUPPORTED = 50; +const HRESULT ERROR_FILE_EXISTS= 80; +const HRESULT ERROR_INVALID_PARAMETER = 87; +const HRESULT ERROR_BUFFER_OVERFLOW = 111; +const HRESULT ERROR_CALL_NOT_IMPLEMENTED = 120; +const HRESULT ERROR_INSUFFICIENT_BUFFER = 122; +const HRESULT ERROR_BAD_PATHNAME = 161; +const HRESULT ERROR_BUSY = 170; +const HRESULT ERROR_ALREADY_EXISTS= 183; +const HRESULT ERROR_NOT_FOUND = 1168; +const HRESULT ERROR_MORE_DATA = 234; +const HRESULT ERROR_NO_MORE_ITEMS = 259; +const HRESULT ERROR_SHUTDOWN_IN_PROGRESS = 1115; +const HRESULT ERROR_INVALID_INDEX = 1413; +const HRESULT ERROR_INTERNAL_ERROR = 1359; +const HRESULT ERROR_DISCARDED = 157; +const HRESULT ERROR_CLASS_ALREADY_EXISTS = 1410; +const HRESULT ERROR_CLASS_DOES_NOT_EXIST = 1411; +const HRESULT ERROR_TIMEOUT = 1460; +const HRESULT ERROR_UNSUPPORTED_TYPE = 1630; +const HRESULT ERROR_TAG_NOT_FOUND =2012; +const HRESULT ERROR_TAG_NOT_PRESENT =2013; +const HRESULT ERROR_DUPLICATE_TAG =2014; +const HRESULT ERROR_INVALID_STATE = 5023; +const HRESULT ERROR_FILE_READ_ONLY = 6009; +const HRESULT ERROR_REVISION_MISMATCH = 1306; +const HRESULT ERROR_ALREADY_INITIALIZED = 1247; + +const HRESULT DISP_E_BADVARTYPE = 0x80020008; +const HRESULT DISP_E_OVERFLOW = 0x8002000A; +const HRESULT DISP_E_TYPEMISMATCH = 0x80020005; +const HRESULT DISP_E_EXCEPTION = 0x80020009; +const HRESULT DISP_E_PARAMNOTOPTIONAL = 0x8002000F; +const HRESULT DISP_E_UNKNOWNNAME = 0x80020006; +const HRESULT DISP_E_BADPARAMCOUNT = 0x8002000E; +const HRESULT NTE_BAD_LEN = 0x80090004; + +const HRESULT RPC_S_OK = 0; +const HRESULT RPC_S_OUT_OF_MEMORY = ERROR_OUTOFMEMORY; +const HRESULT RPC_S_INVALID_STRING_BINDING = 1700; +const HRESULT RPC_S_WRONG_KIND_OF_BINDING = 1701; +const HRESULT RPC_S_INVALID_BINDING = 1702; +const HRESULT RPC_S_PROTSEQ_NOT_SUPPORTED = 1703; +const HRESULT RPC_S_INVALID_RPC_PROTSEQ = 1704; +const HRESULT RPC_S_INVALID_STRING_UUID = 1705; +const HRESULT RPC_S_INVALID_ENDPOINT_FORMAT = 1706; +const HRESULT RPC_S_INVALID_NET_ADDR = 1707; +const HRESULT RPC_S_NO_ENDPOINT_FOUND = 1708; +const HRESULT RPC_S_INVALID_TIMEOUT = 1709; +const HRESULT RPC_S_OBJECT_NOT_FOUND = 1710; +const HRESULT RPC_S_ALREADY_REGISTERED = 1711; +const HRESULT RPC_S_TYPE_ALREADY_REGISTERED = 1712; +const HRESULT RPC_S_ALREADY_LISTENING = 1713; +const HRESULT RPC_S_NO_PROTSEQS_REGISTERED = 1714; +const HRESULT RPC_S_NOT_LISTENING = 1715; +const HRESULT RPC_S_UNKNOWN_MGR_TYPE = 1716; +const HRESULT RPC_S_UNKNOWN_IF = 1717; +const HRESULT RPC_S_NO_BINDINGS = 1718; +const HRESULT RPC_S_NO_PROTSEQS = 1719; +const HRESULT RPC_S_CANT_CREATE_ENDPOINT = 1720; +const HRESULT RPC_S_OUT_OF_RESOURCES = 1721; +const HRESULT RPC_S_SERVER_UNAVAILABLE = 1722; +const HRESULT RPC_S_SERVER_TOO_BUSY = 1723; +const HRESULT RPC_S_INVALID_NETWORK_OPTIONS = 1724; +const HRESULT RPC_S_NO_CALL_ACTIVE = 1725; +const HRESULT RPC_S_CALL_FAILED = 1726; +const HRESULT RPC_S_CALL_FAILED_DNE = 1727; +const HRESULT RPC_S_PROTOCOL_ERROR = 1728; +const HRESULT RPC_S_UNSUPPORTED_TRANS_SYN = 1730; +const HRESULT RPC_S_UNSUPPORTED_TYPE = 1732; +const HRESULT RPC_S_INVALID_TAG = 1733; +const HRESULT RPC_S_INVALID_BOUND = 1734; +const HRESULT RPC_S_NO_ENTRY_NAME = 1735; +const HRESULT RPC_S_INVALID_NAME_SYNTAX = 1736; +const HRESULT RPC_S_UNSUPPORTED_NAME_SYNTAX = 1737; +const HRESULT RPC_S_UUID_NO_ADDRESS = 1739; +const HRESULT RPC_S_DUPLICATE_ENDPOINT = 1740; +const HRESULT RPC_S_UNKNOWN_AUTHN_TYPE = 1741; +const HRESULT RPC_S_MAX_CALLS_TOO_SMALL = 1742; +const HRESULT RPC_S_STRING_TOO_LONG = 1743; +const HRESULT RPC_S_PROTSEQ_NOT_FOUND = 1744; +const HRESULT RPC_S_PROCNUM_OUT_OF_RANGE = 1745; +const HRESULT RPC_S_BINDING_HAS_NO_AUTH = 1746; +const HRESULT RPC_S_UNKNOWN_AUTHN_SERVICE = 1747; +const HRESULT RPC_S_UNKNOWN_AUTHN_LEVEL = 1748; +const HRESULT RPC_S_INVALID_AUTH_IDENTITY = 1749; +const HRESULT RPC_S_UNKNOWN_AUTHZ_SERVICE = 1750; + +const HRESULT FACILITY_WINDOWS = 8; +const HRESULT FACILITY_URT = 19; +const HRESULT FACILITY_STORAGE = 3; +const HRESULT FACILITY_SSPI = 9; +const HRESULT FACILITY_SCARD = 16; +const HRESULT FACILITY_SETUPAPI = 15; +const HRESULT FACILITY_SECURITY = 9; +const HRESULT FACILITY_RPC = 1; +const HRESULT FACILITY_WIN32 = 7; +const HRESULT FACILITY_CONTROL = 10; +const HRESULT FACILITY_NULL = 0; +const HRESULT FACILITY_MSMQ = 14; +const HRESULT FACILITY_MEDIASERVER = 13; +const HRESULT FACILITY_INTERNET = 12; +const HRESULT FACILITY_ITF = 4; +const HRESULT FACILITY_DISPATCH = 2; +const HRESULT FACILITY_COMPLUS = 17; +const HRESULT FACILITY_CERT = 11; +const HRESULT FACILITY_ACS = 20; +const HRESULT FACILITY_AAF = 18; + +const HRESULT SEVERITY_SUCCESS = 0; +const HRESULT SEVERITY_ERROR = 1; + +#define HRESULT_FROM_WIN32(x) ((HRESULT)(x) <= 0 ? ((HRESULT)(x)) : ((HRESULT) (((x) & 0x0000FFFF) | (FACILITY_WIN32 << 16) | 0x80000000))) + +#define SUCCEEDED(status) ((HRESULT)(status) >= 0) +#define FAILED(status) ((HRESULT)(status) < 0) +#define IS_ERROR(status) ((uint32)(status) >> 31 == SEVERITY_ERROR) + +#define HRESULT_CODE(hr) ((hr) & 0xFFFF) +#define SCODE_CODE(sc) ((sc) & 0xFFFF) + +#define HRESULT_FACILITY(hr) (((hr) >> 16) & 0x1FFF) +#define SCODE_FACILITY(sc) (((sc) >> 16) & 0x1FFF) + +#define HRESULT_SEVERITY(hr) (((hr) >> 31) & 0x1 +#define SCODE_SEVERITY(sc) (((sc) >> 31) & 0x1) + +#define MAKE_HRESULT(sev,fac,code) \ + ((HRESULT) (((uint32)(sev)<<31) | ((uint32)(fac)<<16) | ((uint32)(code))) ) +#define MAKE_SCODE(sev,fac,code) \ + ((HRESULT) (((uint32)(sev)<<31) | ((uint32)(fac)<<16) | ((uint32)(code))) ) + +#endif + +#endif /* PLATFORMERRORS_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/PlatformIID.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/PlatformIID.cpp new file mode 100644 index 000000000..224144bbc --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/PlatformIID.cpp @@ -0,0 +1,161 @@ +/* + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "PlatformIID.h" + +#include +#include +#ifndef WIN32 +#include +#include +#endif + +GMutex BasePlatform::gs_BaseIIDInitMutex; + +using namespace std; + +namespace BasePlatform { + +BASEPLATFORM_LINKAGE std::string UuidToString(const UUID& uuid) { + stringstream str; + str.fill('0'); + str.setf(ios_base::uppercase); + str.setf(ios_base::hex, ios_base::basefield); + str << setw(8) << uuid.Data1; + str << '-' << setw(4) << uuid.Data2; + str << '-' << setw(4) << uuid.Data3; + str << '-' << setw(2) << (int32)uuid.Data4[0]; + str << setw(2) << (int32)uuid.Data4[1]; + str << '-' << setw(2) << (int32)uuid.Data4[2]; + str << setw(2) << (int32)uuid.Data4[3]; + str << setw(2) << (int32)uuid.Data4[4]; + str << setw(2) << (int32)uuid.Data4[5]; + str << setw(2) << (int32)uuid.Data4[6]; + str << setw(2) << (int32)uuid.Data4[7]; + return str.str(); +} + +unsigned char Char2Bin(const unsigned char cucValue) +{ + unsigned char ucBinValue = 0; + if ('0' <= cucValue && '9' >= cucValue) + { + ucBinValue = cucValue - '0'; + } + else + { + ucBinValue = ::tolower(cucValue) - 'a' + 10; + } + return ucBinValue; +} + +BASEPLATFORM_LINKAGE HRESULT UuidFromString(const char* pszUuid, UUID& uuid) { + if (pszUuid) + { + // Check to see if the guid is surrounded by '{' '}' + if (*pszUuid == '{') { + pszUuid = &pszUuid[1]; + } + + if (::strlen(pszUuid) >= 36) + { + if (('-' != pszUuid[8]) || ('-' != pszUuid[13]) || + ('-' != pszUuid[18]) || ('-' != pszUuid[23])) + { + return E_INVALIDARG; + } + + for (int32 iLoop = 0; iLoop < 36; ++iLoop) + { + if (8 != iLoop && 13 != iLoop && 18 != iLoop && 23 != iLoop) + { +#if defined (__APPLE__) || defined (__hpux__) || defined (__sun__) || (defined (__linux__) && OS_RELEASE_MAJOR == 2) + if (!isxdigit(pszUuid[iLoop])) +#else + if (!::isxdigit(pszUuid[iLoop])) +#endif + { + return E_INVALIDARG; + } + } + } + + // so we've validated the string, so now we need to BCD it into + // the UUID structure - make a temporary and then memcpy it + uuid.Data1 = Char2Bin(pszUuid[0]) << 28; + uuid.Data1 |= Char2Bin(pszUuid[1]) << 24; + uuid.Data1 |= Char2Bin(pszUuid[2]) << 20; + uuid.Data1 |= Char2Bin(pszUuid[3]) << 16; + uuid.Data1 |= Char2Bin(pszUuid[4]) << 12; + uuid.Data1 |= Char2Bin(pszUuid[5]) << 8; + uuid.Data1 |= Char2Bin(pszUuid[6]) << 4; + uuid.Data1 |= Char2Bin(pszUuid[7]); + + uuid.Data2 = Char2Bin(pszUuid[9]) << 12; + uuid.Data2 |= Char2Bin(pszUuid[10]) << 8; + uuid.Data2 |= Char2Bin(pszUuid[11]) << 4; + uuid.Data2 |= Char2Bin(pszUuid[12]); + + uuid.Data3 = Char2Bin(pszUuid[14]) << 12; + uuid.Data3 |= Char2Bin(pszUuid[15]) << 8; + uuid.Data3 |= Char2Bin(pszUuid[16]) << 4; + uuid.Data3 |= Char2Bin(pszUuid[17]); + + uuid.Data4[0] = Char2Bin(pszUuid[19]) << 4; + uuid.Data4[0] |= Char2Bin(pszUuid[20]); + uuid.Data4[1] = Char2Bin(pszUuid[21]) << 4; + uuid.Data4[1] |= Char2Bin(pszUuid[22]); + uuid.Data4[2] = Char2Bin(pszUuid[24]) << 4; + uuid.Data4[2] |= Char2Bin(pszUuid[25]); + uuid.Data4[3] = Char2Bin(pszUuid[26]) << 4; + uuid.Data4[3] |= Char2Bin(pszUuid[27]); + uuid.Data4[4] = Char2Bin(pszUuid[28]) << 4; + uuid.Data4[4] |= Char2Bin(pszUuid[29]); + uuid.Data4[5] = Char2Bin(pszUuid[30]) << 4; + uuid.Data4[5] |= Char2Bin(pszUuid[31]); + uuid.Data4[6] = Char2Bin(pszUuid[32]) << 4; + uuid.Data4[6] |= Char2Bin(pszUuid[33]); + uuid.Data4[7] = Char2Bin(pszUuid[34]) << 4; + uuid.Data4[7] |= Char2Bin(pszUuid[35]); + + return S_OK; + } + else + { + return E_INVALIDARG; + } + } + + return E_INVALIDARG; +} +} +#ifndef WIN32 + +HRESULT UuidCreate(UUID* uuid) { + if (uuid) { + // a uuid is 16 bytes - we'll fill them with a + // random number (1st 4 bytes) + // the current time in seconds (2nd 4 bytes) + // the hostid of the machine (3rd 4 bytes) + // the current micro seconds (last 4 bytes) + int32 iRand = ::rand(); + struct timeval stTimeVal; + ::gettimeofday(&stTimeVal, NULL); + int32 iHostId = ::gethostid(); + + byte * pbUuid = reinterpret_cast(uuid); + ::memcpy(pbUuid, &iRand, 4); + ::memcpy(pbUuid+4, &stTimeVal.tv_sec, 4); + ::memcpy(pbUuid+8, &iHostId, 4); + ::memcpy(pbUuid+12, &stTimeVal.tv_usec, 4); + return S_OK; + } + else { + return OLE_E_BLANK; + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/PlatformIID.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/PlatformIID.h new file mode 100644 index 000000000..5b5992768 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/PlatformIID.h @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef PLATFORM_IID_H +#define PLATFORM_IID_H + +#ifndef WIN32 + + #include + #include + + struct GUID + { + // this must match the Windows GUID structure + uint32 Data1; // 4 bytes + uint16 Data2; // 2 bytes + uint16 Data3; // 2 bytes + byte Data4[8]; // 8 bytes + }; + + typedef GUID IID, UUID; + + inline bool IsEqualGUID(const GUID& rguid1, const GUID& rguid2) + { + return (!::memcmp(&rguid1,&rguid2,sizeof(GUID))); + } + + #define IsEqualIID(rguid1,rguid2) IsEqualGUID(rguid1,rguid2) + #define IsEqualUUID(rguid1,rguid2) IsEqualGUID(rguid1,rguid2) + + extern HRESULT UuidCreate(UUID* uuid); + +#endif + +namespace BasePlatform { +BASEPLATFORM_LINKAGE std::string UuidToString(const UUID& uuid); +BASEPLATFORM_LINKAGE HRESULT UuidFromString(const char* strGuid, UUID& uuid); + +// This mutex is used to guard the construction of the IIDs in the IIDOF macro +extern BASEPLATFORM_LINKAGE GMutex gs_BaseIIDInitMutex; +} + +#define CAF_DECL_UUID(iid) \ +public: \ +static const IID & IIDOF() \ +{ \ + static IID ms_oIID; \ + static bool m_bIsSet; \ + g_mutex_lock(&BasePlatform::gs_BaseIIDInitMutex); \ + if ( !m_bIsSet ) \ + { \ + BasePlatform::UuidFromString( iid , ms_oIID ); \ + m_bIsSet = true; \ + } \ + g_mutex_unlock(&BasePlatform::gs_BaseIIDInitMutex); \ + return ms_oIID; \ +} + +#define CAF_IIDOF(type_name) type_name::IIDOF() + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/PlatformStringFunc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/PlatformStringFunc.cpp new file mode 100644 index 000000000..f33b31761 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/PlatformStringFunc.cpp @@ -0,0 +1,37 @@ +/* + * Author: mdonahue + * Created: Jan 13, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "PlatformStringFunc.h" +#include + +using namespace std; + +namespace BasePlatform { +#ifdef fix +std::wstring A2W(const std::string& str) +{ + wstringstream wstm ; + const ctype& ctfacet = use_facet< ctype >(wstm.getloc()); + for (size_t i = 0; i < str.size(); ++i) { + wstm << ctfacet.widen(str[i]); + } + return wstm.str(); +} + +std::string W2A(const std::wstring& str) +{ + ostringstream stm; + const ctype& ctfacet = use_facet< ctype >(stm.getloc()); + for (size_t i = 0; i < str.size(); ++i) { + stm << ctfacet.narrow(str[i], 0); + } + return stm.str(); +} +#endif +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/PlatformStringFunc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/PlatformStringFunc.h new file mode 100644 index 000000000..b843d8d1a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/PlatformStringFunc.h @@ -0,0 +1,18 @@ +/* + * Author: mdonahue + * Created: Jan 13, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef PLATFORMSTRINGFUNC_H_ +#define PLATFORMSTRINGFUNC_H_ + +namespace BasePlatform { + + //extern std::wstring A2W(const std::string& str); + //extern std::string W2A(const std::wstring& str); +} + +#endif /* PLATFORMSTRINGFUNC_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/PlatformTypes.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/PlatformTypes.h new file mode 100644 index 000000000..eedbd04fe --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/PlatformTypes.h @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef PLATFORM_TYPES_H +#define PLATFORM_TYPES_H + +#ifdef WIN32 + +#include + +#else +// #include +#include +#include +#if defined (__linux__) || defined (__APPLE__) + #include +#endif + +//typedef int32 RPC_STATUS; + +#define __declspec(value) +#define __stdcall +#define __cdecl +#define APIENTRY + +#define FAR + +typedef void * HINSTANCE; +typedef void * HMODULE; +typedef void * HANDLE; +typedef void * LPVOID; +typedef bool BOOL; +typedef uint8_t byte; +typedef int32_t HRESULT; +#endif + +#endif // PLATFORM_TYPES_H diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CAutoMutexLockUnlockRaw.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CAutoMutexLockUnlockRaw.cpp new file mode 100644 index 000000000..f655a307f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CAutoMutexLockUnlockRaw.cpp @@ -0,0 +1,41 @@ +/* + * Author: mdonahue + * Created: Jan 20, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CAutoMutexLockUnlockRaw.h" + +using namespace Caf; + +CAutoMutexLockUnlockRaw::CAutoMutexLockUnlockRaw(GMutex* mutex) : + CAF_CM_INIT("CAutoMutexLockUnlockRaw") { + _mutex = mutex; + _recMutex = NULL; + + if (_mutex) { + ::g_mutex_lock(_mutex); + } +} + +CAutoMutexLockUnlockRaw::CAutoMutexLockUnlockRaw(GRecMutex* recMutex) : + CAF_CM_INIT("CAutoMutexLockUnlockRaw") { + _mutex = NULL; + _recMutex = recMutex; + + if (_recMutex) { + ::g_rec_mutex_lock(_recMutex); + } +} + +CAutoMutexLockUnlockRaw::~CAutoMutexLockUnlockRaw() { + if (_mutex) { + ::g_mutex_unlock(_mutex); + } + if (_recMutex) { + ::g_rec_mutex_unlock(_recMutex); + } +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CAutoMutexLockUnlockRaw.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CAutoMutexLockUnlockRaw.h new file mode 100644 index 000000000..0b122cd77 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CAutoMutexLockUnlockRaw.h @@ -0,0 +1,33 @@ +/* + * Author: mdonahue + * Created: Jan 20, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CAUTOMUTEXLOCKUNLOCKRAW_H_ +#define CAUTOMUTEXLOCKUNLOCKRAW_H_ + +namespace Caf { + +class SUBSYSTEMBASE_LINKAGE CAutoMutexLockUnlockRaw { +public: + CAutoMutexLockUnlockRaw(GMutex* mutex); + + CAutoMutexLockUnlockRaw(GRecMutex* recMutex); + + ~CAutoMutexLockUnlockRaw(); + +private: + GMutex* _mutex; + GRecMutex* _recMutex; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CAutoMutexLockUnlockRaw); +}; + +} + +#endif /* CAUTOMUTEXLOCKUNLOCKRAW_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmDllManager.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmDllManager.cpp new file mode 100644 index 000000000..49ce4d862 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmDllManager.cpp @@ -0,0 +1,829 @@ +/* + * Created: Oct 09, 2002 + * + * Copyright (c) 2002-2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CEcmDllManager.h" + +#ifndef WIN32 + #include + #include + #include + #include +#endif + +#define _MAX_PATH_LARGE 32768 + +using namespace Caf; + +GRecMutex CEcmDllManager::ms_mutex; + +#if !defined( WIN32 ) +std::map CEcmDllManager::ms_mapLoadedModuleRefCounts; +std::map CEcmDllManager::ms_mapLoadedModules; +#endif + +// Here is where we work out which Unix OS style of dl functions we are +// going to use +// 1. we have all dl functions we need dlopen, dlclose, dladdr and dlsym +// 2. we have all dl functions except dladdr (AIX) +#if defined ( __sun__ ) || defined ( __linux__ ) || defined ( WIN32 ) || defined ( __hpux__ ) || defined (__APPLE__) +// we have everything we need +#elif defined ( _AIX ) + #include + #include + #include + extern "C" + { + extern int32 getargs(struct procsinfo*, int32, char*, int32); + } +#else + #error "Not yet ported to this platform" +#endif + +typedef BOOL (*DllMainPtr) (HINSTANCE, uint32, LPVOID); +static const char *gs_cszDllMainFunctionName = "DllMain"; +static const char *gs_cszMainFunctionName = "main"; +#ifdef _AIX +static const char *gs_cszInitFunctionName = "_GLOBAL__DI"; +#else +static const char *gs_cszInitFunctionName = "_init"; +#endif + +////////////////////////////////////////////////////////////////////////////// +// +// LoadLibrary +// Loads a shared library from any OS +// +////////////////////////////////////////////////////////////////////////////// +HMODULE CEcmDllManager::LoadLibrary( + const char * cszLibName, + bool bMustInvokeDllMain, + bool bThrowExceptionUponFailure/* = true */) +{ + CAF_CM_STATIC_FUNC( "CEcmDllManager", "LoadLibrary" ); + CAF_CM_VALIDATE_STRINGPTRA( cszLibName ); + + HMODULE hRetModule = NULL; + bool bIsLoaded = false; + +#if defined (WIN32) + const char* libPrefix = NULL; + const char* libSuffix = ".dll"; +#elif defined (__APPLE__) + const char* libPrefix = "lib"; + const char* libSuffix = ".dylib"; +#elif defined (__linux__) + const char* libPrefix = "lib"; + const char* libSuffix = ".so"; +#else +#error 'NOT IMPLEMENTED FOR THIS OPERATING SYSTEM' +#endif + + std::string libName(cszLibName); + if (libPrefix != NULL && libName.compare(0, std::string::npos, libPrefix) != 0) { + libName.insert(0, libPrefix); + } + if (libName.find(libSuffix) == std::string::npos) { + libName += libSuffix; + } + + try + { +#if defined ( WIN32 ) + hRetModule = ::LoadLibraryExA( libName.c_str(), NULL, 0 ); + uint32 rc = ::GetLastError(); + + if ( NULL != hRetModule ) + { + bIsLoaded = true; + } + else + { + std::string strSystemMessage; + if ( ERROR_SUCCESS != rc ) + { + strSystemMessage = BasePlatform::PlatformApi::GetApiErrorMessage(rc); + } + else + { + strSystemMessage = "GetLastError() returned ERROR_SUCCESS but hRetModule is NULL"; + } + + CAF_CM_EXCEPTION_VA2( + rc, + "Failed to load library: %s Error: %s", + libName.c_str(), + strSystemMessage.c_str()); + } +#else + bool bLogLoading = ( ::getenv( "SYSLOG_DLOPENS" ) != NULL ); + + // this needs to be thread safe so that we dont lose the last error + // generated if a new thread also calls dlerror - unlike windows, the + // error message is not per thread. + CAutoMutexLockUnlockRaw oCS( &ms_mutex ); + + if ( bLogLoading ) + ::syslog(LOG_DEBUG, "---- Loading %s", libName.c_str() ); + + + // Let's see if we've already loaded it + std::map::iterator it = ms_mapLoadedModuleRefCounts.find( libName.c_str() ); + if ( it != ms_mapLoadedModuleRefCounts.end() ) + { + it->second.m_iRefCount++; + hRetModule = it->second.m_hModule; + if ( bLogLoading ) +#ifdef __x86_64__ + ::syslog(LOG_DEBUG," ------ Already loaded as %p count is now %d", hRetModule, it->second.m_iRefCount ); +#else + ::syslog(LOG_DEBUG," ------ Already loaded as %p count is now %d", hRetModule, it->second.m_iRefCount ); +#endif + } + else + { + hRetModule = ::dlopen( libName.c_str(), RTLD_NOW | RTLD_LOCAL ); + if ( bLogLoading ) +#ifdef __x86_64__ + ::syslog(LOG_DEBUG," ------ Loaded as %p" , hRetModule); +#else + ::syslog(LOG_DEBUG," ------ Loaded as %p" , hRetModule); +#endif + + if ( NULL == hRetModule ) + { + std::string strSystemMessage; + const char * pszMessage = dlerror(); + if ( NULL != pszMessage ) + { + strSystemMessage = pszMessage; + } + else + { + strSystemMessage = "dlerror() returned NULL"; + } + + CAF_CM_EXCEPTIONEX_VA2( + LibraryFailedToLoadException, + 0, + "Failed to load library: %s Error: %s", + libName.c_str(), + strSystemMessage.c_str()); + } + else + { + bIsLoaded = true; + std::string strSubErrorMessage; + + // not all compilers will call a method on initializing + // a shared library, so we will force ourselves to call one + // we will mimic the Windows DllMain functionality + DllMainPtr pfnDllMain = (DllMainPtr) + CEcmDllManager::GetFunctionAddress( + hRetModule, + gs_cszDllMainFunctionName, + strSubErrorMessage ); + + + if ( NULL != pfnDllMain ) + { + BOOL result = ( *pfnDllMain )( hRetModule, DLL_PROCESS_ATTACH, NULL ); + if ( false == result ) + { + CAF_CM_EXCEPTION_VA2(E_FAIL, + "%s in library %s returned false - library not loaded", + gs_cszDllMainFunctionName, + libName.c_str()); + } + } + else if ( bMustInvokeDllMain ) + { + CAF_CM_EXCEPTION_VA3(E_FAIL, + "Unable to find %s in library %s, Error: %s - library not loaded", + gs_cszDllMainFunctionName, + libName.c_str(), + strSubErrorMessage.c_str()); + } + SModuleRefCount stRefCount; + stRefCount.m_iRefCount = 1; + stRefCount.m_hModule = hRetModule; + std::string strModuleName( libName.c_str() ); + ms_mapLoadedModuleRefCounts.insert( std::make_pair(strModuleName, stRefCount ) ); + ms_mapLoadedModules.insert( std::make_pair( hRetModule, strModuleName ) ); + } + } +#endif + } + catch (CCafException *e) + { + _cm_exception_ = e; + } + + if ( _cm_exception_ ) + { + try + { + if ( bIsLoaded ) + { + CEcmDllManager::UnloadLibrary( hRetModule, false ); + } + } + catch (CCafException *e) + { + e->Release(); + } + + + // If we were told to eat the exception then do so + hRetModule = NULL; + if( !bThrowExceptionUponFailure ) + { + _cm_exception_->Release(); + } + else + { + _cm_exception_->throwSelf(); + } + } + return hRetModule; +} + +////////////////////////////////////////////////////////////////////////////// +// +// UnloadLibrary +// Unloads a shared library from any OS +// +////////////////////////////////////////////////////////////////////////////// +void CEcmDllManager::UnloadLibrary( HMODULE hLibraryHandle, bool bMustInvokeDllMain ) +{ + CAF_CM_STATIC_FUNC( "CEcmDllManager", "UnloadLibrary" ); + CAF_CM_VALIDATE_PTR( hLibraryHandle ); + +#if defined ( WIN32 ) + if ( ! ::FreeLibrary( hLibraryHandle ) ) + { + uint32 rc = ::GetLastError(); + std::string strSystemMessage; + if ( ERROR_SUCCESS != rc ) + { + strSystemMessage = BasePlatform::PlatformApi::GetApiErrorMessage(rc); + } + else + { + strSystemMessage = "GetLastError() returned ERROR_SUCCESS"; + } + + CAF_CM_EXCEPTION_VA1( + rc, + "::FreeLibrary failed: %s", + strSystemMessage.c_str()); + } +#else + // this needs to be thread safe so that we dont lose the last error + // generated if a new thread also calls dlerror - unlike windows, the + // error message is not per thread. + bool bLogLoading = ( ::getenv( "SYSLOG_DLOPENS" ) != NULL ); + + CAutoMutexLockUnlockRaw oCS( &ms_mutex ); + + if ( bLogLoading ) +#ifdef __x86_64__ + ::syslog( LOG_DEBUG, "---- Unloading %p", hLibraryHandle ); +#else + ::syslog( LOG_DEBUG, "---- Unloading %p", hLibraryHandle ); +#endif + // look for the specific library in our loaded list - + // we'll unload if the ref count hits 0 or if it doesn't exist + int32 iRefCount = 0; + std::map::iterator it = ms_mapLoadedModules.find( hLibraryHandle ); + if ( it != ms_mapLoadedModules.end() ) + { + if ( bLogLoading ) { + ::syslog( LOG_DEBUG, "------ Is Library %s", it->second.c_str() ); + } + + std::map::iterator itCnt = + ms_mapLoadedModuleRefCounts.find (it->second); + if ( itCnt != ms_mapLoadedModuleRefCounts.end() ) + { + iRefCount = --itCnt->second.m_iRefCount; + if ( iRefCount == 0 ) + ms_mapLoadedModuleRefCounts.erase( itCnt ); + } + if ( iRefCount == 0 ) + { + ms_mapLoadedModules.erase( it ); + } + } + + if ( bLogLoading ) + ::syslog( LOG_DEBUG, "------ ref count is %d", iRefCount ); + + if ( iRefCount == 0 ) + { + // not all compilers will call a method on initializing + // a shared library, so we will force ourselves to call one + // we will mimic the Windows DllMain functionality + std::string strSubErrorMessage; + DllMainPtr pfnDllMain = (DllMainPtr) CEcmDllManager::GetFunctionAddress( + hLibraryHandle, + gs_cszDllMainFunctionName, strSubErrorMessage ); + + if ( NULL != pfnDllMain ) + { + BOOL result = ( *pfnDllMain )( hLibraryHandle, DLL_PROCESS_DETACH, NULL ); + if ( false == result ) + { + CAF_CM_EXCEPTION_VA1(E_FAIL, + "%s returned false - library not unloaded", + gs_cszDllMainFunctionName); + } + } + else if ( bMustInvokeDllMain ) + { + CAF_CM_EXCEPTION_VA2(E_FAIL, + "Unable to find %s, Error: %s, returned false - library not unloaded", + gs_cszDllMainFunctionName, + strSubErrorMessage.c_str()); + } + + if ( 0 != ::dlclose( hLibraryHandle ) ) + { + CAF_CM_EXCEPTION_VA1(E_FAIL, + "Unable to unload library %s", + ::dlerror()); + } + } +#endif +} + +////////////////////////////////////////////////////////////////////////////// +// +// GetFunctionAddress +// +// Finds the specified symbol in a library +// +////////////////////////////////////////////////////////////////////////////// +void * CEcmDllManager::GetFunctionAddress( HMODULE hLibraryHandle, const char * cszFunctionName, std::string & rstrErrorMessage ) +{ + CAF_CM_STATIC_FUNC_VALIDATE( "CEcmDllManager", "GetFunctionAddress" ); + CAF_CM_VALIDATE_STRINGPTRA( cszFunctionName ); + // It is legal for a NULL handle to be passed in - NULL is the + // executable + + void * pvRetAddress = NULL; + + rstrErrorMessage = ""; + +#if defined ( WIN32 ) + + pvRetAddress = ::GetProcAddress( hLibraryHandle, cszFunctionName ); + if ( NULL == pvRetAddress ) + { + uint32 rc = ::GetLastError(); + rstrErrorMessage = "Unable to locate function "; + rstrErrorMessage += cszFunctionName; + rstrErrorMessage += ", Error : "; + if ( ERROR_SUCCESS != rc ) + { + rstrErrorMessage += BasePlatform::PlatformApi::GetApiErrorMessage(rc); + } + else + { + rstrErrorMessage += "GetLastError() returned ERROR_SUCCESS"; + } + } +#else + CAutoMutexLockUnlockRaw oCS( &ms_mutex ); + try + { + pvRetAddress = ::dlsym( hLibraryHandle, cszFunctionName ); + } + catch (...) + { + // if we were passed a bad handle, this can cause a seg + // violation - so treat it as a regular error + // Note : Sometimes we can do nothing about it and the + // program will crash + pvRetAddress = NULL; + } + + if ( NULL == pvRetAddress ) + { + rstrErrorMessage = "Unable to locate function "; + rstrErrorMessage += cszFunctionName; + rstrErrorMessage += ", Error : "; + const char * pszError = ::dlerror(); + if ( NULL != pszError ) + { + rstrErrorMessage += pszError; + } + else + { + rstrErrorMessage += "dlerror() returned NULL"; + } + } +#endif + + return pvRetAddress; +} + +////////////////////////////////////////////////////////////////////////////// +// +// GetLibraryNameFromHandle +// Determines the name of a library from its handle. +// We are going to need to add functionality here for AIX 4.3.3 and HPUX10.20 +// +////////////////////////////////////////////////////////////////////////////// +void CEcmDllManager::GetLibraryNameFromHandle ( HMODULE hLibraryHandle, std::string & rstrLibName ) +{ + CAF_CM_STATIC_FUNC( "CEcmDllManager", "GetLibraryNameFromHandle" ); + // it is legal for hLibraryModule to be NULL (it's the executable) + // so don't validate it + + rstrLibName = ""; +#if defined ( WIN32 ) + char szFilePath[ _MAX_PATH_LARGE ] = {0}; + if (0 != ::GetModuleFileNameA( hLibraryHandle, szFilePath, _MAX_PATH_LARGE - 1)) + { + rstrLibName = szFilePath; + } + else + { + uint32 rc = ::GetLastError(); + std::string strErrorMessage( "Error Getting Module Name " ); + strErrorMessage += ", Error : "; + if ( ERROR_SUCCESS != rc ) + { + strErrorMessage += BasePlatform::PlatformApi::GetApiErrorMessage(rc); + } + else + { + strErrorMessage += "GetLastError() returned ERROR_SUCCESS"; + } + CAF_CM_EXCEPTION_VA0(rc, strErrorMessage.c_str()); + } +#else + // we know that all of our libs must have a DllMain function + // so look it up in the specified library and then + // use its address to find the name + std::string strSubErrorMessage; + void * vpAddress = NULL; + + if ( NULL == hLibraryHandle ) + { + // if its the NULL handle, we really want to look + // at the main program, on AIX we need to get the 1st entry from + // loadquery, otherwise we can use dlopen on NULL + GetMainProgramName( rstrLibName ); + } + else + { + // In a dll we need to look for DllMain + vpAddress = CEcmDllManager::GetFunctionAddress( hLibraryHandle, + gs_cszDllMainFunctionName, + strSubErrorMessage ); + + + if ( NULL == vpAddress ) + { + // try looking for main as well + vpAddress = CEcmDllManager::GetFunctionAddress( hLibraryHandle, + gs_cszMainFunctionName, + strSubErrorMessage ); + } + + if ( NULL == vpAddress ) + { + // try looking for _init as well + vpAddress = CEcmDllManager::GetFunctionAddress( hLibraryHandle, + gs_cszInitFunctionName, + strSubErrorMessage ); + } + + if ( vpAddress ) + { + CEcmDllManager::GetLibraryNameFromAddress( vpAddress, rstrLibName ); + } + else + { + CAF_CM_EXCEPTION_VA1(E_FAIL, + "Cannot find symbol in library, cannot resolve library handle to file name: %s", + strSubErrorMessage.c_str()); + } + } +#endif +} + +////////////////////////////////////////////////////////////////////////////// +// +// GetLibraryNameFromAddress +// Determines which library/exe contains the specific address (Unix only). +// We are going to need to add functionality here for AIX 4.3.3 and HPUX10.20 +// +////////////////////////////////////////////////////////////////////////////// +void CEcmDllManager::GetLibraryNameFromAddress( const void * cpvAddressInLibrary, std::string & rstrLibName ) +{ + CAF_CM_STATIC_FUNC( "CEcmDllManager", "GetLibraryNameFromAddress" ); + + char * szBuffer = NULL; + + try + { +#if defined ( WIN32 ) + CAF_CM_EXCEPTION_VA0( + E_NOTIMPL, + "CEcmDllManager::GetLibraryNameFromAddress not implemented"); + +#elif defined ( __sun__ ) || defined ( __linux__ ) || defined ( __hpux__ ) || defined (__APPLE__) + + CAutoMutexLockUnlockRaw oCS( &ms_mutex ); + Dl_info stDlInfo; + + if ( 0 != ::dladdr( const_cast( cpvAddressInLibrary ), &stDlInfo ) ) + { + char szFilePath[ 32768 ]; + ::realpath( stDlInfo.dli_fname, szFilePath ); + rstrLibName = szFilePath; + } + else + { + std::string strErrorMessage( "Unable to locate address in library " ); + strErrorMessage += ", Error : "; + const char * pszError = ::dlerror(); + if ( NULL != pszError ) + { + strErrorMessage += pszError; + } + else + { + strErrorMessage += "dlerror() returned NULL"; + } + CAF_CM_EXCEPTION_EFAIL(strErrorMessage.c_str()); + } + +#elif defined ( _AIX ) + + szBuffer = static_cast( ::malloc(1024) ); + int32 iSize = 1024; + + int32 iRc = ::loadquery( L_GETINFO, static_cast( szBuffer ),iSize); + + while ( ( -1 == iRc ) && ( ENOMEM == errno ) ) + { + ::free( szBuffer ); + iSize += 1024; + szBuffer = static_cast( ::malloc( iSize ) ); + iRc = ::loadquery( L_GETINFO, static_cast( szBuffer ),iSize); + } + + if ( -1 == iRc ) + { + ::free( szBuffer ); + szBuffer = NULL; + CAF_CM_EXCEPTION( "::loadquery failed", errno ); + } + + + ld_info * pLdInfo = reinterpret_cast( szBuffer ); + + while ( pLdInfo ) + { + void * pvUpper = reinterpret_cast( + reinterpret_cast( pLdInfo->ldinfo_dataorg) + + pLdInfo->ldinfo_datasize ); + + if ( ( cpvAddressInLibrary >= pLdInfo->ldinfo_dataorg ) && + ( cpvAddressInLibrary < pvUpper ) ) + { + char szFilePath[ _MAX_PATH ]; + ::realpath( pLdInfo->ldinfo_filename, szFilePath ); + rstrLibName = szFilePath; + break; + } + else + { + if ( pLdInfo->ldinfo_next == 0 ) + pLdInfo = NULL; + else + pLdInfo = reinterpret_cast ( + reinterpret_cast( pLdInfo ) + + pLdInfo->ldinfo_next ); + } + } + + ::free( szBuffer ); + szBuffer = NULL; + + if ( rstrLibName.length() == 0 ) + { + CAF_CM_EXCEPTION_EFAIL("Unable to locate address in library"); + } + +#else +#error "Not yet implemented on this platform"; +#endif + } + catch(CCafException *e) + { + _cm_exception_ = e; + } + + if ( szBuffer ) + { + ::free( szBuffer ); + } + + if ( _cm_exception_ ) + { + throw _cm_exception_; + } +} + +////////////////////////////////////////////////////////////////////////////// +// +// GetMainProgramName +// Determines the name of the current program. +// We are going to need to add functionality here for AIX 4.3.3 and HPUX10.20 +// +////////////////////////////////////////////////////////////////////////////// +void CEcmDllManager::GetMainProgramName ( std::string & rstrProgName ) +{ + CAF_CM_STATIC_FUNC( "CEcmDllManager", "GetMainProgramName" ); + + char * szBuffer = NULL; + HMODULE hSearchModule = NULL; + std::string strSubErrorMessage; + try + { + rstrProgName = ""; +#if defined ( WIN32 ) + + char szFilePath[ _MAX_PATH_LARGE] = {0}; + if ( 0 != ::GetModuleFileNameA( NULL, szFilePath, _MAX_PATH_LARGE-1) ) + { + rstrProgName = szFilePath; + } + else + { + uint32 rc = ::GetLastError(); + std::string strErrorMessage( "Error Getting Module Name " ); + strErrorMessage += ", Error : "; + if ( ERROR_SUCCESS != rc ) + { + strErrorMessage += BasePlatform::PlatformApi::GetApiErrorMessage(rc); + } + else + { + strErrorMessage += "GetLastError() returned ERROR_SUCCESS"; + } + CAF_CM_EXCEPTION_VA0(rc, strErrorMessage.c_str()); + } +#elif defined ( _AIX ) + + // on AIX we need to get the 1st entry from + // loadquery, otherwise we can use dlopen on NULL + szBuffer = static_cast( ::malloc(1024) ); + int32 iSize = 1024; + + int32 iRc = ::loadquery( L_GETINFO, + static_cast( szBuffer ),iSize); + + while ( ( -1 == iRc ) && ( ENOMEM == errno ) ) + { + ::free( szBuffer ); + iSize += 1024; + szBuffer = static_cast( ::malloc( iSize ) ); + iRc = ::loadquery( L_GETINFO, + static_cast( szBuffer ),iSize); + } + + if ( -1 == iRc ) + { + ::free( szBuffer ); + szBuffer = NULL; + CAF_CM_EXCEPTION( "::loadquery failed", errno ); + } + + + ld_info * pLdInfo = reinterpret_cast( szBuffer ); + + char szFilePath[ _MAX_PATH ]; + if ( NULL == ::realpath( pLdInfo->ldinfo_filename, szFilePath ) ) + { + std::string strError( "::realpath failed for " ); + strError += pLdInfo->ldinfo_filename; + strError += " attempting ::getargs"; + CAF_CM_WARNING( static_cast( strError ) ); + + // use getargs to get arg 0 + struct procsinfo stProcInfo; + stProcInfo.pi_pid = ::getpid(); + char aszArgs[_MAX_PATH * 2]; + if ( 0 == ::getargs( &stProcInfo, sizeof(procsinfo), + aszArgs, _MAX_PATH * 2 ) ) + { + if ( NULL == ::realpath( aszArgs, szFilePath ) ) + { + std::string strError( "::realpath failed - using result of getargs "); + strError += pLdInfo->ldinfo_filename ; + CAF_CM_ERROR( static_cast( strError ), + errno ); + } + else + { + rstrProgName = szFilePath; + } + } + else + { + std::string strError( "::getargs failed - using result of loadquery " ); + strError += pLdInfo->ldinfo_filename; + CAF_CM_ERROR( static_cast( strError ), + errno ); + } + } + else + { + // set from the realpath command + rstrProgName = szFilePath; + } + + ::free( szBuffer ); + szBuffer = NULL; + +#elif defined ( __linux__ ) || defined ( __sun__ ) + // we know that all of our libs must have a DllMain function + // so look it up in the specified library and then + // use its address to find the name + void * vpAddress = NULL; + hSearchModule = ::dlopen( NULL, RTLD_LAZY | RTLD_LOCAL ); + + if ( ! hSearchModule ) + { + CAF_CM_EXCEPTION_EFAIL(::dlerror()); + } + + // In a dll we need to look for DllMain + vpAddress = CEcmDllManager::GetFunctionAddress( hSearchModule, + gs_cszDllMainFunctionName, + strSubErrorMessage ); + + + if ( NULL == vpAddress ) + { + // try looking for main as well + vpAddress = CEcmDllManager::GetFunctionAddress( hSearchModule, + gs_cszMainFunctionName, + strSubErrorMessage ); + } + + if ( NULL == vpAddress ) + { + // try looking for _init as well + vpAddress = CEcmDllManager::GetFunctionAddress( hSearchModule, + gs_cszInitFunctionName, + strSubErrorMessage ); + } + + if ( vpAddress ) + { + CEcmDllManager::GetLibraryNameFromAddress( vpAddress, rstrProgName ); + } + else + { + std::string strErrorMessage( "Cannot find symbol in library, cannot resolve library handle to file name" ); + strErrorMessage += strSubErrorMessage; + CAF_CM_EXCEPTION_EFAIL(strErrorMessage.c_str()); + } +#else + CAF_CM_EXCEPTION_VA0(E_NOTIMPL, "Not Yet Ported to this platform"); +#endif + } + catch (CCafException* e) + { + _cm_exception_ = e; + } + +#ifndef WIN32 + if ( hSearchModule ) + { + ::dlclose(hSearchModule); + } +#endif + + if ( szBuffer ) + { + ::free( szBuffer ); + } + + if ( _cm_exception_ ) + { + throw _cm_exception_; + } +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmDllManager.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmDllManager.h new file mode 100644 index 000000000..970fdc941 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmDllManager.h @@ -0,0 +1,48 @@ +/* + * Created: Oct 09, 2002 + * + * Copyright (c) 2002-2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ +#ifndef _CEcmDllManager_H +#define _CEcmDllManager_H + +#include +#include + +namespace Caf { + +class SUBSYSTEMBASE_LINKAGE CEcmDllManager { +public: + static HMODULE LoadLibrary( const char * cpszLibName, bool bMustInvokeDllMain,bool bThrowExceptionUponFailure = true ); + static void UnloadLibrary( HMODULE hLibraryHandle, bool bMustInvokeDllMain ); + static void * GetFunctionAddress( HMODULE hLibraryHandle, const char * cpszFunctionName, std::string & rstrErrorMessage ); + static void GetLibraryNameFromHandle ( HMODULE hLibraryHandle, std::string & rstrLibName ); + +private: // a purely static class + CEcmDllManager(); + ~CEcmDllManager(); + CEcmDllManager( const CEcmDllManager& ); + CEcmDllManager& operator=( const CEcmDllManager& ); + +private: // used internally on Unix platforms + static void GetLibraryNameFromAddress( const void * cpvAddressInLibrary, std::string & rstrLibName ); + static void GetMainProgramName( std::string & rstrProgName ); + +private: + static GRecMutex ms_mutex; + +#ifndef WIN32 + struct SModuleRefCount + { + HMODULE m_hModule; + int32 m_iRefCount; + }; + static std::map ms_mapLoadedModuleRefCounts; + static std::map ms_mapLoadedModules; +#endif +}; +} + +#endif // _CEcmDllManager_H + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmSubSystem.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmSubSystem.cpp new file mode 100644 index 000000000..19151451e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmSubSystem.cpp @@ -0,0 +1,339 @@ +/* + * Created: Oct 09, 2002 + * + * Copyright (c) 2002-2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CEcmSubSystem.h" +#include "EcmSubSystemBase.h" +#include "CEcmSubSystemRegistry.h" + +#ifdef WIN32 +#ifdef CFC_AS_STATIC_LIB +#define IStream ::IStream +#endif +#include +#ifdef CFC_AS_STATIC_LIB +#undef IStream +#endif +#endif + +#include "CEcmDllManager.h" + +using namespace Caf; + +////////////////////////////////////////////////////////////////////// +// Construction/Destruction +////////////////////////////////////////////////////////////////////// +std::map CEcmSubSystem::m_mapModuleCache; + +GRecMutex CEcmSubSystem::m_oModuleCacheMutex; + +CEcmSubSystem::CEcmSubSystem(bool bIsUnloadable) : + CAF_CM_INIT_LOG("CEcmSubSystem"), + m_bIsUnloadable(bIsUnloadable), + m_hModule(NULL), + m_pfnCreateInstance(NULL), + m_pfnCanUnloadNow(NULL) +{ +} + +CEcmSubSystem::~CEcmSubSystem() +{ +} + +bool CEcmSubSystem::IsRegistered( const std::string & rstrSubSystemIdentifier ) +{ + CAF_CM_FUNCNAME_VALIDATE("IsRegistered"); + + bool bRetVal = false; + + CAF_CM_VALIDATE_STRINGPTRA(rstrSubSystemIdentifier.c_str()); + bRetVal = CEcmSubSystemRegistry::IsRegistered( rstrSubSystemIdentifier ); + + return bRetVal; +} + +void CEcmSubSystem::Load(const std::string& rstrSubSystemIdentifier) +{ + CAF_CM_FUNCNAME("Load"); + + // Make sure that we have sub-system name. + CAF_CM_VALIDATE_STRINGPTRA(rstrSubSystemIdentifier.c_str()); + + // If this is an unloadable sub-system... + if(m_bIsUnloadable) + { + // make sure it is unlaoded before loading the next one. + Unload(); + } + // Otherwise... + else + { + // if there is already a module loaded by this sub-system + // object... + if(NULL != m_hModule) + { + CAF_CM_EXCEPTION_VA1(E_FAIL, + "The sub-system %s is already loaded. Load may not be called again.", + rstrSubSystemIdentifier.c_str()); + } + } + + // Create a helper to make sure we unlock the critical section. + CAutoMutexLockUnlockRaw oCS( &m_oModuleCacheMutex ); + + // Before we do the lookup again, lets check the cache to see if we + // already have the module. + std::map::iterator iterModule = + m_mapModuleCache.find(rstrSubSystemIdentifier); + + // If we found the module in the cache... + if(iterModule != m_mapModuleCache.end()) + { + // set from the cache, and we're done. + m_hModule = iterModule->second; + m_strSubSystemIdentifier = rstrSubSystemIdentifier; + + //CAF_CM_LOG_DEBUG_VA2("Found the subsystem in the cache - id: %s, module: %p", + // m_strSubSystemIdentifier.c_str(), m_hModule); + } + // Otherwise, look in the registry for the sub-system module. + else + { + // Create a registry object. + if (CEcmSubSystemRegistry::IsRegistered( rstrSubSystemIdentifier )) { + std::string modulePath = CEcmSubSystemRegistry::GetModulePath( rstrSubSystemIdentifier ); + if ( modulePath.length() ) + { + // load the DLL. + m_hModule = CEcmDllManager::LoadLibrary( modulePath.c_str(), true ); + + // Record the sub-system identifier. + m_strSubSystemIdentifier = rstrSubSystemIdentifier; + + // Insert the sub-system id to module mapping entry. + m_mapModuleCache.insert( + std::pair + (rstrSubSystemIdentifier, m_hModule)); + + //CAF_CM_LOG_DEBUG_VA3("Loaded the subsystem - id: %s, path: %s, module: %p", + // m_strSubSystemIdentifier.c_str(), modulePath.c_str(), m_hModule); + } + else + { + CAF_CM_EXCEPTION_VA1(E_FAIL, + "Failed to load subsystem %s - Registered but modulePath is empty", + rstrSubSystemIdentifier.c_str()); + } + } + else + { + CAF_CM_EXCEPTION_VA1(E_FAIL, + "Failed to load subsystem %s - Not registered", + rstrSubSystemIdentifier.c_str()); + } + } +} + +bool CEcmSubSystem::Unload( const bool cbMustUnloadNow /* = true */ ) +{ + CAF_CM_FUNCNAME("Unload"); + + bool bSubsystemWasUnloaded = false; + // If the sub-system is unloadable... + if(m_bIsUnloadable) + { + // and there is a module actually loaded... + if(NULL != m_hModule) + { + // if we don't already have it... + if(NULL == m_pfnCanUnloadNow) + { + std::string strErrorMessage; + // get the address of the sub-system's can unload function. + m_pfnCanUnloadNow = (CanUnloadNowFunc) + CEcmDllManager::GetFunctionAddress(m_hModule, CAN_UNLOAD_NOW, strErrorMessage ); + + // If we did not got the function pointer... + if(NULL == m_pfnCanUnloadNow) + { + // throw an exception indicating that the can unload + // function could not be found. + CAF_CM_EXCEPTION_EFAIL(strErrorMessage); + } + } + + if(m_pfnCanUnloadNow()) + { + // free the library, and + CEcmDllManager::UnloadLibrary( m_hModule, true ); + // Create a helper to make sure we unlock the critical section. + CAutoMutexLockUnlockRaw oCS( &m_oModuleCacheMutex ); + + // try to find the module entry. + std::map::iterator iterModule = + m_mapModuleCache.find(m_strSubSystemIdentifier); + + // If we found the module in the cache... + if(iterModule != m_mapModuleCache.end()) + { + // remove if from the cache. + m_mapModuleCache.erase(iterModule); + } + + bSubsystemWasUnloaded = true; + // Reset the member variables to an initialized state. + m_hModule = NULL; + m_pfnCreateInstance = NULL; + m_pfnCanUnloadNow = NULL; + m_strSubSystemIdentifier = ""; + } + // Otherwise, the sub-system is telling us it cannot safely be + // unloaded at this time, if the caller indicated that it must + // unload now we fail unload + else if ( cbMustUnloadNow ) + { + // throw an exception indicating the condition. + CAF_CM_EXCEPTION_EFAIL("Unable to safely unload the sub-system at this time."); + } + } + + // Otherwise, they are trying to unload nothing, so let them. + } + // If the sub-system is not unloadable... + else + { + // and there is a module actually loaded... + if(NULL != m_hModule) + { + // throw an exception. + CAF_CM_EXCEPTION_EFAIL("Unable to unload an unloadable sub-system."); + } + + // Otherwise, they are trying to unload nothing, so let them. + } + + return bSubsystemWasUnloaded; +} + +void CEcmSubSystem::CreateInstance( const std::string & rstrIdentifier, const IID & riid, void ** ppv ) +{ + CAF_CM_FUNCNAME( "CreateInstance" ); + + // If the sub-system is not loaded... + if(NULL == m_hModule) + { + // throw an exception indicating that the sub-system must be + // loaded before object instance can be created from it. + CAF_CM_EXCEPTION_EFAIL("No sub-system is loaded. You must call Load before " + "object instances can be created."); + } + + // If we don't already have a pointer to the CreateInstance + // function provided by the sub-system DLL... + if(NULL == m_pfnCreateInstance) + { + //CAF_CM_LOG_DEBUG_VA2("Getting CreateInstance - id: %s, module: %p", + // rstrIdentifier.c_str(), m_hModule); + + std::string strErrorMessage; + // get the address of the CreateInstance function. + m_pfnCreateInstance = + (void (*)( const char* rstrIdentifier, const IID & riid, void ** ppv )) + CEcmDllManager::GetFunctionAddress(m_hModule, CREATE_INSTANCE, strErrorMessage ); + + // If we did not get the function pointer... + if(NULL == m_pfnCreateInstance) + { + // throw an exception indicating that the create instance + // could not be found. + CAF_CM_EXCEPTION_EFAIL(strErrorMessage); + } + } + + // Call the function, passing in the supplied arguments. + m_pfnCreateInstance(rstrIdentifier.c_str(), riid, ppv); +} + + +//////////////////////////////////////////////////////////////////////// +// +// CEcmSubSystem::CEcmSubSystem( CEcmSubSystem ) +// +// overloaded copy constructor +// +//////////////////////////////////////////////////////////////////////// +CEcmSubSystem::CEcmSubSystem( const CEcmSubSystem& crCEcmSubSystem ) : + CAF_CM_INIT_LOG("CEcmSubSystem") +{ + m_bIsUnloadable = crCEcmSubSystem.m_bIsUnloadable; + m_strSubSystemIdentifier = crCEcmSubSystem.m_strSubSystemIdentifier; + m_hModule = crCEcmSubSystem.m_hModule; + m_pfnCreateInstance = crCEcmSubSystem.m_pfnCreateInstance; + m_pfnCanUnloadNow = crCEcmSubSystem.m_pfnCanUnloadNow; +} + + + +//////////////////////////////////////////////////////////////////////// +// +// CEcmSubSystem::operator=() +// +// overloaded = operator +// +//////////////////////////////////////////////////////////////////////// +CEcmSubSystem& CEcmSubSystem::operator=( const CEcmSubSystem& crCEcmSubSystem ) +{ + m_bIsUnloadable = crCEcmSubSystem.m_bIsUnloadable; + m_strSubSystemIdentifier = crCEcmSubSystem.m_strSubSystemIdentifier; + m_hModule = crCEcmSubSystem.m_hModule; + m_pfnCreateInstance = crCEcmSubSystem.m_pfnCreateInstance; + m_pfnCanUnloadNow = crCEcmSubSystem.m_pfnCanUnloadNow; + + return *this; + +} + + + +//////////////////////////////////////////////////////////////////////// +// +// CEcmSubSystem::IsUnloadable() +// +// returns true if this subsystem is unloadable, false if it isn't +// +//////////////////////////////////////////////////////////////////////// +bool CEcmSubSystem::IsUnloadable() const +{ + return m_bIsUnloadable; +} + + + +//////////////////////////////////////////////////////////////////////// +// +// CEcmSubSystem::GetSubSystemID() +// +// returns the subystem identifier +// +//////////////////////////////////////////////////////////////////////// +std::string CEcmSubSystem::GetSubSystemID() const +{ + return m_strSubSystemIdentifier; +} + + +//////////////////////////////////////////////////////////////////////// +// +// CEcmSubSystem::operator<() +// +// overloaded < operator +// +//////////////////////////////////////////////////////////////////////// +bool CEcmSubSystem::operator< ( const CEcmSubSystem& crCEcmSubsystemRight ) const +{ + return (::strcmp(m_strSubSystemIdentifier.c_str(), crCEcmSubsystemRight.GetSubSystemID().c_str()) < 0); +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmSubSystem.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmSubSystem.h new file mode 100644 index 000000000..7b8c066d5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmSubSystem.h @@ -0,0 +1,71 @@ +/* + * Created: Oct 09, 2002 + * + * Copyright (c) 2002-2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _CEcmSubSystem_H_ +#define _CEcmSubSystem_H_ + +#include + +namespace Caf { + +// Typedef the function pointers. +typedef void ( * CreateInstanceFunc )( const char*, const IID & riid, void ** ppv ) ; + +typedef bool( * CanUnloadNowFunc )(); + +// Class declaration +class SUBSYSTEMBASE_LINKAGE CEcmSubSystem +{ +public: + CEcmSubSystem( bool bIsUnloadable = false ); + virtual ~ CEcmSubSystem(); + + bool IsRegistered( const std::string & rstrSubSystemIdentifier ); + void Load( const std::string & rstrSubSystemIdentifier ); + bool IsUnloadable() const; + std::string GetSubSystemID() const; + bool Unload( const bool cbMustUnloadNow = true ); + void GetVersionInfo(); + void CreateInstance( const std::string & rstrIdentifier, const IID & riid, + void ** ppv ); + +public: // copy constructor and assignment operator + CEcmSubSystem( const CEcmSubSystem& crCEcmSubSystem); + CEcmSubSystem& operator= ( const CEcmSubSystem& crCEcmSubSystem ); + +public: // less than, allows use in associative containers + bool operator< ( const CEcmSubSystem& ) const; + +private: + // Standard ECM macro for a standard object. + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + + // Flag indicating whether a sub-system is able to be unloaded. + bool m_bIsUnloadable; + + // Sub-system identifier. + std::string m_strSubSystemIdentifier; + + // Sub-system DLL module handle. + HMODULE m_hModule; + + // A map to hold a module cache. + static std::map m_mapModuleCache; + + // A critical section to protect the module cache. + static GRecMutex m_oModuleCacheMutex; + + // A pointer to the create instance of the function of the sub-system. + CreateInstanceFunc m_pfnCreateInstance; + + // A pointer to the can unload function of the sub-system. + CanUnloadNowFunc m_pfnCanUnloadNow; +}; +} + +#endif // _CEcmSubSystem_H_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmSubSystemModule.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmSubSystemModule.cpp new file mode 100644 index 000000000..8ee10cb85 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmSubSystemModule.cpp @@ -0,0 +1,300 @@ +/* + * Created: Oct 09, 2002 + * + * Copyright (c) 2002-2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CEcmSubSystemModule.h" +#include "CEcmSubSystemRegistry.h" +#include "CEcmDllManager.h" +#include "TCafSubSystemCreator.h" + +using namespace Caf; + +////////////////////////////////////////////////////////////////////// +// Construction/Destruction +////////////////////////////////////////////////////////////////////// + +CEcmSubSystemModule::CEcmSubSystemModule() : + CAF_CM_INIT_LOG("CEcmSubSystemModule"), + m_pObjectEntries(NULL), + m_hInstance(NULL), + m_lLockCount(0) +{ + +} + +CEcmSubSystemModule::~CEcmSubSystemModule() +{ +} + +void CEcmSubSystemModule::Init(const _CAF_OBJECT_ENTRY* const pObjectEntries, + const HINSTANCE hInstance) +{ + CAF_CM_FUNCNAME("Init"); + + try + { + // Initialize the QI maps of all registered objects + // to prevent multithreading problems + uint32 dwIdx = 0; + while (pObjectEntries[dwIdx].pfnGetEntries) + { + // Ignore the return value - we are just causing + // the QI map to initialize by calling the func + (void)pObjectEntries[dwIdx].pfnGetEntries(); + + CAF_CM_LOG_DEBUG_VA3("Initializing object entries - index: %d, objId: %s, module: %p", + dwIdx, pObjectEntries[dwIdx].pfnIdentifier(), hInstance); + + ++dwIdx; + } + + // Initialize the member variables + m_pObjectEntries = pObjectEntries; + m_hInstance = hInstance; + } + CAF_CM_CATCH_ALL; + CAF_CM_CLEAREXCEPTION; +} + +void CEcmSubSystemModule::Term() +{ + CAF_CM_FUNCNAME("Term"); + + try + { + // Loop through the Object Entries table and release the singletons + uint32 dwIndex = 0; + while(m_pObjectEntries && m_pObjectEntries[dwIndex].pfnCreator) + { + // If this is a sub-system... + if(m_pObjectEntries[dwIndex].bIsSingleton && m_pObjectEntries[dwIndex].pCachedObject) + { + ( m_pObjectEntries[dwIndex].pCachedObject )->Release(); + m_pObjectEntries[dwIndex].pCachedObject = NULL; + } + + // Increment the index. + ++ dwIndex; + } + } + CAF_CM_CATCH_ALL; + CAF_CM_CLEAREXCEPTION; + + // Set the instance handle to NULL. + m_hInstance = NULL; + + // Set the object entries pointer to NULL. + m_pObjectEntries = NULL; +} + +void CEcmSubSystemModule::Lock() +{ + g_atomic_int_inc(&m_lLockCount); +} + +void CEcmSubSystemModule::Unlock() +{ + (void)g_atomic_int_dec_and_test(&m_lLockCount); +} + +void CEcmSubSystemModule::CreateInstance(const char* crstrIdentifier, const IID& criid, void** ppv) +{ + CAF_CM_FUNCNAME("CreateInstance"); + + CAF_CM_VALIDATE_STRINGPTRA(crstrIdentifier); + CAF_CM_VALIDATE_PTR(ppv); + + // Initialize the out-param + *ppv = NULL; + + // Declare flag indicating that the identifier was found in the map. + bool bFoundIdentifier = false; + + // Declare and index for iterating over the object map. + uint32 dwIndex = 0; + + // Loop through the Object Entries table... + CAF_CM_LOG_DEBUG_VA1("Looking for ID - %s", crstrIdentifier); + while(m_pObjectEntries && m_pObjectEntries[dwIndex].pfnCreator) + { + // comparing the supplied identifier to the identifier in the + // table. If we find a match... + CAF_CM_LOG_DEBUG_VA2("Comparing to - index: %d, objId: %s", + dwIndex, m_pObjectEntries[dwIndex].pfnIdentifier()); + if(::strcmp(crstrIdentifier, m_pObjectEntries[dwIndex].pfnIdentifier()) == 0) + { + // indicate we found the identifier + bFoundIdentifier = true; + +#ifdef IMPLEMENT_SINGLETONS + // If this is the subsystem singleton manager... + if(::strcmp(crstrIdentifier, _sObjIdSubsystemSingletonManager) == 0) + { + // Check for a cached object. + if(m_pObjectEntries[dwIndex].pCachedObject) + { + // Use the cached object. + m_pObjectEntries[dwIndex].pCachedObject->QueryInterface(criid, ppv); + } + else + { + // Call the creator function associated with the identifier. + createInstanceException = true; + ICafObject* pEcmObject = 0; + TCafSubSystemCreator::CreateInstance( m_pObjectEntries[dwIndex].pfnCreator, + CAF_IIDOF(ICafObject), + reinterpret_cast(&pEcmObject)); + + // Cache the object. + pEcmObject->QueryInterface(criid, ppv); + m_pObjectEntries[dwIndex].pCachedObject = pEcmObject; + createInstanceException = false; + } + } + // If this is a singleton... + else if(m_pObjectEntries[dwIndex].bIsSingleton) + { + // Create a pointer to a subsystem singleton manager. + IEcmSubsystemSingletonManager* piSingletonMgr = NULL; + + CAF_CM_TRY + { + // Create a subsystem object. + CEcmSubSystem oSubSystem; + + // See if the subsystem is registered before trying to load it. + if(oSubSystem.IsRegistered(gs_cstrObjIdEcmSubsystemSingletonManagerSubsystem)) + { + // Load the subsystem singleton manager subsystem. + oSubSystem.Load(gs_cstrObjIdEcmSubsystemSingletonManagerSubsystem); + + // Create an instance of the subsystem singleton manager object. + oSubSystem.CreateInstance(gs_cstrObjIdEcmSubsystemSingletonManagerSubsystem, + CSI_IIDOF(IEcmSubsystemSingletonManager), reinterpret_cast(&piSingletonMgr)); + } + } + CAF_CM_CATCH_KEEPEXCEPTION; + + // If we did not get an exception or is the singleton manager not registered. + if(!(CAF_CM_ISEXCEPTION) && piSingletonMgr) + { + // Declare a IEcmObject pointer for local use. + IEcmObject* pObject = NULL; + + // Check for a cached object. + piSingletonMgr->GetSingleton(crstrIdentifier, &pObject); + + // Make sure the pointer is good. + if(pObject) + { + // Query for the interface. + pObject->QueryInterface(criid, ppv); + + // Release the object. + pObject->Release(); + pObject = NULL; + } + // No cached object, so... + else + { + // Call the creator function associated with the identifier. + createInstanceException = true; + TCafSubSystemCreator::CreateInstance( m_pObjectEntries[dwIndex].pfnCreator, + CSI_IIDOF(IEcmObject), + reinterpret_cast(&pObject)); + + // Query for the interface. + pObject->QueryInterface(criid, ppv); + createInstanceException = false; + + // Cache the object. + piSingletonMgr->RegisterSingleton(crstrIdentifier, pObject); + + // Release the object we got back from CreateInstance. + pObject->Release(); + pObject = NULL; + } + + // Release the singleton manager. + piSingletonMgr->Release(); + piSingletonMgr = NULL; + } + // We got an exception or the subsystem singleton manager is not registered. + else + { + // Clean up the exception. + if(CAF_CM_ISEXCEPTION) + { + CAF_CM_CLEAREXCEPTION; + } + + // Release the piSingletonMgr if it is not null + if(piSingletonMgr) + { + piSingletonMgr->Release(); + piSingletonMgr = NULL; + } + + // Check for a cached object. + if(m_pObjectEntries[dwIndex].pCachedObject) + { + // Use the cached object. + m_pObjectEntries[dwIndex].pCachedObject->QueryInterface(criid, ppv); + } + else + { + // Call the creator function associated with the identifier. + createInstanceException = true; + IEcmObject* pEcmObject = 0; + TCafSubSystemCreator::CreateInstance( m_pObjectEntries[dwIndex].pfnCreator, + CSI_IIDOF(IEcmObject), + reinterpret_cast(&pEcmObject)); + + // Cache the object. + pEcmObject->QueryInterface(criid, ppv); + m_pObjectEntries[dwIndex].pCachedObject = pEcmObject; + createInstanceException = false; + } + } + } + else + +#endif // IMPLEMENT_SINGLETONS + { + // call the creator function associated with the identifier. + TCafSubSystemCreator::CreateInstance( m_pObjectEntries[dwIndex].pfnCreator, + criid, + ppv); + } + + // If we are here then an object was created + break; + } + + // Increment the index. + ++ dwIndex; + } + + // If we were unable to find the identifier in the map... + if(!bFoundIdentifier) + { + CAF_CM_EXCEPTION_VA1(E_FAIL, + "Unable to find object with provided identifier [%s]", + crstrIdentifier); + } +} + +bool CEcmSubSystemModule::CanUnload() +{ + gint value = g_atomic_int_get(&m_lLockCount); + return (value == 0 ); +} + +HINSTANCE CEcmSubSystemModule::GetModuleHandle() +{ + return m_hInstance; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmSubSystemModule.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmSubSystemModule.h new file mode 100644 index 000000000..be1ac5583 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmSubSystemModule.h @@ -0,0 +1,44 @@ +/* + * Created: Oct 09, 2002 + * + * Copyright (c) 2002-2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _CEcmSubSystemModule_H_ +#define _CEcmSubSystemModule_H_ + +namespace Caf { + +struct _CAF_OBJECT_ENTRY; + +class SUBSYSTEMBASE_LINKAGE CEcmSubSystemModule +{ +public: + CEcmSubSystemModule(); + virtual ~CEcmSubSystemModule(); + + void Init(const _CAF_OBJECT_ENTRY* const pObjectEntries, const HINSTANCE hInstance); + void Term(); + + void Lock(); + void Unlock(); + + void CreateInstance(const char* crstrIdentifier, const IID& criid, void** ppv); + + bool CanUnload(); + + HINSTANCE GetModuleHandle(); + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + const _CAF_OBJECT_ENTRY* m_pObjectEntries; + HINSTANCE m_hInstance; + gint m_lLockCount; +}; + +} + +#endif // _CEcmSubSystemModule_H_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmSubSystemRegistry.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmSubSystemRegistry.cpp new file mode 100644 index 000000000..42cb3a853 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmSubSystemRegistry.cpp @@ -0,0 +1,26 @@ +/* + * Created: Oct 09, 2002 + * + * Copyright (c) 2002-2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CEcmSubSystemRegistry.h" +#include "CEcmDllManager.h" +#include + +using namespace Caf; + +bool CEcmSubSystemRegistry::IsRegistered( const std::string & crstrSubSystemIdentifier ) +{ + std::string modulePath; + return getAppConfig()->getString("subsystems", crstrSubSystemIdentifier, modulePath, IConfigParams::PARAM_OPTIONAL); +} + +std::string CEcmSubSystemRegistry::GetModulePath( const std::string & crstrSubSystemIdentifier ) +{ + std::string modulePath; + getAppConfig()->getString("subsystems", crstrSubSystemIdentifier, modulePath, IConfigParams::PARAM_REQUIRED); + return modulePath; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmSubSystemRegistry.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmSubSystemRegistry.h new file mode 100644 index 000000000..7c7bbf705 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmSubSystemRegistry.h @@ -0,0 +1,23 @@ +/* + * Created: Oct 09, 2002 + * + * Copyright (c) 2002-2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ +#ifndef _CEcmSubSystemRegistry_H_ +#define _CEcmSubSystemRegistry_H_ + +#include + +namespace Caf { + +class SUBSYSTEMBASE_LINKAGE CEcmSubSystemRegistry +{ +public: + static bool IsRegistered( const std::string & crstrSubSystemIdentifier ); + + static std::string GetModulePath( const std::string & crstrSubSystemIdentifier ); +}; +} + +#endif // _CEcmSubSystem_H_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/EcmSubSystemBase.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/EcmSubSystemBase.cpp new file mode 100644 index 000000000..8cfb82800 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/EcmSubSystemBase.cpp @@ -0,0 +1,108 @@ +/* + * Created: Oct 09, 2002 + * + * Copyright (c) 2002-2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "EcmSubSystemBase.h" +#include +#include + +using namespace Caf; + +////////////////////////////////////////////////////////////////////////////// +// ECM Sub-System Constant Definitions +////////////////////////////////////////////////////////////////////////////// + +// The value name for retrieving the module's path +const char* Caf::MODULE_PATH_VALUE_NAME = "ModulePath"; + +// The DLL exported function names +const char* Caf::CREATE_INSTANCE = "CafCreateInstance"; +const char* Caf::CAN_UNLOAD_NOW = "CafDllCanUnloadNow"; + +//////////////////////////////////////////////////////////////////////// +// +// Global implementation of CreateObject - helper functions for +// TEcmSmartPtr that can't go inside of TEcmSmartPtr because gcc barfs. +// +//////////////////////////////////////////////////////////////////////// + +// Suppress warning about throwing an exception: we want C linkage, +// but we also want to throw exceptions +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable:4297) // function assumed not to throw an exception but does +#endif + +// The function is extern "C" and /EHc is specified +extern "C" SUBSYSTEMBASE_LINKAGE void Caf::CreateObject (const char *cszObjectId, const IID &criid, void **ppv) +{ + CAF_CM_STATIC_FUNC_VALIDATE( "SubSystemBase", "CreateObject" ); + CAF_CM_VALIDATE_STRINGPTRA(cszObjectId); + CAF_CM_VALIDATE_PTR(ppv); + + #ifdef WIN32 + char* objId = ::_strdup(cszObjectId); + #else + char* objId = ::strdup(cszObjectId); + #endif + + try + { + // Determine the type of object to create based on Id. + // QI object id's are of the form :ClassName. +// char *szColon = ::strchr(objId, ':'); +// +// if (szColon) +// { +// // Create a QI object +// *szColon = NULL; +// CreateQIObject(objId, szColon + 1, criid, ppv); +// } +// else +// { + // Create a subsystem object + CEcmSubSystem oSubSystem; + oSubSystem.Load(cszObjectId); + oSubSystem.CreateInstance(cszObjectId, criid, ppv); +// } + } + catch (CCafException *e) + { + ::free(objId); + throw e; + } + catch (std::exception& e) + { + ::free(objId); + throw e; + } + catch (...) + { + ::free(objId); + throw; + } + + ::free(objId); +} + +//extern "C" SUBSYSTEMBASE_LINKAGE void Caf::CreateQIObject (const char *cszFactoryId, const char* cszClassName, const IID &criid, void **ppv) +//{ +// CAF_CM_STATIC_FUNC( "SubSystemBase", "CreateObject" ); +// CAF_CM_VALIDATE_STRINGPTRA(cszFactoryId); +// CAF_CM_VALIDATE_STRINGPTRA(cszClassName); +// CAF_CM_VALIDATE_PTR(ppv); +// +//// SmartSbICfcClassFactory spsFactory; +//// spsFactory.CreateInstance(cwszFactoryId); +//// *ppv = NULL; +//// spsFactory->CreateObject(cwszClassName, criid, ppv); +//// CAF_CM_ASSERT_MSG(*ppv, "Failed to create object"); +//} + +#ifdef _MSC_VER +#pragma warning(pop) +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/EcmSubSystemBase.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/EcmSubSystemBase.h new file mode 100644 index 000000000..d4c8f646a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/EcmSubSystemBase.h @@ -0,0 +1,165 @@ +/* + * Created: Oct 09, 2002 + * + * Copyright (c) 2002-2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _EcmSubSystemBase_H_ +#define _EcmSubSystemBase_H_ + +namespace Caf { + +////////////////////////////////////////////////////////////////////// +// Forward Declarations +////////////////////////////////////////////////////////////////////// +struct _CAF_INTMAP_ENTRY; + +////////////////////////////////////////////////////////////////////////////// +// ECM Sub-System Constants +////////////////////////////////////////////////////////////////////////////// + +// The value name for retrieving the module's path +extern SUBSYSTEMBASE_LINKAGE const char* MODULE_PATH_VALUE_NAME; + +// The DLL exported function names +extern SUBSYSTEMBASE_LINKAGE const char* CREATE_INSTANCE; +extern SUBSYSTEMBASE_LINKAGE const char* CAN_UNLOAD_NOW; + +////////////////////////////////////////////////////////////////////////////// +// ECM Object Map Support +////////////////////////////////////////////////////////////////////////////// +struct _CAF_OBJECT_ENTRY +{ + const char* (*pfnIdentifier)(); + const UUID* cpclsidClassId; + uint32 (*pfnCreator)(const IID& riid, void** ppv); + mutable ICafObject* pCachedObject; + bool bIsSingleton; + const _CAF_INTMAP_ENTRY* (*pfnGetEntries)(); +}; + +} + +#define CAF_BEGIN_OBJECT_MAP(x) static _CAF_OBJECT_ENTRY x[] = { + +#define CAF_END_OBJECT_MAP() { NULL, NULL, NULL, NULL, false, NULL }}; + +#define CAF_OBJECT_ENTRY(className)\ + { className::GetObjectIdentifier,\ + NULL,\ + className::Creator,\ + NULL,\ + false,\ + className::_GetEntries }, + +#define CAF_OBJECT_ENTRY2(className, objectIdentifier)\ + { objectIdentifier,\ + NULL,\ + className::Creator,\ + NULL,\ + false,\ + className::_GetEntries }, + +/*#define CAF_OBJECT_ENTRY_SINGLETON(className)\ + { className::GetObjectIdentifier,\ + NULL,\ + className::Creator,\ + NULL,\ + true,\ + className::_GetEntries },*/ + +////////////////////////////////////////////////////////////////////////////// +// ECM Interface Map Support +////////////////////////////////////////////////////////////////////////////// +namespace Caf { +struct _CAF_INTMAP_ENTRY +{ + const IID* cpiid; + SUBSYS_INTPTR offset; +}; +} + +#define _CAF_PACKING 8 +#define CAF_offsetofclass(base, derived)\ + ((SUBSYS_INTPTR)(static_cast((derived*)_CAF_PACKING))-_CAF_PACKING) + +#define CAF_BEGIN_INTERFACE_MAP(x) public: \ + typedef x _CafMapClass; \ + ICafObject* _GetRawObjectInterface() \ + { return (ICafObject*)((SUBSYS_INTPTR)this+_GetEntries()->offset); } \ + ICafObject* GetObjectInterface() { return _GetRawObjectInterface(); }\ + void _InternalQueryInterface(const IID& iid, void** ppv) \ + { InternalQueryInterface(this, _GetEntries(), iid, ppv); } \ + static const _CAF_INTMAP_ENTRY* _GetEntries() \ + { static const _CAF_INTMAP_ENTRY _entries[] = { + +#define CAF_END_INTERFACE_MAP() {NULL, SUBSYS_INTPTR_INVALID}}; return _entries;} \ + virtual void AddRef() = 0;\ + virtual void Release() = 0;\ + virtual void QueryInterface(const IID&, void**) = 0; + +#define CAF_INTERFACE_ENTRY(x)\ + {&CAF_IIDOF(x), \ + CAF_offsetofclass(x, _CafMapClass)}, + +#define CAF_INTERFACE_ENTRY_IID(iid, x)\ + {&iid,\ + offsetofclass(x, _CafMapClass)}, + +#define CAF_INTERFACE_ENTRY2(x, x2)\ + {&CSI_IIDOF(x),\ + (SUBSYS_INTPTR)((x*)(x2*)((_CafMapClass*)_CAF_PACKING))-_CAF_PACKING}, + +#define CAF_INTERFACE_ENTRY2_IID(iid, x, x2)\ + {&iid,\ + (SUBSYS_INTPTR)((x*)(x2*)((_CafMapClass*)_CAF_PACKING))-_CAF_PACKING}, + +////////////////////////////////////////////////////////////////////////////// +// ECM Helper Macros +////////////////////////////////////////////////////////////////////////////// + +// Place in class to be exposed from a sub-system in order to +// specify its identifier. +#define CAF_DECLARE_OBJECT_IDENTIFIER(x)\ + public: \ + static const char* GetObjectIdentifier()\ + {\ + return x;\ + } \ + const char* GetObjectId () const \ + { \ + return x;\ + } + +////////////////////////////////////////////////////////////////////////////// +// ECM Sub-System Standard Function Exports +////////////////////////////////////////////////////////////////////////////// +// Place in module that contains DllMain +#define CAF_DECLARE_SUBSYSTEM_EXPORTS()\ + extern "C" void __declspec(dllexport) CafCreateInstance(\ + const char* rstrIdentifier, const IID & riid, void ** ppv )\ + {\ + _Module.CreateInstance(rstrIdentifier, riid, ppv);\ + }\ + extern "C" bool __declspec(dllexport) EcmDllCanUnloadNow()\ + {\ + return _Module.CanUnload();\ + } + +////////////////////////////////////////////////////////////////////////////// +// ECM Sub-System Standard Includes +////////////////////////////////////////////////////////////////////////////// +#include "CEcmSubSystemModule.h" + +#ifdef CAF_SUBSYSTEM +extern Caf::CEcmSubSystemModule _Module; +#endif + +#include "TCafSubSystemObject.h" +#include "TCafSubSystemObjectRoot.h" +#include "CEcmSubSystem.h" + + +#endif // _EcmSubSystemBase_H_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/SubSystemBaseInc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/SubSystemBaseInc.h new file mode 100644 index 000000000..05ca8e943 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/SubSystemBaseInc.h @@ -0,0 +1,14 @@ +/* + * Created: Mar 11, 2004 + * + * Copyright (c) 2004-2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _SubSystemBaseInc_h_ +#define _SubSystemBaseInc_h_ + +#include "TCafSubSystemObjectRoot.h" +#include "TCafSubSystemSmartCl.h" + +#endif // #ifndef _SubSystemBaseInc_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/SubSystemBaseLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/SubSystemBaseLink.h new file mode 100644 index 000000000..676f594b5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/SubSystemBaseLink.h @@ -0,0 +1,31 @@ +/* + * Created: Nov 21, 2003 + * + * Copyright (c) 2003-2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef SubSystemBaseLink_h_ +#define SubSystemBaseLink_h_ + +#ifndef SUBSYSTEMBASE_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define SUBSYSTEMBASE_LINKAGE __declspec(dllexport) + #else + #define SUBSYSTEMBASE_LINKAGE __declspec(dllimport) + #endif + #else + #define SUBSYSTEMBASE_LINKAGE + #endif +#endif + +#include "SubSystemBaseInc.h" + +#include "CAutoMutexLockUnlockRaw.h" +#include "CEcmDllManager.h" +#include "CEcmSubSystem.h" +#include "CEcmSubSystemModule.h" +#include "CEcmSubSystemRegistry.h" + +#endif // #ifndef SubSystemBaseLink_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/TCafSubSystemCreator.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/TCafSubSystemCreator.h new file mode 100644 index 000000000..b6630e3f3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/TCafSubSystemCreator.h @@ -0,0 +1,131 @@ +/* + * Created: Jan 30, 2003 + * + * Copyright (c) 2003-2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _TCafSubSystemCreator_H_ +#define _TCafSubSystemCreator_H_ + +namespace Caf { + +template< typename Derived, typename SmartPtr = TCafSmartPtr< Derived > > +class TCafSubSystemCreator +{ +public: + static SmartPtr CreateInstance(); + + static void CreateInstance( uint32(*pfn)(const IID& criid, void** ppv), const IID& criid, void** ppv ); + +private: + static void ValidateResultCode(const uint32 cdwRc); +}; + +//////////////////////////////////////////////////////// +// +// CreateInstance() +// +// Creates an instance of the object and returns is as +// the supplied smart class type. +// +////////////////////////////////////////////////////////template +template +SmartPtr TCafSubSystemCreator::CreateInstance() +{ + CAF_CM_STATIC_FUNC( "TCafSubSystemCreator", + "CreateInstance()" ); + + // This local smart class object is transient. + // If the lvalue is of the proper type then the + // reference count will go to 2. When the trasient + // object dies then count will go to 1. Perfect. + // + // If the lvalue is not the proper type then + // the reference count will remain at 1. When the + // transient object dies the count will go to 0 + // and the Derived object will be destroyed. Perfect. + SmartPtr spcReturn; + + // Verify that the smart class template argument + // is really a smart class object by calling + // a method on it that must exist + (void)spcReturn.GetNonAddRefedInterface(); + + // Create a derived raw pointer + Derived* pDerived = NULL; + ValidateResultCode( Derived::Creator( &pDerived ) ); + + // Assign it to the smart class which + // will do an AddRef - count now = 2 + spcReturn = pDerived; + + // Release the raw pointer - count now = 1 + pDerived->Release(); + + return spcReturn; +} + +//////////////////////////////////////////////////////// +// +// CreateInstance() +// +// Creates an instance of the object QI'd to the requested interface +// using the supplied creator function. +// +////////////////////////////////////////////////////////template +template +void TCafSubSystemCreator::CreateInstance( uint32(*pfn)(const IID& criid, void** ppv), const IID& criid, void** ppv ) +{ + ValidateResultCode( (*pfn)( criid, ppv ) ); +} + +//////////////////////////////////////////////////////// +// +// ValidateResultCode() +// +// Maps the TCafSubSystemObjectRoot<>::Creator function result code +// to an exception and throw it. +// +////////////////////////////////////////////////////////template +template +void TCafSubSystemCreator::ValidateResultCode(const uint32 cdwRc) +{ + CAF_CM_STATIC_FUNC( "TCafSubSystemCreator", + "ValidateResultCode" ); + + if(TCafSubSystemObjectRoot::Success == cdwRc) + { + // No point in evalulating the remaining clauses + } + // Otherwise, if the interface was not supported... + else if(TCafSubSystemObjectRoot::InterfaceNotSupported == cdwRc) + { + // throw an exception. + CAF_CM_EXCEPTION_VA0(E_NOINTERFACE, + "The requested interface is not supported by the object requested."); + } + // Otherwise, if we are out of memory... + else if(TCafSubSystemObjectRoot::OutOfMemory == cdwRc) + { + // throw an exception. + CAF_CM_EXCEPTION_EFAIL("Out of memory."); + } + // Otherwise, if the ppv was null... + else if(TCafSubSystemObjectRoot::InvalidPointerValue == cdwRc) + { + // throw an exception. + CAF_CM_EXCEPTION_EFAIL("The ppv argument must not be NULL."); + } + // Otherwise, if something unexpected happened... + else if(TCafSubSystemObjectRoot::UnknownFailure == cdwRc) + { + // throw an exception. + CAF_CM_EXCEPTION_EFAIL("An unexpected exception occurred while " + "trying to create requested object."); + } +} + +} + +#endif // #ifndef _TCafSubSystemCreator_H_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/TCafSubSystemObject.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/TCafSubSystemObject.h new file mode 100644 index 000000000..edc258906 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/TCafSubSystemObject.h @@ -0,0 +1,73 @@ +/* + * Created: Oct 9, 2002 + * + * Copyright (c) 2002-2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _TCafSubSystemObject_H_ +#define _TCafSubSystemObject_H_ + +namespace Caf { + +template +class TCafSubSystemObject : public Base +{ +public: // Constructor / Destructor + TCafSubSystemObject() : m_lRefCnt( 0 ) + { + // There is no module to lock if we are not in a sub-system + // project, so conditionally define. + #ifdef CAF_SUBSYSTEM + + // Lock the module. + _Module.Lock(); + + #endif + } + + virtual ~TCafSubSystemObject() + { + // There is no module to unlock if we are not in a sub-system + // project, so conditionally define. + #ifdef CAF_SUBSYSTEM + + // Unlock the module. + _Module.Unlock(); + + #endif + } + +public: // IEcmSubSystemObject Implementations + virtual void AddRef() + { + g_atomic_int_inc(&m_lRefCnt); + } + + virtual void Release() + { + // If the ref-count is greater than 0... + if (g_atomic_int_dec_and_test(&m_lRefCnt)) + { + // delete self. + delete this; + } + } + + virtual void QueryInterface(const IID& riid, void** ppv) + { + this->_InternalQueryInterface(riid, ppv); + } + +private: + gint m_lRefCnt; + +private: // Deny copy and assignment + TCafSubSystemObject(const TCafSubSystemObject&); + TCafSubSystemObject& operator=(const TCafSubSystemObject&); +}; + +} + +#endif // _TCafSubSystemObject_H_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/TCafSubSystemObjectRoot.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/TCafSubSystemObjectRoot.h new file mode 100644 index 000000000..32d598f36 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/TCafSubSystemObjectRoot.h @@ -0,0 +1,215 @@ +/* + * Created: Oct 9, 2002 + * + * Copyright (c) 2002-2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _TCafSubSystemObjectRoot_H_ +#define _TCafSubSystemObjectRoot_H_ + +#include "EcmSubSystemBase.h" + +namespace Caf { + +template > +class TCafSubSystemObjectRoot +{ +public: + enum ReturnCodes { + Success = 0x0, // The call succeeded + InvalidPointerValue, // An invalid pointer was passed + OutOfMemory, // We're out of memory + InterfaceNotSupported, // The interface requested in not supported + UnknownFailure // Something happened that we didn't expect + }; + + // Creator Function + static uint32 Creator(const IID& criid, void** ppv); + static uint32 Creator(Derived** ppDerived); + +protected: + static void InternalQueryInterface(const void* cpThis, + const _CAF_INTMAP_ENTRY* cpEntries, + const IID& criid, + void** ppv); + +protected: + TCafSubSystemObjectRoot() {;} + virtual ~TCafSubSystemObjectRoot() {;} + +private: + TCafSubSystemObjectRoot(const TCafSubSystemObjectRoot&) {;} + TCafSubSystemObjectRoot& operator=(const TCafSubSystemObjectRoot&) { return *this; } +}; + +// Default Creator Function (can be overridden in Derived) - returns a QI'd void* +template +uint32 TCafSubSystemObjectRoot::Creator(const IID& criid, void** ppv) +{ + uint32 dwRetCode = Success; + + try + { + // Make sure the outer pointer seems valid. + if(ppv != NULL) + { + // Initialize the out-param + *ppv = NULL; + + // Create a new derived object + Derived* pObj = NULL; + dwRetCode = Creator( &pObj ); + + if( Success == dwRetCode ) + { + // QI to the requested interface + pObj->QueryInterface(criid, ppv); + + // if *ppv is NULL... + if(NULL == *ppv) + { + // then the interface requested is not supported. + dwRetCode = InterfaceNotSupported; + } + + // decrement the reference count. + pObj->Release(); + } + } + // Otherwise... + else + { + // set the return code to indicate an invalid pointer was passed. + dwRetCode = InvalidPointerValue; + } + } + // No exceptions should be thrown, but if one is... + catch(...) + { + // set the return code to unknown failure occurred. + dwRetCode = UnknownFailure; + } + + return dwRetCode; +} + +// Creator Function (can be overridden in Derived) - returns a pDerived +template +uint32 TCafSubSystemObjectRoot::Creator(Derived** ppDerived) +{ + uint32 dwRetCode = Success; + + try + { + // Make sure the outer pointer seems valid. + if(ppDerived != NULL) + { + // Create the out-param + *ppDerived = new LifetimeManager; + + // If we were able to allocate and create... + if(NULL != *ppDerived) + { + // Increment the ref count + (*ppDerived)->AddRef(); + } + else + { + // set the return code to indicate out of memory. + dwRetCode = OutOfMemory; + } + } + // Otherwise... + else + { + // set the return code to indicate an invalid pointer was passed. + dwRetCode = InvalidPointerValue; + } + } + // No exceptions should be thrown, but if one is... + catch(...) + { + // set the return code to unknown failure occurred. + dwRetCode = UnknownFailure; + } + + return dwRetCode; +} + +// Table driven query interface +template +void TCafSubSystemObjectRoot::InternalQueryInterface(const void* cpThis, + const _CAF_INTMAP_ENTRY* cpEntries, + const IID& criid, + void** ppv) +{ + if(NULL != cpThis) + { + if(cpEntries != NULL) + { + if(ppv != NULL) + { + // Initialize the out-param + *ppv = NULL; + + // If the iid passed in is the iid of IEcmObject... + if(::IsEqualIID(criid, CAF_IIDOF(ICafObject))) + { + // get the first interface in the map, + ICafObject* pObj = + reinterpret_cast( + (SUBSYS_INTPTR)cpThis+cpEntries->offset); + + // increment the reference count, + pObj->AddRef(); + + // set the out-param equal to the interface pointer. + *ppv = pObj; + } + // Otherwise, we are looking for something other than + // IEcmObject, so... + else + { + // get a copy of the pointer to the entries so we can + // increment it, + _CAF_INTMAP_ENTRY* pEntries = + const_cast<_CAF_INTMAP_ENTRY*>(cpEntries); + + // loop through the interface map entries... + while((pEntries->cpiid != NULL) && + (pEntries->offset != SUBSYS_INTPTR_INVALID)) + { + // if we find a matching IID... + if ((NULL != pEntries->cpiid) && + (::IsEqualIID(*(pEntries->cpiid), criid))) + { + // get the interface at the offset from the map, + ICafObject* pObj = + reinterpret_cast( + (SUBSYS_INTPTR)cpThis+pEntries->offset); + + // increment the reference count, + pObj->AddRef(); + + // set the out-param equal to the interface + // pointer, and + *ppv = pObj; + + // break out of the loop. + break; + } + + // Move to the next entry in the interface map. + pEntries++; + } + } + } + } + } +} + +} + +#endif // _TCafSubSystemObjectRoot_H_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/TCafSubSystemSmartCl.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/TCafSubSystemSmartCl.h new file mode 100644 index 000000000..eb4ce8177 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/TCafSubSystemSmartCl.h @@ -0,0 +1,608 @@ +/* + * Created: Oct 9, 2002 + * + * Copyright (c) 2002-2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ +#ifndef _TCafSubSystemSmartCl_H +#define _TCafSubSystemSmartCl_H + +#include "EcmSubSystemBase.h" +#include "CEcmSubSystem.h" +#include + +namespace Caf { + +struct CafSubSystemSmartClToken { ICafObject *m_pCl; CafSubSystemSmartClToken(ICafObject* p) : m_pCl(p) {} }; + +// this routine should really be moved to a real extern +inline BOOL CafSubSystemSmartClIsSameObject(ICafObject *pObj1, ICafObject *pObj2) +{ + BOOL bResult = TRUE; + if( pObj1 != pObj2) + { + ICafObject *p1 = 0, *p2 = 0; + pObj1->QueryInterface(CAF_IIDOF(ICafObject), (void**)&p1); + if( p1 ) p1->Release(); else p1 = 0; + pObj2->QueryInterface(CAF_IIDOF(ICafObject), (void**)&p2); + if( p2 ) p2->Release(); else p2 = 0; + bResult = (p1 == p2); // values do not change after release + } + return bResult; +} + +inline BOOL CafSubSystemSmartClIsSameObject(ICafObject *pObj1, const CafSubSystemSmartClToken& pObj2) +{ + return CafSubSystemSmartClIsSameObject(pObj1, pObj2.m_pCl); +} + +inline BOOL CafSubSystemSmartClIsSameObject(const CafSubSystemSmartClToken& pObj1, ICafObject *pObj2) +{ + return CafSubSystemSmartClIsSameObject(pObj1.m_pCl, pObj2); +} + +inline BOOL CafSubSystemSmartClIsSameObject(const CafSubSystemSmartClToken& pObj1, const CafSubSystemSmartClToken& pObj2) +{ + return CafSubSystemSmartClIsSameObject(pObj1.m_pCl, pObj2.m_pCl); +} + +/** + * @brief Template for classes exposed as subsystem objects + */ +template +class TCafSubSystemSmartCl +{ +private: + typedef TCafSubSystemSmartCl SameSmartType; + +public: // constructors/destructors + + // default constructor + TCafSubSystemSmartCl(void) : + CAF_CM_INIT( "TCafSubSystemSmartC" ), + m_pCl( 0 ) + { + } + + // homogeneous raw constructor + TCafSubSystemSmartCl(Cl* rhs) : + CAF_CM_INIT( "TCafSubSystemSmartC" ), + m_pCl( rhs ) + { + if( NULL != m_pCl ) + m_pCl->AddRef(); + } + + // homogeneous smart constructor + TCafSubSystemSmartCl(const SameSmartType& rhs) : + CAF_CM_INIT( "TCafSubSystemSmartC" ), + m_pCl( rhs.m_pCl ) + { + if( NULL != m_pCl ) + m_pCl->AddRef(); + } + + // heterogeneous raw constructor + TCafSubSystemSmartCl(ICafObject* rhs) : + CAF_CM_INIT( "TCafSubSystemSmartC" ), + m_pCl( 0 ) + { + if( rhs ) + { + // Do QueryInterface (throws exception if QI fails) + rhs->QueryInterface( GetIID(), ( void ** ) &m_pCl ); + } + } + + // heterogeneous smart constructor + TCafSubSystemSmartCl(const CafSubSystemSmartClToken& rhs) : + CAF_CM_INIT( "TCafSubSystemSmartC" ), + m_pCl( 0 ) + { + if( rhs.m_pCl ) + { + // Do QueryInterface (throws exception if QI fails) + rhs.m_pCl->QueryInterface( GetIID(), ( void ** ) &m_pCl ); + } + } + + // destructor + ~TCafSubSystemSmartCl(void) + { + SafeRelease(); + } + + operator CafSubSystemSmartClToken(void) const + { + return CafSubSystemSmartClToken( m_pCl ); + } + +public: // Attach operations + + // homogeneous raw attachment + void Attach(Cl* rhs) + { + if( rhs != m_pCl ) + { + SafeRelease(); + if( m_pCl = rhs ) + m_pCl->AddRef(); + } + } + + // homogeneous smart attachment + void Attach(const SameSmartType& rhs) + { + Attach( rhs.m_pCl ); + } + + // heterogeneous raw attachment + void Attach(ICafObject* rhs) + { + SafeRelease(); + if( rhs ) + { + rhs->QueryInterface( GetIID(), ( void ** ) &m_pCl ); + } + } + + // heterogeneous smart attachment + void Attach(const CafSubSystemSmartClToken& rhs) + { + Attach( rhs.m_pCl ); + } + +public: // assignment operators + + // homogeneous raw assignment + SameSmartType& operator = (Cl *rhs) + { + Attach( rhs ); + return *this; + } + + // homogeneous smart assignment + SameSmartType& operator = (const SameSmartType& rhs) + { + Attach( rhs ); + return *this; + } + + // heterogeneous raw assignment + SameSmartType& operator = (ICafObject * rhs) + { + Attach( rhs ); + return *this; + } + + // heterogeneous smart assignment + SameSmartType& operator = (const CafSubSystemSmartClToken& rhs) + { + Attach( rhs ); + return *this; + } + +public: // equivalence operators (note - no identity tests performed here!) + + BOOL operator == (Cl * rhs) + { + return m_pCl == rhs; + } + + BOOL operator == (const SameSmartType& rhs) + { + return m_pCl == rhs.m_pCl; + } + + BOOL operator != (Cl *rhs) + { + return m_pCl != rhs; + } + + BOOL operator != (const SameSmartType& rhs) + { + return m_pCl != rhs.m_pCl; + } + +public: // CoCreateInstance wrappers + void CreateInstance(const std::string& strClassIdentifier, const bool cbIsExceptionOnFailure = true) + { + CCafException* _cm_exception_ = NULL; + SafeRelease(); + + try + { + CEcmSubSystem oSubSystem; + oSubSystem.Load(strClassIdentifier); + oSubSystem.CreateInstance(strClassIdentifier, GetIID(), AsPPVArg()); + } + catch (CCafException *e) + { + _cm_exception_ = e; + } + + if( _cm_exception_ ) + { + if( cbIsExceptionOnFailure ) + { + _cm_exception_->throwSelf(); + } + else + { + _cm_exception_->Release(); + } + } + } + +private: + const IID& GetIID(void) const + { + return CAF_IIDOF(Cl); + } + + void** AsPPVArg(void) + { + SafeRelease(); + return (void **)&m_pCl; + } + +public: // operations + +// note: no Cl * operator is allowed, as it makes it very +// easy to break the protocol of COM. Instead, these +// four operations require the user to be explicit + + Cl* GetAddRefedInterface(void) const + { + if( m_pCl) + m_pCl->AddRef(); + return m_pCl; + } + + Cl* GetNonAddRefedInterface(void) const + { + return m_pCl; + } + + Cl** GetReleasedInterfaceReference(void) + { + SafeRelease(); + return &m_pCl; + } + + Cl** GetNonReleasedInterfaceReference(void) + { + return &m_pCl; + } + + BOOL operator ! (void) const + { + return m_pCl == 0; + } + + BOOL IsOK(void) const + { + return m_pCl != 0; + } + + // instead of operator bool, we return a fake ptr type to allow if( pFoo) usage + // but to disallow if( pFoo == pBar) which is probably wrong + class PseudoBool {}; + operator PseudoBool * (void) const + { + return (PseudoBool *)m_pCl; + } + + // the arrow operator returns a pointer with AddRef and Release disabled + class NoAddRefOrRelease : public Cl { + private: + virtual void AddRef() = 0; + virtual void Release() = 0; + }; + + NoAddRefOrRelease *operator ->(void) + { + return (NoAddRefOrRelease *)m_pCl; + } + + NoAddRefOrRelease *operator ->(void) const + { + return (NoAddRefOrRelease *)m_pCl; + } + + static Cl* GetAddRefedQueryInterface(ICafObject* pICafObject) + { + CAF_CM_STATIC_FUNC( "TCafSubSystemSmartC", "GetAddRefedQueryInterface" ); + CAF_CM_VALIDATE_INTERFACEPTR( pICafObject ); + + // QI to the interface and validate that the QI was successful. + Cl* pCl = 0; + pICafObject->QueryInterface( CAF_IIDOF(Cl), ( void ** ) &pCl ); + + return pCl; + } + + static Cl* GetNonAddRefedQueryInterface(ICafObject* pICafObject) + { + CAF_CM_STATIC_FUNC( "TCafSubSystemSmartC", "GetNonAddRefedQueryInterface" ); + CAF_CM_VALIDATE_INTERFACEPTR( pICafObject ); + + // QI to the interface and validate that the QI was successful. + Cl* pCl = 0; + pICafObject->QueryInterface( CAF_IIDOF(Cl), ( void ** ) &pCl ); + + // QueryInterface automatically AddRefs the interface, so it must be released. + if( pCl ) + pCl->Release(); + + return pCl; + } + +private: + CAF_CM_CREATE; + Cl* m_pCl; + +private: + void SafeRelease(void) + { + if( m_pCl ) + m_pCl->Release(); + m_pCl = 0; + } +}; + +template <> +class TCafSubSystemSmartCl +{ +private: + typedef ICafObject Cl; + typedef TCafSubSystemSmartCl SameSmartType; + +public: // constructors/destructors + + // default constructor + TCafSubSystemSmartCl(void) : + CAF_CM_INIT( "TCafSubSystemSmartC" ), + m_pCl(0) + { + } + + // homogeneous raw constructor + TCafSubSystemSmartCl(Cl *rhs) : + CAF_CM_INIT( "TCafSubSystemSmartC" ), + m_pCl(rhs) + { + if (NULL != m_pCl) + m_pCl->AddRef(); + } + + // homogeneous smart constructor + TCafSubSystemSmartCl(const SameSmartType& rhs) : + CAF_CM_INIT( "TCafSubSystemSmartC" ), + m_pCl(rhs.m_pCl) + { + if (NULL != m_pCl) + m_pCl->AddRef(); + } + + operator CafSubSystemSmartClToken (void) const + { + return CafSubSystemSmartClToken(m_pCl); + } + + // heterogeneous smart constructor (AddRef's instead of QI) + TCafSubSystemSmartCl(const CafSubSystemSmartClToken& rhs) : + CAF_CM_INIT( "TCafSubSystemSmartC" ), + m_pCl(0) + { + if ( rhs.m_pCl ) + { + m_pCl = rhs.m_pCl; + m_pCl->AddRef(); + } + } + + // destructor + ~TCafSubSystemSmartCl(void) + { + SafeRelease(); + } + +public: // Attach operations + + // homogeneous raw attachment + void Attach(Cl * rhs) + { + if (rhs != m_pCl) + { + SafeRelease(); + if ( rhs ) + { + m_pCl = rhs; + m_pCl->AddRef(); + } + } + } + + // homogeneous smart attachment + void Attach(const SameSmartType& rhs) + { + Attach(rhs.m_pCl); + } + + // heterogeneous smart attachment + void Attach(const CafSubSystemSmartClToken& rhs) + { + Attach(rhs.m_pCl); + } + +public: // assignment operators + // homogeneous raw assignment + SameSmartType& operator = (Cl *rhs) + { + Attach(rhs); + return *this; + } + + // homogeneous smart assignment + SameSmartType& operator = (const SameSmartType& rhs) + { + Attach(rhs); + return *this; + } + + // heterogeneous smart assignment + SameSmartType& operator = (const CafSubSystemSmartClToken& rhs) + { + Attach(rhs); + return *this; + } + + // equivalence operators (note - no identity tests performed here!) + BOOL operator == (Cl * rhs) + { + return m_pCl == rhs; + } + + BOOL operator == (const SameSmartType& rhs) + { + return m_pCl == rhs.m_pCl; + } + + BOOL operator != (Cl *rhs) + { + return m_pCl != rhs; + } + + BOOL operator != (const SameSmartType& rhs) + { + return m_pCl != rhs.m_pCl; + } + +public: // CoCreateInstance wrappers + void CreateInstance(const std::string& strClassIdentifier, + const bool cbIsExceptionOnFailure = true) + { + CCafException* _cm_exception_ = NULL; + SafeRelease(); + + try + { + CEcmSubSystem oSubSystem; + oSubSystem.Load(strClassIdentifier); + oSubSystem.CreateInstance(strClassIdentifier, GetIID(), AsPPVArg()); + } + catch (CCafException* e) + { + _cm_exception_ = e; + } + + if(_cm_exception_) + { + if( cbIsExceptionOnFailure ) + { + _cm_exception_->throwSelf(); + } + else + { + _cm_exception_->Release(); + } + } + } + +public: // Interface pointer accessors + // note: no If * operator is allowed, as it makes it very + // easy to break the protocol of COM. Instead, these + // four operations require the user to be explicit + + Cl * GetAddRefedInterface(void) const + { + if (m_pCl) + m_pCl->AddRef(); + return m_pCl; + } + + Cl * GetNonAddRefedInterface(void) const + { + return m_pCl; + } + + Cl **GetReleasedInterfaceReference(void) + { + SafeRelease(); + return &m_pCl; + } + + Cl **GetNonReleasedInterfaceReference(void) + { + return &m_pCl; + } + +public: // operations + const IID GetIID(void) const + { + return CAF_IIDOF(ICafObject); + } + + void * * AsPPVArg(void) + { + SafeRelease(); + return (void **)&m_pCl; + } + + BOOL operator ! (void) const + { + return m_pCl == 0; + } + + BOOL IsOK(void) const + { + return m_pCl != 0; + } + + // instead of operator bool, we return a fake ptr type to allow if (pFoo) usage + // but to disallow if (pFoo == pBar) which is probably wrong + class PseudoBool {}; + operator PseudoBool * (void) const + { + return (PseudoBool *)m_pCl; + } + + // the arrow operator returns a pointer with AddRef and Release disabled + class NoAddRefOrRelease : public Cl { + private: + virtual void AddRef() = 0; + virtual void Release() = 0; + }; + + NoAddRefOrRelease *operator ->(void) + { + CAF_CM_FUNCNAME_VALIDATE( "operator ->" ); + CAF_CM_VALIDATE_PTR( m_pCl ); + + return (NoAddRefOrRelease *)m_pCl; + } + + NoAddRefOrRelease *operator ->(void) const + { + CAF_CM_FUNCNAME_VALIDATE( "operator ->" ); + CAF_CM_VALIDATE_PTR( m_pCl ); + + return (NoAddRefOrRelease *)m_pCl; + } +private: + CAF_CM_CREATE; + Cl* m_pCl; + +private: + void SafeRelease(void) + { + if( m_pCl ) + m_pCl->Release(); + m_pCl = 0; + } +}; + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/stdafx.h new file mode 100644 index 000000000..4cef0532c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/stdafx.h @@ -0,0 +1,20 @@ +/* + * Created: Mar 21, 2004 + * + * Copyright (c) 2004-2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef stdafx_h_ +#define stdafx_h_ + +#ifdef WIN32 + #define SUBSYSTEMBASE_LINKAGE __declspec(dllexport) +#else + #define SUBSYSTEMBASE_LINKAGE +#endif + +#include +#include "../Common/CommonAggregatorLink.h" + +#endif // #ifndef stdafx_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/TCafObject.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/TCafObject.h new file mode 100644 index 000000000..0ef28613c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/TCafObject.h @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ +#ifndef _TCafObject_h +#define _TCafObject_h + +template +class TCafObject : public Base { +public: + TCafObject() : _refCnt(0) {} + +public: // ICafObect Implementations + void AddRef() { + g_atomic_int_inc(&_refCnt); + } + + void Release() { + if (g_atomic_int_dec_and_test(&_refCnt)) { + delete this; + } + } + + void QueryInterface(const IID&, void**) { + throw std::runtime_error("QueryInterface not supported"); + } + +private: + gint _refCnt; + +private: + TCafObject(const TCafObject&); + TCafObject& operator=(const TCafObject&); +}; + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/TCafQIObject.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/TCafQIObject.h new file mode 100644 index 000000000..16b01f5ca --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/TCafQIObject.h @@ -0,0 +1,90 @@ +/* + * Created: May 25, 2004 + * + * Copyright (c) 2004-2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef TCAFQIOBJECT_H_ +#define TCAFQIOBJECT_H_ + +template +class TCafQIObject : public TCafObject +{ +public: + TCafQIObject () + { + } + + virtual ~TCafQIObject () + { + } + +public: + virtual void QueryInterface( const IID& criid, void** ppv ) + { + Base::_InternalQueryInterface( criid, ppv ); + } +}; + +//////////////////////////////////////////////////////////////////////// +// +// QI map +// +//////////////////////////////////////////////////////////////////////// +#define CAF_BEGIN_QI() \ +protected: \ + void _InternalQueryInterface (const IID &criid, void **ppv) \ + { \ + try \ + { \ + if (ppv) \ + { \ + *ppv = NULL; \ + bool bUseFirstInterface = (::IsEqualGUID(criid, CAF_IIDOF(::ICafObject)) != 0); \ + if (0); + +#define CAF_QI_ENTRY(Interface) \ + else if (bUseFirstInterface || ::IsEqualGUID(criid, CAF_IIDOF(Interface))) \ + *ppv = static_cast(this); + +#define CAF_QI_ENTRY2(Interface, IntermediateInterface) \ + else if (bUseFirstInterface || ::IsEqualGUID(criid, CAF_IIDOF(Interface))) \ + *ppv = static_cast(static_cast(this)); + +#define CAF_END_QI() \ + if (*ppv) \ + reinterpret_cast(this)->AddRef(); \ + } \ + } \ + catch (...) \ + { \ + } \ + } + +//////////////////////////////////////////////////////////////////////// +// +// Object Id - required for ISerializableObject +// +//////////////////////////////////////////////////////////////////////// +#define CAF_MAKE_OBJECT_ID(Factory, Class) \ + (std::string(Factory) + std::string(":") + std::string( #Class )) + +#define CAF_DECLARE_OBJECT_ID(Class, Factory) \ + public: \ + virtual std::string GetObjectId () const \ + { \ + return CAF_MAKE_OBJECT_ID(Factory, Class); \ + } + +// Declare a smart pointer to a class that supports QI after the class has been declared +#define CAF_DECLARE_SMART_QI_POINTER(ClassName) \ + typedef TCafSmartPtr > SmartPtr##ClassName; \ + typedef TCafSmartPtr > ConstPtr##ClassName + +// Forward declare a smart pointer to a class that supports QI +#define CAF_DECLARE_CLASS_AND_IMPQI_POINTER(ClassName) \ + class ClassName; \ + CAF_DECLARE_SMART_QI_POINTER(ClassName) + +#endif /* TCAFQIOBJECT_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/TCafSmartPtr.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/TCafSmartPtr.h new file mode 100644 index 000000000..6dd430c06 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/TCafSmartPtr.h @@ -0,0 +1,400 @@ +/* + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _TCafSmartPtr_H +#define _TCafSmartPtr_H + +#ifdef WIN32 +// Disable C4800 - performance warning forcing value to 'true' or 'false' +#pragma warning(disable: 4800) +#endif + +// Forward declarations for Subsystem calls +#ifndef SUBSYSTEMBASE_LINKAGE +#ifdef WIN32 +#ifdef FRAMEWORK_BUILD +#define SUBSYSTEMBASE_LINKAGE __declspec(dllexport) +#else +#define SUBSYSTEMBASE_LINKAGE __declspec(dllimport) +#endif +#else +#define SUBSYSTEMBASE_LINKAGE +#endif +#endif + +namespace Caf { +extern "C" void SUBSYSTEMBASE_LINKAGE CreateObject(const char* cszObjectId, const IID& criid, void** ppv); +//extern "C" void SUBSYSTEMBASE_LINKAGE CreateQIObject(const char* cszFactoryId, const char* cszClassName, const IID& criid, void** ppv); +} + +/** + * @brief Template to wrap any interface or class and provide lifetime management. + *

+ * Lifetime is managed through reference counting with counts stored in the object + * itself. The reference methods are AddRef() and Release(). When the reference + * count reaches zero the object will delete itself. + *

+ * Template instantiation:
+ * Cl is used for accessing the class. It may or may not be derived from + * #ICafObject.
+ * CreateCl is used for creating the class and reference counting. It must + * support the #ICafObject interface. + */ +// CreateCl is used for creation and reference counting and must support the +// ICafObject interface. Cl is used for accessing the class. +template +class TCafSmartPtr { +public: + typedef Cl class_type; + typedef CreateCl create_type; + +private: + typedef TCafSmartPtr SameSmartType; + +public: + // constructors/destructors + + // default constructor + TCafSmartPtr(void) : + m_pCl(0) { + } + + // homogeneous raw constructor + TCafSmartPtr(Cl *rhs) { + m_pCl = rhs; + if (m_pCreateCl) + m_pCreateCl->AddRef(); + } + + // derived class smart constructor + template + TCafSmartPtr(const TCafSmartPtr &rhs) { + m_pCl = rhs.GetNonAddRefedInterface(); + if (m_pCreateCl) + m_pCreateCl->AddRef(); + } + + // homogeneous smart constructor + TCafSmartPtr(const SameSmartType& rhs) { + m_pCl = rhs.m_pCl; + if (m_pCreateCl) + m_pCreateCl->AddRef(); + } + + // don't allow construction from bool + explicit TCafSmartPtr(const bool &rb) { + int32 CantConstructSmartPointerFromBool[0]; + } + + // destructor + ~TCafSmartPtr(void) { + if (m_pCreateCl) + m_pCreateCl->Release(); + } + +public: + // assignment operators + + // homogeneous raw assignment + SameSmartType &operator=(Cl *rhs) { + Attach(rhs); + return *this; + } + + // derived class smart assignment + template + SameSmartType &operator=(const TCafSmartPtr &rhs) { + Attach(rhs.GetNonAddRefedInterface()); + return *this; + } + + // homogeneous smart assignment + SameSmartType &operator=(const SameSmartType &rhs) { + Attach(rhs.m_pCl); + return *this; + } + + // don't allow assignment from bool + void operator=(bool &rb) { + int32 CantAssignSmartPointerFromBool[0]; + } + +private: + + // This helper class is used to ensure that the old smart object gets + // released in a safe manner. It is not safe to touch 'this' in any way + // whatsoever after releasing the old smart object because the release + // could set off a chain of destruction that results in this smart pointer + // being destroyed. Note that this includes the exception macros which + // reference the automatically-defined class name member variable. + class CSafeAutoRelease { + public: + CSafeAutoRelease(CreateCl *pOldCreateCl) : + m_pOldCreateCl(pOldCreateCl) { + } + ~CSafeAutoRelease() { + if (m_pOldCreateCl) + m_pOldCreateCl->Release(); + } + CreateCl *m_pOldCreateCl; + }; + +public: + /** + * @brief Retrieve an interface from a ICafObject pointer and assign the result to self + * @param piObj the object to be queried + * @param cbIsRequired if true then the operation must succeed else an + * exception will be thrown. If false then the self value will be NULL + * if the operation fails. + */ + void QueryInterface(ICafObject *piObj, const bool cbIsRequired = true) { + CSafeAutoRelease oAutoRelease(m_pCreateCl); + + m_pCreateCl = NULL; + if (piObj) + piObj->QueryInterface(GetIID(), reinterpret_cast(&m_pCreateCl)); + if (cbIsRequired && !m_pCreateCl) + throw std::bad_cast(); + } + + /** + * @brief Retrieve an interface from another smart pointer and assign the result to self + * @param rhs the object to be queried + * @param cbIsRequired if true then the operation must succeed else an + * exception will be thrown. If false then the self value will be NULL + * if the operation fails. + */ + template + void QueryInterface(const TCafSmartPtr &rhs, const bool cbIsRequired = true) { + CSafeAutoRelease oAutoRelease(m_pCreateCl); + + m_pCreateCl = NULL; + if (rhs) + rhs.QueryInterface(GetIID(), reinterpret_cast(&m_pCreateCl)); + if (cbIsRequired && !m_pCreateCl) + throw std::bad_cast(); + } + + // This function is provided so that the delegation can go through m_pCreateCl + // rather than m_pCl. This way, if this is a smart pointer to a class that + // derives from multiple interfaces the compiler will not get confused about + // which QueryInterface function to use. + void QueryInterface(const IID &criid, void **ppv) const { + *ppv = NULL; + m_pCreateCl->QueryInterface(criid, ppv); + } + + /** + * @brief Return the UUID of the object + * @return the UUID + */ + static const IID& GetIID() { + // Compiler bug workaround (see comments before COpaqueTemplate) + // return TEcmSmartPtr_GetIID(static_cast *>(NULL)); + return CAF_IIDOF(Cl); + } + +public: + // comparison operators + + bool operator==(const Cl *rhs) const { + return m_pCl == rhs; + } + + template + bool operator==(const TCafSmartPtr &rhs) const { + return m_pCl == rhs.GetNonAddRefedInterface(); + } + + bool operator!=(const Cl *rhs) const { + return m_pCl != rhs; + } + + template + bool operator!=(const TCafSmartPtr &rhs) const { + return m_pCl != rhs.GetNonAddRefedInterface(); + } + + bool operator<(const SameSmartType &rhs) const { + return (m_pCl < rhs.m_pCl); + } + +public: + // conversion + + // This takes the place of operator bool. + // It turns out that the presence of operator bool + // causes the compiler to "get lost" when compiling + // comparison operations such as if( spcPtr1 == spcPtr2)... + // + // This conversion operator will satisfy the compiler when + // compiling comparison operations. + class PseudoBool { + }; + operator PseudoBool *() const { + return (PseudoBool *) m_pCl; + } + +public: + // instance creation + /** + * @brief Create an instance of the CreateCl object + *

+ * The object will have an initial reference count of 1. + */ + void CreateInstance() { + CSafeAutoRelease oAutoRelease(m_pCreateCl); + + //////////////////////////////////////////////////////////////////////// + // + // This code is used to verify that it is safe to use a union of Cl + // and CreateCl. An error indicates that it is *not* safe in which + // case the smart pointer cannot be used as defined. To solve this + // problem, eliminate the second template parameter from the smart + // pointer definition which will force Cl and CreateCl to be the + // same, e.g.: + // + // typedef TCafSmartPtr > SmartPtrClass; + // + //////////////////////////////////////////////////////////////////////// + Cl *pCl = static_cast(reinterpret_cast(0x4)); + if (pCl != reinterpret_cast(0x4)) + throw std::logic_error("Illegal use of TCafSmartPtr<> (See comments in TCafSmartPtr.h)"); + m_pCreateCl = new CreateCl; + if (!m_pCreateCl) + throw std::bad_alloc(); + m_pCreateCl->AddRef(); + } + + /** + * @brief Create an instance of a subsystem object + *

+ * Objects exposed as subsystems (#Caf::TCafSubSystemSmartCl) are identified + * by a string. The Cl and CreateCl template arguments would both be + * set to an interface on the subsystem object of interest. + *

+ * The object will have an initial reference count of 1. + */ + void CreateInstance(const char* cszObjectId) { + CSafeAutoRelease oAutoRelease(m_pCreateCl); + Caf::CreateObject(cszObjectId, GetIID(), reinterpret_cast(&m_pCreateCl)); + } + +// void CreateInstance (const char *cszFactoryId, const char *cszClassName) +// { +// CSafeAutoRelease oAutoRelease(m_pCreateCl); +// Caf::CreateQIObject(cszFactoryId, cszClassName, GetIID(), reinterpret_cast(&m_pCreateCl)); +// } + +public: + // operations + Cl *GetAddRefedInterface() const { + if (!m_pCl) + throw std::runtime_error("TCafSmartPtr: m_pCl is NULL"); + if (m_pCreateCl) + m_pCreateCl->AddRef(); + return m_pCl; + } + + Cl *GetNonAddRefedInterface() const { + return m_pCl; + } + + Cl **GetReleasedInterfaceReference(void) { + CSafeAutoRelease oAutoRelease(m_pCreateCl); + m_pCreateCl = NULL; + return &m_pCreateCl; + } + + Cl **GetNonReleasedInterfaceReference(void) { + return &m_pCreateCl; + } + + void **GetAsPPVArg(void) { + return (void**) GetReleasedInterfaceReference(); + } + + bool IsNull() const { + return m_pCl == 0; + } + + // the arrow operator simply returns the pointer + Cl *operator->() const { + if (!m_pCl) + throw std::runtime_error("TCafSmartPtr: m_pCl is NULL"); + return m_pCl; + } + + Cl &operator*() const { + if (!m_pCl) + throw std::runtime_error("TCafSmartPtr: m_pCl is NULL"); + return *m_pCl; + } + +private: + // m_pCreateCl is used for reference counting; m_pCl is used for object access. + union { + Cl *m_pCl; + CreateCl *m_pCreateCl; + }; + +private: + // homogeneous raw attachment + void Attach(Cl* rhs) { + CSafeAutoRelease oAutoRelease(m_pCreateCl); + m_pCl = rhs; + if (m_pCreateCl) + m_pCreateCl->AddRef(); + } +}; + +// These template functions will give you a reference to the +// underlying object wraped in a smart class +template +const Cl& ToObj(const TCafSmartPtr& spcT) { + return *(spcT.GetNonAddRefedInterface()); +} + +template +Cl& ToNonConstObj(const TCafSmartPtr& spcT) { + return *(spcT.GetNonAddRefedInterface()); +} + +//////////////////////////////////////////////////////////////////////// +// +// Declaration Macros +// +//////////////////////////////////////////////////////////////////////// + +// Declare a smart pointer after the class has been declared +#define CAF_DECLARE_SMART_POINTER(ClassName) \ + typedef TCafSmartPtr > SmartPtr##ClassName; \ +// typedef TCafSmartPtr > ConstPtr##ClassName + +// Forward declare a class smart pointer +#define CAF_DECLARE_CLASS_AND_SMART_POINTER(ClassName) \ + class ClassName; \ + CAF_DECLARE_SMART_POINTER(ClassName) + +// Forward declare a struct smart pointer +#define CAF_DECLARE_STRUCT_AND_SMART_POINTER(StructName) \ + struct StructName; \ + CAF_DECLARE_SMART_POINTER(StructName) + +// Helper macro - do not use directly +#define CAF_DECLARE_SMART_INTERFACE_HELPER(InterfaceName) \ + typedef TCafSmartPtr SmartPtr##InterfaceName; \ +// typedef TCafSmartPtr ConstPtr##InterfaceName + +// Declare a smart pointer to an interface in the interface header file +#define CAF_DECLARE_SMART_INTERFACE_POINTER(InterfaceName) \ + CAF_DECLARE_SMART_INTERFACE_HELPER(InterfaceName) + +// Forward declare a smart interface pointer +#define CAF_FORWARD_DECLARE_SMART_INTERFACE(InterfaceName) \ + struct InterfaceName; \ + CAF_DECLARE_SMART_INTERFACE_HELPER(InterfaceName) + +#endif // #ifndef _TCafSmartPtr_H diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/TCafStackObject.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/TCafStackObject.h new file mode 100644 index 000000000..11ea485c4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/TCafStackObject.h @@ -0,0 +1,35 @@ +/* + * Created on: Jul 23, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef TCAFSTACKOBJECT_H_ +#define TCAFSTACKOBJECT_H_ + +namespace Caf { + +template +class TCafStackObject : public Base { +public: + TCafStackObject() {} + virtual ~TCafStackObject() {} + +private: + virtual void AddRef() { + throw std::runtime_error("TCafStackObj::AddRef not supported"); + } + + virtual void Release() { + throw std::runtime_error("TCafStackObj::Release not supported"); + } + + virtual void QueryInterface(const IID&, void** ppv) { + throw std::runtime_error("TCafStackObj::QueryInterface not supported"); + } +}; + +} +#endif /* TCAFSTACKOBJECT_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/MarkupParser/CMarkupParser.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/MarkupParser/CMarkupParser.cpp new file mode 100644 index 000000000..9b54e6e30 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/MarkupParser/CMarkupParser.cpp @@ -0,0 +1,250 @@ +/* + * Author: mdonahue + * Created: Jan 20, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CMarkupParser.h" +#include +#include + +namespace Caf { namespace MarkupParser { + +std::string _xml; + +struct SParserState { + SParserState() : + depth(0) { + } + + SmartPtrElement root; + std::deque stack; + uint32 depth; + +private: + CAF_CM_DECLARE_NOCOPY(SParserState); +}; + +void cb_start_element(GMarkupParseContext *context, + const gchar *element_name, + const gchar **attribute_names, + const gchar **attribute_values, + gpointer user_data, + GError **error) { + CAF_CM_STATIC_FUNC("MarkupParser", "cb_start_element"); + + try { + SParserState& state = *(reinterpret_cast(user_data)); + CAF_CM_ASSERT(state.depth == state.stack.size()); + if (state.depth == 0) { + //TODO-BLW: For some reason the root is already created, so temporarily + // remove the assert and re-create the root. + //CAF_CM_ASSERT(!state.root); + state.root.CreateInstance(); + state.stack.push_back(state.root); + } + else { + SmartPtrElement element; + element.CreateInstance(); + state.stack.back()->children.push_back(element); + state.stack.push_back(element); + } + + ++state.depth; + SmartPtrElement element = state.stack.back(); + element->name = element_name; + + const gchar **attr_name_cursor = attribute_names; + const gchar **attr_value_cursor = attribute_values; + while (*attr_name_cursor) { + element->attributes.push_back(Attribute(*attr_name_cursor, *attr_value_cursor)); + ++attr_name_cursor; + ++attr_value_cursor; + } + } + catch(CCafException *e) { + std::string msg(e->getFullMsg()); + e->Release(); + *error = g_error_new_literal(G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT, msg.c_str()); + } +} + +void cb_text(GMarkupParseContext *context, + const gchar *text, + gsize text_len, + gpointer user_data, + GError **error) { + SParserState& state = *(reinterpret_cast(user_data)); + if (text_len) { + state.stack.back()->value.append(text, text_len); + } +} + +void cb_end_element(GMarkupParseContext *context, + const gchar *element_name, + gpointer user_data, + GError **error) { + CAF_CM_STATIC_FUNC("MarkupParser", "cb_end_element"); + + try { + SParserState& state = *(reinterpret_cast(user_data)); + CAF_CM_ASSERT((state.depth) && (state.depth == state.stack.size())); + --state.depth; + state.stack.pop_back(); + } + catch(CCafException *e) { + std::string msg(e->getFullMsg()); + e->Release(); + *error = g_error_new_literal(G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT, msg.c_str()); + } +} + +void cb_destroy_user_data(gpointer data) { + delete (SParserState*)data; +} + +static GMarkupParser _markupParser = { cb_start_element, + cb_end_element, + cb_text, + NULL, + NULL }; + +SmartPtrElement parseString(const std::string& xml) { + CAF_CM_STATIC_FUNC("MarkupParser", "parseString"); + CAF_CM_VALIDATE_STRINGPTRA(xml.c_str()); + + _xml = xml; + + SParserState *parserState = new SParserState(); + GError *parserError = NULL; + GMarkupParseContext *context = + g_markup_parse_context_new(&_markupParser, + G_MARKUP_TREAT_CDATA_AS_TEXT, + parserState, + cb_destroy_user_data); + + SmartPtrElement root; + try { + if (g_markup_parse_context_parse(context, + xml.c_str(), + xml.length(), + &parserError)) { + root = parserState->root; + } + else { + CAF_CM_EXCEPTION_VA0(parserError->code, parserError->message); + } + } + catch (...) { + if (parserError) { + g_error_free(parserError); + } + + if (context) { + g_markup_parse_context_free(context); + } + throw; + } + + if (parserError) { + g_error_free(parserError); + } + + if (context) { + g_markup_parse_context_free(context); + } + + return root; +} + +SmartPtrElement parseFile(const std::string& file) { + CAF_CM_STATIC_FUNC("MarkupParser", "parseFile"); + CAF_CM_VALIDATE_STRINGPTRA(file.c_str()); + + gchar* text = NULL; + GError *fileError = NULL; + SmartPtrElement root; + try { + if (g_file_get_contents(file.c_str(), &text, NULL, &fileError)) { + if (! text || (text[ 0 ] == L'\0' )) { + CAF_CM_EXCEPTION_VA1(ERROR_INVALID_DATA, "File is empty - %s", file.c_str()); + } + root = parseString(text); + } + else { + CAF_CM_EXCEPTION_VA0(fileError->code, fileError->message); + } + } + catch (...) { + if (fileError) { + g_error_free(fileError); + } + + if (text) { + g_free(text); + } + throw; + } + + if (fileError) { + g_error_free(fileError); + } + + if (text) { + g_free(text); + } + + return root; +} + +ChildIterator findChild(SmartPtrElement& element, const std::string& name) { + CAF_CM_STATIC_FUNC_VALIDATE("MarkupParser", "findChild"); + CAF_CM_VALIDATE_SMARTPTR(element); + CAF_CM_VALIDATE_STRING(name); + + ChildIterator rc = element->children.end(); + for(ChildIterator childIter = element->children.begin(); + childIter != element->children.end(); + childIter++) { + if((*childIter)->name.compare(name) == 0) { + rc = childIter; + } + } + return rc; +/* + return std::find_if(element->children.begin(), + element->children.end(), + std::bind2nd(ElementName(), name)); +*/ +} + +AttributeIterator findAttribute(Attributes& attributes, const std::string& name) { + CAF_CM_STATIC_FUNC_VALIDATE("MarkupParser", "findAttribute"); + CAF_CM_VALIDATE_STRING(name); + return std::find_if(attributes.begin(), + attributes.end(), + std::bind2nd(AttributeName(), name)); +} + +std::string getAttributeValue(SmartPtrElement& element, const std::string& name) { + CAF_CM_STATIC_FUNC("MarkupParser", "getAttributeValue"); + CAF_CM_VALIDATE_SMARTPTR(element); + CAF_CM_VALIDATE_STRING(name); + std::string rc; + + AttributeIterator iter = findAttribute(element->attributes, name); + if (iter != element->attributes.end()) { + rc = iter->second; + } else { + CAF_CM_EXCEPTION_VA2(ERROR_TAG_NOT_FOUND, + "Element %s does not contain attribute %s", + element->name.c_str(), + name.c_str()); + } + return rc; +} + +}} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/MarkupParser/CMarkupParser.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/MarkupParser/CMarkupParser.h new file mode 100644 index 000000000..c73bf5776 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/MarkupParser/CMarkupParser.h @@ -0,0 +1,66 @@ +/* + * Author: mdonahue + * Created: Jan 20, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CMARKUPPARSER_H_ +#define CMARKUPPARSER_H_ + +#include +#include + +namespace Caf { + +/* + * Wrapper around glib GMarkupParser to store results in std containers + */ +namespace MarkupParser { + +// attribute name, value +typedef std::pair Attribute; +typedef std::list Attributes; + +struct AttributeName : public std::binary_function { + bool operator()(const Attribute& attr, const std::string& name) const { + return (attr.first.compare(name) == 0); + } +}; + +struct Element; +CAF_DECLARE_SMART_POINTER(Element); +struct Element { + Element() {} + std::string name; + std::string value; + Attributes attributes; + typedef std::list Children; + Children children; + + CAF_CM_DECLARE_NOCOPY(Element); +}; + +struct ElementName : public std::binary_function { + bool operator()(const SmartPtrElement& element, const std::string& name) const { + return (element->name.compare(name) == 0); + } +}; + +SmartPtrElement MARKUPPARSER_LINKAGE parseString(const std::string& xml); + +SmartPtrElement MARKUPPARSER_LINKAGE parseFile(const std::string& file); + +typedef Element::Children::iterator ChildIterator; +typedef Attributes::iterator AttributeIterator; + +ChildIterator MARKUPPARSER_LINKAGE findChild(SmartPtrElement& element, const std::string& name); + +AttributeIterator MARKUPPARSER_LINKAGE findAttribute(Attributes& attributes, const std::string& name); + +std::string MARKUPPARSER_LINKAGE getAttributeValue(SmartPtrElement& element, const std::string& name); + +}} + +#endif /* CMARKUPPARSER_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/MarkupParser/MarkupParserLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/MarkupParser/MarkupParserLink.h new file mode 100644 index 000000000..b4eb83761 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/MarkupParser/MarkupParserLink.h @@ -0,0 +1,26 @@ +/* + * Author: mdonahue + * Created: Jan 20, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef MARKUPPARSERLINK_H_ +#define MARKUPPARSERLINK_H_ + +#ifndef MARKUPPARSER_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define MARKUPPARSER_LINKAGE __declspec(dllexport) + #else + #define MARKUPPARSER_LINKAGE __declspec(dllimport) + #endif + #else + #define MARKUPPARSER_LINKAGE + #endif +#endif + +#include "CMarkupParser.h" + +#endif /* MARKUPPARSERLINK_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/MarkupParser/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/MarkupParser/stdafx.h new file mode 100644 index 000000000..a414609a0 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/MarkupParser/stdafx.h @@ -0,0 +1,25 @@ +/* + * Author: mdonahue + * Created: Jan 20, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define MARKUPPARSER_LINKAGE __declspec(dllexport) + #define COMMONAGGREGATOR_LINKAGE __declspec(dllexport) +#else + #define MARKUPPARSER_LINKAGE + #define COMMONAGGREGATOR_LINKAGE +#endif + +#include +#include "../../Common/CAutoMutexLockUnlock.h" +#include "../../Globals/CommonGlobalsLink.h" +#include "../../Exception/ExceptionLink.h" + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/XmlUtils/CXmlElement.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/XmlUtils/CXmlElement.cpp new file mode 100644 index 000000000..9cdfbd803 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/XmlUtils/CXmlElement.cpp @@ -0,0 +1,415 @@ +/* + * Author: mdonahue + * Created: Dec 3, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CXmlElement.h" + +using namespace Caf; + +const std::string CXmlElement::CDATA_BEG = ""; + +CXmlElement::CXmlElement() : + _isInitialized(false), + CAF_CM_INIT_LOG("CXmlElement") { +} + +CXmlElement::~CXmlElement() { +} + +void CXmlElement::initialize( + const MarkupParser::SmartPtrElement& element, + const std::string& path) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_PTR(element); + CAF_CM_VALIDATE_STRING(path); + + _element = element; + _path = path; + _isInitialized = true; +} + +MarkupParser::SmartPtrElement CXmlElement::getInternalElement() { + return _element; +} + +std::string CXmlElement::findRequiredAttribute(const std::string& name) const { + CAF_CM_FUNCNAME("findRequiredAttribute"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(name); + + CAF_CM_VALIDATE_COND_VA3(!_element->attributes.empty(), + "element (%s) does not contain any attributes (%s) in %s", _element->name.c_str(), + name.c_str(), _path.c_str()); + + MarkupParser::AttributeIterator iter = MarkupParser::findAttribute( + _element->attributes, name); + CAF_CM_VALIDATE_COND_VA3(iter != _element->attributes.end(), + "element (%s) does not contain required attribute (%s) in %s", + _element->name.c_str(), name.c_str(), _path.c_str()); + + std::string rc = iter->second; + CAF_CM_VALIDATE_STRING(rc); + + return rc; +} + +std::string CXmlElement::findOptionalAttribute(const std::string& name) const { + CAF_CM_FUNCNAME_VALIDATE("findOptionalAttribute"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(name); + + std::string rc; + if (!_element->attributes.empty()) { + MarkupParser::AttributeIterator iter = MarkupParser::findAttribute( + _element->attributes, name); + if (iter != _element->attributes.end()) { + rc = iter->second; + } + } + + return rc; +} + +SmartPtrCXmlElement CXmlElement::findRequiredChild(const std::string& name) const { + CAF_CM_FUNCNAME("findRequiredChild"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(name); + + const MarkupParser::ChildIterator iter = MarkupParser::findChild(_element, name); + if (iter == _element->children.end()) { + CAF_CM_LOG_INFO_VA1("Child not found: %s", name.c_str()); + } + CAF_CM_VALIDATE_COND_VA3(iter != _element->children.end(), + "element (%s) does not contain required child (%s) in %s", _element->name.c_str(), + name.c_str(), _path.c_str()); + + SmartPtrCXmlElement rc; + rc.CreateInstance(); + rc->initialize(*iter, _path); + + return rc; +} + +SmartPtrCXmlElement CXmlElement::findOptionalChild(const std::string& name) const { + CAF_CM_FUNCNAME_VALIDATE("findOptionalChild"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(name); + + SmartPtrCXmlElement rc; + const MarkupParser::ChildIterator iter = MarkupParser::findChild(_element, name); + if (iter != _element->children.end()) { + rc.CreateInstance(); + rc->initialize(*iter, _path); + } + + return rc; +} + +CXmlElement::SmartPtrCAttributeCollection CXmlElement::getAllAttributes() const { + CAF_CM_FUNCNAME_VALIDATE("getAllAttributes"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + SmartPtrCAttributeCollection rc; + rc.CreateInstance(); + + for (TConstIterator attribute(_element->attributes); + attribute; attribute++) { + rc->insert(std::make_pair((*attribute).first, (*attribute).second)); + } + + return rc; +} + +CXmlElement::SmartPtrCElementCollection CXmlElement::getAllChildren() const { + CAF_CM_FUNCNAME_VALIDATE("getAllChildren"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + SmartPtrCElementCollection rc; + rc.CreateInstance(); + + SmartPtrCXmlElement xmlElement; + for (TConstIterator child(_element->children); child; + child++) { + xmlElement.CreateInstance(); + xmlElement->initialize(*child, _path); + rc->insert(std::make_pair((*child)->name, xmlElement)); + } + + return rc; +} + +CXmlElement::SmartPtrCOrderedElementCollection CXmlElement::getAllChildrenInOrder() const { + CAF_CM_FUNCNAME_VALIDATE("getAllChildrenInOrder"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + SmartPtrCOrderedElementCollection rc; + rc.CreateInstance(); + + SmartPtrCXmlElement xmlElement; + for (TConstIterator child(_element->children); child; + child++) { + xmlElement.CreateInstance(); + xmlElement->initialize(*child, _path); + rc->push_back(xmlElement); + } + + return rc; +} + +CXmlElement::SmartPtrCElementCollection CXmlElement::findRequiredChildren( + const std::string& name) const { + CAF_CM_FUNCNAME("findRequiredChildren"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(name); + + SmartPtrCElementCollection rc = findOptionalChildren(name); + + if (rc.IsNull() || rc->empty()) { + CAF_CM_EXCEPTIONEX_VA1(NoSuchElementException, ERROR_NOT_FOUND, + "Children not found: %s", name.c_str()); + } + + return rc; +} + +CXmlElement::SmartPtrCElementCollection CXmlElement::findOptionalChildren( + const std::string& name) const { + CAF_CM_FUNCNAME_VALIDATE("findOptionalChildren"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(name); + + SmartPtrCElementCollection rc; + rc.CreateInstance(); + + SmartPtrCXmlElement xmlElement; + for (TConstIterator child(_element->children); child; + child++) { + if (((*child)->name).compare(name) == 0) { + xmlElement.CreateInstance(); + xmlElement->initialize(*child, _path); + rc->insert(std::make_pair((*child)->name, xmlElement)); + } + } + + return rc; +} + +std::string CXmlElement::getName() const { + CAF_CM_FUNCNAME_VALIDATE("getName"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _element->name; +} + +std::string CXmlElement::getValue() const { + CAF_CM_FUNCNAME_VALIDATE("getValue"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _element->value; +} + +std::string CXmlElement::getCDataValue() const { + CAF_CM_FUNCNAME_VALIDATE("getCDataValue"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + std::string rc = _element->value; + if (! rc.empty()) { + const std::string::size_type cdataBegPos = rc.find(CDATA_BEG); + const std::string::size_type cdataEndPos = rc.find(CDATA_END); + if ((0 == cdataBegPos) && (std::string::npos != cdataEndPos)) { + rc = rc.substr(0, cdataEndPos); + rc = rc.substr(cdataBegPos + CDATA_BEG.length()); + } + } + + return rc; +} + +std::string CXmlElement::getPath() const { + CAF_CM_FUNCNAME_VALIDATE("getPath"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _path; +} + +void CXmlElement::addAttribute(const std::string& name, const std::string& value) { + CAF_CM_FUNCNAME("addAttribute"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(name); + CAF_CM_VALIDATE_STRING(value); + + if (!_element->attributes.empty()) { + MarkupParser::AttributeIterator iter = MarkupParser::findAttribute( + _element->attributes, name); + CAF_CM_VALIDATE_COND_VA3(iter == _element->attributes.end(), + "element (%s) already contains attribute (%s) in %s", _element->name.c_str(), + name.c_str(), _path.c_str()); + } + + _element->attributes.push_back(std::make_pair(name, value)); +} + +void CXmlElement::removeAttribute(const std::string& name) { + + CAF_CM_FUNCNAME_VALIDATE("removeAttribute"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(name); + + if (!_element->attributes.empty()) { + MarkupParser::AttributeIterator iter = MarkupParser::findAttribute( + _element->attributes, name); + if (iter != _element->attributes.end()) { + _element->attributes.erase(iter); + } + } +} + +void CXmlElement::setAttribute(const std::string& name, const std::string& value) { + CAF_CM_FUNCNAME("setAttribute"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(name); + CAF_CM_VALIDATE_STRING(value); + + CAF_CM_VALIDATE_COND_VA3(!_element->attributes.empty(), + "element (%s) does not contain any attributes (%s) in %s", + _element->name.c_str(), name.c_str(), _path.c_str()); + + MarkupParser::AttributeIterator iter = MarkupParser::findAttribute( + _element->attributes, name); + CAF_CM_VALIDATE_COND_VA3(iter != _element->attributes.end(), + "element (%s) does not contain required attribute (%s) in %s", + _element->name.c_str(), name.c_str(), _path.c_str()); + + iter->second = value; +} + +SmartPtrCXmlElement CXmlElement::createAndAddElement(const std::string& name) { + CAF_CM_FUNCNAME_VALIDATE("createAndAddElement"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(name); + + MarkupParser::SmartPtrElement element; + element.CreateInstance(); + element->name = name; + + SmartPtrCXmlElement rc; + rc.CreateInstance(); + rc->initialize(element, _path); + + _element->children.push_back(element); + + return rc; +} + +void CXmlElement::addChild(const SmartPtrCXmlElement& xmlElement) { + CAF_CM_FUNCNAME_VALIDATE("addChild"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(xmlElement); + + _element->children.push_back(xmlElement->getInternalElement()); +} + +void CXmlElement::removeChild(const std::string& name) { + CAF_CM_FUNCNAME_VALIDATE("removeChild"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(name); + + const MarkupParser::ChildIterator iter = MarkupParser::findChild(_element, name); + if (iter != _element->children.end()) { + _element->children.erase(iter); + } +} + +void CXmlElement::setValue(const std::string& value) { + CAF_CM_FUNCNAME_VALIDATE("setValue"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(value); + + _element->value = value; +} + +void CXmlElement::setCDataValue(const std::string& value) { + CAF_CM_FUNCNAME_VALIDATE("setCDataValue"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(value); + + if (std::string::npos == value.find(CDATA_BEG)) { + _element->value = CDATA_BEG + value + CDATA_END; + } else { + _element->value = value; + } +} + +void CXmlElement::appendValue(const std::string& value) { + CAF_CM_FUNCNAME_VALIDATE("appendValue"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(value); + + if (_element->value.empty()) { + _element->value = ""; + } + + _element->value += value; +} + +void CXmlElement::saveToFile(const std::string& filename) const { + CAF_CM_FUNCNAME_VALIDATE("saveToFile"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(filename); + + CAF_CM_LOG_INFO_VA1("Saving XML to file \"%s\"", filename.c_str()); + + const std::string xml = saveToString(); + FileSystemUtils::saveTextFile(filename, xml); +} + +std::string CXmlElement::saveToString() const { + CAF_CM_FUNCNAME_VALIDATE("saveToString"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + std::string rc = ""; + saveToString(_element, rc); + + return rc; +} + +std::string CXmlElement::saveToStringRaw() const { + CAF_CM_FUNCNAME_VALIDATE("saveToStringRaw"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + std::string rc; + saveToString(_element, rc); + + return rc; +} + +void CXmlElement::saveToString( + const MarkupParser::SmartPtrElement& element, + std::string& xml) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CXmlElement", "saveToString"); + CAF_CM_VALIDATE_PTR(element); + + xml += "<" + element->name; + for (TConstIterator attribute(element->attributes); + attribute; attribute++) { + xml += " " + attribute->first + "=\"" + attribute->second + "\""; + } + + if (element->value.empty() && element->children.empty()) { + xml += "/>"; + } else { + xml += ">" + element->value; + for (TConstIterator child(element->children); + child; child++) { + saveToString(*child, xml); + } + xml += "name + ">"; + } +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/XmlUtils/CXmlElement.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/XmlUtils/CXmlElement.h new file mode 100644 index 000000000..fd8871bce --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/XmlUtils/CXmlElement.h @@ -0,0 +1,85 @@ +/* + * Author: mdonahue + * Created: Dec 3, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _CXmlElement_h +#define _CXmlElement_h + +namespace Caf { + +CAF_DECLARE_CLASS_AND_SMART_POINTER(CXmlElement); + +class XMLUTILS_LINKAGE CXmlElement { +public: + typedef std::map CAttributeCollection; + typedef std::multimap CElementCollection; + typedef std::deque COrderedElementCollection; + CAF_DECLARE_SMART_POINTER(CAttributeCollection); + CAF_DECLARE_SMART_POINTER(CElementCollection); + CAF_DECLARE_SMART_POINTER(COrderedElementCollection); + +public: + CXmlElement(); + virtual ~CXmlElement(); + +public: + void initialize(const MarkupParser::SmartPtrElement& element, const std::string& path); + MarkupParser::SmartPtrElement getInternalElement(); + +public: // Read operations + + std::string findRequiredAttribute(const std::string& name) const; + std::string findOptionalAttribute(const std::string& name) const; + SmartPtrCXmlElement findRequiredChild(const std::string& name) const; + SmartPtrCXmlElement findOptionalChild(const std::string& name) const; + SmartPtrCElementCollection findRequiredChildren(const std::string& name) const; + SmartPtrCElementCollection findOptionalChildren(const std::string& name) const; + SmartPtrCAttributeCollection getAllAttributes() const; + SmartPtrCElementCollection getAllChildren() const; + SmartPtrCOrderedElementCollection getAllChildrenInOrder() const; + std::string getName() const; + std::string getValue() const; + std::string getCDataValue() const; + std::string getPath() const; + +public: // Write operations + void addAttribute(const std::string& name, const std::string& value); + void removeAttribute(const std::string& name); + void setAttribute(const std::string& name, const std::string& value); + SmartPtrCXmlElement createAndAddElement(const std::string& name); + void addChild(const SmartPtrCXmlElement& xmlElement); + void removeChild(const std::string& name); + void setValue(const std::string& value); + void setCDataValue(const std::string& value); + void appendValue(const std::string& value); + void saveToFile(const std::string& filename) const; + std::string saveToString() const; + std::string saveToStringRaw() const; + +private: + static const std::string CDATA_BEG; + static const std::string CDATA_END; + +private: + bool _isInitialized; + mutable MarkupParser::SmartPtrElement _element; + std::string _path; + +private: + static void saveToString(const MarkupParser::SmartPtrElement& element, std::string& xml); + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CXmlElement); +}; + +CAF_DECLARE_SMART_POINTER(CXmlElement); + +} + +#endif /* _CXmlElement_h */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/XmlUtils/CXmlUtils.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/XmlUtils/CXmlUtils.cpp new file mode 100644 index 000000000..77cb1f8aa --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/XmlUtils/CXmlUtils.cpp @@ -0,0 +1,132 @@ +/* + * Author: bwilliams + * Created: Jan 21, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CXmlUtils.h" + +using namespace Caf; + +SmartPtrCXmlElement CXmlUtils::parseFile( + const std::string& path, + const std::string& rootName) { + CAF_CM_STATIC_FUNC("CXmlUtils", "parseFile"); + CAF_CM_VALIDATE_STRING(path); + // rootName is optional + + if (!FileSystemUtils::doesFileExist(path)) { + CAF_CM_EXCEPTION_VA1(ERROR_FILE_NOT_FOUND, "File not found: %s", path.c_str()); + } + + const MarkupParser::SmartPtrElement element = MarkupParser::parseFile(path); + CAF_CM_VALIDATE_SMARTPTR(element); + CAF_CM_VALIDATE_STRING(element->name); + if (!rootName.empty()) { + CAF_CM_VALIDATE_COND_VA3(element->name == rootName, + "root not valid (\"%s\" != \"%s\") in %s", rootName.c_str(), + element->name.c_str(), path.c_str()); + } + + SmartPtrCXmlElement xmlElement; + xmlElement.CreateInstance(); + xmlElement->initialize(element, path); + + return xmlElement; +} + +SmartPtrCXmlElement CXmlUtils::parseString( + const std::string& xml, + const std::string& rootName) { + CAF_CM_STATIC_FUNC("CXmlUtils", "parseString"); + CAF_CM_VALIDATE_STRING(xml); + // rootName is optional + + const std::string path = "fromString"; + + const MarkupParser::SmartPtrElement element = MarkupParser::parseString(xml); + CAF_CM_VALIDATE_SMARTPTR(element); + CAF_CM_VALIDATE_STRING(element->name); + if (!rootName.empty()) { + CAF_CM_VALIDATE_COND_VA3(element->name == rootName, + "root not valid (\"%s\" != \"%s\") in %s", rootName.c_str(), + element->name.c_str(), path.c_str()); + } + + SmartPtrCXmlElement xmlElement; + xmlElement.CreateInstance(); + xmlElement->initialize(element, path); + + return xmlElement; +} + +SmartPtrCXmlElement CXmlUtils::createRootElement( + const std::string& rootName, + const std::string& rootNamespace) { + CAF_CM_STATIC_FUNC_VALIDATE("CXmlUtils", "createRootElement"); + CAF_CM_VALIDATE_STRING(rootName); + CAF_CM_VALIDATE_STRING(rootNamespace); + + return createRootElement(rootName, rootNamespace, std::string()); +} + +SmartPtrCXmlElement CXmlUtils::createRootElement( + const std::string& rootName, + const std::string& rootNamespace, + const std::string& schemaLocation) { + CAF_CM_STATIC_FUNC_VALIDATE("CXmlUtils", "createRootElement"); + CAF_CM_VALIDATE_STRING(rootName); + CAF_CM_VALIDATE_STRING(rootNamespace); + // schemaLocation is optional + + MarkupParser::SmartPtrElement element; + element.CreateInstance(); + + SmartPtrCXmlElement xmlElement; + xmlElement.CreateInstance(); + xmlElement->initialize(element, "createRootElement"); + xmlElement->addAttribute("xmlns:caf", rootNamespace); + + if (!schemaLocation.empty()) { + const std::string fullSchemaLocation = rootNamespace + " " + schemaLocation; + xmlElement->addAttribute("xmlns:xsi", + "http://www.w3.org/2001/XMLSchema-instance"); + xmlElement->addAttribute("xsi:schemaLocation", fullSchemaLocation); + } + + element->name = "caf:" + rootName; + + return xmlElement; +} + +std::string CXmlUtils::escape(const std::string& text) { + CAF_CM_STATIC_FUNC("CXmlUtils", "escape"); + + std::string rc; + gchar* gRc = NULL; + + try { + CAF_CM_VALIDATE_STRING(text); + + gRc = g_markup_escape_text(text.c_str(), -1); + if (gRc) { + rc = gRc; + g_free(gRc); + gRc = NULL; + } + } + CAF_CM_CATCH_DEFAULT + + try { + if (gRc) { + g_free(gRc); + } + } + CAF_CM_CATCH_DEFAULT + CAF_CM_THROWEXCEPTION; + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/XmlUtils/CXmlUtils.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/XmlUtils/CXmlUtils.h new file mode 100644 index 000000000..98ecc647a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/XmlUtils/CXmlUtils.h @@ -0,0 +1,44 @@ +/* + * Author: bwilliams + * Created: Jan 21, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CXmlUtils_H_ +#define CXmlUtils_H_ + +#include "CXmlElement.h" + +namespace Caf { + +class XMLUTILS_LINKAGE CXmlUtils { +public: + static SmartPtrCXmlElement parseFile( + const std::string& path, + const std::string& rootName); + + static SmartPtrCXmlElement parseString( + const std::string& xml, + const std::string& rootName); + + static SmartPtrCXmlElement createRootElement( + const std::string& rootName, + const std::string& rootNamespace); + + static SmartPtrCXmlElement createRootElement( + const std::string& rootName, + const std::string& rootNamespace, + const std::string& schemaLocation); + + static std::string escape( + const std::string& text); + +private: + CAF_CM_DECLARE_NOCREATE(CXmlUtils); +}; + +} + +#endif /* CXmlUtils_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/XmlUtils/XmlUtilsLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/XmlUtils/XmlUtilsLink.h new file mode 100644 index 000000000..62b114ce7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/XmlUtils/XmlUtilsLink.h @@ -0,0 +1,27 @@ +/* + * Author: mdonahue + * Created: Sep 28, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef XMLUTILSLINK_H_ +#define XMLUTILSLINK_H_ + +#ifndef XMLUTILS_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define XMLUTILS_LINKAGE __declspec(dllexport) + #else + #define XMLUTILS_LINKAGE __declspec(dllimport) + #endif + #else + #define XMLUTILS_LINKAGE + #endif +#endif + +#include "CXmlElement.h" +#include "CXmlUtils.h" + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/XmlUtils/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/XmlUtils/stdafx.h new file mode 100644 index 000000000..979e03759 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/XmlUtils/stdafx.h @@ -0,0 +1,28 @@ +/* + * Author: mdonahue + * Created: Sep 28, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define XMLUTILS_LINKAGE __declspec(dllexport) + #define COMMONAGGREGATOR_LINKAGE __declspec(dllexport) +#else + #define XMLUTILS_LINKAGE + #define COMMONAGGREGATOR_LINKAGE +#endif + +#include +#include "../../Globals/CommonGlobalsLink.h" +#include "../../Exception/ExceptionLink.h" +#include "../../Logging/LoggingLink.h" +#include "../../Collections/Iterators/IteratorsInc.h" +#include "../../Common/CFileSystemUtils.h" +#include "../MarkupParser/MarkupParserLink.h" + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/stdafx.h new file mode 100644 index 000000000..db569557d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/stdafx.h @@ -0,0 +1,18 @@ +/* + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef stdafx_h_ +#define stdafx_h_ + +#ifdef WIN32 + #define BASEPLATFORM_LINKAGE __declspec(dllexport) +#else + #define BASEPLATFORM_LINKAGE +#endif + +#include "../../include/BaseDefines.h" +#include "BasePlatformInc.h" + +#endif // #ifndef stdafx_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Makefile.am b/open-vm-tools/common-agent/Cpp/Framework/Makefile.am new file mode 100644 index 000000000..136893aac --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Makefile.am @@ -0,0 +1,321 @@ +################################################################################ +### Copyright (C) 2015 VMware, Inc. All rights reserved. +### +### This program is free software; you can redistribute it and/or modify +### it under the terms of version 2 of the GNU General Public License as +### published by the Free Software Foundation. +### +### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +################################################################################ + +AUTOMAKE_OPTIONS = subdir-objects +subsysdir = @CAF_SUBSYS_DIR@ +subsys_LTLIBRARIES = +caflibdir = @CAF_PME_LIB_DIR@ +caflib_LTLIBRARIES = +caflib_LTLIBRARIES += libFramework.la + +libFramework_la_SOURCES= +libFramework_la_SOURCES += Framework/src/BasePlatform.cpp +libFramework_la_SOURCES += Framework/src/PlatformIID.cpp +libFramework_la_SOURCES += Framework/src/PlatformStringFunc.cpp +libFramework_la_SOURCES += Framework/src/Globals/CafContracts.cpp +libFramework_la_SOURCES += Framework/src/Globals/ClassMacroStrings.cpp +libFramework_la_SOURCES += Framework/src/Globals/CommonDefines.cpp +libFramework_la_SOURCES += Framework/src/Globals/Integration.cpp +libFramework_la_SOURCES += Framework/src/Logging/CLogger.cpp +libFramework_la_SOURCES += Framework/src/Exception/CBacktraceUtils.cpp +libFramework_la_SOURCES += Framework/src/Exception/CCafException.cpp +libFramework_la_SOURCES += Framework/src/Exception/CCafExceptionEx.cpp +libFramework_la_SOURCES += Framework/src/Exception/CValidate.cpp +libFramework_la_SOURCES += Framework/src/SubSystemBase/CAutoMutexLockUnlockRaw.cpp +libFramework_la_SOURCES += Framework/src/SubSystemBase/CEcmDllManager.cpp +libFramework_la_SOURCES += Framework/src/SubSystemBase/CEcmSubSystem.cpp +libFramework_la_SOURCES += Framework/src/SubSystemBase/CEcmSubSystemModule.cpp +libFramework_la_SOURCES += Framework/src/SubSystemBase/CEcmSubSystemRegistry.cpp +libFramework_la_SOURCES += Framework/src/SubSystemBase/EcmSubSystemBase.cpp +libFramework_la_SOURCES += Framework/src/Xml/MarkupParser/CMarkupParser.cpp +libFramework_la_SOURCES += Framework/src/Xml/XmlUtils/CXmlElement.cpp +libFramework_la_SOURCES += Framework/src/Xml/XmlUtils/CXmlUtils.cpp +libFramework_la_SOURCES += Framework/src/Common/AppConfigUtils.cpp +libFramework_la_SOURCES += Framework/src/Common/CafInitialize.cpp +libFramework_la_SOURCES += Framework/src/Common/CAppConfig.cpp +libFramework_la_SOURCES += Framework/src/Common/CApplicationContext.cpp +libFramework_la_SOURCES += Framework/src/Common/CAutoCondition.cpp +libFramework_la_SOURCES += Framework/src/Common/CAutoFileUnlock.cpp +libFramework_la_SOURCES += Framework/src/Common/CAutoMutex.cpp +libFramework_la_SOURCES += Framework/src/Common/CAutoMutexLockUnlock.cpp +libFramework_la_SOURCES += Framework/src/Common/CAutoMutexUnlockLock.cpp +libFramework_la_SOURCES += Framework/src/Common/CAutoRecMutex.cpp +libFramework_la_SOURCES += Framework/src/Common/CCafRegex.cpp +libFramework_la_SOURCES += Framework/src/Common/CCmdLineOptions.cpp +libFramework_la_SOURCES += Framework/src/Common/CConfigParamsChain.cpp +libFramework_la_SOURCES += Framework/src/Common/CConfigParams.cpp +libFramework_la_SOURCES += Framework/src/Common/CDaemonUtils.cpp +libFramework_la_SOURCES += Framework/src/Common/CDateTimeUtils.cpp +libFramework_la_SOURCES += Framework/src/Common/CEnvironmentUtils.cpp +libFramework_la_SOURCES += Framework/src/Common/CFileLock.cpp +libFramework_la_SOURCES += Framework/src/Common/CFileSystemUtils.cpp +libFramework_la_SOURCES += Framework/src/Common/CHexCodec.cpp +libFramework_la_SOURCES += Framework/src/Common/CIniFile.cpp +libFramework_la_SOURCES += Framework/src/Common/CLoggingSetter.cpp +libFramework_la_SOURCES += Framework/src/Common/CLoggingUtils.cpp +libFramework_la_SOURCES += Framework/src/Common/CManagedThreadPool.cpp +libFramework_la_SOURCES += Framework/src/Common/CPersistenceUtils.cpp +libFramework_la_SOURCES += Framework/src/Common/CProcessUtils.cpp +libFramework_la_SOURCES += Framework/src/Common/CStringUtils.cpp +libFramework_la_SOURCES += Framework/src/Common/CThreadPool.cpp +libFramework_la_SOURCES += Framework/src/Common/CThreadSignal.cpp +libFramework_la_SOURCES += Framework/src/Common/CThreadUtils.cpp +libFramework_la_SOURCES += Framework/src/Common/CTimeUnit.cpp +libFramework_la_SOURCES += Framework/src/Common/CVariant.cpp +libFramework_la_SOURCES += Framework/src/Common/UriUtils.cpp +libFramework_la_SOURCES += Framework/src/Integration/Core/CAbstractMessageChannel.cpp +libFramework_la_SOURCES += Framework/src/Integration/Core/CAbstractMessageRouter.cpp +libFramework_la_SOURCES += Framework/src/Integration/Core/CAbstractPollableChannel.cpp +libFramework_la_SOURCES += Framework/src/Integration/Core/CBroadcastingDispatcher.cpp +libFramework_la_SOURCES += Framework/src/Integration/Core/CChannelInterceptorAdapter.cpp +libFramework_la_SOURCES += Framework/src/Integration/Core/CChannelResolver.cpp +libFramework_la_SOURCES += Framework/src/Integration/Core/CDocument.cpp +libFramework_la_SOURCES += Framework/src/Integration/Core/CErrorHandler.cpp +libFramework_la_SOURCES += Framework/src/Integration/Core/CExpressionHandler.cpp +libFramework_la_SOURCES += Framework/src/Integration/Core/CIntegrationAppContext.cpp +libFramework_la_SOURCES += Framework/src/Integration/Core/CIntException.cpp +libFramework_la_SOURCES += Framework/src/Integration/Core/CIntMessage.cpp +libFramework_la_SOURCES += Framework/src/Integration/Core/CIntMessageHeaders.cpp +libFramework_la_SOURCES += Framework/src/Integration/Core/CMessageHandler.cpp +libFramework_la_SOURCES += Framework/src/Integration/Core/CMessageHeaderUtils.cpp +libFramework_la_SOURCES += Framework/src/Integration/Core/CMessagingTemplate.cpp +libFramework_la_SOURCES += Framework/src/Integration/Core/CMessagingTemplateHandler.cpp +libFramework_la_SOURCES += Framework/src/Integration/Core/CSimpleAsyncTaskExecutor.cpp +libFramework_la_SOURCES += Framework/src/Integration/Core/CSimpleAsyncTaskExecutorState.cpp +libFramework_la_SOURCES += Framework/src/Integration/Core/CSourcePollingChannelAdapter.cpp +libFramework_la_SOURCES += Framework/src/Integration/Core/CUnicastingDispatcher.cpp +libFramework_la_SOURCES += Framework/src/Integration/Core/FileHeaders.cpp +libFramework_la_SOURCES += Framework/src/Integration/Core/MessageHeaders.cpp +libFramework_la_SOURCES += Framework/src/Integration/Caf/CBeanPropertiesHelper.cpp +libFramework_la_SOURCES += Framework/src/Integration/Caf/CCafMessageCreator.cpp +libFramework_la_SOURCES += Framework/src/Integration/Caf/CCafMessageHeaders.cpp +libFramework_la_SOURCES += Framework/src/Integration/Caf/CCafMessageHeadersWriter.cpp +libFramework_la_SOURCES += Framework/src/Integration/Caf/CCafMessagePayload.cpp +libFramework_la_SOURCES += Framework/src/Integration/Caf/CCafMessagePayloadParser.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocUtils/AttachmentUtils.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocUtils/DefnObjectConverter.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocUtils/DocXmlUtils.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocUtils/EnumConvertersXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocUtils/ParameterUtils.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/AddInCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/AddInsXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/AttachmentCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/AttachmentNameCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/AttachmentXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/AuthnAuthzCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/AuthnAuthzXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/ClassFiltersXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/ClassSpecifierXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/FullyQualifiedClassGroupXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/LoggingLevelCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/LoggingLevelElemXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/OperationXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/ParameterCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/PropertyCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/PropertyXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/ProtocolCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/ProtocolXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/RequestConfigXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/RequestHeaderXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/RequestInstanceParameterXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/RequestParameterXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/RequestXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/StatisticsXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/ActionClassInstanceCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/ActionClassInstanceXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/ActionClassXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/ClassCardinalityXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/ClassFieldXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/ClassIdentifierXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/ClassInstancePropertyXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/ClassPropertyXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/CmdlMetadataXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/CmdlUnionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/CollectMethodXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/DataClassInstanceCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/DataClassInstanceXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/DataClassPropertyXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/DataClassSubInstanceXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/DataClassXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/InstanceOperationCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/InstanceOperationXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/InstanceParameterXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/JoinTypeXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/LogicalRelationshipXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/MethodParameterXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/MethodXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/PhysicalRelationshipXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/RelationshipXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/MgmtTypesXml/MgmtBatchXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/MgmtTypesXml/MgmtCollectInstancesCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/MgmtTypesXml/MgmtCollectInstancesXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/MgmtTypesXml/MgmtCollectSchemaXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/MgmtTypesXml/MgmtInvokeOperationCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/MgmtTypesXml/MgmtInvokeOperationXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/DiagTypesXml/DiagBatchXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/DiagTypesXml/DiagCollectInstancesXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/DiagTypesXml/DiagDeleteValueCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/DiagTypesXml/DiagDeleteValueXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/DiagTypesXml/DiagSetValueCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/DiagTypesXml/DiagSetValueXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderRequestXml/ProviderBatchXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderRequestXml/ProviderCollectInstancesCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderRequestXml/ProviderCollectInstancesXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderRequestXml/ProviderCollectSchemaRequestXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderRequestXml/ProviderInvokeOperationCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderRequestXml/ProviderInvokeOperationXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestConfigXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestHeaderXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestXmlRoots.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderResultsXml/CdifXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderResultsXml/DefinitionObjectCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderResultsXml/ProviderResultsXmlRoots.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderResultsXml/RequestIdentifierXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderResultsXml/SchemaXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/MgmtRequestXml/MgmtRequestXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/MgmtRequestXml/MgmtRequestXmlRoots.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/DiagRequestXml/DiagRequestXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/DiagRequestXml/DiagRequestXmlRoots.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ResponseXml/ErrorResponseXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ResponseXml/EventKeyCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ResponseXml/EventKeyXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ResponseXml/EventManifestXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ResponseXml/ManifestCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ResponseXml/ManifestXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ResponseXml/ProviderEventResponseXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ResponseXml/ProviderResponseXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ResponseXml/ResponseHeaderXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ResponseXml/ResponseXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ResponseXml/ResponseXmlRoots.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderInfraXml/ClassCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderInfraXml/ProviderInfraXmlRoots.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderInfraXml/ProviderRegXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderInfraXml/SchemaSummaryXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXmlRoots.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/PersistenceXml/AmqpBrokerCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/PersistenceXml/AmqpBrokerXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/PersistenceXml/CertCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/PersistenceXml/CertPathCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/PersistenceXml/LocalSecurityXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/PersistenceXml/PersistenceProtocolXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/PersistenceXml/PersistenceXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/PersistenceXml/PersistenceXmlRoots.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/PersistenceXml/RemoteSecurityCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/PersistenceXml/RemoteSecurityXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafInstallRequestXml/CafInstallRequestXmlRoots.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafInstallRequestXml/FullPackageElemXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafInstallRequestXml/GetInventoryJobXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafInstallRequestXml/InstallBatchXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafInstallRequestXml/InstallPackageSpecXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafInstallRequestXml/InstallProviderJobXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafInstallRequestXml/InstallProviderSpecXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafInstallRequestXml/InstallRequestXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafInstallRequestXml/MinPackageElemXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafInstallRequestXml/PackageDefnXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafInstallRequestXml/UninstallProviderJobXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtBatchCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtBatchXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXmlRoots.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/PmeIdCollectionXml.cpp + +libFramework_la_CPPFLAGS = +libFramework_la_CPPFLAGS += @GLIB2_CPPFLAGS@ +libFramework_la_CPPFLAGS += @LOG4CPP_CPPFLAGS@ + +libFramework_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include +libFramework_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include/Contracts +libFramework_la_LIBADD = +libFramework_la_LIBADD += @GLIB2_LIBS@ +libFramework_la_LIBADD += @LOG4CPP_LIBS@ +libFramework_la_LIBADD += -ldl + +libFramework_la_LDFLAGS = -shared + +subsys_LTLIBRARIES += libIntegrationSubsys.la +libIntegrationSubsys_la_LDFLAGS = @CAF_SUBSYS_LDFLAGS@ + +libIntegrationSubsys_la_SOURCES= +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CDirectChannelInstance.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CErrorChannel.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CErrorChannelInstance.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CFileInboundChannelAdapterInstance.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CFileOutboundChannelAdapterInstance.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CFileReadingMessageSource.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CFileToStringTransformerInstance.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CHeaderEnricherTransformerInstance.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CHeaderExpressionInvoker.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CHeaderValueRouterInstance.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CIntegrationObjectFactory.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CLoggingChannelAdapterInstance.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CMessageHandlerChainInstance.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CNullChannel.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CNullChannelInstance.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CObjectFactoryTables.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CPayloadContentRouterInstance.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CPublishSubscribeChannelInstance.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CQueueChannelInstance.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CRecipientListRouterInstance.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CRouterInstance.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CServiceActivatorInstance.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CWireTapInstance.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CXPathHeaderEnricherItem.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CXPathHeaderEnricherTransformerInstance.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/Integration.cpp + +libIntegrationSubsys_la_CPPFLAGS = +libIntegrationSubsys_la_CPPFLAGS += @GLIB2_CPPFLAGS@ +libIntegrationSubsys_la_CPPFLAGS += @LOG4CPP_CPPFLAGS@ + +libIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include +libIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include/Contracts +libIntegrationSubsys_la_LIBADD = +libIntegrationSubsys_la_LIBADD += @GLIB2_LIBS@ +libIntegrationSubsys_la_LIBADD += @LOG4CPP_LIBS@ +libIntegrationSubsys_la_LIBADD += -ldl +libIntegrationSubsys_la_LIBADD += ../Framework/libFramework.la + +libIntegrationSubsys_la_LDFLAGS += -shared + +subsys_LTLIBRARIES += libCafIntegrationSubsys.la +libCafIntegrationSubsys_la_LDFLAGS = @CAF_SUBSYS_LDFLAGS@ + +libCafIntegrationSubsys_la_SOURCES= +libCafIntegrationSubsys_la_SOURCES += Subsystems/CafIntegration/src/CafIntegration.cpp +libCafIntegrationSubsys_la_SOURCES += Subsystems/CafIntegration/src/CEnvelopeToPayloadTransformer.cpp +libCafIntegrationSubsys_la_SOURCES += Subsystems/CafIntegration/src/CEnvelopeToPayloadTransformerInstance.cpp +libCafIntegrationSubsys_la_SOURCES += Subsystems/CafIntegration/src/CErrorToResponseTransformer.cpp +libCafIntegrationSubsys_la_SOURCES += Subsystems/CafIntegration/src/CErrorToResponseTransformerInstance.cpp +libCafIntegrationSubsys_la_SOURCES += Subsystems/CafIntegration/src/CPayloadHeaderEnricher.cpp +libCafIntegrationSubsys_la_SOURCES += Subsystems/CafIntegration/src/CPayloadHeaderEnricherInstance.cpp + +libCafIntegrationSubsys_la_CPPFLAGS = +libCafIntegrationSubsys_la_CPPFLAGS += @GLIB2_CPPFLAGS@ +libCafIntegrationSubsys_la_CPPFLAGS += @LOG4CPP_CPPFLAGS@ + +libCafIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include +libCafIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include/Contracts +libCafIntegrationSubsys_la_LIBADD = +libCafIntegrationSubsys_la_LIBADD += @GLIB2_LIBS@ +libCafIntegrationSubsys_la_LIBADD += @LOG4CPP_LIBS@ +libCafIntegrationSubsys_la_LIBADD += -ldl +libCafIntegrationSubsys_la_LIBADD += ../Framework/libFramework.la + +libCafIntegrationSubsys_la_LDFLAGS += -shared + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CEnvelopeToPayloadTransformer.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CEnvelopeToPayloadTransformer.cpp new file mode 100644 index 000000000..c4bed0ac0 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CEnvelopeToPayloadTransformer.cpp @@ -0,0 +1,66 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CEnvelopeToPayloadTransformer.h" + +using namespace Caf; + +CEnvelopeToPayloadTransformer::CEnvelopeToPayloadTransformer() : + _isInitialized(false), + CAF_CM_INIT("CEnvelopeToPayloadTransformer") { +} + +CEnvelopeToPayloadTransformer::~CEnvelopeToPayloadTransformer() { +} + +void CEnvelopeToPayloadTransformer::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + CAF_CM_VALIDATE_STL_EMPTY(properties); + + _ctorArgs = ctorArgs; + _properties = properties; + + initialize(); +} + +void CEnvelopeToPayloadTransformer::terminateBean() { +} + +void CEnvelopeToPayloadTransformer::initialize() { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _isInitialized = true; +} + +bool CEnvelopeToPayloadTransformer::isResponsible( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("isResponsible"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + return false; +} + +SmartPtrIIntegrationObject CEnvelopeToPayloadTransformer::createObject( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("createObject"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + SmartPtrIIntegrationObject rc; + rc.CreateInstance(_sObjIdEnvelopeToPayloadTransformerInstance); + rc->initialize(_ctorArgs, _properties, configSection); + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CEnvelopeToPayloadTransformer.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CEnvelopeToPayloadTransformer.h new file mode 100644 index 000000000..b220423f9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CEnvelopeToPayloadTransformer.h @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CEnvelopeToPayloadTransformer_h_ +#define CEnvelopeToPayloadTransformer_h_ + +namespace Caf { + +/// Sends responses/errors back to the client. +class CEnvelopeToPayloadTransformer : + public TCafSubSystemObjectRoot, + public IBean, + public IIntegrationComponent { +public: + CEnvelopeToPayloadTransformer(); + virtual ~CEnvelopeToPayloadTransformer(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdEnvelopeToPayloadTransformer) + + CAF_BEGIN_INTERFACE_MAP(CEnvelopeToPayloadTransformer) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IIntegrationComponent) + CAF_END_INTERFACE_MAP() + +public: + virtual void initialize(); + +public: // IBean + virtual void initializeBean(const IBean::Cargs& ctorArgs, const IBean::Cprops& properties); + + virtual void terminateBean(); + +public: // IIntegrationComponent + bool isResponsible( + const SmartPtrIDocument& configSection) const; + + SmartPtrIIntegrationObject createObject( + const SmartPtrIDocument& configSection) const; + +private: + bool _isInitialized; + IBean::Cargs _ctorArgs; + IBean::Cprops _properties; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CEnvelopeToPayloadTransformer); +}; + +} + +#endif // #ifndef CEnvelopeToPayloadTransformer_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CEnvelopeToPayloadTransformerInstance.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CEnvelopeToPayloadTransformerInstance.cpp new file mode 100644 index 000000000..8619efc5a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CEnvelopeToPayloadTransformerInstance.cpp @@ -0,0 +1,128 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CEnvelopeToPayloadTransformerInstance.h" + +using namespace Caf; + +CEnvelopeToPayloadTransformerInstance::CEnvelopeToPayloadTransformerInstance() : + _isInitialized(false), + CAF_CM_INIT("CEnvelopeToPayloadTransformerInstance") { +} + +CEnvelopeToPayloadTransformerInstance::~CEnvelopeToPayloadTransformerInstance() { +} + +void CEnvelopeToPayloadTransformerInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + _isInitialized = true; +} + +std::string CEnvelopeToPayloadTransformerInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _id; +} + +void CEnvelopeToPayloadTransformerInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); +} + +SmartPtrIIntMessage CEnvelopeToPayloadTransformerInstance::transformMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("transformMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const SmartPtrCPayloadEnvelopeDoc payloadEnvelope = + CCafMessagePayloadParser::getPayloadEnvelope(message->getPayload()); + + const std::deque attachmentCollection = + payloadEnvelope->getAttachmentCollection()->getAttachment(); + + const SmartPtrCDynamicByteArray payload= findPayload(attachmentCollection); + const std::deque attachmentCollectionRm = + removePayload(attachmentCollection); + + return CCafMessageCreator::create( + payload, attachmentCollectionRm, message->getHeaders()); +} + +SmartPtrIIntMessage CEnvelopeToPayloadTransformerInstance::processErrorMessage( + const SmartPtrIIntMessage& message) { + return transformMessage(message); +} + +SmartPtrCDynamicByteArray CEnvelopeToPayloadTransformerInstance::findPayload( + const std::deque& attachmentCollection) const { + CAF_CM_FUNCNAME("findPayload"); + CAF_CM_VALIDATE_STL(attachmentCollection); + + std::string payloadPath; + for (TConstIterator > attachmentIter(attachmentCollection); + attachmentIter; attachmentIter++) { + const SmartPtrCAttachmentDoc attachment = *attachmentIter; + + if (attachment->getName().compare("_EnvelopePayload_") == 0) { + UriUtils::SUriRecord sourceUriRecord; + UriUtils::parseUriString(attachment->getUri(), sourceUriRecord); + + if (sourceUriRecord.protocol.compare("file") != 0) { + CAF_CM_EXCEPTION_VA1(ERROR_INVALID_STATE, + "Payload attachment must be a file - uri: %s", + attachment->getUri().c_str()); + } + + UriUtils::SFileUriRecord sourceFileUriRecord; + UriUtils::parseFileAddress(sourceUriRecord.address, sourceFileUriRecord); + payloadPath = sourceFileUriRecord.path; + + if (!FileSystemUtils::doesFileExist(payloadPath)) { + CAF_CM_EXCEPTION_VA1(ERROR_FILE_NOT_FOUND, + "File not found - %s", payloadPath.c_str()); + } + } + } + + if (payloadPath.empty()) { + CAF_CM_EXCEPTION_VA0(ERROR_NOT_FOUND, "Payload attachment not found"); + } + + return FileSystemUtils::loadByteFile(payloadPath); +} + +std::deque CEnvelopeToPayloadTransformerInstance::removePayload( + const std::deque& attachmentCollection) const { + CAF_CM_FUNCNAME_VALIDATE("removePayload"); + CAF_CM_VALIDATE_STL(attachmentCollection); + + std::deque rc; + for (TConstIterator > attachmentIter(attachmentCollection); + attachmentIter; attachmentIter++) { + const SmartPtrCAttachmentDoc attachment = *attachmentIter; + + if (attachment->getName().compare("_EnvelopePayload_") != 0) { + rc.push_back(attachment); + } + } + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CEnvelopeToPayloadTransformerInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CEnvelopeToPayloadTransformerInstance.h new file mode 100644 index 000000000..161fd569d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CEnvelopeToPayloadTransformerInstance.h @@ -0,0 +1,79 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CEnvelopeToPayloadTransformerInstance_h_ +#define CEnvelopeToPayloadTransformerInstance_h_ + +namespace Caf { + +class CEnvelopeToPayloadTransformerInstance : + public TCafSubSystemObjectRoot, + public IIntegrationObject, + public IIntegrationComponentInstance, + public ITransformer, + public IErrorProcessor { +public: + struct SExpandedFileAlias { + std::string _filePath; + std::string _encoding; + }; + CAF_DECLARE_SMART_POINTER(SExpandedFileAlias); + +public: + CEnvelopeToPayloadTransformerInstance(); + virtual ~CEnvelopeToPayloadTransformerInstance(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdEnvelopeToPayloadTransformerInstance) + + CAF_BEGIN_INTERFACE_MAP(CEnvelopeToPayloadTransformerInstance) + CAF_INTERFACE_ENTRY(IIntegrationObject) + CAF_INTERFACE_ENTRY(IIntegrationComponentInstance) + CAF_INTERFACE_ENTRY(ITransformer) + CAF_INTERFACE_ENTRY(IErrorProcessor) + CAF_END_INTERFACE_MAP() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ITransformer + SmartPtrIIntMessage transformMessage( + const SmartPtrIIntMessage& message); + +public: // IErrorProcessor + SmartPtrIIntMessage processErrorMessage( + const SmartPtrIIntMessage& message); + +private: + SmartPtrCDynamicByteArray findPayload( + const std::deque& attachmentCollection) const; + + std::deque removePayload( + const std::deque& attachmentCollection) const; + +private: + bool _isInitialized; + std::string _id; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CEnvelopeToPayloadTransformerInstance); +}; + +} + +#endif // #ifndef CEnvelopeToPayloadTransformerInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CErrorToResponseTransformer.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CErrorToResponseTransformer.cpp new file mode 100644 index 000000000..b75c7e008 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CErrorToResponseTransformer.cpp @@ -0,0 +1,82 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CErrorToResponseTransformer.h" + +using namespace Caf; + +CErrorToResponseTransformer::CErrorToResponseTransformer() : + _isInitialized(false), + CAF_CM_INIT("CErrorToResponseTransformer") { +} + +CErrorToResponseTransformer::~CErrorToResponseTransformer() { +} + +void CErrorToResponseTransformer::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + CAF_CM_VALIDATE_STL_EMPTY(properties); + _ctorArgs = ctorArgs; + _properties = properties; + initialize(); + } + CAF_CM_EXIT; +} + +void CErrorToResponseTransformer::terminateBean() { +} + +void CErrorToResponseTransformer::initialize() { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _isInitialized = true; + } + CAF_CM_EXIT; +} + +bool CErrorToResponseTransformer::isResponsible( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("isResponsible"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + } + CAF_CM_EXIT; + + return false; +} + +SmartPtrIIntegrationObject CErrorToResponseTransformer::createObject( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("createObject"); + + SmartPtrIIntegrationObject rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + rc.CreateInstance(_sObjIdErrorToResponseTransformerInstance); + rc->initialize(_ctorArgs, _properties, configSection); + } + CAF_CM_EXIT; + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CErrorToResponseTransformer.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CErrorToResponseTransformer.h new file mode 100644 index 000000000..84aea7e7c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CErrorToResponseTransformer.h @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CErrorToResponseTransformer_h_ +#define CErrorToResponseTransformer_h_ + +namespace Caf { + +/// Sends responses/errors back to the client. +class CErrorToResponseTransformer : + public TCafSubSystemObjectRoot, + public IBean, + public IIntegrationComponent { +public: + CErrorToResponseTransformer(); + virtual ~CErrorToResponseTransformer(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdErrorToResponseTransformer) + + CAF_BEGIN_INTERFACE_MAP(CErrorToResponseTransformer) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IIntegrationComponent) + CAF_END_INTERFACE_MAP() + +public: + virtual void initialize(); + +public: // IBean + virtual void initializeBean(const IBean::Cargs& ctorArgs, const IBean::Cprops& properties); + + virtual void terminateBean(); + +public: // IIntegrationComponent + bool isResponsible( + const SmartPtrIDocument& configSection) const; + + SmartPtrIIntegrationObject createObject( + const SmartPtrIDocument& configSection) const; + +private: + bool _isInitialized; + IBean::Cargs _ctorArgs; + IBean::Cprops _properties; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CErrorToResponseTransformer); +}; + +} + +#endif // #ifndef CErrorToResponseTransformer_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CErrorToResponseTransformerInstance.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CErrorToResponseTransformerInstance.cpp new file mode 100644 index 000000000..aee35b5e0 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CErrorToResponseTransformerInstance.cpp @@ -0,0 +1,127 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CErrorToResponseTransformerInstance.h" + +using namespace Caf; + +CErrorToResponseTransformerInstance::CErrorToResponseTransformerInstance() : + _isInitialized(false), + CAF_CM_INIT_LOG("CErrorToResponseTransformerInstance") { +} + +CErrorToResponseTransformerInstance::~CErrorToResponseTransformerInstance() { +} + +void CErrorToResponseTransformerInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +std::string CErrorToResponseTransformerInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _id; + } + CAF_CM_EXIT; + + return rc; +} + +void CErrorToResponseTransformerInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + + } + CAF_CM_EXIT; +} + +SmartPtrIIntMessage CErrorToResponseTransformerInstance::processErrorMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME("processErrorMessage"); + + SmartPtrIIntMessage newMessage; + + try { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CAF_CM_LOG_DEBUG_VA1("Called - %s", _id.c_str()); + + const SmartPtrCCafMessageHeaders cafMessageHeaders = + CCafMessageHeaders::create(message->getHeaders()); + + const std::string errorMessage = message->getPayloadStr(); + const UUID clientId = cafMessageHeaders->getClientIdOpt(); + const UUID requestId = cafMessageHeaders->getRequestIdOpt(); + const std::string pmeIdStr = cafMessageHeaders->getPmeIdOpt(); + const UUID sessionId = cafMessageHeaders->getSessionIdOpt(); + + const std::string version = "1.0"; + const std::string createdDateTime = CDateTimeUtils::getCurrentDateTime(); + const uint32 sequenceNumber = 0; + const bool isFinalResponse = true; + + SmartPtrCResponseHeaderDoc responseHeader; + responseHeader.CreateInstance(); + responseHeader->initialize( + version, + createdDateTime, + sequenceNumber, + isFinalResponse, + sessionId); + + SmartPtrCErrorResponseDoc errorResponse; + errorResponse.CreateInstance(); + errorResponse->initialize( + clientId, + requestId, + pmeIdStr, + responseHeader, + errorMessage); + + const std::string randomUuidStr = CStringUtils::createRandomUuid(); + const std::string relFilename = randomUuidStr + "_" + _sErrorResponseFilename; + + newMessage = CCafMessageCreator::createPayloadEnvelope( + errorResponse, relFilename, message->getHeaders()); + + // Writing the error response for debugging purposes + const std::string outputDir = AppConfigUtils::getRequiredString(_sConfigOutputDir); + FileSystemUtils::saveTextFile(outputDir, _sErrorResponseFilename, + newMessage->getPayloadStr()); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + + return newMessage; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CErrorToResponseTransformerInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CErrorToResponseTransformerInstance.h new file mode 100644 index 000000000..8e5d0d9ef --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CErrorToResponseTransformerInstance.h @@ -0,0 +1,60 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CErrorToResponseTransformerInstance_h_ +#define CErrorToResponseTransformerInstance_h_ + +namespace Caf { + +class CErrorToResponseTransformerInstance : + public TCafSubSystemObjectRoot, + public IIntegrationObject, + public IIntegrationComponentInstance, + public IErrorProcessor { +public: + CErrorToResponseTransformerInstance(); + virtual ~CErrorToResponseTransformerInstance(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdErrorToResponseTransformerInstance) + + CAF_BEGIN_INTERFACE_MAP(CErrorToResponseTransformerInstance) + CAF_INTERFACE_ENTRY(IIntegrationObject) + CAF_INTERFACE_ENTRY(IIntegrationComponentInstance) + CAF_INTERFACE_ENTRY(IErrorProcessor) + CAF_END_INTERFACE_MAP() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // IErrorProcessor + SmartPtrIIntMessage processErrorMessage( + const SmartPtrIIntMessage& message); + +private: + bool _isInitialized; + std::string _id; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CErrorToResponseTransformerInstance); +}; + +} + +#endif // #ifndef CErrorToResponseTransformerInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CPayloadHeaderEnricher.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CPayloadHeaderEnricher.cpp new file mode 100644 index 000000000..df7e40894 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CPayloadHeaderEnricher.cpp @@ -0,0 +1,83 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CPayloadHeaderEnricher.h" + +using namespace Caf; + +CPayloadHeaderEnricher::CPayloadHeaderEnricher() : + _isInitialized(false), + CAF_CM_INIT("CPayloadHeaderEnricher") { +} + +CPayloadHeaderEnricher::~CPayloadHeaderEnricher() { +} + +void CPayloadHeaderEnricher::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + + _ctorArgs = ctorArgs; + _properties = properties; + + initialize(); + } + CAF_CM_EXIT; +} + +void CPayloadHeaderEnricher::terminateBean() { +} + +void CPayloadHeaderEnricher::initialize() { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _isInitialized = true; + } + CAF_CM_EXIT; +} + +bool CPayloadHeaderEnricher::isResponsible( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("isResponsible"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + } + CAF_CM_EXIT; + + return false; +} + +SmartPtrIIntegrationObject CPayloadHeaderEnricher::createObject( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("createObject"); + + SmartPtrIIntegrationObject rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + rc.CreateInstance(_sObjIdPayloadHeaderEnricherInstance); + rc->initialize(_ctorArgs, _properties, configSection); + } + CAF_CM_EXIT; + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CPayloadHeaderEnricher.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CPayloadHeaderEnricher.h new file mode 100644 index 000000000..25abb8da7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CPayloadHeaderEnricher.h @@ -0,0 +1,59 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CPayloadHeaderEnricher_h_ +#define CPayloadHeaderEnricher_h_ + +namespace Caf { + +/// Sends responses/errors back to the client. +class CPayloadHeaderEnricher : + public TCafSubSystemObjectRoot, + public IBean, + public IIntegrationComponent { +public: + CPayloadHeaderEnricher(); + virtual ~CPayloadHeaderEnricher(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdPayloadHeaderEnricher) + + CAF_BEGIN_INTERFACE_MAP(CPayloadHeaderEnricher) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IIntegrationComponent) + CAF_END_INTERFACE_MAP() + +public: + virtual void initialize(); + +public: // IBean + virtual void initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties); + + virtual void terminateBean(); + +public: // IIntegrationComponent + bool isResponsible( + const SmartPtrIDocument& configSection) const; + + SmartPtrIIntegrationObject createObject( + const SmartPtrIDocument& configSection) const; + +private: + bool _isInitialized; + IBean::Cargs _ctorArgs; + IBean::Cprops _properties; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CPayloadHeaderEnricher); +}; + +} + +#endif // #ifndef CPayloadHeaderEnricher_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CPayloadHeaderEnricherInstance.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CPayloadHeaderEnricherInstance.cpp new file mode 100644 index 000000000..3c59a124d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CPayloadHeaderEnricherInstance.cpp @@ -0,0 +1,100 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CPayloadHeaderEnricherInstance.h" + +using namespace Caf; + +CPayloadHeaderEnricherInstance::CPayloadHeaderEnricherInstance() : + _isInitialized(false), + _includeFilename(false), + CAF_CM_INIT_LOG("CPayloadHeaderEnricherInstance") { +} + +CPayloadHeaderEnricherInstance::~CPayloadHeaderEnricherInstance() { +} + +void CPayloadHeaderEnricherInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + + const SmartPtrCBeanPropertiesHelper beanProperties = + CBeanPropertiesHelper::create(properties); + _includeFilename = beanProperties->getOptionalBool("includeFilename", true); + + _isInitialized = true; +} + +std::string CPayloadHeaderEnricherInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _id; +} + +void CPayloadHeaderEnricherInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); +} + +SmartPtrIIntMessage CPayloadHeaderEnricherInstance::transformMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("transformMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const SmartPtrCPayloadEnvelopeDoc payloadEnvelope = + CCafMessagePayloadParser::getPayloadEnvelope(message->getPayload()); + + const std::string payloadType = payloadEnvelope->getPayloadType(); + const std::string clientIdStr = + BasePlatform::UuidToString(payloadEnvelope->getClientId()); + const std::string requestIdStr = + BasePlatform::UuidToString(payloadEnvelope->getRequestId()); + const std::string pmeIdStr = payloadEnvelope->getPmeId(); + const std::string version = payloadEnvelope->getVersion(); + const std::string payloadVersion = payloadEnvelope->getPayloadVersion(); + + SmartPtrCCafMessageHeadersWriter messageHeadersWriter = + CCafMessageHeadersWriter::create(); + messageHeadersWriter->setPayloadType(payloadType); + messageHeadersWriter->setClientId(clientIdStr); + messageHeadersWriter->setRequestId(requestIdStr); + messageHeadersWriter->setPmeId(pmeIdStr); + messageHeadersWriter->setVersion(version); + messageHeadersWriter->setPayloadVersion(payloadVersion); + + if (_includeFilename) { + std::string relFilename = FileSystemUtils::buildPath( + clientIdStr, requestIdStr, pmeIdStr); + relFilename = FileSystemUtils::buildPath(relFilename, _sPayloadRequestFilename); + + messageHeadersWriter->setRelFilename(relFilename); + + CAF_CM_LOG_DEBUG_VA2( + "Enhanced the headers - payloadType: \"%s\", filename: \"%s\"", + payloadType.c_str(), relFilename.c_str()); + } + + SmartPtrCIntMessage messageImpl; + messageImpl.CreateInstance(); + messageImpl->initialize(message->getPayload(), + messageHeadersWriter->getHeaders(), message->getHeaders()); + + return messageImpl; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CPayloadHeaderEnricherInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CPayloadHeaderEnricherInstance.h new file mode 100644 index 000000000..03a12c9aa --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CPayloadHeaderEnricherInstance.h @@ -0,0 +1,61 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CPayloadHeaderEnricherInstance_h_ +#define CPayloadHeaderEnricherInstance_h_ + +namespace Caf { + +class CPayloadHeaderEnricherInstance : + public TCafSubSystemObjectRoot, + public IIntegrationObject, + public IIntegrationComponentInstance, + public ITransformer { +public: + CPayloadHeaderEnricherInstance(); + virtual ~CPayloadHeaderEnricherInstance(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdPayloadHeaderEnricherInstance) + + CAF_BEGIN_INTERFACE_MAP(CPayloadHeaderEnricherInstance) + CAF_INTERFACE_ENTRY(IIntegrationObject) + CAF_INTERFACE_ENTRY(IIntegrationComponentInstance) + CAF_INTERFACE_ENTRY(ITransformer) + CAF_END_INTERFACE_MAP() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ITransformer + SmartPtrIIntMessage transformMessage( + const SmartPtrIIntMessage& message); + +private: + bool _isInitialized; + std::string _id; + bool _includeFilename; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CPayloadHeaderEnricherInstance); +}; + +} + +#endif // #ifndef CPayloadHeaderEnricherInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CafIntegration.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CafIntegration.cpp new file mode 100644 index 000000000..cbd5293f9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CafIntegration.cpp @@ -0,0 +1,46 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" + +using namespace Caf; + +CEcmSubSystemModule _Module; + +CAF_BEGIN_OBJECT_MAP(ObjectMap) + CAF_OBJECT_ENTRY(CErrorToResponseTransformer) + CAF_OBJECT_ENTRY(CErrorToResponseTransformerInstance) + CAF_OBJECT_ENTRY(CPayloadHeaderEnricher) + CAF_OBJECT_ENTRY(CPayloadHeaderEnricherInstance) + CAF_OBJECT_ENTRY(CEnvelopeToPayloadTransformer) + CAF_OBJECT_ENTRY(CEnvelopeToPayloadTransformerInstance) +CAF_END_OBJECT_MAP() + +CAF_DECLARE_SUBSYSTEM_EXPORTS() + +extern "C" BOOL APIENTRY DllMain(HINSTANCE hModule, uint32 dwReason, LPVOID) +{ + try { + if (DLL_PROCESS_ATTACH == dwReason) + { + // initialize the sub-system module + _Module.Init(ObjectMap, hModule); + } + else if (DLL_PROCESS_DETACH == dwReason) + { + // Terminate the sub-system module + _Module.Term(); + } + } catch (std::runtime_error) { + ::exit(2); + } catch (...) { + ::exit(2); + } + + return TRUE; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/stdafx.h new file mode 100644 index 000000000..1793c88fb --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/stdafx.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef stdafx_h_ +#define stdafx_h_ + +//{{CAF_SUBSYSTEM}} + +#include +#include +#include +#include +#include +#include + +#include + +#include "CErrorToResponseTransformerInstance.h" +#include "CErrorToResponseTransformer.h" + +#include "CPayloadHeaderEnricherInstance.h" +#include "CPayloadHeaderEnricher.h" + +#include "CEnvelopeToPayloadTransformerInstance.h" +#include "CEnvelopeToPayloadTransformer.h" + +#endif // #ifndef stdafx_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CDirectChannelInstance.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CDirectChannelInstance.cpp new file mode 100644 index 000000000..0f5f9515e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CDirectChannelInstance.cpp @@ -0,0 +1,110 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CDirectChannelInstance.h" + +using namespace Caf; + +CDirectChannelInstance::CDirectChannelInstance() : + _isInitialized(false), + CAF_CM_INIT_LOG("CDirectChannelInstance"){ +} + +CDirectChannelInstance::~CDirectChannelInstance() { +} + +void CDirectChannelInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _configSection = configSection; + _id = _configSection->findRequiredAttribute("id"); + + _isInitialized = true; +} + +std::string CDirectChannelInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _id; +} + +void CDirectChannelInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + + const SmartPtrIMessageChannel errorMessageChannel = + channelResolver->resolveChannelName("errorChannel"); + + SmartPtrCErrorHandler errorHandler; + errorHandler.CreateInstance(); + errorHandler->initialize(channelResolver, errorMessageChannel); + + SmartPtrCUnicastingDispatcher unicastingDispatcher; + unicastingDispatcher.CreateInstance(); + unicastingDispatcher->initialize(errorHandler); + _messageDispatcher = unicastingDispatcher; +} + +void CDirectChannelInstance::subscribe( + const SmartPtrIMessageHandler& messageHandler) { + CAF_CM_FUNCNAME_VALIDATE("subscribe"); + + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(messageHandler); + + _messageDispatcher->addHandler(messageHandler); +} + +void CDirectChannelInstance::unsubscribe( + const SmartPtrIMessageHandler& messageHandler) { + CAF_CM_FUNCNAME_VALIDATE("unsubscribe"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(messageHandler); + + _messageDispatcher->removeHandler(messageHandler); +} + +bool CDirectChannelInstance::doSend( + const SmartPtrIIntMessage& message, + int32 timeout) { + CAF_CM_FUNCNAME("doSend"); + + bool sent = false; + try { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + if (timeout > 0) { + CAF_CM_EXCEPTIONEX_VA1(UnsupportedOperationException, E_INVALIDARG, + "Timeout not currently supported: %s", _id.c_str()); + } else { + CAF_CM_LOG_DEBUG_VA1("Dispatching message - %s", _id.c_str()); + sent = _messageDispatcher->dispatch(message); + if (!sent) { + CAF_CM_LOG_WARN_VA1("Nothing handled the message - channel: %s", _id.c_str()); + } + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + return sent; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CDirectChannelInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CDirectChannelInstance.h new file mode 100644 index 000000000..2ac62de2c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CDirectChannelInstance.h @@ -0,0 +1,75 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CDirectChannelInstance_h_ +#define CDirectChannelInstance_h_ + +namespace Caf { + +/// Sends responses/errors back to the client. +class CDirectChannelInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public ISubscribableChannel, + public CAbstractMessageChannel +{ +public: + CDirectChannelInstance(); + virtual ~CDirectChannelInstance(); + + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(ISubscribableChannel) + CAF_QI_ENTRY(IMessageChannel) + CAF_QI_ENTRY(IChannelInterceptorSupport) + CAF_END_QI() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ISubscribableChannel + void subscribe( + const SmartPtrIMessageHandler& messageHandler); + + void unsubscribe( + const SmartPtrIMessageHandler& messageHandler); + + +protected: // CAbstractMessageChannel + bool doSend( + const SmartPtrIIntMessage& message, + int32 timeout); + +private: + bool _isInitialized; + SmartPtrIDocument _configSection; + std::string _id; + SmartPtrIMessageDispatcher _messageDispatcher; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CDirectChannelInstance); +}; + +CAF_DECLARE_SMART_QI_POINTER(CDirectChannelInstance); + +} + +#endif // #ifndef CDirectChannelInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CErrorChannel.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CErrorChannel.cpp new file mode 100644 index 000000000..3e9bf245d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CErrorChannel.cpp @@ -0,0 +1,89 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CErrorChannel.h" +#include "CErrorChannelInstance.h" + +using namespace Caf; + +CErrorChannel::CErrorChannel() : + _isInitialized(false), + CAF_CM_INIT("CErrorChannel"){ +} + +CErrorChannel::~CErrorChannel() { +} + +void CErrorChannel::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + CAF_CM_VALIDATE_STL_EMPTY(properties); + + _ctorArgs = ctorArgs; + _properties = properties; + + initialize(); + } + CAF_CM_EXIT; +} + +void CErrorChannel::terminateBean() { +} + +void CErrorChannel::initialize() { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +bool CErrorChannel::isResponsible( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("isResponsible"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + } + CAF_CM_EXIT; + + return false; +} + +SmartPtrIIntegrationObject CErrorChannel::createObject( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("createObject"); + + SmartPtrIIntegrationObject rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + // configSection is optional + + SmartPtrCErrorChannelInstance instance; + instance.CreateInstance(); + instance->initialize(_ctorArgs, _properties, configSection); + rc.QueryInterface(instance, false); + CAF_CM_VALIDATE_INTERFACE(rc); + } + CAF_CM_EXIT; + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CErrorChannel.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CErrorChannel.h new file mode 100644 index 000000000..9985c5a6a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CErrorChannel.h @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CErrorChannel_h_ +#define CErrorChannel_h_ + +namespace Caf { + +/// Sends responses/errors back to the client. +class CErrorChannel : + public TCafSubSystemObjectRoot, + public IBean, + public IIntegrationComponent +{ +public: + CErrorChannel(); + virtual ~CErrorChannel(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdErrorChannel) + + CAF_BEGIN_INTERFACE_MAP(CErrorChannel) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IIntegrationComponent) + CAF_END_INTERFACE_MAP() + +public: + void initialize(); + +public: // IBean + void initializeBean(const IBean::Cargs& ctorArgs, const IBean::Cprops& properties); + void terminateBean(); + +public: // IIntegrationComponent + bool isResponsible( + const SmartPtrIDocument& configSection) const; + + SmartPtrIIntegrationObject createObject( + const SmartPtrIDocument& configSection) const; + +private: + bool _isInitialized; + IBean::Cargs _ctorArgs; + IBean::Cprops _properties; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CErrorChannel); +}; + +} + +#endif // #ifndef CErrorChannel_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CErrorChannelInstance.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CErrorChannelInstance.cpp new file mode 100644 index 000000000..ac46121ac --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CErrorChannelInstance.cpp @@ -0,0 +1,133 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CErrorChannelInstance.h" + +using namespace Caf; + +CErrorChannelInstance::CErrorChannelInstance() : + _isInitialized(false), + CAF_CM_INIT_LOG("CErrorChannelInstance") { +} + +CErrorChannelInstance::~CErrorChannelInstance() { +} + +void CErrorChannelInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER + { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + // configSection is optional + + _id = "errorChannel"; + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +std::string CErrorChannelInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + + std::string rc; + + CAF_CM_ENTER + { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _id; + } + CAF_CM_EXIT; + + return rc; +} + +void CErrorChannelInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + + CAF_CM_ENTER + { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + + const SmartPtrIMessageChannel nullMessageChannel = + channelResolver->resolveChannelName("nullChannel"); + + SmartPtrCErrorHandler errorHandler; + errorHandler.CreateInstance(); + errorHandler->initialize(channelResolver, nullMessageChannel); + + SmartPtrCUnicastingDispatcher unicastingDispatcher; + unicastingDispatcher.CreateInstance(); + unicastingDispatcher->initialize(errorHandler); + _messageDispatcher = unicastingDispatcher; + } + CAF_CM_EXIT; +} + +void CErrorChannelInstance::subscribe(const SmartPtrIMessageHandler& messageHandler) { + CAF_CM_FUNCNAME_VALIDATE("subscribe"); + + CAF_CM_ENTER + { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(messageHandler); + + _messageDispatcher->addHandler(messageHandler); + } + CAF_CM_EXIT; +} + +void CErrorChannelInstance::unsubscribe(const SmartPtrIMessageHandler& messageHandler) { + CAF_CM_FUNCNAME_VALIDATE("unsubscribe"); + + CAF_CM_ENTER + { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(messageHandler); + + _messageDispatcher->removeHandler(messageHandler); + } + CAF_CM_EXIT; +} + +bool CErrorChannelInstance::doSend( + const SmartPtrIIntMessage& message, + int32 timeout) { + CAF_CM_FUNCNAME("doSend"); + + bool sent = false; + try { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + if (timeout > 0) { + CAF_CM_EXCEPTIONEX_VA1(UnsupportedOperationException, E_INVALIDARG, + "Timeout not currently supported: %s", _id.c_str()); + } else { + CAF_CM_LOG_DEBUG_VA1("Dispatching message - %s", _id.c_str()); + sent = _messageDispatcher->dispatch(message); + if (!sent) { + CAF_CM_LOG_WARN_VA1("Nothing handled the message - channel: %s", _id.c_str()); + } + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + return sent; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CErrorChannelInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CErrorChannelInstance.h new file mode 100644 index 000000000..0a7efe6d9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CErrorChannelInstance.h @@ -0,0 +1,71 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CErrorChannelInstance_h_ +#define CErrorChannelInstance_h_ + +namespace Caf { + +/// Sends responses/errors back to the client. +class CErrorChannelInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public ISubscribableChannel, + public CAbstractMessageChannel +{ +public: + CErrorChannelInstance(); + virtual ~CErrorChannelInstance(); + + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(ISubscribableChannel) + CAF_QI_ENTRY(IMessageChannel) + CAF_QI_ENTRY(IChannelInterceptorSupport) + CAF_END_QI() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ISubscribableChannel + void subscribe( + const SmartPtrIMessageHandler& messageHandler); + + void unsubscribe( + const SmartPtrIMessageHandler& messageHandler); + +protected: // CAbstractMessageChannel + bool doSend( + const SmartPtrIIntMessage& message, + int32 timeout); + +private: + bool _isInitialized; + std::string _id; + SmartPtrIMessageDispatcher _messageDispatcher; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CErrorChannelInstance); +}; +CAF_DECLARE_SMART_QI_POINTER(CErrorChannelInstance); +} + +#endif // #ifndef CErrorChannelInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileInboundChannelAdapterInstance.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileInboundChannelAdapterInstance.cpp new file mode 100644 index 000000000..95d756079 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileInboundChannelAdapterInstance.cpp @@ -0,0 +1,153 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CFileInboundChannelAdapterInstance.h" +#include "CFileReadingMessageSource.h" + +using namespace Caf; + +CFileInboundChannelAdapterInstance::CFileInboundChannelAdapterInstance() : + _isInitialized(false), + CAF_CM_INIT_LOG("CFileInboundChannelAdapterInstance") { +} + +CFileInboundChannelAdapterInstance::~CFileInboundChannelAdapterInstance() { +} + +void CFileInboundChannelAdapterInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _configSection = configSection; + _id = _configSection->findRequiredAttribute("id"); + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +std::string CFileInboundChannelAdapterInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _id; + } + CAF_CM_EXIT; + + return rc; +} + +void CFileInboundChannelAdapterInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + + const std::string outputChannelStr = + _configSection->findRequiredAttribute("channel"); + + SmartPtrCFileReadingMessageSource fileReadingMessageSource; + fileReadingMessageSource.CreateInstance(); + fileReadingMessageSource->initialize(_configSection); + + const SmartPtrIMessageChannel outputMessageChannel = + channelResolver->resolveChannelName(outputChannelStr); + const SmartPtrIMessageChannel errorMessageChannel = + channelResolver->resolveChannelName("errorChannel"); + + SmartPtrCMessageHandler messageHandler; + messageHandler.CreateInstance(); + messageHandler->initialize( + _id, + outputMessageChannel, + SmartPtrICafObject()); + + SmartPtrCErrorHandler errorHandler; + errorHandler.CreateInstance(); + errorHandler->initialize(channelResolver, errorMessageChannel); + + SmartPtrCSourcePollingChannelAdapter sourcePollingChannelAdapter; + sourcePollingChannelAdapter.CreateInstance(); + sourcePollingChannelAdapter->initialize( + messageHandler, fileReadingMessageSource, errorHandler); + + SmartPtrCSimpleAsyncTaskExecutor simpleAsyncTaskExecutor; + simpleAsyncTaskExecutor.CreateInstance(); + simpleAsyncTaskExecutor->initialize(sourcePollingChannelAdapter, errorHandler); + _taskExecutor = simpleAsyncTaskExecutor; + } + CAF_CM_EXIT; +} + +void CFileInboundChannelAdapterInstance::start(const uint32 timeoutMs) { + CAF_CM_FUNCNAME_VALIDATE("start"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CAF_CM_LOG_DEBUG_VA0("Starting the executor"); + _taskExecutor->execute(timeoutMs); + } + CAF_CM_EXIT; +} + +void CFileInboundChannelAdapterInstance::stop(const uint32 timeoutMs) { + CAF_CM_FUNCNAME_VALIDATE("stop"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CAF_CM_LOG_DEBUG_VA0("Stopping the executor"); + _taskExecutor->cancel(timeoutMs); + } + CAF_CM_EXIT; +} + +bool CFileInboundChannelAdapterInstance::isRunning() const { + CAF_CM_FUNCNAME_VALIDATE("isRunning"); + + bool rc = false; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + rc = (_taskExecutor->getState() == ITaskExecutor::ETaskStateStarted); + } + CAF_CM_EXIT; + + return rc; +} + +bool CFileInboundChannelAdapterInstance::isMessageProducer() const { + CAF_CM_FUNCNAME_VALIDATE("isMessageProducer"); + + bool rc = false; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + rc = true; + } + CAF_CM_EXIT; + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileInboundChannelAdapterInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileInboundChannelAdapterInstance.h new file mode 100644 index 000000000..9fd4d5df9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileInboundChannelAdapterInstance.h @@ -0,0 +1,67 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CFileInboundChannelAdapterInstance_h_ +#define CFileInboundChannelAdapterInstance_h_ + +namespace Caf { + +class CFileInboundChannelAdapterInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public ILifecycle, + public IMessageProducer { +public: + CFileInboundChannelAdapterInstance(); + virtual ~CFileInboundChannelAdapterInstance(); + + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(ILifecycle) + CAF_QI_ENTRY(IMessageProducer) + CAF_END_QI() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ILifecycle + void start(const uint32 timeoutMs); + void stop(const uint32 timeoutMs); + bool isRunning() const; + +public: // IMessageProducer + bool isMessageProducer() const; + +private: + bool _isInitialized; + SmartPtrIDocument _configSection; + std::string _id; + SmartPtrITaskExecutor _taskExecutor; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CFileInboundChannelAdapterInstance); +}; + +CAF_DECLARE_SMART_QI_POINTER(CFileInboundChannelAdapterInstance); + +} + +#endif // #ifndef CFileInboundChannelAdapterInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileOutboundChannelAdapterInstance.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileOutboundChannelAdapterInstance.cpp new file mode 100644 index 000000000..c4a9dfd19 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileOutboundChannelAdapterInstance.cpp @@ -0,0 +1,179 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CFileOutboundChannelAdapterInstance.h" +#include "CDirectChannelInstance.h" + +using namespace Caf; + +CFileOutboundChannelAdapterInstance::CFileOutboundChannelAdapterInstance() : + _isInitialized(false), + _autoCreateDirectory(false), + _deleteSourceFiles(false), + CAF_CM_INIT_LOG("CFileOutboundChannelAdapterInstance") { +} + +CFileOutboundChannelAdapterInstance::~CFileOutboundChannelAdapterInstance() { +} + +void CFileOutboundChannelAdapterInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + + const std::string directoryStr = configSection->findRequiredAttribute("directory"); + const std::string autoCreateDirectoryStr = configSection->findOptionalAttribute( + "auto-create-directory"); + const std::string deleteSourceFilesStr = configSection->findOptionalAttribute( + "delete-source-files"); + const std::string temporaryFileSuffixStr = configSection->findOptionalAttribute( + "temporary-file-suffix"); + _modeStr = configSection->findOptionalAttribute("mode"); + + _directory = CStringUtils::expandEnv(directoryStr); + _deleteSourceFiles = + (deleteSourceFilesStr.empty() || deleteSourceFilesStr.compare("false") == 0) ? + false : true; + _autoCreateDirectory = + (autoCreateDirectoryStr.empty() || autoCreateDirectoryStr.compare("true") == 0) ? + true : false; + _temporaryFileSuffix = + temporaryFileSuffixStr.empty() ? ".writing" : temporaryFileSuffixStr; + + _isInitialized = true; +} + +std::string CFileOutboundChannelAdapterInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _id; +} + +void CFileOutboundChannelAdapterInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); +} + +void CFileOutboundChannelAdapterInstance::handleMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("handleMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + _savedMessage = message; + savePayloadToFile(message); + deleteSourceFiles(message); +} + +SmartPtrIIntMessage CFileOutboundChannelAdapterInstance::getSavedMessage() const { + CAF_CM_FUNCNAME_VALIDATE("getSavedMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _savedMessage; +} + +void CFileOutboundChannelAdapterInstance::clearSavedMessage() { + CAF_CM_FUNCNAME_VALIDATE("clearSavedMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _savedMessage = NULL; +} + +SmartPtrIIntMessage CFileOutboundChannelAdapterInstance::processErrorMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("processErrorMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + _savedMessage = message; + savePayloadToFile(message); + deleteSourceFiles(message); + + return SmartPtrIIntMessage(); +} + +void CFileOutboundChannelAdapterInstance::savePayloadToFile( + const SmartPtrIIntMessage& message) const { + CAF_CM_FUNCNAME("savePayloadToFile"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + const std::string relFilename = generateFilename(message); + const std::string filePath = FileSystemUtils::buildPath(_directory, relFilename); + const std::string fileDir = FileSystemUtils::getDirname(filePath); + + if (! _autoCreateDirectory && ! FileSystemUtils::doesDirectoryExist(fileDir)) { + CAF_CM_EXCEPTION_VA1(ERROR_PATH_NOT_FOUND, + "Directory does not exist - %s", fileDir.c_str()); + } + + const SmartPtrCDynamicByteArray payload = message->getPayload(); + FileSystemUtils::saveByteFile(filePath, payload->getPtr(), payload->getByteCount(), + translateMode(_modeStr), _temporaryFileSuffix); +} + +std::string CFileOutboundChannelAdapterInstance::generateFilename( + const SmartPtrIIntMessage& message) const { + CAF_CM_FUNCNAME_VALIDATE("generateFilename"); + CAF_CM_VALIDATE_INTERFACE(message); + + std::string relFilename = message->findOptionalHeaderAsString( + FileHeaders::_sFILENAME); + if (relFilename.empty()) { + relFilename = CStringUtils::createRandomUuid() + ".msg"; + } + + return relFilename; +} + +FileSystemUtils::FILE_MODE_TYPE CFileOutboundChannelAdapterInstance::translateMode( + const std::string modeStr) const { + CAF_CM_FUNCNAME("translateMode"); + + FileSystemUtils::FILE_MODE_TYPE modeType; + if (modeStr.empty() || (modeStr.compare("REPLACE") == 0)) { + modeType = FileSystemUtils::FILE_MODE_REPLACE; + } else if (modeStr.compare("FAIL") == 0) { + modeType = FileSystemUtils::FILE_MODE_FAIL; + } else if (modeStr.compare("IGNORE") == 0) { + modeType = FileSystemUtils::FILE_MODE_IGNORE; + } else if (modeStr.compare("APPEND") == 0) { + CAF_CM_EXCEPTION_VA0(ERROR_INVALID_DATA, + "Invalid mode - APPEND not currently supported"); + } else { + CAF_CM_EXCEPTION_VA1(ERROR_INVALID_DATA, "Invalid mode - %s", modeStr.c_str()); + } + + return modeType; +} + +void CFileOutboundChannelAdapterInstance::deleteSourceFiles( + const SmartPtrIIntMessage& message) const { + CAF_CM_FUNCNAME_VALIDATE("deleteSourceFiles"); + CAF_CM_VALIDATE_INTERFACE(message); + + if (_deleteSourceFiles) { + const std::string originalFile = message->findOptionalHeaderAsString( + FileHeaders::_sORIGINAL_FILE); + if (!originalFile.empty()) { + if (FileSystemUtils::doesFileExist(originalFile)) { + CAF_CM_LOG_INFO_VA1("Removing original file - %s", originalFile.c_str()); + FileSystemUtils::removeFile(originalFile); + } + } + } +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileOutboundChannelAdapterInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileOutboundChannelAdapterInstance.h new file mode 100644 index 000000000..db4495922 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileOutboundChannelAdapterInstance.h @@ -0,0 +1,86 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CFileOutboundChannelAdapterInstance_h_ +#define CFileOutboundChannelAdapterInstance_h_ + +namespace Caf { + +class CFileOutboundChannelAdapterInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public IMessageHandler, + public IErrorProcessor { +public: + CFileOutboundChannelAdapterInstance(); + virtual ~CFileOutboundChannelAdapterInstance(); + + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(IMessageHandler) + CAF_QI_ENTRY(IErrorProcessor) + CAF_END_QI() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // IMessageHandler + void handleMessage( + const SmartPtrIIntMessage& message); + + SmartPtrIIntMessage getSavedMessage() const; + + void clearSavedMessage(); + +public: // IErrorProcessor + SmartPtrIIntMessage processErrorMessage( + const SmartPtrIIntMessage& message); + +private: + bool _isInitialized; + std::string _id; + std::string _directory; + std::string _temporaryFileSuffix; + std::string _modeStr; + bool _autoCreateDirectory; + bool _deleteSourceFiles; + SmartPtrIIntMessage _savedMessage; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CFileOutboundChannelAdapterInstance); + +private: + void savePayloadToFile( + const SmartPtrIIntMessage& message) const; + + std::string generateFilename( + const SmartPtrIIntMessage& message) const; + + FileSystemUtils::FILE_MODE_TYPE translateMode( + const std::string modeStr) const; + + void deleteSourceFiles( + const SmartPtrIIntMessage& message) const; +}; +CAF_DECLARE_SMART_QI_POINTER(CFileOutboundChannelAdapterInstance); +} + +#endif // #ifndef CFileOutboundChannelAdapterInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileReadingMessageSource.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileReadingMessageSource.cpp new file mode 100644 index 000000000..662f4abdf --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileReadingMessageSource.cpp @@ -0,0 +1,203 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CFileReadingMessageSource.h" + +using namespace Caf; + +CFileReadingMessageSource::CFileReadingMessageSource() : + _isInitialized(false), + _preventDuplicates(true), + _refreshSec(0), + _lastRefreshSec(0), + CAF_CM_INIT_LOG("CFileReadingMessageSource") { +} + +CFileReadingMessageSource::~CFileReadingMessageSource() { +} + +void CFileReadingMessageSource::initialize( + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + const std::string directoryStr = configSection->findRequiredAttribute("directory"); + const std::string filenameRegexStr = configSection->findOptionalAttribute("filename-regex"); + const std::string preventDuplicatesStr = configSection->findOptionalAttribute("prevent-duplicates"); + const std::string autoCreateDirectoryStr = configSection->findOptionalAttribute("auto-create-directory"); + const SmartPtrIDocument pollerDoc = configSection->findOptionalChild("poller"); + + _refreshSec = 0; + + _directory = CStringUtils::expandEnv(directoryStr); + setPollerMetadata(pollerDoc); + _preventDuplicates = + (preventDuplicatesStr.empty() || preventDuplicatesStr.compare("true") == 0) ? true : false; + + if (filenameRegexStr.empty()) { + _filenameRegex = FileSystemUtils::REGEX_MATCH_ALL; + } else { + _filenameRegex = filenameRegexStr; + } + + const bool autoCreateDirectory = + (autoCreateDirectoryStr.empty() || autoCreateDirectoryStr.compare("true") == 0) ? true : false; + if (autoCreateDirectory && ! FileSystemUtils::doesDirectoryExist(_directory)) { + FileSystemUtils::createDirectory(_directory); + } + + CAF_CM_LOG_DEBUG_VA2( + "Monitoring inbound directory - dir: %s, fileRegex: %s", + _directory.c_str(), _filenameRegex.c_str()); + + _fileCollection.CreateInstance(); + _isInitialized = true; +} + +bool CFileReadingMessageSource::doSend( + const SmartPtrIIntMessage&, + int32) { + CAF_CM_FUNCNAME("doSend"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CAF_CM_EXCEPTIONEX_VA1( + UnsupportedOperationException, + E_NOTIMPL, + "This is not a sending channel: %s", _id.c_str()); +} + +SmartPtrIIntMessage CFileReadingMessageSource::doReceive(const int32 timeout) { + CAF_CM_FUNCNAME("receive"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + if (timeout > 0) { + CAF_CM_EXCEPTIONEX_VA1(UnsupportedOperationException, E_INVALIDARG, + "Timeout not currently supported: %s", _id.c_str()); + } + + if (isRefreshNecessary(_refreshSec, _lastRefreshSec)) { + const SmartPtrCFileCollection newFileCollection = + itemsInDirectory(_directory, _filenameRegex); + + if (_preventDuplicates) { + _fileCollection = merge(newFileCollection, _fileCollection); + } else { + _fileCollection = newFileCollection; + } + + _lastRefreshSec = getTimeSec(); + } + + SmartPtrIIntMessage message; + const std::string filename = calcNextFile(_fileCollection); + if (! filename.empty()) { + CAF_CM_LOG_DEBUG_VA1("Creating message with filename - %s", filename.c_str()); + + SmartPtrCIntMessage messageImpl; + messageImpl.CreateInstance(); + messageImpl->initializeStr(filename, IIntMessage::SmartPtrCHeaders(), IIntMessage::SmartPtrCHeaders()); + message = messageImpl; + } + + return message; +} + +CFileReadingMessageSource::SmartPtrCFileCollection +CFileReadingMessageSource::itemsInDirectory( + const std::string& directory, + const std::string& filenameRegex) const { + CAF_CM_FUNCNAME_VALIDATE("itemsInDirectory"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(directory); + // filenameRegex defaults to FileSystemUtils::REGEX_MATCH_ALL + + SmartPtrCFileCollection rc; + rc.CreateInstance(); + + const FileSystemUtils::DirectoryItems directoryItems = + FileSystemUtils::itemsInDirectory(directory, filenameRegex); + const FileSystemUtils::Files files = directoryItems.files; + for (TConstIterator fileIter(files); fileIter; fileIter++) { + const std::string filename = *fileIter; + const std::string filePath = FileSystemUtils::buildPath( + directory, filename); + + rc->insert(std::make_pair(filePath, false)); + } + + return rc; +} + +CFileReadingMessageSource::SmartPtrCFileCollection +CFileReadingMessageSource::merge( + const SmartPtrCFileCollection& newFileCollection, + const SmartPtrCFileCollection& existingFileCollection) const { + CAF_CM_FUNCNAME_VALIDATE("merge"); + CAF_CM_VALIDATE_SMARTPTR(newFileCollection); + CAF_CM_VALIDATE_SMARTPTR(existingFileCollection); + + SmartPtrCFileCollection newFileCollectionRc = newFileCollection; + for (TMapIterator newFileIter(*newFileCollectionRc); + newFileIter; newFileIter++) { + const std::string newFile = newFileIter.getKey(); + + CFileCollection::const_iterator existingFileIter = + existingFileCollection->find(newFile); + if (existingFileIter != existingFileCollection->end()) { + *newFileIter = existingFileIter->second; + } + } + + return newFileCollectionRc; +} + +std::string CFileReadingMessageSource::calcNextFile( + SmartPtrCFileCollection& fileCollection) const { + CAF_CM_FUNCNAME_VALIDATE("calcNextFile"); + CAF_CM_VALIDATE_SMARTPTR(fileCollection); + + std::string filename; + for (TMapIterator fileIter(*fileCollection); + filename.empty() && fileIter; fileIter++) { + const bool isFileReceived = *fileIter; + if (! isFileReceived) { + filename = fileIter.getKey(); + *fileIter = true; + } + } + + return filename; +} + +bool CFileReadingMessageSource::isRefreshNecessary( + const uint32 refreshSec, + const uint64 lastRefreshSec) const { + bool rc = false; + + if (refreshSec == 0) { + rc = true; + } else { + const uint64 currentTimeSec = getTimeSec(); + if ((currentTimeSec - lastRefreshSec) > refreshSec) { + rc = true; + } + } + + return rc; +} + +uint64 CFileReadingMessageSource::getTimeSec() const { + GTimeVal curTime; + ::g_get_current_time(&curTime); + uint64 rc = curTime.tv_sec; + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileReadingMessageSource.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileReadingMessageSource.h new file mode 100644 index 000000000..0ee759951 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileReadingMessageSource.h @@ -0,0 +1,75 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CFileReadingMessageSource_h_ +#define CFileReadingMessageSource_h_ + +namespace Caf { + +class CFileReadingMessageSource : + public CAbstractPollableChannel +{ +private: + typedef std::map CFileCollection; + CAF_DECLARE_SMART_POINTER(CFileCollection); + +public: + CFileReadingMessageSource(); + virtual ~CFileReadingMessageSource(); + +public: + void initialize( + const SmartPtrIDocument& configSection); + +protected: // CAbstractPollableChannel + bool doSend( + const SmartPtrIIntMessage& message, + int32 timeout); + + SmartPtrIIntMessage doReceive(const int32 timeout); + +private: + SmartPtrCFileCollection itemsInDirectory( + const std::string& directory, + const std::string& filenameRegex) const; + + SmartPtrCFileCollection merge( + const SmartPtrCFileCollection& newFileCollection, + const SmartPtrCFileCollection& existingFileCollection) const; + + std::string calcNextFile( + SmartPtrCFileCollection& fileCollection) const; + + uint64 getTimeSec() const; + + bool isRefreshNecessary( + const uint32 refreshSec, + const uint64 lastRefreshSec) const; + +private: + bool _isInitialized; + std::string _id; + std::string _directory; + std::string _filenameRegex; + bool _preventDuplicates; + uint32 _refreshSec; + uint64 _lastRefreshSec; + + SmartPtrCFileCollection _fileCollection; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CFileReadingMessageSource); +}; + +CAF_DECLARE_SMART_POINTER(CFileReadingMessageSource); + +} + +#endif // #ifndef CFileReadingMessageSource_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileToStringTransformerInstance.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileToStringTransformerInstance.cpp new file mode 100644 index 000000000..f31311675 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileToStringTransformerInstance.cpp @@ -0,0 +1,102 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CFileToStringTransformerInstance.h" + +using namespace Caf; + +CFileToStringTransformerInstance::CFileToStringTransformerInstance() : + _isInitialized(false), + _deleteFiles(false), + CAF_CM_INIT_LOG("CFileToStringTransformerInstance") { +} + +CFileToStringTransformerInstance::~CFileToStringTransformerInstance() { +} + +void CFileToStringTransformerInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + + const std::string deleteFilesStr = configSection->findOptionalAttribute("delete-files"); + _deleteFiles = (deleteFilesStr.empty() || deleteFilesStr.compare("true") == 0) ? true : false; + + CAF_CM_LOG_DEBUG_VA2("deleteFilesStr: %s, deleteFiles: %s", deleteFilesStr.c_str(), _deleteFiles ? "true" : "false"); + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +std::string CFileToStringTransformerInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _id; + } + CAF_CM_EXIT; + + return rc; +} + +void CFileToStringTransformerInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + + } + CAF_CM_EXIT; +} + +SmartPtrIIntMessage CFileToStringTransformerInstance::transformMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("transformMessage"); + + SmartPtrIIntMessage newMessage; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const std::string filename = message->getPayloadStr(); + const std::string fileContents = FileSystemUtils::loadTextFile(filename); + + CIntMessageHeaders messageHeaders; + if (_deleteFiles) { + CAF_CM_LOG_INFO_VA1("Removing file - %s", filename.c_str()); + FileSystemUtils::removeFile(filename); + } else { + messageHeaders.insertString(FileHeaders::_sORIGINAL_FILE, filename); + } + + SmartPtrCIntMessage messageImpl; + messageImpl.CreateInstance(); + messageImpl->initializeStr(fileContents, messageHeaders.getHeaders(), message->getHeaders()); + newMessage = messageImpl; + } + CAF_CM_EXIT; + + return newMessage; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileToStringTransformerInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileToStringTransformerInstance.h new file mode 100644 index 000000000..138720f28 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileToStringTransformerInstance.h @@ -0,0 +1,60 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CFileToStringTransformerInstance_h_ +#define CFileToStringTransformerInstance_h_ + +namespace Caf { + +class CFileToStringTransformerInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public ITransformer +{ +public: + CFileToStringTransformerInstance(); + virtual ~CFileToStringTransformerInstance(); + + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(ITransformer) + CAF_END_QI() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ITransformer + SmartPtrIIntMessage transformMessage( + const SmartPtrIIntMessage& message); + +private: + bool _isInitialized; + std::string _id; + bool _deleteFiles; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CFileToStringTransformerInstance); +}; +CAF_DECLARE_SMART_QI_POINTER(CFileToStringTransformerInstance); + +} + +#endif // #ifndef CFileToStringTransformerInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CHeaderEnricherTransformerInstance.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CHeaderEnricherTransformerInstance.cpp new file mode 100644 index 000000000..7cd103ea6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CHeaderEnricherTransformerInstance.cpp @@ -0,0 +1,172 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CHeaderEnricherTransformerInstance.h" + +using namespace Caf; + +CHeaderEnricherTransformerInstance::CHeaderEnricherTransformerInstance() : + _isInitialized(false), + CAF_CM_INIT_LOG("CHeaderEnricherTransformerInstance") { +} + +CHeaderEnricherTransformerInstance::~CHeaderEnricherTransformerInstance() { +} + +void CHeaderEnricherTransformerInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + _configSection = configSection; + + if (_configSection->getAllChildren()->empty()) { + CAF_CM_EXCEPTIONEX_VA1(NoSuchElementException, ERROR_INVALID_DATA, + "Configuration section is empty - %s", _id.c_str()); + } + + _isInitialized = true; +} + +std::string CHeaderEnricherTransformerInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _id; +} + +void CHeaderEnricherTransformerInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME("wire"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + + SmartPtrIAppConfig appConfig = getAppConfig(); + + const IDocument::SmartPtrCChildCollection configChildren = + _configSection->getAllChildren(); + for (TSmartConstMapIterator configIter(*configChildren); + configIter; configIter++) { + const SmartPtrIDocument config = *configIter; + + if (config->getName().compare("header") == 0) { + const std::string headerName = config->findRequiredAttribute("name"); + const std::string headerRef = config->findOptionalAttribute("ref"); + const std::string headerValue = config->findOptionalAttribute("value"); + const std::string expressionValue = config->findOptionalAttribute("expression"); + + if (! headerRef.empty()) { + CAF_CM_LOG_DEBUG_VA2("Creating the header enricher bean - %s = %s", + headerName.c_str(), + headerRef.c_str()); + SmartPtrIBean bean = appContext->getBean(headerRef); + SmartPtrITransformer transformer; + transformer.QueryInterface(bean, false); + if (transformer.IsNull()) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchInterfaceException, + 0, + "Bean is not a transformer - %s", + headerRef.c_str()); + } + _headerWithRef.insert(std::make_pair(headerName, transformer)); + } else if (! headerValue.empty()) { + CAF_CM_LOG_DEBUG_VA2("Creating the header enricher value - %s = %s", + headerName.c_str(), headerValue.c_str()); + _headerWithValue.insert(std::make_pair(headerName, headerValue)); + } else if (! expressionValue.empty()) { + CAF_CM_LOG_DEBUG_VA2("Creating the header enricher expression - %s = %s", + headerName.c_str(), expressionValue.c_str()); + SmartPtrCExpressionHandler expressionHandler; + expressionHandler.CreateInstance(); + expressionHandler->init( + appConfig, + appContext, + expressionValue); + _headerWithExpression.insert(std::make_pair(headerName, expressionHandler)); + } else { + CAF_CM_EXCEPTIONEX_VA2( + InvalidArgumentException, + ERROR_INVALID_DATA, + "Configuration error: unrecognized header value type attribute: [id='%s'][header='%s']", + _id.c_str(), + headerName.c_str()); + } + } else if (config->getName().compare("error-channel") == 0) { + _errorChannelRef = config->findRequiredAttribute("ref"); + } else { + CAF_CM_EXCEPTIONEX_VA1(NoSuchElementException, ERROR_INVALID_DATA, + "Configuration section contains unrecognized entry - %s", _id.c_str()); + } + } +} + +SmartPtrIIntMessage CHeaderEnricherTransformerInstance::transformMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("transformMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + SmartPtrCIntMessage messageImpl; + messageImpl.CreateInstance(); + messageImpl->initialize(message->getPayload(), + message->getHeaders(), IIntMessage::SmartPtrCHeaders()); + SmartPtrIIntMessage newMessage = messageImpl; + + for (TSmartMapIterator headerWithRefIter(_headerWithRef); + headerWithRefIter; headerWithRefIter++) { + const SmartPtrIIntMessage transformMessage = + headerWithRefIter->transformMessage(newMessage); + SmartPtrCIntMessage tmpMessageImpl; + tmpMessageImpl.CreateInstance(); + tmpMessageImpl->initialize(message->getPayload(), + transformMessage->getHeaders(), newMessage->getHeaders()); + newMessage = tmpMessageImpl; + } + + IIntMessage::SmartPtrCHeaders newHeaders = newMessage->getHeaders(); + + for (TSmartMapIterator expressionIter(_headerWithExpression); + expressionIter; + expressionIter++) { + const SmartPtrIVariant value = expressionIter->evaluate(newMessage); + CAF_CM_LOG_DEBUG_VA2( + "Inserting/updating a header value - %s = %s", + expressionIter.getKey().c_str(), + value->toString().c_str()); + (*newHeaders)[expressionIter.getKey()] = + std::make_pair(value, SmartPtrICafObject()); + } + + if (! _errorChannelRef.empty()) { + CAF_CM_LOG_DEBUG_VA1("Inserting/updating a new error channel - %s", + _errorChannelRef.c_str()); + (*newHeaders)[MessageHeaders::_sERROR_CHANNEL] = + std::make_pair(CVariant::createString(_errorChannelRef), + SmartPtrICafObject()); + } + + for (TConstMapIterator headerWithValueIter(_headerWithValue); + headerWithValueIter; headerWithValueIter++) { + const std::string name = headerWithValueIter.getKey(); + const std::string value = *headerWithValueIter; + + CAF_CM_LOG_DEBUG_VA2("Inserting/updating a header value - %s = %s", + name.c_str(), value.c_str()); + (*newHeaders)[name] = + std::make_pair(CVariant::createString(value), SmartPtrICafObject()); + } + + return newMessage; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CHeaderEnricherTransformerInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CHeaderEnricherTransformerInstance.h new file mode 100644 index 000000000..79208ca28 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CHeaderEnricherTransformerInstance.h @@ -0,0 +1,66 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CHeaderEnricherTransformerInstance_h_ +#define CHeaderEnricherTransformerInstance_h_ + +namespace Caf { + +class CHeaderEnricherTransformerInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public ITransformer +{ +public: + CHeaderEnricherTransformerInstance(); + virtual ~CHeaderEnricherTransformerInstance(); + + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(ITransformer) + CAF_END_QI() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ITransformer + SmartPtrIIntMessage transformMessage( + const SmartPtrIIntMessage& message); + +private: + bool _isInitialized; + std::string _id; + std::string _errorChannelRef; + SmartPtrIDocument _configSection; + typedef std::map Transformers; + Transformers _headerWithRef; + typedef std::map Expressions; + Expressions _headerWithExpression; + Cmapstrstr _headerWithValue; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CHeaderEnricherTransformerInstance); +}; +CAF_DECLARE_SMART_QI_POINTER(CHeaderEnricherTransformerInstance); + +} + +#endif // #ifndef CHeaderEnricherTransformerInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CHeaderExpressionInvoker.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CHeaderExpressionInvoker.cpp new file mode 100644 index 000000000..8ac70e9b8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CHeaderExpressionInvoker.cpp @@ -0,0 +1,81 @@ +/* + * Created on: Jul 23, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CHeaderExpressionInvoker.h" + +using namespace Caf; + +CHeaderExpressionInvoker::CHeaderExpressionInvoker() : + _isInitialized(false), + CAF_CM_INIT("CHeaderExpressionInvoker") { +} + +CHeaderExpressionInvoker::~CHeaderExpressionInvoker() { +} + +void CHeaderExpressionInvoker::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + CAF_CM_FUNCNAME("initializeBean"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_ASSERT(ctorArgs.size() == 0); + CAF_CM_ASSERT(properties.size() == 0); + _isInitialized = true; +} + +void CHeaderExpressionInvoker::terminateBean() { +} + +SmartPtrIVariant CHeaderExpressionInvoker::invokeExpression( + const std::string& methodName, + const Cdeqstr& methodParams, + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME("invokeExpression"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(methodName); + CAF_CM_VALIDATE_STL(methodParams); + CAF_CM_VALIDATE_INTERFACE(message); + + SmartPtrIVariant result; + const IIntMessage::SmartPtrCHeaders& headers = message->getHeaders(); + if (methodName == "containsKey") { + CAF_CM_ASSERT(1 == methodParams.size()); + result = CVariant::createBool(headers->end() != headers->find(methodParams.front())); + } else if (methodName == "notContainsKey") { + CAF_CM_ASSERT(1 == methodParams.size()); + result = CVariant::createBool(headers->end() == headers->find(methodParams.front())); + } else if (methodName == "toString") { + CAF_CM_ASSERT(1 == methodParams.size()); + const SmartPtrIVariant value = message->findRequiredHeader(methodParams.front()); + result = CVariant::createString(value->toString()); + } else if (methodName == "prependToString") { + CAF_CM_ASSERT(2 == methodParams.size()); + const SmartPtrIVariant value = message->findRequiredHeader(methodParams.front()); + result = CVariant::createString(methodParams.back() + value->toString()); + } else if (methodName == "appendToString") { + CAF_CM_ASSERT(2 == methodParams.size()); + const SmartPtrIVariant value = message->findRequiredHeader(methodParams.front()); + result = CVariant::createString(value->toString() + methodParams.back()); + } else if (methodName == "isEqualString") { + CAF_CM_ASSERT(2 == methodParams.size()); + const SmartPtrIVariant value = message->findRequiredHeader(methodParams.front()); + result = CVariant::createBool(value->toString().compare(methodParams.back()) == 0); + } else if (methodName == "isNotEqualString") { + CAF_CM_ASSERT(2 == methodParams.size()); + const SmartPtrIVariant value = message->findRequiredHeader(methodParams.front()); + result = CVariant::createBool(value->toString().compare(methodParams.back()) != 0); + } else { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchMethodException, + 0, + "%s", + methodName.c_str()); + } + return result; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CHeaderExpressionInvoker.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CHeaderExpressionInvoker.h new file mode 100644 index 000000000..ed3feac00 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CHeaderExpressionInvoker.h @@ -0,0 +1,52 @@ +/* + * Created on: Jul 23, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CHEADEREXPRESSIONINVOKER_H_ +#define CHEADEREXPRESSIONINVOKER_H_ + +namespace Caf { + +class CHeaderExpressionInvoker : + public TCafSubSystemObjectRoot, + public IBean, + public IExpressionInvoker { +public: + CHeaderExpressionInvoker(); + virtual ~CHeaderExpressionInvoker(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdHeaderExpressionInvoker) + + CAF_BEGIN_INTERFACE_MAP(CHeaderExpressionInvoker) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IExpressionInvoker) + CAF_END_INTERFACE_MAP() + +public: // IBean + void initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties); + + void terminateBean(); + +public: // IExpressionInvoker + SmartPtrIVariant invokeExpression( + const std::string& methodName, + const Cdeqstr& methodParams, + const SmartPtrIIntMessage& message); + +private: + bool _isInitialized; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CHeaderExpressionInvoker); +}; + +} + +#endif /* CHEADEREXPRESSIONINVOKER_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CHeaderValueRouterInstance.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CHeaderValueRouterInstance.cpp new file mode 100644 index 000000000..b338a5557 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CHeaderValueRouterInstance.cpp @@ -0,0 +1,202 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CHeaderValueRouterInstance.h" + +using namespace Caf; + +CHeaderValueRouterInstance::CHeaderValueRouterInstance() : + _isInitialized(false), + _resolutionRequired(false), + CAF_CM_INIT_LOG("CHeaderValueRouterInstance") { +} + +CHeaderValueRouterInstance::~CHeaderValueRouterInstance() { +} + +void CHeaderValueRouterInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + _headerName = configSection->findRequiredAttribute("header-name"); + _defaultOutputChannelId = + configSection->findOptionalAttribute("default-output-channel"); + + const std::string resolutionRequiredStr = configSection->findOptionalAttribute("resolution-required"); + _resolutionRequired = + (resolutionRequiredStr.empty() || resolutionRequiredStr.compare("true") == 0) ? true : false; + + const IDocument::SmartPtrCChildCollection childCollection = configSection->getAllChildren(); + for(TConstIterator childIter(*childCollection); childIter; childIter++) { + const std::string sectionName = childIter->first; + if (sectionName.compare("mapping") == 0) { + const SmartPtrIDocument document = childIter->second; + const std::string value = document->findRequiredAttribute("value"); + const std::string channel = document->findRequiredAttribute("channel"); + _valueToChannelMapping.insert(std::make_pair(value, channel)); + } + } + + if (_valueToChannelMapping.empty()) { + CAF_CM_EXCEPTIONEX_VA1(NoSuchElementException, ERROR_NOT_FOUND, + "No mapping sections found - %s", _id.c_str()); + } + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +std::string CHeaderValueRouterInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _id; + } + CAF_CM_EXIT; + + return rc; +} + +void CHeaderValueRouterInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME("wire"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + + _channelResolver = channelResolver; + + SmartPtrIMessageChannel defaultOutputChannel; + if (_defaultOutputChannelId.length()) { + try { + defaultOutputChannel = + _channelResolver->resolveChannelName(_defaultOutputChannelId); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_WARN_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + if (defaultOutputChannel) { + CAF_CM_LOG_INFO_VA2( + "Successfully resolved default channel - id: %s, defaultOutputChannelId: %s", + _id.c_str(), + _defaultOutputChannelId.c_str()); + } else { + CAF_CM_EXCEPTIONEX_VA2( + NoSuchElementException, + 0, + "Failed to resolve default channel - id: %s, defaultChannelId: %s", + _id.c_str(), + _defaultOutputChannelId.c_str()); + } + } + + CAbstractMessageRouter::init(defaultOutputChannel, false, -1); + } + CAF_CM_EXIT; +} + +CHeaderValueRouterInstance::ChannelCollection CHeaderValueRouterInstance::getTargetChannels( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME("getTargetChannels"); + + ChannelCollection messageChannels; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const std::string outputChannel = calcOutputChannel(message); + if (outputChannel.empty() && _defaultOutputChannelId.empty()) { + CAF_CM_EXCEPTIONEX_VA2(NoSuchElementException, ERROR_NOT_FOUND, + "Did not find output channel and default channel not " + "provided - id: %s, headerName: %s", + _id.c_str(), _headerName.c_str()); + } + + SmartPtrIMessageChannel messageChannel; + if (! outputChannel.empty()) { + try { + messageChannel = _channelResolver->resolveChannelName(outputChannel); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_WARN_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + + if (messageChannel.IsNull() && _resolutionRequired) { + CAF_CM_EXCEPTIONEX_VA3(NoSuchElementException, ERROR_NOT_FOUND, + "Failed to resolve channel when resolution is required - id: %s, " + "headerName: %s, outputChannel: %s", + _id.c_str(), _headerName.c_str(), outputChannel.c_str()); + } + + if (! messageChannel.IsNull()) { + CAF_CM_LOG_INFO_VA3( + "Successfully resolved channel - id: %s, headerName: %s, outputChannel: %s", + _id.c_str(), _headerName.c_str(), outputChannel.c_str()); + } + } + + if (messageChannel.IsNull() && _defaultOutputChannelId.empty()) { + CAF_CM_EXCEPTIONEX_VA3(NoSuchElementException, ERROR_NOT_FOUND, + "Failed to resolve channel when resolution is not required and default " + "channel is not available - id: %s, headerName: %s, outputChannel: %s", + _id.c_str(), _headerName.c_str(), outputChannel.c_str()); + } + + if (!messageChannel.IsNull()) { + messageChannels.push_back(messageChannel); + } + } + CAF_CM_EXIT; + + return messageChannels; +} + +std::string CHeaderValueRouterInstance::calcOutputChannel( + const SmartPtrIIntMessage& message) const { + CAF_CM_FUNCNAME_VALIDATE("calcOutputChannel"); + + std::string outputChannel; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(message); + + const std::string headerValue = message->findOptionalHeaderAsString(_headerName); + if (headerValue.empty()) { + CAF_CM_LOG_WARN_VA2("Header name not found in headers - id: %s, headerName: %s", + _id.c_str(), _headerName.c_str()); + } else { + const Cmapstrstr::const_iterator valueToChannelIter = + _valueToChannelMapping.find(headerValue); + if (valueToChannelIter == _valueToChannelMapping.end()) { + CAF_CM_LOG_WARN_VA3("Header name found in headers, but not config - id: %s, name: %s, val: %s", + _id.c_str(), _headerName.c_str(), headerValue.c_str()); + } else { + outputChannel = valueToChannelIter->second; + } + } + } + CAF_CM_EXIT; + + return outputChannel; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CHeaderValueRouterInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CHeaderValueRouterInstance.h new file mode 100644 index 000000000..1893bdc7e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CHeaderValueRouterInstance.h @@ -0,0 +1,67 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CHeaderValueRouterInstance_h_ +#define CHeaderValueRouterInstance_h_ + +namespace Caf { + +class CHeaderValueRouterInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public CAbstractMessageRouter +{ +public: + CHeaderValueRouterInstance(); + virtual ~CHeaderValueRouterInstance(); + + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(IMessageRouter) + CAF_END_QI() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +private: + ChannelCollection getTargetChannels( + const SmartPtrIIntMessage& message); + +private: + bool _isInitialized; + std::string _id; + std::string _defaultOutputChannelId; + bool _resolutionRequired; + std::string _headerName; + Cmapstrstr _valueToChannelMapping; + SmartPtrIChannelResolver _channelResolver; + +private: + std::string calcOutputChannel( + const SmartPtrIIntMessage& message) const; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CHeaderValueRouterInstance); +}; +CAF_DECLARE_SMART_QI_POINTER(CHeaderValueRouterInstance); +} + +#endif // #ifndef CHeaderValueRouterInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CIntegrationObjectFactory.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CIntegrationObjectFactory.cpp new file mode 100644 index 000000000..cb7b92f40 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CIntegrationObjectFactory.cpp @@ -0,0 +1,73 @@ +/* + * Created on: Aug 8, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CIntegrationObjectFactory.h" +#include "CObjectFactoryTables.h" +#include "CDirectChannelInstance.h" +#include "CQueueChannelInstance.h" + +CIntegrationObjectFactory::CIntegrationObjectFactory() : + CAF_CM_INIT("CIntegrationObjectFactory") { +} + +CIntegrationObjectFactory::~CIntegrationObjectFactory() { +} + +void CIntegrationObjectFactory::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + CAF_CM_VALIDATE_STL_EMPTY(properties); + _ctorArgs = ctorArgs; + _properties = properties; +} + +void CIntegrationObjectFactory::terminateBean() { +} + +bool CIntegrationObjectFactory::isResponsible( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("isResponsible"); + CAF_CM_VALIDATE_INTERFACE(configSection); + return CObjectFactoryTables::objectCreatorMap.find( + configSection->getName()) != CObjectFactoryTables::objectCreatorMap.end(); +} + +SmartPtrIIntegrationObject CIntegrationObjectFactory::createObject( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME("createObject"); + ObjectCreatorMap::const_iterator entry = + CObjectFactoryTables::objectCreatorMap.find(configSection->getName()); + CAF_CM_ASSERT(entry != CObjectFactoryTables::objectCreatorMap.end()); + + SmartPtrIIntegrationObject object; + if (entry->second) { + object = (entry->second)(); + } else if (configSection->getName() == "channel") { + if (configSection->findOptionalChild("queue")) { + SmartPtrCQueueChannelInstance channel; + channel.CreateInstance(); + object = channel; + } else { + SmartPtrCDirectChannelInstance channel; + channel.CreateInstance(); + object = channel; + } + } else { + CAF_CM_EXCEPTIONEX_VA1( + IllegalStateException, + 0, + "config section '%s' is not handled by this factory. report this as a bug.", + configSection->getName().c_str()); + } + + object->initialize(_ctorArgs, _properties, configSection); + return object; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CIntegrationObjectFactory.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CIntegrationObjectFactory.h new file mode 100644 index 000000000..b6f6f3bc1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CIntegrationObjectFactory.h @@ -0,0 +1,54 @@ +/* + * Created on: Aug 8, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CIntegrationObjectFactory_h +#define CIntegrationObjectFactory_h + +namespace Caf { + +class CIntegrationObjectFactory : + public TCafSubSystemObjectRoot, + public IBean, + public IIntegrationComponent { +public: + CIntegrationObjectFactory(); + virtual ~CIntegrationObjectFactory(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdIntegrationObjectFactory) + + CAF_BEGIN_INTERFACE_MAP(CIntegrationObjectFactory) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IIntegrationComponent) + CAF_END_INTERFACE_MAP() + +public: // IBean + void initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties); + + void terminateBean(); + +public: // IIntegrationComponent + bool isResponsible( + const SmartPtrIDocument& configSection) const; + + SmartPtrIIntegrationObject createObject( + const SmartPtrIDocument& configSection) const; + +private: + IBean::Cargs _ctorArgs; + IBean::Cprops _properties; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CIntegrationObjectFactory); +}; + +} + +#endif /* CIntegrationObjectFactory_h */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CLoggingChannelAdapterInstance.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CLoggingChannelAdapterInstance.cpp new file mode 100644 index 000000000..f6b48de55 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CLoggingChannelAdapterInstance.cpp @@ -0,0 +1,123 @@ +/* + * Created on: Jan 31, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CLoggingChannelAdapterInstance.h" + +using namespace Caf; + +CLoggingChannelAdapterInstance::CLoggingChannelAdapterInstance() : + _isInitialized(false), + _level(log4cpp::Priority::INFO), + _logFullMessage(false), + _category(NULL), + CAF_CM_INIT("CLoggingChannelAdapterInstance") { +} + +CLoggingChannelAdapterInstance::~CLoggingChannelAdapterInstance() { +} + +void CLoggingChannelAdapterInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + _category = &log4cpp::Category::getInstance(_id.c_str()); + std::string arg = configSection->findOptionalAttribute("level"); + if (!arg.empty()) { + if (g_ascii_strncasecmp(arg.c_str(), "crit", arg.length()) == 0) { + _level = log4cpp::Priority::CRIT; + } else if (g_ascii_strncasecmp(arg.c_str(), "error", arg.length()) == 0) { + _level = log4cpp::Priority::ERROR; + } else if (g_ascii_strncasecmp(arg.c_str(), "warn", arg.length()) == 0) { + _level = log4cpp::Priority::WARN; + } else if (g_ascii_strncasecmp(arg.c_str(), "info", arg.length()) == 0) { + _level = log4cpp::Priority::INFO; + } else if (g_ascii_strncasecmp(arg.c_str(), "debug", arg.length()) == 0) { + _level = log4cpp::Priority::DEBUG; + } else { + CAF_CM_EXCEPTIONEX_VA1( + InvalidArgumentException, + 0, + "'%s' is not a valid logging level. " + "Choices are 'debug', 'info', 'warn', 'error' and 'crit'", + arg.c_str()); + } + } + arg = configSection->findOptionalAttribute("log-full-message"); + if (!arg.empty()) { + if (g_ascii_strncasecmp(arg.c_str(), "true", arg.length()) == 0) { + _logFullMessage = true; + } else if (g_ascii_strncasecmp(arg.c_str(), "false", arg.length()) == 0) { + _logFullMessage = false; + } else { + CAF_CM_EXCEPTIONEX_VA1( + InvalidArgumentException, + 0, + "'%s' is not a valid log-full-message value. " + "Choices are 'true' and 'false'", + arg.c_str()); + } + } + + _isInitialized = true; +} + +std::string CLoggingChannelAdapterInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _id; +} + +void CLoggingChannelAdapterInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); +} + +void CLoggingChannelAdapterInstance::handleMessage(const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("handleMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + _savedMessage = message; + _category->log(_level, message->getPayloadStr().c_str()); + if (_logFullMessage) { + IIntMessage::SmartPtrCHeaders headers = message->getHeaders(); + for (IIntMessage::CHeaders::const_iterator headerIter = headers->begin(); + headerIter != headers->end(); + headerIter++) { + std::stringstream logMessage; + logMessage << '[' + << headerIter->first + << '=' + << headerIter->second.first->toString() + << ']'; + _category->log(_level, logMessage.str()); + } + } +} + +SmartPtrIIntMessage CLoggingChannelAdapterInstance::getSavedMessage() const { + CAF_CM_FUNCNAME_VALIDATE("getSavedMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _savedMessage; +} + +void CLoggingChannelAdapterInstance::clearSavedMessage() { + CAF_CM_FUNCNAME_VALIDATE("clearSavedMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _savedMessage = NULL; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CLoggingChannelAdapterInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CLoggingChannelAdapterInstance.h new file mode 100644 index 000000000..fb7f86f67 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CLoggingChannelAdapterInstance.h @@ -0,0 +1,61 @@ +/* + * Created on: Jan 31, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CLOGGINGCHANNELADAPTERINSTANCE_H_ +#define CLOGGINGCHANNELADAPTERINSTANCE_H_ + +namespace Caf { + +class CLoggingChannelAdapterInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public IMessageHandler { +public: + CLoggingChannelAdapterInstance(); + virtual ~CLoggingChannelAdapterInstance(); + + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(IMessageHandler) + CAF_END_QI() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // IMessageHandler + void handleMessage(const SmartPtrIIntMessage& message); + SmartPtrIIntMessage getSavedMessage() const; + void clearSavedMessage(); + +private: + bool _isInitialized; + std::string _id; + log4cpp::Priority::PriorityLevel _level; + bool _logFullMessage; + log4cpp::Category* _category; + SmartPtrIIntMessage _savedMessage; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CLoggingChannelAdapterInstance); +}; +CAF_DECLARE_SMART_QI_POINTER(CLoggingChannelAdapterInstance); +} + +#endif /* CLOGGINGCHANNELADAPTERINSTANCE_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CMessageHandlerChainInstance.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CMessageHandlerChainInstance.cpp new file mode 100644 index 000000000..211a922c2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CMessageHandlerChainInstance.cpp @@ -0,0 +1,458 @@ +/* + * Created on: Aug 10, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CMessageHandlerChainInstance.h" +#include "CObjectFactoryTables.h" + +using namespace Caf; + +CMessageHandlerChainInstance::CMessageHandlerChainInstance() : + _isInitialized(false), + _isRunning(false), + CAF_CM_INIT_LOG("CMessageHandlerChainInstance") { +} + +CMessageHandlerChainInstance::~CMessageHandlerChainInstance() { + if (_weakRefSelf) { + _weakRefSelf->setReference(NULL); + _weakRefSelf = NULL; + } +} + +void CMessageHandlerChainInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + _ctorArgs = ctorArgs; + _properties = properties; + _configSection = configSection; + _id = _configSection->findRequiredAttribute("id"); + _isInitialized = true; +} + +std::string CMessageHandlerChainInstance::getId() const { + return _id; +} + +void CMessageHandlerChainInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME("wire"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + + // no point in doing a bunch of work if there are no chained components + IDocument::SmartPtrCOrderedChildCollection handlerConfigs = + _configSection->getAllChildrenInOrder(); + if (!handlerConfigs->size()) { + CAF_CM_EXCEPTIONEX_VA1(NoSuchElementException, 0, + "No message handlers are present in the chain '%s'", _id.c_str()); + } + + // an input channel is required + const std::string inputChannelId = _configSection->findRequiredAttribute( + "input-channel"); + SmartPtrIMessageChannel inputChannel = channelResolver->resolveChannelName( + inputChannelId); + SmartPtrIPollableChannel inputPollableChannel; + inputPollableChannel.QueryInterface(inputChannel, false); + _subscribableInputChannel.QueryInterface(inputChannel, false); + if (!inputPollableChannel && !_subscribableInputChannel) { + CAF_CM_EXCEPTIONEX_VA1(NoSuchInterfaceException, 0, + "Input channel '%s' does not support any required interfaces", + inputChannelId.c_str()); + } + + // an output channel may be required - we'll figure it out in a bit + const std::string outputChannelId = _configSection->findOptionalAttribute( + "output-channel"); + SmartPtrIMessageChannel outputChannel; + if (outputChannelId.length()) { + outputChannel = channelResolver->resolveChannelName(outputChannelId); + } + + // build up a collection of messaging objects comprising the chain + ChainLinks chainLinks; + for (TSmartConstIterator handlerConfig( + *handlerConfigs); handlerConfig; handlerConfig++) { + CAF_CM_LOG_DEBUG_VA2("Found handler config '%s' chain '%s'", + handlerConfig->getName().c_str(), _id.c_str()); + const std::string& handlerType = handlerConfig->getName(); + MessageHandlerObjectCreatorMap::const_iterator handlerMapEntry = + CObjectFactoryTables::messageHandlerObjectCreatorMap.find(handlerType); + if (handlerMapEntry + == CObjectFactoryTables::messageHandlerObjectCreatorMap.end()) { + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, 0, + "Message handler type '%s' is not allowed to be part of a chain", + handlerType.c_str()); + } + + // Get the messaging object + std::string messageHandlerId; + SmartPtrICafObject messageHandlerObj; + + if (handlerMapEntry->second.first) { + SmartPtrIIntegrationObject intObj; + intObj = (handlerMapEntry->second.first)(); + intObj->initialize(_ctorArgs, _properties, *handlerConfig); + messageHandlerId = intObj->getId(); + messageHandlerObj = intObj; + } else { + messageHandlerId = handlerConfig->findRequiredAttribute("id"); + const std::string refStr = handlerConfig->findRequiredAttribute("ref"); + SmartPtrIBean bean = appContext->getBean(refStr); + SmartPtrIIntegrationComponent integrationComponent; + integrationComponent.QueryInterface(bean, false); + if (integrationComponent) { + messageHandlerObj = integrationComponent->createObject(*handlerConfig); + } else { + messageHandlerObj = bean; + } + } + + // Create a partially initialized chain link. + SmartPtrChainedMessageHandler handler; + handler.CreateInstance(); + handler->setId(messageHandlerId); + handler->setMessageHandler(messageHandlerObj); + + SmartPtrChainLink chainLink; + chainLink.CreateInstance(); + chainLink->handler = handler; + chainLink->id = messageHandlerId; + chainLink->isMessageProducer = handlerMapEntry->second.second; + chainLinks.push_back(chainLink); + CAF_CM_LOG_DEBUG_VA2("Adding message handler '%s' to chain '%s'", + messageHandlerId.c_str(), _id.c_str()); + } + + // Configure the chain links. + // All handlers in the chain except for the last one must be message producers. + // If the last object is a message producer than the output-channel must be set. + for (size_t i = 0; i < chainLinks.size(); ++i) { + SmartPtrChainLink chainLink = chainLinks[i]; + if (i < chainLinks.size() - 1) { + if (!chainLink->isMessageProducer) { + CAF_CM_EXCEPTIONEX_VA2(InvalidArgumentException, 0, + "Handler '%s' in chain '%s' is not a message producer. " + "All handlers except for the last one in the chain must " + "be message producers.", chainLink->id.c_str(), _id.c_str()); + } + + SmartPtrInterconnectChannel nextChannel; + nextChannel.CreateInstance(); + nextChannel->init(chainLinks[i + 1]->handler); + chainLink->handler->setOutputChannel(nextChannel); + } else { + if (outputChannel && !chainLink->isMessageProducer) { + CAF_CM_EXCEPTIONEX_VA2(InvalidArgumentException, 0, + "Handler '%s' in chain '%s' - " + "An output channel was provided but the last handler " + "in the chain is not a message producer.", chainLink->id.c_str(), + _id.c_str()); + } else if (!outputChannel && chainLink->isMessageProducer) { + CAF_CM_EXCEPTIONEX_VA2(InvalidArgumentException, 0, + "Handler '%s' in chain '%s' - " + "An output channel was not provided but the last handler " + "in the chain is a message producer.", chainLink->id.c_str(), + _id.c_str()); + } + if (chainLink->isMessageProducer) { + chainLink->handler->setOutputChannel(outputChannel); + } + } + } + + // Initialize the chain link handlers and store them + // in this object's state + for (TSmartConstIterator chainLink(chainLinks); chainLink; chainLink++) { + chainLink->handler->init(appContext, channelResolver); + _messageHandlers.push_back(chainLink->handler); + } + + _weakRefSelf.CreateInstance(); + _weakRefSelf->setReference(this); + + if (!_subscribableInputChannel) { + SmartPtrCErrorHandler errorHandler; + errorHandler.CreateInstance(); + errorHandler->initialize(channelResolver, + channelResolver->resolveChannelName("errorChannel")); + + SmartPtrCSourcePollingChannelAdapter channelAdapter; + channelAdapter.CreateInstance(); + channelAdapter->initialize(_weakRefSelf, inputPollableChannel, errorHandler); + + SmartPtrCSimpleAsyncTaskExecutor taskExecutor; + taskExecutor.CreateInstance(); + taskExecutor->initialize(channelAdapter, errorHandler); + + _taskExecutor = taskExecutor; + } +} + +void CMessageHandlerChainInstance::start(const uint32 timeoutMs) { + CAF_CM_FUNCNAME("start"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + if (_subscribableInputChannel) { + CAF_CM_LOG_DEBUG_VA1("Subscribing handler - %s", _id.c_str()); + _subscribableInputChannel->subscribe(_weakRefSelf); + } else if (_taskExecutor) { + CAF_CM_LOG_DEBUG_VA1("Executing task - %s", _id.c_str()); + _taskExecutor->execute(timeoutMs); + } else { + CAF_CM_EXCEPTIONEX_VA1(IllegalStateException, 0, + "handler '%s' : you should not see this. report this bug.", _id.c_str()); + } + _isRunning = true; +} + +void CMessageHandlerChainInstance::stop(const uint32 timeoutMs) { + CAF_CM_FUNCNAME("stop"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + try { + if (_subscribableInputChannel) { + CAF_CM_LOG_DEBUG_VA1("Unsubscribing handler - %s", _id.c_str()); + _subscribableInputChannel->subscribe(_weakRefSelf); + } else if (_taskExecutor) { + CAF_CM_LOG_DEBUG_VA1("Stopping task - %s", _id.c_str()); + _taskExecutor->cancel(timeoutMs); + } else { + CAF_CM_EXCEPTIONEX_VA1(IllegalStateException, 0, + "handler '%s' : you should not see this. report this bug.", _id.c_str()); + } + } + CAF_CM_CATCH_ALL; + _weakRefSelf->setReference(NULL); + _isRunning = false; + CAF_CM_THROWEXCEPTION; +} + +bool CMessageHandlerChainInstance::isRunning() const { + CAF_CM_FUNCNAME_VALIDATE("isRunning"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _isRunning; +} + +void CMessageHandlerChainInstance::handleMessage(const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME("handleMessage"); + + try { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STL(_messageHandlers); + CAF_CM_VALIDATE_INTERFACE(message); + //logMessage(message); + + for (TSmartConstIterator messageHandlerIter(_messageHandlers); + messageHandlerIter; messageHandlerIter++) { + const SmartPtrChainedMessageHandler messageHandler = *messageHandlerIter; + CAF_CM_VALIDATE_SMARTPTR(messageHandler); + messageHandler->clearSavedMessage(); + } + + _savedMessage = message; + CAF_CM_VALIDATE_SMARTPTR(_messageHandlers.front()); + _messageHandlers.front()->handleMessage(message); + } + CAF_CM_CATCH_ALL; + + try { + for (TSmartConstIterator messageHandlerIter(_messageHandlers); + messageHandlerIter; messageHandlerIter++) { + const SmartPtrChainedMessageHandler messageHandler = *messageHandlerIter; + CAF_CM_VALIDATE_SMARTPTR(messageHandler); + const SmartPtrIIntMessage savedMessage = messageHandler->getSavedMessage(); + if (!savedMessage.IsNull()) { + _savedMessage = savedMessage; + } + } + } + CAF_CM_CATCH_ALL; + CAF_CM_THROWEXCEPTION; +} + +SmartPtrIIntMessage CMessageHandlerChainInstance::getSavedMessage() const { + CAF_CM_FUNCNAME_VALIDATE("getSavedMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _savedMessage; +} + +void CMessageHandlerChainInstance::clearSavedMessage() { + CAF_CM_FUNCNAME_VALIDATE("clearSavedMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _savedMessage = NULL; +} + +CMessageHandlerChainInstance::ChainedMessageHandler::ChainedMessageHandler() : + _isInitialized(false), + CAF_CM_INIT("CMessageHandlerChainInstance::ChainedMessageHandler") { +} + +void CMessageHandlerChainInstance::ChainedMessageHandler::init( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + CAF_CM_VALIDATE_STRING(_id); + CAF_CM_VALIDATE_INTERFACE(_messageHandlerObj); + // output channel is optional + + // The underlying component may need to be wired + SmartPtrIIntegrationComponentInstance intInstance; + intInstance.QueryInterface(_messageHandlerObj, false); + if (intInstance) { + intInstance->wire(appContext, channelResolver); + } + + _messageHandler.CreateInstance(); + _messageHandler->initialize(_id, _outputChannel, _messageHandlerObj); + _isInitialized = true; +} +void CMessageHandlerChainInstance::ChainedMessageHandler::setId(const std::string& id) { + CAF_CM_FUNCNAME_VALIDATE("setId"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(id); + _id = id; +} + +void CMessageHandlerChainInstance::ChainedMessageHandler::setOutputChannel( + const SmartPtrIMessageChannel& channel) { + CAF_CM_FUNCNAME_VALIDATE("setOutputChannel"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(channel); + _outputChannel = channel; +} + +void CMessageHandlerChainInstance::ChainedMessageHandler::setMessageHandler( + const SmartPtrICafObject& handlerObj) { + CAF_CM_FUNCNAME_VALIDATE("setMessageHandler"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(handlerObj); + _messageHandlerObj = handlerObj; +} + +void CMessageHandlerChainInstance::ChainedMessageHandler::handleMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("handleMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + //logMessage(message); + _messageHandler->handleMessage(message); +} + +SmartPtrIIntMessage CMessageHandlerChainInstance::ChainedMessageHandler::getSavedMessage() const { + CAF_CM_FUNCNAME_VALIDATE("getSavedMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _messageHandler->getSavedMessage(); +} + +void CMessageHandlerChainInstance::ChainedMessageHandler::clearSavedMessage() { + CAF_CM_FUNCNAME_VALIDATE("clearSavedMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _messageHandler->clearSavedMessage(); +} + +CMessageHandlerChainInstance::InterconnectChannel::InterconnectChannel() : + CAF_CM_INIT("CMessageHandlerChainInstance::InterconnectChannel") { +} + +CMessageHandlerChainInstance::InterconnectChannel::~InterconnectChannel() { +} + +void CMessageHandlerChainInstance::InterconnectChannel::init( + const SmartPtrChainedMessageHandler& nextHandler) { + _nextHandler = nextHandler; +} + +bool CMessageHandlerChainInstance::InterconnectChannel::send( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("send"); + CAF_CM_VALIDATE_SMARTPTR(_nextHandler); + _nextHandler->handleMessage(message); + return true; +} + +bool CMessageHandlerChainInstance::InterconnectChannel::send( + const SmartPtrIIntMessage& message, + const int32 timeout) { + return send(message); +} + +CMessageHandlerChainInstance::SelfWeakReference::SelfWeakReference() : + _reference(NULL) { + CAF_CM_INIT_THREADSAFE; +} + +void CMessageHandlerChainInstance::SelfWeakReference::setReference( + IMessageHandler *handler) { + CAF_CM_LOCK_UNLOCK; + _reference = handler; +} + +void CMessageHandlerChainInstance::SelfWeakReference::handleMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_LOCK_UNLOCK; + if (_reference) { + _reference->handleMessage(message); + } +} + +SmartPtrIIntMessage CMessageHandlerChainInstance::SelfWeakReference::getSavedMessage() const { + CAF_CM_LOCK_UNLOCK; + SmartPtrIIntMessage savedMessage; + if (_reference) { + savedMessage = _reference->getSavedMessage(); + } + + return savedMessage; +} + +void CMessageHandlerChainInstance::SelfWeakReference::clearSavedMessage() { + CAF_CM_LOCK_UNLOCK; + if (_reference) { + _reference->clearSavedMessage(); + } +} + +void CMessageHandlerChainInstance::logMessage( + const SmartPtrIIntMessage& message) const { + CAF_CM_FUNCNAME_VALIDATE("logMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const std::string prefix = _id.empty() ? "NULL" : _id; + if (message.IsNull()) { + CAF_CM_LOG_DEBUG_VA1("%s - NULL Message", prefix.c_str()); + } else { + CAF_CM_LOG_DEBUG_VA2("%s - payload: %s", prefix.c_str(), + message->getPayloadStr().c_str()); + CMessageHeaderUtils::log(message->getHeaders()); + } +} + +void CMessageHandlerChainInstance::ChainedMessageHandler::logMessage( + const SmartPtrIIntMessage& message) const { + CAF_CM_STATIC_FUNC_LOG_ONLY("ChainedMessageHandler", "logMessage"); + + const std::string prefix = _id.empty() ? "NULL" : _id; + if (message.IsNull()) { + CAF_CM_LOG_DEBUG_VA1("%s - NULL Message", prefix.c_str()); + } else { + CAF_CM_LOG_DEBUG_VA2("%s - payload: %s", prefix.c_str(), + message->getPayloadStr().c_str()); + CMessageHeaderUtils::log(message->getHeaders()); + } +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CMessageHandlerChainInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CMessageHandlerChainInstance.h new file mode 100644 index 000000000..b1e24c937 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CMessageHandlerChainInstance.h @@ -0,0 +1,152 @@ +/* + * Created on: Aug 10, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CMessageHandlerChainInstance_h +#define CMessageHandlerChainInstance_h + +namespace Caf { + +class CMessageHandlerChainInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public ILifecycle, + public IMessageHandler +{ +public: + CMessageHandlerChainInstance(); + virtual ~CMessageHandlerChainInstance(); + + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(ILifecycle) + CAF_QI_ENTRY(IMessageHandler) + CAF_END_QI() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ILifecycle + void start(const uint32 timeoutMs); + void stop(const uint32 timeoutMs); + bool isRunning() const; + +public: // IMessageHandler + void handleMessage( + const SmartPtrIIntMessage& message); + SmartPtrIIntMessage getSavedMessage() const; + void clearSavedMessage(); + +private: + void logMessage(const SmartPtrIIntMessage& message) const; + +private: + class ChainedMessageHandler { + public: + ChainedMessageHandler(); + + void init( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + void setId(const std::string& id); + void setOutputChannel(const SmartPtrIMessageChannel& channel); + void setMessageHandler(const SmartPtrICafObject& handlerObj); + void handleMessage(const SmartPtrIIntMessage& message); + SmartPtrIIntMessage getSavedMessage() const; + void clearSavedMessage(); + + private: + void logMessage(const SmartPtrIIntMessage& message) const; + + private: + bool _isInitialized; + std::string _id; + SmartPtrIMessageChannel _outputChannel; + SmartPtrICafObject _messageHandlerObj; + SmartPtrCMessageHandler _messageHandler; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(ChainedMessageHandler); + }; + CAF_DECLARE_SMART_POINTER(ChainedMessageHandler); + typedef std::deque MessageHandlers; + + class InterconnectChannel : public IMessageChannel { + public: + InterconnectChannel(); + virtual ~InterconnectChannel(); + void init(const SmartPtrChainedMessageHandler& nextHandler); + bool send( + const SmartPtrIIntMessage& message); + bool send( + const SmartPtrIIntMessage& message, + const int32 timeout); + + private: + SmartPtrChainedMessageHandler _nextHandler; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(InterconnectChannel); + }; + CAF_DECLARE_SMART_POINTER(InterconnectChannel); + + struct ChainLink { + CMessageHandlerChainInstance::SmartPtrChainedMessageHandler handler; + std::string id; + bool isMessageProducer; + }; + CAF_DECLARE_SMART_POINTER(ChainLink); + typedef std::vector ChainLinks; + + class SelfWeakReference : public IMessageHandler { + public: + SelfWeakReference(); + void setReference(IMessageHandler *handler); + public: // IMessageHandler + void handleMessage( + const SmartPtrIIntMessage& message); + SmartPtrIIntMessage getSavedMessage() const; + void clearSavedMessage(); + private: + IMessageHandler *_reference; + CAF_CM_CREATE_THREADSAFE; + }; + CAF_DECLARE_SMART_POINTER(SelfWeakReference); + +private: + bool _isInitialized; + bool _isRunning; + IBean::Cargs _ctorArgs; + IBean::Cprops _properties; + SmartPtrIDocument _configSection; + std::string _id; + SmartPtrISubscribableChannel _subscribableInputChannel; + SmartPtrITaskExecutor _taskExecutor; + SmartPtrSelfWeakReference _weakRefSelf; + MessageHandlers _messageHandlers; + SmartPtrIIntMessage _savedMessage; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CMessageHandlerChainInstance); +}; + +CAF_DECLARE_SMART_QI_POINTER(CMessageHandlerChainInstance); + +} + +#endif /* CMessageHandlerChainInstance_h */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CNullChannel.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CNullChannel.cpp new file mode 100644 index 000000000..9dd1dda4a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CNullChannel.cpp @@ -0,0 +1,87 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CNullChannel.h" +#include "CNullChannelInstance.h" + +using namespace Caf; + +CNullChannel::CNullChannel() : + _isInitialized(false), + CAF_CM_INIT("CNullChannel") { +} + +CNullChannel::~CNullChannel() { +} + +void CNullChannel::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + CAF_CM_VALIDATE_STL_EMPTY(properties); + _ctorArgs = ctorArgs; + _properties = properties; + initialize(); + } + CAF_CM_EXIT; +} + +void CNullChannel::terminateBean() { +} + +void CNullChannel::initialize() { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +bool CNullChannel::isResponsible( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("isResponsible"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + } + CAF_CM_EXIT; + + return false; +} + +SmartPtrIIntegrationObject CNullChannel::createObject( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("createObject"); + + SmartPtrIIntegrationObject rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + // configSection is optional + + SmartPtrCNullChannelInstance instance; + instance.CreateInstance(); + instance->initialize(_ctorArgs, _properties, configSection); + rc.QueryInterface(instance, false); + CAF_CM_VALIDATE_INTERFACE(rc); + } + CAF_CM_EXIT; + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CNullChannel.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CNullChannel.h new file mode 100644 index 000000000..9ea3d1170 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CNullChannel.h @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CNullChannel_h_ +#define CNullChannel_h_ + +namespace Caf { + +/// Sends responses/errors back to the client. +class CNullChannel : + public TCafSubSystemObjectRoot, + public IBean, + public IIntegrationComponent +{ +public: + CNullChannel(); + virtual ~CNullChannel(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdNullChannel) + + CAF_BEGIN_INTERFACE_MAP(CNullChannel) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IIntegrationComponent) + CAF_END_INTERFACE_MAP() + +public: + void initialize(); + +public: // IBean + void initializeBean(const IBean::Cargs& ctorArgs, const IBean::Cprops& properties); + void terminateBean(); + +public: // IIntegrationComponent + bool isResponsible( + const SmartPtrIDocument& configSection) const; + + SmartPtrIIntegrationObject createObject( + const SmartPtrIDocument& configSection) const; + +private: + bool _isInitialized; + IBean::Cargs _ctorArgs; + IBean::Cprops _properties; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CNullChannel); +}; + +} + +#endif // #ifndef CNullChannel_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CNullChannelInstance.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CNullChannelInstance.cpp new file mode 100644 index 000000000..838e16ede --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CNullChannelInstance.cpp @@ -0,0 +1,80 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CNullChannelInstance.h" + +using namespace Caf; + +CNullChannelInstance::CNullChannelInstance() : + _isInitialized(false), + CAF_CM_INIT_LOG("CNullChannelInstance") { +} + +CNullChannelInstance::~CNullChannelInstance() { +} + +void CNullChannelInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + // configSection is optional + + _id = "nullChannel"; + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +std::string CNullChannelInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _id; + } + CAF_CM_EXIT; + + return rc; +} + +void CNullChannelInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + } + CAF_CM_EXIT; +} + +bool CNullChannelInstance::doSend( + const SmartPtrIIntMessage& message, + int32 timeout) { + CAF_CM_FUNCNAME_VALIDATE("doSend"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + CAF_CM_LOG_WARN_VA1("Received message - %s", message->getPayloadStr().c_str()); + } + CAF_CM_EXIT; + return true; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CNullChannelInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CNullChannelInstance.h new file mode 100644 index 000000000..c09843c97 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CNullChannelInstance.h @@ -0,0 +1,61 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CNullChannelInstance_h_ +#define CNullChannelInstance_h_ + +namespace Caf { + +/// Sends responses/errors back to the client. +class CNullChannelInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public CAbstractMessageChannel +{ +public: + CNullChannelInstance(); + virtual ~CNullChannelInstance(); + + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(IMessageChannel) + CAF_QI_ENTRY(IChannelInterceptorSupport) + CAF_END_QI() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +protected: // CAbstractMessageChannel + bool doSend( + const SmartPtrIIntMessage& message, + int32 timeout); + +private: + bool _isInitialized; + std::string _id; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CNullChannelInstance); +}; +CAF_DECLARE_SMART_QI_POINTER(CNullChannelInstance); +} + +#endif // #ifndef CNullChannelInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CObjectFactoryTables.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CObjectFactoryTables.cpp new file mode 100644 index 000000000..5435cbfc8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CObjectFactoryTables.cpp @@ -0,0 +1,157 @@ +/* + * Created on: Aug 13, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CObjectFactoryTables.h" +#include "CServiceActivatorInstance.h" +#include "CWireTapInstance.h" +#include "CPublishSubscribeChannelInstance.h" +#include "CFileInboundChannelAdapterInstance.h" +#include "CFileOutboundChannelAdapterInstance.h" +#include "CFileToStringTransformerInstance.h" +#include "CHeaderEnricherTransformerInstance.h" +#include "CHeaderValueRouterInstance.h" +#include "CPayloadContentRouterInstance.h" +#include "CLoggingChannelAdapterInstance.h" +#include "CRecipientListRouterInstance.h" +#include "CMessageHandlerChainInstance.h" +#include "CRouterInstance.h" +#include "CXPathHeaderEnricherItem.h" +#include "CXPathHeaderEnricherTransformerInstance.h" + +using namespace Caf; + +const ObjectCreatorMap::value_type CObjectFactoryTables::objectCreatorEntries[] = { + ObjectCreatorMap::value_type( + "file-to-string-transformer", + CreateIntegrationObject), + ObjectCreatorMap::value_type( + "header-enricher", + CreateIntegrationObject), + ObjectCreatorMap::value_type( + "transformer", + CreateIntegrationObject), + ObjectCreatorMap::value_type( + "header-value-router", + CreateIntegrationObject), + ObjectCreatorMap::value_type( + "payload-content-router", + CreateIntegrationObject), + ObjectCreatorMap::value_type( + "splitter", + CreateIntegrationObject), + ObjectCreatorMap::value_type( + "service-activator", + CreateIntegrationObject), + ObjectCreatorMap::value_type( + "logging-channel-adapter", + CreateIntegrationObject), + ObjectCreatorMap::value_type( + "wire-tap", + CreateIntegrationObject), + ObjectCreatorMap::value_type( + "publish-subscribe-channel", + CreateIntegrationObject), + ObjectCreatorMap::value_type( + "file-inbound-channel-adapter", + CreateIntegrationObject), + ObjectCreatorMap::value_type( + "file-outbound-channel-adapter", + CreateIntegrationObject), + ObjectCreatorMap::value_type( + "channel", + NULL), + ObjectCreatorMap::value_type( + "recipient-list-router", + CreateIntegrationObject), + ObjectCreatorMap::value_type( + "chain", + CreateIntegrationObject), + ObjectCreatorMap::value_type( + "router", + CreateIntegrationObject), + ObjectCreatorMap::value_type( + "xpath-header-enricher", + CreateIntegrationObject), + }; + +const ObjectCreatorMap CObjectFactoryTables::objectCreatorMap( + objectCreatorEntries, + objectCreatorEntries + + (sizeof(objectCreatorEntries)/sizeof(objectCreatorEntries[0]))); + + +const MessageHandlerObjectCreatorMap::value_type + CObjectFactoryTables::messageHandlerObjectCreatorEntries[] = { + MessageHandlerObjectCreatorMap::value_type( + "service-activator", + MessageHandlerObjectCreatorMap::mapped_type( + NULL, + true)), + MessageHandlerObjectCreatorMap::value_type( + "file-to-string-transformer", + MessageHandlerObjectCreatorMap::mapped_type( + CreateIntegrationObject, + true)), + MessageHandlerObjectCreatorMap::value_type( + "header-enricher", + MessageHandlerObjectCreatorMap::mapped_type( + CreateIntegrationObject, + true)), + MessageHandlerObjectCreatorMap::value_type( + "header-value-router", + MessageHandlerObjectCreatorMap::mapped_type( + CreateIntegrationObject, + false)), + MessageHandlerObjectCreatorMap::value_type( + "payload-content-router", + MessageHandlerObjectCreatorMap::mapped_type( + CreateIntegrationObject, + false)), + MessageHandlerObjectCreatorMap::value_type( + "logging-channel-adapter", + MessageHandlerObjectCreatorMap::mapped_type( + CreateIntegrationObject, + false)), + MessageHandlerObjectCreatorMap::value_type( + "splitter", + MessageHandlerObjectCreatorMap::mapped_type( + NULL, + true)), + MessageHandlerObjectCreatorMap::value_type( + "transformer", + MessageHandlerObjectCreatorMap::mapped_type( + NULL, + true)), + MessageHandlerObjectCreatorMap::value_type( + "recipient-list-router", + MessageHandlerObjectCreatorMap::mapped_type( + CreateIntegrationObject, + false)), + MessageHandlerObjectCreatorMap::value_type( + "router", + MessageHandlerObjectCreatorMap::mapped_type( + CreateIntegrationObject, + false)), + MessageHandlerObjectCreatorMap::value_type( + "file-outbound-channel-adapter", + MessageHandlerObjectCreatorMap::mapped_type( + CreateIntegrationObject, + false)), + MessageHandlerObjectCreatorMap::value_type( + "xpath-header-enricher", + MessageHandlerObjectCreatorMap::mapped_type( + CreateIntegrationObject, + true)) + }; + +const MessageHandlerObjectCreatorMap CObjectFactoryTables::messageHandlerObjectCreatorMap( + messageHandlerObjectCreatorEntries, + messageHandlerObjectCreatorEntries + + (sizeof(messageHandlerObjectCreatorEntries)/ + sizeof(messageHandlerObjectCreatorEntries[0]))); diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CObjectFactoryTables.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CObjectFactoryTables.h new file mode 100644 index 000000000..8edf6aafa --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CObjectFactoryTables.h @@ -0,0 +1,24 @@ +/* + * Created on: Aug 13, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CObjectFactoryTables_h +#define CObjectFactoryTables_h + +namespace Caf { + +struct CObjectFactoryTables { + static const ObjectCreatorMap objectCreatorMap; + static const ObjectCreatorMap::value_type objectCreatorEntries[]; + + static const MessageHandlerObjectCreatorMap messageHandlerObjectCreatorMap; + static const MessageHandlerObjectCreatorMap::value_type messageHandlerObjectCreatorEntries[]; +}; + +} + +#endif /* CObjectFactoryTables_h */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CPayloadContentRouterInstance.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CPayloadContentRouterInstance.cpp new file mode 100644 index 000000000..eb21d7b30 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CPayloadContentRouterInstance.cpp @@ -0,0 +1,200 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CPayloadContentRouterInstance.h" + +using namespace Caf; + +CPayloadContentRouterInstance::CPayloadContentRouterInstance() : + _isInitialized(false), + _resolutionRequired(false), + CAF_CM_INIT_LOG("CPayloadContentRouterInstance") { +} + +CPayloadContentRouterInstance::~CPayloadContentRouterInstance() { +} + +void CPayloadContentRouterInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + _defaultOutputChannelId = configSection->findOptionalAttribute("default-output-channel"); + + const std::string resolutionRequiredStr = configSection->findOptionalAttribute("resolution-required"); + _resolutionRequired = + (resolutionRequiredStr.empty() || resolutionRequiredStr.compare("true") == 0) ? true : false; + + const IDocument::SmartPtrCChildCollection childCollection = configSection->getAllChildren(); + for(TConstIterator childIter(*childCollection); childIter; childIter++) { + const std::string sectionName = childIter->first; + if (sectionName.compare("mapping") == 0) { + const SmartPtrIDocument document = childIter->second; + const std::string value = document->findRequiredAttribute("value"); + const std::string channel = document->findRequiredAttribute("channel"); + _valueToChannelMapping.insert(std::make_pair(value, channel)); + } + } + + if (_valueToChannelMapping.empty()) { + CAF_CM_EXCEPTIONEX_VA1(NoSuchElementException, ERROR_NOT_FOUND, + "No mapping sections found - %s", _id.c_str()); + } + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +std::string CPayloadContentRouterInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _id; + } + CAF_CM_EXIT; + + return rc; +} + +void CPayloadContentRouterInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME("wire"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + + _channelResolver = channelResolver; + + SmartPtrIMessageChannel defaultOutputChannel; + if (_defaultOutputChannelId.length()) { + try { + defaultOutputChannel = + _channelResolver->resolveChannelName(_defaultOutputChannelId); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_WARN_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + if (defaultOutputChannel) { + CAF_CM_LOG_INFO_VA2( + "Successfully resolved default channel - id: %s, defaultOutputChannelId: %s", + _id.c_str(), + _defaultOutputChannelId.c_str()); + } else { + CAF_CM_EXCEPTIONEX_VA2( + NoSuchElementException, + 0, + "Failed to resolve default channel - id: %s, defaultChannelId: %s", + _id.c_str(), + _defaultOutputChannelId.c_str()); + } + } + + CAbstractMessageRouter::init(defaultOutputChannel, false, -1); + } + CAF_CM_EXIT; +} + +CPayloadContentRouterInstance::ChannelCollection CPayloadContentRouterInstance::getTargetChannels( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME("getTargetChannels"); + + ChannelCollection messageChannels; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const IIntMessage::SmartPtrCHeaders headers = message->getHeaders(); + + const std::string outputChannel = calcOutputChannel(message->getPayload()); + + if (outputChannel.empty() && _defaultOutputChannelId.empty()) { + CAF_CM_EXCEPTIONEX_VA1(NoSuchElementException, ERROR_NOT_FOUND, + "Did not find output channel and default channel not provided - id: %s", _id.c_str()); + } + + SmartPtrIMessageChannel messageChannel; + if (! outputChannel.empty()) { + try { + messageChannel = _channelResolver->resolveChannelName(outputChannel); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_WARN_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + + if (messageChannel.IsNull() && _resolutionRequired) { + CAF_CM_EXCEPTIONEX_VA2(NoSuchElementException, ERROR_NOT_FOUND, + "Failed to resolve channel when resolution is required - id: %s, outputChannel: %s", + _id.c_str(), outputChannel.c_str()); + } + + if (! messageChannel.IsNull()) { + CAF_CM_LOG_INFO_VA2( + "Successfully resolved channel - id: %s, outputChannel: %s", + _id.c_str(), outputChannel.c_str()); + } + } + + if (messageChannel.IsNull() && _defaultOutputChannelId.empty()) { + CAF_CM_EXCEPTIONEX_VA2(NoSuchElementException, ERROR_NOT_FOUND, + "Failed to resolve channel when resolution is not required and default channel is not available - id: %s, outputChannel: %s", + _id.c_str(), outputChannel.c_str()); + } + if (!messageChannel.IsNull()) { + messageChannels.push_back(messageChannel); + } + } + CAF_CM_EXIT; + + return messageChannels; +} + +std::string CPayloadContentRouterInstance::calcOutputChannel( + const SmartPtrCDynamicByteArray& payload) const { + CAF_CM_FUNCNAME_VALIDATE("calcOutputChannel"); + + std::string outputChannel; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(payload); + + const std::string payloadStr = reinterpret_cast(payload->getPtr()); + CAF_CM_VALIDATE_STRING(payloadStr); + + for(TConstIterator valueToChannelIter(_valueToChannelMapping); valueToChannelIter; valueToChannelIter++) { + const std::string value = valueToChannelIter->first; + + SmartPtrCCafRegex regex; + regex.CreateInstance(); + regex->initialize(value); + + if (regex->isMatched(payloadStr)) { + outputChannel = valueToChannelIter->second; + CAF_CM_LOG_DEBUG_VA2("Matched channel - regex: %s, channel: %s", value.c_str(), outputChannel.c_str()); + break; + } + } + } + CAF_CM_EXIT; + + return outputChannel; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CPayloadContentRouterInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CPayloadContentRouterInstance.h new file mode 100644 index 000000000..a24922380 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CPayloadContentRouterInstance.h @@ -0,0 +1,66 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CPayloadContentRouterInstance_h_ +#define CPayloadContentRouterInstance_h_ + +namespace Caf { + +class CPayloadContentRouterInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public CAbstractMessageRouter +{ +public: + CPayloadContentRouterInstance(); + virtual ~CPayloadContentRouterInstance(); + + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(IMessageRouter) + CAF_END_QI() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +private: // CAbstractMessageRouter + ChannelCollection getTargetChannels( + const SmartPtrIIntMessage& message); + +private: + bool _isInitialized; + std::string _id; + std::string _defaultOutputChannelId; + bool _resolutionRequired; + Cmapstrstr _valueToChannelMapping; + SmartPtrIChannelResolver _channelResolver; + +private: + std::string calcOutputChannel( + const SmartPtrCDynamicByteArray& payload) const; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CPayloadContentRouterInstance); +}; +CAF_DECLARE_SMART_QI_POINTER(CPayloadContentRouterInstance); +} + +#endif // #ifndef CPayloadContentRouterInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CPublishSubscribeChannelInstance.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CPublishSubscribeChannelInstance.cpp new file mode 100644 index 000000000..3aa96fbb8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CPublishSubscribeChannelInstance.cpp @@ -0,0 +1,129 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CPublishSubscribeChannelInstance.h" + +using namespace Caf; + +CPublishSubscribeChannelInstance::CPublishSubscribeChannelInstance() : + _isInitialized(false), + CAF_CM_INIT_LOG("CPublishSubscribeChannelInstance") { +} + +CPublishSubscribeChannelInstance::~CPublishSubscribeChannelInstance() { +} + +void CPublishSubscribeChannelInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _configSection = configSection; + _id = _configSection->findRequiredAttribute("id"); + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +std::string CPublishSubscribeChannelInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _id; + } + CAF_CM_EXIT; + + return rc; +} + +void CPublishSubscribeChannelInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + + const SmartPtrIMessageChannel errorMessageChannel = + channelResolver->resolveChannelName("errorChannel"); + + SmartPtrCErrorHandler errorHandler; + errorHandler.CreateInstance(); + errorHandler->initialize(channelResolver, errorMessageChannel); + + SmartPtrCBroadcastingDispatcher broadcastingDispatcher; + broadcastingDispatcher.CreateInstance(); + broadcastingDispatcher->initialize(errorHandler); + _messageDispatcher = broadcastingDispatcher; + } + CAF_CM_EXIT; +} + +void CPublishSubscribeChannelInstance::subscribe( + const SmartPtrIMessageHandler& messageHandler) { + CAF_CM_FUNCNAME_VALIDATE("subscribe"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(messageHandler); + + _messageDispatcher->addHandler(messageHandler); + } + CAF_CM_EXIT; +} + +void CPublishSubscribeChannelInstance::unsubscribe( + const SmartPtrIMessageHandler& messageHandler) { + CAF_CM_FUNCNAME_VALIDATE("unsubscribe"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(messageHandler); + + _messageDispatcher->removeHandler(messageHandler); + } + CAF_CM_EXIT; +} + +bool CPublishSubscribeChannelInstance::doSend( + const SmartPtrIIntMessage& message, + int32 timeout) { + CAF_CM_FUNCNAME("doSend"); + + bool sent = false; + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + if (timeout > 0) { + CAF_CM_EXCEPTIONEX_VA1(UnsupportedOperationException, E_INVALIDARG, + "Timeout not currently supported: %s", _id.c_str()); + } + + CAF_CM_LOG_DEBUG_VA1("Dispatching message - %s", _id.c_str()); + sent = _messageDispatcher->dispatch(message); + if (!sent) { + CAF_CM_LOG_ERROR_VA1("Nothing handled the message - channel: %s", _id.c_str()); + } + } + CAF_CM_EXIT; + return sent; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CPublishSubscribeChannelInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CPublishSubscribeChannelInstance.h new file mode 100644 index 000000000..f394c2c4b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CPublishSubscribeChannelInstance.h @@ -0,0 +1,74 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CPublishSubscribeChannelInstance_h_ +#define CPublishSubscribeChannelInstance_h_ + +namespace Caf { + +/// Sends responses/errors back to the client. +class CPublishSubscribeChannelInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public ISubscribableChannel, + public CAbstractMessageChannel +{ +public: + CPublishSubscribeChannelInstance(); + virtual ~CPublishSubscribeChannelInstance(); + + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(ISubscribableChannel) + CAF_QI_ENTRY(IMessageChannel) + CAF_QI_ENTRY(IChannelInterceptorSupport) + CAF_END_QI() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ISubscribableChannel + void subscribe( + const SmartPtrIMessageHandler& messageHandler); + + void unsubscribe( + const SmartPtrIMessageHandler& messageHandler); + +protected: // CAbstractMessageChannel + bool doSend( + const SmartPtrIIntMessage& message, + int32 timeout); + +private: + bool _isInitialized; + SmartPtrIDocument _configSection; + std::string _id; + SmartPtrIMessageDispatcher _messageDispatcher; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CPublishSubscribeChannelInstance); +}; + +CAF_DECLARE_SMART_QI_POINTER(CPublishSubscribeChannelInstance); + +} + +#endif // #ifndef CPublishSubscribeChannelInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CQueueChannelInstance.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CQueueChannelInstance.cpp new file mode 100644 index 000000000..ff2cf6762 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CQueueChannelInstance.cpp @@ -0,0 +1,115 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CQueueChannelInstance.h" + +using namespace Caf; + +CQueueChannelInstance::CQueueChannelInstance() : + _isInitialized(false), + CAF_CM_INIT_LOG("CQueueChannelInstance") { + CAF_CM_INIT_THREADSAFE; +} + +CQueueChannelInstance::~CQueueChannelInstance() { +} + +void CQueueChannelInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _configSection = configSection; + _id = _configSection->findRequiredAttribute("id"); + + setPollerMetadata(_configSection->findOptionalChild("poller")); + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +std::string CQueueChannelInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + + std::string id; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + id = _id; + } + CAF_CM_EXIT; + + return id; +} + +void CQueueChannelInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + } + CAF_CM_EXIT; +} + +bool CQueueChannelInstance::doSend( + const SmartPtrIIntMessage& message, + int32 timeout) { + CAF_CM_FUNCNAME("doSend"); + + CAF_CM_ENTER_AND_LOCK { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + if (timeout > 0) { + CAF_CM_EXCEPTIONEX_VA1(UnsupportedOperationException, E_INVALIDARG, + "Queue channel with timeout not currently supported: %s", _id.c_str()); + } + + CAF_CM_LOG_DEBUG_VA2("Queueing message %d - %s", _messageQueue.size(), _id.c_str()); + _messageQueue.push_front(message); + } + CAF_CM_UNLOCK_AND_EXIT; + return true; +} + +SmartPtrIIntMessage CQueueChannelInstance::doReceive(const int32 timeout) { + CAF_CM_FUNCNAME("doReceive"); + + SmartPtrIIntMessage message; + + CAF_CM_ENTER_AND_LOCK { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + if (timeout > 0) { + CAF_CM_EXCEPTIONEX_VA1(UnsupportedOperationException, E_INVALIDARG, + "Queue channel with timeout not currently supported: %s", _id.c_str()); + } + + if (! _messageQueue.empty()) { + CAF_CM_LOG_DEBUG_VA2("Receiving message %d - %s", _messageQueue.size(), _id.c_str()); + + message = _messageQueue.back(); + _messageQueue.pop_back(); + } + } + CAF_CM_UNLOCK_AND_EXIT; + + return message; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CQueueChannelInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CQueueChannelInstance.h new file mode 100644 index 000000000..184af1965 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CQueueChannelInstance.h @@ -0,0 +1,69 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CQueueChannelInstance_h_ +#define CQueueChannelInstance_h_ + +namespace Caf { + +/// Sends responses/errors back to the client. +class CQueueChannelInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public CAbstractPollableChannel +{ +public: + CQueueChannelInstance(); + virtual ~CQueueChannelInstance(); + + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(IPollableChannel) + CAF_QI_ENTRY(IMessageChannel) + CAF_QI_ENTRY(IChannelInterceptorSupport) + CAF_END_QI() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +protected: // CAbstractPollableChannel + bool doSend( + const SmartPtrIIntMessage& message, + int32 timeout); + + SmartPtrIIntMessage doReceive(const int32 timeout); + +private: + bool _isInitialized; + SmartPtrIDocument _configSection; + std::string _id; + std::deque _messageQueue; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_CREATE_THREADSAFE; + CAF_CM_DECLARE_NOCOPY(CQueueChannelInstance); +}; + +CAF_DECLARE_SMART_QI_POINTER(CQueueChannelInstance); + +} + +#endif // #ifndef CQueueChannelInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CRecipientListRouterInstance.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CRecipientListRouterInstance.cpp new file mode 100644 index 000000000..9931d14c6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CRecipientListRouterInstance.cpp @@ -0,0 +1,189 @@ +/* + * Created on: Aug 9, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CRecipientListRouterInstance.h" + +using namespace Caf; + +CRecipientListRouterInstance::CRecipientListRouterInstance() : + _isInitialized(false), + _ignoreSendFailures(false), + _timeout(-1), + CAF_CM_INIT_LOG("CRecipientListRouterInstance") { +} + +CRecipientListRouterInstance::~CRecipientListRouterInstance() { +} + +void CRecipientListRouterInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + + std::string val = configSection->findOptionalAttribute("timeout"); + if (val.length()) { + _timeout = CStringConv::fromString(val); + } + + val = configSection->findOptionalAttribute("ignore-send-failures"); + _ignoreSendFailures = (val == "true"); + + Csetstr channelIds; + const IDocument::SmartPtrCChildCollection childCollection = configSection->getAllChildren(); + for(TSmartConstMultimapIterator childIter(*childCollection); + childIter; + childIter++) { + const std::string sectionName = childIter.getKey(); + if (sectionName == "recipient") { + const SmartPtrIDocument document = *childIter; + const std::string channelId = document->findRequiredAttribute("channel"); + const std::string selectorExpression + = document->findOptionalAttribute("selector-expression"); + + if (!channelIds.insert(channelId).second) { + CAF_CM_EXCEPTIONEX_VA2( + DuplicateElementException, + 0, + "Duplicate channelId '%s' in " + "recipient-list-router definition '%s'", + channelId.c_str(), + _id.c_str()); + } + + if (selectorExpression.length()) { + _selectorDefinitions.insert( + Cmapstrstr::value_type(channelId, selectorExpression)); + } else { + _staticChannelIds.push_back(channelId); + } + } + } + + if (!_staticChannelIds.size() && !_selectorDefinitions.size()) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchElementException, + 0, + "No recipients were listed in the definition of " + "recipient-list-router '%s'", + _id.c_str()); + } + _isInitialized = true; + } + CAF_CM_EXIT; +} + +std::string CRecipientListRouterInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _id; + } + CAF_CM_EXIT; + + return rc; +} + +void CRecipientListRouterInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + + SmartPtrIAppConfig appConfig = getAppConfig(); + + for (TConstIterator channelId(_staticChannelIds); + channelId; + channelId++) { + _staticChannels.push_back( + channelResolver->resolveChannelName(*channelId)); + } + + for (TConstMapIterator selectorPair(_selectorDefinitions); + selectorPair; + selectorPair++) { + SmartPtrIMessageChannel channel = + channelResolver->resolveChannelName(selectorPair.getKey()); + SmartPtrCExpressionHandler handler; + handler.CreateInstance(); + handler->init( + appConfig, + appContext, + *selectorPair); + _selectorChannels.push_back(std::make_pair(handler, channel)); + } + + CAbstractMessageRouter::init( + SmartPtrIMessageChannel(), + _ignoreSendFailures, + _timeout); + } + CAF_CM_EXIT; +} + +CRecipientListRouterInstance::ChannelCollection +CRecipientListRouterInstance::getTargetChannels( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME("getTargetChannels"); + ChannelCollection channels; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + // Static channels always get the message + std::copy( + _staticChannels.begin(), + _staticChannels.end(), + std::back_inserter(channels)); + + // Execute the selector expression(s) on the message + // and add the channels for the expressions that return 'true' + for (TConstIterator selector(_selectorChannels); + selector; + selector++) { + SmartPtrIVariant evalResult = selector->first->evaluate(message); + if (evalResult->isBool()) { + if (CAF_CM_IS_LOG_DEBUG_ENABLED) { + CAF_CM_LOG_DEBUG_VA3( + "recipient-list-router [%s] selector-expression [%s] returned '%s'", + _id.c_str(), + selector->first->toString().c_str(), + evalResult->toString().c_str()); + } + if (g_variant_get_boolean(evalResult->get())) { + channels.push_back(selector->second); + } + } else { + CAF_CM_EXCEPTIONEX_VA2( + InvalidArgumentException, + 0, + "recipient-list-router [%s] illegal selector-expression [%s] : " + "selector-expression results must return boolean values.", + _id.c_str(), + selector->first->toString().c_str()); + } + } + } + CAF_CM_EXIT; + + return channels; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CRecipientListRouterInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CRecipientListRouterInstance.h new file mode 100644 index 000000000..3297f4a5e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CRecipientListRouterInstance.h @@ -0,0 +1,64 @@ +/* + * Created on: Aug 9, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CRecipientListRouterInstance_h +#define CRecipientListRouterInstance_h + +namespace Caf { + +class CRecipientListRouterInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public CAbstractMessageRouter { +public: + CRecipientListRouterInstance(); + virtual ~CRecipientListRouterInstance(); + + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(IMessageRouter) + CAF_END_QI() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +private: // CAbstractMessageRouter + ChannelCollection getTargetChannels( + const SmartPtrIIntMessage& message); + +private: + bool _isInitialized; + std::string _id; + bool _ignoreSendFailures; + int32 _timeout; + Cdeqstr _staticChannelIds; + Cmapstrstr _selectorDefinitions; + std::deque _staticChannels; + typedef std::deque > SelectorChannelCollection; + SelectorChannelCollection _selectorChannels; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CRecipientListRouterInstance); +}; +CAF_DECLARE_SMART_QI_POINTER(CRecipientListRouterInstance); +} + +#endif /* CRecipientListRouterInstance_h */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CRouterInstance.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CRouterInstance.cpp new file mode 100644 index 000000000..6c109397f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CRouterInstance.cpp @@ -0,0 +1,190 @@ +/* + * Created on: Aug 15, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CRouterInstance.h" + +using namespace Caf; + +CRouterInstance::CRouterInstance() : + _isInitialized(false), + _timeout(-1), + _resolutionRequired(false), + CAF_CM_INIT_LOG("CRouterInstance") { +} + +CRouterInstance::~CRouterInstance() { +} + +void CRouterInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + + std::string val = configSection->findOptionalAttribute("timeout"); + if (val.length()) { + _timeout = CStringConv::fromString(val); + } + + _defaultOutputChannelId = + configSection->findOptionalAttribute("default-output-channel"); + + _expressionStr = configSection->findRequiredAttribute("expression"); + + const std::string resolutionRequiredStr = configSection->findOptionalAttribute("resolution-required"); + _resolutionRequired = + (resolutionRequiredStr.empty() || resolutionRequiredStr.compare("true") == 0) ? true : false; + + const IDocument::SmartPtrCChildCollection childCollection = configSection->getAllChildren(); + for(TConstIterator childIter(*childCollection); childIter; childIter++) { + const std::string sectionName = childIter->first; + if (sectionName.compare("mapping") == 0) { + const SmartPtrIDocument document = childIter->second; + const std::string value = document->findRequiredAttribute("value"); + const std::string channel = document->findRequiredAttribute("channel"); + _valueToChannelMapping.insert(std::make_pair(value, channel)); + } + } + + if (_valueToChannelMapping.empty()) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchElementException, + 0, + "No mapping sections found - %s", + _id.c_str()); + } + + _isInitialized = true; +} + +std::string CRouterInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _id; +} + +void CRouterInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME("wire"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + + _channelResolver = channelResolver; + + SmartPtrIMessageChannel defaultOutputChannel; + if (_defaultOutputChannelId.length()) { + try { + defaultOutputChannel = + _channelResolver->resolveChannelName(_defaultOutputChannelId); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_WARN_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + if (defaultOutputChannel) { + CAF_CM_LOG_INFO_VA2( + "Successfully resolved default channel - id: %s, defaultOutputChannelId: %s", + _id.c_str(), + _defaultOutputChannelId.c_str()); + } else { + CAF_CM_EXCEPTIONEX_VA2( + NoSuchElementException, + 0, + "Failed to resolve default channel - id: %s, defaultChannelId: %s", + _id.c_str(), + _defaultOutputChannelId.c_str()); + } + } + + _expressionHandler.CreateInstance(); + _expressionHandler->init( + getAppConfig(), + appContext, + _expressionStr); + + CAbstractMessageRouter::init(defaultOutputChannel, false, -1); +} + +CRouterInstance::ChannelCollection CRouterInstance::getTargetChannels( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME("getTargetChannels"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + ChannelCollection messageChannels; + + std::string exprValueStr; + try { + SmartPtrIVariant exprValue = _expressionHandler->evaluate(message); + exprValueStr = exprValue->toString(); + CAF_CM_VALIDATE_STRING(exprValueStr); + CAF_CM_LOG_DEBUG_VA2( + "router '%s' expression returned '%s'", + _id.c_str(), + exprValueStr.c_str()); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_ERROR_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + + SmartPtrIMessageChannel outputChannel; + std::string outputChannelId; + if (exprValueStr.length()) { + Cmapstrstr::const_iterator valueIter = _valueToChannelMapping.find(exprValueStr); + if (valueIter != _valueToChannelMapping.end()) { + outputChannelId = valueIter->second; + try { + outputChannel = _channelResolver->resolveChannelName(outputChannelId); + CAF_CM_LOG_DEBUG_VA3( + "Successfully resolved channel " + "- id: %s, expression value: %s, outputChannel: %s", + _id.c_str(), + exprValueStr.c_str(), + outputChannelId.c_str()); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_WARN_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + } else { + CAF_CM_LOG_WARN_VA2( + "Expression value not found in mappings - " + "id: '%s', value: '%s'", + _id.c_str(), + exprValueStr.c_str()); + } + } + + if (outputChannel) { + messageChannels.push_back(outputChannel); + } else { + if (_resolutionRequired) { + CAF_CM_EXCEPTIONEX_VA3( + NoSuchElementException, + 0, + "Failed to resolve channel when resolution is required " + "- id: %s, expression value: '%s', outputChannel: '%s'", + _id.c_str(), + exprValueStr.c_str(), + outputChannelId.c_str()); + } else if (_defaultOutputChannelId.empty()) { + CAF_CM_EXCEPTIONEX_VA2( + NoSuchElementException, + 0, + "Did not resolve output channel and default channel not provided " + "- id: %s, expression value: %s", + _id.c_str(), + exprValueStr.c_str()); + } + } + return messageChannels; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CRouterInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CRouterInstance.h new file mode 100644 index 000000000..ef9bb890b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CRouterInstance.h @@ -0,0 +1,64 @@ +/* + * Created on: Aug 15, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CRouterInstance_h +#define CRouterInstnace_h + +namespace Caf { + +class CRouterInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public CAbstractMessageRouter { +public: + CRouterInstance(); + virtual ~CRouterInstance(); + + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(IMessageRouter) + CAF_END_QI() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +private: + ChannelCollection getTargetChannels( + const SmartPtrIIntMessage& message); + +private: + bool _isInitialized; + std::string _id; + int32 _timeout; + std::string _defaultOutputChannelId; + bool _resolutionRequired; + std::string _expressionStr; + SmartPtrCExpressionHandler _expressionHandler; + Cmapstrstr _valueToChannelMapping; + SmartPtrIChannelResolver _channelResolver; + + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CRouterInstance); +}; +CAF_DECLARE_SMART_QI_POINTER(CRouterInstance); +} + + +#endif /* CRouterInstance_h */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CServiceActivatorInstance.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CServiceActivatorInstance.cpp new file mode 100644 index 000000000..1068db6cd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CServiceActivatorInstance.cpp @@ -0,0 +1,189 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CServiceActivatorInstance.h" +#include "CObjectFactoryTables.h" + +using namespace Caf; + +CServiceActivatorInstance::CServiceActivatorInstance() : + _isInitialized(false), + CAF_CM_INIT_LOG("CServiceActivatorInstance") { +} + +CServiceActivatorInstance::~CServiceActivatorInstance() { +} + +void CServiceActivatorInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _ctorArgs = ctorArgs; + _properties = properties; + _configSection = configSection; + _id = _configSection->findRequiredAttribute("id"); + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +std::string CServiceActivatorInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _id; + } + CAF_CM_EXIT; + + return rc; +} + +void CServiceActivatorInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME("wire"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + + MessageHandlerObjectCreatorMap::const_iterator objectCreatorEntry = + CObjectFactoryTables::messageHandlerObjectCreatorMap.find( + _configSection->getName()); + if (objectCreatorEntry == + CObjectFactoryTables::messageHandlerObjectCreatorMap.end()) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchElementException, + 0, + "Configuration section '%s' is not handled by this object", + _configSection->getName().c_str()); + } + + const SmartPtrIMessageChannel errorMessageChannel = + channelResolver->resolveChannelName("errorChannel"); + + std::string inputChannelStr; + SmartPtrIMessageChannel outputMessageChannel; + if (objectCreatorEntry->second.second) { + inputChannelStr = _configSection->findRequiredAttribute("input-channel"); + + const std::string outputChannelStr = _configSection->findRequiredAttribute("output-channel"); + outputMessageChannel = channelResolver->resolveChannelName(outputChannelStr); + } else { + inputChannelStr = _configSection->findOptionalAttribute("channel"); + if (inputChannelStr.empty()) { + inputChannelStr = _configSection->findRequiredAttribute("input-channel"); + } + } + const SmartPtrIIntegrationObject inputIntegrationObject = + channelResolver->resolveChannelNameToObject(inputChannelStr); + + SmartPtrICafObject messageHandlerObj; + if (_configSection->getName().compare("service-activator") == 0) { + const std::string refStr = _configSection->findRequiredAttribute("ref"); + CAF_CM_LOG_DEBUG_VA1("Creating the message processor - %s", refStr.c_str()); + const SmartPtrIBean bean = appContext->getBean(refStr); + messageHandlerObj.QueryInterface(bean, false); + CAF_CM_VALIDATE_INTERFACE(messageHandlerObj); + + SmartPtrIIntegrationComponentInstance integrationComponentInstance; + integrationComponentInstance.QueryInterface(bean, false); + if (!integrationComponentInstance.IsNull()) { + // Bean is also an integration component instance...wire + integrationComponentInstance->wire(appContext, channelResolver); + } + } else { + SmartPtrIIntegrationObject integrationObject; + if (objectCreatorEntry->second.first) { + integrationObject = (objectCreatorEntry->second.first)(); + integrationObject->initialize(_ctorArgs, _properties, _configSection); + } else { + const std::string& beanId = _configSection->findRequiredAttribute("ref"); + const SmartPtrIBean bean = appContext->getBean(beanId); + SmartPtrIIntegrationComponent integrationComponent; + integrationComponent.QueryInterface(bean, false); + if (!integrationComponent) { + CAF_CM_EXCEPTIONEX_VA1( + InvalidArgumentException, + 0, + "Bean is not an integration component - %s", + beanId.c_str()); + } + integrationObject = integrationComponent->createObject(_configSection); + } + SmartPtrIIntegrationComponentInstance integrationComponentInstance; + integrationComponentInstance.QueryInterface(integrationObject, false); + CAF_CM_VALIDATE_INTERFACE(integrationComponentInstance); + integrationComponentInstance->wire(appContext, channelResolver); + messageHandlerObj.QueryInterface(integrationObject, false); + CAF_CM_VALIDATE_INTERFACE(messageHandlerObj); + } + + _messagingTemplate.CreateInstance(); + _messagingTemplate->initialize( + channelResolver, + inputIntegrationObject, + errorMessageChannel, + outputMessageChannel, + messageHandlerObj); + } + CAF_CM_EXIT; +} + +void CServiceActivatorInstance::start( + const uint32 timeoutMs) { + CAF_CM_FUNCNAME_VALIDATE("start"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CAF_CM_LOG_DEBUG_VA0("Starting"); + _messagingTemplate->start(timeoutMs); + } + CAF_CM_EXIT; +} + +void CServiceActivatorInstance::stop( + const uint32 timeoutMs) { + CAF_CM_FUNCNAME_VALIDATE("stop"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CAF_CM_LOG_DEBUG_VA0("Stopping"); + _messagingTemplate->stop(timeoutMs); + } + CAF_CM_EXIT; +} + +bool CServiceActivatorInstance::isRunning() const { + CAF_CM_FUNCNAME_VALIDATE("isRunning"); + + bool rc = false; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + rc = _messagingTemplate->isRunning(); + } + CAF_CM_EXIT; + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CServiceActivatorInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CServiceActivatorInstance.h new file mode 100644 index 000000000..bfc17910f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CServiceActivatorInstance.h @@ -0,0 +1,65 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CServiceActivatorInstance_h_ +#define CServiceActivatorInstance_h_ + +namespace Caf { + +class CServiceActivatorInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public ILifecycle +{ +public: + CServiceActivatorInstance(); + virtual ~CServiceActivatorInstance(); + + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(ILifecycle) + CAF_END_QI() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ILifecycle + void start(const uint32 timeoutMs); + void stop(const uint32 timeoutMs); + bool isRunning() const; + +private: + bool _isInitialized; + IBean::Cargs _ctorArgs; + IBean::Cprops _properties; + SmartPtrIDocument _configSection; + std::string _id; + SmartPtrCMessagingTemplate _messagingTemplate; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CServiceActivatorInstance); +}; + +CAF_DECLARE_SMART_QI_POINTER(CServiceActivatorInstance); + +} + +#endif // #ifndef CServiceActivatorInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CWireTapInstance.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CWireTapInstance.cpp new file mode 100644 index 000000000..82132787f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CWireTapInstance.cpp @@ -0,0 +1,179 @@ +/* + * Created on: Jan 25, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CWireTapInstance.h" + +CWireTapInstance::CWireTapInstance() : + _order(0), + _timeout(0), + _isRunning(false), + _pattern(NULL), + _isInitialized(false), + CAF_CM_INIT_LOG("CWireTapInstance") { +} + +CWireTapInstance::~CWireTapInstance() { + if (_pattern) { + g_regex_unref(_pattern); + } +} + +void CWireTapInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _configSection = configSection; + _id = _configSection->findRequiredAttribute("id"); + + const std::string orderAttr = _configSection->findOptionalAttribute("order"); + if (!orderAttr.empty()) { + _order = CStringConv::fromString(orderAttr); + } + + const std::string timeoutAttr = _configSection->findOptionalAttribute("timeout"); + if (!timeoutAttr.empty()) { + _timeout = CStringConv::fromString(timeoutAttr); + } + + const std::string pattern = _configSection->findRequiredAttribute("pattern"); + GError *error = NULL; + _pattern = g_regex_new( + pattern.c_str(), + (GRegexCompileFlags)(G_REGEX_OPTIMIZE | G_REGEX_UNGREEDY | G_REGEX_RAW), + (GRegexMatchFlags)(G_REGEX_MATCH_ANCHORED | G_REGEX_MATCH_NOTEMPTY), + &error); + if (error) { + throw error; + } + + _channelId = _configSection->findRequiredAttribute("channel"); + _isInitialized = true; + } + CAF_CM_EXIT; +} + +std::string CWireTapInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + std::string rc; + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _id; + } + CAF_CM_EXIT; + return rc; +} + +void CWireTapInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + _channel = channelResolver->resolveChannelName(_channelId); + } + CAF_CM_EXIT; +} + +void CWireTapInstance::start(const uint32 timeoutMs) { + CAF_CM_FUNCNAME_VALIDATE("start"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _isRunning = true; + } + CAF_CM_EXIT; +} + +void CWireTapInstance::stop(const uint32 timeoutMs) { + CAF_CM_FUNCNAME_VALIDATE("stop"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _isRunning = false; + } + CAF_CM_EXIT; +} + +bool CWireTapInstance::isRunning() const { + CAF_CM_FUNCNAME_VALIDATE("isRunning"); + bool rc = false; + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _isRunning; + } + CAF_CM_EXIT; + return rc; +} + +SmartPtrIIntMessage& CWireTapInstance::preSend( + SmartPtrIIntMessage& message, + SmartPtrIMessageChannel& channel) { + CAF_CM_FUNCNAME_VALIDATE("preSend"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_INTERFACE(message); + CAF_CM_VALIDATE_INTERFACE(channel); + + // If the channel passed in is the + // output channel for this wire-tap then + // log a message and no-op this. + if (_channel == channel) { + CAF_CM_LOG_DEBUG_VA2( + "WireTap (%s) will not intercept its own " + "channel (%s),", + _id.c_str(), + _channelId.c_str()); + } else if (_isRunning) { + if (_timeout) { + _channel->send(message); + } else { + _channel->send(message, _timeout); + } + } + } + CAF_CM_EXIT; + return message; +} + +uint32 CWireTapInstance::getOrder() const { + CAF_CM_FUNCNAME_VALIDATE("getOrder"); + uint32 rc; + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _order; + } + CAF_CM_EXIT; + return rc; +} + +bool CWireTapInstance::isChannelIdMatched(const std::string& channelId) const { + CAF_CM_FUNCNAME_VALIDATE("isChannelIdMatched"); + bool rc = false; + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(channelId); + rc = g_regex_match( + _pattern, + channelId.c_str(), + (GRegexMatchFlags)0, + NULL); + } + CAF_CM_EXIT; + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CWireTapInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CWireTapInstance.h new file mode 100644 index 000000000..f4bc05ad1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CWireTapInstance.h @@ -0,0 +1,80 @@ +/* + * Created on: Jan 25, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CWIRETAPINSTANCE_H_ +#define CWIRETAPINSTANCE_H_ + +namespace Caf { + +class CWireTapInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public ILifecycle, + public IChannelInterceptorInstance, + public CChannelInterceptorAdapter { +public: + CWireTapInstance(); + virtual ~CWireTapInstance(); + + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(ILifecycle) + CAF_QI_ENTRY(IChannelInterceptor) + CAF_QI_ENTRY(IChannelInterceptorInstance) + CAF_END_QI() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ILifecycle + void start(const uint32 timeoutMs); + void stop(const uint32 timeoutMs); + bool isRunning() const; + +public: // IChannelIntercepter + SmartPtrIIntMessage& preSend( + SmartPtrIIntMessage& message, + SmartPtrIMessageChannel& channel); + +public: // IChannelInterceptorInstance + uint32 getOrder() const; + + bool isChannelIdMatched(const std::string& channelId) const; + +private: + SmartPtrIDocument _configSection; + std::string _id; + uint32 _order; + int32 _timeout; + bool _isRunning; + std::string _channelId; + SmartPtrIMessageChannel _channel; + GRegex* _pattern; + bool _isInitialized; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CWireTapInstance); +}; +CAF_DECLARE_SMART_QI_POINTER(CWireTapInstance); + +} + +#endif /* CWIRETAPINSTANCE_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CXPathHeaderEnricherItem.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CXPathHeaderEnricherItem.cpp new file mode 100644 index 000000000..ebf714665 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CXPathHeaderEnricherItem.cpp @@ -0,0 +1,66 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CXPathHeaderEnricherItem.h" + +using namespace Caf; + +CXPathHeaderEnricherItem::CXPathHeaderEnricherItem() : + _isInitialized(false), + _overwrite(true), + CAF_CM_INIT("CXPathHeaderEnricherItem") { +} + +CXPathHeaderEnricherItem::~CXPathHeaderEnricherItem() { +} + +void CXPathHeaderEnricherItem::initialize( + const SmartPtrIDocument& configSection, + const bool& defaultOverwrite) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _name = configSection->findRequiredAttribute("name"); + _evaluationType = configSection->findOptionalAttribute("evaluation-type"); + _xpathExpression = configSection->findOptionalAttribute("xpath-expression"); + _xpathExpressionRef = configSection->findOptionalAttribute("xpath-expression-ref"); + + _overwrite = defaultOverwrite; + const std::string overwriteStr = configSection->findOptionalAttribute("overwrite"); + if (! overwriteStr.empty()) { + _overwrite = (overwriteStr.compare("true") == 0); + } + + if (_evaluationType.empty()) { + _evaluationType = "STRING_RESULT"; + } + + _isInitialized = true; +} + +std::string CXPathHeaderEnricherItem::getName() const { + return _name; +} + +std::string CXPathHeaderEnricherItem::getEvaluationType() const { + return _evaluationType; +} + +bool CXPathHeaderEnricherItem::getOverwrite() const { + return _overwrite; +} + +std::string CXPathHeaderEnricherItem::getXpathExpression() const { + return _xpathExpression; +} + +std::string CXPathHeaderEnricherItem::getXpathExpressionRef() const { + return _xpathExpressionRef; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CXPathHeaderEnricherItem.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CXPathHeaderEnricherItem.h new file mode 100644 index 000000000..fc79ca0d4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CXPathHeaderEnricherItem.h @@ -0,0 +1,53 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CXPathHeaderEnricherItem_h_ +#define CXPathHeaderEnricherItem_h_ + +namespace Caf { + +class CXPathHeaderEnricherItem { +private: + typedef std::map CFileCollection; + CAF_DECLARE_SMART_POINTER(CFileCollection); + +public: + CXPathHeaderEnricherItem(); + virtual ~CXPathHeaderEnricherItem(); + +public: + void initialize( + const SmartPtrIDocument& configSection, + const bool& defaultOverwrite); + +public: + std::string getName() const; + std::string getEvaluationType() const; + bool getOverwrite() const; + std::string getXpathExpression() const; + std::string getXpathExpressionRef() const; + +private: + bool _isInitialized; + + std::string _name; + std::string _evaluationType; + bool _overwrite; + std::string _xpathExpression; + std::string _xpathExpressionRef; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CXPathHeaderEnricherItem); +}; + +CAF_DECLARE_SMART_POINTER(CXPathHeaderEnricherItem); + +} + +#endif // #ifndef CXPathHeaderEnricherItem_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CXPathHeaderEnricherTransformerInstance.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CXPathHeaderEnricherTransformerInstance.cpp new file mode 100644 index 000000000..970632c5a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CXPathHeaderEnricherTransformerInstance.cpp @@ -0,0 +1,208 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" + +#include "CXPathHeaderEnricherItem.h" +#include "CXPathHeaderEnricherTransformerInstance.h" + +using namespace Caf; + +CXPathHeaderEnricherTransformerInstance::CXPathHeaderEnricherTransformerInstance() : + _isInitialized(false), + _defaultOverwrite(true), + _shouldSkipNulls(true), + CAF_CM_INIT_LOG("CXPathHeaderEnricherTransformerInstance") { +} + +CXPathHeaderEnricherTransformerInstance::~CXPathHeaderEnricherTransformerInstance() { +} + +void CXPathHeaderEnricherTransformerInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + _configSection = configSection; + + if (_configSection->getAllChildren()->empty()) { + CAF_CM_EXCEPTIONEX_VA1(NoSuchElementException, ERROR_INVALID_DATA, + "Configuration section is empty - %s", _id.c_str()); + } + + _isInitialized = true; +} + +std::string CXPathHeaderEnricherTransformerInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _id; +} + +void CXPathHeaderEnricherTransformerInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME("wire"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + + SmartPtrIAppConfig appConfig = getAppConfig(); + + const std::string defaultOverwriteStr = + _configSection->findOptionalAttribute("default-overwrite"); + const std::string shouldSkipNullsStr = + _configSection->findOptionalAttribute("should-skip-nulls"); + + _defaultOverwrite = + (defaultOverwriteStr.empty() || defaultOverwriteStr.compare("true") == 0) ? true : false; + _shouldSkipNulls = + (shouldSkipNullsStr.empty() || shouldSkipNullsStr.compare("true") == 0) ? true : false; + + const IDocument::SmartPtrCChildCollection configChildren = + _configSection->getAllChildren(); + for (TSmartConstMapIterator configIter(*configChildren); + configIter; configIter++) { + const SmartPtrIDocument config = *configIter; + + if (config->getName().compare("header") == 0) { + SmartPtrCXPathHeaderEnricherItem item; + item.CreateInstance(); + item->initialize(config, _defaultOverwrite); + + _headerItems.insert(std::make_pair(item->getName(), item)); + } else { + CAF_CM_EXCEPTIONEX_VA1(NoSuchElementException, ERROR_INVALID_DATA, + "Configuration section contains unrecognized entry - %s", _id.c_str()); + } + } +} + +SmartPtrIIntMessage CXPathHeaderEnricherTransformerInstance::transformMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("transformMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + SmartPtrCIntMessage messageImpl; + messageImpl.CreateInstance(); + messageImpl->initialize(message->getPayload(), + message->getHeaders(), IIntMessage::SmartPtrCHeaders()); + SmartPtrIIntMessage newMessage = messageImpl; + + IIntMessage::SmartPtrCHeaders newHeaders = newMessage->getHeaders(); + const std::string payloadXmlStr = newMessage->getPayloadStr(); + + for (TConstMapIterator headerItemIter(_headerItems); + headerItemIter; headerItemIter++) { + const std::string name = headerItemIter.getKey(); + const SmartPtrCXPathHeaderEnricherItem value = *headerItemIter; + + if (isInsertable(name, value, newHeaders)) { + const std::string xpathRc = evaluateXPathExpression(name, value, payloadXmlStr); + if (xpathRc.empty()) { + if (! _shouldSkipNulls) { + CAF_CM_LOG_INFO_VA1("Removing header from unresolvable expression - %s", + name.c_str()); + newHeaders->erase(name); + } + } else { + CAF_CM_LOG_DEBUG_VA2("Inserting/updating a header value - %s = %s", + name.c_str(), xpathRc.c_str()); + (*newHeaders)[name] = + std::make_pair(CVariant::createString(xpathRc), SmartPtrICafObject()); + } + } + } + + return newMessage; +} + +bool CXPathHeaderEnricherTransformerInstance::isInsertable( + const std::string& name, + const SmartPtrCXPathHeaderEnricherItem& value, + const IIntMessage::SmartPtrCHeaders& headers) { + CAF_CM_FUNCNAME_VALIDATE("isInsertable"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(name); + CAF_CM_VALIDATE_SMARTPTR(value); + CAF_CM_VALIDATE_SMARTPTR(headers); + + bool rc = false; + if (value->getEvaluationType().compare("STRING_RESULT") == 0) { + if (headers->find(name) == headers->end()) { + rc = true; + } else { + if (value->getOverwrite()) { + CAF_CM_LOG_DEBUG_VA1("Existing header will be overwritten - name: %s", + name.c_str()); + rc = true; + } else { + CAF_CM_LOG_WARN_VA1("Existing header will not be overwritten - name: %s", + name.c_str()); + } + } + } else { + CAF_CM_LOG_ERROR_VA2("Evaluation type not supported - name: %s, type: %s", + name.c_str(), value->getEvaluationType().c_str()); + } + + return rc; +} + +std::string CXPathHeaderEnricherTransformerInstance::evaluateXPathExpression( + const std::string& name, + const SmartPtrCXPathHeaderEnricherItem& value, + const std::string& payloadXmlStr) { + CAF_CM_FUNCNAME_VALIDATE("isInsertable"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(name); + CAF_CM_VALIDATE_SMARTPTR(value); + CAF_CM_VALIDATE_STRING(payloadXmlStr); + + std::string rc; + const std::string expr = value->getXpathExpression(); + if (expr.empty()) { + CAF_CM_LOG_ERROR_VA1( + "xpath-expression is required until xpath-expression-ref is supported - name: %s", + name.c_str()); + } else { + if (! value->getXpathExpressionRef().empty()) { + CAF_CM_LOG_WARN_VA1( + "Both xpath-expression and xpath-expression-ref cannot be specified... Using xpath-expression - name: %s", + name.c_str()); + } + + if (expr.find_first_of('@') != 0) { + CAF_CM_LOG_ERROR_VA2( + "Currently, only root-level attributes are supported - name: %s, xpath-expression: %s", + name.c_str(), expr.c_str()); + } else { + const std::string attr = expr.substr(1); + + const SmartPtrCXmlElement rootXml = + CXmlUtils::parseString(payloadXmlStr, std::string()); + + const std::string payloadType = rootXml->getName(); + const std::string attrVal = rootXml->findOptionalAttribute(attr); + if (attrVal.empty()) { + CAF_CM_LOG_WARN_VA2( + "Attribute not found at root level: %s", + name.c_str(), expr.c_str()); + } else { + rc = attrVal; + } + } + } + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CXPathHeaderEnricherTransformerInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CXPathHeaderEnricherTransformerInstance.h new file mode 100644 index 000000000..c5ca72d39 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CXPathHeaderEnricherTransformerInstance.h @@ -0,0 +1,76 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CXPathHeaderEnricherTransformerInstance_h_ +#define CXPathHeaderEnricherTransformerInstance_h_ + +namespace Caf { + +class CXPathHeaderEnricherTransformerInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public ITransformer +{ +public: + CXPathHeaderEnricherTransformerInstance(); + virtual ~CXPathHeaderEnricherTransformerInstance(); + + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(ITransformer) + CAF_END_QI() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ITransformer + SmartPtrIIntMessage transformMessage( + const SmartPtrIIntMessage& message); + +private: + bool isInsertable( + const std::string& name, + const SmartPtrCXPathHeaderEnricherItem& value, + const IIntMessage::SmartPtrCHeaders& headers); + + std::string evaluateXPathExpression( + const std::string& name, + const SmartPtrCXPathHeaderEnricherItem& value, + const std::string& payloadXmlStr); + +private: + bool _isInitialized; + std::string _id; + SmartPtrIDocument _configSection; + + bool _defaultOverwrite; + bool _shouldSkipNulls; + typedef std::map Items; + Items _headerItems; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CXPathHeaderEnricherTransformerInstance); +}; +CAF_DECLARE_SMART_QI_POINTER(CXPathHeaderEnricherTransformerInstance); + +} + +#endif // #ifndef CXPathHeaderEnricherTransformerInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/Integration.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/Integration.cpp new file mode 100644 index 000000000..a340481a3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/Integration.cpp @@ -0,0 +1,48 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CIntegrationObjectFactory.h" +#include "CErrorChannel.h" +#include "CNullChannel.h" +#include "CHeaderExpressionInvoker.h" + +using namespace Caf; + +CEcmSubSystemModule _Module; + +CAF_BEGIN_OBJECT_MAP(ObjectMap) + CAF_OBJECT_ENTRY(CIntegrationObjectFactory) + CAF_OBJECT_ENTRY(CErrorChannel) + CAF_OBJECT_ENTRY(CNullChannel) + CAF_OBJECT_ENTRY(CHeaderExpressionInvoker) +CAF_END_OBJECT_MAP() + +CAF_DECLARE_SUBSYSTEM_EXPORTS() + +extern "C" BOOL APIENTRY DllMain(HINSTANCE hModule, uint32 dwReason, LPVOID) +{ + try { + if (DLL_PROCESS_ATTACH == dwReason) + { + // initialize the sub-system module + _Module.Init(ObjectMap, hModule); + } + else if (DLL_PROCESS_DETACH == dwReason) + { + // Terminate the sub-system module + _Module.Term(); + } + } catch (std::runtime_error) { + ::exit(2); + } catch (...) { + ::exit(2); + } + + return TRUE; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/stdafx.h new file mode 100644 index 000000000..64ce09299 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/stdafx.h @@ -0,0 +1,43 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef stdafx_h_ +#define stdafx_h_ + +//{{CAF_SUBSYSTEM}} + +#include +#include +#include + +namespace Caf { + +// template function to create integration objects +template +SmartPtrIIntegrationObject CreateIntegrationObject() { + Object object; + object.CreateInstance(); + return object; +}; + +// function pointer for integration object creation +typedef SmartPtrIIntegrationObject(*FNOBJECT_CREATOR)(); + +// map of configuration section names to function pointers that create the +// integration object +typedef std::map ObjectCreatorMap; + +// map of configuration section names to a pair: +// pair.first - function pointer that creates the integration object +// pair.second - true if the integration object produces messages +typedef std::map< + std::string, + std::pair > MessageHandlerObjectCreatorMap; +} + +#endif // #ifndef stdafx_h_ diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/Config_Provider/src/CConfigProvider.cpp b/open-vm-tools/common-agent/Cpp/InternalProviders/Config_Provider/src/CConfigProvider.cpp new file mode 100644 index 000000000..91c70a196 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/Config_Provider/src/CConfigProvider.cpp @@ -0,0 +1,489 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CConfigProvider.h" + +using namespace Caf; + +CConfigProvider::CConfigProvider() : + _fileAliasPrefix("diagFileAlias_"), + _keyPathDelimStr("/"), + _keyPathDelimChar('/'), + CAF_CM_INIT_LOG("CConfigProvider") { +} + +CConfigProvider::~CConfigProvider() { +} + +const SmartPtrCSchemaDoc CConfigProvider::getSchema() const { + + std::deque dc1Props; + dc1Props.push_back(CProviderDocHelper::createClassProperty("name", PROPERTY_STRING, true)); + dc1Props.push_back(CProviderDocHelper::createClassProperty("value", PROPERTY_STRING, true)); + + std::deque dc2Props; + dc2Props.push_back(CProviderDocHelper::createClassProperty("filePath", PROPERTY_STRING, true)); + dc2Props.push_back(CProviderDocHelper::createClassProperty("encoding", PROPERTY_STRING, true)); + + std::deque instanceProperties; + instanceProperties.push_back(CProviderDocHelper::createClassInstanceProperty( + "configEntry", + CProviderDocHelper::createClassIdentifier("caf", "ConfigEntry", "1.0.0"), + true, + false, + true)); + + std::deque dataClasses; + dataClasses.push_back(CProviderDocHelper::createDataClass("caf", "ConfigEntry", "1.0.0", dc1Props)); + dataClasses.push_back(CProviderDocHelper::createDataClass("caf", "ConfigData", "1.0.0", dc2Props, instanceProperties)); + + std::deque collectMethodParams; + collectMethodParams.push_back(CProviderDocHelper::createMethodParameter("filePath", PARAMETER_STRING, false)); + collectMethodParams.push_back(CProviderDocHelper::createMethodParameter("encoding", PARAMETER_STRING, false)); + + std::deque m1Params; + m1Params.push_back(CProviderDocHelper::createMethodParameter("filePath", PARAMETER_STRING, false)); + m1Params.push_back(CProviderDocHelper::createMethodParameter("encoding", PARAMETER_STRING, false)); + m1Params.push_back(CProviderDocHelper::createMethodParameter("valueName", PARAMETER_STRING, false)); + m1Params.push_back(CProviderDocHelper::createMethodParameter("valueData", PARAMETER_STRING, false)); + + std::deque m2Params; + m2Params.push_back(CProviderDocHelper::createMethodParameter("filePath", PARAMETER_STRING, false)); + m2Params.push_back(CProviderDocHelper::createMethodParameter("encoding", PARAMETER_STRING, false)); + m2Params.push_back(CProviderDocHelper::createMethodParameter("valueName", PARAMETER_STRING, false)); + + std::deque methods; + methods.push_back(CProviderDocHelper::createMethod("setValue", m1Params)); + methods.push_back(CProviderDocHelper::createMethod("deleteValue", m2Params)); + + std::deque actionClasses; + actionClasses.push_back( + CProviderDocHelper::createActionClass( + "caf", + "ConfigActions", + "1.0.0", + CProviderDocHelper::createCollectMethod("collectInstances", collectMethodParams), + methods)); + + return CProviderDocHelper::createSchema(dataClasses, actionClasses); +} + +void CConfigProvider::collect(const IProviderRequest& request, IProviderResponse& response) const { + CAF_CM_FUNCNAME("collect"); + + CAF_CM_ENTER { + SmartPtrCProviderCollectInstancesDoc doc = request.getCollectInstances(); + CAF_CM_VALIDATE_SMARTPTR(doc); + + const SmartPtrCParameterCollectionDoc parameterCollection = + doc->getParameterCollection(); + const std::string filePath = ParameterUtils::findRequiredParameterAsString( + "filePath", parameterCollection); + const std::string encoding = ParameterUtils::findRequiredParameterAsString( + "encoding", parameterCollection); + + if (FileSystemUtils::doesFileExist(filePath)) { + CAF_CM_LOG_DEBUG_VA2("Parsing file - path: %s, encoding: %s", filePath.c_str(), encoding.c_str()); + + std::deque > propertyCollection; + if (encoding.compare("iniFileWithoutSection") == 0) { + propertyCollection = createIniFileWithoutSectionPropertyCollection(filePath); + } else if (encoding.compare("iniFile") == 0) { + propertyCollection = createIniFilePropertyCollection(filePath); + } else if (encoding.compare("xmlFile") == 0) { + propertyCollection = createXmlFilePropertyCollection(filePath); + } else { + CAF_CM_EXCEPTIONEX_VA2(InvalidArgumentException, E_INVALIDARG, + "URI encoding is not recognized - path: %s, encoding: %s", filePath.c_str(), encoding.c_str()); + } + + const SmartPtrCDataClassInstanceDoc dataClassInstance = + createDataClassInstance(filePath, encoding, propertyCollection); + response.addInstance(dataClassInstance); + } else { + CAF_CM_LOG_WARN_VA2( + "File not found - path: %s, encoding: %s", filePath.c_str(), encoding.c_str()); + } + } + CAF_CM_EXIT; +} + +void CConfigProvider::invoke(const IProviderRequest& request, IProviderResponse& response) const { + CAF_CM_FUNCNAME("invoke"); + + CAF_CM_ENTER { + SmartPtrCProviderInvokeOperationDoc doc = request.getInvokeOperations(); + CAF_CM_VALIDATE_SMARTPTR(doc); + + const SmartPtrCOperationDoc operation = doc->getOperation(); + const std::string operationName = operation->getName(); + + const SmartPtrCParameterCollectionDoc parameterCollection = + operation->getParameterCollection(); + const std::string filePath = ParameterUtils::findRequiredParameterAsString( + "filePath", parameterCollection); + const std::string encoding = ParameterUtils::findRequiredParameterAsString( + "encoding", parameterCollection); + const std::string valueName = ParameterUtils::findRequiredParameterAsString( + "valueName", parameterCollection); + + if (operationName.compare("setValue") == 0) { + const std::string valueData = ParameterUtils::findRequiredParameterAsString( + "valueData", parameterCollection); + + setValue(filePath, encoding, valueName, valueData); + } else if (operationName.compare("deleteValue") == 0) { + deleteValue(filePath, encoding, valueName); + } else { + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Invalid operation name (must be \'setValue\' or \'deleteValue\') - %s", operationName.c_str()) + } + } + CAF_CM_EXIT; +} + +SmartPtrCDataClassInstanceDoc CConfigProvider::createDataClassInstance( + const std::string& filePath, + const std::string& encoding, + const std::deque >& propertyCollection) const { + CAF_CM_FUNCNAME_VALIDATE("createDataClassInstance"); + + CAF_CM_VALIDATE_STRING(filePath); + CAF_CM_VALIDATE_STRING(encoding); + CAF_CM_VALIDATE_STL(propertyCollection); + + std::deque subInstances; + for(TConstIterator > > propertyIter(propertyCollection); + propertyIter; propertyIter++) { + + std::deque siProperties; + siProperties.push_back(CProviderDocHelper::createDataClassProperty("name", propertyIter->first)); + siProperties.push_back(CProviderDocHelper::createDataClassProperty("value", propertyIter->second)); + subInstances.push_back(CProviderDocHelper::createDataClassSubInstance( + "configEntry", + siProperties)); + } + + std::deque dataClassProperties; + dataClassProperties.push_back(CProviderDocHelper::createDataClassProperty("filePath", filePath)); + dataClassProperties.push_back(CProviderDocHelper::createDataClassProperty("encoding", encoding)); + + return CProviderDocHelper::createDataClassInstance( + "caf", + "ConfigData", + "1.0.0", + dataClassProperties, + subInstances); +} + +void CConfigProvider::setValue( + const std::string& filePath, + const std::string& encoding, + const std::string& valueName, + const std::string& valueData) const { + CAF_CM_FUNCNAME("setValue"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filePath); + CAF_CM_VALIDATE_STRING(encoding); + CAF_CM_VALIDATE_STRING(valueName); + CAF_CM_VALIDATE_STRING(valueData); + + if (encoding.compare("iniFileWithoutSection") == 0) { + SmartPtrCIniFileWithoutSection iniFileWithoutSection; + iniFileWithoutSection.CreateInstance(); + iniFileWithoutSection->initialize(filePath); + iniFileWithoutSection->setValue(valueName, valueData); + } else if (encoding.compare("iniFile") == 0) { + std::string sectionName; + std::string keyName; + parseIniFileValuePath(valueName, sectionName, keyName); + + SmartPtrCIniFile iniFile; + iniFile.CreateInstance(); + iniFile->initialize(filePath); + iniFile->setValue(sectionName, keyName, valueData); + } else if (encoding.compare("xmlFile") == 0) { + std::string keyName; + std::deque keyPathCollection; + parseKeyPath(valueName, keyPathCollection, keyName); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseFile(filePath, std::string()); + const SmartPtrCXmlElement parentXml = findXmlElement(keyPathCollection, rootXml); + + const SmartPtrCXmlElement foundElement = parentXml->findOptionalChild(keyName); + if (! foundElement.IsNull()) { + foundElement->setValue(valueData); + } else { + const std::string foundAttribute = parentXml->findOptionalAttribute(keyName); + if (! foundAttribute.empty()) { + parentXml->setAttribute(keyName, valueData); + } else { + const SmartPtrCXmlElement createdElement = parentXml->createAndAddElement(keyName); + createdElement->setValue(valueData); + } + } + rootXml->saveToFile(filePath); + } else { + CAF_CM_EXCEPTIONEX_VA2(InvalidArgumentException, E_INVALIDARG, + "URI encoding is not recognized - filePath: %s, encoding: %s", + filePath.c_str(), encoding.c_str()); + } + } + CAF_CM_EXIT; +} + +void CConfigProvider::deleteValue( + const std::string& filePath, + const std::string& encoding, + const std::string& valueName) const { + CAF_CM_FUNCNAME("deleteValue"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filePath); + CAF_CM_VALIDATE_STRING(encoding); + CAF_CM_VALIDATE_STRING(valueName); + + if (encoding.compare("iniFileWithoutSection") == 0) { + SmartPtrCIniFileWithoutSection iniFileWithoutSection; + iniFileWithoutSection.CreateInstance(); + iniFileWithoutSection->initialize(filePath); + iniFileWithoutSection->deleteValue(valueName); + } else if (encoding.compare("iniFile") == 0) { + std::string sectionName; + std::string keyName; + parseIniFileValuePath(valueName, sectionName, keyName); + + SmartPtrCIniFile iniFile; + iniFile.CreateInstance(); + iniFile->initialize(filePath); + iniFile->deleteValue(sectionName, keyName); + } else if (encoding.compare("xmlFile") == 0) { + std::string keyName; + std::deque keyPathCollection; + parseKeyPath(valueName, keyPathCollection, keyName); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseFile(filePath, std::string()); + const SmartPtrCXmlElement parentXml = findXmlElement(keyPathCollection, rootXml); + + const SmartPtrCXmlElement foundElement = parentXml->findOptionalChild(keyName); + if (! foundElement.IsNull()) { + parentXml->removeChild(keyName); + } else { + parentXml->removeAttribute(keyName); + } + rootXml->saveToFile(filePath); + } else { + CAF_CM_EXCEPTIONEX_VA2(InvalidArgumentException, E_INVALIDARG, + "URI encoding is not recognized - filePath: %s, encoding: %s", + filePath.c_str(), encoding.c_str()); + } + } + CAF_CM_EXIT; +} + +std::deque > CConfigProvider::createIniFileWithoutSectionPropertyCollection( + const std::string& filePath) const { + CAF_CM_FUNCNAME_VALIDATE("createIniFileWithoutSectionPropertyCollection"); + + std::deque > propertyCollection; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filePath); + + SmartPtrCIniFileWithoutSection iniFileWithoutSection; + iniFileWithoutSection.CreateInstance(); + iniFileWithoutSection->initialize(filePath); + + const std::deque entryCollection = + iniFileWithoutSection->getEntryCollection(); + + for(TConstIterator > iniEntryIter(entryCollection); + iniEntryIter; iniEntryIter++) { + const CIniFileWithoutSection::SmartPtrSIniEntry iniEntry = *iniEntryIter; + propertyCollection.push_back(std::make_pair(iniEntry->_name, iniEntry->_valueExpanded)); + } + } + CAF_CM_EXIT; + + return propertyCollection; +} + +std::deque > CConfigProvider::createIniFilePropertyCollection( + const std::string& filePath) const { + CAF_CM_FUNCNAME_VALIDATE("createIniFilePropertyCollection"); + + std::deque > propertyCollection; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filePath); + + SmartPtrCIniFile iniFile; + iniFile.CreateInstance(); + iniFile->initialize(filePath); + + const std::deque sectionCollection = iniFile->getSectionCollection(); + for (TConstIterator > iniSectionIter(sectionCollection); + iniSectionIter; iniSectionIter++) { + const CIniFile::SmartPtrSIniSection iniSection = *iniSectionIter; + const std::string sectionName = iniSection->_sectionName; + + for (TConstIterator > iniEntryIter(iniSection->_entryCollection); + iniEntryIter; iniEntryIter++) { + const CIniFile::SmartPtrSIniEntry iniEntry = *iniEntryIter; + const std::string keyName = iniEntry->_name; + const std::string value = iniEntry->_valueRaw; + + const std::string keyPath = sectionName + _keyPathDelimStr + keyName; + propertyCollection.push_back(std::make_pair(keyPath, value)); + } + } + } + CAF_CM_EXIT; + + return propertyCollection; +} + +std::deque > CConfigProvider::createXmlFilePropertyCollection( + const std::string& filePath) const { + CAF_CM_FUNCNAME_VALIDATE("createXmlFilePropertyCollection"); + + std::deque > propertyCollection; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filePath); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseFile(filePath, std::string()); + + const std::string keyPath = rootXml->getName(); + createXmlPropertyCollection(keyPath, rootXml, propertyCollection); + } + CAF_CM_EXIT; + + return propertyCollection; +} + +void CConfigProvider::createXmlPropertyCollection( + const std::string& keyPath, + const SmartPtrCXmlElement& thisXml, + std::deque >& propertyCollection) const { + CAF_CM_FUNCNAME_VALIDATE("createXmlPropertyCollection"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(keyPath); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + // propertyCollection is optional + + const CXmlElement::SmartPtrCAttributeCollection attributeCollection = thisXml->getAllAttributes(); + if (! attributeCollection.IsNull() && ! attributeCollection->empty()) { + for (TConstIterator attributeXmlIter(*attributeCollection); + attributeXmlIter; attributeXmlIter++) { + const std::string attributeName = attributeXmlIter->first; + const std::string attributeValue = attributeXmlIter->second; + + const std::string newKeyPath = keyPath + _keyPathDelimStr + attributeName; + propertyCollection.push_back(std::make_pair(newKeyPath, attributeValue)); + } + } + + const CXmlElement::SmartPtrCElementCollection childrenXml = thisXml->getAllChildren(); + if (! childrenXml.IsNull() && ! childrenXml->empty()) { + for (TConstIterator childrenXmlIter(*childrenXml); + childrenXmlIter; childrenXmlIter++) { + const SmartPtrCXmlElement childXml = childrenXmlIter->second; + const std::string newKeyPath = keyPath + _keyPathDelimStr + childXml->getName(); + + const std::string value = childXml->getValue(); + if (! value.empty()) { + propertyCollection.push_back(std::make_pair(newKeyPath, value)); + } + + createXmlPropertyCollection(newKeyPath, childXml, propertyCollection); + } + } + } + CAF_CM_EXIT; +} + +void CConfigProvider::parseIniFileValuePath( + const std::string& valuePath, + std::string& valueName, + std::string& valueValue) const { + CAF_CM_FUNCNAME("parseIniFileValuePath"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(valuePath); + + const std::string::size_type delimPos = valuePath.find_first_of("/"); + if (delimPos == std::string::npos) { + CAF_CM_EXCEPTIONEX_VA1(NoSuchElementException, ERROR_NOT_FOUND, + "Delim not found in valuePath - valuePath: %s", valuePath.c_str()); + } + + valueName = valuePath.substr(0, delimPos); + valueValue = valuePath.substr(delimPos + 1); + + CAF_CM_LOG_DEBUG_VA3("Parsed valuePath - valuePath: %s, valueName: %s, valueValue: %s", + valuePath.c_str(), valueName.c_str(), valueValue.c_str()); + } + CAF_CM_EXIT; +} + +void CConfigProvider::parseKeyPath( + const std::string& keyPath, + std::deque& keyPathCollection, + std::string& keyName) const { + CAF_CM_FUNCNAME_VALIDATE("parseKeyPath"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(keyPath); + + std::string token; + std::stringstream stream(keyPath); + while(std::getline(stream, token, _keyPathDelimChar)) { + keyPathCollection.push_back(token); + } + + keyName = keyPathCollection.back(); + keyPathCollection.pop_back(); + } + CAF_CM_EXIT; +} + +SmartPtrCXmlElement CConfigProvider::findXmlElement( + const std::deque& keyPathCollection, + const SmartPtrCXmlElement& rootXml) const { + CAF_CM_FUNCNAME("findXmlElement"); + + SmartPtrCXmlElement xmlRc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STL(keyPathCollection); + CAF_CM_VALIDATE_SMARTPTR(rootXml); + + xmlRc = rootXml; + for (std::deque::const_iterator keyPathIter = keyPathCollection.begin(); + keyPathIter != keyPathCollection.end(); + keyPathIter++) { + const std::string keyPath = *keyPathIter; + + if (keyPathIter == keyPathCollection.begin()) { + if (xmlRc->getName().compare(keyPath) != 0) { + CAF_CM_EXCEPTIONEX_VA2(NoSuchElementException, ERROR_NOT_FOUND, + "Root element does not match - %s != %s", keyPath.c_str(), xmlRc->getName().c_str()); + } + } else { + xmlRc = xmlRc->findRequiredChild(keyPath); + } + } + } + CAF_CM_EXIT; + + return xmlRc; +} diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/Config_Provider/src/CConfigProvider.h b/open-vm-tools/common-agent/Cpp/InternalProviders/Config_Provider/src/CConfigProvider.h new file mode 100644 index 000000000..b7018843f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/Config_Provider/src/CConfigProvider.h @@ -0,0 +1,97 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CConfigProvider_h_ +#define CConfigProvider_h_ + +namespace Caf { + +/// Sends responses/errors back to the client. +class CConfigProvider : public IInvokedProvider { +public: + CConfigProvider(); + virtual ~CConfigProvider(); + +public: // IInvokedProvider + const std::string getProviderNamespace() const { + return "caf"; + } + + const std::string getProviderName() const { + return "ConfigProvider"; + } + + const std::string getProviderVersion() const { + return "1.0.0"; + } + + const SmartPtrCSchemaDoc getSchema() const; + + void collect(const IProviderRequest& request, IProviderResponse& response) const; + + void invoke(const IProviderRequest& request, IProviderResponse& response) const; + +private: + std::string _fileAliasPrefix; + std::string _keyPathDelimStr; + char _keyPathDelimChar; + +private: + SmartPtrCDataClassInstanceDoc createDataClassInstance( + const std::string& filePath, + const std::string& encoding, + const std::deque >& propertyCollection) const; + + void setValue( + const std::string& filePath, + const std::string& encoding, + const std::string& valueName, + const std::string& valueValue) const; + + void deleteValue( + const std::string& filePath, + const std::string& encoding, + const std::string& valueName) const; + + std::deque > createIniFileWithoutSectionPropertyCollection( + const std::string& filePath) const; + + std::deque > createIniFilePropertyCollection( + const std::string& filePath) const; + + std::deque > createXmlFilePropertyCollection( + const std::string& filePath) const; + + void createXmlPropertyCollection( + const std::string& keyPath, + const SmartPtrCXmlElement& thisXml, + std::deque >& propertyCollection) const; + + void parseIniFileValuePath( + const std::string& valuePath, + std::string& valueName, + std::string& valueValue) const; + + void parseKeyPath( + const std::string& keyPath, + std::deque& keyPathCollection, + std::string& keyName) const; + + SmartPtrCXmlElement findXmlElement( + const std::deque& keyPathCollection, + const SmartPtrCXmlElement& rootXml) const; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CConfigProvider); +}; + +} + +#endif // #ifndef CConfigProvider_h_ diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/Config_Provider/src/CIniFileWithoutSection.cpp b/open-vm-tools/common-agent/Cpp/InternalProviders/Config_Provider/src/CIniFileWithoutSection.cpp new file mode 100644 index 000000000..ef902a91e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/Config_Provider/src/CIniFileWithoutSection.cpp @@ -0,0 +1,476 @@ +/* + * Author: bwilliams + * Created: May 18, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CIniFileWithoutSection.h" + +using namespace Caf; + +CIniFileWithoutSection::CIniFileWithoutSection() : + _isInitialized(false), + CAF_CM_INIT_LOG("CIniFileWithoutSection") { +} + +CIniFileWithoutSection::~CIniFileWithoutSection() { +} + +void CIniFileWithoutSection::initialize( + const std::string& configFilePath) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(configFilePath); + + _configFilePath = configFilePath; + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +std::deque CIniFileWithoutSection::getEntryCollection() { + CAF_CM_FUNCNAME_VALIDATE("getEntryCollection"); + + std::deque entryCollection; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + if (_entryCollection.empty()) { + _entryCollection = parse(_configFilePath); + } + + entryCollection = _entryCollection; + } + CAF_CM_EXIT; + + return entryCollection; +} + +CIniFileWithoutSection::SmartPtrSIniEntry CIniFileWithoutSection::findOptionalEntry( + const std::string& keyName) { + CAF_CM_FUNCNAME_VALIDATE("findOptionalEntry"); + + CIniFileWithoutSection::SmartPtrSIniEntry iniEntry; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(keyName); + + if (_entryCollection.empty()) { + _entryCollection = parse(_configFilePath); + } + + for (TConstIterator > iniEntryIter(_entryCollection); + iniEntryIter; iniEntryIter++) { + const SmartPtrSIniEntry iniEntryTmp = *iniEntryIter; + const std::string keyNameTmp = iniEntryTmp->_name; + if (keyNameTmp.compare(keyName) == 0) { + iniEntry = iniEntryTmp; + break; + } + } + } + CAF_CM_EXIT; + + return iniEntry; +} + +CIniFileWithoutSection::SmartPtrSIniEntry CIniFileWithoutSection::findRequiredEntry( + const std::string& keyName) { + CAF_CM_FUNCNAME("findRequiredEntry"); + + SmartPtrSIniEntry iniEntry; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(keyName); + + iniEntry = findOptionalEntry(keyName); + if (iniEntry.IsNull()) { + CAF_CM_EXCEPTIONEX_VA1(NoSuchElementException, ERROR_NOT_FOUND, + "Value not found - keyName: %s", keyName.c_str()); + } + } + CAF_CM_EXIT; + + return iniEntry; +} + +std::string CIniFileWithoutSection::findOptionalString( + const std::string& keyName) { + CAF_CM_FUNCNAME_VALIDATE("findOptionalString"); + + std::string value; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(keyName); + + const SmartPtrSIniEntry iniEntry = findOptionalEntry(keyName); + if (! iniEntry.IsNull()) { + value = iniEntry->_valueExpanded; + } + } + CAF_CM_EXIT; + + return value; +} + +std::string CIniFileWithoutSection::findRequiredString( + const std::string& keyName) { + CAF_CM_FUNCNAME_VALIDATE("findRequiredString"); + + std::string value; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(keyName); + + const SmartPtrSIniEntry iniEntry = findRequiredEntry(keyName); + value = iniEntry->_valueExpanded; + } + CAF_CM_EXIT; + + return value; +} + +std::string CIniFileWithoutSection::findOptionalRawString( + const std::string& keyName) { + CAF_CM_FUNCNAME_VALIDATE("findOptionalRawString"); + + std::string value; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(keyName); + + const SmartPtrSIniEntry iniEntry = findOptionalEntry(keyName); + if (! iniEntry.IsNull()) { + value = iniEntry->_valueRaw; + } + } + CAF_CM_EXIT; + + return value; +} + +std::string CIniFileWithoutSection::findRequiredRawString( + const std::string& keyName) { + CAF_CM_FUNCNAME_VALIDATE("findRequiredRawString"); + + std::string value; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(keyName); + + const SmartPtrSIniEntry iniEntry = findRequiredEntry(keyName); + value = iniEntry->_valueRaw; + } + CAF_CM_EXIT; + + return value; +} + +void CIniFileWithoutSection::log() { + CAF_CM_FUNCNAME_VALIDATE("log"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + if (_entryCollection.empty()) { + _entryCollection = parse(_configFilePath); + } + + for (TConstIterator > iniEntryIter(_entryCollection); + iniEntryIter; iniEntryIter++) { + const SmartPtrSIniEntry iniEntry = *iniEntryIter; + CAF_CM_LOG_DEBUG_VA3("Entry - %s=%s (%s)", + iniEntry->_name.c_str(), iniEntry->_valueRaw.c_str(), iniEntry->_valueExpanded.c_str()); + } + } + CAF_CM_EXIT; +} + +void CIniFileWithoutSection::setValue( + const std::string valueName, + const std::string valueValue) { + CAF_CM_FUNCNAME_VALIDATE("setValue"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(valueName); + CAF_CM_VALIDATE_STRING(valueValue); + + const std::string srchValueName = valueName + "="; + const std::string newFileLine = valueName + "=" + valueValue + "\n"; + + bool isValueNameFnd = false; + std::deque newFileContents; + const std::deque fileContents = loadTextFileIntoCollection(_configFilePath); + for(TConstIterator > fileLineIter(fileContents); + fileLineIter; fileLineIter++) { + const std::string fileLine = *fileLineIter; + + if (fileLine.find(srchValueName) == 0) { + CAF_CM_LOG_DEBUG_VA2("Matched line... changing - valueName: %s, valueValue: %s", + valueName.c_str(), valueValue.c_str()); + + isValueNameFnd = true; + newFileContents.push_back(newFileLine); + } else { + newFileContents.push_back(fileLine); + } + } + + if (! isValueNameFnd) { + CAF_CM_LOG_WARN_VA1("Value name not found, adding... - %s", newFileLine.c_str()); + newFileContents.push_back(newFileLine); + } + + _entryCollection.clear(); + saveTextFile(newFileContents, _configFilePath); + } + CAF_CM_EXIT; +} + +void CIniFileWithoutSection::deleteValue( + const std::string valueName) { + CAF_CM_FUNCNAME_VALIDATE("deleteValue"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(valueName); + + const std::string srchValueName = valueName + "="; + + std::deque newFileContents; + const std::deque FileContents = loadTextFileIntoCollection(_configFilePath); + for(TConstIterator > fileLineIter(FileContents); + fileLineIter; fileLineIter++) { + const std::string fileLine = *fileLineIter; + + if (fileLine.find(srchValueName) == 0) { + CAF_CM_LOG_DEBUG_VA2("Matched line... deleting - srchValueName: %s, line: %s", + srchValueName.c_str(), fileLine.c_str()); + } else { + newFileContents.push_back(fileLine); + } + } + + _entryCollection.clear(); + saveTextFile(newFileContents, _configFilePath); + } + CAF_CM_EXIT; +} + +std::deque CIniFileWithoutSection::parse( + const std::string& configFilePath) const { + CAF_CM_FUNCNAME_VALIDATE("parse"); + + std::deque entryCollection; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(configFilePath); + + std::deque replacementCollection; + + SmartPtrCCafRegex goodLineRegex; + goodLineRegex.CreateInstance(); + goodLineRegex->initialize("^[A-Za-z0-9]"); + + SmartPtrCCafRegex newLineRegex; + newLineRegex.CreateInstance(); + newLineRegex->initialize("\n"); + + const std::deque fileContents = loadTextFileIntoCollection(configFilePath); + for(TConstIterator > fileLineIter(fileContents); + fileLineIter; fileLineIter++) { + const std::string fileLine = *fileLineIter; + const std::string newFileLine = newLineRegex->replaceLiteral(fileLine, " "); + + if (goodLineRegex->isMatched(newFileLine)) { + const Cdeqstr fileLineTokens = CStringUtils::split(newFileLine, '='); + if (fileLineTokens.size() == 2) { + const std::string keyName = fileLineTokens[0]; + const std::string valueRaw = fileLineTokens[1]; + + std::string valueExpanded = CStringUtils::expandEnv(valueRaw); + for (TConstIterator > replacementIter(replacementCollection); + replacementIter; replacementIter++ ) { + const SmartPtrSReplacement replacement = *replacementIter; + if (replacement->_regex->isMatched(valueExpanded)) { + valueExpanded = replacement->_regex->replaceLiteral(valueExpanded, replacement->_value); + break; + } + } + + const SmartPtrSReplacement replacement = createReplacement(keyName, valueExpanded); + replacementCollection.push_back(replacement); + + const SmartPtrSIniEntry iniEntry = createIniEntry(keyName, valueRaw, valueExpanded); + entryCollection.push_back(iniEntry); + } else { + CAF_CM_LOG_WARN_VA2("Invalid line - file: %s, line: %s", configFilePath.c_str(), newFileLine.c_str()); + } + } + } + } + CAF_CM_EXIT; + + return entryCollection; +} + +CIniFileWithoutSection::SmartPtrSReplacement CIniFileWithoutSection::createReplacement( + const std::string& keyName, + const std::string& value) const { + CAF_CM_FUNCNAME_VALIDATE("createReplacement"); + + SmartPtrSReplacement replacement; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(keyName); + + std::string pattern("\\$\\{"); + pattern += keyName; + pattern += "\\}"; + + SmartPtrCCafRegex regex; + regex.CreateInstance(); + regex->initialize(pattern); + + replacement.CreateInstance(); + replacement->_regex = regex; + replacement->_value = value; + } + CAF_CM_EXIT; + + return replacement; +} + +CIniFileWithoutSection::SmartPtrSIniEntry CIniFileWithoutSection::createIniEntry( + const std::string& keyName, + const std::string& valueRaw, + const std::string& valueExpanded) const { + CAF_CM_FUNCNAME_VALIDATE("createIniEntry"); + + SmartPtrSIniEntry iniEntry; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(keyName); + CAF_CM_VALIDATE_STRING(valueRaw); + CAF_CM_VALIDATE_STRING(valueExpanded); + + iniEntry.CreateInstance(); + iniEntry->_name = keyName; + iniEntry->_valueRaw = valueRaw; + iniEntry->_valueExpanded = valueExpanded; + } + CAF_CM_EXIT; + + return iniEntry; +} + +std::deque CIniFileWithoutSection::loadTextFileIntoCollection( + const std::string& filePath) const { + CAF_CM_FUNCNAME("loadTextFileIntoCollection"); + + std::deque rc; + const uint32 maxLineLen = 512; + + FILE* fileHandle = NULL; + + try { + CAF_CM_VALIDATE_STRING(filePath); + + if (! FileSystemUtils::doesFileExist(filePath)) { + CAF_CM_EXCEPTIONEX_VA1(FileNotFoundException, ERROR_FILE_NOT_FOUND, + "File not found - %s", filePath.c_str()); + } + +#ifdef WIN32 + const errno_t fopenRc = ::fopen_s(&fileHandle, filePath.c_str(), "r" ); + if ((fopenRc != 0) || (fileHandle == NULL)) { + CAF_CM_EXCEPTIONEX_VA1(InvalidHandleException, E_UNEXPECTED, + "Failed to open file - %s", filePath.c_str()); + } +#else + fileHandle = ::fopen(filePath.c_str(), "r" ); + if (fileHandle == NULL) { + CAF_CM_EXCEPTIONEX_VA1(InvalidHandleException, E_UNEXPECTED, + "Failed to open file - %s", filePath.c_str()); + } +#endif + + char buffer[maxLineLen]; + while(::fgets(buffer, maxLineLen, fileHandle) != NULL) { + rc.push_back(buffer); + } + } + CAF_CM_CATCH_ALL; + + try { + if (fileHandle != NULL) { + ::fclose(fileHandle); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_THROWEXCEPTION; + + return rc; +} + +void CIniFileWithoutSection::saveTextFile( + const std::deque fileContents, + const std::string filePath) const { + CAF_CM_FUNCNAME("saveTextFile"); + + FILE* fileHandle = NULL; + + try { + CAF_CM_VALIDATE_STL(fileContents); + CAF_CM_VALIDATE_STRING(filePath); + + if (! FileSystemUtils::doesFileExist(filePath)) { + CAF_CM_EXCEPTIONEX_VA1(FileNotFoundException, ERROR_FILE_NOT_FOUND, + "File not found - %s", filePath.c_str()); + } + +#ifdef WIN32 + const errno_t fopenRc = ::fopen_s(&fileHandle, filePath.c_str(), "w" ); + if ((fopenRc != 0) || (fileHandle == NULL)) { + CAF_CM_EXCEPTIONEX_VA1(InvalidHandleException, E_UNEXPECTED, + "Failed to open file - %s", filePath.c_str()); + } +#else + fileHandle = ::fopen(filePath.c_str(), "w" ); + if (fileHandle == NULL) { + CAF_CM_EXCEPTIONEX_VA1(InvalidHandleException, E_UNEXPECTED, + "Failed to open file - %s", filePath.c_str()); + } +#endif + + for(TConstIterator > fileLineIter(fileContents); + fileLineIter; fileLineIter++) { + const std::string fileLine = *fileLineIter; + ::fputs(fileLine.c_str(), fileHandle); + } + } + CAF_CM_CATCH_ALL; + + try { + if (fileHandle != NULL) { + ::fclose(fileHandle); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_THROWEXCEPTION; +} diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/Config_Provider/src/CIniFileWithoutSection.h b/open-vm-tools/common-agent/Cpp/InternalProviders/Config_Provider/src/CIniFileWithoutSection.h new file mode 100644 index 000000000..28c5f8f91 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/Config_Provider/src/CIniFileWithoutSection.h @@ -0,0 +1,101 @@ +/* + * Author: bwilliams + * Created: May 18, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CINIFILEWITHOUTSECTION_H_ +#define CINIFILEWITHOUTSECTION_H_ + +namespace Caf { + +class CIniFileWithoutSection { +public: + struct SIniEntry { + std::string _name; + std::string _valueRaw; + std::string _valueExpanded; + }; + CAF_DECLARE_SMART_POINTER(SIniEntry); + +public: + CIniFileWithoutSection(); + virtual ~CIniFileWithoutSection(); + +public: + void initialize(const std::string& configFilePath); + + std::deque getEntryCollection(); + + SmartPtrSIniEntry findOptionalEntry( + const std::string& keyName); + + SmartPtrSIniEntry findRequiredEntry( + const std::string& keyName); + + std::string findOptionalString( + const std::string& keyName); + + std::string findRequiredString( + const std::string& keyName); + + std::string findOptionalRawString( + const std::string& keyName); + + std::string findRequiredRawString( + const std::string& keyName); + + void log(); + + void setValue( + const std::string valueName, + const std::string valueValue); + + void deleteValue( + const std::string valueName); + +private: + struct SReplacement { + SmartPtrCCafRegex _regex; + std::string _value; + }; + CAF_DECLARE_SMART_POINTER(SReplacement); + +private: + std::deque parse( + const std::string& configFilePath) const; + + SmartPtrSReplacement createReplacement( + const std::string& keyName, + const std::string& value) const; + + SmartPtrSIniEntry createIniEntry( + const std::string& keyName, + const std::string& valueRaw, + const std::string& valueExpanded) const; + + std::deque loadTextFileIntoCollection( + const std::string& filePath) const; + + void saveTextFile( + const std::deque fileContents, + const std::string filePath) const; + +private: + bool _isInitialized; + std::string _configFilePath; + std::deque _entryCollection; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CIniFileWithoutSection); +}; + +CAF_DECLARE_SMART_POINTER(CIniFileWithoutSection); + +} + +#endif /* CINIFILEWITHOUTSECTION_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/Config_Provider/src/ConfigProvider.cpp b/open-vm-tools/common-agent/Cpp/InternalProviders/Config_Provider/src/ConfigProvider.cpp new file mode 100644 index 000000000..dbc89e415 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/Config_Provider/src/ConfigProvider.cpp @@ -0,0 +1,17 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" + +using namespace Caf; + +int main(int csz, char* asz[]) +{ + CConfigProvider provider; + return CProviderDriver::processProviderCommandline(provider, csz, asz); +} diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/Config_Provider/src/stdafx.h b/open-vm-tools/common-agent/Cpp/InternalProviders/Config_Provider/src/stdafx.h new file mode 100644 index 000000000..7f34b0b70 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/Config_Provider/src/stdafx.h @@ -0,0 +1,21 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef stdafx_h_ +#define stdafx_h_ + +//{{CAF_SUBSYSTEM}} + +#include +#include +#include + +#include "../../Config_Provider/src/CConfigProvider.h" +#include "../../Config_Provider/src/CIniFileWithoutSection.h" + +#endif // #ifndef stdafx_h_ diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CInstallProvider.cpp b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CInstallProvider.cpp new file mode 100644 index 000000000..18be19930 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CInstallProvider.cpp @@ -0,0 +1,227 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CInstallProvider.h" + +using namespace Caf; + +CInstallProvider::CInstallProvider() : + CAF_CM_INIT_LOG("CInstallProvider") { +} + +CInstallProvider::~CInstallProvider() { +} + +const SmartPtrCSchemaDoc CInstallProvider::getSchema() const { + std::deque dc1Props; + dc1Props.push_back(CProviderDocHelper::createClassProperty("index", PROPERTY_UINT32, true)); + dc1Props.push_back(CProviderDocHelper::createClassProperty("packageNamespace", PROPERTY_STRING, true)); + dc1Props.push_back(CProviderDocHelper::createClassProperty("packageName", PROPERTY_STRING, true)); + dc1Props.push_back(CProviderDocHelper::createClassProperty("packageVersion", PROPERTY_STRING, true)); + dc1Props.push_back(CProviderDocHelper::createClassProperty("startupAttachmentName", PROPERTY_STRING, true)); + dc1Props.push_back(CProviderDocHelper::createClassProperty("packageAttachmentName", PROPERTY_STRING, true)); + dc1Props.push_back(CProviderDocHelper::createClassProperty("arguments", PROPERTY_STRING, true)); + dc1Props.push_back(CProviderDocHelper::createClassProperty("supportingAttachmentName", PROPERTY_STRING, false, false, true)); + + std::deque dc2Props; + dc2Props.push_back(CProviderDocHelper::createClassProperty("clientId", PROPERTY_STRING, true)); + dc2Props.push_back(CProviderDocHelper::createClassProperty("providerNamespace", PROPERTY_STRING, true)); + dc2Props.push_back(CProviderDocHelper::createClassProperty("providerName", PROPERTY_STRING, true)); + dc2Props.push_back(CProviderDocHelper::createClassProperty("providerVersion", PROPERTY_STRING, true)); + dc2Props.push_back(CProviderDocHelper::createClassProperty("packageOSType", PROPERTY_STRING, true)); + + std::deque instanceProperties; + instanceProperties.push_back(CProviderDocHelper::createClassInstanceProperty( + "fullPackageElem", + CProviderDocHelper::createClassIdentifier("caf", "FullPackageElem", "1.0.0"), + true, + false, + true)); + instanceProperties.push_back(CProviderDocHelper::createClassInstanceProperty( + "unfullPackageElem", + CProviderDocHelper::createClassIdentifier("caf", "FullPackageElem", "1.0.0"), + true, + false, + true)); + + std::deque dc3Props; + dc3Props.push_back(CProviderDocHelper::createClassProperty("packageOSType", PROPERTY_STRING, true)); + dc3Props.push_back(CProviderDocHelper::createClassProperty("clientId", PROPERTY_STRING, true)); + dc3Props.push_back(CProviderDocHelper::createClassProperty("providerNamespace", PROPERTY_STRING, true)); + dc3Props.push_back(CProviderDocHelper::createClassProperty("providerName", PROPERTY_STRING, true)); + dc3Props.push_back(CProviderDocHelper::createClassProperty("providerVersion", PROPERTY_STRING, true)); + dc3Props.push_back(CProviderDocHelper::createClassProperty("packageOSType", PROPERTY_STRING, true)); + + std::deque dataClasses; + dataClasses.push_back(CProviderDocHelper::createDataClass("caf", "FullPackageElem", "1.0.0", dc1Props)); + dataClasses.push_back(CProviderDocHelper::createDataClass("caf", "InstallProviderJob", "1.0.0", dc2Props, instanceProperties)); + dataClasses.push_back(CProviderDocHelper::createDataClass("caf", "UninstallProviderJob", "1.0.0", dc3Props)); + + std::deque m1InstanceParams; + m1InstanceParams.push_back(CProviderDocHelper::createInstanceParameter( + "installProviderJob", + "caf", + "InstallProviderJob", + "1.0.0", + false)); + + std::deque m2InstanceParams; + m2InstanceParams.push_back(CProviderDocHelper::createInstanceParameter( + "uninstallProviderJob", + "caf", + "UninstallProviderJob", + "1.0.0", + false)); + + std::deque emptyParams; + + std::deque methods; + methods.push_back(CProviderDocHelper::createMethod("installProviderJob", emptyParams, m1InstanceParams)); + methods.push_back(CProviderDocHelper::createMethod("uninstallProviderJob", emptyParams, m2InstanceParams)); + + std::deque actionClasses; + actionClasses.push_back( + CProviderDocHelper::createActionClass( + "caf", + "InstallActions", + "1.0.0", + CProviderDocHelper::createCollectMethod("collectInstances"), + methods)); + + return CProviderDocHelper::createSchema(dataClasses, actionClasses); +} + +void CInstallProvider::collect(const IProviderRequest& request, IProviderResponse& response) const { + + const CProviderInstaller::SmartPtrCInstallProviderSpecCollection installProviderSpecCollection = + CProviderInstaller::readInstallProviderSpecs(); + if (!installProviderSpecCollection.IsNull()) { + for (TConstIterator > + installProviderSpecIter(*installProviderSpecCollection); installProviderSpecIter; installProviderSpecIter++) { + const SmartPtrCInstallProviderSpecDoc installProviderSpec = + *installProviderSpecIter; + + const SmartPtrCDataClassInstanceDoc dataClassInstance = createDataClassInstance( + installProviderSpec); + + response.addInstance(dataClassInstance); + } + } +} + +void CInstallProvider::invoke(const IProviderRequest& request, IProviderResponse& response) const { + CAF_CM_FUNCNAME("invoke"); + + SmartPtrCProviderInvokeOperationDoc doc = request.getInvokeOperations(); + CAF_CM_VALIDATE_SMARTPTR(doc); + + const SmartPtrCOperationDoc operation = doc->getOperation(); + const std::string operationName = operation->getName(); + + const SmartPtrCParameterCollectionDoc parameterCollection = + operation->getParameterCollection(); + + const std::string outputDir = doc->getOutputDir(); + + if (operationName.compare("installProviderJob") == 0) { + const std::string installProviderJobStr = + ParameterUtils::findRequiredInstanceParameterAsString("installProviderJob", + parameterCollection); + CAF_CM_VALIDATE_STRING(installProviderJobStr); + + const SmartPtrCDynamicByteArray payload = + CCafMessagePayload::createBufferFromStr(installProviderJobStr); + const SmartPtrCInstallProviderJobDoc installProviderJob = + CCafMessagePayloadParser::getInstallProviderJob(payload); + + if (isCurrentOS(installProviderJob->getPackageOSType())) { + CProviderInstaller::installProvider(installProviderJob, request.getAttachments(), outputDir); + } + } else if (operationName.compare("uninstallProviderJob") == 0) { + const std::string uninstallProviderJobStr = + ParameterUtils::findRequiredInstanceParameterAsString("uninstallProviderJob", + parameterCollection); + + const SmartPtrCDynamicByteArray payload = + CCafMessagePayload::createBufferFromStr(uninstallProviderJobStr); + const SmartPtrCUninstallProviderJobDoc uninstallProviderJob = + CCafMessagePayloadParser::getUninstallProviderJob(payload); + + if (isCurrentOS(uninstallProviderJob->getPackageOSType())) { + CProviderInstaller::uninstallProvider(uninstallProviderJob, outputDir); + } + } else { + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Invalid operation name (must be \'installProviderJob\' or \'uninstallProviderJob\') - %s", operationName.c_str()) + } +} + +SmartPtrCDataClassInstanceDoc CInstallProvider::createDataClassInstance( + const SmartPtrCInstallProviderSpecDoc& installProviderSpec) const { + CAF_CM_FUNCNAME_VALIDATE("createDataClassInstance"); + CAF_CM_VALIDATE_SMARTPTR(installProviderSpec); + + const std::deque minPackageElemCollection = + installProviderSpec->getPackageCollection(); + + std::deque subInstances; + for (TConstIterator > minPackageElemIter( + minPackageElemCollection); minPackageElemIter; minPackageElemIter++) { + const SmartPtrCMinPackageElemDoc minPackageElem = *minPackageElemIter; + + const std::string packageNamespace = minPackageElem->getPackageNamespace(); + const std::string packageName = minPackageElem->getPackageName(); + const std::string packageVersion = minPackageElem->getPackageVersion(); + + std::deque siProperties; + siProperties.push_back(CProviderDocHelper::createDataClassProperty("packageNamespace", packageNamespace)); + siProperties.push_back(CProviderDocHelper::createDataClassProperty("packageName", packageName)); + siProperties.push_back(CProviderDocHelper::createDataClassProperty("packageVersion", packageVersion)); + subInstances.push_back(CProviderDocHelper::createDataClassSubInstance( + "fullPackageElem", + siProperties)); + } + + const std::string clientId = + BasePlatform::UuidToString(installProviderSpec->getClientId()); + const std::string providerNamespace = installProviderSpec->getProviderNamespace(); + const std::string providerName = installProviderSpec->getProviderName(); + const std::string providerVersion = installProviderSpec->getProviderVersion(); + + std::deque dataClassProperties; + dataClassProperties.push_back(CProviderDocHelper::createDataClassProperty("clientId", clientId)); + dataClassProperties.push_back(CProviderDocHelper::createDataClassProperty("providerNamespace", providerNamespace)); + dataClassProperties.push_back(CProviderDocHelper::createDataClassProperty("providerName", providerName)); + dataClassProperties.push_back(CProviderDocHelper::createDataClassProperty("providerVersion", providerVersion)); + return CProviderDocHelper::createDataClassInstance( + "caf", + "CafProviderInventory", + "1.0.0", + dataClassProperties, + subInstances); +} + +bool CInstallProvider::isCurrentOS(const PACKAGE_OS_TYPE& packageOSType) const { + CAF_CM_FUNCNAME_VALIDATE("isCurrentOS"); + +#ifdef WIN32 + const PACKAGE_OS_TYPE packageOSTypeLocal = PACKAGE_OS_WIN; +#else + const PACKAGE_OS_TYPE packageOSTypeLocal = PACKAGE_OS_NIX; +#endif + + bool rc = false; + if ((packageOSType == packageOSTypeLocal) || (packageOSType == PACKAGE_OS_ALL)) { + rc = true; + } else { + CAF_CM_LOG_WARN_VA0("Wrong OS... Skipping package"); + } + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CInstallProvider.h b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CInstallProvider.h new file mode 100644 index 000000000..273b0b1dc --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CInstallProvider.h @@ -0,0 +1,53 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CInstallProvider_h_ +#define CInstallProvider_h_ + +namespace Caf { + +/// Sends responses/errors back to the client. +class CInstallProvider : public IInvokedProvider { +public: + CInstallProvider(); + virtual ~CInstallProvider(); + +public: // IInvokedProvider + const std::string getProviderNamespace() const { + return "caf"; + } + + const std::string getProviderName() const { + return "InstallProvider"; + } + + const std::string getProviderVersion() const { + return "1.0.0"; + } + + const SmartPtrCSchemaDoc getSchema() const; + + void collect(const IProviderRequest& request, IProviderResponse& response) const; + + void invoke(const IProviderRequest& request, IProviderResponse& response) const; + +private: + SmartPtrCDataClassInstanceDoc createDataClassInstance( + const SmartPtrCInstallProviderSpecDoc& installProviderSpec) const; + + bool isCurrentOS(const PACKAGE_OS_TYPE& packageOSType) const; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CInstallProvider); +}; + +} + +#endif // #ifndef CInstallProvider_h_ diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CInstallUtils.cpp b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CInstallUtils.cpp new file mode 100644 index 000000000..12a836321 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CInstallUtils.cpp @@ -0,0 +1,58 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CInstallUtils.h" + +using namespace Caf; + +CInstallUtils::MATCH_STATUS CInstallUtils::compareVersions( + const std::string& packageVersion1, + const std::string& packageVersion2) { + CAF_CM_STATIC_FUNC_LOG("CInstallUtils", "compareVersions"); + + MATCH_STATUS matchStatus = MATCH_NOTEQUAL; + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_STRING(packageVersion1); + CAF_CM_VALIDATE_STRING(packageVersion2); + + const Cdeqstr packageVersionTokens1 = CStringUtils::split(packageVersion1, '.'); + if (packageVersionTokens1.size() != 3) { + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Package version 1 has a bad format - %s", + packageVersion1.c_str()); + } + + const Cdeqstr packageVersionTokens2 = CStringUtils::split(packageVersion2, '.'); + if (packageVersionTokens2.size() != 3) { + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Package version 2 has a bad format - %s", + packageVersion2.c_str()); + } + + if ((packageVersionTokens1[0].compare(packageVersionTokens2[0]) == 0) + && (packageVersionTokens1[1].compare(packageVersionTokens2[1]) == 0)) { + const uint32 lastVersionPos1 = CStringConv::fromString( + packageVersionTokens1[2]); + const uint32 lastVersionPos2 = CStringConv::fromString( + packageVersionTokens2[2]); + if (lastVersionPos1 == lastVersionPos2) { + matchStatus = MATCH_VERSION_EQUAL; + } else if (lastVersionPos1 < lastVersionPos2) { + matchStatus = MATCH_VERSION_LESS; + } else { + matchStatus = MATCH_VERSION_GREATER; + } + } + } + CAF_CM_EXIT; + + return matchStatus; +} diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CInstallUtils.h b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CInstallUtils.h new file mode 100644 index 000000000..776cbe4f5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CInstallUtils.h @@ -0,0 +1,33 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CInstallUtils_h_ +#define CInstallUtils_h_ + +namespace Caf { + +class CInstallUtils { +public: + typedef enum { + MATCH_NOTEQUAL, + MATCH_VERSION_EQUAL, + MATCH_VERSION_LESS, + MATCH_VERSION_GREATER + } MATCH_STATUS; + + static MATCH_STATUS compareVersions( + const std::string& packageVersion1, + const std::string& packageVersion2); + +private: + CAF_CM_DECLARE_NOCREATE(CInstallUtils); +}; + +} + +#endif // #ifndef CInstallUtils_h_ diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CPackageExecutor.cpp b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CPackageExecutor.cpp new file mode 100644 index 000000000..cea43a6e8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CPackageExecutor.cpp @@ -0,0 +1,155 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CPackageExecutor.h" + +using namespace Caf; + +void CPackageExecutor::executePackage( + const SmartPtrCAttachmentDoc& startupAttachment, + const std::string& startupArgument, + const SmartPtrCAttachmentDoc& packageAttachment, + const std::string& packageArguments, + const SmartPtrCAttachmentCollectionDoc& supportingAttachmentCollection, + const std::string& outputDir) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPackageExecutor", "executePackage"); + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_SMARTPTR(startupAttachment); + CAF_CM_VALIDATE_STRING(startupArgument); + CAF_CM_VALIDATE_SMARTPTR(packageAttachment); + // packageArguments is optional + // supportingAttachmentCollection is optional + CAF_CM_VALIDATE_STRING(outputDir); + + const std::string installInvoker = createInstallInvoker(startupAttachment, + startupArgument, packageAttachment, packageArguments, + supportingAttachmentCollection, outputDir); + + runInstallInvoker(installInvoker, outputDir); + } + CAF_CM_EXIT; +} + +std::string CPackageExecutor::createInstallInvoker( + const SmartPtrCAttachmentDoc& startupAttachment, + const std::string& startupArgument, + const SmartPtrCAttachmentDoc& packageAttachment, + const std::string& packageArguments, + const SmartPtrCAttachmentCollectionDoc& supportingAttachmentCollection, + const std::string& outputDir) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPackageExecutor", "createInstallInvoker"); + + std::string installInvoker; + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_SMARTPTR(startupAttachment); + CAF_CM_VALIDATE_STRING(startupArgument); + CAF_CM_VALIDATE_SMARTPTR(packageAttachment); + // packageArguments is optional + // supportingAttachmentCollection is optional + CAF_CM_VALIDATE_STRING(outputDir); + + const std::string inputDir = CPathBuilder::getRootConfigDir(_sConfigInputDir); +#ifdef WIN32 + const std::string installProviderHeaderPath = + FileSystemUtils::buildPath(inputDir, "installProviderHeader.bat"); +#else + const std::string installProviderHeaderPath = + FileSystemUtils::buildPath(inputDir, "installProviderHeader.sh"); +#endif + const std::string installProviderHeader = FileSystemUtils::loadTextFile( + installProviderHeaderPath); + + std::string attachmentUris = ""; + if (!supportingAttachmentCollection.IsNull()) { + const std::deque attachmentCollectionInner = + supportingAttachmentCollection->getAttachment(); + for (TConstIterator > attachmentIter( + attachmentCollectionInner); attachmentIter; attachmentIter++) { + const SmartPtrCAttachmentDoc attachment = *attachmentIter; + attachmentUris += attachment->getUri() + ";"; + } + } + + const std::string startupAttachmentUri = startupAttachment->getUri(); + std::string startupAttachmentFile = UriUtils::parseRequiredFilePath( + startupAttachmentUri); + + const std::string packageAttachmentUri = packageAttachment->getUri(); + std::string packageAttachmentFile = UriUtils::parseRequiredFilePath( + packageAttachmentUri); + + const std::string packageArgumentsTmp = packageArguments.empty() ? "" + : packageArguments; + +#ifdef WIN32 + const std::string newLine = "\r\n"; + const std::string fileContents = + installProviderHeader + newLine + + std::string("set CAF_PACKAGE_FILE=") + packageAttachmentFile + newLine + + std::string("set CAF_PACKAGE_ARGS=") + packageArgumentsTmp + newLine + + std::string("set CAF_ATTACHMENT_URIS=") + attachmentUris + newLine + + startupAttachmentFile + " " + startupArgument + newLine; + installInvoker = FileSystemUtils::buildPath(outputDir, "CafInstallInvoker.bat"); +#else + const std::string newLine = "\n"; + const std::string fileContents = + installProviderHeader + newLine + + std::string("export CAF_PACKAGE_FILE=") + packageAttachmentFile + newLine + + std::string("export CAF_PACKAGE_ARGS=") + packageArgumentsTmp + newLine + + std::string("export CAF_ATTACHMENT_URIS=") + attachmentUris + newLine + + startupAttachmentFile + " " + startupArgument + newLine; + installInvoker = FileSystemUtils::buildPath(outputDir, "CafInstallInvoker"); +#endif + + const uint32 exeByOwner = 0100; + const uint32 writeByOwner = 0200; + const uint32 readByOwner = 0400; + const uint32 fileMode = exeByOwner | writeByOwner | readByOwner; + + FileSystemUtils::saveTextFile(installInvoker, fileContents); + FileSystemUtils::chmod(installInvoker, fileMode); + FileSystemUtils::chmod(startupAttachmentFile, fileMode); + FileSystemUtils::chmod(packageAttachmentFile, fileMode); + } + CAF_CM_EXIT; + + return installInvoker; +} + +void CPackageExecutor::runInstallInvoker( + const std::string& installInvoker, + const std::string& outputDir) { + CAF_CM_STATIC_FUNC_LOG("CPackageExecutor", "runInstallInvoker"); + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_STRING(installInvoker); + CAF_CM_VALIDATE_STRING(outputDir); + + if (!FileSystemUtils::doesFileExist(installInvoker)) { + CAF_CM_EXCEPTIONEX_VA1(FileNotFoundException, ERROR_FILE_NOT_FOUND, + "Install invoker not found - %s", installInvoker.c_str()); + } + + const std::string stdoutPath = FileSystemUtils::buildPath(outputDir, + _sStdoutFilename); + const std::string stderrPath = FileSystemUtils::buildPath(outputDir, + _sStderrFilename); + + Cdeqstr argv; + argv.push_back(installInvoker); + + ProcessUtils::runSyncToFiles(argv, stdoutPath, stderrPath); + } + CAF_CM_EXIT; +} diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CPackageExecutor.h b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CPackageExecutor.h new file mode 100644 index 000000000..269d7d260 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CPackageExecutor.h @@ -0,0 +1,44 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CPackageExecutor_h_ +#define CPackageExecutor_h_ + +namespace Caf { + +/// Utilities used in the install process. +class CPackageExecutor { +public: + static void executePackage( + const SmartPtrCAttachmentDoc& startupAttachment, + const std::string& startupArgument, + const SmartPtrCAttachmentDoc& packageAttachment, + const std::string& packageArguments, + const SmartPtrCAttachmentCollectionDoc& supportingAttachmentCollection, + const std::string& outputDir); + +private: + static std::string createInstallInvoker( + const SmartPtrCAttachmentDoc& startupAttachment, + const std::string& startupArgument, + const SmartPtrCAttachmentDoc& packageAttachment, + const std::string& packageArguments, + const SmartPtrCAttachmentCollectionDoc& supportingAttachmentCollection, + const std::string& outputDir); + + static void runInstallInvoker( + const std::string& installInvoker, + const std::string& outputDir); + +private: + CAF_CM_DECLARE_NOCREATE(CPackageExecutor); +}; + +} + +#endif // #ifndef CPackageExecutor_h_ diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CPackageInstaller.cpp b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CPackageInstaller.cpp new file mode 100644 index 000000000..17588bd25 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CPackageInstaller.cpp @@ -0,0 +1,645 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CPackageInstaller.h" + +using namespace Caf; + +void CPackageInstaller::installPackages( + const std::deque& fullPackageElemCollection, + const SmartPtrCAttachmentCollectionDoc& attachmentCollection, + const std::string& outputDir) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPackageInstaller", "installPackages"); + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_STL(fullPackageElemCollection); + CAF_CM_VALIDATE_SMARTPTR(attachmentCollection); + CAF_CM_VALIDATE_STRING(outputDir); + + const std::map orderedFullPackageElemCollection = + orderFullPackageElems(fullPackageElemCollection); + + for (TConstMapIterator > fullPackageElemIter( + orderedFullPackageElemCollection); fullPackageElemIter; fullPackageElemIter++) { + const SmartPtrCFullPackageElemDoc fullPackageElem = *fullPackageElemIter; + + const SmartPtrCPackageDefnDoc installPackageDefn = + fullPackageElem->getInstallPackage(); + + SmartPtrCInstallPackageSpecDoc installPackageSpec; + installPackageSpec.CreateInstance(); + installPackageSpec->initialize(fullPackageElem->getPackageNamespace(), + fullPackageElem->getPackageName(), fullPackageElem->getPackageVersion(), + installPackageDefn->getStartupAttachmentName(), + installPackageDefn->getPackageAttachmentName(), + installPackageDefn->getSupportingAttachmentNameCollection(), attachmentCollection, + installPackageDefn->getArguments()); + + const SmartPtrCPackageDefnDoc uninstallPackageDefn = + fullPackageElem->getUninstallPackage(); + + SmartPtrCInstallPackageSpecDoc uninstallPackageSpec; + uninstallPackageSpec.CreateInstance(); + uninstallPackageSpec->initialize(fullPackageElem->getPackageNamespace(), + fullPackageElem->getPackageName(), fullPackageElem->getPackageVersion(), + uninstallPackageDefn->getStartupAttachmentName(), + uninstallPackageDefn->getPackageAttachmentName(), + uninstallPackageDefn->getSupportingAttachmentNameCollection(), + attachmentCollection, uninstallPackageDefn->getArguments()); + + installPackage(installPackageSpec, uninstallPackageSpec, outputDir); + } + } + CAF_CM_EXIT; +} + +void CPackageInstaller::uninstallPackages( + const std::deque& minPackageElemCollection, + const std::deque& installProviderSpecCollection, + const std::string& outputDir) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPackageInstaller", "uninstallPackages"); + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_STL(minPackageElemCollection); + // installProviderSpecCollection is optional + CAF_CM_VALIDATE_STRING(outputDir); + + const std::map + orderedProviderPackageElemCollection = orderMinPackageElems( + minPackageElemCollection); + + for (TConstMapIterator > + minPackageElemIter(orderedProviderPackageElemCollection); minPackageElemIter; minPackageElemIter++) { + const SmartPtrCMinPackageElemDoc minPackageElem = *minPackageElemIter; + + const std::string installPackageDir = CPathBuilder::calcInstallPackageDir( + minPackageElem->getPackageNamespace(), minPackageElem->getPackageName(), + minPackageElem->getPackageVersion()); + + const std::string installPackageSpecPath = FileSystemUtils::buildPath( + installPackageDir, _sInstallPackageSpecFilename); + + const SmartPtrCInstallPackageSpecDoc installPackageSpec = + XmlRoots::parseInstallPackageSpecFromFile(installPackageSpecPath); + + const uint32 packageRefCnt = countPackageReferences(installPackageSpec, + installProviderSpecCollection); + if (packageRefCnt == 1) { + try { + CPackageInstaller::executePackage(installPackageSpec, "-uninstall", outputDir); + } catch (ProcessFailedException* ex) { + CAF_CM_LOG_DEBUG_VA1("Removing package directory - %s", installPackageDir.c_str()); + FileSystemUtils::recursiveRemoveDirectory(installPackageDir); + ex->throwSelf(); + } + + CAF_CM_LOG_DEBUG_VA1("Removing package directory - %s", installPackageDir.c_str()); + FileSystemUtils::recursiveRemoveDirectory(installPackageDir); + } else { + CAF_CM_LOG_WARN_VA4("Package referenced from more than one provider... not uninstalling - %s::%s::%s = %d", + minPackageElem->getPackageNamespace().c_str(), minPackageElem->getPackageName().c_str(), + minPackageElem->getPackageVersion().c_str(), packageRefCnt); + } + } + } + CAF_CM_EXIT; +} + +void CPackageInstaller::installPackage( + const SmartPtrCInstallPackageSpecDoc& installPackageSpec, + const SmartPtrCInstallPackageSpecDoc& uninstallPackageSpec, + const std::string& outputDir) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPackageInstaller", "installPackage"); + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_SMARTPTR(installPackageSpec); + CAF_CM_VALIDATE_SMARTPTR(uninstallPackageSpec); + CAF_CM_VALIDATE_STRING(outputDir); + + const SmartPtrCInstallPackageMatch installPackageMatch = matchInstallPackageSpec( + installPackageSpec); + + switch (installPackageMatch->_matchStatus) { + case CInstallUtils::MATCH_NOTEQUAL: { + const SmartPtrCInstallPackageSpecDoc resolvedInstallPackageSpec = + resolveAndCopyAttachments(uninstallPackageSpec); + executePackage(installPackageSpec, "-install", outputDir); + saveInstallPackageSpec(resolvedInstallPackageSpec); + } + break; + case CInstallUtils::MATCH_VERSION_EQUAL: { + logWarn("Package already installed", installPackageSpec, + installPackageMatch->_matchedInstallPackageSpec); + } + break; + case CInstallUtils::MATCH_VERSION_LESS: { + logWarn("More recent package already installed", installPackageSpec, + installPackageMatch->_matchedInstallPackageSpec); + } + break; + case CInstallUtils::MATCH_VERSION_GREATER: { + logWarn("Upgrading installed version", installPackageSpec, + installPackageMatch->_matchedInstallPackageSpec); + + try { + executePackage(installPackageMatch->_matchedInstallPackageSpec, + "-upgrade_uninstall", outputDir); + } catch (ProcessFailedException* ex) { + cleanupPackage(installPackageMatch); + ex->throwSelf(); + } + + cleanupPackage(installPackageMatch); + + const SmartPtrCInstallPackageSpecDoc resolvedInstallPackageSpec = + resolveAndCopyAttachments(uninstallPackageSpec); + executePackage(installPackageSpec, "-upgrade_install", outputDir); + saveInstallPackageSpec(resolvedInstallPackageSpec); + } + break; + } + } + CAF_CM_EXIT; +} + +void CPackageInstaller::executePackage( + const SmartPtrCInstallPackageSpecDoc& installPackageSpec, + const std::string& startupArgument, + const std::string& outputDir) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPackageInstaller", "executePackage"); + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_SMARTPTR(installPackageSpec); + CAF_CM_VALIDATE_STRING(outputDir); + + const SmartPtrCAttachmentCollectionDoc attachmentCollection = + installPackageSpec->getAttachmentCollection(); + + const SmartPtrCAttachmentDoc startupAttachment = AttachmentUtils::findRequiredAttachment( + installPackageSpec->getStartupAttachmentName(), attachmentCollection); + const SmartPtrCAttachmentDoc packageAttachment = AttachmentUtils::findRequiredAttachment( + installPackageSpec->getPackageAttachmentName(), attachmentCollection); + + const SmartPtrCAttachmentNameCollectionDoc attachmentNameCollection = + installPackageSpec->getSupportingAttachmentNameCollection(); + const SmartPtrCAttachmentCollectionDoc supportingAttachmentCollection = + resolveAttachments(attachmentNameCollection, attachmentCollection); + + const std::string packageDir = CPathBuilder::calcDir( + installPackageSpec->getPackageNamespace(), installPackageSpec->getPackageName(), + installPackageSpec->getPackageVersion(), outputDir); + + const std::string packageArguments = installPackageSpec->getArguments(); + + if (!FileSystemUtils::doesDirectoryExist(packageDir)) { + FileSystemUtils::createDirectory(packageDir); + } + + CPackageExecutor::executePackage(startupAttachment, startupArgument, + packageAttachment, packageArguments, supportingAttachmentCollection, packageDir); + } + CAF_CM_EXIT; +} + +SmartPtrCInstallPackageSpecDoc CPackageInstaller::resolveAndCopyAttachments( + const SmartPtrCInstallPackageSpecDoc& installPackageSpec) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPackageInstaller", "resolveAndCopyAttachments"); + + SmartPtrCInstallPackageSpecDoc installPackageSpecRc; + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_SMARTPTR(installPackageSpec); + + const std::string installPackageDir = CPathBuilder::calcInstallPackageDir( + installPackageSpec->getPackageNamespace(), installPackageSpec->getPackageName(), + installPackageSpec->getPackageVersion()); + + const SmartPtrCAttachmentCollectionDoc attachmentCollection = + installPackageSpec->getAttachmentCollection(); + + const SmartPtrCAttachmentNameCollectionDoc attachmentNameCollection = + installPackageSpec->getSupportingAttachmentNameCollection(); + + const SmartPtrCAttachmentCollectionDoc resolvedAttachmentCollection = resolveAttachments( + attachmentNameCollection, attachmentCollection); + + const SmartPtrCAttachmentDoc startupAttachment = AttachmentUtils::findRequiredAttachment( + installPackageSpec->getStartupAttachmentName(), attachmentCollection); + const SmartPtrCAttachmentDoc packageAttachment = AttachmentUtils::findRequiredAttachment( + installPackageSpec->getPackageAttachmentName(), attachmentCollection); + + const SmartPtrCAttachmentCollectionDoc copiedAttachmentCollection = copyAttachments( + startupAttachment, packageAttachment, resolvedAttachmentCollection, installPackageDir); + + installPackageSpecRc.CreateInstance(); + installPackageSpecRc->initialize(installPackageSpec->getPackageNamespace(), + installPackageSpec->getPackageName(), installPackageSpec->getPackageVersion(), + installPackageSpec->getStartupAttachmentName(), + installPackageSpec->getPackageAttachmentName(), attachmentNameCollection, + copiedAttachmentCollection, installPackageSpec->getArguments()); + } + CAF_CM_EXIT; + + return installPackageSpecRc; +} + +void CPackageInstaller::saveInstallPackageSpec( + const SmartPtrCInstallPackageSpecDoc& installPackageSpec) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPackageInstaller", "saveInstallPackageSpec"); + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_SMARTPTR(installPackageSpec); + + const std::string installPackageDir = CPathBuilder::calcInstallPackageDir( + installPackageSpec->getPackageNamespace(), installPackageSpec->getPackageName(), + installPackageSpec->getPackageVersion()); + + const std::string installPackageSpecPath = FileSystemUtils::buildPath(installPackageDir, + _sInstallPackageSpecFilename); + + XmlRoots::saveInstallPackageSpecToFile(installPackageSpec, installPackageSpecPath); + } + CAF_CM_EXIT; +} + +std::map CPackageInstaller::orderFullPackageElems( + const std::deque& fullPackageElemCollection) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPackageInstaller", "orderFullPackageElems"); + + std::map orderedFullPackageElemCollection; + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_STL(fullPackageElemCollection); + + for (TConstIterator > fullPackageElemIter( + fullPackageElemCollection); fullPackageElemIter; fullPackageElemIter++) { + const SmartPtrCFullPackageElemDoc fullPackageElem = *fullPackageElemIter; + orderedFullPackageElemCollection.insert( + std::make_pair(fullPackageElem->getIndex(), fullPackageElem)); + } + } + CAF_CM_EXIT; + + return orderedFullPackageElemCollection; +} + +std::map CPackageInstaller::orderMinPackageElems( + const std::deque& minPackageElemCollection) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPackageInstaller", "orderProviderPackageElems"); + + std::map orderedMinPackageElemCollection; + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_STL(minPackageElemCollection); + + for (TConstIterator > minPackageElemIter( + minPackageElemCollection); minPackageElemIter; minPackageElemIter++) { + const SmartPtrCMinPackageElemDoc minPackageElem = *minPackageElemIter; + orderedMinPackageElemCollection.insert( + std::make_pair(minPackageElem->getIndex(), minPackageElem)); + } + } + CAF_CM_EXIT; + + return orderedMinPackageElemCollection; +} + +SmartPtrCAttachmentCollectionDoc CPackageInstaller::resolveAttachments( + const SmartPtrCAttachmentNameCollectionDoc& attachmentNameCollection, + const SmartPtrCAttachmentCollectionDoc& attachmentCollection) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPackageInstaller", "resolveAttachments"); + + SmartPtrCAttachmentCollectionDoc rc; + + CAF_CM_ENTER + { + // attachmentNameCollection is optional + CAF_CM_VALIDATE_SMARTPTR(attachmentCollection); + + if (!attachmentNameCollection.IsNull()) { + const std::deque attachmentNameCollectionInner = + attachmentNameCollection->getName(); + + std::deque attachmentCollectionInner; + for (TConstIterator > attachmentNameIter( + attachmentNameCollectionInner); attachmentNameIter; attachmentNameIter++) { + const std::string attachmentName = *attachmentNameIter; + + const SmartPtrCAttachmentDoc attachment = AttachmentUtils::findRequiredAttachment( + attachmentName, attachmentCollection); + attachmentCollectionInner.push_back(attachment); + } + + if (!attachmentCollectionInner.empty()) { + rc.CreateInstance(); + rc->initialize(attachmentCollectionInner, + std::deque()); + } + } + } + CAF_CM_EXIT; + + return rc; +} + +SmartPtrCAttachmentCollectionDoc CPackageInstaller::copyAttachments( + const SmartPtrCAttachmentDoc& startupAttachment, + const SmartPtrCAttachmentDoc& packageAttachment, + const SmartPtrCAttachmentCollectionDoc& supportingAttachmentCollection, + const std::string& outputDir) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPackageInstaller", "copyAttachments"); + + SmartPtrCAttachmentCollectionDoc attachmentCollectionRc; + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_SMARTPTR(startupAttachment); + CAF_CM_VALIDATE_SMARTPTR(packageAttachment); + // supportingAttachmentCollection is optional + CAF_CM_VALIDATE_STRING(outputDir); + + std::deque attachmentCollectionInner; + + attachmentCollectionInner.push_back(startupAttachment); + attachmentCollectionInner.push_back(packageAttachment); + + if (!supportingAttachmentCollection.IsNull()) { + for (TConstIterator > supportingAttachmentIter( + supportingAttachmentCollection->getAttachment()); supportingAttachmentIter; supportingAttachmentIter++) { + attachmentCollectionInner.push_back(*supportingAttachmentIter); + } + } + + std::deque attachmentCollectionInnerRc; + for (TConstIterator > attachmentIter( + attachmentCollectionInner); attachmentIter; attachmentIter++) { + const SmartPtrCAttachmentDoc attachment = *attachmentIter; + + const std::string attachmentUri = attachment->getUri(); + const std::string attachmentFilePath = UriUtils::parseRequiredFilePath(attachmentUri); + + UriUtils::SUriRecord uriRecord; + UriUtils::parseUriString(attachmentUri, uriRecord); + + std::string dstAttachmentDir = outputDir; + std::string relPath = FileSystemUtils::getBasename(attachmentFilePath); + const std::map::const_iterator iterParam = + uriRecord.parameters.find("relPath"); + if (iterParam != uriRecord.parameters.end()) { + relPath = iterParam->second; + const std::string tmpPath = FileSystemUtils::buildPath(outputDir, relPath); + dstAttachmentDir = FileSystemUtils::getDirname(tmpPath); + } else { + CAF_CM_LOG_DEBUG_VA1("Attachment URI does not contain relPath - %s", attachmentUri.c_str()); + } + + if (!FileSystemUtils::doesDirectoryExist(dstAttachmentDir)) { + FileSystemUtils::createDirectory(dstAttachmentDir); + } + + const std::string dstAttachmentFilePath = FileSystemUtils::buildPath(outputDir, + relPath); + + if (FileSystemUtils::doesFileExist(dstAttachmentFilePath)) { + CAF_CM_LOG_WARN_VA2("Destination file already exists... not copying \"%s\" to \"%s\"", + attachmentFilePath.c_str(), dstAttachmentFilePath.c_str()); + } else { + CAF_CM_LOG_DEBUG_VA2("Copying attachment from \"%s\" to \"%s\"", + attachmentFilePath.c_str(), dstAttachmentFilePath.c_str()); + FileSystemUtils::copyFile(attachmentFilePath, dstAttachmentFilePath); + } + + std::string dstAttachmentUri = "file:///" + dstAttachmentFilePath; + if (!relPath.empty()) { + dstAttachmentUri += "?relPath=" + relPath; + } + + SmartPtrCAttachmentDoc dstAttachment; + dstAttachment.CreateInstance(); + dstAttachment->initialize(attachment->getName(), attachment->getType(), + dstAttachmentUri, false, attachment->getCmsPolicy()); + + attachmentCollectionInnerRc.push_back(dstAttachment); + } + + attachmentCollectionRc.CreateInstance(); + attachmentCollectionRc->initialize(attachmentCollectionInnerRc, + std::deque()); + } + CAF_CM_EXIT; + + return attachmentCollectionRc; +} + +CPackageInstaller::SmartPtrCInstallPackageMatch CPackageInstaller::matchInstallPackageSpec( + const SmartPtrCInstallPackageSpecDoc& installPackageSpec) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPackageInstaller", "matchInstallPackageSpec"); + + SmartPtrCInstallPackageMatch installPackageMatch; + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_SMARTPTR(installPackageSpec); + + installPackageMatch.CreateInstance(); + installPackageMatch->_matchStatus = CInstallUtils::MATCH_NOTEQUAL; + + const SmartPtrCInstallPackageSpecCollection installPackageSpecCollection = + readInstallPackageSpecs(); + + if (!installPackageSpecCollection.IsNull()) { + const std::string packageNamespace = installPackageSpec->getPackageNamespace(); + const std::string packageName = installPackageSpec->getPackageName(); + const std::string packageVersion = installPackageSpec->getPackageVersion(); + + for (TConstIterator > + installPackageSpecIter(*installPackageSpecCollection); installPackageSpecIter; installPackageSpecIter++) { + const SmartPtrCInstallPackageSpecDoc installPackageSpecCur = + *installPackageSpecIter; + + const std::string packageNamespaceCur = + installPackageSpecCur->getPackageNamespace(); + const std::string packageNameCur = installPackageSpecCur->getPackageName(); + + if ((packageNamespace.compare(packageNamespaceCur) == 0) && (packageName.compare( + packageNameCur) == 0)) { + const std::string packageVersionCur = + installPackageSpecCur->getPackageVersion(); + installPackageMatch->_matchStatus = CInstallUtils::compareVersions( + packageVersion, packageVersionCur); + if (installPackageMatch->_matchStatus != CInstallUtils::MATCH_NOTEQUAL) { + installPackageMatch->_matchedInstallPackageSpec = installPackageSpecCur; + break; + } + } else { + logDebug("Package did not match", installPackageSpec, installPackageSpecCur); + } + } + } + } + CAF_CM_EXIT; + + return installPackageMatch; +} + +CPackageInstaller::SmartPtrCInstallPackageSpecCollection CPackageInstaller::readInstallPackageSpecs() { + CAF_CM_STATIC_FUNC_LOG_ONLY("CPackageInstaller", "readInstallPackageSpecs"); + + SmartPtrCInstallPackageSpecCollection installPackageSpecCollection; + + CAF_CM_ENTER + { + const std::string installPackageDir = CPathBuilder::calcInstallPackageDir(); + + const std::deque installPackageSpecFiles = + FileSystemUtils::findOptionalFiles(installPackageDir, _sInstallPackageSpecFilename); + + if (installPackageSpecFiles.empty()) { + CAF_CM_LOG_WARN_VA2("No package install specs found - dir: %s, filename: %s", + installPackageDir.c_str(), _sInstallPackageSpecFilename); + } else { + installPackageSpecCollection.CreateInstance(); + + for (TConstIterator > installPackageSpecFileIter( + installPackageSpecFiles); installPackageSpecFileIter; installPackageSpecFileIter++) { + const std::string installPackageSpecFilePath = *installPackageSpecFileIter; + + CAF_CM_LOG_DEBUG_VA1("Found package install spec - %s", + installPackageSpecFilePath.c_str()); + + const SmartPtrCInstallPackageSpecDoc installPackageSpec = + XmlRoots::parseInstallPackageSpecFromFile(installPackageSpecFilePath); + + installPackageSpecCollection->push_back(installPackageSpec); + } + } + } + CAF_CM_EXIT; + + return installPackageSpecCollection; +} + +uint32 CPackageInstaller::countPackageReferences( + const SmartPtrCInstallPackageSpecDoc& installPackageSpec, + const std::deque& installProviderSpecCollection) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPackageInstaller", "countPackageReferences"); + + uint32 refCnt = 0; + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_SMARTPTR(installPackageSpec); + // installProviderSpecCollection is optional + + const std::string packageNamespace = installPackageSpec->getPackageNamespace(); + const std::string packageName = installPackageSpec->getPackageName(); + const std::string packageVersion = installPackageSpec->getPackageVersion(); + + for (TConstIterator > installProviderSpecIter( + installProviderSpecCollection); installProviderSpecIter; installProviderSpecIter++) { + const SmartPtrCInstallProviderSpecDoc installProviderSpec = *installProviderSpecIter; + + const std::deque minPackageElemCollection = + installProviderSpec->getPackageCollection(); + for (TConstIterator > + minPackageElemIter(minPackageElemCollection); minPackageElemIter; minPackageElemIter++) { + const SmartPtrCMinPackageElemDoc minPackageElem = + *minPackageElemIter; + + const std::string packageNamespaceCur = minPackageElem->getPackageNamespace(); + const std::string packageNameCur = minPackageElem->getPackageName(); + + if ((packageNamespace.compare(packageNamespaceCur) == 0) && (packageName.compare( + packageNameCur) == 0)) { + const std::string packageVersionCur = minPackageElem->getPackageVersion(); + const CInstallUtils::MATCH_STATUS matchStatus = + CInstallUtils::compareVersions(packageVersion, packageVersionCur); + if (matchStatus != CInstallUtils::MATCH_NOTEQUAL) { + refCnt++; + } + } + } + } + + CAF_CM_LOG_DEBUG_VA4("Package ref cnt - %s::%s::%s = %d", + packageNamespace.c_str(), packageName.c_str(), packageVersion.c_str(), refCnt); + } + CAF_CM_EXIT; + + return refCnt; +} + +void CPackageInstaller::logDebug( + const std::string& message, + const SmartPtrCInstallPackageSpecDoc& installPackageSpec1, + const SmartPtrCInstallPackageSpecDoc& installPackageSpec2) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPackageInstaller", "logDebug"); + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_STRING(message); + CAF_CM_VALIDATE_SMARTPTR(installPackageSpec1); + CAF_CM_VALIDATE_SMARTPTR(installPackageSpec2); + + const std::string fullMessage = message + " - %s::%s::%s, %s::%s::%s"; + CAF_CM_LOG_DEBUG_VA6(fullMessage.c_str(), + installPackageSpec1->getPackageNamespace().c_str(), + installPackageSpec1->getPackageName().c_str(), + installPackageSpec1->getPackageVersion().c_str(), + installPackageSpec2->getPackageNamespace().c_str(), + installPackageSpec2->getPackageName().c_str(), + installPackageSpec2->getPackageVersion().c_str()); + } + CAF_CM_EXIT; +} + +void CPackageInstaller::logWarn( + const std::string& message, + const SmartPtrCInstallPackageSpecDoc& installPackageSpec1, + const SmartPtrCInstallPackageSpecDoc& installPackageSpec2) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPackageInstaller", "logWarn"); + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_STRING(message); + CAF_CM_VALIDATE_SMARTPTR(installPackageSpec1); + CAF_CM_VALIDATE_SMARTPTR(installPackageSpec2); + + const std::string fullMessage = message + " - %s::%s::%s, %s::%s::%s"; + CAF_CM_LOG_DEBUG_VA6(fullMessage.c_str(), + installPackageSpec1->getPackageNamespace().c_str(), + installPackageSpec1->getPackageName().c_str(), + installPackageSpec1->getPackageVersion().c_str(), + installPackageSpec2->getPackageNamespace().c_str(), + installPackageSpec2->getPackageName().c_str(), + installPackageSpec2->getPackageVersion().c_str()); + } + CAF_CM_EXIT; +} + +void CPackageInstaller::cleanupPackage( + const SmartPtrCInstallPackageMatch& installPackageMatch) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPackageInstaller", "cleanupPackage"); + CAF_CM_VALIDATE_SMARTPTR(installPackageMatch); + + const std::string installPackageDir = CPathBuilder::calcInstallPackageDir( + installPackageMatch->_matchedInstallPackageSpec->getPackageNamespace(), + installPackageMatch->_matchedInstallPackageSpec->getPackageName(), + installPackageMatch->_matchedInstallPackageSpec->getPackageVersion()); + CAF_CM_LOG_DEBUG_VA1("Removing package directory - %s", installPackageDir.c_str()); + FileSystemUtils::recursiveRemoveDirectory(installPackageDir); +} diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CPackageInstaller.h b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CPackageInstaller.h new file mode 100644 index 000000000..5d07cbf66 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CPackageInstaller.h @@ -0,0 +1,98 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CPackageInstaller_h_ +#define CPackageInstaller_h_ + +namespace Caf { + +/// Sends responses/errors back to the client. +class CPackageInstaller { +public: + typedef std::deque CInstallPackageSpecCollection; + CAF_DECLARE_SMART_POINTER(CInstallPackageSpecCollection); + + struct CInstallPackageMatch { + CInstallUtils::MATCH_STATUS _matchStatus; + SmartPtrCInstallPackageSpecDoc _matchedInstallPackageSpec; + }; + CAF_DECLARE_SMART_POINTER(CInstallPackageMatch); + +public: + static void installPackages( + const std::deque& fullPackageElemCollection, + const SmartPtrCAttachmentCollectionDoc& attachmentCollection, + const std::string& outputDir); + + static void uninstallPackages( + const std::deque& minPackageElemCollection, + const std::deque& installProviderSpecCollection, + const std::string& outputDir); + +private: + static void installPackage( + const SmartPtrCInstallPackageSpecDoc& installPackageSpec, + const SmartPtrCInstallPackageSpecDoc& uninstallPackageSpec, + const std::string& outputDir); + + static void executePackage( + const SmartPtrCInstallPackageSpecDoc& installPackageSpec, + const std::string& startupArgument, + const std::string& outputDir); + + static SmartPtrCInstallPackageSpecDoc resolveAndCopyAttachments( + const SmartPtrCInstallPackageSpecDoc& installPackageSpec); + + static void saveInstallPackageSpec( + const SmartPtrCInstallPackageSpecDoc& installPackageSpec); + + static std::map orderFullPackageElems( + const std::deque& fullPackageElemCollection); + + static std::map orderMinPackageElems( + const std::deque& minPackageElemCollection); + + static SmartPtrCAttachmentCollectionDoc resolveAttachments( + const SmartPtrCAttachmentNameCollectionDoc& attachmentNameCollection, + const SmartPtrCAttachmentCollectionDoc& attachmentCollection); + + static SmartPtrCAttachmentCollectionDoc copyAttachments( + const SmartPtrCAttachmentDoc& startupAttachment, + const SmartPtrCAttachmentDoc& packageAttachment, + const SmartPtrCAttachmentCollectionDoc& supportingAttachmentCollection, + const std::string& outputDir); + + static SmartPtrCInstallPackageMatch matchInstallPackageSpec( + const SmartPtrCInstallPackageSpecDoc& installPackageSpec); + + static SmartPtrCInstallPackageSpecCollection readInstallPackageSpecs(); + + static uint32 countPackageReferences( + const SmartPtrCInstallPackageSpecDoc& installPackageSpec, + const std::deque& installProviderSpecCollection); + + static void logDebug( + const std::string& message, + const SmartPtrCInstallPackageSpecDoc& installPackageSpec1, + const SmartPtrCInstallPackageSpecDoc& installPackageSpec2); + + static void logWarn( + const std::string& message, + const SmartPtrCInstallPackageSpecDoc& installPackageSpec1, + const SmartPtrCInstallPackageSpecDoc& installPackageSpec2); + + static void cleanupPackage( + const SmartPtrCInstallPackageMatch& installPackageMatch); + +private: + CAF_CM_DECLARE_NOCREATE(CPackageInstaller); +}; + +} + +#endif // #ifndef CPackageInstaller_h_ diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CPathBuilder.cpp b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CPathBuilder.cpp new file mode 100644 index 000000000..94fc17a18 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CPathBuilder.cpp @@ -0,0 +1,204 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CPathBuilder.h" + +using namespace Caf; + +std::string CPathBuilder::calcInstallProviderDir() { + std::string installProviderDir; + + CAF_CM_ENTER + { + const std::string installDir = getProviderHostConfigDir( + _sConfigInstallDir); + installProviderDir = FileSystemUtils::buildPath(installDir, "providers"); + + if (!FileSystemUtils::doesDirectoryExist(installProviderDir)) { + FileSystemUtils::createDirectory(installProviderDir); + } + } + CAF_CM_EXIT; + + return installProviderDir; +} + +std::string CPathBuilder::calcInstallPackageDir() { + std::string installPackageDir; + + CAF_CM_ENTER + { + const std::string installDir = getProviderHostConfigDir( + _sConfigInstallDir); + installPackageDir = FileSystemUtils::buildPath(installDir, "packages"); + + if (!FileSystemUtils::doesDirectoryExist(installPackageDir)) { + FileSystemUtils::createDirectory(installPackageDir); + } + } + CAF_CM_EXIT; + + return installPackageDir; +} + +std::string CPathBuilder::calcInstallProviderDir( + const std::string& providerNamespace, + const std::string& providerName, + const std::string& providerVersion) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPathBuilder", "calcInstallProviderDir"); + + std::string installProviderDir; + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_STRING(providerNamespace); + CAF_CM_VALIDATE_STRING(providerName); + CAF_CM_VALIDATE_STRING(providerVersion); + + const std::string installDir = getProviderHostConfigDir( + _sConfigInstallDir); + const std::string providersDir = FileSystemUtils::buildPath(installDir, "providers"); + installProviderDir = calcDir(providerNamespace, providerName, providerVersion, + providersDir); + + if (!FileSystemUtils::doesDirectoryExist(installProviderDir)) { + FileSystemUtils::createDirectory(installProviderDir); + } + } + CAF_CM_EXIT; + + return installProviderDir; +} + +std::string CPathBuilder::calcInstallPackageDir( + const std::string& packageNamespace, + const std::string& packageName, + const std::string& packageVersion) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPathBuilder", "calcInstallPackageDir"); + + std::string installPackageDir; + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_STRING(packageNamespace); + CAF_CM_VALIDATE_STRING(packageName); + CAF_CM_VALIDATE_STRING(packageVersion); + + const std::string installDir = getProviderHostConfigDir( + _sConfigInstallDir); + const std::string packagesDir = FileSystemUtils::buildPath(installDir, "packages"); + installPackageDir = calcDir(packageNamespace, packageName, packageVersion, packagesDir); + + if (!FileSystemUtils::doesDirectoryExist(installPackageDir)) { + FileSystemUtils::createDirectory(installPackageDir); + } + } + CAF_CM_EXIT; + + return installPackageDir; +} + +std::string CPathBuilder::calcProviderSchemaCacheDir( + const std::string& providerNamespace, + const std::string& providerName, + const std::string& providerVersion) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPathBuilder", "calcProviderSchemaCacheDir"); + + std::string providerSchemaCacheDir; + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_STRING(providerNamespace); + CAF_CM_VALIDATE_STRING(providerName); + CAF_CM_VALIDATE_STRING(providerVersion); + + const std::string schemaCacheDir = getProviderHostConfigDir( + _sConfigSchemaCacheDir); + providerSchemaCacheDir = calcDir(providerNamespace, providerName, providerVersion, + schemaCacheDir); + } + CAF_CM_EXIT; + + return providerSchemaCacheDir; +} + +std::string CPathBuilder::calcDir( + const std::string& thisNamespace, + const std::string& thisName, + const std::string& thisVersion, + const std::string& outputDir) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPathBuilder", "calcDir"); + + std::string rc; + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_STRING(thisNamespace); + CAF_CM_VALIDATE_STRING(thisName); + CAF_CM_VALIDATE_STRING(thisVersion); + CAF_CM_VALIDATE_STRING(outputDir); + + const std::string dirName = thisNamespace + "_" + thisName + "_" + thisVersion; + rc = FileSystemUtils::buildPath(outputDir, dirName); + } + CAF_CM_EXIT; + + return rc; +} + +std::string CPathBuilder::getRootConfigDir(const std::string& configName) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPathBuilder", "getRootConfigDir"); + + std::string rc; + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_STRING(configName); + + const std::string configDir = AppConfigUtils::getRequiredString(configName); + const std::string configDirExp = CStringUtils::expandEnv(configDir); + if (!FileSystemUtils::doesDirectoryExist(configDirExp)) { + CAF_CM_LOG_DEBUG_VA2( + "AppConfig directory does not exist... Creating - name: %s, dir: %s", + configName.c_str(), configDirExp.c_str()); + FileSystemUtils::createDirectory(configDirExp); + } + + rc = FileSystemUtils::normalizePathForPlatform(configDirExp); + } + CAF_CM_EXIT; + + return rc; +} + +std::string CPathBuilder::getProviderHostConfigDir(const std::string& configName) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPathBuilder", "getProviderHostConfigDir"); + + std::string rc; + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_STRING(configName); + + const std::string configDir = AppConfigUtils::getRequiredString(_sProviderHostArea, + configName); + const std::string configDirExp = CStringUtils::expandEnv(configDir); + if (!FileSystemUtils::doesDirectoryExist(configDirExp)) { + CAF_CM_LOG_DEBUG_VA2( + "AppConfig directory does not exist... Creating - name: %s, dir: %s", + configName.c_str(), configDirExp.c_str()); + FileSystemUtils::createDirectory(configDirExp); + } + + rc = FileSystemUtils::normalizePathForPlatform(configDirExp); + } + CAF_CM_EXIT; + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CPathBuilder.h b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CPathBuilder.h new file mode 100644 index 000000000..ddebcaa64 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CPathBuilder.h @@ -0,0 +1,51 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CPathBuilder_h_ +#define CPathBuilder_h_ + +namespace Caf { + +class CPathBuilder { +public: + static std::string calcInstallPackageDir(); + + static std::string calcInstallProviderDir(); + + static std::string calcInstallProviderDir( + const std::string& providerNamespace, + const std::string& providerName, + const std::string& providerVersion); + + static std::string calcInstallPackageDir( + const std::string& packageNamespace, + const std::string& packageName, + const std::string& packageVersion); + + static std::string calcProviderSchemaCacheDir( + const std::string& providerNamespace, + const std::string& providerName, + const std::string& providerVersion); + + static std::string calcDir( + const std::string& thisNamespace, + const std::string& thisName, + const std::string& thisVersion, + const std::string& outputDir); + + static std::string getRootConfigDir(const std::string& configName); + + static std::string getProviderHostConfigDir(const std::string& configName); + +private: + CAF_CM_DECLARE_NOCREATE( CPathBuilder); +}; + +} + +#endif // #ifndef CPathBuilder_h_ diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CProviderInstaller.cpp b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CProviderInstaller.cpp new file mode 100644 index 000000000..0bb7c653d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CProviderInstaller.cpp @@ -0,0 +1,402 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CProviderInstaller.h" + +using namespace Caf; + +void CProviderInstaller::installProvider( + const SmartPtrCInstallProviderJobDoc& installProviderJob, + const SmartPtrCAttachmentCollectionDoc& attachmentCollection, + const std::string& outputDir) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CProviderInstaller", "installProvider"); + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_SMARTPTR(installProviderJob); + CAF_CM_VALIDATE_SMARTPTR(attachmentCollection); + CAF_CM_VALIDATE_STRING(outputDir); + + const SmartPtrCInstallProviderSpecDoc installProviderSpec = createInstallProviderSpec( + installProviderJob); + + const SmartPtrCInstallProviderMatch installProviderMatch = matchInstallProviderSpec( + installProviderSpec); + + switch (installProviderMatch->_matchStatus) { + case CInstallUtils::MATCH_NOTEQUAL: { + installProviderLow(installProviderJob, attachmentCollection, outputDir); + } + break; + case CInstallUtils::MATCH_VERSION_EQUAL: { + logWarn("Provider already installed", installProviderSpec, + installProviderMatch->_matchedInstallProviderSpec); + } + break; + case CInstallUtils::MATCH_VERSION_LESS: { + logWarn("More recent provider already installed", installProviderSpec, + installProviderMatch->_matchedInstallProviderSpec); + } + break; + case CInstallUtils::MATCH_VERSION_GREATER: { + logWarn("Upgrading provider", installProviderSpec, + installProviderMatch->_matchedInstallProviderSpec); + + uninstallProviderLow(installProviderMatch->_matchedInstallProviderSpec, outputDir); + installProviderLow(installProviderJob, attachmentCollection, outputDir); + } + break; + } + } + CAF_CM_EXIT; +} + +void CProviderInstaller::uninstallProvider( + const SmartPtrCUninstallProviderJobDoc& uninstallProviderJob, + const std::string& outputDir) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CProviderInstaller", "uninstallProvider"); + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_SMARTPTR(uninstallProviderJob); + CAF_CM_VALIDATE_STRING(outputDir); + + const std::string installProviderDir = CPathBuilder::calcInstallProviderDir( + uninstallProviderJob->getProviderNamespace(), uninstallProviderJob->getProviderName(), + uninstallProviderJob->getProviderVersion()); + const std::string installProviderSpecPath = FileSystemUtils::buildPath(installProviderDir, + _sInstallProviderSpecFilename); + + if (FileSystemUtils::doesFileExist(installProviderSpecPath)) { + const SmartPtrCInstallProviderSpecDoc installProviderSpec = + XmlRoots::parseInstallProviderSpecFromFile(installProviderSpecPath); + + uninstallProviderLow(installProviderSpec, outputDir); + } else { + CAF_CM_LOG_INFO_VA1("Uninstall unnecessary... provider is not installed - %s", + calcProviderFqn(uninstallProviderJob).c_str()); + } + } + CAF_CM_EXIT; +} + +CProviderInstaller::SmartPtrCInstallProviderSpecCollection CProviderInstaller::readInstallProviderSpecs() { + CAF_CM_STATIC_FUNC_LOG_ONLY("CProviderInstaller", "readInstallProviderSpecs"); + + SmartPtrCInstallProviderSpecCollection installProviderSpecCollection; + + CAF_CM_ENTER + { + const std::string installProviderDir = CPathBuilder::calcInstallProviderDir(); + + const std::deque installProviderSpecFiles = + FileSystemUtils::findOptionalFiles(installProviderDir, _sInstallProviderSpecFilename); + + if (installProviderSpecFiles.empty()) { + CAF_CM_LOG_WARN_VA2("No provider install specs found - dir: %s, filename: %s", + installProviderDir.c_str(), _sInstallProviderSpecFilename); + } else { + installProviderSpecCollection.CreateInstance(); + + for (TConstIterator > installProviderSpecFileIter( + installProviderSpecFiles); installProviderSpecFileIter; installProviderSpecFileIter++) { + const std::string installProviderSpecFilePath = *installProviderSpecFileIter; + + CAF_CM_LOG_DEBUG_VA1("Found provider install spec - %s", + installProviderSpecFilePath.c_str()); + + const SmartPtrCInstallProviderSpecDoc installProviderSpec = + XmlRoots::parseInstallProviderSpecFromFile(installProviderSpecFilePath); + + installProviderSpecCollection->push_back(installProviderSpec); + } + } + } + CAF_CM_EXIT; + + return installProviderSpecCollection; +} + +void CProviderInstaller::installProviderLow( + const SmartPtrCInstallProviderJobDoc& installProviderJob, + const SmartPtrCAttachmentCollectionDoc& attachmentCollection, + const std::string& outputDir) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CProviderInstaller", "installProviderLow"); + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_SMARTPTR(installProviderJob); + CAF_CM_VALIDATE_SMARTPTR(attachmentCollection); + CAF_CM_VALIDATE_STRING(outputDir); + + const std::deque fullPackageElemCollection = + installProviderJob->getPackageCollection(); + + CPackageInstaller::installPackages(fullPackageElemCollection, attachmentCollection, + outputDir); + + const SmartPtrCInstallProviderSpecDoc uninstallProviderSpec = createInstallProviderSpec( + installProviderJob); + storeInstallProviderSpec(uninstallProviderSpec); + } + CAF_CM_EXIT; +} + +void CProviderInstaller::uninstallProviderLow( + const SmartPtrCInstallProviderSpecDoc& installProviderSpec, + const std::string& outputDir) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CProviderInstaller", "uninstallProviderLow"); + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_SMARTPTR(installProviderSpec); + CAF_CM_VALIDATE_STRING(outputDir); + + const std::deque minPackageElemCollection = + installProviderSpec->getPackageCollection(); + + const SmartPtrCInstallProviderSpecCollection installProviderSpecCollection = + readInstallProviderSpecs(); + + std::deque installProviderSpecCollectionInner; + if (!installProviderSpecCollection.IsNull()) { + installProviderSpecCollectionInner = *installProviderSpecCollection; + } + + try { + CPackageInstaller::uninstallPackages(minPackageElemCollection, + installProviderSpecCollectionInner, outputDir); + } catch (ProcessFailedException* ex) { + cleanupProvider(installProviderSpec); + ex->throwSelf(); + } + + cleanupProvider(installProviderSpec); + } + CAF_CM_EXIT; +} + +void CProviderInstaller::storeInstallProviderSpec( + const SmartPtrCInstallProviderSpecDoc& installProviderSpec) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CProviderInstaller", "storeInstallProviderSpec"); + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_SMARTPTR(installProviderSpec); + + const std::string installProviderDir = CPathBuilder::calcInstallProviderDir( + installProviderSpec->getProviderNamespace(), installProviderSpec->getProviderName(), + installProviderSpec->getProviderVersion()); + + const std::string installProviderSpecPath = FileSystemUtils::buildPath(installProviderDir, + _sInstallProviderSpecFilename); + + XmlRoots::saveInstallProviderSpecToFile(installProviderSpec, installProviderSpecPath); + } + CAF_CM_EXIT; +} + +CProviderInstaller::SmartPtrCInstallProviderMatch CProviderInstaller::matchInstallProviderSpec( + const SmartPtrCInstallProviderSpecDoc& installProviderSpec) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CProviderInstaller", "matchInstallProviderSpec"); + + SmartPtrCInstallProviderMatch installProviderMatch; + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_SMARTPTR(installProviderSpec); + + installProviderMatch.CreateInstance(); + installProviderMatch->_matchStatus = CInstallUtils::MATCH_NOTEQUAL; + + const SmartPtrCInstallProviderSpecCollection installProviderSpecCollection = + readInstallProviderSpecs(); + + if (!installProviderSpecCollection.IsNull()) { + const std::string providerNamespace = installProviderSpec->getProviderNamespace(); + const std::string providerName = installProviderSpec->getProviderName(); + const std::string providerVersion = installProviderSpec->getProviderVersion(); + + for (TConstIterator > + installProviderSpecIter(*installProviderSpecCollection); installProviderSpecIter; installProviderSpecIter++) { + const SmartPtrCInstallProviderSpecDoc installProviderSpecCur = + *installProviderSpecIter; + + const std::string providerNamespaceCur = + installProviderSpecCur->getProviderNamespace(); + const std::string providerNameCur = installProviderSpecCur->getProviderName(); + + if ((providerNamespace.compare(providerNamespaceCur) == 0) + && (providerName.compare(providerNameCur) == 0)) { + const std::string providerVersionCur = + installProviderSpecCur->getProviderVersion(); + installProviderMatch->_matchStatus = CInstallUtils::compareVersions( + providerVersion, providerVersionCur); + if (installProviderMatch->_matchStatus != CInstallUtils::MATCH_NOTEQUAL) { + installProviderMatch->_matchedInstallProviderSpec = installProviderSpecCur; + break; + } + } else { + logDebug("Provider did not match", installProviderSpec, installProviderSpecCur); + } + } + } + } + CAF_CM_EXIT; + + return installProviderMatch; +} + +SmartPtrCInstallProviderSpecDoc CProviderInstaller::createInstallProviderSpec( + const SmartPtrCInstallProviderJobDoc& installProviderJob) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CProviderInstaller", "createInstallProviderSpec"); + + SmartPtrCInstallProviderSpecDoc installProviderSpec; + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_SMARTPTR(installProviderJob); + + const std::deque fullPackageElemCollection = + installProviderJob->getPackageCollection(); + + std::deque minPackageElemCollection; + for (TConstIterator > fullPackageElemIter( + fullPackageElemCollection); fullPackageElemIter; fullPackageElemIter++) { + const SmartPtrCFullPackageElemDoc fullPackageElem = *fullPackageElemIter; + + SmartPtrCMinPackageElemDoc minPackageElem; + minPackageElem.CreateInstance(); + minPackageElem->initialize(fullPackageElem->getIndex(), + fullPackageElem->getPackageNamespace(), fullPackageElem->getPackageName(), + fullPackageElem->getPackageVersion()); + + minPackageElemCollection.push_back(minPackageElem); + } + + installProviderSpec.CreateInstance(); + installProviderSpec->initialize(installProviderJob->getClientId(), + installProviderJob->getProviderNamespace(), installProviderJob->getProviderName(), + installProviderJob->getProviderVersion(), minPackageElemCollection); + } + CAF_CM_EXIT; + + return installProviderSpec; +} + +void CProviderInstaller::logDebug( + const std::string& message, + const SmartPtrCInstallProviderSpecDoc& installProviderSpec1, + const SmartPtrCInstallProviderSpecDoc& installProviderSpec2) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CProviderInstaller", "logDebug"); + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_STRING(message); + CAF_CM_VALIDATE_SMARTPTR(installProviderSpec1); + CAF_CM_VALIDATE_SMARTPTR(installProviderSpec2); + + const std::string fullMessage = message + " - %s::%s::%s, %s::%s::%s"; + CAF_CM_LOG_DEBUG_VA6(fullMessage.c_str(), + installProviderSpec1->getProviderNamespace().c_str(), + installProviderSpec1->getProviderName().c_str(), + installProviderSpec1->getProviderVersion().c_str(), + installProviderSpec2->getProviderNamespace().c_str(), + installProviderSpec2->getProviderName().c_str(), + installProviderSpec2->getProviderVersion().c_str()); + } + CAF_CM_EXIT; +} + +void CProviderInstaller::logWarn( + const std::string& message, + const SmartPtrCInstallProviderSpecDoc& installProviderSpec1, + const SmartPtrCInstallProviderSpecDoc& installProviderSpec2) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CProviderInstaller", "logWarn"); + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_STRING(message); + CAF_CM_VALIDATE_SMARTPTR(installProviderSpec1); + CAF_CM_VALIDATE_SMARTPTR(installProviderSpec2); + + const std::string fullMessage = message + " - %s::%s::%s, %s::%s::%s"; + CAF_CM_LOG_DEBUG_VA6(fullMessage.c_str(), + installProviderSpec1->getProviderNamespace().c_str(), + installProviderSpec1->getProviderName().c_str(), + installProviderSpec1->getProviderVersion().c_str(), + installProviderSpec2->getProviderNamespace().c_str(), + installProviderSpec2->getProviderName().c_str(), + installProviderSpec2->getProviderVersion().c_str()); + } + CAF_CM_EXIT; +} + +void CProviderInstaller::cleanupProvider( + const SmartPtrCInstallProviderSpecDoc& installProviderSpec) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CProviderInstaller", "cleanupProvider"); + CAF_CM_VALIDATE_SMARTPTR(installProviderSpec); + + const std::string providerNamespace = installProviderSpec->getProviderNamespace(); + const std::string providerName = installProviderSpec->getProviderName(); + const std::string providerVersion = installProviderSpec->getProviderVersion(); + const std::string providerFqn = calcProviderFqn(installProviderSpec); + + const std::string installProviderDir = CPathBuilder::calcInstallProviderDir( + providerNamespace, providerName, providerVersion); + if (FileSystemUtils::doesDirectoryExist(installProviderDir)) { + FileSystemUtils::recursiveRemoveDirectory(installProviderDir); + } + + const std::string providerSchemaCacheDir = CPathBuilder::calcProviderSchemaCacheDir( + providerNamespace, providerName, providerVersion); + if (FileSystemUtils::doesDirectoryExist(providerSchemaCacheDir)) { + FileSystemUtils::recursiveRemoveDirectory(providerSchemaCacheDir); + } + + const std::string providerRegDir = AppConfigUtils::getRequiredString( + _sProviderHostArea, _sConfigProviderRegDir); + const std::string providerRegDirExp = CStringUtils::expandEnv(providerRegDir); + const std::string providerRegFilename = providerFqn + ".xml"; + const std::string providerRegPath = FileSystemUtils::buildPath(providerRegDirExp, + providerRegFilename); + if (FileSystemUtils::doesFileExist(providerRegPath)) { + FileSystemUtils::removeFile(providerRegPath); + } + + const std::string invokersDir = AppConfigUtils::getRequiredString( + _sProviderHostArea, _sConfigInvokersDir); + const std::string invokersDirExp = CStringUtils::expandEnv(invokersDir); + const std::string invokersFilename = providerFqn; + const std::string invokersPath = FileSystemUtils::buildPath(invokersDirExp, + invokersFilename); + if (FileSystemUtils::doesFileExist(invokersPath)) { + FileSystemUtils::removeFile(invokersPath); + } +} + +std::string CProviderInstaller::calcProviderFqn( + const SmartPtrCInstallProviderSpecDoc& installProviderSpec) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CProviderInstaller", "calcProviderFqn"); + CAF_CM_VALIDATE_SMARTPTR(installProviderSpec); + + return installProviderSpec->getProviderNamespace() + "_" + + installProviderSpec->getProviderName() + "_" + + installProviderSpec->getProviderVersion(); +} + +std::string CProviderInstaller::calcProviderFqn( + const SmartPtrCUninstallProviderJobDoc& uninstallProviderJob) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CProviderInstaller", "calcProviderFqn"); + CAF_CM_VALIDATE_SMARTPTR(uninstallProviderJob); + + return uninstallProviderJob->getProviderNamespace() + "_" + + uninstallProviderJob->getProviderName() + "_" + + uninstallProviderJob->getProviderVersion(); +} diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CProviderInstaller.h b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CProviderInstaller.h new file mode 100644 index 000000000..777d9a0ed --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CProviderInstaller.h @@ -0,0 +1,81 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CProviderInstaller_h_ +#define CProviderInstaller_h_ + +namespace Caf { + +class CProviderInstaller { +public: + typedef std::deque CInstallProviderSpecCollection; + CAF_DECLARE_SMART_POINTER(CInstallProviderSpecCollection); + + struct CInstallProviderMatch { + CInstallUtils::MATCH_STATUS _matchStatus; + SmartPtrCInstallProviderSpecDoc _matchedInstallProviderSpec; + }; + CAF_DECLARE_SMART_POINTER(CInstallProviderMatch); + +public: + static void installProvider( + const SmartPtrCInstallProviderJobDoc& installProviderJob, + const SmartPtrCAttachmentCollectionDoc& attachmentCollection, + const std::string& outputDir); + + static void uninstallProvider( + const SmartPtrCUninstallProviderJobDoc& uninstallProviderJob, + const std::string& outputDir); + + static SmartPtrCInstallProviderSpecCollection readInstallProviderSpecs(); + +private: + static void installProviderLow( + const SmartPtrCInstallProviderJobDoc& installProviderJob, + const SmartPtrCAttachmentCollectionDoc& attachmentCollection, + const std::string& outputDir); + + static void uninstallProviderLow( + const SmartPtrCInstallProviderSpecDoc& installProviderSpec, + const std::string& outputDir); + + static void storeInstallProviderSpec( + const SmartPtrCInstallProviderSpecDoc& installProviderSpec); + + static SmartPtrCInstallProviderMatch matchInstallProviderSpec( + const SmartPtrCInstallProviderSpecDoc& installProviderSpec); + + static SmartPtrCInstallProviderSpecDoc createInstallProviderSpec( + const SmartPtrCInstallProviderJobDoc& installProviderJob); + + static void logDebug( + const std::string& message, + const SmartPtrCInstallProviderSpecDoc& installProviderSpec1, + const SmartPtrCInstallProviderSpecDoc& installProviderSpec2); + + static void logWarn( + const std::string& message, + const SmartPtrCInstallProviderSpecDoc& installProviderSpec1, + const SmartPtrCInstallProviderSpecDoc& installProviderSpec2); + + static void cleanupProvider( + const SmartPtrCInstallProviderSpecDoc& installProviderSpec); + + static std::string calcProviderFqn( + const SmartPtrCInstallProviderSpecDoc& installProviderSpec); + + static std::string calcProviderFqn( + const SmartPtrCUninstallProviderJobDoc& uninstallProviderJob); + +private: + CAF_CM_DECLARE_NOCREATE(CProviderInstaller); +}; + +} + +#endif // #ifndef CProviderInstaller_h_ diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/IPackage.h b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/IPackage.h new file mode 100644 index 000000000..3da872de7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/IPackage.h @@ -0,0 +1,36 @@ +/* + * Author: bwilliams + * Created: July 25, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _InstallProvider_IPackage_h_ +#define _InstallProvider_IPackage_h_ + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) +IPackage : public ICafObject { + CAF_DECL_UUID("e372d4bc-2384-4fcc-8042-f916f2d11bd2") + + virtual void fullPackageElem( + const SmartPtrCAttachmentDoc packageAttachment, + const std::string arguments, + const SmartPtrCAttachmentCollectionDoc supportingAttachmentCollection, + const std::string outputDir) = 0; + + virtual void unfullPackageElem( + const SmartPtrCAttachmentDoc packageAttachment, + const std::string arguments, + const SmartPtrCAttachmentCollectionDoc supportingAttachmentCollection, + const std::string outputDir) = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IPackage); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/InstallProvider.cpp b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/InstallProvider.cpp new file mode 100644 index 000000000..370245487 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/InstallProvider.cpp @@ -0,0 +1,22 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" + +using namespace Caf; + +namespace Caf { + const char* _sInstallPackageSpecFilename = "installPackageSpec.xml"; + const char* _sInstallProviderSpecFilename = "installProviderSpec.xml"; +} + +int main(int csz, char* asz[]) +{ + CInstallProvider provider; + return CProviderDriver::processProviderCommandline(provider, csz, asz); +} diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/stdafx.h b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/stdafx.h new file mode 100644 index 000000000..43ee3c0d7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/stdafx.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef stdafx_h_ +#define stdafx_h_ + +//{{CAF_SUBSYSTEM}} + +#include +#include +#include +#include +#include +#include + +namespace Caf { + extern const char* _sInstallPackageSpecFilename; + extern const char* _sInstallProviderSpecFilename; +} + +#include "../../Install_Provider/src/IPackage.h" + +#include "../../Install_Provider/src/CInstallUtils.h" +#include "../../Install_Provider/src/CPathBuilder.h" + +#include "../../Install_Provider/src/CPackageExecutor.h" +#include "../../Install_Provider/src/CPackageInstaller.h" +#include "../../Install_Provider/src/CProviderInstaller.h" + +#include "../../Install_Provider/src/CInstallProvider.h" + +#endif // #ifndef stdafx_h_ diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/Makefile.am b/open-vm-tools/common-agent/Cpp/InternalProviders/Makefile.am new file mode 100644 index 000000000..a9f0804fb --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/Makefile.am @@ -0,0 +1,115 @@ +################################################################################ +### Copyright (C) 2015 VMware, Inc. All rights reserved. +### +### This program is free software; you can redistribute it and/or modify +### it under the terms of version 2 of the GNU General Public License as +### published by the Free Software Foundation. +### +### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +################################################################################ + +AUTOMAKE_OPTIONS = subdir-objects +cafbindir = @CAF_PME_BIN_DIR@ +cafbin_PROGRAMS = + +cafbin_PROGRAMS += ConfigProvider + +ConfigProvider_SOURCES= +ConfigProvider_SOURCES += Config_Provider/src/CConfigProvider.cpp +ConfigProvider_SOURCES += Config_Provider/src/CIniFileWithoutSection.cpp +ConfigProvider_SOURCES += Config_Provider/src/ConfigProvider.cpp + +ConfigProvider_CPPFLAGS = +ConfigProvider_CPPFLAGS += @GLIB2_CPPFLAGS@ +ConfigProvider_CPPFLAGS += @LOG4CPP_CPPFLAGS@ +ConfigProvider_CPPFLAGS += @SSL_CPPFLAGS@ +ConfigProvider_CPPFLAGS += @LIBRABBITMQ_CPPFLAGS@ + +ConfigProvider_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include +ConfigProvider_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include/Contracts +ConfigProvider_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/ProviderFx/ProviderFx/include +ConfigProvider_LDADD = +ConfigProvider_LDADD += @GLIB2_LIBS@ +ConfigProvider_LDADD += @LOG4CPP_LIBS@ +ConfigProvider_LDADD += -ldl +ConfigProvider_LDADD += ../Framework/libFramework.la +ConfigProvider_LDADD += ../ProviderFx/libProviderFx.la + +cafbin_PROGRAMS += InstallProvider + +InstallProvider_SOURCES= +InstallProvider_SOURCES += Install_Provider/src/CInstallProvider.cpp +InstallProvider_SOURCES += Install_Provider/src/CInstallUtils.cpp +InstallProvider_SOURCES += Install_Provider/src/CPackageExecutor.cpp +InstallProvider_SOURCES += Install_Provider/src/CPackageInstaller.cpp +InstallProvider_SOURCES += Install_Provider/src/CPathBuilder.cpp +InstallProvider_SOURCES += Install_Provider/src/CProviderInstaller.cpp +InstallProvider_SOURCES += Install_Provider/src/InstallProvider.cpp + +InstallProvider_CPPFLAGS = +InstallProvider_CPPFLAGS += @GLIB2_CPPFLAGS@ +InstallProvider_CPPFLAGS += @LOG4CPP_CPPFLAGS@ +InstallProvider_CPPFLAGS += @SSL_CPPFLAGS@ +InstallProvider_CPPFLAGS += @LIBRABBITMQ_CPPFLAGS@ + +InstallProvider_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include +InstallProvider_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include/Contracts +InstallProvider_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/ProviderFx/ProviderFx/include +InstallProvider_LDADD = +InstallProvider_LDADD += @GLIB2_LIBS@ +InstallProvider_LDADD += @LOG4CPP_LIBS@ +InstallProvider_LDADD += -ldl +InstallProvider_LDADD += ../Framework/libFramework.la +InstallProvider_LDADD += ../ProviderFx/libProviderFx.la + +cafbin_PROGRAMS += RemoteCommandProvider + +RemoteCommandProvider_SOURCES= +RemoteCommandProvider_SOURCES += RemoteCommand_Provider/src/CRemoteCommandProvider.cpp +RemoteCommandProvider_SOURCES += RemoteCommand_Provider/src/RemoteCommandProvider.cpp + +RemoteCommandProvider_CPPFLAGS = +RemoteCommandProvider_CPPFLAGS += @GLIB2_CPPFLAGS@ +RemoteCommandProvider_CPPFLAGS += @LOG4CPP_CPPFLAGS@ +RemoteCommandProvider_CPPFLAGS += @SSL_CPPFLAGS@ +RemoteCommandProvider_CPPFLAGS += @LIBRABBITMQ_CPPFLAGS@ + +RemoteCommandProvider_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include +RemoteCommandProvider_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include/Contracts +RemoteCommandProvider_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/ProviderFx/ProviderFx/include +RemoteCommandProvider_LDADD = +RemoteCommandProvider_LDADD += @GLIB2_LIBS@ +RemoteCommandProvider_LDADD += @LOG4CPP_LIBS@ +RemoteCommandProvider_LDADD += -ldl +RemoteCommandProvider_LDADD += ../Framework/libFramework.la +RemoteCommandProvider_LDADD += ../ProviderFx/libProviderFx.la + +cafbin_PROGRAMS += TestInfraProvider + +TestInfraProvider_SOURCES= +TestInfraProvider_SOURCES += TestInfra_Provider/src/CTestInfraProvider.cpp +TestInfraProvider_SOURCES += TestInfra_Provider/src/TestInfraProvider.cpp + +TestInfraProvider_CPPFLAGS = +TestInfraProvider_CPPFLAGS += @GLIB2_CPPFLAGS@ +TestInfraProvider_CPPFLAGS += @LOG4CPP_CPPFLAGS@ +TestInfraProvider_CPPFLAGS += @SSL_CPPFLAGS@ +TestInfraProvider_CPPFLAGS += @LIBRABBITMQ_CPPFLAGS@ + +TestInfraProvider_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include +TestInfraProvider_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include/Contracts +TestInfraProvider_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/ProviderFx/ProviderFx/include +TestInfraProvider_LDADD = +TestInfraProvider_LDADD += @GLIB2_LIBS@ +TestInfraProvider_LDADD += @LOG4CPP_LIBS@ +TestInfraProvider_LDADD += -ldl +TestInfraProvider_LDADD += ../Framework/libFramework.la +TestInfraProvider_LDADD += ../ProviderFx/libProviderFx.la + diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/RemoteCommand_Provider/src/CRemoteCommandProvider.cpp b/open-vm-tools/common-agent/Cpp/InternalProviders/RemoteCommand_Provider/src/CRemoteCommandProvider.cpp new file mode 100644 index 000000000..5c2a58b1e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/RemoteCommand_Provider/src/CRemoteCommandProvider.cpp @@ -0,0 +1,183 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CRemoteCommandProvider.h" + +using namespace Caf; + +CRemoteCommandProvider::CRemoteCommandProvider() : + CAF_CM_INIT_LOG("CRemoteCommandProvider") { +} + +CRemoteCommandProvider::~CRemoteCommandProvider() { +} + +const SmartPtrCSchemaDoc CRemoteCommandProvider::getSchema() const { + std::deque m1Params; + m1Params.push_back(CProviderDocHelper::createMethodParameter("scriptAttachmentName", PARAMETER_STRING, false)); + m1Params.push_back(CProviderDocHelper::createMethodParameter("scriptParameters", PARAMETER_STRING, false)); + m1Params.push_back(CProviderDocHelper::createMethodParameter("attachmentNames", PARAMETER_STRING, false)); + + std::deque m2Params; + m2Params.push_back(CProviderDocHelper::createMethodParameter("inlineScript", PARAMETER_STRING, false)); + m2Params.push_back(CProviderDocHelper::createMethodParameter("scriptParameters", PARAMETER_STRING, true, true)); + m2Params.push_back(CProviderDocHelper::createMethodParameter("attachmentNames", PARAMETER_STRING, true, true)); + + std::deque methods; + methods.push_back(CProviderDocHelper::createMethod("executeScript", m1Params)); + methods.push_back(CProviderDocHelper::createMethod("executeInlineScript", m2Params)); + + std::deque actionClasses; + actionClasses.push_back( + CProviderDocHelper::createActionClass( + "caf", + "RemoteCommandActions", + "1.0.0", + SmartPtrCCollectMethodDoc(), + methods)); + + return CProviderDocHelper::createSchema(std::deque(), actionClasses); +} + +void CRemoteCommandProvider::collect(const IProviderRequest& request, IProviderResponse& response) const { + CAF_CM_FUNCNAME("collect"); + + CAF_CM_EXCEPTIONEX_VA0(UnsupportedOperationException, E_NOTIMPL, + "Collect not implemented for Remote Commands") +} + +void CRemoteCommandProvider::invoke(const IProviderRequest& request, IProviderResponse& response) const { + CAF_CM_FUNCNAME("invoke"); + + SmartPtrCProviderInvokeOperationDoc doc = request.getInvokeOperations(); + CAF_CM_VALIDATE_SMARTPTR(doc); + + const SmartPtrCOperationDoc operation = doc->getOperation(); + const std::string operationName = operation->getName(); + + const SmartPtrCParameterCollectionDoc parameterCollection = + operation->getParameterCollection(); + + const std::string outputDir = doc->getOutputDir(); + const std::string scriptResultsDir = + FileSystemUtils::buildPath(outputDir, "scriptResults"); + if (! FileSystemUtils::doesDirectoryExist(scriptResultsDir)) { + FileSystemUtils::createDirectory(scriptResultsDir); + } + + const std::deque scriptParameters = + ParameterUtils::findOptionalParameterAsStringCollection("scriptParameters", + parameterCollection); + const std::deque attachmentNames = + ParameterUtils::findOptionalParameterAsStringCollection("attachmentNames", + parameterCollection); + + const std::string attachmentUris = createAttachmentUris( + attachmentNames, request.getAttachments()); + + std::string scriptPath; + if (operationName.compare("executeScript") == 0) { + const std::string scriptAttachmentName = + ParameterUtils::findRequiredParameterAsString("scriptAttachmentName", + parameterCollection); + + SmartPtrCAttachmentDoc scriptAttachment = AttachmentUtils::findRequiredAttachment( + scriptAttachmentName, request.getAttachments()); + CAF_CM_VALIDATE_BOOL(scriptAttachment->getIsReference() == FALSE); + const std::string attachmentUri = scriptAttachment->getUri(); + + UriUtils::SUriRecord uriRecord; + UriUtils::parseUriString(attachmentUri, uriRecord); + + CAF_CM_LOG_DEBUG_VA3("Parsed URI - Uri: %s, protocol: %s, address: %s", + attachmentUri.c_str(), uriRecord.protocol.c_str(), + uriRecord.address.c_str()); + + CAF_CM_VALIDATE_BOOL(uriRecord.protocol.compare("file") == 0); + UriUtils::SFileUriRecord scriptFileUriRecord; + UriUtils::parseFileAddress(uriRecord.address, scriptFileUriRecord); + scriptPath = scriptFileUriRecord.path; + } else if (operationName.compare("executeInlineScript") == 0) { + const std::string inlineScript = + ParameterUtils::findRequiredParameterAsString("inlineScript", + parameterCollection); + +#ifdef WIN32 + scriptPath = FileSystemUtils::buildPath(outputDir, "script.bat"); +#else + scriptPath = FileSystemUtils::buildPath(outputDir, "_script_"); +#endif + FileSystemUtils::saveTextFile(scriptPath, inlineScript); + } else { + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Invalid operation name (must be \'executeScript\' or \'executeInlineScript\') - %s", + operationName.c_str()) + } + + FileSystemUtils::chmod(scriptPath); + executeScript(scriptPath, scriptResultsDir, scriptParameters, attachmentUris); +} + +void CRemoteCommandProvider::executeScript( + const std::string& scriptPath, + const std::string& scriptResultsDir, + const std::deque& scriptParameters, + const std::string& attachmentUris) const { + CAF_CM_FUNCNAME_VALIDATE("executeScript"); + CAF_CM_VALIDATE_STRING(scriptPath); + CAF_CM_VALIDATE_STRING(scriptResultsDir); + // scriptParameters are optional + // attachmentUris are optional + + Cdeqstr argv; + argv.push_back(scriptPath); + argv.push_back("-o"); + argv.push_back(scriptResultsDir); + if (! attachmentUris.empty()) { + argv.push_back("-u"); + argv.push_back(attachmentUris); + } + if (! scriptParameters.empty()) { + for(TConstIterator scriptParameterIter(scriptParameters); + scriptParameterIter; scriptParameterIter++) { + argv.push_back(*scriptParameterIter); + } + } + + const std::string stdoutPath = FileSystemUtils::buildPath( + scriptResultsDir, _sStdoutFilename); + const std::string stderrPath = FileSystemUtils::buildPath( + scriptResultsDir, _sStderrFilename); + + ProcessUtils::runSyncToFiles(argv, stdoutPath, stderrPath); + +} + +std::string CRemoteCommandProvider::createAttachmentUris( + const std::deque& attachmentNames, + const SmartPtrCAttachmentCollectionDoc& attachmentCollection) const { + CAF_CM_FUNCNAME_VALIDATE("createAttachmentUris"); + + std::string rc; + if (! attachmentNames.empty()) { + CAF_CM_VALIDATE_SMARTPTR(attachmentCollection); + + rc += "\""; + for(TConstIterator attachmentNameIter(attachmentNames); + attachmentNameIter; attachmentNameIter++) { + const std::string attachmentName = *attachmentNameIter; + const SmartPtrCAttachmentDoc attachment = + AttachmentUtils::findRequiredAttachment( + attachmentName, attachmentCollection); + rc += attachment->getName() + "^" + attachment->getUri() + "|"; + } + rc += "\""; + } + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/RemoteCommand_Provider/src/CRemoteCommandProvider.h b/open-vm-tools/common-agent/Cpp/InternalProviders/RemoteCommand_Provider/src/CRemoteCommandProvider.h new file mode 100644 index 000000000..af926b409 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/RemoteCommand_Provider/src/CRemoteCommandProvider.h @@ -0,0 +1,58 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CRemoteCommandProvider_h_ +#define CRemoteCommandProvider_h_ + +namespace Caf { + +/// Sends responses/errors back to the client. +class CRemoteCommandProvider : public IInvokedProvider { +public: + CRemoteCommandProvider(); + virtual ~CRemoteCommandProvider(); + +public: // IInvokedProvider + const std::string getProviderNamespace() const { + return "caf"; + } + + const std::string getProviderName() const { + return "RemoteCommandProvider"; + } + + const std::string getProviderVersion() const { + return "1.0.0"; + } + + const SmartPtrCSchemaDoc getSchema() const; + + void collect(const IProviderRequest& request, IProviderResponse& response) const; + + void invoke(const IProviderRequest& request, IProviderResponse& response) const; + +private: + void executeScript( + const std::string& script, + const std::string& scriptResultsDir, + const std::deque& scriptParameters, + const std::string& attachmentUris) const; + + std::string createAttachmentUris( + const std::deque& attachmentNamesStr, + const SmartPtrCAttachmentCollectionDoc& attachmentCollection) const; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CRemoteCommandProvider); +}; + +} + +#endif // #ifndef CRemoteCommandProvider_h_ diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/RemoteCommand_Provider/src/RemoteCommandProvider.cpp b/open-vm-tools/common-agent/Cpp/InternalProviders/RemoteCommand_Provider/src/RemoteCommandProvider.cpp new file mode 100644 index 000000000..43076f2f7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/RemoteCommand_Provider/src/RemoteCommandProvider.cpp @@ -0,0 +1,17 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" + +using namespace Caf; + +int main(int csz, char* asz[]) +{ + CRemoteCommandProvider provider; + return CProviderDriver::processProviderCommandline(provider, csz, asz); +} diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/RemoteCommand_Provider/src/stdafx.h b/open-vm-tools/common-agent/Cpp/InternalProviders/RemoteCommand_Provider/src/stdafx.h new file mode 100644 index 000000000..2c4dd9bb3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/RemoteCommand_Provider/src/stdafx.h @@ -0,0 +1,22 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef stdafx_h_ +#define stdafx_h_ + +//{{CAF_SUBSYSTEM}} + +#include +#include +#include +#include +#include + +#include "../../RemoteCommand_Provider/src/CRemoteCommandProvider.h" + +#endif // #ifndef stdafx_h_ diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/TestInfra_Provider/src/CTestInfraProvider.cpp b/open-vm-tools/common-agent/Cpp/InternalProviders/TestInfra_Provider/src/CTestInfraProvider.cpp new file mode 100644 index 000000000..eafcd90a3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/TestInfra_Provider/src/CTestInfraProvider.cpp @@ -0,0 +1,134 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CTestInfraProvider.h" + +using namespace Caf; + +CTestInfraProvider::CTestInfraProvider() : + CAF_CM_INIT_LOG("CTestInfraProvider") { +} + +CTestInfraProvider::~CTestInfraProvider() { +} + +const SmartPtrCSchemaDoc CTestInfraProvider::getSchema() const { + std::deque dc1Props; + dc1Props.push_back(CProviderDocHelper::createClassProperty("name", PROPERTY_STRING, true)); + dc1Props.push_back(CProviderDocHelper::createClassProperty("value", PROPERTY_STRING, true)); + + std::deque dataClasses; + dataClasses.push_back(CProviderDocHelper::createDataClass("cafTestInfra", "TestDataClass", "1.0.0", dc1Props)); + + std::deque m1Params; + m1Params.push_back(CProviderDocHelper::createMethodParameter("requestAttachmentName", PARAMETER_STRING, false)); + + std::deque m2Params; + m2Params.push_back(CProviderDocHelper::createMethodParameter("param1", PARAMETER_STRING, false)); + m2Params.push_back(CProviderDocHelper::createMethodParameter("param2", PARAMETER_STRING, false)); + + std::deque methods; + methods.push_back(CProviderDocHelper::createMethod("echoRequest", m1Params)); + methods.push_back(CProviderDocHelper::createMethod("testMethod", m2Params)); + + std::deque actionClasses; + actionClasses.push_back( + CProviderDocHelper::createActionClass( + "cafTestInfra", + "TestActionClass", + "1.0.0", + CProviderDocHelper::createCollectMethod("collectInstances"), + methods)); + + return CProviderDocHelper::createSchema(dataClasses, actionClasses); +} + +void CTestInfraProvider::collect(const IProviderRequest& request, IProviderResponse& response) const { + CAF_CM_ENTER { + const SmartPtrCDataClassInstanceDoc dataClassInstance = + createDataClassInstance("testName", "testValue"); + response.addInstance(dataClassInstance); + } + CAF_CM_EXIT; +} + +void CTestInfraProvider::invoke(const IProviderRequest& request, IProviderResponse& response) const { + CAF_CM_FUNCNAME("invoke"); + + CAF_CM_ENTER { + SmartPtrCProviderInvokeOperationDoc doc = request.getInvokeOperations(); + CAF_CM_VALIDATE_SMARTPTR(doc); + + const SmartPtrCOperationDoc operation = doc->getOperation(); + const std::string operationName = operation->getName(); + const SmartPtrCParameterCollectionDoc parameterCollection = + operation->getParameterCollection(); + + if (operationName.compare("testMethod") == 0) { + const std::string param1 = ParameterUtils::findRequiredParameterAsString( + "param1", parameterCollection); + const std::string param2Str = ParameterUtils::findRequiredParameterAsString( + "param2", parameterCollection); + const int32 param2 = CStringConv::fromString(param2Str); + + CAF_CM_LOG_DEBUG_VA2("testMethod() called - param1: %s, param2: %d", + param1.c_str(), param2); + } else if (operationName.compare("echoRequest") == 0) { + const std::string requestAttachmentName = ParameterUtils::findRequiredParameterAsString( + "requestAttachmentName", parameterCollection); + + SmartPtrCAttachmentCollectionDoc attachmentCollection = request.getAttachments(); + if (attachmentCollection.IsNull()) { + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Attachment collection is empty - %s", requestAttachmentName.c_str()) + } + + SmartPtrCAttachmentDoc attachmentFnd; + const std::deque attachmentCollectionInner = + attachmentCollection->getAttachment(); + for (TConstIterator > attachmentIter(attachmentCollectionInner); + attachmentIter; attachmentIter++) { + const SmartPtrCAttachmentDoc attachment = *attachmentIter; + const std::string attachmentName = attachment->getName(); + if (attachmentName.compare(requestAttachmentName) == 0) { + attachmentFnd = attachment; + } + } + + if (attachmentFnd.IsNull()) { + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Request Attachment not found - %s", requestAttachmentName.c_str()) + } + + response.addAttachment(attachmentFnd); + } else { + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Invalid operation name (must be \'echoRequest\') - %s", operationName.c_str()) + } + } + CAF_CM_EXIT; +} + +SmartPtrCDataClassInstanceDoc CTestInfraProvider::createDataClassInstance( + const std::string& name, + const std::string& value) const { + CAF_CM_FUNCNAME_VALIDATE("createDataClassInstance"); + CAF_CM_VALIDATE_STRING(name); + CAF_CM_VALIDATE_STRING(value); + + std::deque dataClassProperties; + dataClassProperties.push_back(CProviderDocHelper::createDataClassProperty("name", name)); + dataClassProperties.push_back(CProviderDocHelper::createDataClassProperty("value", value)); + + return CProviderDocHelper::createDataClassInstance( + "cafTestInfra", + "TestDataClass", + "1.0.0", + dataClassProperties); +} diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/TestInfra_Provider/src/CTestInfraProvider.h b/open-vm-tools/common-agent/Cpp/InternalProviders/TestInfra_Provider/src/CTestInfraProvider.h new file mode 100644 index 000000000..2e348c0a6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/TestInfra_Provider/src/CTestInfraProvider.h @@ -0,0 +1,52 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CTestInfraProvider_h_ +#define CTestInfraProvider_h_ + +namespace Caf { + +/// Sends responses/errors back to the client. +class CTestInfraProvider : public IInvokedProvider { +public: + CTestInfraProvider(); + virtual ~CTestInfraProvider(); + +public: // IInvokedProvider + const std::string getProviderNamespace() const { + return "cafTestInfra"; + } + + const std::string getProviderName() const { + return "CafTestInfraProvider"; + } + + const std::string getProviderVersion() const { + return "1.0.0"; + } + + const SmartPtrCSchemaDoc getSchema() const; + + void collect(const IProviderRequest& request, IProviderResponse& response) const; + + void invoke(const IProviderRequest& request, IProviderResponse& response) const; + +private: + SmartPtrCDataClassInstanceDoc createDataClassInstance( + const std::string& name, + const std::string& value) const; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CTestInfraProvider); +}; + +} + +#endif // #ifndef CTestInfraProvider_h_ diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/TestInfra_Provider/src/TestInfraProvider.cpp b/open-vm-tools/common-agent/Cpp/InternalProviders/TestInfra_Provider/src/TestInfraProvider.cpp new file mode 100644 index 000000000..db3447415 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/TestInfra_Provider/src/TestInfraProvider.cpp @@ -0,0 +1,17 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" + +using namespace Caf; + +int main(int csz, char* asz[]) +{ + CTestInfraProvider provider; + return CProviderDriver::processProviderCommandline(provider, csz, asz); +} diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/TestInfra_Provider/src/stdafx.h b/open-vm-tools/common-agent/Cpp/InternalProviders/TestInfra_Provider/src/stdafx.h new file mode 100644 index 000000000..5a0cb1829 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/TestInfra_Provider/src/stdafx.h @@ -0,0 +1,20 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef stdafx_h_ +#define stdafx_h_ + +//{{CAF_SUBSYSTEM}} + +#include +#include +#include + +#include "../../TestInfra_Provider/src/CTestInfraProvider.h" + +#endif // #ifndef stdafx_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Makefile.am b/open-vm-tools/common-agent/Cpp/ManagementAgent/Makefile.am new file mode 100644 index 000000000..bc16dd203 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Makefile.am @@ -0,0 +1,119 @@ +################################################################################ +### Copyright (C) 2015 VMware, Inc. All rights reserved. +### +### This program is free software; you can redistribute it and/or modify +### it under the terms of version 2 of the GNU General Public License as +### published by the Free Software Foundation. +### +### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +################################################################################ + +AUTOMAKE_OPTIONS = subdir-objects +subsysdir = @CAF_SUBSYS_DIR@ +subsys_LTLIBRARIES = +cafbindir = @CAF_PME_BIN_DIR@ +cafbin_PROGRAMS = +subsys_LTLIBRARIES += libMaIntegrationSubsys.la +libMaIntegrationSubsys_la_LDFLAGS = @CAF_SUBSYS_LDFLAGS@ + +libMaIntegrationSubsys_la_SOURCES= +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CAttachmentRequestTransformer.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CAttachmentRequestTransformerInstance.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CCollectSchemaExecutor.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CConfigEnv.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CConfigEnvInboundChannelAdapterInstance.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CConfigEnvMessageHandler.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CConfigEnvOutboundChannelAdapterInstance.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CConfigEnvReadingMessageSource.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CDiagToMgmtRequestTransformer.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CDiagToMgmtRequestTransformerInstance.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CInstallToMgmtRequestTransformer.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CInstallToMgmtRequestTransformerInstance.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CPersistenceInboundChannelAdapterInstance.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CPersistenceMessageHandler.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CPersistenceNamespaceDb.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CPersistenceOutboundChannelAdapterInstance.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CPersistenceReadingMessageSource.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CProviderCollectSchemaExecutor.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CProviderExecutor.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CProviderExecutorRequest.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CProviderExecutorRequestHandler.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CResponseFactory.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CSchemaCacheManager.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CSinglePmeRequestSplitter.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CSinglePmeRequestSplitterInstance.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CVersionTransformer.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CVersionTransformerInstance.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/IntegrationObjects.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/MaIntegration.cpp + +libMaIntegrationSubsys_la_CPPFLAGS = +libMaIntegrationSubsys_la_CPPFLAGS += @GLIB2_CPPFLAGS@ +libMaIntegrationSubsys_la_CPPFLAGS += @LOG4CPP_CPPFLAGS@ + +libMaIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include +libMaIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include/Contracts +libMaIntegrationSubsys_la_LIBADD = +libMaIntegrationSubsys_la_LIBADD += @GLIB2_LIBS@ +libMaIntegrationSubsys_la_LIBADD += @LOG4CPP_LIBS@ +libMaIntegrationSubsys_la_LIBADD += -ldl +libMaIntegrationSubsys_la_LIBADD += ../Framework/libFramework.la + +libMaIntegrationSubsys_la_LDFLAGS += -shared + +cafbin_PROGRAMS += ManagementAgentHost + +ManagementAgentHost_SOURCES= +ManagementAgentHost_SOURCES += ManagementAgent/src/CManagementAgentHostWork.cpp +ManagementAgentHost_SOURCES += ManagementAgent/src/ManagementAgentHost.cpp +ManagementAgentHost_SOURCES += ManagementAgent/src/ManagementAgentHostMain.cpp + +ManagementAgentHost_CPPFLAGS = +ManagementAgentHost_CPPFLAGS += @GLIB2_CPPFLAGS@ +ManagementAgentHost_CPPFLAGS += @LOG4CPP_CPPFLAGS@ + +ManagementAgentHost_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include +ManagementAgentHost_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include/Contracts +ManagementAgentHost_LDADD = +ManagementAgentHost_LDADD += @GLIB2_LIBS@ +ManagementAgentHost_LDADD += @LOG4CPP_LIBS@ +ManagementAgentHost_LDADD += -ldl +ManagementAgentHost_LDADD += ../Framework/libFramework.la +ManagementAgentHost_LDADD += $(top_builddir)/vgauth/lib/libvgauth.la + +subsys_LTLIBRARIES += libVgAuthIntegrationSubsys.la +libVgAuthIntegrationSubsys_la_LDFLAGS = @CAF_SUBSYS_LDFLAGS@ + +libVgAuthIntegrationSubsys_la_SOURCES= +libVgAuthIntegrationSubsys_la_SOURCES += Subsystems/VgAuth/src/CGuestAuthenticator.cpp +libVgAuthIntegrationSubsys_la_SOURCES += Subsystems/VgAuth/src/CGuestAuthenticatorInstance.cpp +libVgAuthIntegrationSubsys_la_SOURCES += Subsystems/VgAuth/src/CVgAuthContext.cpp +libVgAuthIntegrationSubsys_la_SOURCES += Subsystems/VgAuth/src/CVgAuthError.cpp +libVgAuthIntegrationSubsys_la_SOURCES += Subsystems/VgAuth/src/CVgAuthImpersonation.cpp +libVgAuthIntegrationSubsys_la_SOURCES += Subsystems/VgAuth/src/CVgAuthInitializer.cpp +libVgAuthIntegrationSubsys_la_SOURCES += Subsystems/VgAuth/src/CVgAuthUserHandle.cpp +libVgAuthIntegrationSubsys_la_SOURCES += Subsystems/VgAuth/src/VgAuthIntegration.cpp + +libVgAuthIntegrationSubsys_la_CPPFLAGS = +libVgAuthIntegrationSubsys_la_CPPFLAGS += @GLIB2_CPPFLAGS@ +libVgAuthIntegrationSubsys_la_CPPFLAGS += @LOG4CPP_CPPFLAGS@ +libVgAuthIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/vgauth/public + +libVgAuthIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include +libVgAuthIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include/Contracts +libVgAuthIntegrationSubsys_la_LIBADD = +libVgAuthIntegrationSubsys_la_LIBADD += @GLIB2_LIBS@ +libVgAuthIntegrationSubsys_la_LIBADD += @LOG4CPP_LIBS@ +libVgAuthIntegrationSubsys_la_LIBADD += -ldl +libVgAuthIntegrationSubsys_la_LIBADD += ../Framework/libFramework.la +libVgAuthIntegrationSubsys_la_LIBADD += $(top_builddir)/vgauth/lib/libvgauth.la + +libVgAuthIntegrationSubsys_la_LDFLAGS += -shared + diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/ManagementAgent/src/CManagementAgentHostWork.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/ManagementAgent/src/CManagementAgentHostWork.cpp new file mode 100644 index 000000000..20670e2a6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/ManagementAgent/src/CManagementAgentHostWork.cpp @@ -0,0 +1,84 @@ +/* + * Author: bwilliams + * Created: June 29, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CManagementAgentHostWork.h" + +using namespace Caf; + +CManagementAgentHostWork::CManagementAgentHostWork() : + _isInitialized(false), + _isWorking(false), + CAF_CM_INIT_LOG("CManagementAgentHostWork") { +} + +CManagementAgentHostWork::~CManagementAgentHostWork() { +} + +void CManagementAgentHostWork::initialize() { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +void CManagementAgentHostWork::doWork() { + CAF_CM_FUNCNAME("doWork"); + + SmartPtrCIntegrationAppContext integrationAppContext; + + uint32 hostIntegrationTimeoutMs = 5000; + try { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _isWorking = true; + + CLoggingUtils::setStartupConfigFile( + AppConfigUtils::getRequiredString(_sAppConfigGlobalParamLogConfigFile)); + CLoggingUtils::setLogDir( + AppConfigUtils::getRequiredString(_sAppConfigGlobalParamLogDir)); + + const uint32 hostDelaySec = AppConfigUtils::getRequiredUint32( + _sManagementAgentArea, "host_delay_sec"); + hostIntegrationTimeoutMs = AppConfigUtils::getRequiredUint32( + _sManagementAgentArea, "host_integration_timeout_ms"); + + integrationAppContext.CreateInstance(); + integrationAppContext->initialize(hostIntegrationTimeoutMs); + + while (_isWorking) { + CThreadUtils::sleep(hostDelaySec * 1000); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + + try { + if (! integrationAppContext.IsNull()) { + integrationAppContext->terminate(hostIntegrationTimeoutMs); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_THROWEXCEPTION; +} + +void CManagementAgentHostWork::stopWork() { + CAF_CM_FUNCNAME_VALIDATE("stopWork"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + _isWorking = false; + } + CAF_CM_EXIT; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/ManagementAgent/src/CManagementAgentHostWork.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/ManagementAgent/src/CManagementAgentHostWork.h new file mode 100644 index 000000000..f5b7594c9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/ManagementAgent/src/CManagementAgentHostWork.h @@ -0,0 +1,43 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CManagementAgentHostWork_h_ +#define CManagementAgentHostWork_h_ + +namespace Caf { + +/// Sends responses/errors back to the client. +class CManagementAgentHostWork : + public IWork +{ +public: + CManagementAgentHostWork(); + virtual ~CManagementAgentHostWork(); + +public: + void initialize(); + +public: // IWork + void doWork(); + void stopWork(); + +private: + bool _isInitialized; + bool _isWorking; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CManagementAgentHostWork); +}; + +CAF_DECLARE_SMART_POINTER(CManagementAgentHostWork); + +} + +#endif // #ifndef CManagementAgentHostWork_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/ManagementAgent/src/CWinService.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/ManagementAgent/src/CWinService.cpp new file mode 100644 index 000000000..cd7750e8d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/ManagementAgent/src/CWinService.cpp @@ -0,0 +1,303 @@ +/* + * Author: bwilliams + * Created: June 25, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CWinService.h" +#include + +bool CWinService::s_isInitialized = false; +SmartPtrCWinServiceState CWinService::s_winServiceState; +SmartPtrCWinServiceInstance CWinService::s_winServiceInstance; + +//////////////////////////////////////////////////////////////////////// +// +// controlHandler() +// +// Handler for the break event when running in console mode +// +//////////////////////////////////////////////////////////////////////// +BOOL WINAPI controlHandler( + DWORD dwCtrlType) { + CAF_CM_STATIC_FUNC_LOG("CWinService", "controlHandler"); + + try { + switch(dwCtrlType) { + case CTRL_BREAK_EVENT: // use Ctrl+C or Ctrl+Break to simulate + case CTRL_C_EVENT: // SERVICE_CONTROL_STOP in debug mode + CAF_CM_LOG_DEBUG_VA0("Received Ctrl+C or Ctrl+Break... Stopping the service"); + CWinService::s_winServiceState->signalServiceStop(); + return TRUE; + break; + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + const BOOL rc = (CAF_CM_ISEXCEPTION) ? FALSE : TRUE; + CAF_CM_CLEAREXCEPTION; + + return rc; +} + +uint32 __stdcall Caf::serviceWorkerThreadFunc( + void* pThreadContext) { + CAF_CM_STATIC_FUNC_LOG("CWinService", "serviceWorkerThreadFunc"); + + try { + // Bring the thread into the correct scope + CWinService::s_winServiceInstance->runWorkerThread(); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + const uint32 rc = (CAF_CM_ISEXCEPTION) ? -1 : 0; + CAF_CM_CLEAREXCEPTION; + + return rc; +} + +void CWinService::initialize( + const SmartPtrIWork& work) { + CAF_CM_STATIC_FUNC_LOG("CWinService", "initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(s_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(work); + + s_winServiceState.CreateInstance(); + s_winServiceState->initialize( + "VMwareCAFManagementAgentHost", + "VMware CAF Management Agent Service", + "VMware Common Agent Management Agent Service", + work); + + s_winServiceInstance.CreateInstance(); + s_winServiceInstance->initialize(s_winServiceState); + s_isInitialized = true; + } + CAF_CM_EXIT; +} + +void CWinService::execute( + int32 argc, + char** argv) { + CAF_CM_STATIC_FUNC_LOG("CWinService", "execute"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(s_isInitialized); + + // Figure out what to do based on the optional command line argument + const CWinServiceInstance::SCommandLineParams commandLineParams = + s_winServiceInstance->processCommandLine(argc, argv); + switch (commandLineParams._eMode) { + case CWinServiceInstance::EModeRunAsService: + CAF_CM_LOG_DEBUG_VA0("Running the service"); + run(); + break; + + case CWinServiceInstance::EModeRunAsConsole: + CAF_CM_LOG_DEBUG_VA0("Running as console"); + runAsConsole(); + break; + + case CWinServiceInstance::EModeRegister: { + CAF_CM_LOG_DEBUG_VA0("Installing the service"); + const std::string currentFile = FileSystemUtils::getCurrentFile(); + s_winServiceInstance->install(currentFile); + } + break; + + case CWinServiceInstance::EModeUnregister: + CAF_CM_LOG_DEBUG_VA0("Uninstalling the service"); + s_winServiceInstance->uninstall(); + break; + + default: + std::string cmdLine; + for (int32 index = 0; index < argc; index++) { + cmdLine += argv[index]; + cmdLine += " "; + } + CAF_CM_EXCEPTIONEX_VA2( + InvalidHandleException, E_FAIL, + "Invalid mode returned from processCommandLine - Mode: %d, cmdLine: %s", + static_cast(commandLineParams._eMode), cmdLine.c_str()); + break; + } + } + CAF_CM_EXIT; +} + +void CWinService::run() { + CAF_CM_STATIC_FUNC_LOG("CWinService", "run"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(s_isInitialized); + + const std::string serviceName = s_winServiceState->getServiceName(); + + // build the table of Services in this exe, name and the address of the + // Service's main function terminated by NULL's + SERVICE_TABLE_ENTRYA stbl[] = + { + { + const_cast(serviceName.c_str()), + reinterpret_cast(CWinService::serviceMain) + }, + { + NULL, + NULL + } + }; + + // call the SCM. We have 30 seconds to execute this call. If it fails to + // execute within that time, the SCM will assume that something is wrong + // and terminate this process... + if (::StartServiceCtrlDispatcherA(stbl) == FALSE) { + const DWORD lastError = ::GetLastError(); + const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(lastError); + CAF_CM_EXCEPTION_VA2(lastError, + "::StartServiceCtrlDispatcher() Failed - serviceName: \"%s\", msg: \"%s\"", + serviceName.c_str(), errorMsg.c_str()); + } + } + CAF_CM_EXIT; +} + +void CWinService::runAsConsole() { + CAF_CM_STATIC_FUNC_LOG("CWinService", "runAsConsole"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(s_isInitialized); + + ::SetConsoleCtrlHandler(controlHandler, TRUE); + + CWinService::s_winServiceState->putIsService(false); + CWinService::serviceMain(0, NULL); + } + CAF_CM_EXIT; +} + +void CALLBACK CWinService::serviceMain( + const DWORD cdwArgc, + LPCWSTR* plpwszArgv) { + CAF_CM_STATIC_FUNC_LOG("CWinService", "serviceMain"); + + try { + // This is a new thread from the SCM + CafInitialize::init(); + + CAF_CM_PRECOND_ISINITIALIZED(s_isInitialized); + + const std::string serviceName = s_winServiceState->getServiceName(); + + // Register our handler routine with the SCM. + // The function that we are registering will be called when certain + // events occur like : starting, stopping, pausing this Service + if (s_winServiceState->getIsService()) { + const SERVICE_STATUS_HANDLE serviceHandle = ::RegisterServiceCtrlHandlerExA( + serviceName.c_str(), CWinService::scmHandlerEx, NULL); + if (! serviceHandle) { + const DWORD lastError = ::GetLastError(); + const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(lastError); + CAF_CM_EXCEPTION_VA2(lastError, + "::RegisterServiceCtrlHandlerEx() Failed - serviceName: \"%s\", msg: \"%s\"", + serviceName.c_str(), errorMsg.c_str()); + } + + s_winServiceState->putServiceHandle(serviceHandle); + } + + // Let the SCM know that the service is starting. + s_winServiceState->putCurrentServiceState(SERVICE_START_PENDING); + if (s_winServiceState->getIsService()) { + s_winServiceState->setStatus(); + } + + // Creates the worker thread. + createWorkerThread(); + + // Runs the Service + s_winServiceInstance->runService(); + + // Let the SCM know that we've stopped. + s_winServiceState->putCurrentServiceState(SERVICE_STOPPED); + if (s_winServiceState->getIsService()) { + s_winServiceState->setStatus(); + } + + // Close all of the handles. + s_winServiceState->close(); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + + CafInitialize::term(); +} + +DWORD CWinService::scmHandlerEx( + DWORD dwCommand, + DWORD dwEventType, + LPVOID lpEventData, + LPVOID lpContext) { + CAF_CM_STATIC_FUNC_LOG("CWinService", "scmHandlerEx"); + + try { + CAF_CM_PRECOND_ISINITIALIZED(s_isInitialized); + + switch(dwCommand) { + case SERVICE_CONTROL_STOP: + case SERVICE_CONTROL_SHUTDOWN: + case SERVICE_CONTROL_POWEREVENT: { + CAF_CM_LOG_INFO_VA0("Caught stop, shutdown or power event"); + + // Let the SCM know that we're in the process of stopping. + s_winServiceState->putCurrentServiceState(SERVICE_STOP_PENDING); + s_winServiceState->setStatus(); + + // Signal the event that tells us to stop. + s_winServiceState->signalServiceStop(); + } + break; + + case SERVICE_CONTROL_INTERROGATE: { + CAF_CM_LOG_INFO_VA0("Caught interrogate event"); + + // Let the SCM know our current state. + s_winServiceState->setStatus(); + } + break; + default: + CAF_CM_LOG_WARN_VA1("Unhandled command - %d", dwCommand); + break; + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + + return NO_ERROR; +} + +void CWinService::createWorkerThread() { + CAF_CM_STATIC_FUNC_LOG("CWinService", "createWorkerThread"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(s_isInitialized); + + // Create the thread. + uint32 uiThreadAddress = 0; + UINT_PTR uipRc = ::_beginthreadex(NULL, 0, ::serviceWorkerThreadFunc, NULL, 0, &uiThreadAddress); + if (0 == uipRc) { + const DWORD lastError = ::GetLastError(); + const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(lastError); + CAF_CM_EXCEPTION_VA1(lastError, "::_beginthreadex() Failed - msg: \"%s\"", + errorMsg.c_str()); + } + } + CAF_CM_EXIT; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/ManagementAgent/src/CWinService.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/ManagementAgent/src/CWinService.h new file mode 100644 index 000000000..abfd6939b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/ManagementAgent/src/CWinService.h @@ -0,0 +1,68 @@ +/* + * Author: bwilliams + * Created: June 25, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CWinService_h_ +#define CWinService_h_ + +namespace Caf { + +class CWinService { +public: + /// Initializes the static service class. + static void initialize( + const SmartPtrIWork& work); + + /// Parses the command line and executes the server + static void execute(int32 argc, char** argv); + +private: + /// Spawns the worker thread to run the service + static void run(); + + /// Runs the service in console mode for debugging + static void runAsConsole(); + +private: + /// Each Service (there can be more than one) exposes its own main function + /// This function's pointer was passed into the SCM in the run method + /// For each of these main functions the SCM will create a thread. + static void CALLBACK serviceMain( + const DWORD cdwArgc, + LPCWSTR* plpwszArgv); + + /// Notification callback function for the SCM that's called when the state of + /// the Service must be changed. + static DWORD CALLBACK scmHandlerEx( + DWORD dwCommand, + DWORD dwEventType, + LPVOID lpEventData, + LPVOID lpContext ); + +private: + // Creates the service's main working thread which performs the work of this service. + static void createWorkerThread(); + +private: + /// When CWinService::createWorkerThread() creates the helper-thread, + /// it calls this global function. This function simply redirects the thread + /// back into the main class. + friend uint32 __stdcall serviceWorkerThreadFunc( + void* pThreadContext); + +public: + static bool s_isInitialized; + static SmartPtrCWinServiceState s_winServiceState; + static SmartPtrCWinServiceInstance s_winServiceInstance; + +private: + CAF_CM_DECLARE_NOCREATE(CWinService); +}; + +} + +#endif // #ifndef CWinService_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/ManagementAgent/src/ManagementAgentHost.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/ManagementAgent/src/ManagementAgentHost.cpp new file mode 100644 index 000000000..9bed87725 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/ManagementAgent/src/ManagementAgentHost.cpp @@ -0,0 +1,17 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" + +extern "C" { + +BOOL APIENTRY DllMain(HMODULE hModule, uint32 dwReason, LPVOID lpReserved) { + return TRUE; +} + +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/ManagementAgent/src/ManagementAgentHostMain.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/ManagementAgent/src/ManagementAgentHostMain.cpp new file mode 100644 index 000000000..5cda71877 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/ManagementAgent/src/ManagementAgentHostMain.cpp @@ -0,0 +1,180 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#ifndef WIN32 +#include +#endif + +bool _gDaemonized = true; +bool _gSysLogInfos = false; +SmartPtrCManagementAgentHostWork _gManagementAgentHostWork; + +using namespace Caf; + +#ifndef WIN32 +extern "C" void TermHandler(int32 signum); +#endif + +int32 main(int32 argc, char** argv) { + HRESULT hr = CafInitialize::init(); + + if (hr != S_OK) { +#ifndef WIN32 + ::syslog(LOG_ERR, "ManagementAgentHost: CafInitialize::init() failed 0x%08X.", hr); +#endif + ::fprintf(stderr, "ManagementAgentHost: CafInitialize::init() failed 0x%08X\n", hr); + return 1; + } + + CafInitialize::serviceConfig(); + + SmartPtrIAppConfig appConfig; + + try { + std::string appConfigEnv; + CEnvironmentUtils::readEnvironmentVar("CAF_APPCONFIG", appConfigEnv); + if (appConfigEnv.empty()) { + Cdeqstr deqstr; + deqstr.push_back("cafenv-appconfig"); + deqstr.push_back("persistence-appconfig"); + deqstr.push_back("ma-appconfig"); + deqstr.push_back("custom-appconfig"); + appConfig = getAppConfig(deqstr); + } else { + appConfig = getAppConfig(); + } + } catch(CCafException *ex) { +#ifndef WIN32 + ::syslog( + LOG_ERR, + "ManagementAgentHost: getAppConfig() failed . %s", + ex->getFullMsg().c_str()); +#endif + ::fprintf( + stderr, + "ManagementAgentHost: getAppConfig() failed . %s\n", + ex->getFullMsg().c_str()); + ex->Release(); + } catch (std::exception ex) { +#ifndef WIN32 + ::syslog( + LOG_ERR, + "ManagementAgentHost: getAppConfig() failed . %s", + ex.what()); +#endif + ::fprintf( + stderr, + "ManagementAgentHost: getAppConfig() failed . %s\n", + ex.what()); + } catch (...) { +#ifndef WIN32 + ::syslog( + LOG_ERR, + "ManagementAgentHost: getAppConfig() failed . unknown exception"); +#endif + ::fprintf( + stderr, + "ManagementAgentHost: getAppConfig() failed . unknown exception\n"); + } + + if (!appConfig) { + CafInitialize::term(); + return 1; + } + + const std::string cafBinDir = AppConfigUtils::getRequiredString("globals", "bin_dir"); + g_setenv("CAF_BIN_DIR", cafBinDir.c_str(), TRUE); + + const std::string cafLibDir = AppConfigUtils::getRequiredString("globals", "lib_dir"); + g_setenv("CAF_LIB_DIR", cafLibDir.c_str(), TRUE); + + CAF_CM_STATIC_FUNC_LOG("ManagementAgentHostMain", "main"); + int32 iRc = 0; + try { + _gManagementAgentHostWork.CreateInstance(); + _gManagementAgentHostWork->initialize(); + +#ifdef WIN32 + CWinService::initialize(_gManagementAgentHostWork); + CWinService::execute(argc, argv); +#else + if (S_OK != hr) { + ::syslog(LOG_ERR, "CafInitialize::init() failed (0x%08X.", hr); + return 1; + } + + CDaemonUtils::MakeDaemon( + argc, + argv, + "ManagementAgentHost", + TermHandler, + _gDaemonized, + _gSysLogInfos); + + CLoggingUtils::setStartupConfigFile( + AppConfigUtils::getRequiredString(_sAppConfigGlobalParamLogConfigFile)); + CLoggingUtils::setLogDir( + AppConfigUtils::getRequiredString(_sAppConfigGlobalParamLogDir)); + + _gManagementAgentHostWork->doWork(); +#endif + + } + CAF_CM_CATCH_CAF + CAF_CM_CATCH_DEFAULT + CAF_CM_LOG_CRIT_CAFEXCEPTION; + + if (CAF_CM_ISEXCEPTION) { + const std::string msg = CAF_CM_EXCEPTION_GET_FULLMSG; +#ifndef WIN32 + ::syslog( + LOG_ERR, + "ManagementAgentHost: %s", + msg.c_str()); +#endif + + ::fprintf( + stderr, + "ManagementAgentHost: %s\n", + msg.c_str()); + iRc = 1; + } + CAF_CM_CLEAREXCEPTION; + + CafInitialize::term(); + + return iRc; +} + +#ifndef WIN32 +extern "C" void TermHandler(int32 signum) { + CAF_CM_STATIC_FUNC_LOG_ONLY( "ManagementAgentHost", "TermHandler" ); + + CAF_CM_ENTER { + switch (signum) { + case SIGTERM: + CAF_CM_LOG_INFO_VA0( "Received SIGTERM" ); + if (! _gManagementAgentHostWork.IsNull()) { + _gManagementAgentHostWork->stopWork(); + } + break; + case SIGINT: + CAF_CM_LOG_INFO_VA0( "Received SIGINT" ); + if (! _gManagementAgentHostWork.IsNull()) { + _gManagementAgentHostWork->stopWork(); + } + break; + default: + CAF_CM_LOG_ERROR_VA1( "Ignoring Unexpected signal %d", signum); + break; + } + } + CAF_CM_EXIT; +} +#endif diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/ManagementAgent/src/stdafx.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/ManagementAgent/src/stdafx.h new file mode 100644 index 000000000..474f10e3a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/ManagementAgent/src/stdafx.h @@ -0,0 +1,23 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef stdafx_h_ +#define stdafx_h_ + +#include +#include +#include +#include + +#ifdef WIN32 +#include "CWinService.h" +#endif + +#include "CManagementAgentHostWork.h" + +#endif // #ifndef stdafx_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CAttachmentRequestTransformer.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CAttachmentRequestTransformer.cpp new file mode 100644 index 000000000..78cb81cd1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CAttachmentRequestTransformer.cpp @@ -0,0 +1,82 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CAttachmentRequestTransformer.h" + +using namespace Caf; + +CAttachmentRequestTransformer::CAttachmentRequestTransformer() : + _isInitialized(false), + CAF_CM_INIT_LOG("CAttachmentRequestTransformer") { +} + +CAttachmentRequestTransformer::~CAttachmentRequestTransformer() { +} + +void CAttachmentRequestTransformer::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + CAF_CM_VALIDATE_STL_EMPTY(properties); + _ctorArgs = ctorArgs; + _properties = properties; + initialize(); + } + CAF_CM_EXIT; +} + +void CAttachmentRequestTransformer::terminateBean() { +} + +void CAttachmentRequestTransformer::initialize() { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _isInitialized = true; + } + CAF_CM_EXIT; +} + +bool CAttachmentRequestTransformer::isResponsible( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("isResponsible"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + } + CAF_CM_EXIT; + + return false; +} + +SmartPtrIIntegrationObject CAttachmentRequestTransformer::createObject( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("createObject"); + + SmartPtrIIntegrationObject rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + rc.CreateInstance(_sObjIdAttachmentRequestTransformerInstance); + rc->initialize(_ctorArgs, _properties, configSection); + } + CAF_CM_EXIT; + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CAttachmentRequestTransformer.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CAttachmentRequestTransformer.h new file mode 100644 index 000000000..7e633cf82 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CAttachmentRequestTransformer.h @@ -0,0 +1,58 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CAttachmentRequestTransformer_h_ +#define CAttachmentRequestTransformer_h_ + +namespace Caf { + +/// Sends responses/errors back to the client. +class CAttachmentRequestTransformer : + public TCafSubSystemObjectRoot, + public IBean, + public IIntegrationComponent { +public: + CAttachmentRequestTransformer(); + virtual ~CAttachmentRequestTransformer(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdAttachmentRequestTransformer) + + CAF_BEGIN_INTERFACE_MAP(CAttachmentRequestTransformer) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IIntegrationComponent) + CAF_END_INTERFACE_MAP() + +public: + virtual void initialize(); + +public: // IBean + virtual void initializeBean(const IBean::Cargs& ctorArgs, const IBean::Cprops& properties); + + virtual void terminateBean(); + +public: // IIntegrationComponent + bool isResponsible( + const SmartPtrIDocument& configSection) const; + + SmartPtrIIntegrationObject createObject( + const SmartPtrIDocument& configSection) const; + +private: + bool _isInitialized; + IBean::Cargs _ctorArgs; + IBean::Cprops _properties; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CAttachmentRequestTransformer); +}; + +} + +#endif // #ifndef CAttachmentRequestTransformer_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CAttachmentRequestTransformerInstance.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CAttachmentRequestTransformerInstance.cpp new file mode 100644 index 000000000..8bb6176a8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CAttachmentRequestTransformerInstance.cpp @@ -0,0 +1,238 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CAttachmentRequestTransformerInstance.h" + +using namespace Caf; + +CAttachmentRequestTransformerInstance::CAttachmentRequestTransformerInstance() : + _isInitialized(false), + CAF_CM_INIT_LOG("CAttachmentRequestTransformerInstance") { +} + +CAttachmentRequestTransformerInstance::~CAttachmentRequestTransformerInstance() { +} + +void CAttachmentRequestTransformerInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +std::string CAttachmentRequestTransformerInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _id; + } + CAF_CM_EXIT; + + return rc; +} + +void CAttachmentRequestTransformerInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + } + CAF_CM_EXIT; +} + +SmartPtrIIntMessage CAttachmentRequestTransformerInstance::transformMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("transformMessage"); + + SmartPtrIIntMessage newMessage; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + newMessage = message; + + const SmartPtrCPayloadEnvelopeDoc payloadEnvelope = + CCafMessagePayloadParser::getPayloadEnvelope(message->getPayload()); + + // The standard is for an optional attachment collection at the root of all + // documents. + const std::deque attachmentCollection = + payloadEnvelope->getAttachmentCollection()->getAttachment(); + + if (! attachmentCollection.empty()) { + const std::string outputDirPath = calcOutputDirPath(payloadEnvelope); + + std::deque newAttachmentCollection; + for (TConstIterator > attachmentIter(attachmentCollection); + attachmentIter; attachmentIter++) { + const SmartPtrCAttachmentDoc attachment = *attachmentIter; + const std::string attachmentName = attachment->getName(); + const std::string attachmentUri = attachment->getUri(); + + UriUtils::SUriRecord uriRecord; + UriUtils::parseUriString(attachmentUri, uriRecord); + + SmartPtrCAttachmentDoc newAttachment = attachment; + if(uriRecord.protocol.compare("file") == 0) { + const std::string origFilePath = calcFilePath(uriRecord); + const std::string relPath = calcRelPath(origFilePath, uriRecord); + const std::string newFilePath = FileSystemUtils::buildPath( + outputDirPath, relPath); + + if (origFilePath.compare(newFilePath) == 0) { + CAF_CM_LOG_DEBUG_VA1("File path unchanged... no-op - %s", newFilePath.c_str()); + } else { + moveFile(origFilePath, newFilePath); + + const std::string newUri = "file:///" + newFilePath + "?relPath=" + relPath; + + newAttachment.CreateInstance(); + newAttachment->initialize(attachment->getName(), + attachment->getType(), newUri, false, + attachment->getCmsPolicy()); + } + } + + newAttachmentCollection.push_back(newAttachment); + } + + newMessage = CCafMessageCreator::createPayloadEnvelope( + payloadEnvelope, newAttachmentCollection, message->getHeaders()); + } + } + CAF_CM_EXIT; + + return newMessage; +} + +std::string CAttachmentRequestTransformerInstance::calcOutputDirPath( + const SmartPtrCPayloadEnvelopeDoc& payloadEnvelope) const { + CAF_CM_FUNCNAME_VALIDATE("calcOutputDirPath"); + + std::string outputDirPath; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(payloadEnvelope); + + const std::string clientIdStr = + BasePlatform::UuidToString(payloadEnvelope->getClientId()); + const std::string requestIdStr = + BasePlatform::UuidToString(payloadEnvelope->getRequestId()); + const std::string pmeIdStr = payloadEnvelope->getPmeId(); + + const std::string outputDir = AppConfigUtils::getRequiredString(_sConfigOutputDir); + + outputDirPath = FileSystemUtils::buildPath( + outputDir, clientIdStr, requestIdStr, pmeIdStr); + + outputDirPath = CStringUtils::expandEnv(outputDirPath); + if (! FileSystemUtils::doesDirectoryExist(outputDirPath)) { + CAF_CM_LOG_DEBUG_VA1("Creating output directory - %s", outputDirPath.c_str()); + FileSystemUtils::createDirectory(outputDirPath); + } + } + CAF_CM_EXIT; + + return outputDirPath; +} + +std::string CAttachmentRequestTransformerInstance::calcFilePath( + const UriUtils::SUriRecord& uriRecord) const { + CAF_CM_FUNCNAME("calcFilePath"); + + std::string filePath; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + UriUtils::SFileUriRecord fileUriRecord; + UriUtils::parseFileAddress(uriRecord.address, fileUriRecord); + + filePath = CStringUtils::expandEnv(fileUriRecord.path); + if(! FileSystemUtils::doesFileExist(filePath)) { + CAF_CM_EXCEPTIONEX_VA1(FileNotFoundException, ERROR_FILE_NOT_FOUND, + "URI file not found - %s", filePath.c_str()); + } + } + CAF_CM_EXIT; + + return filePath; +} + +std::string CAttachmentRequestTransformerInstance::calcRelPath( + const std::string& filePath, + const UriUtils::SUriRecord& uriRecord) const { + CAF_CM_FUNCNAME_VALIDATE("calcRelPath"); + + std::string relPath; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const std::map::const_iterator iterParam = + uriRecord.parameters.find("relPath"); + if (iterParam != uriRecord.parameters.end()) { + relPath = iterParam->second; + } else { + CAF_CM_LOG_DEBUG_VA1("Attachment URI does not contain relPath - %s", uriRecord.address.c_str()); + CAF_CM_VALIDATE_STRING(filePath); + relPath = FileSystemUtils::getBasename(filePath); + } + } + CAF_CM_EXIT; + + return relPath; +} + +void CAttachmentRequestTransformerInstance::moveFile( + const std::string& srcFilePath, + const std::string& dstFilePath) const { + CAF_CM_FUNCNAME_VALIDATE("moveFile"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(srcFilePath); + CAF_CM_VALIDATE_STRING(dstFilePath); + + if (FileSystemUtils::doesFileExist(dstFilePath)) { + CAF_CM_LOG_WARN_VA1("File already exists - %s", dstFilePath.c_str()); + } else { + const std::string newDirPath = FileSystemUtils::getDirname(dstFilePath); + if (! FileSystemUtils::doesDirectoryExist(newDirPath)) { + CAF_CM_LOG_DEBUG_VA1("Creating input directory - %s", newDirPath.c_str()); + FileSystemUtils::createDirectory(newDirPath); + } + + CAF_CM_LOG_DEBUG_VA2("Moving file - \"%s\" to \"%s\"", + srcFilePath.c_str(), dstFilePath.c_str()); + + FileSystemUtils::moveFile(srcFilePath, dstFilePath); + } + } + CAF_CM_EXIT; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CAttachmentRequestTransformerInstance.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CAttachmentRequestTransformerInstance.h new file mode 100644 index 000000000..942a8c0f8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CAttachmentRequestTransformerInstance.h @@ -0,0 +1,82 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CAttachmentRequestTransformerInstance_h_ +#define CAttachmentRequestTransformerInstance_h_ + +namespace Caf { + +class CAttachmentRequestTransformerInstance : + public TCafSubSystemObjectRoot, + public IIntegrationObject, + public IIntegrationComponentInstance, + public ITransformer { +public: + struct SExpandedFileAlias { + std::string _filePath; + std::string _encoding; + }; + CAF_DECLARE_SMART_POINTER(SExpandedFileAlias); + +public: + CAttachmentRequestTransformerInstance(); + virtual ~CAttachmentRequestTransformerInstance(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdAttachmentRequestTransformerInstance) + + CAF_BEGIN_INTERFACE_MAP(CAttachmentRequestTransformerInstance) + CAF_INTERFACE_ENTRY(IIntegrationObject) + CAF_INTERFACE_ENTRY(IIntegrationComponentInstance) + CAF_INTERFACE_ENTRY(ITransformer) + CAF_END_INTERFACE_MAP() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ITransformer + SmartPtrIIntMessage transformMessage( + const SmartPtrIIntMessage& message); + +private: + std::string calcOutputDirPath( + const SmartPtrCPayloadEnvelopeDoc& payloadEnvelope) const; + + std::string calcFilePath( + const UriUtils::SUriRecord& uriRecord) const; + + std::string calcRelPath( + const std::string& filePath, + const UriUtils::SUriRecord& uriRecord) const; + + void moveFile( + const std::string& srcFilePath, + const std::string& dstFilePath) const; + +private: + bool _isInitialized; + std::string _id; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CAttachmentRequestTransformerInstance); +}; + +} + +#endif // #ifndef CAttachmentRequestTransformerInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CCollectSchemaExecutor.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CCollectSchemaExecutor.cpp new file mode 100644 index 000000000..df0d5f4b4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CCollectSchemaExecutor.cpp @@ -0,0 +1,103 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CCollectSchemaExecutor.h" + +using namespace Caf; + +CCollectSchemaExecutor::CCollectSchemaExecutor() : + _isInitialized(false), + CAF_CM_INIT_LOG("CCollectSchemaExecutor") { +} + +CCollectSchemaExecutor::~CCollectSchemaExecutor() +{ +} + +void CCollectSchemaExecutor::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + + CAF_CM_ENTER + { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + CAF_CM_VALIDATE_STL_EMPTY(properties); + + const std::string schemaCacheDirPath = + AppConfigUtils::getRequiredString(_sProviderHostArea, _sConfigSchemaCacheDir); + const std::string schemaCacheDirPathExp = CStringUtils::expandEnv(schemaCacheDirPath); + if (!FileSystemUtils::doesDirectoryExist(schemaCacheDirPathExp)) { + CAF_CM_LOG_INFO_VA1( + "Schema cache directory does not exist... creating - %s", + schemaCacheDirPathExp.c_str()); + FileSystemUtils::createDirectory(schemaCacheDirPathExp); + } + + _schemaCacheDirPath = schemaCacheDirPathExp; + _isInitialized = true; + } + CAF_CM_EXIT; +} + +void CCollectSchemaExecutor::terminateBean() { + +} + +SmartPtrIIntMessage CCollectSchemaExecutor::processMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("processMessage"); + + SmartPtrIIntMessage newMessage; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + CAF_CM_LOG_DEBUG_VA1("Called - schemaCacheDirPath: %s", _schemaCacheDirPath.c_str()); + + const SmartPtrCCafMessageHeaders cafMessageHeaders = + CCafMessageHeaders::create(message->getHeaders()); + + const std::string configOutputDir = + AppConfigUtils::getRequiredString(_sConfigOutputDir); + const std::string relDirectory = cafMessageHeaders->getRelDirectory(); + const std::string outputDir = FileSystemUtils::buildPath( + configOutputDir, _sProviderHostArea, relDirectory); + + if (AppConfigUtils::getRequiredBoolean("managementAgent", "remap_logging_location")) { + SmartPtrCLoggingSetter loggingSetter; + loggingSetter.CreateInstance(); + loggingSetter->initialize(outputDir); + } + + const std::string providerCollectSchemaMem = message->getPayloadStr(); + const SmartPtrCProviderCollectSchemaRequestDoc providerCollectSchemaRequest = + XmlRoots::parseProviderCollectSchemaRequestFromString(providerCollectSchemaMem); + + CAF_CM_LOG_DEBUG_VA2("Copying directory from \"%s\" to \"%s\"", + _schemaCacheDirPath.c_str(), outputDir.c_str()); + FileSystemUtils::recursiveCopyDirectory(_schemaCacheDirPath, outputDir); + + const SmartPtrCResponseDoc response = + CResponseFactory::createResponse(providerCollectSchemaRequest, outputDir, + _schemaCacheDirPath); + + const std::string randomUuidStr = CStringUtils::createRandomUuid(); + const std::string relFilename = randomUuidStr + "_" + _sResponseFilename; + + newMessage = CCafMessageCreator::createPayloadEnvelope( + response, relFilename, message->getHeaders()); + } + CAF_CM_EXIT; + + return newMessage; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CCollectSchemaExecutor.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CCollectSchemaExecutor.h new file mode 100644 index 000000000..7a0740c6d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CCollectSchemaExecutor.h @@ -0,0 +1,51 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CCollectSchemaExecutor_h_ +#define CCollectSchemaExecutor_h_ + +using namespace Caf; + +/// TODO - describe class +class CCollectSchemaExecutor : + public TCafSubSystemObjectRoot, + public IBean, + public IMessageProcessor { +public: + CCollectSchemaExecutor(); + virtual ~CCollectSchemaExecutor(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdCollectSchemaExecutor) + + CAF_BEGIN_INTERFACE_MAP(CCollectSchemaExecutor) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IMessageProcessor) + CAF_END_INTERFACE_MAP() + +public: // IBean + virtual void initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties); + + virtual void terminateBean(); + +public: // IMessageProcessor + SmartPtrIIntMessage processMessage( + const SmartPtrIIntMessage& message); + +private: + bool _isInitialized; + std::string _schemaCacheDirPath; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CCollectSchemaExecutor); +}; + +#endif // #ifndef CCollectSchemaExecutor_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnv.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnv.cpp new file mode 100644 index 000000000..9e1497678 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnv.cpp @@ -0,0 +1,211 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CConfigEnv.h" + +using namespace Caf; + +CConfigEnv::CConfigEnv() : + _isInitialized(false), + CAF_CM_INIT_LOG("CConfigEnv") { +} + +CConfigEnv::~CConfigEnv() { +} + +void CConfigEnv::initialize() { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _persistenceDir = AppConfigUtils::getRequiredString("persistence_dir"); + _scriptsDir = AppConfigUtils::getRequiredString("scripts_dir"); + _outputDir = AppConfigUtils::getRequiredString(_sAppConfigGlobalParamOutputDir); + _configDir = AppConfigUtils::getRequiredString("config_dir"); + _vcidPath = "/etc/vmware-tools/GuestProxyData/VmVcUuid/vm.vc.uuid"; + +#ifdef _WIN32 + _startListenerScript = FileSystemUtils::buildPath(_scriptsDir, "start-listener.bat"); + _stopListenerScript = FileSystemUtils::buildPath(_scriptsDir, "stop-listener.bat"); + _startMaScript = FileSystemUtils::buildPath(_scriptsDir, "start-ma.bat"); + _stopMaScript = FileSystemUtils::buildPath(_scriptsDir, "stop-ma.bat"); +#else + _startListenerScript = FileSystemUtils::buildPath(_scriptsDir, "start-listener"); + _stopListenerScript = FileSystemUtils::buildPath(_scriptsDir, "stop-listener"); + _startMaScript = FileSystemUtils::buildPath(_scriptsDir, "start-ma"); + _stopMaScript = FileSystemUtils::buildPath(_scriptsDir, "stop-ma"); +#endif + + _isInitialized = true; +} + +SmartPtrCPersistenceDoc CConfigEnv::getUpdated( + const int32 timeout) { + CAF_CM_FUNCNAME_VALIDATE("getUpdated"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + if (_persistence.IsNull()) { + _persistence = CPersistenceUtils::loadPersistence(_persistenceDir); + } + + return _persistence; +} + +void CConfigEnv::update( + const SmartPtrCPersistenceDoc& persistence) { + CAF_CM_FUNCNAME_VALIDATE("update"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + if (_persistence.IsNull()) { + _persistence = CPersistenceUtils::loadPersistence(_persistenceDir); + } + + const SmartPtrCPersistenceDoc persistenceTmp = merge(_persistence, persistence); + if (_persistence != persistenceTmp) { + _persistence = persistenceTmp; + CPersistenceUtils::savePersistence(_persistence, _persistenceDir); + savePersistenceAppconfig(_persistence, _configDir); + + //executeScript(_stopListenerScript, _outputDir); + //executeScript(_stopMaScript, _outputDir); + //executeScript(_startListenerScript, _outputDir); + //executeScript(_startMaScript, _outputDir); + } +} + +void CConfigEnv::remove( + const SmartPtrCPersistenceDoc& persistence) { + CAF_CM_FUNCNAME("remove"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(persistence); + + CAF_CM_EXCEPTIONEX_VA0(UnsupportedOperationException, E_NOTIMPL, "Not implemented"); +} + +SmartPtrCPersistenceDoc CConfigEnv::merge( + const SmartPtrCPersistenceDoc& persistenceLoaded, + const SmartPtrCPersistenceDoc& persistenceIn) const { + // persistenceIn is non-null only when it has a change. + bool isChanged = false; + SmartPtrCPersistenceDoc persistenceTmp = persistenceLoaded; + if (! persistenceIn.IsNull()) { + persistenceTmp = persistenceIn; + isChanged = true; + } + + const SmartPtrCLocalSecurityDoc localSecurity = + calcLocalSecurity(persistenceTmp->getLocalSecurity()); + + //TODO: Do something similar to the above for tunnel vs. non-tunnel: + // * Tunnel - Use "/etc/vmware-tools/GuestProxyData/server/cert.pem" for the cacert + // * Tunnel - Calculate the URL with a protocol of "tunnel" + // * Non-tunnel - Calculate the URL with a protocol of "amqp" + + SmartPtrCPersistenceDoc rc = persistenceLoaded; + if (isChanged || ! localSecurity.IsNull()) { + const SmartPtrCLocalSecurityDoc localSecurityTmp = + localSecurity.IsNull() ? persistenceTmp->getLocalSecurity() : localSecurity; + + rc.CreateInstance(); + rc->initialize(localSecurityTmp, persistenceTmp->getRemoteSecurityCollection(), + persistenceTmp->getPersistenceProtocol()); + } + + return rc; +} + +SmartPtrCLocalSecurityDoc CConfigEnv::calcLocalSecurity( + const SmartPtrCLocalSecurityDoc& localSecurity) const { + CAF_CM_FUNCNAME_VALIDATE("calcLocalSecurity"); + CAF_CM_VALIDATE_SMARTPTR(localSecurity); + + const std::string localIdTmp = + localSecurity.IsNull() ? std::string() : localSecurity->getLocalId(); + const std::string localId = calcLocalId(localIdTmp); + + SmartPtrCLocalSecurityDoc rc; + if (! localId.empty()) { + const std::string privateKey = + localSecurity.IsNull() ? std::string() : localSecurity->getPrivateKey(); + const std::string cert = + localSecurity.IsNull() ? std::string() : localSecurity->getCert(); + rc.CreateInstance(); + rc->initialize(localId, privateKey, cert); + } + + return rc; +} + +std::string CConfigEnv::calcLocalId( + const std::string& localIdCurrent) const { + std::string rc; + if (FileSystemUtils::doesFileExist(_vcidPath)) { + const std::string vcid = FileSystemUtils::loadTextFile(_vcidPath); + if (vcid.compare(localIdCurrent) != 0) { + rc = vcid; + } + } else { + if (localIdCurrent.empty()) { + rc = CStringUtils::createRandomUuid(); + } + } + + return rc; +} + +void CConfigEnv::savePersistenceAppconfig( + const SmartPtrCPersistenceDoc& persistence, + const std::string& configDir) const { + CAF_CM_FUNCNAME_VALIDATE("savePersistenceAppconfig"); + CAF_CM_VALIDATE_SMARTPTR(persistence); + CAF_CM_VALIDATE_STRING(configDir); + + #ifdef WIN32 + const std::string newLine = "\r\n"; +#else + const std::string newLine = "\n"; +#endif + + const std::string appconfigPath = + FileSystemUtils::buildPath(configDir, "persistence-appconfig"); + const Cdeqstr appconfigColl = + FileSystemUtils::loadTextFileIntoColl(appconfigPath); + + std::string appconfigContents; + for (TConstIterator iter(appconfigColl); iter; iter++) { + const std::string appconfigLine = *iter; + if (appconfigLine.find("reactive_request_amqp_queue_id=") != std::string::npos) { + const SmartPtrCAmqpBrokerDoc amqpBroker = + CPersistenceUtils::loadAmqpBroker(persistence->getPersistenceProtocol()); + appconfigContents += + "reactive_request_amqp_queue_id=" + amqpBroker->getAmqpBrokerId() + newLine; + } else { + appconfigContents += appconfigLine + newLine; + } + } + + FileSystemUtils::saveTextFile(appconfigPath, appconfigContents); +} + +void CConfigEnv::executeScript( + const std::string& scriptPath, + const std::string& scriptResultsDir) const { + CAF_CM_FUNCNAME_VALIDATE("executeScript"); + CAF_CM_VALIDATE_STRING(scriptPath); + CAF_CM_VALIDATE_STRING(scriptResultsDir); + + Cdeqstr argv; + argv.push_back(scriptPath); + + const std::string stdoutPath = FileSystemUtils::buildPath( + scriptResultsDir, "stdout"); + const std::string stderrPath = FileSystemUtils::buildPath( + scriptResultsDir, "stderr"); + + ProcessUtils::runSyncToFiles(argv, stdoutPath, stderrPath); +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnv.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnv.h new file mode 100644 index 000000000..742127a22 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnv.h @@ -0,0 +1,83 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _MaIntegration_CConfigEnv_h_ +#define _MaIntegration_CConfigEnv_h_ + +using namespace Caf; + +/// TODO - describe class +class CConfigEnv : + public TCafSubSystemObjectRoot, + public IConfigEnv { +public: + CConfigEnv(); + virtual ~CConfigEnv(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdConfigEnv) + + CAF_BEGIN_INTERFACE_MAP(CConfigEnv) + CAF_INTERFACE_ENTRY(IConfigEnv) + CAF_END_INTERFACE_MAP() + +public: // IConfigEnv + void initialize(); + + SmartPtrCPersistenceDoc getUpdated( + const int32 timeout); + + void update( + const SmartPtrCPersistenceDoc& persistence); + + void remove( + const SmartPtrCPersistenceDoc& persistence); + +private: + SmartPtrCPersistenceDoc merge( + const SmartPtrCPersistenceDoc& persistenceLoaded, + const SmartPtrCPersistenceDoc& persistenceIn) const; + + SmartPtrCLocalSecurityDoc calcLocalSecurity( + const SmartPtrCLocalSecurityDoc& localSecurity) const; + + std::string calcLocalId( + const std::string& localIdCurrent) const; + + void savePersistenceAppconfig( + const SmartPtrCPersistenceDoc& persistence, + const std::string& configDir) const; + + void executeScript( + const std::string& scriptPath, + const std::string& scriptResultsDir) const; + + Cdeqstr loadTextFileIntoColl( + const std::string& filePath) const; + +private: + bool _isInitialized; + std::string _vcidPath; + std::string _persistenceDir; + std::string _scriptsDir; + std::string _outputDir; + std::string _configDir; + + std::string _startListenerScript; + std::string _stopListenerScript; + std::string _startMaScript; + std::string _stopMaScript; + + SmartPtrCPersistenceDoc _persistence; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CConfigEnv); +}; + +#endif // #ifndef _MaIntegration_CConfigEnv_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvInboundChannelAdapterInstance.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvInboundChannelAdapterInstance.cpp new file mode 100644 index 000000000..47a4f6dc1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvInboundChannelAdapterInstance.cpp @@ -0,0 +1,116 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CConfigEnvInboundChannelAdapterInstance.h" +#include "CConfigEnvReadingMessageSource.h" + +using namespace Caf; + +CConfigEnvInboundChannelAdapterInstance::CConfigEnvInboundChannelAdapterInstance() : + _isInitialized(false), + CAF_CM_INIT_LOG("CConfigEnvInboundChannelAdapterInstance") { +} + +CConfigEnvInboundChannelAdapterInstance::~CConfigEnvInboundChannelAdapterInstance() { +} + +void CConfigEnvInboundChannelAdapterInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _configSection = configSection; + _id = _configSection->findRequiredAttribute("id"); + + _isInitialized = true; +} + +std::string CConfigEnvInboundChannelAdapterInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _id; +} + +void CConfigEnvInboundChannelAdapterInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + + const std::string outputChannelStr = + _configSection->findRequiredAttribute("channel"); + + SmartPtrCConfigEnvReadingMessageSource configEnvReadingMessageSource; + configEnvReadingMessageSource.CreateInstance(); + configEnvReadingMessageSource->initialize(_configSection); + + const SmartPtrIMessageChannel outputMessageChannel = + channelResolver->resolveChannelName(outputChannelStr); + const SmartPtrIMessageChannel errorMessageChannel = + channelResolver->resolveChannelName("errorChannel"); + + SmartPtrCMessageHandler messageHandler; + messageHandler.CreateInstance(); + messageHandler->initialize( + _id, + outputMessageChannel, + SmartPtrICafObject()); + + SmartPtrCErrorHandler errorHandler; + errorHandler.CreateInstance(); + errorHandler->initialize(channelResolver, errorMessageChannel); + + SmartPtrCSourcePollingChannelAdapter sourcePollingChannelAdapter; + sourcePollingChannelAdapter.CreateInstance(); + sourcePollingChannelAdapter->initialize( + messageHandler, configEnvReadingMessageSource, errorHandler); + + SmartPtrCSimpleAsyncTaskExecutor simpleAsyncTaskExecutor; + simpleAsyncTaskExecutor.CreateInstance(); + simpleAsyncTaskExecutor->initialize(sourcePollingChannelAdapter, errorHandler); + _taskExecutor = simpleAsyncTaskExecutor; +} + +void CConfigEnvInboundChannelAdapterInstance::start( + const uint32 timeoutMs) { + CAF_CM_FUNCNAME_VALIDATE("start"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CAF_CM_LOG_DEBUG_VA0("Starting the executor"); + _taskExecutor->execute(timeoutMs); +} + +void CConfigEnvInboundChannelAdapterInstance::stop( + const uint32 timeoutMs) { + CAF_CM_FUNCNAME_VALIDATE("stop"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CAF_CM_LOG_DEBUG_VA0("Stopping the executor"); + _taskExecutor->cancel(timeoutMs); +} + +bool CConfigEnvInboundChannelAdapterInstance::isRunning() const { + CAF_CM_FUNCNAME_VALIDATE("isRunning"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const bool rc = (_taskExecutor->getState() == ITaskExecutor::ETaskStateStarted); + return rc; +} + +bool CConfigEnvInboundChannelAdapterInstance::isMessageProducer() const { + CAF_CM_FUNCNAME_VALIDATE("isMessageProducer"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return true; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvInboundChannelAdapterInstance.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvInboundChannelAdapterInstance.h new file mode 100644 index 000000000..aa3e2026e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvInboundChannelAdapterInstance.h @@ -0,0 +1,68 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CConfigEnvInboundChannelAdapterInstance_h_ +#define CConfigEnvInboundChannelAdapterInstance_h_ + +namespace Caf { + +class CConfigEnvInboundChannelAdapterInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public ILifecycle, + public IMessageProducer { +public: + CConfigEnvInboundChannelAdapterInstance(); + virtual ~CConfigEnvInboundChannelAdapterInstance(); + +public: + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(ILifecycle) + CAF_QI_ENTRY(IMessageProducer) + CAF_END_QI() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ILifecycle + void start(const uint32 timeoutMs); + void stop(const uint32 timeoutMs); + bool isRunning() const; + +public: // IMessageProducer + bool isMessageProducer() const; + +private: + bool _isInitialized; + std::string _id; + SmartPtrIDocument _configSection; + SmartPtrITaskExecutor _taskExecutor; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CConfigEnvInboundChannelAdapterInstance); +}; + +CAF_DECLARE_SMART_QI_POINTER(CConfigEnvInboundChannelAdapterInstance); + +} + +#endif // #ifndef CConfigEnvInboundChannelAdapterInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvMessageHandler.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvMessageHandler.cpp new file mode 100644 index 000000000..f47912d9d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvMessageHandler.cpp @@ -0,0 +1,84 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CConfigEnvMessageHandler.h" + +using namespace Caf; + +CConfigEnvMessageHandler::CConfigEnvMessageHandler() : + _isInitialized(false), + _deleteSourceEntries(false), + CAF_CM_INIT_LOG("CConfigEnvMessageHandler") { +} + +CConfigEnvMessageHandler::~CConfigEnvMessageHandler() { +} + +void CConfigEnvMessageHandler::initialize( + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + + const std::string implClass = configSection->findRequiredAttribute("impl-class"); + _configEnv.CreateInstance(implClass.c_str()); + _configEnv->initialize(); + + const std::string deleteSourceEntriesStr = configSection->findOptionalAttribute( + "delete-source-entries"); + _deleteSourceEntries = (deleteSourceEntriesStr.empty() || deleteSourceEntriesStr.compare("false") == 0) ? false : true; + + _isInitialized = true; +} + +void CConfigEnvMessageHandler::handleMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("handleMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + _savedMessage = message; + + const std::string payloadStr = message->getPayloadStr(); + const SmartPtrCPersistenceDoc persistence = + XmlRoots::parsePersistenceFromString(payloadStr); + _configEnv->update(persistence); + + if (_deleteSourceEntries) { + ;//TODO: Delete entries like the localSecurity private key. + } +} + +SmartPtrIIntMessage CConfigEnvMessageHandler::getSavedMessage() const { + CAF_CM_FUNCNAME_VALIDATE("getSavedMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _savedMessage; +} + +void CConfigEnvMessageHandler::clearSavedMessage() { + CAF_CM_FUNCNAME_VALIDATE("clearSavedMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _savedMessage = NULL; +} + +SmartPtrIIntMessage CConfigEnvMessageHandler::processErrorMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("processErrorMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + _savedMessage = message; + + //TODO: Verify that I'm receiving the error message and decide what + //to do with it. + + return SmartPtrIIntMessage(); +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvMessageHandler.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvMessageHandler.h new file mode 100644 index 000000000..30e7a3f46 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvMessageHandler.h @@ -0,0 +1,60 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _MaIntegration_CConfigEnvMessageHandler_h_ +#define _MaIntegration_CConfigEnvMessageHandler_h_ + +namespace Caf { + +class CConfigEnvMessageHandler : + public IMessageHandler, + public IErrorProcessor { +public: + CConfigEnvMessageHandler(); + virtual ~CConfigEnvMessageHandler(); + +public: + CAF_BEGIN_QI() + CAF_QI_ENTRY(IMessageHandler) + CAF_QI_ENTRY(IErrorProcessor) + CAF_END_QI() + +public: + void initialize( + const SmartPtrIDocument& configSection); + +public: // IMessageHandler + void handleMessage( + const SmartPtrIIntMessage& message); + + SmartPtrIIntMessage getSavedMessage() const; + + void clearSavedMessage(); + +public: // IErrorProcessor + SmartPtrIIntMessage processErrorMessage( + const SmartPtrIIntMessage& message); + +private: + bool _isInitialized; + std::string _id; + bool _deleteSourceEntries; + SmartPtrIConfigEnv _configEnv; + SmartPtrIIntMessage _savedMessage; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CConfigEnvMessageHandler); +}; + +CAF_DECLARE_SMART_QI_POINTER(CConfigEnvMessageHandler); + +} + +#endif // #ifndef _MaIntegration_CConfigEnvMessageHandler_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvOutboundChannelAdapterInstance.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvOutboundChannelAdapterInstance.cpp new file mode 100644 index 000000000..2175482b8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvOutboundChannelAdapterInstance.cpp @@ -0,0 +1,100 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CConfigEnvOutboundChannelAdapterInstance.h" + +using namespace Caf; + +CConfigEnvOutboundChannelAdapterInstance::CConfigEnvOutboundChannelAdapterInstance() : + _isInitialized(false), + _isRunning(false), + CAF_CM_INIT_LOG("CConfigEnvOutboundChannelAdapterInstance") { +} + +CConfigEnvOutboundChannelAdapterInstance::~CConfigEnvOutboundChannelAdapterInstance() { +} + +void CConfigEnvOutboundChannelAdapterInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + _configSection = configSection; + + _isInitialized = true; +} + +std::string CConfigEnvOutboundChannelAdapterInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _id; +} + +void CConfigEnvOutboundChannelAdapterInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + + const SmartPtrIMessageChannel errorMessageChannel = + channelResolver->resolveChannelName("errorChannel"); + + const std::string inputChannelStr = _configSection->findRequiredAttribute("channel"); + SmartPtrIMessageChannel inputChannel = channelResolver->resolveChannelName(inputChannelStr); + SmartPtrIIntegrationObject inputChannelObj; + inputChannelObj.QueryInterface(inputChannel); + + SmartPtrCConfigEnvMessageHandler configEnvMessageHandler; + configEnvMessageHandler.CreateInstance(); + configEnvMessageHandler->initialize(_configSection); + SmartPtrIMessageHandler messageHandler; + messageHandler.QueryInterface(configEnvMessageHandler); + + _messagingTemplate.CreateInstance(); + _messagingTemplate->initialize( + channelResolver, + inputChannelObj, + errorMessageChannel, + SmartPtrIMessageChannel(), + messageHandler); +} + +void CConfigEnvOutboundChannelAdapterInstance::start( + const uint32 timeoutMs) { + CAF_CM_FUNCNAME_VALIDATE("start"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_BOOL(!_isRunning); + + _isRunning = true; + _messagingTemplate->start(0); +} + +void CConfigEnvOutboundChannelAdapterInstance::stop( + const uint32 timeoutMs) { + CAF_CM_FUNCNAME_VALIDATE("stop"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_BOOL(_isRunning); + + _isRunning = false; + _messagingTemplate->stop(0); +} + +bool CConfigEnvOutboundChannelAdapterInstance::isRunning() const { + CAF_CM_FUNCNAME_VALIDATE("isRunning"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _isRunning; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvOutboundChannelAdapterInstance.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvOutboundChannelAdapterInstance.h new file mode 100644 index 000000000..591521a5e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvOutboundChannelAdapterInstance.h @@ -0,0 +1,64 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CConfigEnvOutboundChannelAdapterInstance_h_ +#define CConfigEnvOutboundChannelAdapterInstance_h_ + +namespace Caf { + +class CConfigEnvOutboundChannelAdapterInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public ILifecycle { +public: + CConfigEnvOutboundChannelAdapterInstance(); + virtual ~CConfigEnvOutboundChannelAdapterInstance(); + + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(ILifecycle) + CAF_END_QI() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ILifecycle + void start(const uint32 timeoutMs); + + void stop(const uint32 timeoutMs); + + bool isRunning() const; + +private: + bool _isInitialized; + bool _isRunning; + std::string _id; + SmartPtrIDocument _configSection; + SmartPtrCMessagingTemplate _messagingTemplate; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CConfigEnvOutboundChannelAdapterInstance); +}; + +CAF_DECLARE_SMART_QI_POINTER(CConfigEnvOutboundChannelAdapterInstance); +} + +#endif // #ifndef CConfigEnvOutboundChannelAdapterInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvReadingMessageSource.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvReadingMessageSource.cpp new file mode 100644 index 000000000..a49cf5649 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvReadingMessageSource.cpp @@ -0,0 +1,101 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CConfigEnvReadingMessageSource.h" + +using namespace Caf; + +CConfigEnvReadingMessageSource::CConfigEnvReadingMessageSource() : + _isInitialized(false), + _refreshSec(0), + _lastRefreshSec(0), + CAF_CM_INIT_LOG("CConfigEnvReadingMessageSource") { +} + +CConfigEnvReadingMessageSource::~CConfigEnvReadingMessageSource() { +} + +void CConfigEnvReadingMessageSource::initialize( + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + const std::string implClass = configSection->findRequiredAttribute("impl-class"); + const SmartPtrIDocument pollerDoc = configSection->findOptionalChild("poller"); + + _configEnv.CreateInstance(implClass.c_str()); + _configEnv->initialize(); + + setPollerMetadata(pollerDoc); + _refreshSec = 0; + + _isInitialized = true; +} + +bool CConfigEnvReadingMessageSource::doSend( + const SmartPtrIIntMessage&, + int32) { + CAF_CM_FUNCNAME("doSend"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CAF_CM_EXCEPTIONEX_VA1( + UnsupportedOperationException, + E_NOTIMPL, + "This is not a sending channel: %s", _id.c_str()); +} + +SmartPtrIIntMessage CConfigEnvReadingMessageSource::doReceive( + const int32 timeout) { + CAF_CM_FUNCNAME("receive"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + if (timeout > 0) { + CAF_CM_EXCEPTIONEX_VA1(UnsupportedOperationException, E_INVALIDARG, + "Timeout not currently supported: %s", _id.c_str()); + } + + SmartPtrIIntMessage message; + const SmartPtrCPersistenceDoc persistence = _configEnv->getUpdated(0); + if (! persistence.IsNull()) { + SmartPtrCIntMessage messageImpl; + messageImpl.CreateInstance(); + messageImpl->initializeStr(XmlRoots::savePersistenceToString(persistence), + IIntMessage::SmartPtrCHeaders(), IIntMessage::SmartPtrCHeaders()); + message = messageImpl; + } + + return message; +} + +bool CConfigEnvReadingMessageSource::isRefreshNecessary( + const uint32 refreshSec, + const uint64 lastRefreshSec) const { + bool rc = false; + + if (refreshSec == 0) { + rc = true; + } else { + const uint64 currentTimeSec = getTimeSec(); + if ((currentTimeSec - lastRefreshSec) > refreshSec) { + rc = true; + } + } + + return rc; +} + +uint64 CConfigEnvReadingMessageSource::getTimeSec() const { + GTimeVal curTime; + ::g_get_current_time(&curTime); + uint64 rc = curTime.tv_sec; + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvReadingMessageSource.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvReadingMessageSource.h new file mode 100644 index 000000000..fd6b75781 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvReadingMessageSource.h @@ -0,0 +1,60 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _MaIntegration_CConfigEnvReadingMessageSource_h_ +#define _MaIntegration_CConfigEnvReadingMessageSource_h_ + +namespace Caf { + +class CConfigEnvReadingMessageSource : + public CAbstractPollableChannel { +private: + typedef std::map CFileCollection; + CAF_DECLARE_SMART_POINTER(CFileCollection); + +public: + CConfigEnvReadingMessageSource(); + virtual ~CConfigEnvReadingMessageSource(); + +public: + void initialize( + const SmartPtrIDocument& configSection); + +protected: // CAbstractPollableChannel + bool doSend( + const SmartPtrIIntMessage& message, + int32 timeout); + + SmartPtrIIntMessage doReceive(const int32 timeout); + +private: + uint64 getTimeSec() const; + + bool isRefreshNecessary( + const uint32 refreshSec, + const uint64 lastRefreshSec) const; + +private: + bool _isInitialized; + std::string _id; + uint32 _refreshSec; + uint64 _lastRefreshSec; + + SmartPtrIConfigEnv _configEnv; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CConfigEnvReadingMessageSource); +}; + +CAF_DECLARE_SMART_POINTER(CConfigEnvReadingMessageSource); + +} + +#endif // #ifndef _MaIntegration_CConfigEnvReadingMessageSource_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CDiagToMgmtRequestTransformer.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CDiagToMgmtRequestTransformer.cpp new file mode 100644 index 000000000..eeaae078b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CDiagToMgmtRequestTransformer.cpp @@ -0,0 +1,82 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CDiagToMgmtRequestTransformer.h" + +using namespace Caf; + +CDiagToMgmtRequestTransformer::CDiagToMgmtRequestTransformer() : + _isInitialized(false), + CAF_CM_INIT_LOG("CDiagToMgmtRequestTransformer") { +} + +CDiagToMgmtRequestTransformer::~CDiagToMgmtRequestTransformer() { +} + +void CDiagToMgmtRequestTransformer::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + CAF_CM_VALIDATE_STL_EMPTY(properties); + _ctorArgs = ctorArgs; + _properties = properties; + initialize(); + } + CAF_CM_EXIT; +} + +void CDiagToMgmtRequestTransformer::terminateBean() { +} + +void CDiagToMgmtRequestTransformer::initialize() { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _isInitialized = true; + } + CAF_CM_EXIT; +} + +bool CDiagToMgmtRequestTransformer::isResponsible( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("isResponsible"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + } + CAF_CM_EXIT; + + return false; +} + +SmartPtrIIntegrationObject CDiagToMgmtRequestTransformer::createObject( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("createObject"); + + SmartPtrIIntegrationObject rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + rc.CreateInstance(_sObjIdDiagToMgmtRequestTransformerInstance); + rc->initialize(_ctorArgs, _properties, configSection); + } + CAF_CM_EXIT; + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CDiagToMgmtRequestTransformer.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CDiagToMgmtRequestTransformer.h new file mode 100644 index 000000000..f038c6239 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CDiagToMgmtRequestTransformer.h @@ -0,0 +1,58 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CDiagToMgmtRequestTransformer_h_ +#define CDiagToMgmtRequestTransformer_h_ + +namespace Caf { + +/// Sends responses/errors back to the client. +class CDiagToMgmtRequestTransformer : + public TCafSubSystemObjectRoot, + public IBean, + public IIntegrationComponent { +public: + CDiagToMgmtRequestTransformer(); + virtual ~CDiagToMgmtRequestTransformer(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdDiagToMgmtRequestTransformer) + + CAF_BEGIN_INTERFACE_MAP(CDiagToMgmtRequestTransformer) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IIntegrationComponent) + CAF_END_INTERFACE_MAP() + +public: + virtual void initialize(); + +public: // IBean + virtual void initializeBean(const IBean::Cargs& ctorArgs, const IBean::Cprops& properties); + + virtual void terminateBean(); + +public: // IIntegrationComponent + bool isResponsible( + const SmartPtrIDocument& configSection) const; + + SmartPtrIIntegrationObject createObject( + const SmartPtrIDocument& configSection) const; + +private: + bool _isInitialized; + IBean::Cargs _ctorArgs; + IBean::Cprops _properties; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CDiagToMgmtRequestTransformer); +}; + +} + +#endif // #ifndef CDiagToMgmtRequestTransformer_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CDiagToMgmtRequestTransformerInstance.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CDiagToMgmtRequestTransformerInstance.cpp new file mode 100644 index 000000000..e57ed56a8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CDiagToMgmtRequestTransformerInstance.cpp @@ -0,0 +1,463 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CDiagToMgmtRequestTransformerInstance.h" + +using namespace Caf; + +CDiagToMgmtRequestTransformerInstance::CDiagToMgmtRequestTransformerInstance() : + _isInitialized(false), + _fileAliasPrefix("diagFileAlias_"), + CAF_CM_INIT_LOG("CDiagToMgmtRequestTransformerInstance") { +} + +CDiagToMgmtRequestTransformerInstance::~CDiagToMgmtRequestTransformerInstance() { +} + +void CDiagToMgmtRequestTransformerInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +std::string CDiagToMgmtRequestTransformerInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _id; + } + CAF_CM_EXIT; + + return rc; +} + +void CDiagToMgmtRequestTransformerInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + + } + CAF_CM_EXIT; +} + +SmartPtrIIntMessage CDiagToMgmtRequestTransformerInstance::transformMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("transformMessage"); + + SmartPtrIIntMessage newMessage; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const std::string diagRequestXml = message->getPayloadStr(); + + CAF_CM_LOG_DEBUG_VA1("diagRequestXml - %s", diagRequestXml.c_str()); + + const SmartPtrCDiagRequestDoc diagRequestDoc = + XmlRoots::parseDiagRequestFromString(diagRequestXml); + + const SmartPtrCMgmtCollectInstancesCollectionDoc mgmtCollectInstancesCollection = createMgmtCollectInstancesCollection( + diagRequestDoc->getBatch()->getCollectInstances()); + + const SmartPtrCMgmtInvokeOperationCollectionDoc mgmtInvokeOperationCollection = createMgmtInvokeOperationCollection( + diagRequestDoc->getBatch()->getSetValueCollection(), diagRequestDoc->getBatch()->getDeleteValueCollection()); + + SmartPtrCMgmtBatchDoc mgmtBatch; + mgmtBatch.CreateInstance(); + mgmtBatch->initialize( + SmartPtrCMgmtCollectSchemaDoc(), + mgmtCollectInstancesCollection, + mgmtInvokeOperationCollection); + + SmartPtrCMgmtRequestDoc mgmtRequest; + mgmtRequest.CreateInstance(); + mgmtRequest->initialize( + diagRequestDoc->getClientId(), + diagRequestDoc->getRequestId(), + diagRequestDoc->getPmeId(), + diagRequestDoc->getRequestHeader(), + mgmtBatch, + SmartPtrCAttachmentCollectionDoc()); + + newMessage = CCafMessageCreator::create(mgmtRequest, message->getHeaders()); + } + CAF_CM_EXIT; + + return newMessage; +} + +SmartPtrCMgmtCollectInstancesCollectionDoc CDiagToMgmtRequestTransformerInstance::createMgmtCollectInstancesCollection( + const SmartPtrCDiagCollectInstancesDoc& diagCollectInstances) const { + CAF_CM_FUNCNAME_VALIDATE("createMgmtCollectInstancesCollection"); + + SmartPtrCMgmtCollectInstancesCollectionDoc mgmtCollectInstancesCollection; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + // diagCollectInstances is optional + + if (! diagCollectInstances.IsNull()) { + std::deque mgmtCollectInstancesCollectionInner; + + UUID jobId = diagCollectInstances->getJobId(); + const std::deque expandedFileAliasCollection = expandFileAliases(); + for(TConstIterator > expandedFileAliasIter(expandedFileAliasCollection); + expandedFileAliasIter; expandedFileAliasIter++) { + const SmartPtrSExpandedFileAlias expandedFileAlias = *expandedFileAliasIter; + + const SmartPtrCMgmtCollectInstancesDoc mgmtCollectInstances = + createCollectInstances(jobId, expandedFileAlias); + + mgmtCollectInstancesCollectionInner.push_back(mgmtCollectInstances); + + jobId = CStringUtils::createRandomUuidRaw(); + } + + mgmtCollectInstancesCollection.CreateInstance(); + mgmtCollectInstancesCollection->initialize( + mgmtCollectInstancesCollectionInner); + } + } + CAF_CM_EXIT; + + return mgmtCollectInstancesCollection; +} + +SmartPtrCMgmtInvokeOperationCollectionDoc CDiagToMgmtRequestTransformerInstance::createMgmtInvokeOperationCollection( + const SmartPtrCDiagSetValueCollectionDoc& diagSetValueCollection, + const SmartPtrCDiagDeleteValueCollectionDoc& diagDeleteValueCollection) const { + CAF_CM_FUNCNAME_VALIDATE("createMgmtInvokeOperationCollection"); + + SmartPtrCMgmtInvokeOperationCollectionDoc mgmtInvokeOperationCollection; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + // diagSetValueCollection is optional + // diagDeleteValueCollection is optional + + std::deque mgmtInvokeOperationCollectionInner; + + if (! diagSetValueCollection.IsNull()) { + const std::deque diagSetValueCollectionInner = + diagSetValueCollection->getSetValueCollection(); + for(TConstIterator > diagSetValueIter(diagSetValueCollectionInner); + diagSetValueIter; diagSetValueIter++) { + const SmartPtrCDiagSetValueDoc diagSetValue = *diagSetValueIter; + + const std::string fileAlias = diagSetValue->getFileAlias(); + const SmartPtrSExpandedFileAlias expandedFileAlias = expandFileAlias(fileAlias); + + const SmartPtrCPropertyDoc valueProperty = diagSetValue->getValue(); + const SmartPtrCOperationDoc setValueOperation = createSetValueOperation( + valueProperty->getName(), valueProperty->getValue(), expandedFileAlias); + + SmartPtrCMgmtInvokeOperationDoc mgmtInvokeOperation = createInvokeOperation( + diagSetValue->getJobId(), setValueOperation); + + mgmtInvokeOperationCollectionInner.push_back(mgmtInvokeOperation); + } + } + + if (! diagDeleteValueCollection.IsNull()) { + const std::deque diagDeleteValueCollectionInner = + diagDeleteValueCollection->getDeleteValueCollection(); + for(TConstIterator > diagDeleteValueIter(diagDeleteValueCollectionInner); + diagDeleteValueIter; diagDeleteValueIter++) { + const SmartPtrCDiagDeleteValueDoc diagDeleteValue = *diagDeleteValueIter; + + const std::string fileAlias = diagDeleteValue->getFileAlias(); + const SmartPtrSExpandedFileAlias expandedFileAlias = expandFileAlias(fileAlias); + + const SmartPtrCOperationDoc setValueOperation = createDeleteValueOperation( + diagDeleteValue->getValueName(), expandedFileAlias); + + SmartPtrCMgmtInvokeOperationDoc mgmtInvokeOperation = createInvokeOperation( + diagDeleteValue->getJobId(), setValueOperation); + + mgmtInvokeOperationCollectionInner.push_back(mgmtInvokeOperation); + } + } + + if (! mgmtInvokeOperationCollectionInner.empty()) { + mgmtInvokeOperationCollection.CreateInstance(); + mgmtInvokeOperationCollection->initialize( + mgmtInvokeOperationCollectionInner); + } + } + CAF_CM_EXIT; + + return mgmtInvokeOperationCollection; +} + +SmartPtrCMgmtCollectInstancesDoc CDiagToMgmtRequestTransformerInstance::createCollectInstances( + const UUID& jobId, + const SmartPtrSExpandedFileAlias& expandedFileAlias) const { + CAF_CM_FUNCNAME_VALIDATE("createCollectInstances"); + + SmartPtrCMgmtCollectInstancesDoc mgmtCollectInstances; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_GUID(jobId); + CAF_CM_VALIDATE_SMARTPTR(expandedFileAlias); + + SmartPtrCFullyQualifiedClassGroupDoc fullyQualifiedClass; + fullyQualifiedClass.CreateInstance(); + fullyQualifiedClass->initialize("caf", "ConfigActions", "1.0.0"); + + SmartPtrCClassSpecifierDoc classSpecifier; + classSpecifier.CreateInstance(); + classSpecifier->initialize(fullyQualifiedClass, SmartPtrCClassFiltersDoc()); + + const SmartPtrCRequestParameterDoc filePathParameter = + ParameterUtils::createParameter("filePath", expandedFileAlias->_filePath); + const SmartPtrCRequestParameterDoc encodingParameter = + ParameterUtils::createParameter("encoding", expandedFileAlias->_encoding); + + std::deque parameterCollectionInner; + parameterCollectionInner.push_back(filePathParameter); + parameterCollectionInner.push_back(encodingParameter); + + SmartPtrCParameterCollectionDoc parameterCollection; + parameterCollection.CreateInstance(); + parameterCollection->initialize( + parameterCollectionInner, std::deque()); + + mgmtCollectInstances.CreateInstance(); + mgmtCollectInstances->initialize(jobId, classSpecifier, parameterCollection); + } + CAF_CM_EXIT; + + return mgmtCollectInstances; +} + +SmartPtrCOperationDoc CDiagToMgmtRequestTransformerInstance::createSetValueOperation( + const std::string& valueName, + const std::deque& valueCollection, + const SmartPtrSExpandedFileAlias& expandedFileAlias) const { + CAF_CM_FUNCNAME_VALIDATE("createSetValueOperation"); + + SmartPtrCOperationDoc operation; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(valueName); + CAF_CM_VALIDATE_STL(valueCollection); + CAF_CM_VALIDATE_SMARTPTR(expandedFileAlias); + + const SmartPtrCRequestParameterDoc filePathParameter = + ParameterUtils::createParameter("filePath", expandedFileAlias->_filePath); + const SmartPtrCRequestParameterDoc encodingParameter = + ParameterUtils::createParameter("encoding", expandedFileAlias->_encoding); + const SmartPtrCRequestParameterDoc valueNameParameter = + ParameterUtils::createParameter("valueName", valueName); + const SmartPtrCRequestParameterDoc valueDataParameter = + ParameterUtils::createParameter("valueData", valueCollection); + + std::deque parameterCollectionInner; + parameterCollectionInner.push_back(filePathParameter); + parameterCollectionInner.push_back(encodingParameter); + parameterCollectionInner.push_back(valueNameParameter); + parameterCollectionInner.push_back(valueDataParameter); + + SmartPtrCParameterCollectionDoc parameterCollection; + parameterCollection.CreateInstance(); + parameterCollection->initialize( + parameterCollectionInner, std::deque()); + + operation.CreateInstance(); + operation->initialize("setValue", parameterCollection); + } + CAF_CM_EXIT; + + return operation; +} + +SmartPtrCOperationDoc CDiagToMgmtRequestTransformerInstance::createDeleteValueOperation( + const std::string& valueName, + const SmartPtrSExpandedFileAlias& expandedFileAlias) const { + CAF_CM_FUNCNAME_VALIDATE("createDeleteValueOperation"); + + SmartPtrCOperationDoc operation; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(valueName); + CAF_CM_VALIDATE_SMARTPTR(expandedFileAlias); + + const SmartPtrCRequestParameterDoc filePathParameter = + ParameterUtils::createParameter("filePath", expandedFileAlias->_filePath); + const SmartPtrCRequestParameterDoc encodingParameter = + ParameterUtils::createParameter("encoding", expandedFileAlias->_encoding); + const SmartPtrCRequestParameterDoc valueNameParameter = + ParameterUtils::createParameter("valueName", valueName); + + std::deque parameterCollectionInner; + parameterCollectionInner.push_back(filePathParameter); + parameterCollectionInner.push_back(encodingParameter); + parameterCollectionInner.push_back(valueNameParameter); + + SmartPtrCParameterCollectionDoc parameterCollection; + parameterCollection.CreateInstance(); + parameterCollection->initialize( + parameterCollectionInner, std::deque()); + + operation.CreateInstance(); + operation->initialize("deleteValue", parameterCollection); + } + CAF_CM_EXIT; + + return operation; +} + +SmartPtrCMgmtInvokeOperationDoc CDiagToMgmtRequestTransformerInstance::createInvokeOperation( + const UUID& jobId, + const SmartPtrCOperationDoc operation) const { + CAF_CM_FUNCNAME_VALIDATE("createInvokeOperation"); + + SmartPtrCMgmtInvokeOperationDoc mgmtInvokeOperation; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_GUID(jobId); + CAF_CM_VALIDATE_SMARTPTR(operation); + + SmartPtrCFullyQualifiedClassGroupDoc fullyQualifiedClass; + fullyQualifiedClass.CreateInstance(); + fullyQualifiedClass->initialize("caf", "ConfigActions", "1.0.0"); + + SmartPtrCClassSpecifierDoc classSpecifier; + classSpecifier.CreateInstance(); + classSpecifier->initialize(fullyQualifiedClass, SmartPtrCClassFiltersDoc()); + + mgmtInvokeOperation.CreateInstance(); + mgmtInvokeOperation->initialize(jobId, classSpecifier, operation); + } + CAF_CM_EXIT; + + return mgmtInvokeOperation; +} + +std::deque +CDiagToMgmtRequestTransformerInstance::expandFileAliases() const { + CAF_CM_FUNCNAME_VALIDATE("expandFileAliases"); + + std::deque expandedFileAliasCollection; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const std::string diagFileAliases = AppConfigUtils::getRequiredString("provider", "diagFileAliases"); + const Cdeqstr diagFileAliasCollection = CStringUtils::split(diagFileAliases, ':'); + + for(TConstIterator diagFileAliasIter(diagFileAliasCollection); + diagFileAliasIter; diagFileAliasIter++) { + const std::string fileAlias = *diagFileAliasIter; + + const SmartPtrSExpandedFileAlias expandedFileAlias = expandFileAlias(fileAlias); + if (! expandedFileAlias.IsNull()) { + expandedFileAliasCollection.push_back(expandedFileAlias); + } + } + } + CAF_CM_EXIT; + + return expandedFileAliasCollection; +} + +CDiagToMgmtRequestTransformerInstance::SmartPtrSExpandedFileAlias +CDiagToMgmtRequestTransformerInstance::expandFileAlias( + const std::string& fileAlias) const { + CAF_CM_FUNCNAME_VALIDATE("expandFileAlias"); + + SmartPtrSExpandedFileAlias expandedFileAlias; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const std::string fullFileAlias = _fileAliasPrefix + fileAlias; + const std::string diagFileUriStr = AppConfigUtils::getOptionalString("provider", fullFileAlias); + + if (diagFileUriStr.empty()) { + CAF_CM_LOG_WARN_VA1( + "Diag file alias not found in appconfig file - alias: %s", fullFileAlias.c_str()); + } else { + UriUtils::SUriRecord diagFileUri; + UriUtils::parseUriString(diagFileUriStr, diagFileUri); + if (diagFileUri.protocol.compare("file") != 0) { + CAF_CM_LOG_WARN_VA2( + "Diag file alias URI must use \'file\' protocol - alias: %s, uri: %s", + fullFileAlias.c_str(), diagFileUriStr.c_str()) + } else { + UriUtils::SFileUriRecord fileUriRecord; + UriUtils::parseFileAddress(diagFileUri.address, fileUriRecord); + + const std::string diagFile = fileUriRecord.path; + if (! FileSystemUtils::doesFileExist(diagFile)) { + CAF_CM_LOG_WARN_VA2( + "Diag file alias file not found - alias: %s, file: %s", + fullFileAlias.c_str(), diagFile.c_str()); + } else { + expandedFileAlias.CreateInstance(); + expandedFileAlias->_filePath = diagFile; + expandedFileAlias->_encoding = findUriParameter("encoding", diagFileUri); + } + } + } + } + CAF_CM_EXIT; + + return expandedFileAlias; +} + +std::string CDiagToMgmtRequestTransformerInstance::findUriParameter( + const std::string& parameterName, + const UriUtils::SUriRecord& uri) const { + CAF_CM_FUNCNAME("findUriParameter"); + + std::string parameterValue; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(parameterName); + + std::map parameters = uri.parameters; + std::map::const_iterator iterParameter = parameters.find(parameterName); + if (iterParameter == parameters.end()) { + CAF_CM_EXCEPTIONEX_VA3(InvalidArgumentException, E_INVALIDARG, + "URI does not contain required parameter - parameter: %s, protocol: %s, address: %s", + parameterName.c_str(), uri.protocol.c_str(), uri.address.c_str()); + } + + parameterValue = iterParameter->second; + } + CAF_CM_EXIT; + + return parameterValue; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CDiagToMgmtRequestTransformerInstance.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CDiagToMgmtRequestTransformerInstance.h new file mode 100644 index 000000000..78a78f5f4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CDiagToMgmtRequestTransformerInstance.h @@ -0,0 +1,103 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CDiagToMgmtRequestTransformerInstance_h_ +#define CDiagToMgmtRequestTransformerInstance_h_ + +namespace Caf { + +class CDiagToMgmtRequestTransformerInstance : + public TCafSubSystemObjectRoot, + public IIntegrationObject, + public IIntegrationComponentInstance, + public ITransformer { +public: + struct SExpandedFileAlias { + std::string _filePath; + std::string _encoding; + }; + CAF_DECLARE_SMART_POINTER(SExpandedFileAlias); + +public: + CDiagToMgmtRequestTransformerInstance(); + virtual ~CDiagToMgmtRequestTransformerInstance(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdDiagToMgmtRequestTransformerInstance) + + CAF_BEGIN_INTERFACE_MAP(CDiagToMgmtRequestTransformerInstance) + CAF_INTERFACE_ENTRY(IIntegrationObject) + CAF_INTERFACE_ENTRY(IIntegrationComponentInstance) + CAF_INTERFACE_ENTRY(ITransformer) + CAF_END_INTERFACE_MAP() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ITransformer + SmartPtrIIntMessage transformMessage( + const SmartPtrIIntMessage& message); + +private: + SmartPtrCMgmtCollectInstancesCollectionDoc createMgmtCollectInstancesCollection( + const SmartPtrCDiagCollectInstancesDoc& diagCollectInstances) const; + + SmartPtrCMgmtInvokeOperationCollectionDoc createMgmtInvokeOperationCollection( + const SmartPtrCDiagSetValueCollectionDoc& diagSetValueCollection, + const SmartPtrCDiagDeleteValueCollectionDoc& diagDeleteValueCollection) const; + + SmartPtrCMgmtCollectInstancesDoc createCollectInstances( + const UUID& jobId, + const SmartPtrSExpandedFileAlias& expandedFileAlias) const; + + SmartPtrCOperationDoc createSetValueOperation( + const std::string& valueName, + const std::deque& valueCollection, + const SmartPtrSExpandedFileAlias& expandedFileAlias) const; + + SmartPtrCOperationDoc createDeleteValueOperation( + const std::string& valueName, + const SmartPtrSExpandedFileAlias& expandedFileAlias) const; + + SmartPtrCMgmtInvokeOperationDoc createInvokeOperation( + const UUID& jobId, + const SmartPtrCOperationDoc operation) const; + + std::deque expandFileAliases() const; + + SmartPtrSExpandedFileAlias expandFileAlias( + const std::string& fileAlias) const; + + std::string findUriParameter( + const std::string& parameterName, + const UriUtils::SUriRecord& uri) const; + +private: + bool _isInitialized; + std::string _id; + + std::string _fileAliasPrefix; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CDiagToMgmtRequestTransformerInstance); +}; + +} + +#endif // #ifndef CDiagToMgmtRequestTransformerInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CInstallToMgmtRequestTransformer.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CInstallToMgmtRequestTransformer.cpp new file mode 100644 index 000000000..0e8b8b539 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CInstallToMgmtRequestTransformer.cpp @@ -0,0 +1,82 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CInstallToMgmtRequestTransformer.h" + +using namespace Caf; + +CInstallToMgmtRequestTransformer::CInstallToMgmtRequestTransformer() : + _isInitialized(false), + CAF_CM_INIT_LOG("CInstallToMgmtRequestTransformer") { +} + +CInstallToMgmtRequestTransformer::~CInstallToMgmtRequestTransformer() { +} + +void CInstallToMgmtRequestTransformer::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + CAF_CM_VALIDATE_STL_EMPTY(properties); + _ctorArgs = ctorArgs; + _properties = properties; + initialize(); + } + CAF_CM_EXIT; +} + +void CInstallToMgmtRequestTransformer::terminateBean() { +} + +void CInstallToMgmtRequestTransformer::initialize() { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _isInitialized = true; + } + CAF_CM_EXIT; +} + +bool CInstallToMgmtRequestTransformer::isResponsible( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("isResponsible"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + } + CAF_CM_EXIT; + + return false; +} + +SmartPtrIIntegrationObject CInstallToMgmtRequestTransformer::createObject( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("createObject"); + + SmartPtrIIntegrationObject rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + rc.CreateInstance(_sObjIdInstallToMgmtRequestTransformerInstance); + rc->initialize(_ctorArgs, _properties, configSection); + } + CAF_CM_EXIT; + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CInstallToMgmtRequestTransformer.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CInstallToMgmtRequestTransformer.h new file mode 100644 index 000000000..c817ea04c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CInstallToMgmtRequestTransformer.h @@ -0,0 +1,58 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CInstallToMgmtRequestTransformer_h_ +#define CInstallToMgmtRequestTransformer_h_ + +namespace Caf { + +/// Sends responses/errors back to the client. +class CInstallToMgmtRequestTransformer : + public TCafSubSystemObjectRoot, + public IBean, + public IIntegrationComponent { +public: + CInstallToMgmtRequestTransformer(); + virtual ~CInstallToMgmtRequestTransformer(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdInstallToMgmtRequestTransformer) + + CAF_BEGIN_INTERFACE_MAP(CInstallToMgmtRequestTransformer) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IIntegrationComponent) + CAF_END_INTERFACE_MAP() + +public: + virtual void initialize(); + +public: // IBean + virtual void initializeBean(const IBean::Cargs& ctorArgs, const IBean::Cprops& properties); + + virtual void terminateBean(); + +public: // IIntegrationComponent + bool isResponsible( + const SmartPtrIDocument& configSection) const; + + SmartPtrIIntegrationObject createObject( + const SmartPtrIDocument& configSection) const; + +private: + bool _isInitialized; + IBean::Cargs _ctorArgs; + IBean::Cprops _properties; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CInstallToMgmtRequestTransformer); +}; + +} + +#endif // #ifndef CInstallToMgmtRequestTransformer_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CInstallToMgmtRequestTransformerInstance.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CInstallToMgmtRequestTransformerInstance.cpp new file mode 100644 index 000000000..578c12d4a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CInstallToMgmtRequestTransformerInstance.cpp @@ -0,0 +1,358 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CInstallToMgmtRequestTransformerInstance.h" + +using namespace Caf; + +CInstallToMgmtRequestTransformerInstance::CInstallToMgmtRequestTransformerInstance() : + _isInitialized(false), + _fileAliasPrefix("installFileAlias_"), + CAF_CM_INIT_LOG("CInstallToMgmtRequestTransformerInstance") { +} + +CInstallToMgmtRequestTransformerInstance::~CInstallToMgmtRequestTransformerInstance() { +} + +void CInstallToMgmtRequestTransformerInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +std::string CInstallToMgmtRequestTransformerInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _id; + } + CAF_CM_EXIT; + + return rc; +} + +void CInstallToMgmtRequestTransformerInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + + } + CAF_CM_EXIT; +} + +SmartPtrIIntMessage CInstallToMgmtRequestTransformerInstance::transformMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("transformMessage"); + + SmartPtrIIntMessage newMessage; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const SmartPtrCInstallRequestDoc installRequestDoc = + CCafMessagePayloadParser::getInstallRequest(message->getPayload()); + + const SmartPtrCMgmtCollectInstancesCollectionDoc mgmtCollectInstancesCollection = createMgmtCollectInstancesCollection( + installRequestDoc->getBatch()->getGetInventory()); + + const SmartPtrCMgmtInvokeOperationCollectionDoc mgmtInvokeOperationCollection = createMgmtInvokeOperationCollection( + installRequestDoc->getBatch()->getInstallProvider(), installRequestDoc->getBatch()->getUninstallProvider()); + + SmartPtrCMgmtBatchDoc mgmtBatch; + mgmtBatch.CreateInstance(); + mgmtBatch->initialize( + SmartPtrCMgmtCollectSchemaDoc(), + mgmtCollectInstancesCollection, + mgmtInvokeOperationCollection); + + SmartPtrCMgmtRequestDoc mgmtRequest; + mgmtRequest.CreateInstance(); + mgmtRequest->initialize( + installRequestDoc->getClientId(), + installRequestDoc->getRequestId(), + installRequestDoc->getPmeId(), + installRequestDoc->getRequestHeader(), + mgmtBatch, + installRequestDoc->getAttachmentCollection()); + + newMessage = CCafMessageCreator::create(mgmtRequest, message->getHeaders()); + } + CAF_CM_EXIT; + + return newMessage; +} + +SmartPtrCMgmtCollectInstancesCollectionDoc CInstallToMgmtRequestTransformerInstance::createMgmtCollectInstancesCollection( + const SmartPtrCGetInventoryJobDoc& getInventoryJob) const { + CAF_CM_FUNCNAME_VALIDATE("createMgmtCollectInstancesCollection"); + + SmartPtrCMgmtCollectInstancesCollectionDoc mgmtCollectInstancesCollection; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + // getInventoryJob is optional + + if (! getInventoryJob.IsNull()) { + UUID jobId = getInventoryJob->getJobId(); + const SmartPtrCMgmtCollectInstancesDoc mgmtCollectInstances = + createCollectInstances(jobId); + + std::deque mgmtCollectInstancesCollectionInner; + mgmtCollectInstancesCollectionInner.push_back(mgmtCollectInstances); + + mgmtCollectInstancesCollection.CreateInstance(); + mgmtCollectInstancesCollection->initialize( + mgmtCollectInstancesCollectionInner); + } + } + CAF_CM_EXIT; + + return mgmtCollectInstancesCollection; +} + +SmartPtrCMgmtInvokeOperationCollectionDoc CInstallToMgmtRequestTransformerInstance::createMgmtInvokeOperationCollection( + const SmartPtrCInstallProviderJobDoc& installProviderJob, + const SmartPtrCUninstallProviderJobDoc& uninstallProviderJob) const { + CAF_CM_FUNCNAME_VALIDATE("createMgmtInvokeOperationCollection"); + + SmartPtrCMgmtInvokeOperationCollectionDoc mgmtInvokeOperationCollection; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + // installSetValueCollection is optional + // installDeleteValueCollection is optional + + std::deque mgmtInvokeOperationCollectionInner; + + if (! installProviderJob.IsNull()) { + const SmartPtrCOperationDoc installProviderJobOperation = createInstallProviderOperation(installProviderJob); + + SmartPtrCMgmtInvokeOperationDoc mgmtInvokeOperation = createInvokeOperation(installProviderJobOperation); + + mgmtInvokeOperationCollectionInner.push_back(mgmtInvokeOperation); + } + + if (! uninstallProviderJob.IsNull()) { + const SmartPtrCOperationDoc uninstallProviderJobOperation = createUninstallProviderJobOperation(uninstallProviderJob); + + SmartPtrCMgmtInvokeOperationDoc mgmtInvokeOperation = createInvokeOperation(uninstallProviderJobOperation); + + mgmtInvokeOperationCollectionInner.push_back(mgmtInvokeOperation); + } + + if (! mgmtInvokeOperationCollectionInner.empty()) { + mgmtInvokeOperationCollection.CreateInstance(); + mgmtInvokeOperationCollection->initialize( + mgmtInvokeOperationCollectionInner); + } + } + CAF_CM_EXIT; + + return mgmtInvokeOperationCollection; +} + +SmartPtrCMgmtCollectInstancesDoc CInstallToMgmtRequestTransformerInstance::createCollectInstances( + const UUID& jobId) const { + CAF_CM_FUNCNAME_VALIDATE("createCollectInstances"); + + SmartPtrCMgmtCollectInstancesDoc mgmtCollectInstances; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_GUID(jobId); + + SmartPtrCFullyQualifiedClassGroupDoc fullyQualifiedClass; + fullyQualifiedClass.CreateInstance(); + fullyQualifiedClass->initialize("caf", "InstallActions", "1.0.0"); + + SmartPtrCClassSpecifierDoc classSpecifier; + classSpecifier.CreateInstance(); + classSpecifier->initialize(fullyQualifiedClass, SmartPtrCClassFiltersDoc()); + + SmartPtrCParameterCollectionDoc parameterCollection; + parameterCollection.CreateInstance(); + parameterCollection->initialize( + std::deque(), + std::deque()); + + mgmtCollectInstances.CreateInstance(); + mgmtCollectInstances->initialize(jobId, classSpecifier, parameterCollection); + } + CAF_CM_EXIT; + + return mgmtCollectInstances; +} + +SmartPtrCOperationDoc CInstallToMgmtRequestTransformerInstance::createInstallProviderOperation( + const SmartPtrCInstallProviderJobDoc& installProviderJob) const { + CAF_CM_FUNCNAME_VALIDATE("createInstallProviderOperation"); + + SmartPtrCOperationDoc operation; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(installProviderJob); + + const std::string installProviderJobStr = + saveInstallProviderJobToString(installProviderJob); + std::deque valueCollection; + valueCollection.push_back(installProviderJobStr); + + SmartPtrCRequestInstanceParameterDoc instanceParameter; + instanceParameter.CreateInstance(); + instanceParameter->initialize( + "installProviderJob", "caf", "InstallProviderJob", "1.0.0", valueCollection); + + std::deque instanceParameterCollectionInner; + instanceParameterCollectionInner.push_back(instanceParameter); + + SmartPtrCParameterCollectionDoc parameterCollection; + parameterCollection.CreateInstance(); + parameterCollection->initialize( + std::deque(), instanceParameterCollectionInner); + + operation.CreateInstance(); + operation->initialize("installProviderJob", parameterCollection); + } + CAF_CM_EXIT; + + return operation; +} + +SmartPtrCOperationDoc CInstallToMgmtRequestTransformerInstance::createUninstallProviderJobOperation( + const SmartPtrCUninstallProviderJobDoc& uninstallProviderJob) const { + CAF_CM_FUNCNAME_VALIDATE("createUninstallProviderJobOperation"); + + SmartPtrCOperationDoc operation; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(uninstallProviderJob); + + const std::string& uninstallProviderJobJobStr = + saveUninstallProviderJobToString(uninstallProviderJob); + std::deque valueCollection; + valueCollection.push_back(uninstallProviderJobJobStr); + + SmartPtrCRequestInstanceParameterDoc instanceParameter; + instanceParameter.CreateInstance(); + instanceParameter->initialize( + "uninstallProviderJob", "caf", "InstallProviderJob", "1.0.0", valueCollection); + + std::deque instanceParameterCollectionInner; + instanceParameterCollectionInner.push_back(instanceParameter); + + SmartPtrCParameterCollectionDoc parameterCollection; + parameterCollection.CreateInstance(); + parameterCollection->initialize( + std::deque(), instanceParameterCollectionInner); + + operation.CreateInstance(); + operation->initialize("uninstallProviderJob", parameterCollection); + } + CAF_CM_EXIT; + + return operation; +} + +SmartPtrCMgmtInvokeOperationDoc CInstallToMgmtRequestTransformerInstance::createInvokeOperation( + const SmartPtrCOperationDoc& operation) const { + CAF_CM_FUNCNAME("createInvokeOperation"); + + SmartPtrCMgmtInvokeOperationDoc mgmtInvokeOperation; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(operation); + + SmartPtrCFullyQualifiedClassGroupDoc fullyQualifiedClass; + fullyQualifiedClass.CreateInstance(); + fullyQualifiedClass->initialize("caf", "InstallActions", "1.0.0"); + + SmartPtrCClassSpecifierDoc classSpecifier; + classSpecifier.CreateInstance(); + classSpecifier->initialize(fullyQualifiedClass, SmartPtrCClassFiltersDoc()); + + UUID jobId; + if (S_OK != ::UuidCreate(&jobId)) { + CAF_CM_EXCEPTIONEX_VA0(InvalidHandleException, E_UNEXPECTED, + "Failed to create the UUID"); + } + + mgmtInvokeOperation.CreateInstance(); + mgmtInvokeOperation->initialize(jobId, classSpecifier, operation); + } + CAF_CM_EXIT; + + return mgmtInvokeOperation; +} + +std::string CInstallToMgmtRequestTransformerInstance::saveInstallProviderJobToString( + const SmartPtrCInstallProviderJobDoc& installProviderJob) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "saveInstallProviderJobToString"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(installProviderJob); + + const std::string schemaNamespace = DocXmlUtils::getSchemaNamespace("fx"); + + const SmartPtrCXmlElement rootXml = CXmlUtils::createRootElement( + "cafInstallProviderJob", schemaNamespace); + InstallProviderJobXml::add(installProviderJob, rootXml); + + rc = rootXml->saveToStringRaw(); + } + CAF_CM_EXIT; + + return rc; +} + +std::string CInstallToMgmtRequestTransformerInstance::saveUninstallProviderJobToString( + const SmartPtrCUninstallProviderJobDoc& uninstallProviderJob) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "saveUninstallProviderJobToString"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(uninstallProviderJob); + + const std::string schemaNamespace = DocXmlUtils::getSchemaNamespace("fx"); + + const SmartPtrCXmlElement rootXml = CXmlUtils::createRootElement( + "cafUninstallProviderJob", schemaNamespace); + UninstallProviderJobXml::add(uninstallProviderJob, rootXml); + + rc = rootXml->saveToStringRaw(); + } + CAF_CM_EXIT; + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CInstallToMgmtRequestTransformerInstance.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CInstallToMgmtRequestTransformerInstance.h new file mode 100644 index 000000000..d6233e2ce --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CInstallToMgmtRequestTransformerInstance.h @@ -0,0 +1,89 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CInstallToMgmtRequestTransformerInstance_h_ +#define CInstallToMgmtRequestTransformerInstance_h_ + +namespace Caf { + +class CInstallToMgmtRequestTransformerInstance : + public TCafSubSystemObjectRoot, + public IIntegrationObject, + public IIntegrationComponentInstance, + public ITransformer { + +public: + CInstallToMgmtRequestTransformerInstance(); + virtual ~CInstallToMgmtRequestTransformerInstance(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdInstallToMgmtRequestTransformerInstance) + + CAF_BEGIN_INTERFACE_MAP(CInstallToMgmtRequestTransformerInstance) + CAF_INTERFACE_ENTRY(IIntegrationObject) + CAF_INTERFACE_ENTRY(IIntegrationComponentInstance) + CAF_INTERFACE_ENTRY(ITransformer) + CAF_END_INTERFACE_MAP() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ITransformer + SmartPtrIIntMessage transformMessage( + const SmartPtrIIntMessage& message); + +private: + SmartPtrCMgmtCollectInstancesCollectionDoc createMgmtCollectInstancesCollection( + const SmartPtrCGetInventoryJobDoc& getInventoryJob) const; + + SmartPtrCMgmtInvokeOperationCollectionDoc createMgmtInvokeOperationCollection( + const SmartPtrCInstallProviderJobDoc& installProviderJob, + const SmartPtrCUninstallProviderJobDoc& uninstallProviderJob) const; + + SmartPtrCMgmtCollectInstancesDoc createCollectInstances( + const UUID& jobId) const; + + SmartPtrCMgmtInvokeOperationDoc createInvokeOperation( + const SmartPtrCOperationDoc& operation) const; + + SmartPtrCOperationDoc createInstallProviderOperation( + const SmartPtrCInstallProviderJobDoc& installProviderJob) const; + + SmartPtrCOperationDoc createUninstallProviderJobOperation( + const SmartPtrCUninstallProviderJobDoc& uninstallProviderJob) const; + + static std::string saveInstallProviderJobToString( + const SmartPtrCInstallProviderJobDoc& installProviderJob); + + static std::string saveUninstallProviderJobToString( + const SmartPtrCUninstallProviderJobDoc& uninstallProviderJob); + +private: + bool _isInitialized; + std::string _id; + + std::string _fileAliasPrefix; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CInstallToMgmtRequestTransformerInstance); +}; + +} + +#endif // #ifndef CInstallToMgmtRequestTransformerInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceInboundChannelAdapterInstance.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceInboundChannelAdapterInstance.cpp new file mode 100644 index 000000000..f106a9eab --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceInboundChannelAdapterInstance.cpp @@ -0,0 +1,116 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CPersistenceInboundChannelAdapterInstance.h" +#include "CPersistenceReadingMessageSource.h" + +using namespace Caf; + +CPersistenceInboundChannelAdapterInstance::CPersistenceInboundChannelAdapterInstance() : + _isInitialized(false), + CAF_CM_INIT_LOG("CPersistenceInboundChannelAdapterInstance") { +} + +CPersistenceInboundChannelAdapterInstance::~CPersistenceInboundChannelAdapterInstance() { +} + +void CPersistenceInboundChannelAdapterInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _configSection = configSection; + _id = _configSection->findRequiredAttribute("id"); + + _isInitialized = true; +} + +std::string CPersistenceInboundChannelAdapterInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _id; +} + +void CPersistenceInboundChannelAdapterInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + + const std::string outputChannelStr = + _configSection->findRequiredAttribute("channel"); + + SmartPtrCPersistenceReadingMessageSource persistenceReadingMessageSource; + persistenceReadingMessageSource.CreateInstance(); + persistenceReadingMessageSource->initialize(_configSection); + + const SmartPtrIMessageChannel outputMessageChannel = + channelResolver->resolveChannelName(outputChannelStr); + const SmartPtrIMessageChannel errorMessageChannel = + channelResolver->resolveChannelName("errorChannel"); + + SmartPtrCMessageHandler messageHandler; + messageHandler.CreateInstance(); + messageHandler->initialize( + _id, + outputMessageChannel, + SmartPtrICafObject()); + + SmartPtrCErrorHandler errorHandler; + errorHandler.CreateInstance(); + errorHandler->initialize(channelResolver, errorMessageChannel); + + SmartPtrCSourcePollingChannelAdapter sourcePollingChannelAdapter; + sourcePollingChannelAdapter.CreateInstance(); + sourcePollingChannelAdapter->initialize( + messageHandler, persistenceReadingMessageSource, errorHandler); + + SmartPtrCSimpleAsyncTaskExecutor simpleAsyncTaskExecutor; + simpleAsyncTaskExecutor.CreateInstance(); + simpleAsyncTaskExecutor->initialize(sourcePollingChannelAdapter, errorHandler); + _taskExecutor = simpleAsyncTaskExecutor; +} + +void CPersistenceInboundChannelAdapterInstance::start( + const uint32 timeoutMs) { + CAF_CM_FUNCNAME_VALIDATE("start"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CAF_CM_LOG_DEBUG_VA0("Starting the executor"); + _taskExecutor->execute(timeoutMs); +} + +void CPersistenceInboundChannelAdapterInstance::stop( + const uint32 timeoutMs) { + CAF_CM_FUNCNAME_VALIDATE("stop"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CAF_CM_LOG_DEBUG_VA0("Stopping the executor"); + _taskExecutor->cancel(timeoutMs); +} + +bool CPersistenceInboundChannelAdapterInstance::isRunning() const { + CAF_CM_FUNCNAME_VALIDATE("isRunning"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const bool rc = (_taskExecutor->getState() == ITaskExecutor::ETaskStateStarted); + return rc; +} + +bool CPersistenceInboundChannelAdapterInstance::isMessageProducer() const { + CAF_CM_FUNCNAME_VALIDATE("isMessageProducer"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return true; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceInboundChannelAdapterInstance.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceInboundChannelAdapterInstance.h new file mode 100644 index 000000000..1b27c5f93 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceInboundChannelAdapterInstance.h @@ -0,0 +1,68 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CPersistenceInboundChannelAdapterInstance_h_ +#define CPersistenceInboundChannelAdapterInstance_h_ + +namespace Caf { + +class CPersistenceInboundChannelAdapterInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public ILifecycle, + public IMessageProducer { +public: + CPersistenceInboundChannelAdapterInstance(); + virtual ~CPersistenceInboundChannelAdapterInstance(); + +public: + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(ILifecycle) + CAF_QI_ENTRY(IMessageProducer) + CAF_END_QI() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ILifecycle + void start(const uint32 timeoutMs); + void stop(const uint32 timeoutMs); + bool isRunning() const; + +public: // IMessageProducer + bool isMessageProducer() const; + +private: + bool _isInitialized; + std::string _id; + SmartPtrIDocument _configSection; + SmartPtrITaskExecutor _taskExecutor; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CPersistenceInboundChannelAdapterInstance); +}; + +CAF_DECLARE_SMART_QI_POINTER(CPersistenceInboundChannelAdapterInstance); + +} + +#endif // #ifndef CPersistenceInboundChannelAdapterInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceMessageHandler.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceMessageHandler.cpp new file mode 100644 index 000000000..8eefe4d7b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceMessageHandler.cpp @@ -0,0 +1,84 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CPersistenceMessageHandler.h" + +using namespace Caf; + +CPersistenceMessageHandler::CPersistenceMessageHandler() : + _isInitialized(false), + _deleteSourceEntries(false), + CAF_CM_INIT_LOG("CPersistenceMessageHandler") { +} + +CPersistenceMessageHandler::~CPersistenceMessageHandler() { +} + +void CPersistenceMessageHandler::initialize( + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + + const std::string implClass = configSection->findRequiredAttribute("impl-class"); + _persistence.CreateInstance(implClass.c_str()); + _persistence->initialize(); + + const std::string deleteSourceEntriesStr = configSection->findOptionalAttribute( + "delete-source-entries"); + _deleteSourceEntries = (deleteSourceEntriesStr.empty() || deleteSourceEntriesStr.compare("false") == 0) ? false : true; + + _isInitialized = true; +} + +void CPersistenceMessageHandler::handleMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("handleMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + _savedMessage = message; + + const std::string payloadStr = message->getPayloadStr(); + const SmartPtrCPersistenceDoc persistence = + XmlRoots::parsePersistenceFromString(payloadStr); + _persistence->update(persistence); + + if (_deleteSourceEntries) { + ;//TODO: Delete entries like the localSecurity private key. + } +} + +SmartPtrIIntMessage CPersistenceMessageHandler::getSavedMessage() const { + CAF_CM_FUNCNAME_VALIDATE("getSavedMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _savedMessage; +} + +void CPersistenceMessageHandler::clearSavedMessage() { + CAF_CM_FUNCNAME_VALIDATE("clearSavedMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _savedMessage = NULL; +} + +SmartPtrIIntMessage CPersistenceMessageHandler::processErrorMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("processErrorMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + _savedMessage = message; + + //TODO: Verify that I'm receiving the error message and decide what + //to do with it. + + return SmartPtrIIntMessage(); +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceMessageHandler.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceMessageHandler.h new file mode 100644 index 000000000..9ab8712ac --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceMessageHandler.h @@ -0,0 +1,60 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _MaIntegration_CPersistenceMessageHandler_h_ +#define _MaIntegration_CPersistenceMessageHandler_h_ + +namespace Caf { + +class CPersistenceMessageHandler : + public IMessageHandler, + public IErrorProcessor { +public: + CPersistenceMessageHandler(); + virtual ~CPersistenceMessageHandler(); + +public: + CAF_BEGIN_QI() + CAF_QI_ENTRY(IMessageHandler) + CAF_QI_ENTRY(IErrorProcessor) + CAF_END_QI() + +public: + void initialize( + const SmartPtrIDocument& configSection); + +public: // IMessageHandler + void handleMessage( + const SmartPtrIIntMessage& message); + + SmartPtrIIntMessage getSavedMessage() const; + + void clearSavedMessage(); + +public: // IErrorProcessor + SmartPtrIIntMessage processErrorMessage( + const SmartPtrIIntMessage& message); + +private: + bool _isInitialized; + std::string _id; + bool _deleteSourceEntries; + SmartPtrIPersistence _persistence; + SmartPtrIIntMessage _savedMessage; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CPersistenceMessageHandler); +}; + +CAF_DECLARE_SMART_QI_POINTER(CPersistenceMessageHandler); + +} + +#endif // #ifndef _MaIntegration_CPersistenceMessageHandler_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceNamespaceDb.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceNamespaceDb.cpp new file mode 100644 index 000000000..b63cf14b1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceNamespaceDb.cpp @@ -0,0 +1,401 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CPersistenceNamespaceDb.h" +#include + +using namespace Caf; +using namespace std; + +#ifdef WIN32 + const string CPersistenceNamespaceDb::_NAMESPACE_DB_CMD_FILE = "VMwareNamespaceCmd.exe"; +#else + const string CPersistenceNamespaceDb::_NAMESPACE_DB_CMD_FILE = "vmware-namespace-cmd"; +#endif + +const string CPersistenceNamespaceDb::_NAMESPACE = "com.vmware.caf.guest.rw"; + +CPersistenceNamespaceDb::CPersistenceNamespaceDb() : + _isInitialized(false), + CAF_CM_INIT_LOG("CPersistenceNamespaceDb") { +} + +CPersistenceNamespaceDb::~CPersistenceNamespaceDb() { +} + +void CPersistenceNamespaceDb::initialize() { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + setCmd(); + _isInitialized = true; +} + +SmartPtrCPersistenceDoc CPersistenceNamespaceDb::getUpdated( + const int32 timeout) { + CAF_CM_FUNCNAME_VALIDATE("getUpdated"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + //If nothing has been updated, skip all of the unneeded work + string updates = getValue("updates"); + if (!updates.empty()) { + //EP Doc + string epPrivateKey = getValue("ep.private.key"); + string epCert = getValue("ep.cert"); + SmartPtrCLocalSecurityDoc endpoint; + endpoint.CreateInstance(); + endpoint->initialize(std::string(), epPrivateKey, epCert); + + //App collection + std::deque applicationCollectionInner; + string applications = getValue("applications"); + Cdeqstr appList = CStringUtils::split(applications, ','); + for (Cdeqstr::iterator it = appList.begin(); it != appList.end(); it++) { + string appKey = *it; + string appCmsCipher = getValue(appKey + ".cms.cipher"); + + std::deque cmsCertCollectionInner; + string appCmsCertChain = getValue(appKey + ".cms.cert_chain"); + Cdeqstr appCertList = CStringUtils::split(appCmsCertChain, ','); + for (Cdeqstr::iterator it = appCertList.begin(); it != appCertList.end(); it++) { + cmsCertCollectionInner.push_back(*it); + } + + SmartPtrCCertCollectionDoc cmsCertCollection; + cmsCertCollection.CreateInstance(); + cmsCertCollection->initialize(cmsCertCollectionInner); + + string appId = appKey; + string cmsCert = getValue(appKey + ".cms.cert"); + SmartPtrCRemoteSecurityDoc application; + application.CreateInstance(); + application->initialize(appId, "amqpBroker_default", cmsCert, appCmsCipher, cmsCertCollection); + + applicationCollectionInner.push_back(application); + } + + SmartPtrCRemoteSecurityCollectionDoc applicationCollection; + applicationCollection.CreateInstance(); + applicationCollection->initialize(applicationCollectionInner); + + string protocols = getValue("protocols"); + Cdeqstr protocolList = CStringUtils::split(protocols, ','); + std::deque amqpBrokerCollectionInner; + for (Cdeqstr::iterator it = protocolList.begin(); it != protocolList.end(); it++) { + string protocolKey = *it; + //Protoccol Doc + std::deque tlsCertCollectionInner; + string tlsCertChain = getValue(protocolKey + ".tls.cert.chain"); + Cdeqstr tlsCertList = CStringUtils::split(tlsCertChain, ','); + for (Cdeqstr::iterator it = tlsCertList.begin(); it != tlsCertList.end(); it++) { + tlsCertCollectionInner.push_back(*it); + } + + Cdeqstr tlsCipherCollection; + string tlsCiphers = getValue(protocolKey + ".tls.ciphers"); + Cdeqstr tlsCipherList = CStringUtils::split(tlsCiphers, ','); + for (Cdeqstr::iterator it = tlsCipherList.begin(); it != tlsCipherList.end(); it++) { + tlsCipherCollection.push_back(*it); + } + + SmartPtrCCertCollectionDoc tlsCertCollection; + tlsCertCollection.CreateInstance(); + tlsCertCollection->initialize(tlsCertCollectionInner); + + //For now, we only support one broker. + string amqpBrokerId = getValue(protocolKey + ".amqpBrokerId"); + string uri = getValue(protocolKey + ".uri"); + string tlsCert = getValue(protocolKey + ".tls.cert"); + string tlsProtocol = getValue(protocolKey + ".tls.protocol"); + SmartPtrCAmqpBrokerDoc amqpBroker; + amqpBroker.CreateInstance(); + amqpBroker->initialize(amqpBrokerId, uri, tlsCert, tlsProtocol, tlsCipherCollection, tlsCertCollection); + + amqpBrokerCollectionInner.push_back(amqpBroker); + } + + SmartPtrCAmqpBrokerCollectionDoc amqpBrokerCollection; + amqpBrokerCollection.CreateInstance(); + amqpBrokerCollection->initialize(amqpBrokerCollectionInner); + + SmartPtrCPersistenceProtocolDoc persistenceProtocol; + persistenceProtocol.CreateInstance(); + persistenceProtocol->initialize(amqpBrokerCollection); + + // Persist doc + SmartPtrCPersistenceDoc persistence; + persistence.CreateInstance(); + persistence->initialize(endpoint, applicationCollection, persistenceProtocol, "1.0"); + + return persistence; + } + else { + return SmartPtrCPersistenceDoc(); + } +} + +void CPersistenceNamespaceDb::update( + const SmartPtrCPersistenceDoc& persistenceDoc) { + CAF_CM_FUNCNAME("update"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(persistenceDoc); + + //Update LocalSecurity info + if (!persistenceDoc->getLocalSecurity().IsNull()){ + setValue("ep.private.key", persistenceDoc->getLocalSecurity()->getPrivateKey()); + setValue("ep.cert", persistenceDoc->getLocalSecurity()->getCert()); + } + + //Update RemoteSecurity info + if (!persistenceDoc->getRemoteSecurityCollection().IsNull()){ + deque applications = persistenceDoc->getRemoteSecurityCollection()->getRemoteSecurity(); + for (deque::iterator it=applications.begin(); it != applications.end(); it++) { + string appKey = (*it)->getRemoteId(); + setValue(appKey + ".cms.cert", (*it)->getCmsCert()); + //setValue(appKey + ".cms.cipher", (*it)->getCmsCipher()); + string cmsCertChain; + Cdeqstr cmsCertList = (*it)->getCmsCertCollection()->getCert(); + for (Cdeqstr::iterator it=cmsCertList.begin(); it != cmsCertList.end(); it++) { + if (!cmsCertChain.empty()) { + cmsCertChain += ","; + } + cmsCertChain += *it; + } + setValue(appKey + ".cms.cert_chain", cmsCertChain); + } + } + + //Update PersistenceProtocol info + if (!persistenceDoc->getPersistenceProtocol().IsNull()) { + //For now, we only support one broker. + CAF_CM_ASSERT(persistenceDoc->getPersistenceProtocol()->getAmqpBrokerCollection()->getAmqpBroker().size() <= 1); + + deque brokerList = persistenceDoc->getPersistenceProtocol()->getAmqpBrokerCollection()->getAmqpBroker(); + for (deque::iterator it=brokerList.begin(); it != brokerList.end(); it++) { + setValue("name", (*it)->getAmqpBrokerId()); + setValue("uri", (*it)->getUri()); + setValue("tls.cert", (*it)->getTlsCert()); + setValue("tls.protocol", (*it)->getTlsProtocol()); + Cdeqstr tlsCipherList = (*it)->getTlsCipherCollection(); + string tlsCiphers; + for (Cdeqstr::iterator it=tlsCipherList.begin(); it != tlsCipherList.end(); it++) { + if (!tlsCiphers.empty()) { + tlsCiphers += ","; + } + tlsCiphers += *it; + } + setValue("tls.ciphers", tlsCiphers); + } + } +} + +void CPersistenceNamespaceDb::remove( + const SmartPtrCPersistenceDoc& persistenceDoc) { + CAF_CM_FUNCNAME("remove"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + //Remove LocalSecurity info + if (!persistenceDoc->getLocalSecurity().IsNull()){ + if (!persistenceDoc->getLocalSecurity()->getPrivateKey().empty()) { + removeKey("ep.private.key"); + } + if (!persistenceDoc->getLocalSecurity()->getCert().empty()) { + removeKey("ep.cert"); + } + } + + //Remove RemoteSecurity info + if (!persistenceDoc->getRemoteSecurityCollection().IsNull()){ + deque applications = persistenceDoc->getRemoteSecurityCollection()->getRemoteSecurity(); + for (deque::iterator it=applications.begin(); it != applications.end(); it++) { + string appKey = (*it)->getRemoteId(); + removeKey(appKey + ".cms.cert"); + removeKey(appKey + ".cms.cert_chain"); + } + } + + //Remove PersistenceProtocol info + if (!persistenceDoc->getPersistenceProtocol().IsNull()) { + //For now, we only support one broker. + CAF_CM_ASSERT(persistenceDoc->getPersistenceProtocol()->getAmqpBrokerCollection()->getAmqpBroker().size() <= 1); + + deque brokerList = persistenceDoc->getPersistenceProtocol()->getAmqpBrokerCollection()->getAmqpBroker(); + for (deque::iterator it=brokerList.begin(); it != brokerList.end(); it++) { + if (!(*it)->getAmqpBrokerId().empty()) { + removeKey("name"); + } + if (!(*it)->getUri().empty()) { + removeKey("uri"); + } + if (!(*it)->getTlsCert().empty()) { + removeKey("tls.cert"); + } + if (!(*it)->getTlsProtocol().empty()) { + removeKey("tls.protocol"); + } + removeKey("tls.ciphers"); + } + } +} + +string CPersistenceNamespaceDb::getCmdPath() { +// CAF_CM_STATIC_FUNC("CPersistenceNamespaceDb", "getCmdPath"); +// "/usr/sbin/vmware-namespace-cmd"; + string cmdPath = "/usr/sbin"; +#ifdef WIN32 +// "C:/Program Files/VMware/VMware Tools/VMwareNamespaceCmd.exe"; +// bin_dir=C:/Program Files/VMware/VMware Tools/VMware CAF/pme//bin + cmdPath = AppConfigUtils::getRequiredString("globals", "bin_dir"); + //Back up two levels + cmdPath = FileSystemUtils::getDirname(cmdPath); + cmdPath = FileSystemUtils::getDirname(cmdPath); +#endif + return cmdPath; +} + +void CPersistenceNamespaceDb::setCmd() { + CAF_CM_FUNCNAME("setCmd"); + _namespaceDbCmd = FileSystemUtils::buildPath(getCmdPath(), _NAMESPACE_DB_CMD_FILE); + CAF_CM_LOG_DEBUG_VA1("_namespaceDbCmd: %s", _namespaceDbCmd.c_str()); + if (!FileSystemUtils::doesFileExist(_namespaceDbCmd)) { + CAF_CM_EXCEPTIONEX_VA1(FileNotFoundException, ERROR_FILE_NOT_FOUND, + "Namespace DB command not found - %s", _namespaceDbCmd.c_str()); + } +} + +string CPersistenceNamespaceDb::getValue(const std::string& key) { + CAF_CM_FUNCNAME("getValue"); + CAF_CM_VALIDATE_STRING(key); + + string value; + string stdoutContent; + string stderrContent; + Cdeqstr argv; + + try { + argv.push_back(_namespaceDbCmd); + argv.push_back("get-value"); + argv.push_back(_NAMESPACE); + argv.push_back("-k"); + argv.push_back(key); + + ProcessUtils::runSync(argv, stdoutContent, stderrContent); + value = stdoutContent; + + //strip spaces + value = CStringUtils::trim(value); + //strip quotes + //TODO: make this less of a hack and add it to StringUtils + if (value.length() > 1) { + if (value[0] == '"') + value.erase(0,1); + if (value[value.length()-1] == '"') + value.erase(value.length()-1,1); + } + //TODO: parse hash from nsdb value + string hash = value; //As a temporary hack, use the entire value as the "hash" + //if hash has not changed, return empty + if (cache[key] == hash) { + CAF_CM_LOG_DEBUG_VA1("Value for %s has not changed", key.c_str()); + value = ""; + } + else { + //if hash has changed, update key+hash cache and return value + CAF_CM_LOG_DEBUG_VA1("Value for %s has changed", key.c_str()); + cache[key] = hash; + } + } + catch(ProcessFailedException* ex){ + CAF_CM_LOG_DEBUG_VA1("exception: %s", ex->getMsg().c_str()); + CAF_CM_EXCEPTION_VA3(E_UNEXPECTED, + "NamespaceDB command failed - %s: %s: %s", + ex->getMsg().c_str(), + stdoutContent.c_str(), + stderrContent.c_str()); + } + return value; +} + +void CPersistenceNamespaceDb::setValue(const std::string& key, const std::string& value) { + CAF_CM_FUNCNAME("setValue"); + CAF_CM_VALIDATE_STRING(key); + + if (value.empty()) { + return; + } + + string stdoutContent; + string stderrContent; + Cdeqstr argv; + string tmpFile; + + try { + //TODO: generate hash of value + //TODO: prepend delimitted hash to value + + tmpFile = FileSystemUtils::saveTempTextFile("caf_nsdb_XXXXXX", value); + CAF_CM_LOG_DEBUG_VA2("Setting %s to %s", key.c_str(), value.c_str()); + argv.push_back(_namespaceDbCmd); + argv.push_back("set-key"); + argv.push_back(_NAMESPACE); + argv.push_back("-k"); + argv.push_back(key); + argv.push_back("-f"); + argv.push_back(value); + + ProcessUtils::runSync(argv, stdoutContent, stderrContent); + //Add to key+hash cache + //TODO: generate a hash of the value string + cache[key] = value; //As a temporary hack use the entire value as the "hash" + } + catch(ProcessFailedException* ex){ + CAF_CM_LOG_DEBUG_VA1("exception: %s", ex->getMsg().c_str()); + CAF_CM_EXCEPTION_VA3(E_UNEXPECTED, + "NamespaceDB command failed - %s: %s: %s", + ex->getMsg().c_str(), + stdoutContent.c_str(), + stderrContent.c_str()); + } + if ( !tmpFile.empty() && FileSystemUtils::doesFileExist(tmpFile)) { + FileSystemUtils::removeFile(tmpFile); + } +} + +void CPersistenceNamespaceDb::removeKey(const std::string& key) { + CAF_CM_FUNCNAME("removeKey"); + CAF_CM_VALIDATE_STRING(key); + + string stdoutContent; + string stderrContent; + Cdeqstr argv; + + try { + argv.push_back(_namespaceDbCmd); + argv.push_back("delete-key"); + argv.push_back(_NAMESPACE); + argv.push_back("-k"); + argv.push_back(key); + + ProcessUtils::runSync(argv, stdoutContent, stderrContent); + + //Remove from cache + Cmapstrstr::iterator it = cache.find(key); + if (it != cache.end()) { + cache.erase(it); + } + } + catch(ProcessFailedException* ex){ + CAF_CM_LOG_DEBUG_VA1("exception: %s", ex->getMsg().c_str()); + CAF_CM_EXCEPTION_VA3(E_UNEXPECTED, + "NamespaceDB command failed - %s: %s: %s", + ex->getMsg().c_str(), + stdoutContent.c_str(), + stderrContent.c_str()); + } +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceNamespaceDb.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceNamespaceDb.h new file mode 100644 index 000000000..7a46fe6cd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceNamespaceDb.h @@ -0,0 +1,60 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _MaIntegration_CPersistenceNamespaceDb_h_ +#define _MaIntegration_CPersistenceNamespaceDb_h_ + +using namespace Caf; + +/// TODO - describe class +class CPersistenceNamespaceDb : + public TCafSubSystemObjectRoot, + public IPersistence { +public: + CPersistenceNamespaceDb(); + virtual ~CPersistenceNamespaceDb(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdPersistenceNamespaceDb) + + CAF_BEGIN_INTERFACE_MAP(CPersistenceNamespaceDb) + CAF_INTERFACE_ENTRY(IPersistence) + CAF_END_INTERFACE_MAP() + +public: // IPersistence + void initialize(); + + SmartPtrCPersistenceDoc getUpdated( + const int32 timeout); + + void update( + const SmartPtrCPersistenceDoc& persistence); + + void remove( + const SmartPtrCPersistenceDoc& persistence); + +private: + static std::string getCmdPath(); + void setCmd(); + std::string getValue(const std::string& key); + void setValue(const std::string& key, const std::string& value); + void removeKey(const std::string& key); + +private: + bool _isInitialized; + static const std::string _NAMESPACE_DB_CMD_FILE; + static const std::string _NAMESPACE; + std::string _namespaceDbCmd; + Cmapstrstr cache; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CPersistenceNamespaceDb); +}; + +#endif // #ifndef _MaIntegration_CPersistenceNamespaceDb_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceOutboundChannelAdapterInstance.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceOutboundChannelAdapterInstance.cpp new file mode 100644 index 000000000..ad4335d7f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceOutboundChannelAdapterInstance.cpp @@ -0,0 +1,100 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CPersistenceOutboundChannelAdapterInstance.h" + +using namespace Caf; + +CPersistenceOutboundChannelAdapterInstance::CPersistenceOutboundChannelAdapterInstance() : + _isInitialized(false), + _isRunning(false), + CAF_CM_INIT_LOG("CPersistenceOutboundChannelAdapterInstance") { +} + +CPersistenceOutboundChannelAdapterInstance::~CPersistenceOutboundChannelAdapterInstance() { +} + +void CPersistenceOutboundChannelAdapterInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + _configSection = configSection; + + _isInitialized = true; +} + +std::string CPersistenceOutboundChannelAdapterInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _id; +} + +void CPersistenceOutboundChannelAdapterInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + + const SmartPtrIMessageChannel errorMessageChannel = + channelResolver->resolveChannelName("errorChannel"); + + const std::string inputChannelStr = _configSection->findRequiredAttribute("channel"); + SmartPtrIMessageChannel inputChannel = channelResolver->resolveChannelName(inputChannelStr); + SmartPtrIIntegrationObject inputChannelObj; + inputChannelObj.QueryInterface(inputChannel); + + SmartPtrCPersistenceMessageHandler persistenceMessageHandler; + persistenceMessageHandler.CreateInstance(); + persistenceMessageHandler->initialize(_configSection); + SmartPtrIMessageHandler messageHandler; + messageHandler.QueryInterface(persistenceMessageHandler); + + _messagingTemplate.CreateInstance(); + _messagingTemplate->initialize( + channelResolver, + inputChannelObj, + errorMessageChannel, + SmartPtrIMessageChannel(), + messageHandler); +} + +void CPersistenceOutboundChannelAdapterInstance::start( + const uint32 timeoutMs) { + CAF_CM_FUNCNAME_VALIDATE("start"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_BOOL(!_isRunning); + + _isRunning = true; + _messagingTemplate->start(0); +} + +void CPersistenceOutboundChannelAdapterInstance::stop( + const uint32 timeoutMs) { + CAF_CM_FUNCNAME_VALIDATE("stop"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_BOOL(_isRunning); + + _isRunning = false; + _messagingTemplate->stop(0); +} + +bool CPersistenceOutboundChannelAdapterInstance::isRunning() const { + CAF_CM_FUNCNAME_VALIDATE("isRunning"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _isRunning; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceOutboundChannelAdapterInstance.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceOutboundChannelAdapterInstance.h new file mode 100644 index 000000000..d9be026b8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceOutboundChannelAdapterInstance.h @@ -0,0 +1,64 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CPersistenceOutboundChannelAdapterInstance_h_ +#define CPersistenceOutboundChannelAdapterInstance_h_ + +namespace Caf { + +class CPersistenceOutboundChannelAdapterInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public ILifecycle { +public: + CPersistenceOutboundChannelAdapterInstance(); + virtual ~CPersistenceOutboundChannelAdapterInstance(); + + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(ILifecycle) + CAF_END_QI() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ILifecycle + void start(const uint32 timeoutMs); + + void stop(const uint32 timeoutMs); + + bool isRunning() const; + +private: + bool _isInitialized; + bool _isRunning; + std::string _id; + SmartPtrIDocument _configSection; + SmartPtrCMessagingTemplate _messagingTemplate; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CPersistenceOutboundChannelAdapterInstance); +}; + +CAF_DECLARE_SMART_QI_POINTER(CPersistenceOutboundChannelAdapterInstance); +} + +#endif // #ifndef CPersistenceOutboundChannelAdapterInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceReadingMessageSource.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceReadingMessageSource.cpp new file mode 100644 index 000000000..383a652d8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceReadingMessageSource.cpp @@ -0,0 +1,110 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CPersistenceReadingMessageSource.h" + +using namespace Caf; + +CPersistenceReadingMessageSource::CPersistenceReadingMessageSource() : + _isInitialized(false), + _refreshSec(0), + _lastRefreshSec(0), + CAF_CM_INIT_LOG("CPersistenceReadingMessageSource") { +} + +CPersistenceReadingMessageSource::~CPersistenceReadingMessageSource() { +} + +void CPersistenceReadingMessageSource::initialize( + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + const std::string implClass = configSection->findRequiredAttribute("impl-class"); + const SmartPtrIDocument pollerDoc = configSection->findOptionalChild("poller"); + + SmartPtrIPersistence persistence; + persistence.CreateInstance(implClass.c_str()); + try { + persistence->initialize(); + _persistence = persistence; + } + CAF_CM_CATCH_CAF + CAF_CM_CATCH_DEFAULT + CAF_CM_LOG_CRIT_CAFEXCEPTION; + + setPollerMetadata(pollerDoc); + _refreshSec = 0; + + _isInitialized = true; +} + +bool CPersistenceReadingMessageSource::doSend( + const SmartPtrIIntMessage&, + int32) { + CAF_CM_FUNCNAME("doSend"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CAF_CM_EXCEPTIONEX_VA1( + UnsupportedOperationException, + E_NOTIMPL, + "This is not a sending channel: %s", _id.c_str()); +} + +SmartPtrIIntMessage CPersistenceReadingMessageSource::doReceive( + const int32 timeout) { + CAF_CM_FUNCNAME("receive"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + if (timeout > 0) { + CAF_CM_EXCEPTIONEX_VA1(UnsupportedOperationException, E_INVALIDARG, + "Timeout not currently supported: %s", _id.c_str()); + } + + SmartPtrIIntMessage message; + if (! _persistence.IsNull()) { + const SmartPtrCPersistenceDoc persistence = _persistence->getUpdated(0); + if (! persistence.IsNull()) { + SmartPtrCIntMessage messageImpl; + messageImpl.CreateInstance(); + messageImpl->initializeStr(XmlRoots::savePersistenceToString(persistence), + IIntMessage::SmartPtrCHeaders(), IIntMessage::SmartPtrCHeaders()); + message = messageImpl; + } + } + + return message; +} + +bool CPersistenceReadingMessageSource::isRefreshNecessary( + const uint32 refreshSec, + const uint64 lastRefreshSec) const { + bool rc = false; + + if (refreshSec == 0) { + rc = true; + } else { + const uint64 currentTimeSec = getTimeSec(); + if ((currentTimeSec - lastRefreshSec) > refreshSec) { + rc = true; + } + } + + return rc; +} + +uint64 CPersistenceReadingMessageSource::getTimeSec() const { + GTimeVal curTime; + ::g_get_current_time(&curTime); + uint64 rc = curTime.tv_sec; + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceReadingMessageSource.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceReadingMessageSource.h new file mode 100644 index 000000000..e79acf9bd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceReadingMessageSource.h @@ -0,0 +1,60 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _MaIntegration_CPersistenceReadingMessageSource_h_ +#define _MaIntegration_CPersistenceReadingMessageSource_h_ + +namespace Caf { + +class CPersistenceReadingMessageSource : + public CAbstractPollableChannel { +private: + typedef std::map CFileCollection; + CAF_DECLARE_SMART_POINTER(CFileCollection); + +public: + CPersistenceReadingMessageSource(); + virtual ~CPersistenceReadingMessageSource(); + +public: + void initialize( + const SmartPtrIDocument& configSection); + +protected: // CAbstractPollableChannel + bool doSend( + const SmartPtrIIntMessage& message, + int32 timeout); + + SmartPtrIIntMessage doReceive(const int32 timeout); + +private: + uint64 getTimeSec() const; + + bool isRefreshNecessary( + const uint32 refreshSec, + const uint64 lastRefreshSec) const; + +private: + bool _isInitialized; + std::string _id; + uint32 _refreshSec; + uint64 _lastRefreshSec; + + SmartPtrIPersistence _persistence; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CPersistenceReadingMessageSource); +}; + +CAF_DECLARE_SMART_POINTER(CPersistenceReadingMessageSource); + +} + +#endif // #ifndef _MaIntegration_CPersistenceReadingMessageSource_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderCollectSchemaExecutor.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderCollectSchemaExecutor.cpp new file mode 100644 index 000000000..50f6cf33e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderCollectSchemaExecutor.cpp @@ -0,0 +1,330 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CProviderCollectSchemaExecutor.h" + +using namespace Caf; + +CProviderCollectSchemaExecutor::CProviderCollectSchemaExecutor() : + _isInitialized(false), + CAF_CM_INIT_LOG("CProviderCollectSchemaExecutor") { +} + +CProviderCollectSchemaExecutor::~CProviderCollectSchemaExecutor() { +} + +void CProviderCollectSchemaExecutor::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + CAF_CM_VALIDATE_STL_EMPTY(properties); + + const std::string schemaCacheDirPath = AppConfigUtils::getRequiredString( + _sProviderHostArea, _sConfigSchemaCacheDir); + const std::string schemaCacheDirPathExp = CStringUtils::expandEnv(schemaCacheDirPath); + if (!FileSystemUtils::doesDirectoryExist(schemaCacheDirPathExp)) { + CAF_CM_LOG_INFO_VA1( + "Schema cache directory does not exist... creating - %s", + schemaCacheDirPathExp.c_str()); + FileSystemUtils::createDirectory(schemaCacheDirPathExp); + } + + const std::string invokersDir = AppConfigUtils::getRequiredString( + _sProviderHostArea, _sConfigInvokersDir); + const std::string invokersDirExp = CStringUtils::expandEnv(invokersDir); + if (!FileSystemUtils::doesDirectoryExist(invokersDirExp)) { + CAF_CM_LOG_INFO_VA1( + "Invokers directory does not exist... creating - %s", + invokersDirExp.c_str()); + FileSystemUtils::createDirectory(invokersDirExp); + } + + _schemaCacheDirPath = schemaCacheDirPathExp; + _invokersDir = invokersDirExp; + _isInitialized = true; +} + +void CProviderCollectSchemaExecutor::terminateBean() { + +} + +SmartPtrIIntMessage CProviderCollectSchemaExecutor::processMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("processMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + CAF_CM_LOG_DEBUG_VA2("Called - schemaCacheDirPath: %s, invokersDir: %s", + _schemaCacheDirPath.c_str(), _invokersDir.c_str()); + + SmartPtrCLoggingSetter loggingSetter; + loggingSetter.CreateInstance(); + + const SmartPtrCProviderRegDoc providerReg = + CCafMessagePayloadParser::getProviderReg(message->getPayload()); + + const std::string providerNamespace = providerReg->getProviderNamespace(); + const std::string providerName = providerReg->getProviderName(); + const std::string providerVersion = providerReg->getProviderVersion(); + + std::string providerVersionNew = providerVersion; + std::replace(providerVersionNew.begin(), providerVersionNew.end(), '.', '_'); + + const std::string providerDirName = + providerNamespace + "_" + providerName + "_" + providerVersionNew; + const std::string providerSchemaCacheDir = + FileSystemUtils::buildPath(_schemaCacheDirPath, providerDirName); + const std::string providerResponsePath = + FileSystemUtils::buildPath(providerSchemaCacheDir, _sProviderResponseFilename); + + executeProvider(providerReg, _invokersDir, providerSchemaCacheDir, + providerResponsePath, loggingSetter); + + const std::string relFilename = + FileSystemUtils::buildPath(providerDirName, _sProviderResponseFilename); + const SmartPtrCDynamicByteArray providerResponse = + FileSystemUtils::loadByteFile(providerResponsePath); + + return CCafMessageCreator::createFromProviderResponse( + providerResponse, relFilename, message->getHeaders()); +} + +void CProviderCollectSchemaExecutor::executeProvider( + const SmartPtrCProviderRegDoc& providerReg, + const std::string& invokersDir, + const std::string& providerSchemaCacheDir, + const std::string& providerResponsePath, + SmartPtrCLoggingSetter& loggingSetter) const { + CAF_CM_FUNCNAME("executeProvider"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(providerReg); + CAF_CM_VALIDATE_STRING(invokersDir); + CAF_CM_VALIDATE_STRING(providerSchemaCacheDir); + CAF_CM_VALIDATE_STRING(providerResponsePath); + CAF_CM_VALIDATE_SMARTPTR(loggingSetter); + + const std::string providerNamespace = providerReg->getProviderNamespace(); + const std::string providerName = providerReg->getProviderName(); + const std::string providerVersion = providerReg->getProviderVersion(); + const std::string invokerRelPath = providerReg->getInvokerRelPath(); + + const std::string schemaSummaryPath = + FileSystemUtils::buildPath(providerSchemaCacheDir, _sSchemaSummaryFilename); + + if (FileSystemUtils::doesFileExist(schemaSummaryPath)) { + CAF_CM_LOG_INFO_VA1( + "Schema summary file already exists - %s", schemaSummaryPath.c_str()); + } else { + std::string invokerPath; + if (! invokerRelPath.empty()) { + const std::string invokerRelPathExp = CStringUtils::expandEnv(invokerRelPath); + invokerPath = FileSystemUtils::buildPath(invokersDir, invokerRelPathExp); + + if (!FileSystemUtils::doesFileExist(invokerPath)) { + CAF_CM_EXCEPTIONEX_VA1(FileNotFoundException, ERROR_FILE_NOT_FOUND, + "Invoker does not exist - %s", invokerPath.c_str()); + } + + setupSchemaCacheDir(providerSchemaCacheDir, loggingSetter); + runProvider(invokerPath, providerSchemaCacheDir); + } else { + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Unrecognized provider URI protocol in Provider Registration file - %s", providerName.c_str()); + } + + const std::string schemaPath = findSchemaPath(providerResponsePath); + const SmartPtrCSchemaSummaryDoc schemaSummary = createSchemaSummary( + schemaPath, invokerPath, providerNamespace, providerName, providerVersion); + + const std::string schemaSummaryMem = XmlRoots::saveSchemaSummaryToString(schemaSummary); + FileSystemUtils::saveTextFile(schemaSummaryPath, schemaSummaryMem); + } +} + +void CProviderCollectSchemaExecutor::setupSchemaCacheDir( + const std::string& providerSchemaCacheDir, + const SmartPtrCLoggingSetter& loggingSetter) const { + CAF_CM_FUNCNAME_VALIDATE("setupSchemaCacheDir"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(providerSchemaCacheDir); + CAF_CM_VALIDATE_SMARTPTR(loggingSetter); + + if (FileSystemUtils::doesDirectoryExist(providerSchemaCacheDir)) { + CAF_CM_LOG_INFO_VA1( + "Removing the schema cache directory because it appears to be incomplete - %s", + providerSchemaCacheDir.c_str()); + FileSystemUtils::recursiveRemoveDirectory(providerSchemaCacheDir); + } + + FileSystemUtils::createDirectory(providerSchemaCacheDir); + + if (AppConfigUtils::getRequiredBoolean("managementAgent", "remap_logging_location")) { + loggingSetter->initialize(providerSchemaCacheDir); + } +} + +void CProviderCollectSchemaExecutor::runProvider( + const std::string& invokerPath, + const std::string& providerSchemaCacheDir) const { + CAF_CM_FUNCNAME_VALIDATE("runProvider"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(invokerPath); + CAF_CM_VALIDATE_STRING(providerSchemaCacheDir); + + CAF_CM_LOG_DEBUG_VA2( + "Executing the command - %s --schema -o %s", + invokerPath.c_str(), providerSchemaCacheDir.c_str()); + + std::string newProviderSchemaCacheDir = FileSystemUtils::normalizePathWithForward( + providerSchemaCacheDir); + + Cdeqstr argv; + argv.push_back(invokerPath); + argv.push_back("--schema"); + argv.push_back("-o"); + argv.push_back(newProviderSchemaCacheDir); + + const std::string stdoutPath = FileSystemUtils::buildPath( + newProviderSchemaCacheDir, _sStdoutFilename); + const std::string stderrPath = FileSystemUtils::buildPath( + newProviderSchemaCacheDir, _sStderrFilename); + + ProcessUtils::runSyncToFiles(argv, stdoutPath, stderrPath); +} + +SmartPtrCSchemaSummaryDoc CProviderCollectSchemaExecutor::createSchemaSummary( + const std::string& schemaPath, + const std::string& invokerPath, + const std::string& providerNamespace, + const std::string& providerName, + const std::string& providerVersion) const { + CAF_CM_FUNCNAME_VALIDATE("createSchemaSummary"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(schemaPath); + CAF_CM_VALIDATE_STRING(invokerPath); + CAF_CM_VALIDATE_STRING(providerNamespace); + CAF_CM_VALIDATE_STRING(providerName); + CAF_CM_VALIDATE_STRING(providerVersion); + + std::deque fqcCollection; + + const std::string schemaMem = FileSystemUtils::loadTextFile(schemaPath); + const SmartPtrCSchemaDoc schema = XmlRoots::parseSchemaFromString(schemaMem); + + const std::deque dataClassCollection = schema->getDataClassCollection(); + for (TConstIterator > dataClassIter(dataClassCollection); + dataClassIter; dataClassIter++) { + const SmartPtrCDataClassDoc dataClass = *dataClassIter; + + SmartPtrCFullyQualifiedClassGroupDoc fqc; + fqc.CreateInstance(); + fqc->initialize(dataClass->getNamespaceVal(), dataClass->getName(), dataClass->getVersion()); + + fqcCollection.push_back(fqc); + } + + const std::deque actionClassCollection = schema->getActionClassCollection(); + for (TConstIterator > actionClassIter(actionClassCollection); + actionClassIter; actionClassIter++) { + const SmartPtrCActionClassDoc actionClass = *actionClassIter; + + SmartPtrCFullyQualifiedClassGroupDoc fqc; + fqc.CreateInstance(); + fqc->initialize(actionClass->getNamespaceVal(), actionClass->getName(), actionClass->getVersion()); + + fqcCollection.push_back(fqc); + } + + SmartPtrCClassCollectionDoc classCollection; + classCollection.CreateInstance(); + classCollection->initialize(fqcCollection); + + SmartPtrCSchemaSummaryDoc schemaSummary; + schemaSummary.CreateInstance(); + schemaSummary->initialize(providerNamespace, providerName, providerVersion, + classCollection, invokerPath); + + return schemaSummary; +} + +std::string CProviderCollectSchemaExecutor::findSchemaPath( + const std::string& providerResponsePath) const { + CAF_CM_FUNCNAME("findSchemaPath"); + CAF_CM_VALIDATE_STRING(providerResponsePath); + + const std::string providerResponseMem = FileSystemUtils::loadTextFile(providerResponsePath); + const SmartPtrCProviderResponseDoc providerResponse = + XmlRoots::parseProviderResponseFromString(providerResponseMem); + + std::string schemaPath; + const SmartPtrCAttachmentCollectionDoc attachmentCollection = providerResponse->getAttachmentCollection(); + if (attachmentCollection.IsNull()) { + CAF_CM_LOG_INFO_VA1( + "Provider response doesn't contain an attachment collection - %s", + providerResponsePath.c_str()); + } else { + const std::deque attachmentCollectionInner = attachmentCollection->getAttachment(); + if (attachmentCollectionInner.empty()) { + CAF_CM_LOG_INFO_VA1( + "Provider response contains an empty attachment collection - %s", + providerResponsePath.c_str()); + } else { + for(TConstIterator > attachmentIter(attachmentCollectionInner); + attachmentIter; attachmentIter++) { + const SmartPtrCAttachmentDoc attachment = *attachmentIter; + const std::string attachmentName = attachment->getName(); + const std::string attachmentType = attachment->getType(); + + if((attachmentType.compare("cdif") == 0) && + (attachmentName.find("-collectSchema-") != std::string::npos)) { + if(! schemaPath.empty()) { + CAF_CM_EXCEPTIONEX_VA3(DuplicateElementException, ERROR_ALREADY_EXISTS, + "Found multiple schema files - \"%s\" and \"%s\" in %s", + attachmentName.c_str(), schemaPath.c_str(), providerResponsePath.c_str()); + } + + const std::string attachmentUri = attachment->getUri(); + + UriUtils::SUriRecord uriRecord; + UriUtils::parseUriString(attachmentUri, uriRecord); + + if(uriRecord.protocol.compare("file") != 0) { + CAF_CM_EXCEPTIONEX_VA3(InvalidArgumentException, ERROR_INVALID_DATA, + "Unsupported protocol (%s != \"file\") - %s in %s", + uriRecord.protocol.c_str(), attachmentUri.c_str(), providerResponsePath.c_str()); + } + + UriUtils::SFileUriRecord fileUriRecord; + UriUtils::parseFileAddress(uriRecord.address, fileUriRecord); + + schemaPath = CStringUtils::expandEnv(fileUriRecord.path); + if(! FileSystemUtils::doesFileExist(schemaPath)) { + CAF_CM_EXCEPTIONEX_VA2(FileNotFoundException, ERROR_FILE_NOT_FOUND, + "Schema file not found - %s in manifest %s", + schemaPath.c_str(), providerResponsePath.c_str()); + } + } else { + CAF_CM_LOG_DEBUG_VA3( + "Provider response attachment is not a cdif collectSchema - type: %s, name: %s, path: %s", + attachmentType.c_str(), attachmentName.c_str(), + providerResponsePath.c_str()); + } + } + } + } + + if(schemaPath.empty()) { + CAF_CM_EXCEPTIONEX_VA1(FileNotFoundException, ERROR_FILE_NOT_FOUND, + "Schema not found in manifest - %s", providerResponsePath.c_str()); + } + + return schemaPath; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderCollectSchemaExecutor.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderCollectSchemaExecutor.h new file mode 100644 index 000000000..4612b2626 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderCollectSchemaExecutor.h @@ -0,0 +1,78 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CProviderCollectSchemaExecutor_h_ +#define CProviderCollectSchemaExecutor_h_ + +using namespace Caf; + +/// TODO - describe class +class CProviderCollectSchemaExecutor : + public TCafSubSystemObjectRoot, + public IBean, + public IMessageProcessor { +public: + CProviderCollectSchemaExecutor(); + virtual ~CProviderCollectSchemaExecutor(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdProviderCollectSchemaExecutor) + + CAF_BEGIN_INTERFACE_MAP(CProviderCollectSchemaExecutor) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IMessageProcessor) + CAF_END_INTERFACE_MAP() + +public: // IBean + virtual void initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties); + + virtual void terminateBean(); + +public: // IMessageProcessor + SmartPtrIIntMessage processMessage( + const SmartPtrIIntMessage& message); + +private: + void executeProvider( + const SmartPtrCProviderRegDoc& providerReg, + const std::string& invokersDir, + const std::string& providerSchemaCacheDir, + const std::string& providerResponsePath, + SmartPtrCLoggingSetter& loggingSetter) const; + + void setupSchemaCacheDir( + const std::string& providerSchemaCacheDir, + const SmartPtrCLoggingSetter& loggingSetter) const; + + void runProvider( + const std::string& invokerPath, + const std::string& providerSchemaCacheDir) const; + + SmartPtrCSchemaSummaryDoc createSchemaSummary( + const std::string& schemaPath, + const std::string& invokerPath, + const std::string& providerNamespace, + const std::string& providerName, + const std::string& providerVersion) const; + + std::string findSchemaPath( + const std::string& providerResponsePath) const; + +private: + bool _isInitialized; + std::string _schemaCacheDirPath; + std::string _invokersDir; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CProviderCollectSchemaExecutor); +}; + +#endif // #ifndef CProviderCollectSchemaExecutor_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderExecutor.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderExecutor.cpp new file mode 100644 index 000000000..9b0ef34ca --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderExecutor.cpp @@ -0,0 +1,133 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CProviderExecutor.h" + +using namespace Caf; + +CProviderExecutor::CProviderExecutor() : + _isInitialized(false), + CAF_CM_INIT_LOG("CProviderExecutor") { +} + +CProviderExecutor::~CProviderExecutor() { +} + +void CProviderExecutor::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + + IBean::Cprops::const_iterator itr = properties.find("beginImpersonationBeanRef"); + if (itr != properties.end()) { + _beginImpersonationBeanId = itr->second; + } + + itr = properties.find("endImpersonationBeanRef"); + if (itr != properties.end()) { + _endImpersonationBeanId = itr->second; + } + + _isInitialized = true; +} + +void CProviderExecutor::terminateBean() { +} + +void CProviderExecutor::wire(const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + + CAF_CM_FUNCNAME_VALIDATE("wire"); + + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + + if (AppConfigUtils::getOptionalBoolean(_sManagementAgentArea, "use_impersonation")) { + _beginImpersonationTransformer = loadTransformer(_beginImpersonationBeanId, appContext, channelResolver); + _endImpersonationTransformer = loadTransformer(_endImpersonationBeanId, appContext, channelResolver); + } + + SmartPtrCErrorHandler errorHandler; + errorHandler.CreateInstance(); + errorHandler->initialize(channelResolver, channelResolver->resolveChannelName("errorChannel")); + _errorHandler = errorHandler; +} + +SmartPtrITransformer CProviderExecutor::loadTransformer( + const std::string& id, + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + + CAF_CM_FUNCNAME("loadTransformer"); + + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_STRING(id); + + SmartPtrITransformer transformer; + if (!id.empty()) { + const SmartPtrIBean bean = appContext->getBean(id); + SmartPtrIIntegrationComponent integrationComponent; + integrationComponent.QueryInterface(bean, false); + if (!integrationComponent) { + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, 0, + "Bean is not an integration component - %s", id.c_str()); + } + + SmartPtrIDocument configSection; + SmartPtrIIntegrationObject integrationObject; + integrationObject = integrationComponent->createObject(configSection); + + SmartPtrIIntegrationComponentInstance integrationComponentInstance; + integrationComponentInstance.QueryInterface(integrationObject, false); + if (!integrationComponentInstance.IsNull()) { + integrationComponentInstance->wire(appContext, channelResolver); + } + + transformer.QueryInterface(integrationObject, false); + CAF_CM_VALIDATE_INTERFACE(transformer); + } + return transformer; +} + +void CProviderExecutor::handleMessage(const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("handleMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(message); + + CAF_CM_LOG_DEBUG_VA0("Called"); + + SmartPtrCProviderExecutorRequest executorRequest; + executorRequest.CreateInstance(); + executorRequest->initialize(message); + + const std::string& providerUri = executorRequest->getProviderUri(); + SmartPtrCProviderExecutorRequestHandler handler = _handlers[providerUri]; + if (handler == NULL) { + SmartPtrCProviderExecutorRequestHandler requestHandler; + requestHandler.CreateInstance(); + requestHandler->initialize(providerUri, _beginImpersonationTransformer, + _endImpersonationTransformer, _errorHandler); + _handlers[providerUri] = requestHandler; + handler = requestHandler; + } + handler->handleRequest(executorRequest); +} + +SmartPtrIIntMessage CProviderExecutor::getSavedMessage() const { + return NULL; +} + +void CProviderExecutor::clearSavedMessage() { +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderExecutor.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderExecutor.h new file mode 100644 index 000000000..d4eb6b41a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderExecutor.h @@ -0,0 +1,71 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CProviderExecutor_h_ +#define CProviderExecutor_h_ + +using namespace Caf; + +/// TODO - describe class +class CProviderExecutor : + public TCafSubSystemObjectRoot, + public IBean, + public IIntegrationComponentInstance, + public IMessageHandler { + +public: + CProviderExecutor(); + virtual ~CProviderExecutor(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdProviderExecutor) + + CAF_BEGIN_INTERFACE_MAP(CProviderExecutor) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IIntegrationComponentInstance) + CAF_INTERFACE_ENTRY(IMessageHandler) + CAF_END_INTERFACE_MAP() + +public: // IBean + virtual void initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties); + + virtual void terminateBean(); + +public: // IIntegrationComponentInstance + virtual void wire(const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // IMessageHandler + virtual void handleMessage(const SmartPtrIIntMessage& message); + SmartPtrIIntMessage getSavedMessage() const; + void clearSavedMessage(); + +private: + SmartPtrITransformer loadTransformer( + const std::string& id, + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +private: + bool _isInitialized; + std::map _handlers; + std::string _beginImpersonationBeanId; + std::string _endImpersonationBeanId; + SmartPtrITransformer _beginImpersonationTransformer; + SmartPtrITransformer _endImpersonationTransformer; + SmartPtrIErrorHandler _errorHandler; + + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CProviderExecutor); +}; + +#endif // #ifndef CProviderExecutor_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderExecutorRequest.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderExecutorRequest.cpp new file mode 100644 index 000000000..23b6017c5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderExecutorRequest.cpp @@ -0,0 +1,80 @@ +/* + * Author: brets + * Created: Nov 20, 2015 + * + * Copyright (c) 2015 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CProviderExecutor.h" + +using namespace Caf; + +CProviderExecutorRequest::CProviderExecutorRequest() : + _isInitialized(false), + CAF_CM_INIT_LOG("CProviderExecutorRequest") { +} + +CProviderExecutorRequest::~CProviderExecutorRequest() { +} + +void CProviderExecutorRequest::initialize(const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME("initialize"); + + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + CAF_CM_LOG_DEBUG_VA0("Called"); + + _internalRequest = message; + _request = CCafMessagePayloadParser::getProviderRequest(message->getPayload()); + + std::deque properties = + _request->getRequestHeader()->getEchoPropertyBag()->getProperty(); + + std::string relDirectory; + for(std::deque::const_iterator itr = properties.begin(); itr != properties.end(); itr++) { + if ((*itr)->getName().compare("relDirectory") == 0) { + relDirectory = (*itr)->getValue().front(); + } else if ((*itr)->getName().compare("providerUri") == 0) { + _providerUri = (*itr)->getValue().front(); + } + } + + if (relDirectory.empty() || _providerUri.empty()) { + CAF_CM_EXCEPTIONEX_VA2(Caf::NoSuchElementException, ERROR_NOT_FOUND, + "Missing provider request information - relDirectory: [%s] providerUri: [%s]", + relDirectory.c_str(), _providerUri.c_str()); + } + + const std::string configOutputDir = AppConfigUtils::getRequiredString(_sConfigOutputDir); + _outputDir = FileSystemUtils::buildPath(configOutputDir, _sProviderHostArea, relDirectory); + + _isInitialized = true; +} + +const SmartPtrCProviderRequestDoc CProviderExecutorRequest::getRequest() const { + CAF_CM_FUNCNAME_VALIDATE("getRequest"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _request; +} + +const SmartPtrIIntMessage CProviderExecutorRequest::getInternalRequest() const { + CAF_CM_FUNCNAME_VALIDATE("getRequest"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _internalRequest; +} + +const std::string& CProviderExecutorRequest::getOutputDirectory() const { + CAF_CM_FUNCNAME_VALIDATE("getOutputDirectory"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _outputDir; +} + +const std::string& CProviderExecutorRequest::getProviderUri() const { + CAF_CM_FUNCNAME_VALIDATE("getProviderUri"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _providerUri; +} + diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderExecutorRequest.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderExecutorRequest.h new file mode 100644 index 000000000..04d66832d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderExecutorRequest.h @@ -0,0 +1,45 @@ +/* + * Author: brets + * Created: Nov 20, 2015 + * + * Copyright (c) 2015 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CProviderExecutorRequest_h_ +#define CProviderExecutorRequest_h_ + +namespace Caf { + +/// TODO - describe class +class CProviderExecutorRequest { +public: + CProviderExecutorRequest(); + virtual ~CProviderExecutorRequest(); + +public: + void initialize(const SmartPtrIIntMessage& request); + + const SmartPtrIIntMessage getInternalRequest() const; + const SmartPtrCProviderRequestDoc getRequest() const; + const std::string& getOutputDirectory() const; + const std::string& getProviderUri() const; + +private: + bool _isInitialized; + SmartPtrIIntMessage _internalRequest; + SmartPtrCProviderRequestDoc _request; + std::string _outputDir; + std::string _providerUri; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CProviderExecutorRequest); +}; + +CAF_DECLARE_SMART_POINTER(CProviderExecutorRequest); + +} + +#endif // #ifndef CProviderExecutorRequest_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderExecutorRequestHandler.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderExecutorRequestHandler.cpp new file mode 100644 index 000000000..7f90b25bf --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderExecutorRequestHandler.cpp @@ -0,0 +1,232 @@ +/* + * Author: brets + * Created: Nov 20, 2015 + * + * Copyright (c) 2015 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CProviderExecutorRequestHandler.h" + +using namespace Caf; + +CProviderExecutorRequestHandler::CProviderExecutorRequestHandler() : + _isInitialized(false), + _isCancelled(false), + CAF_CM_INIT_LOG("CProviderExecutorRequestHandler") { + _taskExecutor = NULL; +} + +CProviderExecutorRequestHandler::~CProviderExecutorRequestHandler() { +} + +void CProviderExecutorRequestHandler::initialize(const std::string& providerUri, + const SmartPtrITransformer beginImpersonationTransformer, + const SmartPtrITransformer endImpersonationTransformer, + const SmartPtrIErrorHandler errorHandler) { + CAF_CM_FUNCNAME("initialize"); + + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(providerUri); + + _providerUri = providerUri; + UriUtils::SUriRecord providerUriRecord; + UriUtils::parseUriString(providerUri, providerUriRecord); + + if (providerUriRecord.protocol.compare("file") != 0) { + CAF_CM_EXCEPTIONEX_VA2(Caf::NoSuchElementException, ERROR_NOT_FOUND, + "Unrecognized provider URI protocol - %s, %s", + providerUriRecord.protocol.c_str(), providerUri.c_str()); + } + + UriUtils::SFileUriRecord fileUriRecord; + UriUtils::parseFileAddress(providerUriRecord.address, fileUriRecord); + _providerPath = fileUriRecord.path; + + if (!FileSystemUtils::doesFileExist(_providerPath)) { + CAF_CM_EXCEPTIONEX_VA1(FileNotFoundException, ERROR_FILE_NOT_FOUND, + "Provider path not found - %s", _providerPath.c_str()); + } + + SmartPtrCAutoMutex mutex; + mutex.CreateInstance(); + mutex->initialize(); + _mutex = mutex; + + _beginImpersonationTransformer = beginImpersonationTransformer; + _endImpersonationTransformer = endImpersonationTransformer; + _errorHandler = errorHandler; + + _isInitialized = true; +} + +void CProviderExecutorRequestHandler::handleRequest(const SmartPtrCProviderExecutorRequest request) { + CAF_CM_FUNCNAME("handleRequest"); + + CAF_CM_VALIDATE_SMARTPTR(request); + if (_providerUri.compare(request->getProviderUri()) != 0) { + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, ERROR_INVALID_PARAMETER, + "Provider request not for current provider - %s", _providerUri.c_str()); + } + + CAutoMutexLockUnlock lock(_mutex); + if (_isCancelled) { + CAF_CM_EXCEPTIONEX_VA1(IllegalStateException, ERROR_INVALID_STATE, + "Provider canceled: %s", _providerUri.c_str()); + } + _pendingRequests.push_back(request); + + if (_taskExecutor == NULL) { + SmartPtrCSimpleAsyncTaskExecutor simpleAsyncTaskExecutor; + simpleAsyncTaskExecutor.CreateInstance(); + simpleAsyncTaskExecutor->initialize(this, _errorHandler); + _taskExecutor = simpleAsyncTaskExecutor; + _taskExecutor->execute(0); + } +} + +SmartPtrCProviderExecutorRequest CProviderExecutorRequestHandler::getNextPendingRequest() { + CAutoMutexLockUnlock lock(_mutex); + + SmartPtrCProviderExecutorRequest request; + if (_isCancelled || _pendingRequests.empty()) { + _taskExecutor = NULL; + return request; + } + request = _pendingRequests.front(); + _pendingRequests.pop_front(); + return request; +} + +void CProviderExecutorRequestHandler::run() { + CAF_CM_FUNCNAME("run"); + + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + SmartPtrIIntMessage message; + SmartPtrCProviderExecutorRequest request = getNextPendingRequest(); + while (!request.IsNull()) { + try { + processRequest(request); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + + if (CAF_CM_ISEXCEPTION) { + SmartPtrCIntException intException; + intException.CreateInstance(); + intException->initialize(CAF_CM_GETEXCEPTION); + _errorHandler->handleError(intException, request->getInternalRequest()); + + CAF_CM_CLEAREXCEPTION; + } + + request = getNextPendingRequest(); + } + CAF_CM_LOG_DEBUG_VA0("Finished"); +} + +void CProviderExecutorRequestHandler::cancel() { + CAF_CM_FUNCNAME_VALIDATE("cancel"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CAF_CM_LOG_DEBUG_VA0("Canceling"); + + CAutoMutexLockUnlock lock(_mutex); + _isCancelled = true; +} + +void CProviderExecutorRequestHandler::processRequest( + const SmartPtrCProviderExecutorRequest& request) const { + CAF_CM_FUNCNAME_VALIDATE("processRequest"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(request); + + const std::string& outputDir = request->getOutputDirectory(); + if (AppConfigUtils::getRequiredBoolean("managementAgent", "remap_logging_location")) { + SmartPtrCLoggingSetter loggingSetter; + loggingSetter.CreateInstance(); + loggingSetter->initialize(outputDir); + } + + SmartPtrIIntMessage message = request->getInternalRequest(); + + const std::string providerRequestPath = FileSystemUtils::buildPath(outputDir, _sProviderRequestFilename); + const std::string stdoutPath = FileSystemUtils::buildPath(outputDir, _sStdoutFilename); + const std::string stderrPath = FileSystemUtils::buildPath(outputDir, _sStderrFilename); + + std::string newProviderRequestPath = FileSystemUtils::normalizePathWithForward( + providerRequestPath); + + // Create temporary request file for use by the provider + CCafMessagePayload::saveToFile(message->getPayload(), newProviderRequestPath); + + Cdeqstr argv; + argv.push_back(_providerPath); + argv.push_back("-r"); + argv.push_back(newProviderRequestPath); + + CAF_CM_LOG_INFO_VA2("Running command - %s -r %s", _providerPath.c_str(), + newProviderRequestPath.c_str()); + + ProcessUtils::Priority priority = ProcessUtils::NORMAL; + std::string appConfigPriority = AppConfigUtils::getOptionalString(_sManagementAgentArea, "provider_process_priority"); + if (!appConfigPriority.empty()) { + if (CStringUtils::isEqualIgnoreCase("LOW", appConfigPriority)) { + priority = ProcessUtils::LOW; + } else if (CStringUtils::isEqualIgnoreCase("IDLE", appConfigPriority)) { + priority = ProcessUtils::IDLE; + } + } + + // Begin impersonation + if (!_beginImpersonationTransformer.IsNull()) { + message = _beginImpersonationTransformer->transformMessage(message); + if (message.IsNull()) { + CAF_CM_LOG_WARN_VA0("Begin impersonation transform did not return a message"); + } + } + + ProcessUtils::runSyncToFiles(argv, stdoutPath, stderrPath, priority); + + // End impersonation + if (!_endImpersonationTransformer.IsNull()) { + message = _endImpersonationTransformer->transformMessage(message); + if (message.IsNull()) { + CAF_CM_LOG_WARN_VA0("End impersonation transform did not return a message"); + } + } + + // Delete temporary request file used by the provider + if (FileSystemUtils::doesFileExist(newProviderRequestPath)) { + CAF_CM_LOG_INFO_VA1("Removing handler produced request file - %s", newProviderRequestPath.c_str()); + FileSystemUtils::removeFile(newProviderRequestPath); + } + + // Delete original request + const std::string originalFile = message->findOptionalHeaderAsString(FileHeaders::_sORIGINAL_FILE); + if (!originalFile.empty()) { + if (FileSystemUtils::doesFileExist(originalFile)) { + CAF_CM_LOG_INFO_VA1("Removing original file - %s", originalFile.c_str()); + FileSystemUtils::removeFile(originalFile); + } + } + + // Package response in envelope and write to global response location + const SmartPtrCProviderRequestDoc providerRequest = + CCafMessagePayloadParser::getProviderRequest(message->getPayload()); + const SmartPtrCResponseDoc response = CResponseFactory::createResponse(providerRequest, outputDir); + + const std::string relFilename = CStringUtils::createRandomUuid() + "_" + _sResponseFilename; + + SmartPtrIIntMessage responseMessage = CCafMessageCreator::createPayloadEnvelope( + response, relFilename, message->getHeaders()); + + const std::string directory = AppConfigUtils::getRequiredString("response_dir"); + const std::string filePath = FileSystemUtils::buildPath(directory, relFilename); + + const SmartPtrCDynamicByteArray payload = responseMessage->getPayload(); + FileSystemUtils::saveByteFile(filePath, payload->getPtr(), payload->getByteCount(), + FileSystemUtils::FILE_MODE_REPLACE, ".writing"); +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderExecutorRequestHandler.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderExecutorRequestHandler.h new file mode 100644 index 000000000..e73ee043c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderExecutorRequestHandler.h @@ -0,0 +1,58 @@ +/* + * Author: brets + * Created: Nov 20, 2015 + * + * Copyright (c) 2015 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CProviderExecutorRequestHandler_h_ +#define CProviderExecutorRequestHandler_h_ + +namespace Caf { + +/// TODO - describe class +class CProviderExecutorRequestHandler : public IRunnable { +public: + CProviderExecutorRequestHandler(); + virtual ~CProviderExecutorRequestHandler(); + +public: + void initialize(const std::string& providerUri, + const SmartPtrITransformer beginImpersonationTransformer, + const SmartPtrITransformer endImpersonationTransformer, + const SmartPtrIErrorHandler errorHandler); + + void handleRequest(const SmartPtrCProviderExecutorRequest request); + +public: // IRunnable + void run(); + void cancel(); + +private: + SmartPtrCProviderExecutorRequest getNextPendingRequest(); + void processRequest(const SmartPtrCProviderExecutorRequest& request) const; + +private: + bool _isInitialized; + bool _isCancelled; + std::string _providerPath; + std::string _providerUri; + SmartPtrITaskExecutor _taskExecutor; + SmartPtrCAutoMutex _mutex; + std::deque _pendingRequests; + SmartPtrITransformer _beginImpersonationTransformer; + SmartPtrITransformer _endImpersonationTransformer; + SmartPtrIErrorHandler _errorHandler; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CProviderExecutorRequestHandler); +}; + +CAF_DECLARE_SMART_POINTER(CProviderExecutorRequestHandler); + +} + +#endif // #ifndef CProviderExecutorRequestHandler_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CResponseFactory.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CResponseFactory.cpp new file mode 100644 index 000000000..6df876889 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CResponseFactory.cpp @@ -0,0 +1,374 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CResponseFactory.h" + +using namespace Caf; + +SmartPtrCResponseDoc CResponseFactory::createResponse( + const SmartPtrCProviderCollectSchemaRequestDoc& providerCollectSchemaRequest, + const std::string& outputDir, + const std::string& schemaCacheDir) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CResponseFactory", "createResponse"); + CAF_CM_VALIDATE_SMARTPTR(providerCollectSchemaRequest); + CAF_CM_VALIDATE_STRING(outputDir); + CAF_CM_VALIDATE_STRING(schemaCacheDir); + + SmartPtrCManifestCollectionDoc manifestCollection; + SmartPtrCAttachmentCollectionDoc attachmentCollection; + findAndStoreGlobalAttachmentsAndProviderResponses(outputDir, schemaCacheDir, + manifestCollection, attachmentCollection); + + SmartPtrCResponseHeaderDoc responseHeader; + responseHeader.CreateInstance(); + responseHeader->initialize(); + + SmartPtrCResponseDoc response; + response.CreateInstance(); + response->initialize( + providerCollectSchemaRequest->getClientId(), + providerCollectSchemaRequest->getRequestId(), + providerCollectSchemaRequest->getPmeId(), + responseHeader, + manifestCollection, + attachmentCollection, + SmartPtrCStatisticsDoc()); + + return response; +} + +SmartPtrCResponseDoc CResponseFactory::createResponse( + const SmartPtrCProviderRequestDoc& providerRequest, + const std::string& outputDir) { + CAF_CM_STATIC_FUNC_LOG("CResponseFactory", "createResponse"); + CAF_CM_VALIDATE_SMARTPTR(providerRequest); + CAF_CM_VALIDATE_STRING(outputDir); + + SmartPtrCManifestCollectionDoc manifestCollection; + SmartPtrCAttachmentCollectionDoc attachmentCollection; + findAndStoreGlobalAttachmentsAndProviderResponses(outputDir, std::string(), + manifestCollection, attachmentCollection); + + if (manifestCollection.IsNull() && attachmentCollection.IsNull()) { + CAF_CM_EXCEPTIONEX_VA1(FileNotFoundException, ERROR_FILE_NOT_FOUND, + "Did not find any attachments - %s", outputDir.c_str()); + } + + SmartPtrCResponseHeaderDoc responseHeader; + responseHeader.CreateInstance(); + responseHeader->initialize(); + + SmartPtrCResponseDoc response; + response.CreateInstance(); + response->initialize( + providerRequest->getClientId(), + providerRequest->getRequestId(), + providerRequest->getPmeId(), + responseHeader, + manifestCollection, + attachmentCollection, + SmartPtrCStatisticsDoc()); + + return response; +} + +void CResponseFactory::findAndStoreGlobalAttachmentsAndProviderResponses( + const std::string& outputDir, + const std::string& schemaCacheDir, + SmartPtrCManifestCollectionDoc& manifestCollection, + SmartPtrCAttachmentCollectionDoc& attachmentCollection) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CResponseFactory", "findAndStoreGlobalAttachmentsAndProviderResponses"); + CAF_CM_VALIDATE_STRING(outputDir); + // schemaCacheDir is optional + + std::map globalAttachmentCollection; + std::deque manifestCollectionInner; + findAndStoreGlobalAttachments(outputDir, globalAttachmentCollection); + findAndStoreProviderResponses(outputDir, schemaCacheDir, + globalAttachmentCollection, manifestCollectionInner); + + if (!manifestCollectionInner.empty()) { + manifestCollection.CreateInstance(); + manifestCollection->initialize(manifestCollectionInner); + } + + if (!globalAttachmentCollection.empty()) { + std::deque globalAttachmentCollectionInner; + for (TConstMapIterator > + globalAttachmentIter(globalAttachmentCollection); globalAttachmentIter; globalAttachmentIter++) { + const SmartPtrCAttachmentDoc attachment = *globalAttachmentIter; + globalAttachmentCollectionInner.push_back(attachment); + } + + attachmentCollection.CreateInstance(); + attachmentCollection->initialize(globalAttachmentCollectionInner, + std::deque()); + } +} + +void CResponseFactory::findAndStoreProviderResponses( + const std::string& outputDir, + const std::string& schemaCacheDir, + std::map& globalAttachmentCollection, + std::deque& manifestCollection) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CResponseFactory", "findAndStoreProviderResponses"); + CAF_CM_VALIDATE_STRING(outputDir); + // schemaCacheDir is optional + + const std::deque providerResponsePathCollection = + FileSystemUtils::findRequiredFiles(outputDir, _sProviderResponseFilename); + + for (TConstIterator > providerResponsePathIter( + providerResponsePathCollection); providerResponsePathIter; providerResponsePathIter++) { + const std::string providerResponsePath = *providerResponsePathIter; + + CAF_CM_LOG_DEBUG_VA1("Parsing provider response - %s", providerResponsePath.c_str()); + + const SmartPtrCProviderResponseDoc providerResponse = + XmlRoots::parseProviderResponseFromFile(providerResponsePath); + + const SmartPtrCManifestDoc providerResponseManifest = + providerResponse->getManifest(); + if (!providerResponseManifest.IsNull()) { + manifestCollection.push_back(providerResponseManifest); + } + + const SmartPtrCAttachmentCollectionDoc providerResponseAttachmentCollection = + providerResponse->getAttachmentCollection(); + + if (!providerResponseAttachmentCollection.IsNull()) { + std::deque + providerResponseAttachmentCollectionInner = + providerResponseAttachmentCollection->getAttachment(); + + resolveAndStoreGlobalAttachments(providerResponseAttachmentCollectionInner, + outputDir, schemaCacheDir, globalAttachmentCollection); + } + } +} + +void CResponseFactory::findAndStoreGlobalAttachments( + const std::string& outputDir, + std::map& globalAttachmentCollection) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CResponseFactory", "findAndStoreGlobalAttachments"); + CAF_CM_VALIDATE_STRING(outputDir); + + const std::string parentOutputDir = FileSystemUtils::buildPath(outputDir, ".."); + const std::string requestPath = FileSystemUtils::findOptionalFile(parentOutputDir, + _sPayloadRequestFilename); + + const std::deque stdoutPathCollection = + FileSystemUtils::findOptionalFiles(outputDir, _sStdoutFilename); + const std::deque stderrPathCollection = + FileSystemUtils::findOptionalFiles(outputDir, _sStderrFilename); + const std::deque maDebugLogPathCollection = + FileSystemUtils::findOptionalFiles(outputDir, "ma-log4cpp.log"); + + if (!requestPath.empty()) { + std::deque requestPathCollection; + requestPathCollection.push_back(requestPath); + storeGlobalAttachments(std::string(), "request", requestPathCollection, + outputDir, globalAttachmentCollection); + } + if (!stdoutPathCollection.empty()) { + storeGlobalAttachments(std::string(), "stdout", stdoutPathCollection, + outputDir, globalAttachmentCollection); + } + if (!stderrPathCollection.empty()) { + storeGlobalAttachments(std::string(), "stderr", stderrPathCollection, + outputDir, globalAttachmentCollection); + } + if (!maDebugLogPathCollection.empty()) { + storeGlobalAttachments(std::string(), "log", maDebugLogPathCollection, + outputDir, globalAttachmentCollection); + } +} + +void CResponseFactory::resolveAndStoreGlobalAttachments( + const std::deque attachmentCollectionInner, + const std::string& outputDir, + const std::string& schemaCacheDir, + std::map& globalAttachmentCollection) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CResponseFactory", "resolveAndStoreGlobalAttachments"); + CAF_CM_VALIDATE_STL(attachmentCollectionInner); + CAF_CM_VALIDATE_STRING(outputDir); + // schemaCacheDir is optional + + for (TConstIterator > attachmentIter( + attachmentCollectionInner); attachmentIter; attachmentIter++) { + const SmartPtrCAttachmentDoc attachment = *attachmentIter; + + UriUtils::SUriRecord uriRecord; + UriUtils::parseUriString(attachment->getUri(), uriRecord); + + if (uriRecord.protocol.compare("file") == 0) { + UriUtils::SFileUriRecord fileUriRecord; + UriUtils::parseFileAddress(uriRecord.address, fileUriRecord); + + std::string attachmentPath = fileUriRecord.path; + std::string attachmentPathNew = attachmentPath; + if (!schemaCacheDir.empty()) { + std::string relPath; + resolveAttachmentPath(attachmentPath, outputDir, relPath, + attachmentPathNew); + } + + if (!attachmentPathNew.empty()) { + storeGlobalAttachment(attachment->getName(), attachment->getType(), + attachmentPathNew, outputDir, globalAttachmentCollection); + } + } else { + globalAttachmentCollection.insert( + std::make_pair(attachment->getUri(), attachment)); + } + } +} + +void CResponseFactory::storeGlobalAttachments( + const std::string& attachmentName, + const std::string& attachmentType, + const std::deque& attachmentPathCollection, + const std::string& baseDir, + std::map& attachmentCollection) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CResponseFactory", "storeGlobalAttachments"); + // attachmentName is optional + CAF_CM_VALIDATE_STRING(attachmentType); + CAF_CM_VALIDATE_STL(attachmentPathCollection); + CAF_CM_VALIDATE_STRING(baseDir); + + for (TConstIterator > attachmentPathIter( + attachmentPathCollection); attachmentPathIter; attachmentPathIter++) { + const std::string attachmentPath = *attachmentPathIter; + + storeGlobalAttachment(attachmentName, attachmentType, attachmentPath, baseDir, + attachmentCollection); + } +} + +void CResponseFactory::storeGlobalAttachment( + const std::string& attachmentName, + const std::string& attachmentType, + const std::string& attachmentPath, + const std::string& baseDir, + std::map& attachmentCollection) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CResponseFactory", "storeGlobalAttachment"); + // attachmentName is optional + CAF_CM_VALIDATE_STRING(attachmentType); + CAF_CM_VALIDATE_STRING(attachmentPath); + CAF_CM_VALIDATE_STRING(baseDir); + + std::string relPath; + std::string attachmentPathNew; + resolveAttachmentPath(attachmentPath, baseDir, relPath, attachmentPathNew); + + if (!attachmentPathNew.empty()) { + std::string attachmentNameNew = attachmentName; + if (attachmentName.empty()) { + attachmentNameNew = relPath; + std::replace(attachmentNameNew.begin(), attachmentNameNew.end(), '/', '.'); + } + + attachmentPathNew = FileSystemUtils::normalizePathWithForward(attachmentPathNew); + + const std::string attachmentUri = "file:///" + attachmentPathNew + "?relPath=" + + relPath; + + CAF_CM_LOG_DEBUG_VA3("Creating attachment - name: %s, type: %s, uri: %s", + attachmentNameNew.c_str(), attachmentType.c_str(), attachmentUri.c_str()); + + const std::string cmsPolicyStr = AppConfigUtils::getRequiredString( + "security", "cms_policy"); + + SmartPtrCAttachmentDoc attachment; + attachment.CreateInstance(); + attachment->initialize(attachmentNameNew, attachmentType, attachmentUri, false, + EnumConvertersXml::convertStringToCmsPolicy(cmsPolicyStr)); + + attachmentCollection.insert(std::make_pair(attachmentUri, attachment)); + } +} + +void CResponseFactory::resolveAttachmentPath( + const std::string& attachmentPath, + const std::string& baseDir, + std::string& relPath, + std::string& attachmentPathNew) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CResponseFactory", "resolveAttachmentPath"); + CAF_CM_VALIDATE_STRING(attachmentPath); + CAF_CM_VALIDATE_STRING(baseDir); + + // Initialize the input variables + relPath = std::string(); + attachmentPathNew = attachmentPath; + + std::string baseDirNew = baseDir; + + const std::string baseDirNewTmp = baseDirNew + '/'; + const std::string::size_type fndPos = attachmentPathNew.find(baseDirNewTmp); + if (fndPos != std::string::npos) { + relPath = attachmentPathNew; + relPath.replace(fndPos, baseDirNewTmp.length(), ""); + + relPath = removeLeadingChars(relPath, '.'); + relPath = removeLeadingChars(relPath, '/'); + } + + if (relPath.empty()) { + relPath = FileSystemUtils::getBasename(attachmentPathNew); + attachmentPathNew = FileSystemUtils::buildPath(baseDirNew, relPath); + const std::string attachmentPathTmp = + FileSystemUtils::normalizePathForPlatform(attachmentPath); + + if (attachmentPathTmp.compare(attachmentPathNew) != 0) { + if (FileSystemUtils::doesFileExist(attachmentPathNew)) { + bool isFileNameFound = false; + const std::string origRelPath = relPath; + for (uint32 index = 0; !isFileNameFound; index++) { + relPath = CStringConv::toString(index) + "_" + origRelPath; + attachmentPathNew = FileSystemUtils::buildPath(baseDirNew, relPath); + if (! FileSystemUtils::doesFileExist(attachmentPathNew)) { + CAF_CM_LOG_WARN_VA1("File already exists... calculated new name - %s", + attachmentPathNew.c_str()); + isFileNameFound = true; + } + } + } + + if (FileSystemUtils::isRegularFile(attachmentPathTmp)) { + CAF_CM_LOG_WARN_VA3("Attachment not in specified directory... Copying - attPath: \"%s\", goodDir: \"%s\", newPath: \"%s\"", + attachmentPathTmp.c_str(), baseDirNew.c_str(), attachmentPathNew.c_str()); + FileSystemUtils::copyFile(attachmentPathTmp, attachmentPathNew); + } else { + CAF_CM_LOG_ERROR_VA3("Attachment not in specified or calculated directory - attPath: \"%s\", goodDir: \"%s\", newPath: \"%s\"", + attachmentPathTmp.c_str(), baseDirNew.c_str(), attachmentPathNew.c_str()); + attachmentPathNew = std::string(); + } + } + } +} + +std::string CResponseFactory::removeLeadingChars( + const std::string& sourceStr, + const char leadingChar) { + + std::string rc; + if (!sourceStr.empty()) { + bool isCharFnd = false; + for (size_t index = 0; index < sourceStr.length(); index++) { + if (!isCharFnd && (sourceStr[index] != leadingChar)) { + isCharFnd = true; + } + if (isCharFnd) { + rc += sourceStr[index]; + } + } + } + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CResponseFactory.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CResponseFactory.h new file mode 100644 index 000000000..b9bae0fdd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CResponseFactory.h @@ -0,0 +1,81 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CResponseFactory_h_ +#define CResponseFactory_h_ + +namespace Caf { + +/// Builds the response XML document. +class CResponseFactory { +public: + static SmartPtrCResponseDoc createResponse( + const SmartPtrCProviderCollectSchemaRequestDoc& providerCollectSchemaRequest, + const std::string& outputDir, + const std::string& schemaCacheDir); + + static SmartPtrCResponseDoc createResponse( + const SmartPtrCProviderRequestDoc& providerRequest, + const std::string& outputDir); + +private: + static void findAndStoreGlobalAttachmentsAndProviderResponses( + const std::string& outputDir, + const std::string& schemaCacheDir, + SmartPtrCManifestCollectionDoc& manifestCollection, + SmartPtrCAttachmentCollectionDoc& attachmentCollection); + + static void findAndStoreProviderResponses( + const std::string& outputDir, + const std::string& schemaCacheDir, + std::map& globalAttachmentCollection, + std::deque& manifestCollection); + + static void findAndStoreGlobalAttachments( + const std::string& outputDir, + std::map& globalAttachmentCollection); + + static void resolveAndStoreGlobalAttachments( + const std::deque attachmentCollectionInner, + const std::string& outputDir, + const std::string& schemaCacheDir, + std::map& globalAttachmentCollection); + + static void storeGlobalAttachments( + const std::string& attachmentName, + const std::string& attachmentType, + const std::deque& attachmentPathCollection, + const std::string& baseDir, + std::map& attachmentCollection); + + static void storeGlobalAttachment( + const std::string& attachmentName, + const std::string& attachmentType, + const std::string& attachmentPath, + const std::string& baseDir, + std::map& attachmentCollection); + + static void resolveAttachmentPath( + const std::string& attachmentPath, + const std::string& baseDir, + std::string& relPath, + std::string& attachmentPathNew); + + static std::string removeLeadingChars( + const std::string& sourceStr, + const char leadingChar); + +private: + CAF_CM_DECLARE_NOCREATE(CResponseFactory); +}; + +CAF_DECLARE_SMART_POINTER(CResponseFactory); + +} + +#endif // #ifndef CResponseFactory_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CSchemaCacheManager.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CSchemaCacheManager.cpp new file mode 100644 index 000000000..3cd270136 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CSchemaCacheManager.cpp @@ -0,0 +1,230 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CSchemaCacheManager.h" + +using namespace Caf; + +bool Caf::operator<( + const CClassId& lhs, + const CClassId& rhs) { + bool rc = false; + + if (lhs._fqc->getClassNamespace() < rhs._fqc->getClassNamespace()) { + rc = true; + } else if (lhs._fqc->getClassNamespace() == rhs._fqc->getClassNamespace()) { + if (lhs._fqc->getClassName() < rhs._fqc->getClassName()) { + rc = true; + } else if (lhs._fqc->getClassName() == rhs._fqc->getClassName()) { + if (lhs._fqc->getClassVersion() < rhs._fqc->getClassVersion()) { + rc = true; + } + } + } + + return rc; +} + +CSchemaCacheManager::CSchemaCacheManager() : + _isInitialized(false), + CAF_CM_INIT_LOG("CSchemaCacheManager") { +} + +CSchemaCacheManager::~CSchemaCacheManager() { +} + +void CSchemaCacheManager::initialize() { + + CAF_CM_FUNCNAME("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + const std::string schemaCacheDirPath = + AppConfigUtils::getRequiredString(_sProviderHostArea, _sConfigSchemaCacheDir); + const std::string schemaCacheDirPathExp = CStringUtils::expandEnv(schemaCacheDirPath); + if (!FileSystemUtils::doesDirectoryExist(schemaCacheDirPathExp)) { + CAF_CM_EXCEPTIONEX_VA1(FileNotFoundException, ERROR_FILE_NOT_FOUND, + "Schema cache directory does not exist: %s", schemaCacheDirPathExp.c_str()); + } + + _schemaCacheDirPath = schemaCacheDirPathExp; + _isInitialized = true; + } + CAF_CM_EXIT; +} + +std::string CSchemaCacheManager::findProvider( + const SmartPtrCFullyQualifiedClassGroupDoc& fqc) { + + CAF_CM_FUNCNAME_VALIDATE("findProvider"); + + std::string providerUri; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(fqc); + + CClassId classId; + classId._fqc = fqc; + + CClassCollection::const_iterator iter = _classCollection.find(classId); + if (iter == _classCollection.end()) { + CAF_CM_LOG_INFO_VA1("Provider not found... refreshing cache - %s", classId.toString().c_str()); + + const uint16 maxWaitSecs = 10; + waitForSchemaCacheCreation(_schemaCacheDirPath, maxWaitSecs); + + processSchemaSummaries(_schemaCacheDirPath, _classCollection); + + CClassCollection::const_iterator iter2 = _classCollection.find(classId); + if (iter2 == _classCollection.end()) { + CAF_CM_LOG_WARN_VA1("Provider not found even after refreshing the cache - %s", classId.toString().c_str()); + } else { + providerUri = iter2->second; + } + } else { + providerUri = iter->second; + } + } + CAF_CM_EXIT; + + return providerUri; +} + +void CSchemaCacheManager::processSchemaSummaries( + const std::string& schemaCacheDirPath, + CClassCollection& classCollection) const { + CAF_CM_FUNCNAME_VALIDATE("processSchemaSummaries"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(schemaCacheDirPath); + + const FileSystemUtils::DirectoryItems schemaCacheDirItems = + FileSystemUtils::itemsInDirectory(schemaCacheDirPath, + FileSystemUtils::REGEX_MATCH_ALL); + + if (schemaCacheDirItems.directories.empty()) { + CAF_CM_LOG_WARN_VA1( + "Schema cache is empty - %s", schemaCacheDirPath.c_str()); + } + + for (TConstIterator schemaCacheDirIter( + schemaCacheDirItems.directories); schemaCacheDirIter; schemaCacheDirIter++) { + const std::string providerSchemaCacheDir = *schemaCacheDirIter; + + const std::string providerSchemaCacheDirPath = FileSystemUtils::buildPath( + schemaCacheDirPath, providerSchemaCacheDir); + const std::string schemaSummaryFilePath = FileSystemUtils::findOptionalFile( + providerSchemaCacheDirPath, _sSchemaSummaryFilename); + + if (schemaSummaryFilePath.empty()) { + CAF_CM_LOG_WARN_VA1( + "Schema cache directory found without schema summary file... might be a timing issue - %s", + providerSchemaCacheDirPath.c_str()); + } else { + CAF_CM_LOG_DEBUG_VA1("Found schema cache summary file - %s", schemaSummaryFilePath.c_str()); + + const SmartPtrCSchemaSummaryDoc schemaSummary = + XmlRoots::parseSchemaSummaryFromFile(schemaSummaryFilePath); + + addNewClasses(schemaSummary, schemaSummaryFilePath, classCollection); + } + } + } + CAF_CM_EXIT; +} + +void CSchemaCacheManager::addNewClasses( + const SmartPtrCSchemaSummaryDoc& schemaSummary, + const std::string& schemaSummaryFilePath, + CClassCollection& classCollection) const { + CAF_CM_FUNCNAME("addNewClasses"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(schemaSummary); + CAF_CM_VALIDATE_STRING(schemaSummaryFilePath); + + const std::string invokerPath = schemaSummary->getInvokerPath(); + + std::string providerUri; + if (! invokerPath.empty()) { + const std::string invokerPathExp = CStringUtils::expandEnv(invokerPath); + if (FileSystemUtils::doesFileExist(invokerPathExp)) { + const std::string invokerPathExpTmp = + FileSystemUtils::normalizePathWithForward(invokerPathExp); + providerUri = "file:///" + invokerPathExpTmp; + } else { + CAF_CM_LOG_ERROR_VA2( + "Invoker path does not exist - invokerPath: %s, filePath: %s", + invokerPathExp.c_str(), schemaSummaryFilePath.c_str()); + } + } else { + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Schema Summary file missing invokerRelPath - %s", schemaSummaryFilePath.c_str()); + } + + if (! providerUri.empty()) { + const SmartPtrCClassCollectionDoc classCollectionDoc = schemaSummary->getClassCollection(); + const std::deque fqcCollection = classCollectionDoc->getFullyQualifiedClass(); + + for (TConstIterator > fqcIter(fqcCollection); + fqcIter; fqcIter++) { + CClassId classId; + classId._fqc = *fqcIter; + + if (classCollection.find(classId) == classCollection.end()) { + CAF_CM_LOG_DEBUG_VA1("Adding class %s", classId.toString().c_str()); + classCollection.insert(std::make_pair(classId, providerUri)); + } + } + } + } + CAF_CM_EXIT; +} + +void CSchemaCacheManager::waitForSchemaCacheCreation( + const std::string& schemaCacheDir, + const uint16 maxWaitSecs) const { + CAF_CM_FUNCNAME_VALIDATE("waitForSchemaCacheCreation"); + CAF_CM_VALIDATE_STRING(schemaCacheDir); + + const std::string providerRegDir = AppConfigUtils::getRequiredString( + _sProviderHostArea, _sConfigProviderRegDir); + const std::string providerRegDirExp = CStringUtils::expandEnv(providerRegDir); + + if (FileSystemUtils::doesDirectoryExist(providerRegDirExp)) { + size_t numSchemaCacheItems = 0; + size_t numProviderRegItems = 0; + for (uint16 retry = 0; retry < maxWaitSecs; retry++) { + numSchemaCacheItems = FileSystemUtils::itemsInDirectory(schemaCacheDir, + FileSystemUtils::REGEX_MATCH_ALL).directories.size(); + numProviderRegItems = FileSystemUtils::itemsInDirectory(providerRegDir, + FileSystemUtils::REGEX_MATCH_ALL).files.size(); + + if (numSchemaCacheItems >= numProviderRegItems) { + break; + } + + CThreadUtils::sleep(1000); + } + + if (numSchemaCacheItems < numProviderRegItems) { + CAF_CM_LOG_WARN_VA5( + "Schema cache initialization not complete - schemaCache: %s::%d, providerReg: %s::%d, maxWaitSecs: %d", + schemaCacheDir.c_str(), numSchemaCacheItems, providerRegDir.c_str(), + numProviderRegItems, maxWaitSecs); + } + } else { + CAF_CM_LOG_WARN_VA1("Provider Reg directory does not exist - %s", + providerRegDirExp.c_str()); + } +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CSchemaCacheManager.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CSchemaCacheManager.h new file mode 100644 index 000000000..042f0ec14 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CSchemaCacheManager.h @@ -0,0 +1,68 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CSchemaCacheManager_h_ +#define CSchemaCacheManager_h_ + +namespace Caf { + +/// Simple container class for identifying a class. +class CClassId { +public: + SmartPtrCFullyQualifiedClassGroupDoc _fqc; + std::string toString() const { + return _fqc->getClassNamespace() + "::" + _fqc->getClassName() + "::" + _fqc->getClassVersion(); + } +}; +bool operator< (const CClassId& lhs, const CClassId& rhs); + +/// Creates a provider request. +class CSchemaCacheManager { +private: + typedef std::map CClassCollection; + +public: + CSchemaCacheManager(); + virtual ~CSchemaCacheManager(); + +public: + void initialize(); + + std::string findProvider( + const SmartPtrCFullyQualifiedClassGroupDoc& fqc); + +private: + void processSchemaSummaries( + const std::string& schemaCacheDirPath, + CClassCollection& classCollection) const; + + void addNewClasses( + const SmartPtrCSchemaSummaryDoc& schemaSummary, + const std::string& schemaSummaryFilePath, + CClassCollection& classCollection) const; + + void waitForSchemaCacheCreation( + const std::string& schemaCacheDir, + const uint16 maxWaitSecs) const; + +private: + bool _isInitialized; + std::string _schemaCacheDirPath; + CClassCollection _classCollection; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CSchemaCacheManager); +}; + +CAF_DECLARE_SMART_POINTER(CSchemaCacheManager); + +} + +#endif // #ifndef CSchemaCacheManager_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CSinglePmeRequestSplitter.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CSinglePmeRequestSplitter.cpp new file mode 100644 index 000000000..4a69f31e4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CSinglePmeRequestSplitter.cpp @@ -0,0 +1,82 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CSinglePmeRequestSplitter.h" + +using namespace Caf; + +CSinglePmeRequestSplitter::CSinglePmeRequestSplitter() : + _isInitialized(false), + CAF_CM_INIT_LOG("CSinglePmeRequestSplitter") { +} + +CSinglePmeRequestSplitter::~CSinglePmeRequestSplitter() { +} + +void CSinglePmeRequestSplitter::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + CAF_CM_VALIDATE_STL_EMPTY(properties); + _ctorArgs = ctorArgs; + _properties = properties; + initialize(); + } + CAF_CM_EXIT; +} + +void CSinglePmeRequestSplitter::terminateBean() { +} + +void CSinglePmeRequestSplitter::initialize() { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _isInitialized = true; + } + CAF_CM_EXIT; +} + +bool CSinglePmeRequestSplitter::isResponsible( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("isResponsible"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + } + CAF_CM_EXIT; + + return false; +} + +SmartPtrIIntegrationObject CSinglePmeRequestSplitter::createObject( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("createObject"); + + SmartPtrIIntegrationObject rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + rc.CreateInstance(_sObjIdSinglePmeRequestSplitterInstance); + rc->initialize(_ctorArgs, _properties, configSection); + } + CAF_CM_EXIT; + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CSinglePmeRequestSplitter.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CSinglePmeRequestSplitter.h new file mode 100644 index 000000000..618414562 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CSinglePmeRequestSplitter.h @@ -0,0 +1,60 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CSinglePmeRequestSplitter_h_ +#define CSinglePmeRequestSplitter_h_ + +namespace Caf { + +/// Sends responses/errors back to the client. +class CSinglePmeRequestSplitter : + public TCafSubSystemObjectRoot, + public IBean, + public IIntegrationComponent { +public: + CSinglePmeRequestSplitter(); + virtual ~CSinglePmeRequestSplitter(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdSinglePmeRequestSplitter) + + CAF_BEGIN_INTERFACE_MAP(CSinglePmeRequestSplitter) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IIntegrationComponent) + CAF_END_INTERFACE_MAP() + +public: + virtual void initialize(); + +public: // IBean + virtual void initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties); + + virtual void terminateBean(); + +public: // IIntegrationComponent + bool isResponsible( + const SmartPtrIDocument& configSection) const; + + SmartPtrIIntegrationObject createObject( + const SmartPtrIDocument& configSection) const; + +private: + bool _isInitialized; + IBean::Cargs _ctorArgs; + IBean::Cprops _properties; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CSinglePmeRequestSplitter); +}; + +} + +#endif // #ifndef CSinglePmeRequestSplitter_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CSinglePmeRequestSplitterInstance.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CSinglePmeRequestSplitterInstance.cpp new file mode 100644 index 000000000..aa2fe1bc5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CSinglePmeRequestSplitterInstance.cpp @@ -0,0 +1,429 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CSinglePmeRequestSplitterInstance.h" + +using namespace Caf; + +CSinglePmeRequestSplitterInstance::CSinglePmeRequestSplitterInstance() : + _isInitialized(false), + CAF_CM_INIT_LOG("CSinglePmeRequestSplitterInstance") { +} + +CSinglePmeRequestSplitterInstance::~CSinglePmeRequestSplitterInstance() { +} + +void CSinglePmeRequestSplitterInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + _schemaCacheManager.CreateInstance(); + _schemaCacheManager->initialize(); + + _isInitialized = true; +} + +std::string CSinglePmeRequestSplitterInstance::getId() const { + return _id; +} + +void CSinglePmeRequestSplitterInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); +} + +IMessageSplitter::SmartPtrCMessageCollection CSinglePmeRequestSplitterInstance::splitMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("splitMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + CAF_CM_LOG_DEBUG_VA1("Called - %s", _id.c_str()); + + SmartPtrCMessageCollection messageCollection; + messageCollection.CreateInstance(); + + const SmartPtrCMgmtRequestDoc mgmtRequest = + CCafMessagePayloadParser::getMgmtRequest(message->getPayload()); + + const SmartPtrCMgmtBatchDoc mgmtBatch = mgmtRequest->getBatch(); + + const SmartPtrCProviderRequestHeaderDoc providerRequestHeader = + convertRequestHeader(mgmtRequest->getRequestHeader()); + + const std::string configOutputDir = AppConfigUtils::getRequiredString( + _sConfigOutputDir); + const std::string randomUuidStr = CStringUtils::createRandomUuid(); + const std::string absRandomUuidDir = FileSystemUtils::buildPath(configOutputDir, + _sProviderHostArea, randomUuidStr); + + createDirectory(absRandomUuidDir); + saveRequest(absRandomUuidDir, message->getPayload()); + + // Process the collect schema job first since it follows a + // completely different line of execution. + const SmartPtrCMgmtCollectSchemaDoc mgmtCollectSchema = + mgmtBatch->getCollectSchema(); + if (!mgmtCollectSchema.IsNull()) { + const std::string relProviderNumDir = FileSystemUtils::buildPath(randomUuidStr, + CStringConv::toString(0)); + const std::string absProviderNumDir = FileSystemUtils::buildPath( + absRandomUuidDir, CStringConv::toString(0)); + + const SmartPtrCProviderCollectSchemaRequestDoc providerCollectSchemaRequest = + createCollectSchemaRequest(mgmtRequest, mgmtCollectSchema, + providerRequestHeader, absProviderNumDir); + + const std::string relFilename = FileSystemUtils::buildPath(relProviderNumDir, + _sProviderRequestFilename); + + const SmartPtrIIntMessage messageNew = CCafMessageCreator::create( + providerCollectSchemaRequest, relFilename, relProviderNumDir, + message->getHeaders()); + + messageCollection->push_back(messageNew); + } + + SmartPtrCProviderJobsCollection providerJobsCollection; + providerJobsCollection.CreateInstance(); + addCollectInstancesJobs(mgmtBatch->getCollectInstancesCollection(), + providerJobsCollection); + addInvokeOperationJobs(mgmtBatch->getInvokeOperationCollection(), + providerJobsCollection); + + uint32 providerCnt = 1; + for (TConstIterator providerJobsIter( + *providerJobsCollection); providerJobsIter; providerJobsIter++) { + const std::string providerUri = providerJobsIter->first; + const SmartPtrCSplitterJobsCollection jobsCollection = providerJobsIter->second; + + const std::string provderCntStr = CStringConv::toString(providerCnt); + const std::string absProviderNumDir = FileSystemUtils::buildPath(absRandomUuidDir, provderCntStr); + + const SmartPtrCProviderRequestDoc providerRequest = createProviderRequest( + mgmtRequest, jobsCollection, providerRequestHeader, absProviderNumDir); + + const std::string relProviderNumDir = FileSystemUtils::buildPath(randomUuidStr, provderCntStr); +// const std::string relFilename = FileSystemUtils::buildPath(relProviderNumDir, +// _sProviderRequestFilename); +// const std::string relProviderNumDir = ""; + const std::string relFilename = randomUuidStr + "_" + provderCntStr + "_" + _sProviderRequestFilename; + + const SmartPtrIIntMessage messageNew = CCafMessageCreator::create(providerRequest, + relFilename, relProviderNumDir, providerUri, message->getHeaders()); + + messageCollection->push_back(messageNew); + + providerCnt++; + } + + return messageCollection; +} + +SmartPtrCProviderCollectSchemaRequestDoc CSinglePmeRequestSplitterInstance::createCollectSchemaRequest( + const SmartPtrCMgmtRequestDoc& mgmtRequest, + const SmartPtrCMgmtCollectSchemaDoc& mgmtCollectSchema, + const SmartPtrCProviderRequestHeaderDoc& providerRequestHeader, + const std::string& outputDir) const { + CAF_CM_FUNCNAME_VALIDATE("createCollectSchemaRequest"); + CAF_CM_VALIDATE_SMARTPTR(mgmtRequest); + CAF_CM_VALIDATE_SMARTPTR(mgmtCollectSchema); + CAF_CM_VALIDATE_SMARTPTR(providerRequestHeader); + CAF_CM_VALIDATE_STRING(outputDir); + + SmartPtrCProviderCollectSchemaRequestDoc providerCollectSchemaRequest; + providerCollectSchemaRequest.CreateInstance(); + providerCollectSchemaRequest->initialize(mgmtRequest->getClientId(), + mgmtRequest->getRequestId(), mgmtRequest->getPmeId(), + mgmtCollectSchema->getJobId(), outputDir, providerRequestHeader); + + return providerCollectSchemaRequest; +} + +SmartPtrCProviderRequestDoc CSinglePmeRequestSplitterInstance::createProviderRequest( + const SmartPtrCMgmtRequestDoc& mgmtRequest, + const SmartPtrCSplitterJobsCollection& jobsCollection, + const SmartPtrCProviderRequestHeaderDoc& providerRequestHeader, + const std::string& outputDir) const { + CAF_CM_FUNCNAME_VALIDATE("createProviderRequest"); + CAF_CM_VALIDATE_SMARTPTR(mgmtRequest); + CAF_CM_VALIDATE_SMARTPTR(jobsCollection); + CAF_CM_VALIDATE_SMARTPTR(providerRequestHeader); + CAF_CM_VALIDATE_STRING(outputDir); + + std::deque collectInstancesCollectionInner; + std::deque invokeOperationCollectionInner; + for (TConstIterator > jobIter(*jobsCollection); + jobIter; jobIter++) { + const SmartPtrCSplitterJob job = *jobIter; + + if (!job->_mgmtCollectInstances.IsNull()) { + const UUID jobId = job->_mgmtCollectInstances->getJobId(); + const std::string jobIdStr = BasePlatform::UuidToString(jobId); + const std::string jobOutputDir = FileSystemUtils::buildPath(outputDir, + jobIdStr); + if (FileSystemUtils::doesDirectoryExist(jobOutputDir)) { + FileSystemUtils::recursiveRemoveDirectory(jobOutputDir); + } + FileSystemUtils::createDirectory(jobOutputDir); + + SmartPtrCProviderCollectInstancesDoc providerCollectInstances; + providerCollectInstances.CreateInstance(); + providerCollectInstances->initialize(job->_fqc->getClassNamespace(), + job->_fqc->getClassName(), job->_fqc->getClassVersion(), + job->_mgmtCollectInstances->getJobId(), jobOutputDir, + job->_mgmtCollectInstances->getParameterCollection()); + + collectInstancesCollectionInner.push_back(providerCollectInstances); + } + + if (!job->_mgmtInvokeOperation.IsNull()) { + const UUID jobId = job->_mgmtInvokeOperation->getJobId(); + const std::string jobIdStr = BasePlatform::UuidToString(jobId); + const std::string jobOutputDir = FileSystemUtils::buildPath(outputDir, + jobIdStr); + if (FileSystemUtils::doesDirectoryExist(jobOutputDir)) { + FileSystemUtils::recursiveRemoveDirectory(jobOutputDir); + } + FileSystemUtils::createDirectory(jobOutputDir); + + SmartPtrCProviderInvokeOperationDoc providerInvokeOperation; + providerInvokeOperation.CreateInstance(); + providerInvokeOperation->initialize(job->_fqc->getClassNamespace(), + job->_fqc->getClassName(), job->_fqc->getClassVersion(), + job->_mgmtInvokeOperation->getJobId(), jobOutputDir, + job->_mgmtInvokeOperation->getOperation()); + + invokeOperationCollectionInner.push_back(providerInvokeOperation); + } + } + + SmartPtrCProviderCollectInstancesCollectionDoc collectInstancesCollection; + if (!collectInstancesCollectionInner.empty()) { + collectInstancesCollection.CreateInstance(); + collectInstancesCollection->initialize(collectInstancesCollectionInner); + } + + SmartPtrCProviderInvokeOperationCollectionDoc invokeOperationCollection; + if (!invokeOperationCollectionInner.empty()) { + invokeOperationCollection.CreateInstance(); + invokeOperationCollection->initialize(invokeOperationCollectionInner); + } + + SmartPtrCProviderBatchDoc providerBatch; + providerBatch.CreateInstance(); + providerBatch->initialize(outputDir, collectInstancesCollection, + invokeOperationCollection); + + SmartPtrCProviderRequestDoc providerRequest; + providerRequest.CreateInstance(); + providerRequest->initialize(mgmtRequest->getClientId(), + mgmtRequest->getRequestId(), mgmtRequest->getPmeId(), providerRequestHeader, + providerBatch, mgmtRequest->getAttachmentCollection()); + + return providerRequest; +} + +void CSinglePmeRequestSplitterInstance::addCollectInstancesJobs( + const SmartPtrCMgmtCollectInstancesCollectionDoc& mgmtCollectInstancesCollection, + SmartPtrCProviderJobsCollection& providerJobsCollection) const { + CAF_CM_FUNCNAME_VALIDATE("addCollectInstancesJobs"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + // mgmtCollectInstancesCollection is optional + CAF_CM_VALIDATE_SMARTPTR(providerJobsCollection); + + if (!mgmtCollectInstancesCollection.IsNull()) { + const std::deque mgmtCollectInstancesCollectionInner = + mgmtCollectInstancesCollection->getCollectInstancesCollection(); + for (TConstIterator > mgmtCollectInstancesIter( + mgmtCollectInstancesCollectionInner); mgmtCollectInstancesIter; + mgmtCollectInstancesIter++) { + const SmartPtrCMgmtCollectInstancesDoc mgmtCollectInstances = + *mgmtCollectInstancesIter; + + const SmartPtrCClassSpecifierDoc classSpecifier = + mgmtCollectInstances->getClassSpecifier(); + const SmartPtrCClassCollection fqcCollection = resolveClassSpecifier( + classSpecifier); + + for (TConstIterator > fqcIter( + *fqcCollection); fqcIter; fqcIter++) { + const SmartPtrCFullyQualifiedClassGroupDoc fqc = *fqcIter; + const std::string providerUri = findProviderUri(fqc); + + SmartPtrCSplitterJob job; + job.CreateInstance(); + job->_fqc = fqc; + job->_mgmtCollectInstances = mgmtCollectInstances; + + CProviderJobsCollection::const_iterator fndIter = + providerJobsCollection->find(providerUri); + if (fndIter == providerJobsCollection->end()) { + SmartPtrCSplitterJobsCollection jobsCollection; + jobsCollection.CreateInstance(); + jobsCollection->push_back(job); + providerJobsCollection->insert( + std::make_pair(providerUri, jobsCollection)); + } else { + fndIter->second->push_back(job); + } + } + } + } +} + +void CSinglePmeRequestSplitterInstance::addInvokeOperationJobs( + const SmartPtrCMgmtInvokeOperationCollectionDoc& mgmtInvokeOperationCollection, + SmartPtrCProviderJobsCollection& providerJobsCollection) const { + CAF_CM_FUNCNAME_VALIDATE("addInvokeOperationJobs"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + // mgmtInvokeOperationCollection is optional + CAF_CM_VALIDATE_SMARTPTR(providerJobsCollection); + + if (!mgmtInvokeOperationCollection.IsNull()) { + const std::deque mgmtInvokeOperationCollectionInner = + mgmtInvokeOperationCollection->getInvokeOperationCollection(); + for (TConstIterator > mgmtInvokeOperationIter( + mgmtInvokeOperationCollectionInner); mgmtInvokeOperationIter; + mgmtInvokeOperationIter++) { + const SmartPtrCMgmtInvokeOperationDoc mgmtInvokeOperation = + *mgmtInvokeOperationIter; + + const SmartPtrCClassSpecifierDoc classSpecifier = + mgmtInvokeOperation->getClassSpecifier(); + const SmartPtrCClassCollection fqcCollection = resolveClassSpecifier( + classSpecifier); + + for (TConstIterator > fqcIter( + *fqcCollection); fqcIter; fqcIter++) { + const SmartPtrCFullyQualifiedClassGroupDoc fqc = *fqcIter; + const std::string providerUri = findProviderUri(fqc); + + SmartPtrCSplitterJob job; + job.CreateInstance(); + job->_fqc = fqc; + job->_mgmtInvokeOperation = mgmtInvokeOperation; + + CProviderJobsCollection::const_iterator fndIter = + providerJobsCollection->find(providerUri); + if (fndIter == providerJobsCollection->end()) { + SmartPtrCSplitterJobsCollection jobsCollection; + jobsCollection.CreateInstance(); + jobsCollection->push_back(job); + providerJobsCollection->insert( + std::make_pair(providerUri, jobsCollection)); + } else { + fndIter->second->push_back(job); + } + } + } + } +} + +CSinglePmeRequestSplitterInstance::SmartPtrCClassCollection CSinglePmeRequestSplitterInstance::resolveClassSpecifier( + const SmartPtrCClassSpecifierDoc& classSpecifier) const { + CAF_CM_FUNCNAME("resolveClassSpecifier"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(classSpecifier); + + SmartPtrCClassCollection classCollection; + classCollection.CreateInstance(); + + const SmartPtrCFullyQualifiedClassGroupDoc fullyQualifiedClass = + classSpecifier->getFullyQualifiedClass(); + if (!fullyQualifiedClass.IsNull()) { + classCollection->push_back(fullyQualifiedClass); + } + + if (classCollection->empty()) { + CAF_CM_EXCEPTION_VA0(ERROR_INVALID_DATA, + "Failed to resolve to any fully-qualified classes"); + } + + return classCollection; +} + +std::string CSinglePmeRequestSplitterInstance::findProviderUri( + const SmartPtrCFullyQualifiedClassGroupDoc& fqc) const { + CAF_CM_FUNCNAME("findProviderUri"); + + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(fqc); + + const std::string providerUri = _schemaCacheManager->findProvider(fqc); + + if (providerUri.empty()) { + CAF_CM_EXCEPTIONEX_VA3(NoSuchElementException, ERROR_NOT_FOUND, + "Provider not found for %s::%s::%s with status %d", + fqc->getClassNamespace().c_str(), fqc->getClassName().c_str(), + fqc->getClassVersion().c_str()); + } + + return providerUri; +} + +void CSinglePmeRequestSplitterInstance::createDirectory( + const std::string& directory) const { + CAF_CM_FUNCNAME_VALIDATE("createDirectory"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(directory); + + if (FileSystemUtils::doesDirectoryExist(directory)) { + CAF_CM_LOG_WARN_VA1( + "Directory already exists (perhaps from a previous failed run)... removing - %s", + directory.c_str()); + FileSystemUtils::recursiveRemoveDirectory(directory); + } + + CAF_CM_LOG_DEBUG_VA1("Creating directory - %s", directory.c_str()); + FileSystemUtils::createDirectory(directory); +} + +void CSinglePmeRequestSplitterInstance::saveRequest( + const std::string& outputDir, + const SmartPtrCDynamicByteArray& payload) const { + CAF_CM_FUNCNAME_VALIDATE("saveRequest"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(outputDir); + CAF_CM_VALIDATE_SMARTPTR(payload); + + const std::string singlePmeRequestPath = FileSystemUtils::buildPath(outputDir, + _sPayloadRequestFilename); + + CCafMessagePayload::saveToFile(payload, singlePmeRequestPath); +} + +SmartPtrCProviderRequestHeaderDoc CSinglePmeRequestSplitterInstance::convertRequestHeader( + const SmartPtrCRequestHeaderDoc& requestHeader) const { + CAF_CM_FUNCNAME_VALIDATE("convertRequestHeader"); + CAF_CM_VALIDATE_SMARTPTR(requestHeader); + + const SmartPtrCRequestConfigDoc requestConfig = requestHeader->getRequestConfig(); + + SmartPtrCProviderRequestConfigDoc providerRequestConfig; + providerRequestConfig.CreateInstance(); + providerRequestConfig->initialize(requestConfig->getResponseFormatType(), + requestConfig->getLoggingLevelCollection()); + + SmartPtrCProviderRequestHeaderDoc providerRequestHeader; + providerRequestHeader.CreateInstance(); + providerRequestHeader->initialize(providerRequestConfig, + requestHeader->getEchoPropertyBag()); + + return providerRequestHeader; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CSinglePmeRequestSplitterInstance.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CSinglePmeRequestSplitterInstance.h new file mode 100644 index 000000000..9d80ddfca --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CSinglePmeRequestSplitterInstance.h @@ -0,0 +1,118 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CSinglePmeRequestSplitterInstance_h_ +#define CSinglePmeRequestSplitterInstance_h_ + +namespace Caf { + +// Moved the following typedefs from the class because Windows produced +// the warning "decorated name length exceeded, name was truncated" because +// their name included CSinglePmeRequestSplitterInstance. +struct CSplitterJob { + SmartPtrCFullyQualifiedClassGroupDoc _fqc; + SmartPtrCMgmtCollectInstancesDoc _mgmtCollectInstances; + SmartPtrCMgmtInvokeOperationDoc _mgmtInvokeOperation; +}; +CAF_DECLARE_SMART_POINTER(CSplitterJob); + +typedef std::deque CSplitterJobsCollection; +CAF_DECLARE_SMART_POINTER(CSplitterJobsCollection); + +typedef std::map CProviderJobsCollection; +CAF_DECLARE_SMART_POINTER(CProviderJobsCollection); + +class CSinglePmeRequestSplitterInstance : + public TCafSubSystemObjectRoot, + public IIntegrationObject, + public IIntegrationComponentInstance, + public IMessageSplitter { +private: + typedef std::deque CClassCollection; + CAF_DECLARE_SMART_POINTER(CClassCollection); + +public: + CSinglePmeRequestSplitterInstance(); + virtual ~CSinglePmeRequestSplitterInstance(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdSinglePmeRequestSplitterInstance) + + CAF_BEGIN_INTERFACE_MAP(CSinglePmeRequestSplitterInstance) + CAF_INTERFACE_ENTRY(IIntegrationObject) + CAF_INTERFACE_ENTRY(IIntegrationComponentInstance) + CAF_INTERFACE_ENTRY(IMessageSplitter) + CAF_END_INTERFACE_MAP() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // IMessageSplitter + SmartPtrCMessageCollection splitMessage( + const SmartPtrIIntMessage& message); + +private: + SmartPtrCProviderCollectSchemaRequestDoc createCollectSchemaRequest( + const SmartPtrCMgmtRequestDoc& mgmtRequest, + const SmartPtrCMgmtCollectSchemaDoc& mgmtCollectSchema, + const SmartPtrCProviderRequestHeaderDoc& providerRequestHeader, + const std::string& outputDir) const; + + SmartPtrCProviderRequestDoc createProviderRequest( + const SmartPtrCMgmtRequestDoc& mgmtRequest, + const SmartPtrCSplitterJobsCollection& jobsCollection, + const SmartPtrCProviderRequestHeaderDoc& providerRequestHeader, + const std::string& outputDir) const; + + void addCollectInstancesJobs( + const SmartPtrCMgmtCollectInstancesCollectionDoc& mgmtCollectInstancesCollection, + SmartPtrCProviderJobsCollection& providerJobsCollection) const; + + void addInvokeOperationJobs( + const SmartPtrCMgmtInvokeOperationCollectionDoc& mgmtInvokeOperationCollection, + SmartPtrCProviderJobsCollection& providerJobsCollection) const; + + SmartPtrCClassCollection resolveClassSpecifier( + const SmartPtrCClassSpecifierDoc& classSpecifier) const; + + std::string findProviderUri( + const SmartPtrCFullyQualifiedClassGroupDoc& fqc) const; + + void createDirectory( + const std::string& directory) const; + + void saveRequest( + const std::string& outputDir, + const SmartPtrCDynamicByteArray& payload) const; + + SmartPtrCProviderRequestHeaderDoc convertRequestHeader( + const SmartPtrCRequestHeaderDoc& requestHeader) const; + +private: + bool _isInitialized; + std::string _id; + SmartPtrCSchemaCacheManager _schemaCacheManager; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CSinglePmeRequestSplitterInstance); +}; + +} + +#endif // #ifndef CSinglePmeRequestSplitterInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CVersionTransformer.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CVersionTransformer.cpp new file mode 100644 index 000000000..08b07d4b6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CVersionTransformer.cpp @@ -0,0 +1,82 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CVersionTransformer.h" + +using namespace Caf; + +CVersionTransformer::CVersionTransformer() : + _isInitialized(false), + CAF_CM_INIT_LOG("CVersionTransformer") { +} + +CVersionTransformer::~CVersionTransformer() { +} + +void CVersionTransformer::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + CAF_CM_VALIDATE_STL_EMPTY(properties); + _ctorArgs = ctorArgs; + _properties = properties; + initialize(); + } + CAF_CM_EXIT; +} + +void CVersionTransformer::terminateBean() { +} + +void CVersionTransformer::initialize() { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _isInitialized = true; + } + CAF_CM_EXIT; +} + +bool CVersionTransformer::isResponsible( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("isResponsible"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + } + CAF_CM_EXIT; + + return false; +} + +SmartPtrIIntegrationObject CVersionTransformer::createObject( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("createObject"); + + SmartPtrIIntegrationObject rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + rc.CreateInstance(_sObjIdVersionTransformerInstance); + rc->initialize(_ctorArgs, _properties, configSection); + } + CAF_CM_EXIT; + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CVersionTransformer.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CVersionTransformer.h new file mode 100644 index 000000000..8158ddfc5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CVersionTransformer.h @@ -0,0 +1,58 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CVersionTransformer_h_ +#define CVersionTransformer_h_ + +namespace Caf { + +/// Sends responses/errors back to the client. +class CVersionTransformer : + public TCafSubSystemObjectRoot, + public IBean, + public IIntegrationComponent { +public: + CVersionTransformer(); + virtual ~CVersionTransformer(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdVersionTransformer) + + CAF_BEGIN_INTERFACE_MAP(CVersionTransformer) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IIntegrationComponent) + CAF_END_INTERFACE_MAP() + +public: + virtual void initialize(); + +public: // IBean + virtual void initializeBean(const IBean::Cargs& ctorArgs, const IBean::Cprops& properties); + + virtual void terminateBean(); + +public: // IIntegrationComponent + bool isResponsible( + const SmartPtrIDocument& configSection) const; + + SmartPtrIIntegrationObject createObject( + const SmartPtrIDocument& configSection) const; + +private: + bool _isInitialized; + IBean::Cargs _ctorArgs; + IBean::Cprops _properties; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CVersionTransformer); +}; + +} + +#endif // #ifndef CVersionTransformer_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CVersionTransformerInstance.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CVersionTransformerInstance.cpp new file mode 100644 index 000000000..2d529df06 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CVersionTransformerInstance.cpp @@ -0,0 +1,174 @@ +/* +G * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CVersionTransformerInstance.h" + +using namespace Caf; + +CVersionTransformerInstance::CVersionTransformerInstance() : + _isInitialized(false), + CAF_CM_INIT_LOG("CVersionTransformerInstance") { +} + +CVersionTransformerInstance::~CVersionTransformerInstance() { +} + +void CVersionTransformerInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + + _isInitialized = true; +} + +std::string CVersionTransformerInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _id; +} + +void CVersionTransformerInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); +} + +SmartPtrIIntMessage CVersionTransformerInstance::transformMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("transformMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(message); + + const SmartPtrCPayloadEnvelopeDoc payloadEnvelope = + CCafMessagePayloadParser::getPayloadEnvelope(message->getPayload()); + + SmartPtrIIntMessage rc = message; + rc = transformEnvelope(payloadEnvelope, rc); + rc = transformPayload(payloadEnvelope, rc); + + return rc; +} + +SmartPtrIIntMessage CVersionTransformerInstance::transformEnvelope( + const SmartPtrCPayloadEnvelopeDoc& payloadEnvelope, + const SmartPtrIIntMessage& message) const { + CAF_CM_FUNCNAME("transformEnvelope"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(payloadEnvelope); + CAF_CM_VALIDATE_SMARTPTR(message); + + const std::string payloadType = payloadEnvelope->getPayloadType(); + const std::string envelopeVersion = payloadEnvelope->getVersion(); + + std::string receivedMajorVersion; + std::string receivedMinorVersion; + parseVersion(payloadType, envelopeVersion, receivedMajorVersion, receivedMinorVersion); + + // Throwing an unsupported version exception is the last resort. + // If at all possible, transform the old version document into the + // new version. For example, if this is a v1.0 envelope, transform + // it into v1.1 and return it, otherwise throw an unsupported version + // exception. + const std::string expectedMajorVersion = "1"; + const std::string expectedMinorVersion = "0"; + if (receivedMajorVersion.compare(expectedMajorVersion) != 0) { + // Major version incompatibilities are not supported + CAF_CM_EXCEPTIONEX_VA5(UnsupportedVersionException, ERROR_NOT_SUPPORTED, + "Unsupported envelope major version - payloadType: %s, received: %s.%s, expected: %s.%s", + payloadType.c_str(), + receivedMajorVersion.c_str(), receivedMinorVersion.c_str(), + expectedMajorVersion.c_str(), expectedMinorVersion.c_str()); + } + if (receivedMinorVersion.compare(expectedMinorVersion) != 0) { + // Minor version incompatibilities are not supported + CAF_CM_EXCEPTIONEX_VA5(UnsupportedVersionException, ERROR_NOT_SUPPORTED, + "Unsupported envelope minor version - payloadType: %s, received: %s.%s, expected: %s.%s", + payloadType.c_str(), + receivedMajorVersion.c_str(), receivedMinorVersion.c_str(), + expectedMajorVersion.c_str(), expectedMinorVersion.c_str()); + } + + return message; +} + +SmartPtrIIntMessage CVersionTransformerInstance::transformPayload( + const SmartPtrCPayloadEnvelopeDoc& payloadEnvelope, + const SmartPtrIIntMessage& message) const { + CAF_CM_FUNCNAME("transformPayload"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(payloadEnvelope); + CAF_CM_VALIDATE_SMARTPTR(message); + + const std::string payloadType = payloadEnvelope->getPayloadType(); + const std::string payloadVersion = payloadEnvelope->getPayloadVersion(); + + std::string receivedMajorVersion; + std::string receivedMinorVersion; + parseVersion(payloadType, payloadVersion, receivedMajorVersion, receivedMinorVersion); + + // Throwing an unsupported version exception is the last resort. + // If at all possible, transform the old version document into the + // new version. For example, if this is a v1.0 mgmtRequest, transform + // it into v1.1 and return it, otherwise throw an unsupported version + // exception. The problem is that the payload is probably in an attachment + // that's been signed and encrypted, so it isn't available to be transformed. + // To handle this case, we'll probably do the enforcement here and the + // actual transformation later in the process when the payload has been + // verified and decrypted. + const std::string expectedMajorVersion = "1"; + const std::string expectedMinorVersion = "0"; + if (receivedMajorVersion.compare(expectedMajorVersion) != 0) { + // Major version incompatibilities are not supported + CAF_CM_EXCEPTIONEX_VA5(UnsupportedVersionException, ERROR_NOT_SUPPORTED, + "Unsupported payload major version - payloadType: %s, received: %s.%s, expected: %s.%s", + payloadType.c_str(), + receivedMajorVersion.c_str(), receivedMinorVersion.c_str(), + expectedMajorVersion.c_str(), expectedMinorVersion.c_str()); + } + if (receivedMinorVersion.compare(expectedMinorVersion) != 0) { + // Minor version incompatibilities are not supported + CAF_CM_EXCEPTIONEX_VA5(UnsupportedVersionException, ERROR_NOT_SUPPORTED, + "Unsupported payload minor version - payloadType: %s, received: %s.%s, expected: %s.%s", + payloadType.c_str(), + receivedMajorVersion.c_str(), receivedMinorVersion.c_str(), + expectedMajorVersion.c_str(), expectedMinorVersion.c_str()); + } + + return message; +} + +void CVersionTransformerInstance::parseVersion( + const std::string& messageType, + const std::string& version, + std::string& majorVersion, + std::string& minorVersion) const { + CAF_CM_FUNCNAME("parseVersion"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(messageType); + CAF_CM_VALIDATE_STRING(version); + + const Cdeqstr versionDeq = CStringUtils::split(version, '.'); + if (versionDeq.size() < 2) { + CAF_CM_EXCEPTION_VA2(ERROR_INVALID_DATA, + "Invalid version format - messageType: %s, version: %s", + messageType.c_str(), version.c_str()); + } + + majorVersion = versionDeq[0]; + minorVersion = versionDeq[1]; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CVersionTransformerInstance.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CVersionTransformerInstance.h new file mode 100644 index 000000000..727625a5e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CVersionTransformerInstance.h @@ -0,0 +1,75 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CVersionTransformerInstance_h_ +#define CVersionTransformerInstance_h_ + +namespace Caf { + +class CVersionTransformerInstance : + public TCafSubSystemObjectRoot, + public IIntegrationObject, + public IIntegrationComponentInstance, + public ITransformer { +public: + CVersionTransformerInstance(); + virtual ~CVersionTransformerInstance(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdVersionTransformerInstance) + + CAF_BEGIN_INTERFACE_MAP(CVersionTransformerInstance) + CAF_INTERFACE_ENTRY(IIntegrationObject) + CAF_INTERFACE_ENTRY(IIntegrationComponentInstance) + CAF_INTERFACE_ENTRY(ITransformer) + CAF_END_INTERFACE_MAP() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ITransformer + SmartPtrIIntMessage transformMessage( + const SmartPtrIIntMessage& message); + +private: + SmartPtrIIntMessage transformEnvelope( + const SmartPtrCPayloadEnvelopeDoc& payloadEnvelope, + const SmartPtrIIntMessage& message) const; + + SmartPtrIIntMessage transformPayload( + const SmartPtrCPayloadEnvelopeDoc& payloadEnvelope, + const SmartPtrIIntMessage& message) const; + + void parseVersion( + const std::string& payloadType, + const std::string& version, + std::string& majorVersion, + std::string& minorVersion) const; + +private: + bool _isInitialized; + std::string _id; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CVersionTransformerInstance); +}; + +} + +#endif // #ifndef CVersionTransformerInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/IntegrationObjects.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/IntegrationObjects.cpp new file mode 100644 index 000000000..3fabc1a3b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/IntegrationObjects.cpp @@ -0,0 +1,76 @@ +/* + * Created on: Nov 13, 2015 + * Author: bwilliams + * + * Copyright (c) 2015 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "IntegrationObjects.h" +#include "CPersistenceInboundChannelAdapterInstance.h" + +using namespace Caf::MaIntegration; + +IntegrationObjects::IntegrationObjects() : + CAF_CM_INIT("IntegrationObjects") { +} + +IntegrationObjects::~IntegrationObjects() { +} + +void IntegrationObjects::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + CAF_CM_VALIDATE_STL_EMPTY(properties); + _ctorArgs = ctorArgs; + _properties = properties; +} + +void IntegrationObjects::terminateBean() { +} + +bool IntegrationObjects::isResponsible( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("isResponsible"); + CAF_CM_VALIDATE_INTERFACE(configSection); + + const std::string name = configSection->getName(); + return (name.compare("persistence-inbound-channel-adapter") == 0) + || (name.compare("persistence-outbound-channel-adapter") == 0) + || (name.compare("configenv-inbound-channel-adapter") == 0) + || (name.compare("configenv-outbound-channel-adapter") == 0); +} + +SmartPtrIIntegrationObject IntegrationObjects::createObject( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME("createObject"); + CAF_CM_VALIDATE_INTERFACE(configSection); + + SmartPtrIIntegrationObject rc; + const std::string name = configSection->getName(); + if (name.compare("persistence-inbound-channel-adapter") == 0) { + SmartPtrCPersistenceInboundChannelAdapterInstance object; + object.CreateInstance(); + rc = object; + } else if (name.compare("persistence-outbound-channel-adapter") == 0) { + SmartPtrCPersistenceOutboundChannelAdapterInstance object; + object.CreateInstance(); + rc = object; + } else if (name.compare("configenv-inbound-channel-adapter") == 0) { + SmartPtrCConfigEnvInboundChannelAdapterInstance object; + object.CreateInstance(); + rc = object; + } else if (name.compare("configenv-outbound-channel-adapter") == 0) { + SmartPtrCConfigEnvOutboundChannelAdapterInstance object; + object.CreateInstance(); + rc = object; + } else { + CAF_CM_EXCEPTION_VA1(E_INVALIDARG, "Unknown name - %s", name.c_str()); + } + + rc->initialize(_ctorArgs, _properties, configSection); + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/IntegrationObjects.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/IntegrationObjects.h new file mode 100644 index 000000000..38432da98 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/IntegrationObjects.h @@ -0,0 +1,55 @@ +/* + * Created on: Nov 13, 2015 + * Author: bwilliams + * + * Copyright (c) 2015 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _MaIntegration_IntegrationObjects_h_ +#define _MaIntegration_IntegrationObjects_h_ + +namespace Caf { namespace MaIntegration { + +class IntegrationObjects : + public TCafSubSystemObjectRoot, + public IBean, + public IIntegrationComponent { +public: + IntegrationObjects(); + virtual ~IntegrationObjects(); + +public: + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdIntegrationObjects) + + CAF_BEGIN_INTERFACE_MAP(IntegrationObjects) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IIntegrationComponent) + CAF_END_INTERFACE_MAP() + +public: // IBean + void initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties); + + void terminateBean(); + +public: // IIntegrationComponent + bool isResponsible( + const SmartPtrIDocument& configSection) const; + + SmartPtrIIntegrationObject createObject( + const SmartPtrIDocument& configSection) const; + +private: + IBean::Cargs _ctorArgs; + IBean::Cprops _properties; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(IntegrationObjects); +}; + +}} + +#endif /* _MaIntegration_IntegrationObjects_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/MaIntegration.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/MaIntegration.cpp new file mode 100644 index 000000000..8866b9aac --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/MaIntegration.cpp @@ -0,0 +1,63 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "IntegrationObjects.h" + +namespace Caf { + +namespace MaIntegration { + const char* _sObjIdIntegrationObjects = "com.vmware.commonagent.maintegration.integrationobjects"; +}} + +CEcmSubSystemModule _Module; + +using namespace Caf::MaIntegration; + +CAF_BEGIN_OBJECT_MAP(ObjectMap) + CAF_OBJECT_ENTRY(CAttachmentRequestTransformer) + CAF_OBJECT_ENTRY(CAttachmentRequestTransformerInstance) + CAF_OBJECT_ENTRY(CCollectSchemaExecutor) + CAF_OBJECT_ENTRY(CConfigEnv) + CAF_OBJECT_ENTRY(CDiagToMgmtRequestTransformer) + CAF_OBJECT_ENTRY(CDiagToMgmtRequestTransformerInstance) + CAF_OBJECT_ENTRY(CInstallToMgmtRequestTransformer) + CAF_OBJECT_ENTRY(CInstallToMgmtRequestTransformerInstance) + CAF_OBJECT_ENTRY(CPersistenceNamespaceDb) + CAF_OBJECT_ENTRY(CProviderCollectSchemaExecutor) + CAF_OBJECT_ENTRY(CProviderExecutor) + CAF_OBJECT_ENTRY(CSinglePmeRequestSplitter) + CAF_OBJECT_ENTRY(CSinglePmeRequestSplitterInstance) + CAF_OBJECT_ENTRY(CVersionTransformer) + CAF_OBJECT_ENTRY(CVersionTransformerInstance) + CAF_OBJECT_ENTRY(IntegrationObjects) +CAF_END_OBJECT_MAP() + +CAF_DECLARE_SUBSYSTEM_EXPORTS() + +extern "C" BOOL APIENTRY DllMain(HINSTANCE hModule, uint32 dwReason, LPVOID) +{ + try { + if (DLL_PROCESS_ATTACH == dwReason) + { + // initialize the sub-system module + _Module.Init(ObjectMap, hModule); + } + else if (DLL_PROCESS_DETACH == dwReason) + { + // Terminate the sub-system module + _Module.Term(); + } + } catch (std::runtime_error) { + ::exit(2); + } catch (...) { + ::exit(2); + } + + return TRUE; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/MaIntegration.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/MaIntegration.h new file mode 100644 index 000000000..bc8ce3806 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/MaIntegration.h @@ -0,0 +1,19 @@ +/* + * Created on: Nov 11, 2015 + * Author: bwilliams + * + * Copyright (c) 2015 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _MaIntegration_h_ +#define _MaIntegration_h_ + +namespace Caf { + +/** @brief CAF AMQP Integration */ +namespace MaIntegration { + extern const char* _sObjIdIntegrationObjects; +}} + +#endif /* _MaIntegration_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/stdafx.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/stdafx.h new file mode 100644 index 000000000..e45ab2938 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/stdafx.h @@ -0,0 +1,61 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef stdafx_h_ +#define stdafx_h_ + +//{{CAF_SUBSYSTEM}} + +#include +#include +#include +#include +#include +#include + +#include +#include "MaIntegration.h" +#include "IntegrationObjects.h" + +#include "CAttachmentRequestTransformerInstance.h" +#include "CAttachmentRequestTransformer.h" + +#include "CDiagToMgmtRequestTransformerInstance.h" +#include "CDiagToMgmtRequestTransformer.h" + +#include "CInstallToMgmtRequestTransformerInstance.h" +#include "CInstallToMgmtRequestTransformer.h" + +#include "CPersistenceNamespaceDb.h" +#include "CPersistenceReadingMessageSource.h" +#include "CPersistenceMessageHandler.h" +#include "CPersistenceInboundChannelAdapterInstance.h" +#include "CPersistenceOutboundChannelAdapterInstance.h" + +#include "CConfigEnv.h" +#include "CConfigEnvReadingMessageSource.h" +#include "CConfigEnvMessageHandler.h" +#include "CConfigEnvInboundChannelAdapterInstance.h" +#include "CConfigEnvOutboundChannelAdapterInstance.h" + +#include "CSchemaCacheManager.h" +#include "CResponseFactory.h" + +#include "CCollectSchemaExecutor.h" +#include "CProviderCollectSchemaExecutor.h" +#include "CProviderExecutorRequest.h" +#include "CProviderExecutorRequestHandler.h" +#include "CProviderExecutor.h" + +#include "CSinglePmeRequestSplitter.h" +#include "CSinglePmeRequestSplitterInstance.h" + +#include "CVersionTransformer.h" +#include "CVersionTransformerInstance.h" + +#endif // #ifndef stdafx_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CGuestAuthenticator.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CGuestAuthenticator.cpp new file mode 100644 index 000000000..f61152b41 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CGuestAuthenticator.cpp @@ -0,0 +1,86 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CGuestAuthenticator.h" + +using namespace Caf; + +CGuestAuthenticator::CGuestAuthenticator() : + _isInitialized(false), + CAF_CM_INIT_LOG("CGuestAuthenticator") { +} + +CGuestAuthenticator::~CGuestAuthenticator() { +} + +void CGuestAuthenticator::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + CAF_CM_VALIDATE_STL(properties); + + _ctorArgs = ctorArgs; + _properties = properties; + + initialize(); + + CAF_CM_LOG_DEBUG_VA1("num properties - %d", properties.size()); + } + CAF_CM_EXIT; +} + +void CGuestAuthenticator::terminateBean() { +} + +void CGuestAuthenticator::initialize() { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _isInitialized = true; + } + CAF_CM_EXIT; +} + +bool CGuestAuthenticator::isResponsible( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("isResponsible"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + } + CAF_CM_EXIT; + + return false; +} + +SmartPtrIIntegrationObject CGuestAuthenticator::createObject( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("createObject"); + + SmartPtrIIntegrationObject rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + rc.CreateInstance(_sObjIdGuestAuthenticatorInstance); + rc->initialize(_ctorArgs, _properties, configSection); + } + CAF_CM_EXIT; + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CGuestAuthenticator.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CGuestAuthenticator.h new file mode 100644 index 000000000..c8e0e4d94 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CGuestAuthenticator.h @@ -0,0 +1,60 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CGuestAuthenticator_h_ +#define CGuestAuthenticator_h_ + +namespace Caf { + +/// Sends responses/errors back to the client. +class CGuestAuthenticator : + public TCafSubSystemObjectRoot, + public IBean, + public IIntegrationComponent { +public: + CGuestAuthenticator(); + virtual ~CGuestAuthenticator(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdGuestAuthenticator) + + CAF_BEGIN_INTERFACE_MAP(CGuestAuthenticator) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IIntegrationComponent) + CAF_END_INTERFACE_MAP() + +public: + virtual void initialize(); + +public: // IBean + virtual void initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties); + + virtual void terminateBean(); + +public: // IIntegrationComponent + bool isResponsible( + const SmartPtrIDocument& configSection) const; + + SmartPtrIIntegrationObject createObject( + const SmartPtrIDocument& configSection) const; + +private: + bool _isInitialized; + IBean::Cargs _ctorArgs; + IBean::Cprops _properties; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CGuestAuthenticator); +}; + +} + +#endif // #ifndef CGuestAuthenticator_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CGuestAuthenticatorInstance.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CGuestAuthenticatorInstance.cpp new file mode 100644 index 000000000..7be21a618 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CGuestAuthenticatorInstance.cpp @@ -0,0 +1,254 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CGuestAuthenticatorInstance.h" + +using namespace Caf; + +CGuestAuthenticatorInstance::CGuestAuthenticatorInstance() : + _isInitialized(false), + _beginImpersonation(false), + _endImpersonation(false), + CAF_CM_INIT_LOG("CGuestAuthenticatorInstance") { +} + +CGuestAuthenticatorInstance::~CGuestAuthenticatorInstance() { +} + +void CGuestAuthenticatorInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + CAF_CM_VALIDATE_STL(properties); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + + const std::string beginImpersonationStr = + findOptionalProperty("beginImpersonation", properties); + const std::string endImpersonationStr = + findOptionalProperty("endImpersonation", properties); + + _beginImpersonation = + (beginImpersonationStr.empty() || beginImpersonationStr.compare("false") == 0) ? false : true; + _endImpersonation = + (endImpersonationStr.empty() || endImpersonationStr.compare("false") == 0) ? false : true; + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +std::string CGuestAuthenticatorInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _id; + } + CAF_CM_EXIT; + + return rc; +} + +void CGuestAuthenticatorInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + } + CAF_CM_EXIT; +} + +SmartPtrIIntMessage CGuestAuthenticatorInstance::transformMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("transformMessage"); + + SmartPtrIIntMessage newMessage; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(message); + + CAF_CM_LOG_DEBUG_VA1("Called - id: \"%s\"", _id.c_str()); + + CIntMessageHeaders messageHeaders; + + const std::string vgAuthImpersonationStr = "vgAuthImpersonation"; + const SmartPtrICafObject cafObject = + message->findOptionalObjectHeader(vgAuthImpersonationStr); + if (cafObject.IsNull()) { + if (_endImpersonation) { + CAF_CM_LOG_ERROR_VA1("Cannot end impersonation without proper header - %s", + vgAuthImpersonationStr.c_str()); + } else { + SmartPtrCVgAuthInitializer vgAuthInitializer; + vgAuthInitializer.CreateInstance(); + vgAuthInitializer->initialize("CAF"); + const SmartPtrCVgAuthContext vgAuthContext = + vgAuthInitializer->getContext(); + + const std::string signedSamlToken = + getSignedSamlToken(message->getPayload()); + + SmartPtrCVgAuthUserHandle vgAuthUserHandle; + vgAuthUserHandle.CreateInstance(); + vgAuthUserHandle->initialize( + vgAuthContext, signedSamlToken); + + if (_beginImpersonation) { + logUserInfo("Before beginning impersonation"); + CVgAuthImpersonation::beginImpersonation(vgAuthContext, vgAuthUserHandle); + const std::string userName = vgAuthUserHandle->getUserName(vgAuthContext); + logUserInfo("After beginning impersonation"); + + messageHeaders.insertObject(vgAuthImpersonationStr, vgAuthInitializer); + messageHeaders.insertString("AUTHORITY", "IS_AUTHENTICATED_FULLY"); + messageHeaders.insertString("AUTHORITY_USERNAME", userName); + } + } + } else { + if (_endImpersonation) { + SmartPtrIVgAuthImpersonation vgAuthImpersonation; + vgAuthImpersonation.QueryInterface(cafObject, true); + CAF_CM_VALIDATE_SMARTPTR(vgAuthImpersonation); + + logUserInfo("Before ending impersonation"); + vgAuthImpersonation->endImpersonation(); + logUserInfo("After ending impersonation"); + + messageHeaders.insertString("AUTHORITY", "IS_AUTHENTICATED_ANONYMOUSLY"); + messageHeaders.insertString("AUTHORITY_USERNAME", "ANONYMOUS"); + } else { + CAF_CM_LOG_WARN_VA1("Headers contain impersonation interface, but the ending of impersonation was not requested - %s", + vgAuthImpersonationStr.c_str()); + } + + //messageHeaders.insertObject(vgAuthImpersonationStr, SmartPtrICafObject()); + } + + SmartPtrCIntMessage messageImpl; + messageImpl.CreateInstance(); + messageImpl->initialize(message->getPayload(), + messageHeaders.getHeaders(), message->getHeaders()); + newMessage = messageImpl; + } + CAF_CM_EXIT; + + return newMessage; +} + +SmartPtrIIntMessage CGuestAuthenticatorInstance::processErrorMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME("processErrorMessage"); + + SmartPtrIIntMessage newMessage; + + try { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(message); + + CAF_CM_LOG_DEBUG_VA1("Called - %s", _id.c_str()); + + newMessage = transformMessage(message); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + + return newMessage; +} + +std::string CGuestAuthenticatorInstance::getSignedSamlToken( + const SmartPtrCDynamicByteArray& payload) const { + CAF_CM_FUNCNAME_VALIDATE("getSignedSamlToken"); + + std::string signedSamlToken; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(payload); + + const SmartPtrCCafMessagePayload cafMessagePayload = + CCafMessagePayload::create(payload); + + const SmartPtrCRequestHeaderDoc requestHeader = + cafMessagePayload->getRequestHeader(); + const SmartPtrCAuthnAuthzCollectionDoc authnAuthzCollection = + requestHeader->getAuthnAuthzCollection(); + CAF_CM_VALIDATE_SMARTPTR(authnAuthzCollection); + CAF_CM_VALIDATE_STL(authnAuthzCollection->getAuthnAuthz()); + + //TODO: Pass the other types (e.g. username / password) to VgAuth. + //TODO: Use the sequence number to prioritize the types. + //TODO: Consider creating a type for the string "SAML" + for (std::deque::const_iterator authnAuthzIter = + authnAuthzCollection->getAuthnAuthz().begin(); + authnAuthzIter != authnAuthzCollection->getAuthnAuthz().end(); + authnAuthzIter++) { + const SmartPtrCAuthnAuthzDoc authnAuthz = *authnAuthzIter; + if (authnAuthz->getType().compare("SAML") == 0) { + signedSamlToken = authnAuthz->getValue(); + } + } + + CAF_CM_VALIDATE_STRING(signedSamlToken); + } + CAF_CM_EXIT; + + return signedSamlToken; +} + +std::string CGuestAuthenticatorInstance::findOptionalProperty( + const std::string& propertyName, + const IBean::Cprops& properties) const { + CAF_CM_FUNCNAME_VALIDATE("findOptionalProperty"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(propertyName); + CAF_CM_VALIDATE_STL(properties); + + IBean::Cprops::const_iterator propertiesIter = properties.find(propertyName); + if (propertiesIter != properties.end()) { + rc = propertiesIter->second; + } + } + CAF_CM_EXIT; + + return rc; +} + +void CGuestAuthenticatorInstance::logUserInfo( + const std::string& msg) const { + CAF_CM_FUNCNAME_VALIDATE("logUserInfo"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(msg); + +#ifndef WIN32 + CAF_CM_LOG_DEBUG_VA3("%s - UID: %d, GID: %d", msg.c_str(), ::geteuid(), ::getegid()); +#endif + } + CAF_CM_EXIT; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CGuestAuthenticatorInstance.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CGuestAuthenticatorInstance.h new file mode 100644 index 000000000..4ab2a053b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CGuestAuthenticatorInstance.h @@ -0,0 +1,79 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CGuestAuthenticatorInstance_h_ +#define CGuestAuthenticatorInstance_h_ + +namespace Caf { + +class CGuestAuthenticatorInstance : + public TCafSubSystemObjectRoot, + public IIntegrationObject, + public IIntegrationComponentInstance, + public ITransformer, + public IErrorProcessor { +public: + CGuestAuthenticatorInstance(); + virtual ~CGuestAuthenticatorInstance(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdGuestAuthenticatorInstance) + + CAF_BEGIN_INTERFACE_MAP(CGuestAuthenticatorInstance) + CAF_INTERFACE_ENTRY(IIntegrationObject) + CAF_INTERFACE_ENTRY(IIntegrationComponentInstance) + CAF_INTERFACE_ENTRY(ITransformer) + CAF_INTERFACE_ENTRY(IErrorProcessor) + CAF_END_INTERFACE_MAP() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ITransformer + SmartPtrIIntMessage transformMessage( + const SmartPtrIIntMessage& message); + +public: // IErrorProcessor + SmartPtrIIntMessage processErrorMessage( + const SmartPtrIIntMessage& message); + +private: + bool _isInitialized; + std::string _id; + bool _beginImpersonation; + bool _endImpersonation; + +private: + std::string getSignedSamlToken( + const SmartPtrCDynamicByteArray& payload) const; + + std::string findOptionalProperty( + const std::string& propertyName, + const IBean::Cprops& properties) const; + + void logUserInfo( + const std::string& msg) const; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CGuestAuthenticatorInstance); +}; + +} + +#endif // #ifndef CGuestAuthenticatorInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthContext.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthContext.cpp new file mode 100644 index 000000000..cfae14000 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthContext.cpp @@ -0,0 +1,62 @@ +/* + * Author: bwilliams + * Created: Aug 16, 2012 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CVgAuthContext.h" + +CVgAuthContext::CVgAuthContext() : + _isInitialized(false), + _vgAuthContext(NULL), + CAF_CM_INIT_LOG("CVgAuthContext") { +} + +CVgAuthContext::~CVgAuthContext() { + CAF_CM_FUNCNAME("~CVgAuthContext"); + + try { + if (_isInitialized) { + const VGAuthError vgAuthError = VGAuth_Shutdown(_vgAuthContext); + CVgAuthError::checkErrorExc(vgAuthError, "VGAuth_Shutdown Failed"); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; +} + +void CVgAuthContext::initialize( + const std::string& applicationName) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(applicationName); + + const VGAuthError vgAuthError = VGAuth_Init(applicationName.c_str(), 0, NULL, &_vgAuthContext); + CVgAuthError::checkErrorExc(vgAuthError, "VGAuth_Init Failed", applicationName); + CAF_CM_VALIDATE_PTR(_vgAuthContext); + + _applicationName = applicationName; + _isInitialized = true; + } + CAF_CM_EXIT; +} + +VGAuthContext* CVgAuthContext::getPtr() const { + CAF_CM_FUNCNAME_VALIDATE("getPtr"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _vgAuthContext; +} + +std::string CVgAuthContext::getApplicationName() const { + CAF_CM_FUNCNAME_VALIDATE("getApplicationName"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _applicationName; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthContext.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthContext.h new file mode 100644 index 000000000..6a50889a5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthContext.h @@ -0,0 +1,42 @@ +/* + * Author: bwilliams + * Created: Aug 16, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CVgAuthContext_H_ +#define CVgAuthContext_H_ + +namespace Caf { + +class CVgAuthContext { +public: + CVgAuthContext(); + virtual ~CVgAuthContext(); + +public: + void initialize( + const std::string& applicationName); + + VGAuthContext* getPtr() const; + + std::string getApplicationName() const; + +private: + bool _isInitialized; + VGAuthContext* _vgAuthContext; + std::string _applicationName; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CVgAuthContext); +}; + +CAF_DECLARE_SMART_POINTER(CVgAuthContext); + +} + +#endif /* CVgAuthContext_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthError.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthError.cpp new file mode 100644 index 000000000..447d9e94a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthError.cpp @@ -0,0 +1,214 @@ +/* + * Author: bwilliams + * Created: Jan 21, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CVgAuthError.h" + +using namespace Caf; + +void CVgAuthError::checkErrorExc( + const VGAuthError& vgAuthError, + const std::string& msg) { + CAF_CM_STATIC_FUNC("CVgAuthError", "checkErrorExc"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(msg); + + if (VGAUTH_FAILED(vgAuthError)) { + CAF_CM_EXCEPTIONEX_VA2(UnsupportedOperationException, getErrorCode(vgAuthError), + "%s (%s)", msg.c_str(), getErrorMsg(vgAuthError).c_str()); + } + } + CAF_CM_EXIT; +} + +void CVgAuthError::checkErrorExc( + const VGAuthError& vgAuthError, + const std::string& msg, + const std::string& addtlInfo) { + CAF_CM_STATIC_FUNC("CVgAuthError", "checkErrorExc"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(msg); + CAF_CM_VALIDATE_STRING(addtlInfo); + + if (VGAUTH_FAILED(vgAuthError)) { + CAF_CM_EXCEPTIONEX_VA3(UnsupportedOperationException, getErrorCode(vgAuthError), + "%s (%s) - %s", msg.c_str(), getErrorMsg(vgAuthError).c_str(), addtlInfo.c_str()); + } + } + CAF_CM_EXIT; +} + +void CVgAuthError::checkErrorErr( + const VGAuthError& vgAuthError, + const std::string& msg) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CVgAuthError", "checkErrorErr"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(msg); + + if (VGAUTH_FAILED(vgAuthError)) { + CAF_CM_LOG_ERROR_VA2("%s (%s)", msg.c_str(), getErrorMsg(vgAuthError).c_str()); + } + } + CAF_CM_EXIT; +} + +void CVgAuthError::checkErrorErr( + const VGAuthError& vgAuthError, + const std::string& msg, + const std::string& addtlInfo) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CVgAuthError", "checkErrorErr"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(msg); + CAF_CM_VALIDATE_STRING(addtlInfo); + + if (VGAUTH_FAILED(vgAuthError)) { + CAF_CM_LOG_ERROR_VA3("%s (%s) - %s", msg.c_str(), getErrorMsg(vgAuthError).c_str(), addtlInfo.c_str()); + } + } + CAF_CM_EXIT; +} + +std::string CVgAuthError::getErrorMsg( + const VGAuthError& vgAuthError) { + + std::string vgAuthErrorMsg; + + CAF_CM_ENTER { + switch(vgAuthError) { + case VGAUTH_E_OK: + vgAuthErrorMsg = "VGAUTH_E_OK"; + break; + case VGAUTH_E_FAIL: + vgAuthErrorMsg = "VGAUTH_E_FAIL"; + break; + case VGAUTH_E_INVALID_ARGUMENT: + vgAuthErrorMsg = "VGAUTH_E_INVALID_ARGUMENT"; + break; + case VGAUTH_E_INVALID_CERTIFICATE: + vgAuthErrorMsg = "VGAUTH_E_INVALID_CERTIFICATE"; + break; + case VGAUTH_E_PERMISSION_DENIED: + vgAuthErrorMsg = "VGAUTH_E_PERMISSION_DENIED"; + break; + case VGAUTH_E_OUT_OF_MEMORY: + vgAuthErrorMsg = "VGAUTH_E_OUT_OF_MEMORY"; + break; + case VGAUTH_E_COMM: + vgAuthErrorMsg = "VGAUTH_E_COMM"; + break; + case VGAUTH_E_NOTIMPLEMENTED: + vgAuthErrorMsg = "VGAUTH_E_NOTIMPLEMENTED"; + break; + case VGAUTH_E_NOT_CONNECTED: + vgAuthErrorMsg = "VGAUTH_E_NOT_CONNECTED"; + break; + case VGAUTH_E_VERSION_MISMATCH: + vgAuthErrorMsg = "VGAUTH_E_VERSION_MISMATCH"; + break; + case VGAUTH_E_SECURITY_VIOLATION: + vgAuthErrorMsg = "VGAUTH_E_SECURITY_VIOLATION"; + break; + case VGAUTH_E_CERT_ALREADY_EXISTS: + vgAuthErrorMsg = "VGAUTH_E_CERT_ALREADY_EXISTS"; + break; + case VGAUTH_E_AUTHENTICATION_DENIED: + vgAuthErrorMsg = "VGAUTH_E_AUTHENTICATION_DENIED"; + break; + case VGAUTH_E_INVALID_TICKET: + vgAuthErrorMsg = "VGAUTH_E_INVALID_TICKET"; + break; + case VGAUTH_E_MULTIPLE_MAPPINGS: + vgAuthErrorMsg = "VGAUTH_E_MULTIPLE_MAPPINGS"; + break; + case VGAUTH_E_ALREADY_IMPERSONATING: + vgAuthErrorMsg = "VGAUTH_E_ALREADY_IMPERSONATING"; + break; + case VGAUTH_E_NO_SUCH_USER: + vgAuthErrorMsg = "VGAUTH_E_NO_SUCH_USER"; + break; + case VGAUTH_E_SERVICE_NOT_RUNNING: + vgAuthErrorMsg = "VGAUTH_E_SERVICE_NOT_RUNNING"; + break; + case VGAUTH_E_SYSTEM_ERRNO: + { + const uint32 vgAuthErrorCode = VGAUTH_ERROR_EXTRA_ERROR(vgAuthError); + const std::string errorMsg = CStringConv::toString(vgAuthErrorCode); + vgAuthErrorMsg = std::string("VGAUTH_E_SYSTEM_ERRNO, msg: " + errorMsg); + } + break; + case VGAUTH_E_SYSTEM_WINDOWS: + { + const uint32 vgAuthErrorCode = VGAUTH_ERROR_EXTRA_ERROR(vgAuthError); +#ifdef WIN32 + const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(vgAuthErrorCode); +#else + const std::string errorMsg = CStringConv::toString(vgAuthErrorCode); +#endif + vgAuthErrorMsg = std::string("VGAUTH_E_SYSTEM_WINDOWS, msg: " + errorMsg); + } + break; + case VGAUTH_E_TOO_MANY_CONNECTIONS: + vgAuthErrorMsg = "VGAUTH_E_TOO_MANY_CONNECTIONS"; + break; + case VGAUTH_E_UNSUPPORTED: + vgAuthErrorMsg = "VGAUTH_E_UNSUPPORTED"; + break; + default: + vgAuthErrorMsg = "Unknown"; + } + } + CAF_CM_EXIT; + + return vgAuthErrorMsg; +} + +uint32 CVgAuthError::getErrorCode( + const VGAuthError& vgAuthError) { + + uint32 vgAuthErrorCode; + + CAF_CM_ENTER { + switch(vgAuthError) { + case VGAUTH_E_OK: + case VGAUTH_E_FAIL: + case VGAUTH_E_INVALID_ARGUMENT: + case VGAUTH_E_INVALID_CERTIFICATE: + case VGAUTH_E_PERMISSION_DENIED: + case VGAUTH_E_OUT_OF_MEMORY: + case VGAUTH_E_COMM: + case VGAUTH_E_NOTIMPLEMENTED: + case VGAUTH_E_NOT_CONNECTED: + case VGAUTH_E_VERSION_MISMATCH: + case VGAUTH_E_SECURITY_VIOLATION: + case VGAUTH_E_CERT_ALREADY_EXISTS: + case VGAUTH_E_AUTHENTICATION_DENIED: + case VGAUTH_E_INVALID_TICKET: + case VGAUTH_E_MULTIPLE_MAPPINGS: + case VGAUTH_E_ALREADY_IMPERSONATING: + case VGAUTH_E_NO_SUCH_USER: + case VGAUTH_E_SERVICE_NOT_RUNNING: + case VGAUTH_E_TOO_MANY_CONNECTIONS: + case VGAUTH_E_UNSUPPORTED: + vgAuthErrorCode = VGAUTH_ERROR_CODE(vgAuthError); + break; + case VGAUTH_E_SYSTEM_ERRNO: + case VGAUTH_E_SYSTEM_WINDOWS: + vgAuthErrorCode = VGAUTH_ERROR_EXTRA_ERROR(vgAuthError); + break; + default: + vgAuthErrorCode = E_UNEXPECTED; + } + } + CAF_CM_EXIT; + + return vgAuthErrorCode; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthError.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthError.h new file mode 100644 index 000000000..e723902dd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthError.h @@ -0,0 +1,46 @@ +/* + * Author: bwilliams + * Created: Jan 21, 2011 + * + * Copyright (c) 2011 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CVgAuthError_H_ +#define CVgAuthError_H_ + +namespace Caf { + +class CVgAuthError { +public: + static void checkErrorExc( + const VGAuthError& vgAuthError, + const std::string& msg); + + static void checkErrorExc( + const VGAuthError& vgAuthError, + const std::string& msg, + const std::string& addtlInfo); + + static void checkErrorErr( + const VGAuthError& vgAuthError, + const std::string& msg); + + static void checkErrorErr( + const VGAuthError& vgAuthError, + const std::string& msg, + const std::string& addtlInfo); + + static std::string getErrorMsg( + const VGAuthError& vgAuthError); + + static uint32 getErrorCode( + const VGAuthError& vgAuthError); + +private: + CAF_CM_DECLARE_NOCREATE(CVgAuthError); +}; + +} + +#endif /* CVgAuthError_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthImpersonation.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthImpersonation.cpp new file mode 100644 index 000000000..f954f42ce --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthImpersonation.cpp @@ -0,0 +1,80 @@ +/* + * Author: bwilliams + * Created: Aug 16, 2012 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CVgAuthImpersonation.h" + +CVgAuthImpersonation::CVgAuthImpersonation() : + _isInitialized(false), + CAF_CM_INIT_LOG("CVgAuthImpersonation") { +} + +CVgAuthImpersonation::~CVgAuthImpersonation() { + CAF_CM_FUNCNAME("~CVgAuthImpersonation"); + + try { + if (_isInitialized) { + endImpersonation(_vgAuthContext); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; +} + +void CVgAuthImpersonation::impersonateAndManage( + const SmartPtrCVgAuthContext& vgAuthContext, + const SmartPtrCVgAuthUserHandle& vgAuthUserHandle) { + CAF_CM_FUNCNAME_VALIDATE("impersonateAndManage"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(vgAuthContext); + CAF_CM_VALIDATE_SMARTPTR(vgAuthUserHandle); + + beginImpersonation(vgAuthContext, vgAuthUserHandle); + + _vgAuthContext = vgAuthContext; + _isInitialized = true; + } + CAF_CM_EXIT; +} + +void CVgAuthImpersonation::beginImpersonation( + const SmartPtrCVgAuthContext& vgAuthContext, + const SmartPtrCVgAuthUserHandle& vgAuthUserHandle) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CVgAuthImpersonation", "beginImpersonation"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(vgAuthContext); + CAF_CM_VALIDATE_SMARTPTR(vgAuthUserHandle); + + const std::string userName = vgAuthUserHandle->getUserName(vgAuthContext); + CAF_CM_LOG_DEBUG_VA1("Beginning impersonation - %s", userName.c_str()); + + const VGAuthError vgAuthError = VGAuth_Impersonate( + vgAuthContext->getPtr(), vgAuthUserHandle->getPtr(), 0, NULL); + CVgAuthError::checkErrorExc(vgAuthError, "VGAuth_Impersonate Failed"); + } + CAF_CM_EXIT; +} + +void CVgAuthImpersonation::endImpersonation( + const SmartPtrCVgAuthContext& vgAuthContext) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CVgAuthImpersonation", "endImpersonation"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(vgAuthContext); + + CAF_CM_LOG_DEBUG_VA0("Ending impersonation"); + + const VGAuthError vgAuthError = VGAuth_EndImpersonation(vgAuthContext->getPtr()); + CVgAuthError::checkErrorExc(vgAuthError, "VGAuth_EndImpersonation Failed"); + } + CAF_CM_EXIT; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthImpersonation.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthImpersonation.h new file mode 100644 index 000000000..9f3e43e3d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthImpersonation.h @@ -0,0 +1,51 @@ +/* + * Author: bwilliams + * Created: Aug 16, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CVgAuthImpersonation_H_ +#define CVgAuthImpersonation_H_ + +namespace Caf { + +class CVgAuthImpersonation { +public: + CVgAuthImpersonation(); + virtual ~CVgAuthImpersonation(); + +public: + void impersonateAndManage( + const SmartPtrCVgAuthContext& vgAuthContext, + const SmartPtrCVgAuthUserHandle& vgAuthUserHandle); + +public: + static void beginImpersonation( + const SmartPtrCVgAuthContext& vgAuthContext, + const SmartPtrCVgAuthUserHandle& vgAuthUserHandle); + + static void endImpersonation( + const SmartPtrCVgAuthContext& vgAuthContext); + +private: + void impersonateLocal( + const SmartPtrCVgAuthContext& vgAuthContext, + const SmartPtrCVgAuthUserHandle& vgAuthUserHandle) const; + +private: + bool _isInitialized; + SmartPtrCVgAuthContext _vgAuthContext; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CVgAuthImpersonation); +}; + +CAF_DECLARE_SMART_POINTER(CVgAuthImpersonation); + +} + +#endif /* CVgAuthImpersonation_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthInitializer.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthInitializer.cpp new file mode 100644 index 000000000..6563ef050 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthInitializer.cpp @@ -0,0 +1,118 @@ +/* + * Author: bwilliams + * Created: Aug 16, 2012 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CVgAuthInitializer.h" + +CVgAuthInitializer::CVgAuthInitializer() : + _isInitialized(false), + CAF_CM_INIT_LOG("CVgAuthInitializer") { +} + +CVgAuthInitializer::~CVgAuthInitializer() { +} + +void CVgAuthInitializer::initialize( + const std::string& applicationName) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(applicationName); + + VGAuth_SetLogHandler(logHandler, NULL, 0, NULL); + + _vgAuthContext.CreateInstance(); + _vgAuthContext->initialize(applicationName); + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +SmartPtrCVgAuthContext CVgAuthInitializer::getContext() const { + CAF_CM_FUNCNAME_VALIDATE("initializeThirdParty"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _vgAuthContext; +} + +void CVgAuthInitializer::installClient() const { + CAF_CM_FUNCNAME_VALIDATE("installClient"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const VGAuthError vgAuthError = VGAuth_InstallClient(_vgAuthContext->getPtr(), 0, NULL); + CVgAuthError::checkErrorExc(vgAuthError, "VGAuth_InstallClient Failed", _vgAuthContext->getApplicationName()); + } + CAF_CM_EXIT; +} + +void CVgAuthInitializer::uninstallClient() const { + CAF_CM_FUNCNAME_VALIDATE("uninstallClient"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const VGAuthError vgAuthError = VGAuth_UninstallClient(_vgAuthContext->getPtr(), 0, NULL); + CVgAuthError::checkErrorExc(vgAuthError, "VGAuth_UninstallClient Failed", _vgAuthContext->getApplicationName()); + } + CAF_CM_EXIT; +} + +void CVgAuthInitializer::endImpersonation() { + CAF_CM_FUNCNAME_VALIDATE("endImpersonation"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CVgAuthImpersonation::endImpersonation(_vgAuthContext); + } + CAF_CM_EXIT; +} + +void CVgAuthInitializer::logHandler( + const char *logDomain, + int32 logLevel, + const char *msg, + void *userData) { + CAF_CM_STATIC_FUNC_LOG_ONLY("CVgAuthInitializer", "logHandler"); + + CAF_CM_ENTER { + switch (logLevel & G_LOG_LEVEL_MASK) { + case G_LOG_LEVEL_ERROR: + CAF_CM_LOG_ERROR_VA2("[ERROR][%s] %s", logDomain ? logDomain : "", msg); + break; + + case G_LOG_LEVEL_CRITICAL: + CAF_CM_LOG_ERROR_VA2("[CRITICAL][%s] %s", logDomain ? logDomain : "", msg); + break; + + case G_LOG_LEVEL_WARNING: + CAF_CM_LOG_WARN_VA2("[WARNING][%s] %s", logDomain ? logDomain : "", msg); + break; + + case G_LOG_LEVEL_INFO: + CAF_CM_LOG_INFO_VA2("[INFO][%s] %s", logDomain ? logDomain : "", msg); + break; + + case G_LOG_LEVEL_MESSAGE: + CAF_CM_LOG_DEBUG_VA2("[MESSAGE][%s] %s", logDomain ? logDomain : "", msg); + break; + + case G_LOG_LEVEL_DEBUG: + CAF_CM_LOG_DEBUG_VA2("[DEBUG][%s] %s", logDomain ? logDomain : "", msg); + break; + + default: + CAF_CM_LOG_WARN_VA2("[default][%s] %s", logDomain ? logDomain : "", msg); + } + } + CAF_CM_EXIT; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthInitializer.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthInitializer.h new file mode 100644 index 000000000..c6b3fab86 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthInitializer.h @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: Aug 16, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CVGAUTHINITIALIZER_H_ +#define CVGAUTHINITIALIZER_H_ + +namespace Caf { + +class CVgAuthInitializer : public IVgAuthImpersonation { +public: + CVgAuthInitializer(); + virtual ~CVgAuthInitializer(); + + CAF_BEGIN_QI() + CAF_QI_ENTRY(ICafObject) + CAF_QI_ENTRY(IVgAuthImpersonation) + CAF_END_QI() + +public: + void initialize( + const std::string& applicationName); + +public: + SmartPtrCVgAuthContext getContext() const; + void installClient() const; + void uninstallClient() const; + +public: // IVgAuthImpersonation + void endImpersonation(); + +private: + static void logHandler( + const char *logDomain, + int32 logLevel, + const char *msg, + void *userData); + +private: + bool _isInitialized; + SmartPtrCVgAuthContext _vgAuthContext; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CVgAuthInitializer); +}; + +CAF_DECLARE_SMART_QI_POINTER(CVgAuthInitializer); + +} + +#endif /* CVGAUTHINITIALIZER_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthUserHandle.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthUserHandle.cpp new file mode 100644 index 000000000..a404a5293 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthUserHandle.cpp @@ -0,0 +1,101 @@ +/* + * Author: bwilliams + * Created: Aug 16, 2012 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CVgAuthUserHandle.h" + +CVgAuthUserHandle::CVgAuthUserHandle() : + _isInitialized(false), + _vgAuthUserHandle(NULL), + CAF_CM_INIT_LOG("CVgAuthUserHandle") { +} + +CVgAuthUserHandle::~CVgAuthUserHandle() { + CAF_CM_FUNCNAME("~CVgAuthUserHandle"); + + try { + if (_isInitialized) { + VGAuth_UserHandleFree(_vgAuthUserHandle); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; +} + +void CVgAuthUserHandle::initialize( + const SmartPtrCVgAuthContext& vgAuthContext, + const std::string& signedSamlToken) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(vgAuthContext); + CAF_CM_VALIDATE_STRING(signedSamlToken); + + const VGAuthError vgAuthError = VGAuth_ValidateSamlBearerToken(vgAuthContext->getPtr(), + signedSamlToken.c_str(), NULL, 0, NULL, &_vgAuthUserHandle); + CVgAuthError::checkErrorExc(vgAuthError, "VGAuth_ValidateSamlBearerToken Failed"); + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +void CVgAuthUserHandle::initialize( + const SmartPtrCVgAuthContext& vgAuthContext, + const std::string& signedSamlToken, + const std::string& userName) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(vgAuthContext); + CAF_CM_VALIDATE_STRING(signedSamlToken); + CAF_CM_VALIDATE_STRING(userName); + + const VGAuthError vgAuthError = VGAuth_ValidateSamlBearerToken(vgAuthContext->getPtr(), + signedSamlToken.c_str(), userName.c_str(), 0, NULL, &_vgAuthUserHandle); + CVgAuthError::checkErrorExc(vgAuthError, "VGAuth_ValidateSamlBearerToken Failed", userName); + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +std::string CVgAuthUserHandle::getUserName( + const SmartPtrCVgAuthContext& vgAuthContext) const { + CAF_CM_FUNCNAME_VALIDATE("getUserName"); + + std::string userNameRc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(vgAuthContext); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + char* userName = NULL; + const VGAuthError vgAuthError = VGAuth_UserHandleUsername(vgAuthContext->getPtr(), + _vgAuthUserHandle, &userName); + CVgAuthError::checkErrorExc(vgAuthError, "VGAuth_UserHandleUsername Failed"); + CAF_CM_VALIDATE_PTR(userName); + + userNameRc = userName; + + VGAuth_FreeBuffer(userName); + } + CAF_CM_EXIT; + + return userNameRc; +} + +VGAuthUserHandle* CVgAuthUserHandle::getPtr() const { + CAF_CM_FUNCNAME_VALIDATE("getPtr"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _vgAuthUserHandle; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthUserHandle.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthUserHandle.h new file mode 100644 index 000000000..1cd9bfe18 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthUserHandle.h @@ -0,0 +1,49 @@ +/* + * Author: bwilliams + * Created: Aug 16, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CVgAuthUserHandle_H_ +#define CVgAuthUserHandle_H_ + +namespace Caf { + +class CVgAuthUserHandle { +public: + CVgAuthUserHandle(); + virtual ~CVgAuthUserHandle(); + +public: + void initialize( + const SmartPtrCVgAuthContext& vgAuthContext, + const std::string& signedSamlToken); + + void initialize( + const SmartPtrCVgAuthContext& vgAuthContext, + const std::string& signedSamlToken, + const std::string& userName); + +public: + std::string getUserName( + const SmartPtrCVgAuthContext& vgAuthContext) const; + + VGAuthUserHandle* getPtr() const; + +private: + bool _isInitialized; + VGAuthUserHandle* _vgAuthUserHandle; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CVgAuthUserHandle); +}; + +CAF_DECLARE_SMART_POINTER(CVgAuthUserHandle); + +} + +#endif /* CVgAuthUserHandle_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/IVgAuthImpersonation.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/IVgAuthImpersonation.h new file mode 100644 index 000000000..3b6929632 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/IVgAuthImpersonation.h @@ -0,0 +1,26 @@ +/* + * Created on: Jan 25, 2012 + * Author: mdonahue + * + * Copyright (c) 2012 VMware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _IVgAuthImpersonation_H_ +#define _IVgAuthImpersonation_H_ + +namespace Caf { + +struct __declspec(novtable) + IVgAuthImpersonation : public ICafObject +{ + CAF_DECL_UUID("63cfac22-e1b8-4977-8907-9582657b7420") + + virtual void endImpersonation() = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IVgAuthImpersonation); + +} + +#endif /* _IVgAuthImpersonation_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/VgAuthIntegration.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/VgAuthIntegration.cpp new file mode 100644 index 000000000..c00a131ab --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/VgAuthIntegration.cpp @@ -0,0 +1,49 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" + +namespace Caf { + const char* _sObjIdGuestAuthenticatorInstance = "com.vmware.commonagent.maintegration.guestauthenticatorinstance"; + const char* _sObjIdGuestAuthenticator = "com.vmware.commonagent.maintegration.guestauthenticator"; +} + +using namespace Caf; + +CEcmSubSystemModule _Module; + +CAF_BEGIN_OBJECT_MAP(ObjectMap) +#ifndef __APPLE__ + CAF_OBJECT_ENTRY(CGuestAuthenticator) + CAF_OBJECT_ENTRY(CGuestAuthenticatorInstance) +#endif +CAF_END_OBJECT_MAP() + +CAF_DECLARE_SUBSYSTEM_EXPORTS() + +extern "C" BOOL APIENTRY DllMain(HINSTANCE hModule, uint32 dwReason, LPVOID) +{ + try { + if (DLL_PROCESS_ATTACH == dwReason) + { + // initialize the sub-system module + _Module.Init(ObjectMap, hModule); + } + else if (DLL_PROCESS_DETACH == dwReason) + { + // Terminate the sub-system module + _Module.Term(); + } + } catch (std::runtime_error) { + ::exit(2); + } catch (...) { + ::exit(2); + } + + return TRUE; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/stdafx.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/stdafx.h new file mode 100644 index 000000000..7083b7433 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/stdafx.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (c) 2010 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef stdafx_h_ +#define stdafx_h_ + +namespace Caf { + extern const char* _sObjIdGuestAuthenticatorInstance; + extern const char* _sObjIdGuestAuthenticator; +} + +#include +#include +#include +#include +#include +#include + +#ifndef __APPLE__ +#include + +#include "IVgAuthImpersonation.h" +#include "CVgAuthError.h" +#include "CVgAuthContext.h" +#include "CVgAuthUserHandle.h" +#include "CVgAuthImpersonation.h" +#include "CVgAuthInitializer.h" +#include "CGuestAuthenticatorInstance.h" +#include "CGuestAuthenticator.h" +#endif + +#endif // #ifndef stdafx_h_ diff --git a/open-vm-tools/common-agent/Cpp/ProviderFx/Makefile.am b/open-vm-tools/common-agent/Cpp/ProviderFx/Makefile.am new file mode 100644 index 000000000..7ac76caaf --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ProviderFx/Makefile.am @@ -0,0 +1,44 @@ +################################################################################ +### Copyright (C) 2015 VMware, Inc. All rights reserved. +### +### This program is free software; you can redistribute it and/or modify +### it under the terms of version 2 of the GNU General Public License as +### published by the Free Software Foundation. +### +### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +################################################################################ + +AUTOMAKE_OPTIONS = subdir-objects +caflibdir = @CAF_PME_LIB_DIR@ +caflib_LTLIBRARIES = +caflib_LTLIBRARIES += libProviderFx.la + +libProviderFx_la_SOURCES= +libProviderFx_la_SOURCES += ProviderFx/src/CProviderCdifFormatter.cpp +libProviderFx_la_SOURCES += ProviderFx/src/CProviderDocHelper.cpp +libProviderFx_la_SOURCES += ProviderFx/src/CProviderDriver.cpp +libProviderFx_la_SOURCES += ProviderFx/src/ProviderFx.cpp + +libProviderFx_la_CPPFLAGS = +libProviderFx_la_CPPFLAGS += @GLIB2_CPPFLAGS@ +libProviderFx_la_CPPFLAGS += @LOG4CPP_CPPFLAGS@ +libProviderFx_la_CPPFLAGS += @SSL_CPPFLAGS@ +libProviderFx_la_CPPFLAGS += @LIBRABBITMQ_CPPFLAGS@ + +libProviderFx_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include +libProviderFx_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include/Contracts +libProviderFx_la_LIBADD = +libProviderFx_la_LIBADD += @GLIB2_LIBS@ +libProviderFx_la_LIBADD += @LOG4CPP_LIBS@ +libProviderFx_la_LIBADD += -ldl +libProviderFx_la_LIBADD += ../Framework/libFramework.la + +libProviderFx_la_LDFLAGS = -shared + diff --git a/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/include/CProviderDocHelper.h b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/include/CProviderDocHelper.h new file mode 100644 index 000000000..75eec7d95 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/include/CProviderDocHelper.h @@ -0,0 +1,100 @@ +/* + * Author: brets + * Created: Dec 3, 2015 + * + * Copyright (c) 2015 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CProviderDocHelper_H_ +#define CProviderDocHelper_H_ + +namespace Caf { + +class PROVIDERFX_LINKAGE CProviderDocHelper { + +public: + static SmartPtrCClassPropertyDoc createClassProperty( + const std::string name, + const PROPERTY_TYPE type, + const bool required = false, + const bool key = false, + const bool list = false); + + static SmartPtrCClassIdentifierDoc createClassIdentifier( + const std::string namespaceVal, + const std::string name, + const std::string version); + + static SmartPtrCClassInstancePropertyDoc createClassInstanceProperty( + const std::string name, + const SmartPtrCClassIdentifierDoc type, + const bool required = false, + const bool transientVal = false, + const bool list = false); + + static SmartPtrCDataClassDoc createDataClass( + const std::string namespaceVal, + const std::string name, + const std::string version, + const std::deque properties, + const std::deque instanceProperties = std::deque()); + + static SmartPtrCMethodParameterDoc createMethodParameter( + const std::string name, + const PARAMETER_TYPE type, + const bool isOptional = false, + const bool isList = false); + + static SmartPtrCInstanceParameterDoc createInstanceParameter( + const std::string name, + const std::string instanceNamespace, + const std::string instanceName, + const std::string instanceVersion, + const bool isOptional = false, + const bool isList = false); + + static SmartPtrCCollectMethodDoc createCollectMethod( + const std::string name, + const std::deque parameters = std::deque(), + const std::deque instanceParameters = std::deque()); + + static SmartPtrCMethodDoc createMethod( + const std::string name, + const std::deque parameters = std::deque(), + const std::deque instanceParameters = std::deque()); + + static SmartPtrCActionClassDoc createActionClass( + const std::string namespaceVal, + const std::string name, + const std::string version, + const SmartPtrCCollectMethodDoc collectMethod, + const std::deque methodCollection); + + static SmartPtrCSchemaDoc createSchema( + const std::deque dataClasses, + const std::deque actionClasses); + + static SmartPtrCDataClassPropertyDoc createDataClassProperty( + const std::string name, + const std::string value); + + static SmartPtrCDataClassSubInstanceDoc createDataClassSubInstance( + const std::string name, + const std::deque properties); + + static SmartPtrCDataClassInstanceDoc createDataClassInstance( + const std::string namespaceVal, + const std::string name, + const std::string version, + const std::deque properties, + const std::deque instanceProperties = std::deque()); + +private: + CProviderDocHelper(); + CAF_CM_DECLARE_NOCOPY(CProviderDocHelper); +}; + +} + +#endif /* CProviderDocHelper_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/include/CProviderDriver.h b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/include/CProviderDriver.h new file mode 100644 index 000000000..a14a7e6c7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/include/CProviderDriver.h @@ -0,0 +1,70 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CProviderDriver_h_ +#define CProviderDriver_h_ + +namespace Caf { + +struct IInvokedProvider; // Forward declaration + +/// Sends responses/errors back to the client. +class PROVIDERFX_LINKAGE CProviderDriver { +private: + CProviderDriver(IInvokedProvider& provider); + virtual ~CProviderDriver(); + +public: + static int processProviderCommandline(IInvokedProvider& provider, int argc, char* argv[]); + +private: + int processProviderCommandline(int argc, char* argv[]); + + void collectSchema(const std::string& outputDir) const; + + void executeRequest(const std::string& requestPath) const; + + void executeCollectInstances( + const SmartPtrCProviderRequestDoc request, + const SmartPtrCProviderCollectInstancesDoc doc) const; + + void executeInvokeOperation( + const SmartPtrCProviderRequestDoc request, + const SmartPtrCProviderInvokeOperationDoc doc) const; + + SmartPtrCRequestIdentifierDoc createRequestId( + const SmartPtrCProviderRequestDoc request, + const SmartPtrCActionClassDoc actionClass, + const UUID jobId) const; + + SmartPtrCActionClassDoc findActionClass( + const std::string srchClassNamespace, + const std::string srchClassName, + const std::string srchClassVersion, + const std::string srchOperationName) const; + + void saveProviderResponse( + const std::string attachmentFilePath) const; + +private: + IInvokedProvider& _provider; + const SmartPtrCSchemaDoc _schema; + const std::string _providerNamespace; + const std::string _providerName; + const std::string _providerVersion; + std::vector _commandLineArgs; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CProviderDriver); +}; + +} + +#endif // #ifndef CProviderDriver_h_ diff --git a/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/include/IInvokedProvider.h b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/include/IInvokedProvider.h new file mode 100644 index 000000000..ebdab452f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/include/IInvokedProvider.h @@ -0,0 +1,34 @@ +/* + * Author: brets + * Created: October 28, 2015 + * + * Copyright (c) 2015 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _ProviderContracts_IInvokedProvider_H_ +#define _ProviderContracts_IInvokedProvider_H_ + +namespace Caf { + +struct IProviderRequest; // Forward declaration +struct IProviderResponse; // Forward declaration + +struct __declspec(novtable) IInvokedProvider { + + virtual const std::string getProviderNamespace() const = 0; + virtual const std::string getProviderName() const = 0; + virtual const std::string getProviderVersion() const = 0; + + virtual const SmartPtrCSchemaDoc getSchema() const = 0; + + virtual void collect(const IProviderRequest& request, IProviderResponse& response) const = 0; + + virtual void invoke(const IProviderRequest& request, IProviderResponse& response) const = 0; +}; + +//CAF_DECLARE_SMART_INTERFACE_POINTER(IInvokedProvider); + +} + +#endif // #ifndef _ProviderContracts_IInvokedProvider_H_ diff --git a/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/include/IProviderRequest.h b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/include/IProviderRequest.h new file mode 100644 index 000000000..58d20ca7b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/include/IProviderRequest.h @@ -0,0 +1,35 @@ +/* + * Author: brets + * Created: October 28, 2015 + * + * Copyright (c) 2015 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _ProviderContracts_IProviderRequest_H_ +#define _ProviderContracts_IProviderRequest_H_ + +namespace Caf { + +struct __declspec(novtable) IProviderRequest { + + virtual const UUID getClientId() const = 0; + + virtual const UUID getRequestId() const = 0; + + virtual const std::string getPmeId() const = 0; + + virtual const std::vector getCommandLine() const = 0; + + virtual const SmartPtrCAttachmentCollectionDoc getAttachments() const = 0; + + virtual const SmartPtrCProviderCollectInstancesDoc getCollectInstances() const = 0; + + virtual const SmartPtrCProviderInvokeOperationDoc getInvokeOperations() const = 0; +}; + +//CAF_DECLARE_SMART_INTERFACE_POINTER(IProviderRequest); + +} + +#endif // #ifndef _ProviderContracts_IProviderRequest_H_ diff --git a/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/include/IProviderResponse.h b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/include/IProviderResponse.h new file mode 100644 index 000000000..44f2ea620 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/include/IProviderResponse.h @@ -0,0 +1,25 @@ +/* + * Author: brets + * Created: October 28, 2015 + * + * Copyright (c) 2015 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef _ProviderContracts_IProviderResponse_H_ +#define _ProviderContracts_IProviderResponse_H_ + +namespace Caf { + +struct __declspec(novtable) IProviderResponse { + + virtual void addInstance(const SmartPtrCDataClassInstanceDoc instance) = 0; + + virtual void addAttachment(const SmartPtrCAttachmentDoc attachment) = 0; +}; + +//CAF_DECLARE_SMART_INTERFACE_POINTER(IProviderResponse); + +} + +#endif // #ifndef _ProviderContracts_IProviderResponse_H_ diff --git a/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/include/ProviderFxLink.h b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/include/ProviderFxLink.h new file mode 100644 index 000000000..180f7b462 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/include/ProviderFxLink.h @@ -0,0 +1,30 @@ +/* + * Author: brets + * Created: October 28, 2015 + * + * Copyright (c) 2015 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef PROVIDERFXLINK_H_ +#define PROVIDERFXLINK_H_ + +#ifndef PROVIDERFX_LINKAGE + #ifdef WIN32 + #ifdef PROVIDERFX_BUILD + #define PROVIDERFX_LINKAGE __declspec(dllexport) + #else + #define PROVIDERFX_LINKAGE __declspec(dllimport) + #endif + #else + #define PROVIDERFX_LINKAGE + #endif +#endif + +#include "IInvokedProvider.h" +#include "IProviderRequest.h" +#include "IProviderResponse.h" +#include "CProviderDriver.h" +#include "CProviderDocHelper.h" + +#endif // #ifndef PROVIDERFXLINK_H_ diff --git a/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/CProviderCdifFormatter.cpp b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/CProviderCdifFormatter.cpp new file mode 100644 index 000000000..d66d5d1ec --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/CProviderCdifFormatter.cpp @@ -0,0 +1,205 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "CProviderCdifFormatter.h" +#include "../../Framework/src/Doc/DocXml/ProviderResultsXml/ProviderResultsXmlLink.h" +#include "../../Framework/src/Doc/DocXml/ResponseXml/ResponseXmlLink.h" +#include "../../Framework/src/Doc/DocUtils/DocUtilsLink.h" +#include "../include/IProviderResponse.h" +#include + +using namespace Caf; + +CProviderCdifFormatter::CProviderCdifFormatter() : + _isInitialized(false), + CAF_CM_INIT_LOG("CProviderCdifFormatter") { +} + +CProviderCdifFormatter::~CProviderCdifFormatter() { +} + +void CProviderCdifFormatter::initialize( + const SmartPtrCRequestIdentifierDoc requestIdentifier, + const SmartPtrCSchemaDoc schema, + const std::string outputFilePath) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(requestIdentifier); + CAF_CM_VALIDATE_SMARTPTR(schema); + CAF_CM_VALIDATE_STRING(outputFilePath); + + _requestIdentifier = requestIdentifier; + _schema = schema; + _outputFilePath = outputFilePath; + + _isInitialized = true; +} + +void CProviderCdifFormatter::finished() { + CAF_CM_FUNCNAME_VALIDATE("finished"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + SmartPtrCDefinitionObjectCollectionDoc definitionObjectCollection; + if (!_defnObjCollection.empty()) { + definitionObjectCollection.CreateInstance(); + definitionObjectCollection->initialize(_defnObjCollection); + } + + SmartPtrCCdifDoc cdifDoc; + cdifDoc.CreateInstance(); + cdifDoc->initialize(_requestIdentifier, definitionObjectCollection, _schema); + + const std::string cdifXml = XmlRoots::saveCdifToString(cdifDoc); + + CAF_CM_LOG_DEBUG_VA1("Writing CDIF to file - %s", _outputFilePath.c_str()); + FileSystemUtils::saveTextFile(_outputFilePath, cdifXml); + + saveProviderResponse(); +} + +void CProviderCdifFormatter::addInstance( + const SmartPtrCDataClassInstanceDoc dataClassInstance) { + CAF_CM_FUNCNAME_VALIDATE("format"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(dataClassInstance); + + const std::string defnObjXml = DefnObjectConverter::toString(dataClassInstance); + _defnObjCollection.push_back(defnObjXml); +} + +std::string CProviderCdifFormatter::getOutputFilePath() const { + CAF_CM_FUNCNAME_VALIDATE("getOutputFilePath"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _outputFilePath; +} + +void CProviderCdifFormatter::addAttachment(const SmartPtrCAttachmentDoc attachment) { + CAF_CM_FUNCNAME_VALIDATE("addAttachment"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(attachment); + + _attachmentCollectionInner.push_back(attachment); +} + +void CProviderCdifFormatter::saveProviderResponse() { + CAF_CM_FUNCNAME_VALIDATE("saveProviderResponse"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const SmartPtrCAttachmentDoc attachment = createAttachment(); + _attachmentCollectionInner.push_back(attachment); + + const SmartPtrCAttachmentCollectionDoc attachmentCollection = + createAttachmentCollection(); + + const SmartPtrCAttachmentNameCollectionDoc attachmentNameCollection = + createAttachmentNameCollection(); + + std::string classNamespace; + std::string className; + std::string classVersion; + std::string operationName; + const SmartPtrCActionClassDoc actionClass = _requestIdentifier->getActionClass(); + if (!actionClass.IsNull()) { + classNamespace = actionClass->getNamespaceVal(); + className = actionClass->getName(); + classVersion = actionClass->getVersion(); + + const SmartPtrCCollectMethodDoc collectMethod = actionClass->getCollectMethod(); + const std::deque methodCollection = + actionClass->getMethodCollection(); + if (!collectMethod.IsNull()) { + operationName = collectMethod->getName(); + } else if (!methodCollection.empty()) { + const SmartPtrCMethodDoc method = methodCollection.front(); + operationName = method->getName(); + } + } + + SmartPtrCManifestDoc manifest; + manifest.CreateInstance(); + manifest->initialize(classNamespace, className, classVersion, + _requestIdentifier->getJobId(), operationName, attachmentNameCollection); + + SmartPtrCResponseHeaderDoc responseHeader; + responseHeader.CreateInstance(); + responseHeader->initialize( + "1.0", + CDateTimeUtils::getCurrentDateTime(), + 0, + true, + _requestIdentifier->getSessionId()); + + SmartPtrCProviderResponseDoc providerResponse; + providerResponse.CreateInstance(); + providerResponse->initialize(_requestIdentifier->getClientId(), + _requestIdentifier->getRequestId(), _requestIdentifier->getPmeId(), + responseHeader, manifest, attachmentCollection, + SmartPtrCStatisticsDoc()); + + const std::string attachmentDirPath = FileSystemUtils::getDirname(_outputFilePath); + const std::string providerResponseStr = XmlRoots::saveProviderResponseToString(providerResponse); + const std::string providerResponsePath = FileSystemUtils::buildPath( + attachmentDirPath, _sProviderResponseFilename); + FileSystemUtils::saveTextFile(providerResponsePath, providerResponseStr); + CAF_CM_LOG_DEBUG_VA1("Saved provider response file - %s", providerResponsePath.c_str()); +} + +SmartPtrCAttachmentDoc CProviderCdifFormatter::createAttachment() const { + CAF_CM_FUNCNAME_VALIDATE("createAttachment"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const std::string attachmentFileName = FileSystemUtils::getBasename(_outputFilePath); + const std::string jobIdStr = BasePlatform::UuidToString(_requestIdentifier->getJobId()); + const std::string attachmentName = jobIdStr + "." + attachmentFileName; + const std::string cdifAttachmentFilePathTmp = + FileSystemUtils::normalizePathWithForward(_outputFilePath); + + const std::string cmsPolicyStr = AppConfigUtils::getRequiredString( + "security", "cms_policy");; + + SmartPtrCAttachmentDoc attachment; + attachment.CreateInstance(); + attachment->initialize(attachmentName, "cdif", + "file:///" + cdifAttachmentFilePathTmp, false, + EnumConvertersXml::convertStringToCmsPolicy(cmsPolicyStr)); + + return attachment; +} + +SmartPtrCAttachmentCollectionDoc CProviderCdifFormatter::createAttachmentCollection() const { + CAF_CM_FUNCNAME_VALIDATE("createAttachmentCollection"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + SmartPtrCAttachmentCollectionDoc attachmentCollection; + attachmentCollection.CreateInstance(); + attachmentCollection->initialize(_attachmentCollectionInner, + std::deque()); + + return attachmentCollection; +} + +SmartPtrCAttachmentNameCollectionDoc CProviderCdifFormatter::createAttachmentNameCollection() const { + CAF_CM_FUNCNAME_VALIDATE("createAttachmentNameCollection"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + std::deque attachmentNameCollectionInner; + for (TConstIterator > attachmentIter( + _attachmentCollectionInner); attachmentIter; attachmentIter++) { + const SmartPtrCAttachmentDoc attachment = *attachmentIter; + + attachmentNameCollectionInner.push_back(attachment->getName()); + } + + SmartPtrCAttachmentNameCollectionDoc attachmentNameCollection; + attachmentNameCollection.CreateInstance(); + attachmentNameCollection->initialize(attachmentNameCollectionInner); + + return attachmentNameCollection; +} diff --git a/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/CProviderCdifFormatter.h b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/CProviderCdifFormatter.h new file mode 100644 index 000000000..198518429 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/CProviderCdifFormatter.h @@ -0,0 +1,62 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CProviderCdifFormatter_h_ +#define CProviderCdifFormatter_h_ + +namespace Caf { + +/// Sends responses/errors back to the client. +class CProviderCdifFormatter : public IProviderResponse { +public: + CProviderCdifFormatter(); + virtual ~CProviderCdifFormatter(); + +public: + void initialize( + const SmartPtrCRequestIdentifierDoc requestIdentifier, + const SmartPtrCSchemaDoc schema, + const std::string outputFilePath); + + void finished(); + + std::string getOutputFilePath() const; + +public: // IProviderResponse + void addInstance(const SmartPtrCDataClassInstanceDoc instance); + + void addAttachment(const SmartPtrCAttachmentDoc attachment); + +private: + void saveProviderResponse(); + + SmartPtrCAttachmentDoc createAttachment() const; + + SmartPtrCAttachmentCollectionDoc createAttachmentCollection() const; + + SmartPtrCAttachmentNameCollectionDoc createAttachmentNameCollection() const; + +private: + bool _isInitialized; + + SmartPtrCRequestIdentifierDoc _requestIdentifier; + SmartPtrCSchemaDoc _schema; + std::string _outputFilePath; + + std::deque _defnObjCollection; + std::deque _attachmentCollectionInner; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CProviderCdifFormatter); +}; + +} + +#endif // #ifndef CProviderCdifFormatter_h_ diff --git a/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/CProviderDocHelper.cpp b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/CProviderDocHelper.cpp new file mode 100644 index 000000000..df6b46950 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/CProviderDocHelper.cpp @@ -0,0 +1,175 @@ +/* + * Author: brets + * Created: Dec 3, 2015 + * + * Copyright (c) 2015 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "../include/CProviderDocHelper.h" + +using namespace Caf; + +SmartPtrCClassPropertyDoc CProviderDocHelper::createClassProperty( + const std::string name, + const PROPERTY_TYPE type, + const bool required, + const bool key, + const bool list) { + + SmartPtrCClassPropertyDoc doc; + doc.CreateInstance(); + doc->initialize(name, type, std::deque(), required, key, list); + return doc; +} + +SmartPtrCClassIdentifierDoc CProviderDocHelper::createClassIdentifier( + const std::string namespaceVal, + const std::string name, + const std::string version) { + SmartPtrCClassIdentifierDoc doc; + doc.CreateInstance(); + doc->initialize(namespaceVal, name, version); + return doc; +} + +SmartPtrCClassInstancePropertyDoc CProviderDocHelper::createClassInstanceProperty( + const std::string name, + const SmartPtrCClassIdentifierDoc type, + const bool required, + const bool transientVal, + const bool list) { + + std::deque types; + types.push_back(type); + + SmartPtrCClassInstancePropertyDoc doc; + doc.CreateInstance(); + doc->initialize(name, types, required, transientVal, list); + return doc; +} + +SmartPtrCDataClassDoc CProviderDocHelper::createDataClass( + const std::string namespaceVal, + const std::string name, + const std::string version, + const std::deque properties, + const std::deque instanceProperties) { + + SmartPtrCDataClassDoc doc; + doc.CreateInstance(); + doc->initialize(namespaceVal, name, version, properties, instanceProperties); + return doc; +} + +SmartPtrCMethodParameterDoc CProviderDocHelper::createMethodParameter( + const std::string name, + const PARAMETER_TYPE type, + const bool isOptional, + const bool isList) { + SmartPtrCMethodParameterDoc doc; + doc.CreateInstance(); + doc->initialize(name, type, isOptional, isList); + return doc; +} + +SmartPtrCCollectMethodDoc CProviderDocHelper::createCollectMethod( + const std::string name, + const std::deque parameters, + const std::deque instanceParameters) { + SmartPtrCCollectMethodDoc doc; + doc.CreateInstance(); + doc->initialize(name, parameters, instanceParameters); + return doc; +} + +SmartPtrCInstanceParameterDoc CProviderDocHelper::createInstanceParameter( + const std::string name, + const std::string instanceNamespace, + const std::string instanceName, + const std::string instanceVersion, + const bool isOptional, + const bool isList) { + SmartPtrCInstanceParameterDoc doc; + doc.CreateInstance(); + doc->initialize(name, instanceNamespace, instanceName, instanceVersion, isOptional, isList); + return doc; +} + +SmartPtrCMethodDoc CProviderDocHelper::createMethod( + const std::string name, + const std::deque parameters, + const std::deque instanceParameters) { + SmartPtrCMethodDoc doc; + doc.CreateInstance(); + doc->initialize(name, parameters, instanceParameters); + return doc; +} + +SmartPtrCActionClassDoc CProviderDocHelper::createActionClass( + const std::string namespaceVal, + const std::string name, + const std::string version, + const SmartPtrCCollectMethodDoc collectMethod, + const std::deque methodCollection) { + + SmartPtrCActionClassDoc doc; + doc.CreateInstance(); + doc->initialize(namespaceVal, name, version, collectMethod, methodCollection); + return doc; +} + +SmartPtrCSchemaDoc CProviderDocHelper::createSchema( + const std::deque dataClasses, + const std::deque actionClasses) { + SmartPtrCSchemaDoc doc; + doc.CreateInstance(); + doc->initialize(dataClasses, actionClasses); + return doc; +} + +SmartPtrCDataClassPropertyDoc CProviderDocHelper::createDataClassProperty( + const std::string name, + const std::string value) { + + SmartPtrCDataClassPropertyDoc doc; + doc.CreateInstance(); + doc->initialize(name, std::deque(), value); + return doc; +} + +SmartPtrCDataClassSubInstanceDoc CProviderDocHelper::createDataClassSubInstance( + const std::string name, + const std::deque properties) { + + SmartPtrCDataClassSubInstanceDoc doc; + doc.CreateInstance(); + doc->initialize( + name, + std::deque(), + properties, + std::deque(), + SmartPtrCCmdlUnionDoc()); + return doc; +} + +SmartPtrCDataClassInstanceDoc CProviderDocHelper::createDataClassInstance( + const std::string namespaceVal, + const std::string name, + const std::string version, + const std::deque properties, + const std::deque instanceProperties) { + + SmartPtrCDataClassInstanceDoc doc; + doc.CreateInstance(); + doc->initialize( + namespaceVal, + name, + version, + std::deque(), + properties, + instanceProperties, + SmartPtrCCmdlUnionDoc()); + return doc; +} diff --git a/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/CProviderDriver.cpp b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/CProviderDriver.cpp new file mode 100644 index 000000000..22a1070b3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/CProviderDriver.cpp @@ -0,0 +1,370 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" +#include "../include/CProviderDriver.h" +#include "../include/IInvokedProvider.h" +#include "../../Framework/src/Doc/DocXml/ProviderResultsXml/ProviderResultsXmlLink.h" +#include "CProviderCdifFormatter.h" +#include "CProviderRequest.h" +#include "../../Framework/src/Integration/Caf/IntegrationCafLink.h" + + +using namespace Caf; + +CProviderDriver::CProviderDriver(IInvokedProvider& provider) : + _provider(provider), + _schema(provider.getSchema()), + _providerNamespace(provider.getProviderNamespace()), + _providerName(provider.getProviderName()), + _providerVersion(provider.getProviderVersion()), + CAF_CM_INIT_LOG("CProviderDriver") { +} + +CProviderDriver::~CProviderDriver() { +} + +int CProviderDriver::processProviderCommandline(IInvokedProvider& provider, int argc, char* argv[]) { + SmartPtrIAppConfig appConfig; + try { + if (g_getenv("CAF_APPCONFIG") == NULL) { + Cdeqstr deqstr; + deqstr.push_back("cafenv-appconfig"); + deqstr.push_back("persistence-appconfig"); + deqstr.push_back("providerFx-appconfig"); + deqstr.push_back("custom-appconfig"); + appConfig = getAppConfig(deqstr); + } else { + appConfig = getAppConfig(); + } + } catch(CCafException *ex) { + std::cerr << "CProviderDriver::processProviderCommandline() failed to initialize AppConfig: " << ex->getFullMsg().c_str(); + ex->Release(); + return 1; + } catch (std::exception ex) { + std::cerr << "CProviderDriver::getAppConfig() failed to initialize AppConfig: " << ex.what(); + return 1; + } catch (...) { + std::cerr << "CProviderDriver::getAppConfig() failed to initialize AppConfig: unknown exception"; + return 1; + } + + // NOTE: Want to define parameters as constants + if (argc == 0) { + // Error + std::cerr << "Invalid command line: no options provided"; + return 1; + } + + CProviderDriver driver(provider); + return driver.processProviderCommandline(argc, argv); +} + +int CProviderDriver::processProviderCommandline(int argc, char* argv[]) { + CAF_CM_FUNCNAME("processProviderCommandline"); + + _commandLineArgs.clear(); + _commandLineArgs.reserve(argc); + for (int32 i = 0; i < argc; i++) { + _commandLineArgs.push_back(argv[i]); + } + + for (std::vector::const_iterator itr = _commandLineArgs.begin(); itr != _commandLineArgs.end(); itr++) { + if ((*itr).compare("--schema") == 0) { + itr++; + if (itr == _commandLineArgs.end()) { + std::cerr << "Invalid command line: no schema output directory provided"; + return 1; + } else if ((*itr).compare("-o") != 0) { + std::cerr << "Invalid command line: unexpected option: " << (*itr).c_str(); + return 1; + } + itr++; + if (itr == _commandLineArgs.end()) { + std::cerr << "Invalid command line: no schema output directory provided"; + return 1; + } + + std::string outputDir = *itr; + while (++itr != _commandLineArgs.end()) { + outputDir += " " + *itr; + } + + collectSchema(outputDir); + return 0; + + } else if ((*itr).compare("-r") == 0) { + itr++; + if (itr == _commandLineArgs.end()) { + std::cerr << "Invalid command line: no request location provided"; + return 1; + } + + std::string requestPath = *itr; + while (++itr != _commandLineArgs.end()) { + requestPath += " " + *itr; + } + + try { + executeRequest(requestPath); + return 0; + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + std::cerr << "Error executing request: " << _cm_exception_->getFullMsg().c_str() << std::endl; + CAF_CM_CLEAREXCEPTION + return 1; + } + } + std::cerr << "Invalid command line: unknown options"; + return 1; +} + +void CProviderDriver::collectSchema(const std::string& outputDir) const { + CAF_CM_FUNCNAME_VALIDATE("collectSchema"); + CAF_CM_VALIDATE_STRING(outputDir); + + const std::string schemaStr = XmlRoots::saveSchemaToString(_schema); + const std::string schemaFilename = _providerName + "-collectSchema-Rnd.provider-data.xml"; + const std::string schemaPath = FileSystemUtils::buildPath(outputDir, schemaFilename); + FileSystemUtils::saveTextFile(schemaPath, schemaStr); + CAF_CM_LOG_DEBUG_VA1("Saved schema file - %s", schemaPath.c_str()); + + saveProviderResponse(schemaPath); +} + +void CProviderDriver::executeRequest(const std::string& requestPath) const { + CAF_CM_FUNCNAME("executeRequest"); + CAF_CM_VALIDATE_STRING(requestPath); + + // TODO: Verify file exists + SmartPtrCDynamicByteArray fileContents = CCafMessagePayload::createBufferFromFile(requestPath); + std::string providerRequestXml(reinterpret_cast(fileContents->getPtr())); + + const SmartPtrCProviderRequestDoc request = XmlRoots::parseProviderRequestFromString(providerRequestXml); + + bool isProviderCalled = false; + const SmartPtrCProviderCollectInstancesCollectionDoc collectInstancesCollection = request->getBatch()->getCollectInstancesCollection(); + if (! collectInstancesCollection.IsNull()) { + const std::deque instances = collectInstancesCollection->getCollectInstances(); + for(TConstIterator > iter(instances); iter; iter++) { + isProviderCalled = true; + executeCollectInstances(request, *iter); + } + } + + const SmartPtrCProviderInvokeOperationCollectionDoc invokeOperationCollection = request->getBatch()->getInvokeOperationCollection(); + if (! invokeOperationCollection.IsNull()) { + const std::deque operations = invokeOperationCollection->getInvokeOperation(); + for(TConstIterator > iter(operations); iter; iter++) { + isProviderCalled = true; + executeInvokeOperation(request, *iter); + } + } + + if (! isProviderCalled) { + CAF_CM_EXCEPTIONEX_VA3(NoSuchElementException, ERROR_NOT_FOUND, + "Did not call anything on the provider - %s::%s::%s", + _providerNamespace.c_str(), _providerName.c_str(), _providerVersion.c_str()); + } +} + +void CProviderDriver::executeCollectInstances( + const SmartPtrCProviderRequestDoc request, + const SmartPtrCProviderCollectInstancesDoc doc) const { + CAF_CM_FUNCNAME_VALIDATE("executeCollectInstances"); + CAF_CM_VALIDATE_SMARTPTR(request); + CAF_CM_VALIDATE_SMARTPTR(doc); + + const SmartPtrCActionClassDoc actionClass = findActionClass(doc->getClassNamespace(), + doc->getClassName(), doc->getClassVersion(), "collectInstances"); + + const SmartPtrCRequestIdentifierDoc requestId = createRequestId(request, actionClass, doc->getJobId()); + + const std::string outputFilename = _providerName + std::string("-collectInstances.provider-data.xml"); + const std::string outputFilePath = FileSystemUtils::buildPath(doc->getOutputDir(), outputFilename); + + CProviderCdifFormatter formatter; + CAF_CM_LOG_DEBUG_VA1("Initializing formatter with path - %s", outputFilePath.c_str()); + formatter.initialize(requestId, _schema, outputFilePath); + + CAF_CM_LOG_DEBUG_VA1("Calling collect on the provider - %s", _providerName.c_str()); + CProviderRequest providerRequest(request, _commandLineArgs); + providerRequest.setCollectInstances(doc); + _provider.collect(providerRequest, formatter); + formatter.finished(); +} + +void CProviderDriver::executeInvokeOperation( + const SmartPtrCProviderRequestDoc request, + const SmartPtrCProviderInvokeOperationDoc doc) const { + CAF_CM_FUNCNAME_VALIDATE("executeInvokeOperation"); + CAF_CM_VALIDATE_SMARTPTR(request); + CAF_CM_VALIDATE_SMARTPTR(doc); + + const SmartPtrCActionClassDoc actionClass = findActionClass(doc->getClassNamespace(), + doc->getClassName(), doc->getClassVersion(), doc->getOperation()->getName()); + + const SmartPtrCRequestIdentifierDoc requestId = createRequestId(request, actionClass, doc->getJobId()); + + const std::string outputFilename = _providerName + std::string("-invokeOperation.provider-data.xml"); + const std::string outputFilePath = FileSystemUtils::buildPath(doc->getOutputDir(), outputFilename); + + CProviderCdifFormatter formatter; + CAF_CM_LOG_DEBUG_VA1("Initializing formatter with path - %s", outputFilePath.c_str()); + formatter.initialize(requestId, _schema, outputFilePath); + + CAF_CM_LOG_DEBUG_VA1("Calling invoke on the provider - %s", _providerName.c_str()); + CProviderRequest providerRequest(request, _commandLineArgs); + providerRequest.setInvokeOperations(doc); + _provider.invoke(providerRequest, formatter); + formatter.finished(); +} + +SmartPtrCRequestIdentifierDoc CProviderDriver::createRequestId( + const SmartPtrCProviderRequestDoc request, + const SmartPtrCActionClassDoc actionClass, + const UUID jobId) const { + CAF_CM_FUNCNAME_VALIDATE("createRequestId"); + CAF_CM_VALIDATE_SMARTPTR(request); + CAF_CM_VALIDATE_SMARTPTR(actionClass); + CAF_CM_VALIDATE_GUID(jobId); + + SmartPtrCRequestIdentifierDoc requestIdentifier; + requestIdentifier.CreateInstance(); + requestIdentifier->initialize( + request->getClientId(), + request->getRequestId(), + request->getPmeId(), + jobId, + actionClass, + CAFCOMMON_GUID_NULL); + + return requestIdentifier; +} + +SmartPtrCActionClassDoc CProviderDriver::findActionClass( + const std::string srchClassNamespace, + const std::string srchClassName, + const std::string srchClassVersion, + const std::string srchOperationName) const { + CAF_CM_FUNCNAME("findActionClass"); + CAF_CM_VALIDATE_STRING(srchClassNamespace); + CAF_CM_VALIDATE_STRING(srchClassName); + CAF_CM_VALIDATE_STRING(srchClassVersion); + CAF_CM_VALIDATE_STRING(srchOperationName); + + const std::deque actionClassCollection = _schema->getActionClassCollection(); + CAF_CM_VALIDATE_STL(actionClassCollection); + + SmartPtrCActionClassDoc actionClassRc; + for(TConstIterator > actionClassIter(actionClassCollection); + actionClassIter; actionClassIter++) { + const SmartPtrCActionClassDoc actionClass = *actionClassIter; + + const std::string actionClassNamespace = actionClass->getNamespaceVal(); + const std::string actionClassName = actionClass->getName(); + const std::string actionClassVersion = actionClass->getVersion(); + + if ((srchClassNamespace.compare(actionClassNamespace) == 0) && + (srchClassName.compare(actionClassName) == 0) && + (srchClassVersion.compare(actionClassVersion) == 0)) { + + const SmartPtrCCollectMethodDoc actionCollectMethod = actionClass->getCollectMethod(); + if (! actionCollectMethod.IsNull() && (srchOperationName.compare(actionCollectMethod->getName()) == 0)) { + actionClassRc.CreateInstance(); + actionClassRc->initialize( + actionClassNamespace, + actionClassName, + actionClassVersion, + actionCollectMethod, + std::deque(), + actionClass->getDisplayName(), + actionClass->getDescription()); + break; + } else { + const std::deque actionMethodCollection = actionClass->getMethodCollection(); + for(TConstIterator > actionMethodIter(actionMethodCollection); + actionMethodIter; actionMethodIter++) { + const SmartPtrCMethodDoc actionMethod = *actionMethodIter; + + if (srchOperationName.compare(actionMethod->getName()) == 0) { + std::deque actionMethodCollection; + actionMethodCollection.push_back(actionMethod); + + actionClassRc.CreateInstance(); + actionClassRc->initialize( + actionClassNamespace, + actionClassName, + actionClassVersion, + SmartPtrCCollectMethodDoc(), + actionMethodCollection, + actionClass->getDisplayName(), + actionClass->getDescription()); + break; + } + } + } + } + } + + if (actionClassRc.IsNull()) { + CAF_CM_EXCEPTIONEX_VA4(NoSuchElementException, ERROR_NOT_FOUND, + "Action Class not found - %s::%s::%s::%s", + srchClassNamespace.c_str(), srchClassName.c_str(), srchClassVersion.c_str(), srchOperationName.c_str()); + } + + return actionClassRc; +} + +void CProviderDriver::saveProviderResponse(const std::string attachmentFilePath) const { + CAF_CM_FUNCNAME_VALIDATE("saveProviderResponse"); + CAF_CM_VALIDATE_STRING(attachmentFilePath); + + const std::string attachmentName = FileSystemUtils::getBasename(attachmentFilePath); + const std::string attachmentDirPath = FileSystemUtils::getDirname(attachmentFilePath); + const std::string attachmentFilePathTmp = + FileSystemUtils::normalizePathWithForward(attachmentFilePath); + + const std::string cmsPolicyStr = AppConfigUtils::getRequiredString( + "security", "cms_policy");; + + SmartPtrCAttachmentDoc attachment; + attachment.CreateInstance(); + attachment->initialize(attachmentName, "cdif", + "file:///" + attachmentFilePathTmp, false, + EnumConvertersXml::convertStringToCmsPolicy(cmsPolicyStr)); + + std::deque attachmentCollectionInner; + attachmentCollectionInner.push_back(attachment); + + SmartPtrCAttachmentCollectionDoc attachmentCollection; + attachmentCollection.CreateInstance(); + attachmentCollection->initialize(attachmentCollectionInner, + std::deque()); + + const UUID clientId = CAFCOMMON_GUID_NULL; + const UUID requestId = CAFCOMMON_GUID_NULL; + const std::string pmeId = BasePlatform::UuidToString(CAFCOMMON_GUID_NULL); + + SmartPtrCProviderResponseDoc providerResponse; + providerResponse.CreateInstance(); + providerResponse->initialize( + clientId, + requestId, + pmeId, + SmartPtrCResponseHeaderDoc(), + SmartPtrCManifestDoc(), + attachmentCollection, + SmartPtrCStatisticsDoc()); + + const std::string providerResponseStr = XmlRoots::saveProviderResponseToString(providerResponse); + const std::string providerResponsePath = FileSystemUtils::buildPath(attachmentDirPath, _sProviderResponseFilename); + FileSystemUtils::saveTextFile(providerResponsePath, providerResponseStr); + CAF_CM_LOG_DEBUG_VA1("Saved provider response file - %s", providerResponsePath.c_str()); +} diff --git a/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/CProviderRequest.h b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/CProviderRequest.h new file mode 100644 index 000000000..e725e098c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/CProviderRequest.h @@ -0,0 +1,72 @@ +/* + * Author: brets + * Created: November 5, 2015 + * + * Copyright (c) 2015 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef CProviderRequest_h_ +#define CProviderRequest_h_ + +namespace Caf { + +// Request information forwarded to the provider +class CProviderRequest : public IProviderRequest { +public: + CProviderRequest(const SmartPtrCProviderRequestDoc request, + const std::vector commandLine) : + _request(request), + _commandLine(commandLine) { + } + virtual ~CProviderRequest() {}; + +public: // IProviderRequest + const UUID getClientId() const { + return _request->getClientId(); + } + + const UUID getRequestId() const { + return _request->getRequestId(); + } + + const std::string getPmeId() const { + return _request->getPmeId(); + } + + const std::vector getCommandLine() const { + return _commandLine; + } + + const SmartPtrCAttachmentCollectionDoc getAttachments() const { + return _request->getAttachmentCollection(); + } + + const SmartPtrCProviderCollectInstancesDoc getCollectInstances() const { + return _collectInstances; + } + const SmartPtrCProviderInvokeOperationDoc getInvokeOperations() const { + return _invokeOperations; + } + +public: + void setCollectInstances(SmartPtrCProviderCollectInstancesDoc doc) { + _collectInstances = doc; + _invokeOperations = NULL; + } + + void setInvokeOperations(SmartPtrCProviderInvokeOperationDoc doc) { + _collectInstances = NULL; + _invokeOperations = doc; + } + +private: + const SmartPtrCProviderRequestDoc _request; + const std::vector _commandLine; + SmartPtrCProviderCollectInstancesDoc _collectInstances; + SmartPtrCProviderInvokeOperationDoc _invokeOperations; +}; + +} + +#endif // #ifndef CProviderRequest_h_ diff --git a/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/ProviderFx.cpp b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/ProviderFx.cpp new file mode 100644 index 000000000..6a3add682 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/ProviderFx.cpp @@ -0,0 +1,14 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#include "stdafx.h" + +extern "C" BOOL APIENTRY DllMain(HINSTANCE hModule, uint32 dwReason, LPVOID) +{ + return TRUE; +} diff --git a/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/stdafx.h b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/stdafx.h new file mode 100644 index 000000000..9f8595cdf --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/stdafx.h @@ -0,0 +1,24 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (c) 2012 Vmware, Inc. All rights reserved. + * -- VMware Confidential + */ + +#ifndef stdafx_h_ +#define stdafx_h_ + +//{{CAF_SUBSYSTEM}} + +#include +#include +#include +#include +#include + +#include "../include/ProviderFxLink.h" +#include "CProviderCdifFormatter.h" +#include "CProviderRequest.h" + +#endif // #ifndef stdafx_h_ diff --git a/open-vm-tools/common-agent/etc/Makefile.am b/open-vm-tools/common-agent/etc/Makefile.am new file mode 100644 index 000000000..8eea3d756 --- /dev/null +++ b/open-vm-tools/common-agent/etc/Makefile.am @@ -0,0 +1,24 @@ +################################################################################ +### Copyright (C) 2015 VMware, Inc. All rights reserved. +### +### This program is free software; you can redistribute it and/or modify +### it under the terms of version 2 of the GNU General Public License as +### published by the Free Software Foundation. +### +### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +################################################################################ + +SUBDIRS = install config scripts + +uninstall-hook: + rm -rf $(DESTDIR)/etc/vmware-caf + rm -rf $(DESTDIR)/var/lib/vmware-caf + rm -rf $(DESTDIR)/var/vmware-caf + rm -rf $(DESTDIR)/$(libdir)/open-vm-tools/vmware-caf/ diff --git a/open-vm-tools/common-agent/etc/config/CommAmqpListener-appconfig b/open-vm-tools/common-agent/etc/config/CommAmqpListener-appconfig new file mode 100644 index 000000000..d2057d6f1 --- /dev/null +++ b/open-vm-tools/common-agent/etc/config/CommAmqpListener-appconfig @@ -0,0 +1,76 @@ +[globals] +response_dir=${output_dir}/responses +event_dir=${output_dir}/events +request_dir=${output_dir}/requests +tmp_dir=${output_dir}/tmp +persistence_dir=${input_dir}/persistence +log_config_file=${config_dir}/CommAmqpListener-log4cpp_config + +thread_stack_size_kb=0 + +schema_namespace_root=http://schemas.vmware.com/caf/schema +schema_location_root=http://10.25.57.32/caf-downloads/schema + +[communication_amqp] +working_dir=${output_dir}/comm-wrk +context_file=${comm_amqp_listener_context} + +reactive_request_queue_id=${reactive_request_amqp_queue_id} + +startup_timeout=5000 +shutdown_timeout=5000 +connection_retry_interval=5000 + +# Temporarily set to 60MB for Hyperic Agent POC +# 1024 Bytes/KB * 1024 KB/MB * 60 +max_part_size=62976000 + +vhost=caf + +# Wait for (connection_retries * connection_seconds_to_wait) in milli-seconds +connection_timeout=150000 + +connection_retries=10 +connection_seconds_to_wait=15 +channel_cache_size=4 +reply_timeout=5000 + +[security] +cms_policy=CAF_Encrypted_And_Signed +is_signing_enforced=true +is_encryption_enforced=true + +tls_protocol=TLSv1 +tls_ciphers=SRP-RSA-AES-128-CBC-SHA +cms_cipher=des-ede3-cbc + +[subsystems] +# Integration System Beans +com.vmware.commonagent.integration.objectfactory=IntegrationSubsys +com.vmware.commonagent.integration.channels.errorchannel=IntegrationSubsys +com.vmware.commonagent.integration.channels.nullchannel=IntegrationSubsys +com.vmware.commonagent.integration.headerexpressioninvoker=IntegrationSubsys + +# Communication Integration Beans +com.vmware.caf.comm.integration.cmsmessagetransformer=CommIntegrationSubsys +com.vmware.caf.comm.integration.cmsmessagetransformerinstance=CommIntegrationSubsys +com.vmware.caf.comm.integration.eventtopiccalculator=CommIntegrationSubsys +com.vmware.caf.comm.integration.incomingmessagehandler=CommIntegrationSubsys +com.vmware.caf.comm.integration.incomingmessagehandlerinstance=CommIntegrationSubsys +com.vmware.caf.comm.integration.outgoingmessagehandler=CommIntegrationSubsys +com.vmware.caf.comm.integration.protocolheaderenricher=CommIntegrationSubsys +com.vmware.caf.comm.integration.protocolheaderenricherinstance=CommIntegrationSubsys +com.vmware.caf.comm.integration.replytocacher=CommIntegrationSubsys +com.vmware.caf.comm.integration.replytocacherinstance=CommIntegrationSubsys +com.vmware.caf.comm.integration.replytoresolver=CommIntegrationSubsys +com.vmware.caf.comm.integration.objects=CommAmqpIntegrationSubsys + +# Amqp Listener Context Beans +com.vmware.caf.comm.integration.amqp.caching.connection.factory=CommAmqpIntegrationSubsys +com.vmware.caf.comm.integration.amqp.secure.caching.connection.factory=CommAmqpIntegrationSubsys + +# CAF Integration System Beans +com.vmware.commonagent.cafintegration.errortoresponsetransformerinstance=CafIntegrationSubsys +com.vmware.commonagent.cafintegration.errortoresponsetransformer=CafIntegrationSubsys +com.vmware.commonagent.cafintegration.payloadheaderenricherinstance=CafIntegrationSubsys +com.vmware.commonagent.cafintegration.payloadheaderenricher=CafIntegrationSubsys diff --git a/open-vm-tools/common-agent/etc/config/CommAmqpListener-context-amqp.xml b/open-vm-tools/common-agent/etc/config/CommAmqpListener-context-amqp.xml new file mode 100644 index 000000000..8bb321046 --- /dev/null +++ b/open-vm-tools/common-agent/etc/config/CommAmqpListener-context-amqp.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/open-vm-tools/common-agent/etc/config/CommAmqpListener-context-common.xml b/open-vm-tools/common-agent/etc/config/CommAmqpListener-context-common.xml new file mode 100644 index 000000000..8e06ca5a2 --- /dev/null +++ b/open-vm-tools/common-agent/etc/config/CommAmqpListener-context-common.xml @@ -0,0 +1,200 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+
+ + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/open-vm-tools/common-agent/etc/config/CommAmqpListener-context-tunnel.xml b/open-vm-tools/common-agent/etc/config/CommAmqpListener-context-tunnel.xml new file mode 100644 index 000000000..469b5c77b --- /dev/null +++ b/open-vm-tools/common-agent/etc/config/CommAmqpListener-context-tunnel.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + diff --git a/open-vm-tools/common-agent/etc/config/CommAmqpListener-log4cpp_config b/open-vm-tools/common-agent/etc/config/CommAmqpListener-log4cpp_config new file mode 100644 index 000000000..8c2ad44a8 --- /dev/null +++ b/open-vm-tools/common-agent/etc/config/CommAmqpListener-log4cpp_config @@ -0,0 +1,18 @@ +#log4j.rootCategory=DEBUG, console +log4j.rootCategory=DEBUG, rolling + +log4j.appender.console=org.apache.log4j.ConsoleAppender +log4j.appender.console.layout=org.apache.log4j.PatternLayout +log4j.appender.console.layout.ConversionPattern=%p|%d{ISO8601}|%t|%c|%m%n + +log4j.appender.logfile=org.apache.log4j.FileAppender +log4j.appender.logfile.fileName=CommAmqpListener-log4cpp.log +log4j.appender.logfile.layout=org.apache.log4j.PatternLayout +log4j.appender.logfile.layout.ConversionPattern=%p|%d{ISO8601}|%t|%c|%m%n + +log4j.appender.rolling=org.apache.log4j.RollingFileAppender +log4j.appender.rolling.fileName=CommAmqpListener-log4cpp_rolling.log +log4j.appender.rolling.layout=org.apache.log4j.PatternLayout +log4j.appender.rolling.layout.ConversionPattern=%p|%d{ISO8601}|%t|%c|%m%n +log4j.appender.rolling.MaxFileSize=1024KB +log4j.appender.rolling.MaxBackupIndex=5 diff --git a/open-vm-tools/common-agent/etc/config/IntBeanConfigFile.xml b/open-vm-tools/common-agent/etc/config/IntBeanConfigFile.xml new file mode 100644 index 000000000..d4e22ed46 --- /dev/null +++ b/open-vm-tools/common-agent/etc/config/IntBeanConfigFile.xml @@ -0,0 +1,19 @@ + + + + + + + + + + diff --git a/open-vm-tools/common-agent/etc/config/Makefile.am b/open-vm-tools/common-agent/etc/config/Makefile.am new file mode 100644 index 000000000..2276faf63 --- /dev/null +++ b/open-vm-tools/common-agent/etc/config/Makefile.am @@ -0,0 +1,36 @@ +################################################################################ +### Copyright (C) 2015 VMware, Inc. All rights reserved. +### +### This program is free software; you can redistribute it and/or modify +### it under the terms of version 2 of the GNU General Public License as +### published by the Free Software Foundation. +### +### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +################################################################################ + +confdir=/etc/vmware-caf/pme/config + +conf_DATA = \ + cafenv-appconfig \ + CommAmqpListener-appconfig \ + CommAmqpListener-context-amqp.xml \ + CommAmqpListener-context-common.xml \ + CommAmqpListener-context-tunnel.xml \ + CommAmqpListener-log4cpp_config \ + IntBeanConfigFile.xml \ + ma-appconfig \ + ma-context.xml \ + ma-log4cpp_config \ + providerFx-appconfig \ + providerFx-log4cpp_config \ + vgauth.conf + +install-data-local: + D=$(DESTDIR) /bin/bash $(top_srcdir)/common-agent/etc/install/install.sh -L -l $(libdir)/open-vm-tools -B $(libdir)/open-vm-tools -i /var -o /var diff --git a/open-vm-tools/common-agent/etc/config/cafenv-appconfig b/open-vm-tools/common-agent/etc/config/cafenv-appconfig new file mode 100644 index 000000000..4e1b92c7a --- /dev/null +++ b/open-vm-tools/common-agent/etc/config/cafenv-appconfig @@ -0,0 +1,35 @@ +[globals] +# Specifies where python is located. +python_dir=/opt/vmware/caf/python + +# Substitute @binDir@ for the value passed in during install +# Maps to 'bin' in the build output +bin_dir=@binDir@ + +# Substitute @libDir@ for the value passed in during install +# Maps to 'lib' in the build output +lib_dir=@libDir@ + +# Substitute @configDir@ for the value passed in during install +# Maps to 'config' in the build output +config_dir=@configDir@ + +# Substitute @inputDir@ for the value passed in during install +# Maps to 'data/input' in the build output +input_dir=@inputDir@ + +# Substitute @outputDir@ for the value passed in during install +# No mapping in the build output since the output files are created at run-time +output_dir=@outputDir@ + +# Substitute @logDir@ for the value passed in during install +# No mapping in the build output since the log files are created at run-time +log_dir=@logDir@ + +# Substitute @invokersDir@ for the value passed in during install +# Maps to 'invokers' in the build output - Used by the internal providers +invokers_dir=@invokersDir@ + +# Substitute @providersDir@ for the value passed in during install +# Maps to 'providers' in the build output - Used by the internal providers +providers_dir=@providersDir@ diff --git a/open-vm-tools/common-agent/etc/config/ma-appconfig b/open-vm-tools/common-agent/etc/config/ma-appconfig new file mode 100644 index 000000000..3e3c6d029 --- /dev/null +++ b/open-vm-tools/common-agent/etc/config/ma-appconfig @@ -0,0 +1,80 @@ +[globals] +response_dir=${output_dir}/responses +request_dir=${output_dir}/requests +split_request_dir=${output_dir}/split-requests +tmp_dir=${output_dir}/tmp +persistence_dir=${input_dir}/persistence +bean_config_file=${config_dir}/ma-context.xml +log_config_file=${config_dir}/ma-log4cpp_config +scripts_dir=${config_dir}/../scripts + +thread_stack_size_kb=0 + +schema_namespace_root=http://schemas.vmware.com/caf/schema +schema_location_root=http://10.25.57.32/caf-downloads/schema + +[security] +cms_policy=CAF_Encrypted_And_Signed + +[managementAgent] +host_delay_sec=5 +host_integration_timeout_ms=5000 +use_impersonation=false +remap_logging_location=true +# Value used to specify the priority that provider sub-process are created at. +# Valid values are: NORMAL, LOW, IDLE. Default value is NORMAL. +provider_process_priority=NORMAL + +[providerHost] +install_dir=${config_dir}/../install +invokers_dir=${invokers_dir} +providers_dir=${providers_dir} +schema_cache_dir=${output_dir}/schemaCache +provider_reg_dir=${input_dir}/providerReg +common_packages_dir=${input_dir}/commonPackages + +[provider] +diagFileAliases=ma-appconfig:ma-log4cpp_config:ma-context:CommAmqpListener-appconfig:CommAmqpListener-log4cpp_config:CommAmqpListener-context:IntBeanConfigFile +diagFileAlias_ma-appconfig=file://${root_dir}/config/ma-appconfig?encoding=iniFile +diagFileAlias_ma-log4cpp_config=file://${root_dir}/config/ma-log4cpp_config?encoding=iniFileWithoutSection +diagFileAlias_ma-context=file://${root_dir}/config/ma-context.xml?encoding=xmlFile +diagFileAlias_CommAmqpListener-appconfig=file://${root_dir}/config/CommAmqpListener-appconfig?encoding=iniFile +diagFileAlias_CommAmqpListener-log4cpp_config=file://${root_dir}/config/CommAmqpListener-log4cpp_config?encoding=iniFileWithoutSection +diagFileAlias_CommAmqpListener-context=file://${root_dir}/config/CommAmqpListener-context.xml?encoding=xmlFile +diagFileAlias_IntBeanConfigFile=file://${root_dir}/config/IntBeanConfigFile.xml?encoding=xmlFile + +[subsystems] +# Integration System Beans +com.vmware.commonagent.integration.objectfactory=IntegrationSubsys +com.vmware.commonagent.integration.channels.errorchannel=IntegrationSubsys +com.vmware.commonagent.integration.channels.nullchannel=IntegrationSubsys + +# CAF Integration +com.vmware.commonagent.cafintegration.errortoresponsetransformerinstance=CafIntegrationSubsys +com.vmware.commonagent.cafintegration.errortoresponsetransformer=CafIntegrationSubsys +com.vmware.commonagent.cafintegration.payloadheaderenricherinstance=CafIntegrationSubsys +com.vmware.commonagent.cafintegration.payloadheaderenricher=CafIntegrationSubsys +com.vmware.commonagent.cafintegration.envelopetopayloadtransformerinstance=CafIntegrationSubsys +com.vmware.commonagent.cafintegration.envelopetopayloadtransformer=CafIntegrationSubsys + +# Management Agent + +# MA Integration +com.vmware.commonagent.maintegration.collectschemaexecutor=MaIntegrationSubsys +com.vmware.commonagent.maintegration.providercollectschemaexecutor=MaIntegrationSubsys +com.vmware.commonagent.maintegration.providerexecutor=MaIntegrationSubsys +com.vmware.commonagent.maintegration.singlepmerequestsplitterinstance=MaIntegrationSubsys +com.vmware.commonagent.maintegration.singlepmerequestsplitter=MaIntegrationSubsys +com.vmware.commonagent.maintegration.diagtomgmtrequesttransformerinstance=MaIntegrationSubsys +com.vmware.commonagent.maintegration.diagtomgmtrequesttransformer=MaIntegrationSubsys +com.vmware.commonagent.maintegration.installtomgmtrequesttransformerinstance=MaIntegrationSubsys +com.vmware.commonagent.maintegration.installtomgmtrequesttransformer=MaIntegrationSubsys +com.vmware.commonagent.maintegration.versiontransformerinstance=MaIntegrationSubsys +com.vmware.commonagent.maintegration.versiontransformer=MaIntegrationSubsys +com.vmware.commonagent.maintegration.attachmentrequesttransformerinstance=MaIntegrationSubsys +com.vmware.commonagent.maintegration.attachmentrequesttransformer=MaIntegrationSubsys +com.vmware.commonagent.maintegration.integrationobjects=MaIntegrationSubsys +com.vmware.commonagent.maintegration.guestauthenticatorinstance=VgAuthIntegrationSubsys +com.vmware.commonagent.maintegration.guestauthenticator=VgAuthIntegrationSubsys +com.vmware.commonagent.maintegration.configenv=MaIntegrationSubsys +com.vmware.commonagent.maintegration.persistencenamespacedb=MaIntegrationSubsys diff --git a/open-vm-tools/common-agent/etc/config/ma-context.xml b/open-vm-tools/common-agent/etc/config/ma-context.xml new file mode 100644 index 000000000..71409b511 --- /dev/null +++ b/open-vm-tools/common-agent/etc/config/ma-context.xml @@ -0,0 +1,330 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/open-vm-tools/common-agent/etc/config/ma-log4cpp_config b/open-vm-tools/common-agent/etc/config/ma-log4cpp_config new file mode 100644 index 000000000..87102cfd1 --- /dev/null +++ b/open-vm-tools/common-agent/etc/config/ma-log4cpp_config @@ -0,0 +1,18 @@ +#log4j.rootCategory=DEBUG, console +log4j.rootCategory=WARN, rolling + +log4j.appender.console=org.apache.log4j.ConsoleAppender +log4j.appender.console.layout=org.apache.log4j.PatternLayout +log4j.appender.console.layout.ConversionPattern=%p|%d{ISO8601}|%t|%c|%m%n + +log4j.appender.logfile=org.apache.log4j.FileAppender +log4j.appender.logfile.fileName=ma-log4cpp.log +log4j.appender.logfile.layout=org.apache.log4j.PatternLayout +log4j.appender.logfile.layout.ConversionPattern=%p|%d{ISO8601}|%t|%c|%m%n + +log4j.appender.rolling=org.apache.log4j.RollingFileAppender +log4j.appender.rolling.fileName=ma-log4cpp_rolling.log +log4j.appender.rolling.layout=org.apache.log4j.PatternLayout +log4j.appender.rolling.layout.ConversionPattern=%p|%d{ISO8601}|%t|%c|%m%n +log4j.appender.rolling.MaxFileSize=1024KB +log4j.appender.rolling.MaxBackupIndex=5 diff --git a/open-vm-tools/common-agent/etc/config/providerFx-appconfig b/open-vm-tools/common-agent/etc/config/providerFx-appconfig new file mode 100644 index 000000000..2daa120e7 --- /dev/null +++ b/open-vm-tools/common-agent/etc/config/providerFx-appconfig @@ -0,0 +1,22 @@ +[globals] +#response_dir=${output_dir}/responses +#request_dir=${output_dir}/requests +#tmp_dir=${output_dir}/tmp +#bean_config_file=${config_dir}/ma-context.xml +log_config_file=${config_dir}/providerFx-log4cpp_config + +thread_stack_size_kb=0 + +schema_namespace_root=http://schemas.vmware.com/caf/schema +schema_location_root=http://10.25.57.32/caf-downloads/schema + +[providerHost] +install_dir=${config_dir}/../install +invokers_dir=${invokers_dir} +providers_dir=${providers_dir} +schema_cache_dir=${output_dir}/schemaCache +provider_reg_dir=${input_dir}/providerReg +common_packages_dir=${input_dir}/commonPackages + +[security] +cms_policy=CAF_Encrypted_And_Signed \ No newline at end of file diff --git a/open-vm-tools/common-agent/etc/config/providerFx-log4cpp_config b/open-vm-tools/common-agent/etc/config/providerFx-log4cpp_config new file mode 100644 index 000000000..af1f84ab2 --- /dev/null +++ b/open-vm-tools/common-agent/etc/config/providerFx-log4cpp_config @@ -0,0 +1,18 @@ +#log4j.rootCategory=DEBUG, console +log4j.rootCategory=WARN, rolling + +log4j.appender.console=org.apache.log4j.ConsoleAppender +log4j.appender.console.layout=org.apache.log4j.PatternLayout +log4j.appender.console.layout.ConversionPattern=%p|%d{ISO8601}|%t|%c|%m%n + +log4j.appender.logfile=org.apache.log4j.FileAppender +log4j.appender.logfile.fileName=providerFx-log4cpp.log +log4j.appender.logfile.layout=org.apache.log4j.PatternLayout +log4j.appender.logfile.layout.ConversionPattern=%p|%d{ISO8601}|%t|%c|%m%n + +log4j.appender.rolling=org.apache.log4j.RollingFileAppender +log4j.appender.rolling.fileName=providerFx-log4cpp_rolling.log +log4j.appender.rolling.layout=org.apache.log4j.PatternLayout +log4j.appender.rolling.layout.ConversionPattern=%p|%d{ISO8601}|%t|%c|%m%n +log4j.appender.rolling.MaxFileSize=1024KB +log4j.appender.rolling.MaxBackupIndex=5 diff --git a/open-vm-tools/common-agent/etc/config/vgauth.conf b/open-vm-tools/common-agent/etc/config/vgauth.conf new file mode 100644 index 000000000..2501c05dd --- /dev/null +++ b/open-vm-tools/common-agent/etc/config/vgauth.conf @@ -0,0 +1,9 @@ +[service] +logfile=@logDir@/vgauth.log +loglevel=verbose +enableLogging=true +enableCoreDumps=true +samlSchemaDir=@installDir@schemas + +[auditing] +auditSuccessEvents=true diff --git a/open-vm-tools/common-agent/etc/install/Makefile.am b/open-vm-tools/common-agent/etc/install/Makefile.am new file mode 100644 index 000000000..757357d65 --- /dev/null +++ b/open-vm-tools/common-agent/etc/install/Makefile.am @@ -0,0 +1,36 @@ +################################################################################ +### Copyright (C) 2015 VMware, Inc. All rights reserved. +### +### This program is free software; you can redistribute it and/or modify +### it under the terms of version 2 of the GNU General Public License as +### published by the Free Software Foundation. +### +### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +################################################################################ + +confdir = /etc/vmware-caf/pme/install + +conf_SCRIPTS = \ + caf-c-communication-service \ + caf-c-management-agent \ + caf-dbg.sh \ + caf-vgauth \ + commonenv.sh \ + install.sh \ + postinstallInstall.sh \ + postinstallUpgrade.sh \ + preinstallUpgrade.sh \ + preremoveUninstall.sh \ + preuninstall.sh \ + preupgrade.sh \ + restartServices.sh \ + stopAndRemoveServices.sh \ + upgrade.sh + diff --git a/open-vm-tools/common-agent/etc/install/caf-c-communication-service b/open-vm-tools/common-agent/etc/install/caf-c-communication-service new file mode 100644 index 000000000..61dd89000 --- /dev/null +++ b/open-vm-tools/common-agent/etc/install/caf-c-communication-service @@ -0,0 +1,81 @@ +#!/bin/bash +# +# Init file for the VMware CAF Communication Service +# +# chkconfig: 35 95 20 +# description: VMware Common Agent Framework Communication Service daemon +# +# processname: CommAmqpListener + +if [ -f /etc/rc.d/init.d/functions ]; then + . /etc/rc.d/init.d/functions +elif [ -f /lib/lsb/init-functions ]; then + . /lib/lsb/init-functions + type success >/dev/null 2>/dev/null + if [ $? -ne 0 ]; then + success() { + echo -en "$@" + echo -e "$rc_done" + } + failure() { + echo -en "$@" + echo -e "$rc_failed" + } + fi +fi + +progName="VMware CAF Communication Service (C Version)" +listenerName=CommAmqpListener +prog="@binDir@/$listenerName" +startScript="@scriptDir@/start-listener" +stopScript="@scriptDir@/stop-listener" +lockFile=/var/lock/subsys/caf-communication-service + +start() +{ + [ -x $startScript ] || exit 0 + echo -n $"Starting $progName:" + msg="$progBase daemon startup" + "$startScript" && success "$msg" || failure "$msg" + rc=$? + [ $rc -eq 0 ] && touch $lockFile + echo + return $rc +} + +stop() +{ + echo -n $"Stoppping $progName:" + killproc $prog -TERM + rc=$? + [ -x $stopScript ] && $stopScript && + [ $rc -ne 0 ] && [ -z "`pidof -x $prog`" ] && rc=0 + [ $rc -eq 0 ] && rm -f $lockFile + echo + return $rc +} + +restart() +{ + stop + sleep 2 + start +} + +condrestart() +{ + [ -e $lockFile ] && restart || : +} + +case "$1" in + start) start ;; + stop) stop ;; + status) status $prog ;; + restart) restart ;; + condrestart) condrestart ;; + *) + echo $"Usage: $0 {start|stop|status|condrestart|restart}" + exit 1 +esac + +exit $? diff --git a/open-vm-tools/common-agent/etc/install/caf-c-management-agent b/open-vm-tools/common-agent/etc/install/caf-c-management-agent new file mode 100644 index 000000000..f38f8b3b3 --- /dev/null +++ b/open-vm-tools/common-agent/etc/install/caf-c-management-agent @@ -0,0 +1,81 @@ +#!/bin/bash +# +# Init file for the VMware CAF Management Agent +# +# chkconfig: 35 95 20 +# description: VMware Common Agent Framework Management Agent daemon +# +# processname: ManagementAgentHost + +if [ -f /etc/rc.d/init.d/functions ]; then + . /etc/rc.d/init.d/functions +elif [ -f /lib/lsb/init-functions ]; then + . /lib/lsb/init-functions + type success >/dev/null 2>/dev/null + if [ $? -ne 0 ]; then + success() { + echo -en "$@" + echo -e "$rc_done" + } + failure() { + echo -en "$@" + echo -e "$rc_failed" + } + fi +fi + +progName="VMware CAF Management Agent (C Version)" +progBase=ManagementAgentHost +prog="@binDir@/$progBase" +startScript="@scriptDir@/start-ma" +stopScript="@scriptDir@/stop-ma" +lockFile=/var/lock/subsys/caf-management-agent + +start() +{ + [ -x $startScript ] || exit 0 + echo -n $"Starting $progName:" + msg="$progBase daemon startup" + "$startScript" && success "$msg" || failure "$msg" + rc=$? + [ $rc -eq 0 ] && touch $lockFile + echo + return $rc +} + +stop() +{ + echo -n $"Stoppping $progName:" + killproc $prog -TERM + rc=$? + [ -x $stopScript ] && $stopScript && + [ $rc -ne 0 ] && [ -z "`pidof -x $prog`" ] && rc=0 + [ $rc -eq 0 ] && rm -f $lockFile + echo + return $rc +} + +restart() +{ + stop + sleep 2 + start +} + +condrestart() +{ + [ -e $lockFile ] && restart || : +} + +case "$1" in + start) start ;; + stop) stop ;; + status) status $prog ;; + restart) restart ;; + condrestart) condrestart ;; + *) + echo $"Usage: $0 {start|stop|status|condrestart|restart}" + exit 1 +esac + +exit $? diff --git a/open-vm-tools/common-agent/etc/install/caf-dbg.sh b/open-vm-tools/common-agent/etc/install/caf-dbg.sh new file mode 100644 index 000000000..3fe651d1f --- /dev/null +++ b/open-vm-tools/common-agent/etc/install/caf-dbg.sh @@ -0,0 +1,359 @@ +#!/bin/bash + +function prtHeader() { + local header=$1 + + echo "*************************" + echo "***" + echo "*** $header" + echo "***" + echo "*************************" +} + +function validateNotEmpty() { + local value=$1 + local name=$2 + + if [ "$value" = "" ]; then + echo "Value cannot be empty - $name" + exit 1 + fi +} + +function enableCaf() { + local username="$1" + local password="$2" + validateNotEmpty "$username" "username" + validateNotEmpty "$password" "password" + + local uriFile="$CAF_INPUT_DIR/persistence/protocol/amqpBroker_default/uri.txt" + sed -i "s/@amqpUsername@/${username}/g" "$uriFile" + sed -i "s/@amqpPassword@/${password}/g" "$uriFile" +} + +function setBroker() { + local brokerAddr="$1" + validateNotEmpty "$brokerAddr" "brokerAddr" + + local uriFile="$CAF_INPUT_DIR/persistence/protocol/amqpBroker_default/uri.txt" + sed -i "s/@brokerAddr@/$brokerAddr/g" "$uriFile" +} + +function prtHelp() { + echo "*** $(basename $0) cmd - Runs commands that help with debugging CAF" + echo " * enableCaf brokerUsername brokerPassword Enables CAF" + echo " * setBroker brokerAddress Sets the Broker into the CAF config file" + echo "" + echo " * checkTunnel Checks the AMQP Tunnel " + echo " * checkCerts Checks the certificates" + echo " * checkCertsVerbose Checks the certificates" + echo "" + echo " * validateXml Validates the XML files against the published schema" + echo " * validateInstall Validates that the files are in the right locations and have the right permissions" + echo " * validateOVTInstall Validates that the files are in the right locations for OVT and have the right permissions" + echo " * checkFsPerms Checks the permissions, owner and group of the major CAF directories and files" + echo "" + echo " * clearCaches Clears the CAF caches" +} + +function validateXml() { + local schemaArea="$1" + local schemaPrefix="$2" + validateNotEmpty "$schemaArea" "schemaArea" + validateNotEmpty "$schemaPrefix" "schemaPrefix" + + local schemaRoot="http://10.25.57.32/caf-downloads" + + for file in $(find "$CAF_OUTPUT_DIR" -name '*.xml' -print0 2>/dev/null | xargs -0 egrep -IH -lw "${schemaPrefix}.xsd"); do + prtHeader "Validating $schemaArea/$schemaPrefix - $file" + xmllint --schema "${schemaRoot}/schema/${schemaArea}/${schemaPrefix}.xsd" "$file"; rc=$? + if [ "$rc" != "0" ]; then + exit $rc + fi + done +} + +function checkCerts() { + local certDir="$CAF_INPUT_DIR/certs" + + pushd $certDir > /dev/null + + prtHeader "Checking certs - $certDir" + + openssl rsa -in privateKey.pem -check -noout + openssl verify -check_ss_sig -x509_strict -CAfile cacert.pem publicKey.pem + + local clientCertMd5=$(openssl x509 -noout -modulus -in publicKey.pem | openssl md5 | cut -d' ' -f2) + local clientKeyMd5=$(openssl rsa -noout -modulus -in privateKey.pem | openssl md5 | cut -d' ' -f2) + if [ "$clientCertMd5" == "$clientKeyMd5" ]; then + echo "Public and Private Key md5's match" + else + echo "*** Public and Private Key md5's do not match" + exit 1 + fi + + popd > /dev/null +} + +function checkCertsVerbose() { + local certDir="$CAF_INPUT_DIR/certs" + + pushd $certDir > /dev/null + + prtHeader "Checking $certDir/cacert.pem" + openssl x509 -in cacert.pem -text -noout + + prtHeader "Checking $certDir/publicKey.pem" + openssl x509 -in publicKey.pem -text -noout + + prtHeader "Checking /etc/vmware-tools/GuestProxyData/server/cert.pem" + openssl x509 -in /etc/vmware-tools/GuestProxyData/server/cert.pem -text -noout + + popd > /dev/null +} + +function checkTunnel() { + local certDir="$CAF_INPUT_DIR/certs" + + pushd $certDir > /dev/null + + prtHeader "Connecting to tunnel" + openssl s_client -connect localhost:6672 -key privateKey.pem -cert publicKey.pem -CAfile cacert.pem -verify 10 + + popd > /dev/null +} + +function checkFsPerms() { + local dirOrFile="$1" + local permExp="$2" + local userExp="$3" + local groupExp="$4" + validateNotEmpty "$dirOrFile" "dirOrFile" + validateNotEmpty "$permExp" "permExp" + + if [ "$userExp" = "" ]; then + userExp="root" + fi + if [ "$groupExp" = "" ]; then + groupExp="root" + fi + + local statInfo=( $(stat -c "%a %U %G" $dirOrFile) ) + local permFnd=${statInfo[0]} + local userFnd=${statInfo[1]} + local groupFnd=${statInfo[2]} + + if [ "$permExp" != "$permFnd" ]; then + echo "*** Perm check failed - expected: $permExp, found: $permFnd, dir/file: $dirOrFile" + exit 1 + fi + + if [ "$userExp" != "$userFnd" ]; then + echo "*** User check failed - expected: $userExp, found: $userFnd, dir/file: $dirOrFile" + exit 1 + fi + + if [ "$groupExp" != "$groupFnd" ]; then + echo "*** Group check failed - expected: $groupExp, found: $groupFnd, dir/file: $dirOrFile" + exit 1 + fi +} + +function clearCaches() { + validateNotEmpty "$CAF_OUTPUT_DIR" "CAF_OUTPUT_DIR" + validateNotEmpty "$CAF_LOG_DIR" "CAF_LOG_DIR" + + prtHeader "Clearing the CAF caches" + rm -rf \ + $CAF_OUTPUT_DIR/schemaCache/* \ + $CAF_OUTPUT_DIR/comm-wrk/* \ + $CAF_OUTPUT_DIR/providerHost/* \ + $CAF_OUTPUT_DIR/responses/* \ + $CAF_OUTPUT_DIR/requests/* \ + $CAF_OUTPUT_DIR/request_state/* \ + $CAF_OUTPUT_DIR/events/* \ + $CAF_OUTPUT_DIR/errorResponse.xml \ + $CAF_LOG_DIR/* \ + $CAF_BIN_DIR/*.log +} + +function validateInstall() { +# checkFsPermsAll + checkFileExistsBin + checkFileExistsLib "$1" + checkFileExistsConfig + checkFileExistsScripts + checkFileExistsInstall + checkFileExistsInvokers + checkFileExistsProviderReg +} + +function checkFsPermsAll() { + checkFsPerms "$CAF_INPUT_DIR" "755" + checkFsPerms "$CAF_OUTPUT_DIR" "755" + checkFsPerms "$CAF_CONFIG_DIR" "755" + checkFsPerms "$CAF_LOG_DIR" "755" + checkFsPerms "$CAF_BIN_DIR" "755" + checkFsPerms "$CAF_LIB_DIR" "755" +} + +function checkFileExistsBin() { + checkFileExists "$CAF_BIN_DIR/InstallProvider" + checkFileExists "$CAF_BIN_DIR/TestInfraProvider" + checkFileExists "$CAF_BIN_DIR/RemoteCommandProvider" + checkFileExists "$CAF_BIN_DIR/ConfigProvider" + checkFileExists "$CAF_BIN_DIR/CommAmqpListener" + checkFileExists "$CAF_BIN_DIR/ManagementAgentHost" +} + +function checkFileExistsLib() { + checkFileExists "$CAF_LIB_DIR/libProviderFx.so" + checkFileExists "$CAF_LIB_DIR/libMaIntegrationSubsys.so" + checkFileExists "$CAF_LIB_DIR/libCommAmqpIntegrationSubsys.so" + checkFileExists "$CAF_LIB_DIR/libCommAmqpIntegration.so" + checkFileExists "$CAF_LIB_DIR/libFramework.so" + checkFileExists "$CAF_LIB_DIR/libCafIntegrationSubsys.so" + checkFileExists "$CAF_LIB_DIR/libIntegrationSubsys.so" + checkFileExists "$CAF_LIB_DIR/libVgAuthIntegrationSubsys.so" + checkFileExists "$CAF_LIB_DIR/libCommIntegrationSubsys.so" + + local OVT=$1 + if [ "$OVT" != "true" ]; then + checkFileExists "$CAF_LIB_DIR/libCommAmqpListener.so" + checkFileExists "$CAF_LIB_DIR/libManagementAgentHost.so" + checkFileExists "$CAF_LIB_DIR/liblog4cpp.so.5.0.6" + checkFileExists "$CAF_LIB_DIR/librabbitmq.so.4.1.4" + checkFileExists "$CAF_LIB_DIR/libgthread-2.0.so.0.3400.3" + checkFileExists "$CAF_LIB_DIR/libglib-2.0.so.0.3400.3" + fi +} + +function checkFileExistsConfig() { + checkFileExists "$CAF_CONFIG_DIR/ma-log4cpp_config" + checkFileExists "$CAF_CONFIG_DIR/ma-context.xml" + checkFileExists "$CAF_CONFIG_DIR/IntBeanConfigFile.xml" + checkFileExists "$CAF_CONFIG_DIR/CommAmqpListener-context-amqp.xml" + checkFileExists "$CAF_CONFIG_DIR/ma-appconfig" + checkFileExists "$CAF_CONFIG_DIR/CommAmqpListener-context-tunnel.xml" + checkFileExists "$CAF_CONFIG_DIR/CommAmqpListener-context-common.xml" + checkFileExists "$CAF_CONFIG_DIR/providerFx-appconfig" + checkFileExists "$CAF_CONFIG_DIR/CommAmqpListener-log4cpp_config" + checkFileExists "$CAF_CONFIG_DIR/CommAmqpListener-appconfig" + checkFileExists "$CAF_CONFIG_DIR/providerFx-log4cpp_config" + checkFileExists "$CAF_CONFIG_DIR/cafenv-appconfig" + checkFileExists "$CAF_CONFIG_DIR/persistence-appconfig" +} + +function checkFileExistsScripts() { + checkFileExists "$CAF_CONFIG_DIR/../scripts/startTestProc" + checkFileExists "$CAF_CONFIG_DIR/../scripts/caf-processes.sh" + checkFileExists "$CAF_CONFIG_DIR/../scripts/stop-ma" + checkFileExists "$CAF_CONFIG_DIR/../scripts/vgAuth" + checkFileExists "$CAF_CONFIG_DIR/../scripts/start-listener" + checkFileExists "$CAF_CONFIG_DIR/../scripts/stop-VGAuthService" + checkFileExists "$CAF_CONFIG_DIR/../scripts/start-ma" + checkFileExists "$CAF_CONFIG_DIR/../scripts/setUpVgAuth" + checkFileExists "$CAF_CONFIG_DIR/../scripts/start-VGAuthService" + checkFileExists "$CAF_CONFIG_DIR/../scripts/tearDownVgAuth" + checkFileExists "$CAF_CONFIG_DIR/../scripts/stop-listener" + checkFileExists "$CAF_CONFIG_DIR/../scripts/caf-common" +} + +function checkFileExistsInstall() { + checkFileExists "$CAF_CONFIG_DIR/../install/caf-dbg.sh" + checkFileExists "$CAF_CONFIG_DIR/../install/stopAndRemoveServices.sh" + checkFileExists "$CAF_CONFIG_DIR/../install/preuninstall.sh" + checkFileExists "$CAF_CONFIG_DIR/../install/postinstallUpgrade.sh" + checkFileExists "$CAF_CONFIG_DIR/../install/install.sh" + checkFileExists "$CAF_CONFIG_DIR/../install/preremoveUninstall.sh" + checkFileExists "$CAF_CONFIG_DIR/../install/preupgrade.sh" + checkFileExists "$CAF_CONFIG_DIR/../install/restartServices.sh" + checkFileExists "$CAF_CONFIG_DIR/../install/caf-vgauth" + checkFileExists "$CAF_CONFIG_DIR/../install/preinstallUpgrade.sh" + checkFileExists "$CAF_CONFIG_DIR/../install/caf-c-management-agent" + checkFileExists "$CAF_CONFIG_DIR/../install/upgrade.sh" + checkFileExists "$CAF_CONFIG_DIR/../install/commonenv.sh" + checkFileExists "$CAF_CONFIG_DIR/../install/postinstallInstall.sh" + checkFileExists "$CAF_CONFIG_DIR/../install/caf-c-communication-service" +} + +function checkFileExistsInvokers() { + checkFileExists "$CAF_INVOKERS_DIR/caf_RemoteCommandProvider_1_0_0.sh" + checkFileExists "$CAF_INVOKERS_DIR/caf_InstallProvider_1_0_0.sh" + checkFileExists "$CAF_INVOKERS_DIR/caf_ConfigProvider_1_0_0.sh" + checkFileExists "$CAF_INVOKERS_DIR/cafTestInfra_CafTestInfraProvider_1_0_0.sh" +} + +function checkFileExistsProviderReg() { + checkFileExists "$CAF_INPUT_DIR/providerReg/caf_RemoteCommandProvider_1_0_0.xml" + checkFileExists "$CAF_INPUT_DIR/providerReg/cafTestInfra_CafTestInfraProvider_1_0_0.xml" + checkFileExists "$CAF_INPUT_DIR/providerReg/caf_ConfigProvider_1_0_0.xml" + checkFileExists "$CAF_INPUT_DIR/providerReg/caf_InstallProvider_1_0_0.xml" +} + +function checkFileExists() { + local path="$1" + validateNotEmpty "$path" "path" + + if [ ! -f "$path" ]; then + echo "*** File existence check failed - expected: $path" + exit 1 + fi +} + +if [ $# -lt 1 -o "$1" = "--help" ]; then + prtHelp + exit 1 +fi + +cmd=$1 +shift + +installDir=$(dirname $(readlink -f $0)) +scriptsDir=$installDir/../scripts +configDir=$installDir/../config + +. $scriptsDir/caf-common +sourceCafenv "$configDir" + +case "$cmd" in + "validateXml") + validateXml "fx" "CafInstallRequest" + validateXml "fx" "DiagRequest" + validateXml "fx" "Message" + validateXml "fx" "MgmtRequest" + validateXml "fx" "MultiPmeMgmtRequest" + validateXml "fx" "ProviderInfra" + validateXml "fx" "ProviderRequest" + validateXml "fx" "Response" + validateXml "cmdl" "ProviderResults" + ;; + "checkCerts") + checkCerts "$certDir" + ;; + "checkCertsVerbose") + checkCertsVerbose "$certDir" + ;; + "checkTunnel") + checkTunnel "$certDir" + ;; + "clearCaches") + clearCaches + ;; + "enableCaf") + enableCaf "$1" "$2" + ;; + "setBroker") + setBroker "$1" + ;; + "validateInstall") + validateInstall + ;; + "validateOVTInstall") + validateInstall "true" + ;; + *) + echo "Bad command - $cmd" + prtHelp + exit 1 +esac diff --git a/open-vm-tools/common-agent/etc/install/caf-vgauth b/open-vm-tools/common-agent/etc/install/caf-vgauth new file mode 100644 index 000000000..988a83730 --- /dev/null +++ b/open-vm-tools/common-agent/etc/install/caf-vgauth @@ -0,0 +1,81 @@ +#!/bin/bash +# +# Init file for the VMware CAF VgAuth Service +# +# chkconfig: 35 95 20 +# description: VMware Common Agent Framework VgAuth daemon +# +# processname: VGAuthService + +if [ -f /etc/rc.d/init.d/functions ]; then + . /etc/rc.d/init.d/functions +elif [ -f /lib/lsb/init-functions ]; then + . /lib/lsb/init-functions + type success >/dev/null 2>/dev/null + if [ $? -ne 0 ]; then + success() { + echo -en "$@" + echo -e "$rc_done" + } + failure() { + echo -en "$@" + echo -e "$rc_failed" + } + fi +fi + +progName="VMware CAF VgAuth" +listenerName=VGAuthService +prog="@binDir@/$listenerName" +startScript="@scriptDir@/start-VGAuthService" +stopScript="@scriptDir@/stop-VGAuthService" +lockFile=/var/lock/subsys/caf-vgauth-service + +start() +{ + [ -x $startScript ] || exit 0 + echo -n $"Starting $progName:" + msg="$progBase daemon startup" + "$startScript" && success "$msg" || failure "$msg" + rc=$? + [ $rc -eq 0 ] && touch $lockFile + echo + return $rc +} + +stop() +{ + echo -n $"Stoppping $progName:" + killproc $prog -TERM + rc=$? + [ -x $stopScript ] && $stopScript && + [ $rc -ne 0 ] && [ -z "`pidof -x $prog`" ] && rc=0 + [ $rc -eq 0 ] && rm -f $lockFile + echo + return $rc +} + +restart() +{ + stop + sleep 2 + start +} + +condrestart() +{ + [ -e $lockFile ] && restart || : +} + +case "$1" in + start) start ;; + stop) stop ;; + status) status $prog ;; + restart) restart ;; + condrestart) condrestart ;; + *) + echo $"Usage: $0 {start|stop|status|condrestart|restart}" + exit 1 +esac + +exit $? diff --git a/open-vm-tools/common-agent/etc/install/commonenv.sh b/open-vm-tools/common-agent/etc/install/commonenv.sh new file mode 100644 index 000000000..5e31b5de9 --- /dev/null +++ b/open-vm-tools/common-agent/etc/install/commonenv.sh @@ -0,0 +1 @@ +cafServices="caf-c-communication-service caf-c-management-agent" diff --git a/open-vm-tools/common-agent/etc/install/configCaf b/open-vm-tools/common-agent/etc/install/configCaf new file mode 100644 index 000000000..e69de29bb diff --git a/open-vm-tools/common-agent/etc/install/install.sh b/open-vm-tools/common-agent/etc/install/install.sh new file mode 100644 index 000000000..02937f3e5 --- /dev/null +++ b/open-vm-tools/common-agent/etc/install/install.sh @@ -0,0 +1,225 @@ +#!/bin/sh + +#Args +#brokerAddr +# - default: +#baseLibDir +# - default: /usr/lib +# - expand to "$baseLibDir"/vmware-caf/pme +# +#baseInputDir +# - default: /var/lib +# - expand to "$baseInputDir"/vmware-caf/pme/data/input +# +#baseOutputDir +# - default: /var/lib +# - expand to "$baseOutputDir"/vmware-caf/pme/data/output + +#Standard env +SCRIPT=`basename "$0"` + +#Set defaults +baseLibDir='/usr/lib' +baseBinDir='/usr/lib' +baseInputDir='/var/lib' +baseOutputDir='/var/lib' +brokerAddr='@brokerAddr@' +linkSo='yes' + +#Help function +HELP() { + echo -e \\n"Help documentation for ${SCRIPT}."\\n + echo -e "Basic usage: $SCRIPT"\\n + echo "Command line switches are optional. The following switches are recognized." + echo "b --Sets the value for the broker address. Default is '$brokerAddr'." + echo "i --Sets the base location for the input data. Default is '$baseInputDir'." + echo "l --Sets the base location for the libraries. Default is '$baseLibDir'." + echo "B --Sets the location for the binaries. Default is '$baseLibDir'/bin or 'bin' in base location of libraries." + echo "o --Sets the base location for the output data. Default is '$baseOutputDir'." + echo "L --Do not create symlinks for libraries." + echo -e "h --Displays this help message. No further functions are performed."\\n + echo -e "Example: $SCRIPT -b 10.25.91.81 -i \"/usr/lib\" -i \"/var/lib\" -o \"/var/lib\""\\n + exit 1 +} + +#Replace tokens with install values +setupCafConfig() { + local pattern="$1" + local value="$2" + local rconfigDir="$3" + + if [ ! -n "$pattern" ]; then + echo 'The pattern cannot be empty!' + exit 1 + fi + if [ -n "$value" ]; then + if [ ! -f "$rconfigDir/cafenv-appconfig" ]; then + echo "The config file must exist! - $rconfigDir/cafenv-appconfig" + exit 1 + fi + + sed -i "s?$pattern?$value?g" "$rconfigDir/cafenv-appconfig" + fi +} + +##BEGIN Main + +#Get Optional overrides +while getopts ":b:i:l:B:o:hL" opt; do + case $opt in + b) + brokerAddr="$OPTARG" + ;; + i) + baseInputDir="$OPTARG" + ;; + l) + baseLibDir="$OPTARG" + ;; + B) + baseBinDir="$OPTARG" + ;; + o) + baseOutputDir="$OPTARG" + ;; + L) + linkSo='no' + ;; + h) + HELP + ;; + \?) + echo "Invalid option: -$OPTARG" >&2 + HELP + ;; + esac +done + +stdQuals="vmware-caf/pme" + +libDir="${D}/$baseLibDir/$stdQuals/lib" +binDir="${D}/$baseBinDir/$stdQuals/bin" +inputDir="${D}/$baseInputDir/$stdQuals/data/input" +outputDir="${D}/$baseOutputDir/$stdQuals/data/output" + +providersDir="$inputDir/providers" +invokersDir="$inputDir/invokers" +persistenceDir="$inputDir/persistence" +protocolDir="$persistenceDir/protocol" +localDir="$persistenceDir/local" +amqpBrokerDir="$protocolDir/amqpBroker_default" +tlsCertCollectionDir="$amqpBrokerDir/tlsCertCollection" + +logDir="${D}/var/log/$stdQuals" + +baseEtcDir="${D}/etc/$stdQuals" +configDir="$baseEtcDir/config" +installDir="$baseEtcDir/install" +scriptDir="$baseEtcDir/scripts" + +brokerUriOpts="vhost=caf;connection_timeout=150000;connection_retries=10;connection_seconds_to_wait=10;channel_cache_size=3" + +#Ensure directories exist +mkdir -p "$outputDir" +mkdir -p "$persistenceDir" +mkdir -p "$protocolDir" +mkdir -p "$amqpBrokerDir" +mkdir -p "$tlsCertCollectionDir" +mkdir -p "$localDir" +mkdir -p "$invokersDir" +mkdir -p "$providersDir" +mkdir -p "$logDir" + +if [ -f "/etc/vmware-tools/GuestProxyData/server/cert.pem" ]; then + cp -f "/etc/vmware-tools/GuestProxyData/server/cert.pem" "$tlsCertCollectionDir/cacert.pem" +fi + +vcidPath="/etc/vmware-tools/GuestProxyData/VmVcUuid/vm.vc.uuid" +if [ -f "$vcidPath" ]; then + reactiveRequestAmqpQueueId=$(cat "$vcidPath")-agentId1 +else + reactiveRequestAmqpQueueId=`uuidgen` +fi + +tunnelPort=$(netstat -ldn | egrep ":6672 ") +if [ -f "$vcidPath" -a "$tunnelPort" != "" ]; then + commAmqpListenerContext="$configDir/CommAmqpListener-context-tunnel.xml" + brokerUri="tunnel:agentId1:bogus@localhost:6672/${reactiveRequestAmqpQueueId}?${brokerUriOpts}" +else + commAmqpListenerContext="$configDir/CommAmqpListener-context-amqp.xml" + brokerUri="amqp:@amqpUsername@:@amqpPassword@@${brokerAddr}:5672/${reactiveRequestAmqpQueueId}?${brokerUriOpts}" +fi + +echo "[globals]" > "$configDir/persistence-appconfig" +echo "reactive_request_amqp_queue_id=$reactiveRequestAmqpQueueId" >> "$configDir/persistence-appconfig" +echo "comm_amqp_listener_context=$commAmqpListenerContext" >> "$configDir/persistence-appconfig" + +echo -n "$brokerUri" > "$amqpBrokerDir/uri.txt" +echo -n "$reactiveRequestAmqpQueueId" > "$localDir/localId.txt" + +#Substitute values into config files +setupCafConfig '@installDir@' "$installDir" "$configDir" +setupCafConfig '@libDir@' "$libDir" "$configDir" +setupCafConfig '@binDir@' "$binDir" "$configDir" +setupCafConfig '@configDir@' "$configDir" "$configDir" +setupCafConfig '@inputDir@' "$inputDir" "$configDir" +setupCafConfig '@outputDir@' "$outputDir" "$configDir" +setupCafConfig '@providersDir@' "$providersDir" "$configDir" +setupCafConfig '@invokersDir@' "$invokersDir" "$configDir" +setupCafConfig '@logDir@' "$logDir" "$configDir" + +#Set default permissions +if [ -d "$libDir" ]; then + for directory in $(find "$libDir" -type d); do + chmod 755 "$directory" + done + + for file in $(find "$libDir" -type f); do + chmod 555 "$file" + done +fi + +if [ -d "$inputDir" ]; then + for file in $(find "$inputDir" -type f); do + chmod 644 "$file" + done + + if [ -d "$persistenceDir" ]; then + for file in $(find "$persistenceDir" -type f); do + chmod 440 "$file" + done + fi + + if [ -d "$invokersDir" ]; then + for file in $(find "$invokersDir" -type f); do + chmod 555 "$file" + done + fi +fi + +if [ -d "$scriptDir" ]; then + chmod 555 "$scriptDir"/* +fi + +#Set up links +if [ "$linkSo" != "no" ] ; then + cd "$libDir" + ln -sf libglib-2.0.so.0.3400.3 libglib-2.0.so + ln -sf libglib-2.0.so.0.3400.3 libglib-2.0.so.0 + ln -sf libgthread-2.0.so.0.3400.3 libgthread-2.0.so + ln -sf libgthread-2.0.so.0.3400.3 libgthread-2.0.so.0 + ln -sf liblog4cpp.so.5.0.6 liblog4cpp.so + ln -sf liblog4cpp.so.5.0.6 liblog4cpp.so.5 + ln -sf librabbitmq.so.4.1.4 librabbitmq.so + ln -sf librabbitmq.so.4.1.4 librabbitmq.so.4 +fi + +#Run provider install logic +installPProviders="$installDir/installPythonProviders.sh" +if [ -e "$installPProviders" ]; then + "$installPProviders" +fi + +#if previous CAF installation + #migrate config + #migrate other state diff --git a/open-vm-tools/common-agent/etc/install/installConfig b/open-vm-tools/common-agent/etc/install/installConfig new file mode 100644 index 000000000..e69de29bb diff --git a/open-vm-tools/common-agent/etc/install/postinstallInstall.sh b/open-vm-tools/common-agent/etc/install/postinstallInstall.sh new file mode 100644 index 000000000..02744c5c6 --- /dev/null +++ b/open-vm-tools/common-agent/etc/install/postinstallInstall.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +installDir=$(dirname $(readlink -f $0)) +scriptsDir=$installDir/../scripts + +$installDir/install.sh -l /usr/lib -i /var/lib -o /var/lib +$scriptsDir/start-ma + +# Start Communication once we've removed the amqp_username/password requirement. diff --git a/open-vm-tools/common-agent/etc/install/postinstallUpgrade.sh b/open-vm-tools/common-agent/etc/install/postinstallUpgrade.sh new file mode 100644 index 000000000..f5449b277 --- /dev/null +++ b/open-vm-tools/common-agent/etc/install/postinstallUpgrade.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +installDir=$(dirname $(readlink -f $0)) +scriptsDir=$installDir/../scripts + +$installDir/upgrade.sh +$scriptsDir/start-ma +$scriptsDir/start-listener diff --git a/open-vm-tools/common-agent/etc/install/preinstallUpgrade.sh b/open-vm-tools/common-agent/etc/install/preinstallUpgrade.sh new file mode 100644 index 000000000..87076a6b2 --- /dev/null +++ b/open-vm-tools/common-agent/etc/install/preinstallUpgrade.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +installDir=$(dirname $(readlink -f $0)) +scriptsDir=$installDir/../scripts + +#Shutdown any configured services +$scriptsDir/stop-ma +$scriptsDir/stop-listener +$installDir/preupgrade.sh diff --git a/open-vm-tools/common-agent/etc/install/preremoveUninstall.sh b/open-vm-tools/common-agent/etc/install/preremoveUninstall.sh new file mode 100644 index 000000000..9eb5eb03b --- /dev/null +++ b/open-vm-tools/common-agent/etc/install/preremoveUninstall.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +installDir=$(dirname $(readlink -f $0)) +scriptsDir=$installDir/../scripts + +$scriptsDir/stop-ma +$scriptsDir/stop-listener diff --git a/open-vm-tools/common-agent/etc/install/preuninstall.sh b/open-vm-tools/common-agent/etc/install/preuninstall.sh new file mode 100644 index 000000000..bfe88c3c2 --- /dev/null +++ b/open-vm-tools/common-agent/etc/install/preuninstall.sh @@ -0,0 +1,40 @@ +#!/bin/sh + +#Get info on how the installation was configured +installDir=$(dirname $(readlink -f $0)) +scriptsDir=$installDir/../scripts +configDir=$installDir/../config + +. $scriptsDir/caf-common +sourceCafenv "$configDir" + +#Set a safety check string +VALIDATE_STRING='vmware-caf' + +safe_rm() { + #Only remove directory paths that contain the validate string + if test "${1#*$VALIDATE_STRING}" != "$1"; then + rm -rf "$1" + fi +} + +#The default of this should be /usr/lib/vmware-caf +#base_binary_dir=$(dirname $(dirname $CAF_BIN_DIR)) +#safe_rm "$base_binary_dir" + +#The default of this should be /var/lib/vmware-caf +#base_data_dir=$(dirname $(dirname $(dirname $CAF_INPUT_DIR))) +#safe_rm "$base_data_dir" + +#The default of this should be /var/log/vmware-caf +base_log_dir=$(dirname $CAF_LOG_DIR) +safe_rm "$base_log_dir" + +#07/21/2015 +#Remove some log files that get put into the CAF bin dir. +#This is a hack until we fix the code to prevent this from happening. +base_binary_dir="$CAF_BIN_DIR" +safe_rm "$base_binary_dir/CommAmqpListener-log4cpp.log" +safe_rm "$base_binary_dir/CommAmqpListener-log4cpp_rolling.log" +safe_rm "$base_binary_dir/ma-log4cpp.log" +safe_rm "$base_binary_dir/ma-log4cpp_rolling.log" diff --git a/open-vm-tools/common-agent/etc/install/preupgrade.sh b/open-vm-tools/common-agent/etc/install/preupgrade.sh new file mode 100644 index 000000000..c276af785 --- /dev/null +++ b/open-vm-tools/common-agent/etc/install/preupgrade.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +installDir=$(dirname $(readlink -f $0)) +configDir=$installDir/../config + +#Preserve config +mkdir -p "$configDir"/_previous_ +cp -pf "$configDir"/cafenv-appconfig "$configDir"/_previous_/ 2>/dev/null + +#Temporary until we remove amqp_username/password +cp -pf "$configDir"/CommAmqpListener-appconfig "$configDir"/_previous_/ 2>/dev/null diff --git a/open-vm-tools/common-agent/etc/install/restartServices.sh b/open-vm-tools/common-agent/etc/install/restartServices.sh new file mode 100644 index 000000000..f7b78acae --- /dev/null +++ b/open-vm-tools/common-agent/etc/install/restartServices.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +dir=$(cd -P -- "$(dirname -- "$0")" && pwd -P) + +. "$dir"/commonenv.sh + +#Stop configured services +for cafService in $cafServices; do + /sbin/chkconfig $cafService + if [ $? -eq 0 ]; then + /sbin/service $cafService restart + fi +done diff --git a/open-vm-tools/common-agent/etc/install/setupCafServices.sh b/open-vm-tools/common-agent/etc/install/setupCafServices.sh new file mode 100644 index 000000000..e69de29bb diff --git a/open-vm-tools/common-agent/etc/install/stopAndRemoveServices.sh b/open-vm-tools/common-agent/etc/install/stopAndRemoveServices.sh new file mode 100644 index 000000000..1c3dbfb85 --- /dev/null +++ b/open-vm-tools/common-agent/etc/install/stopAndRemoveServices.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +dir=$(cd -P -- "$(dirname -- "$0")" && pwd -P) + +. "$dir"/commonenv.sh + +#Stop configured services +for cafService in $cafServices; do + /sbin/chkconfig $cafService + if [ $? -eq 0 ]; then + /sbin/service $cafService stop + chkconfig --del $cafService + fi +done diff --git a/open-vm-tools/common-agent/etc/install/upgrade.sh b/open-vm-tools/common-agent/etc/install/upgrade.sh new file mode 100644 index 000000000..66b55f791 --- /dev/null +++ b/open-vm-tools/common-agent/etc/install/upgrade.sh @@ -0,0 +1,48 @@ +#!/bin/sh + +installDir=$(dirname $(readlink -f $0)) +scriptsDir=$installDir/../scripts +configDir=$installDir/../config + +prevCafenvAppconfig="$configDir/_previous_/cafenv-appconfig" +if [ ! -f "$prevCafenvAppconfig" ]; then + echo "The backup file must exist! - $prevCafenvAppconfig" + exit 1 +fi +mv -f "$prevCafenvAppconfig" "$configDir" + +#Temporary until we remove amqp_username/password +prevCommAppconfig="$configDir/_previous_/CommAmqpListener-appconfig" +if [ ! -f "$prevCommAppconfig" ]; then + echo "The backup file must exist! - $prevCommAppconfig" + exit 1 +fi +mv -f "$prevCommAppconfig" "$configDir" + +#Remove the now empty backup directory +rmdir "$configDir"/_previous_ + +. $scriptsDir/caf-common +sourceCafenv "$configDir" + +# Make newer systemd systems (OpenSuSE 13.2) happy +#if [ -x /usr/bin/systemctl ]; then +# /usr/bin/systemctl daemon-reload +#fi + +#"$dir"/restartServices.sh + +if [ ! -d $CAF_LIB_DIR ]; then + echo "CAF_LIB_DIR not found - $CAF_LIB_DIR" + exit 1 +fi + +cd $CAF_LIB_DIR +ln -sf libglib-2.0.so.0.3400.3 libglib-2.0.so +ln -sf libglib-2.0.so.0.3400.3 libglib-2.0.so.0 +ln -sf libgthread-2.0.so.0.3400.3 libgthread-2.0.so +ln -sf libgthread-2.0.so.0.3400.3 libgthread-2.0.so.0 +ln -sf liblog4cpp.so.5.0.6 liblog4cpp.so +ln -sf liblog4cpp.so.5.0.6 liblog4cpp.so.5 +ln -sf librabbitmq.so.4.1.4 librabbitmq.so +ln -sf librabbitmq.so.4.1.4 librabbitmq.so.4 diff --git a/open-vm-tools/common-agent/etc/scripts/Makefile.am b/open-vm-tools/common-agent/etc/scripts/Makefile.am new file mode 100644 index 000000000..aa95bf974 --- /dev/null +++ b/open-vm-tools/common-agent/etc/scripts/Makefile.am @@ -0,0 +1,33 @@ +################################################################################ +### Copyright (C) 2015 VMware, Inc. All rights reserved. +### +### This program is free software; you can redistribute it and/or modify +### it under the terms of version 2 of the GNU General Public License as +### published by the Free Software Foundation. +### +### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +################################################################################ + +confdir=/etc/vmware-caf/pme/scripts + +conf_SCRIPTS = \ + caf-common \ + caf-processes.sh \ + setUpVgAuth \ + start-listener \ + start-ma \ + startTestProc \ + start-VGAuthService \ + stop-listener \ + stop-ma \ + stop-VGAuthService \ + tearDownVgAuth \ + vgAuth + diff --git a/open-vm-tools/common-agent/etc/scripts/caf-common b/open-vm-tools/common-agent/etc/scripts/caf-common new file mode 100644 index 000000000..0b7c49cdc --- /dev/null +++ b/open-vm-tools/common-agent/etc/scripts/caf-common @@ -0,0 +1,191 @@ +#!/bin/sh + +sourceCafenv() { + local configDir=$1 + local cafenvAppconfig="$configDir/cafenv-appconfig" + + if [ ! -f "$cafenvAppconfig" ]; then + echo "*** cafenv-appconfig file not found - $cafenvAppconfig" + exit 1 + fi + + local tmpCafenv="/tmp/_cafenv-appconfig_" + cat "$cafenvAppconfig" | sed 's/^\[/#[/g' | sed 's/^\([a-z].*=\)/export CAF_\U\1/g' > "$tmpCafenv" + . "$tmpCafenv" +} + +getCurrentDir() { + return $(dirname $(readlink -f $0)) +} + +startCafProcess() { + local startType="$1" + local startDir="$2" + local processDir="$3" + local processName="$4" + + local processPath="$processDir/$processName" + verifyProcessNotRunning "$processPath" + setUtf8Locale + + mkdir -p "$startDir" + cd "$startDir" + + case "$startType" in + "daemon") + $processPath + ;; + "foreground") + $processPath -n + ;; + "valgrindMemChecks") + G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind -v --tool=memcheck --leak-check=full --num-callers=40 --track-origins=yes --log-file=${processPath}-valgrind-memchecks.log $processPath -n + ;; + "valgrindProfiling") + valgrind --tool=callgrind --log-file=${processPath}-valgrind-profiling.log $processPath -n + ;; + "valgrindThreading") + valgrind --tool=helgrind --track-lockorders=no --log-file=${processPath}-valgrind-threading.log $processPath -n + ;; + *) + echo "Unknown startType - $startType"; exit 1 + ;; + esac +} + +startVgAuthProcess() { + local startType="$1" + local startDir="$2" + local processDir="$3" + local processName="$4" + + local processPath="$processDir/$processName" + verifyProcessNotRunning "$processPath" + setUtf8Locale + + mkdir -p "$startDir" + cd "$startDir" + + # Run the processes using -s rather than -d if you want the logging to go the file instead of the console + case "$startType" in + "daemon") + # This is supposed to start the service as a daemon, but it's failing... perhaps because the service + # hasn't been registered - see above. + #./$processName -b + + # -s tells it to log to a file, -d to the console + nohup $processPath -s > ${processPath}.out 2>&1 & + ;; + "foreground") + $processPath -d + ;; + "valgrindMemChecks") + G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind -v --tool=memcheck --leak-check=full --num-callers=40 --log-file=${processPath}-valgrind.log $processPath -d + ;; + "valgrindProfiling") + valgrind --tool=callgrind $processPath -d + ;; + *) + echo "Unknown startType - $startType"; exit 1 + ;; + esac +} + +#The best locale is UTF8, and prefereably matches the +#desired language and region +getBestLocale() { + # Only find one best + if [ -z $best_locale ]; then + echo "Looking for best match for <$1>" + #If no language or region is defined, default to US English + if [ "$1" = "C" -o "$1" = "" -o "$1" = "POSIX" ]; then + echo "Generic starting point, defaulting" + getBestLocale "en_US" + return + fi + + available_utf8_locales=`locale -a | egrep -i '.utf8|.utf-8' | egrep -vi '^c.utf'` + for loc in $available_utf8_locales; do + best_locale=$loc + #echo "Trying $loc" + if test "${loc#*$1}" != "$loc"; then + echo "$loc is best match for $1" + return + fi + done + + if [ -z $best_locale ]; then + echo "No UTF8 locale found" + exit 1 + fi + + #If no match was found, use any valid UTF8 + echo "Found no best, using $best_locale" + fi +} + +#Set the locale to something UTF8 +setUtf8Locale() { + # Only change if the current locale is not UTF8 + locale_list=`locale | egrep -vi '.utf8|.utf-8|=$|LANGUAGE'` + if [ $? -eq 0 ]; then + echo "The locale is not UTF8, looking for a better one" + + #LC_ALL takes precedence + if [ ! -z $LC_ALL ]; then + echo "Initializing locale search with LC_ALL:$LC_ALL" + initial_local=$LC_ALL + else + echo "Initializing locale search with LANG:$LANG" + initial_local=$LANG + fi + + locale_prefix=`echo $initial_local | sed 's/\.[^.]*$//'` + getBestLocale $locale_prefix + + #For now, we'll just set LANG and LC_ALL, we may need to cycle + #through the entire locale_list in the future + export LANG=$best_locale + export LC_ALL=$best_locale + fi +} + +verifyProcessNotRunning() { + local processPath=$1 + + pid=$(ps aux | egrep "${processPath}" | egrep -v "color=auto|grep" | awk '{print $2}') + if [ ! -z "$pid" ]; then + echo "$processPath is already running - $pid"; exit 0 + fi +} + +stopProcess() { + local processDir=$1 + local processName=$2 + + local processPath="$processDir/$processName" + + pid=$(ps aux | egrep "${processPath}" | egrep -v "color=auto|grep" | awk '{print $2}') + if [ -z "$pid" ]; then + echo "$processPath not found" + else + echo "Stopping $processPath - $pid" + counter=0 + while [ ! -z "$pid" ]; do + if [ $counter -lt 20 ]; then + kill $pid + else + echo "Killing $processPath with prejudice- $pid" + kill -9 $pid + fi + counter=`expr $counter + 1`; + #echo "counter=$counter" + sleep 1 + pid=$(ps aux | egrep "${processPath}" | egrep -v "color=auto|grep" | awk '{print $2}') + done + fi +} + +enableCoreFiles() { + ulimit -c unlimited +} diff --git a/open-vm-tools/common-agent/etc/scripts/caf-processes.sh b/open-vm-tools/common-agent/etc/scripts/caf-processes.sh new file mode 100644 index 000000000..e390e6279 --- /dev/null +++ b/open-vm-tools/common-agent/etc/scripts/caf-processes.sh @@ -0,0 +1,191 @@ +#!/bin/bash + +function prtHeader() { + local header=$1 + + echo "*************************" + echo "***" + echo "*** $header" + echo "***" + echo "*************************" +} + +function prtHelp() { + echo "*** $0 cmd " + echo " Runs various CAF commands" + echo " cmd: The CAF command to run:" + echo " * listServices Lists the CAF Services" + echo " * startServices Starts the Services" + echo " * stopServices Stops the Services" + echo " * killServices Kills the Services" + echo "" + echo " * startListener Starts the Listener Service" + echo " * startListenerForeground Starts the Listener in the foreground" + echo " * startListenerValgrindMemChecks Starts the Listener with Valgrind Mem Checks" + echo " * stopListener Stops the Listener Service" + echo " * killListener Kills the Listener Service" + echo "" + echo " * startMa Starts the Management Agent Service" + echo " * startMaForeground Starts the Management Agent in the foreground" + echo " * startMaValgrindMemChecks Starts the Management Agent with Valgrind Mem Checks" + echo " * stopMa Stops the Management Agent Service" + echo " * killMa Kills the Management Agent Service" +} + +function startProcess() { + local process="$1" + local enableConsoleLogging="$2" + local cmd="$3" + + case "$process" in + "listener") + if [ -f "$scriptsDir/start-listener" ]; then + prtHeader "Starting Listener - $cmd" + if [ "$enableConsoleLogging" = "true" ]; then + enableConsoleLogging "CommAmqpListener" + else + disableConsoleLogging "CommAmqpListener" + fi + $scriptsDir/start-listener "$cmd" + fi + ;; + "ma") + if [ -f "$scriptsDir/start-ma" ]; then + prtHeader "Starting Management Agent - $cmd" + if [ "$enableConsoleLogging" = "true" ]; then + enableConsoleLogging "ma" + else + disableConsoleLogging "ma" + fi + $scriptsDir/start-ma "$cmd" + fi + ;; + *) + echo "Unknown process - $process" + prtHelp + exit 1 + esac + +} + +function stopListener() { + if [ -f "$scriptsDir/stop-listener" ]; then + $scriptsDir/stop-listener + fi +} + +function stopMa() { + if [ -f "$scriptsDir/stop-ma" ]; then + $scriptsDir/stop-ma + fi +} + +function killListener() { + pid=$(ps -eo pid,cmd | egrep "CommAmqpListener" | egrep -v "egrep" | awk '{print $1}') + if [ "$pid" != "" ]; then + echo "Killing Listener - $pid" + kill -9 $pid + fi +} + +function killMa() { + pid=$(ps -eo pid,cmd | egrep "ManagementAgentHost" | egrep -v "egrep" | awk '{print $1}') + if [ "$pid" != "" ]; then + echo "Killing Management Agent - $pid" + kill -9 $pid + fi +} + +function enableConsoleLogging() { + component="$1" + + sed -i 's/^#log4j.rootCategory=DEBUG, console/log4j.rootCategory=DEBUG, console/g' "$CAF_CONFIG_DIR/${component}-log4cpp_config" + sed -i 's/^log4j.rootCategory=DEBUG, logfile/#log4j.rootCategory=DEBUG, logfile/g' "$CAF_CONFIG_DIR/${component}-log4cpp_config" +} + +function disableConsoleLogging() { + component="$1" + + sed -i 's/^log4j.rootCategory=DEBUG, console/#log4j.rootCategory=DEBUG, console/g' "$CAF_CONFIG_DIR/${component}-log4cpp_config" + sed -i 's/^#log4j.rootCategory=DEBUG, logfile/log4j.rootCategory=DEBUG, logfile/g' "$CAF_CONFIG_DIR/${component}-log4cpp_config" +} + +if [ $# -lt 1 -o "$1" = "--help" ]; then + prtHelp + exit 1 +fi + +cmd=$1 +shift +cmd_params=$@ + +scriptsDir=$(dirname $(readlink -f $0)) +configDir=$scriptsDir/../config + +. $scriptsDir/caf-common +sourceCafenv "$configDir" + +case "$cmd" in + "listServices") + prtHeader "Listing services" + ps -ef | egrep "CommAmqpListener|ManagementAgentHost|VGAuthService" | egrep -v "egrep" + ;; + "startListener") + startProcess "listener" "false" "daemon" + ;; + "startMa") + startProcess "ma" "false" "daemon" + ;; + "startServices") + startProcess "listener" "false" "daemon" + startProcess "ma" "false" "daemon" + ;; + "startListenerForeground") + startProcess "listener" "true" "foreground" + ;; + "startMaForeground") + startProcess "ma" "true" "foreground" + ;; + "startListenerValgrindMemChecks") + startProcess "listener" "true" "valgrindMemChecks" + ;; + "startMaValgrindMemChecks") + startProcess "ma" "true" "valgrindMemChecks" + ;; + "startListenerValgrindProfiling") + startProcess "listener" "true" "valgrindProfiling" + ;; + "startMaValgrindProfiling") + startProcess "ma" "true" "valgrindProfiling" + ;; + "startListenerValgrindThreading") + startProcess "listener" "true" "valgrindThreading" + ;; + "startMaValgrindThreading") + startProcess "ma" "true" "valgrindThreading" + ;; + "stopListener") + stopListener + ;; + "stopMa") + stopMa + ;; + "stopServices") + stopListener + stopMa + ;; + "killListener") + killListener + ;; + "killMa") + killMa + ;; + "killServices") + killListener + killMa + ;; + *) + echo "Bad command - $cmd" + prtHelp + exit 1 +esac diff --git a/open-vm-tools/common-agent/etc/scripts/setUpVgAuth b/open-vm-tools/common-agent/etc/scripts/setUpVgAuth new file mode 100644 index 000000000..6b548ba41 --- /dev/null +++ b/open-vm-tools/common-agent/etc/scripts/setUpVgAuth @@ -0,0 +1,39 @@ +#!/bin/sh + +helpMessage() { + echo "*** $0 {userName} {certPath} {subject}" + echo " Starts the VgAuth service and optionally adds the user and user->subject mapping" + echo " userName: The name of the user to be added [default: $userName]" + echo " certPath: Path to the certificate [default: $certPath]" + echo " subject: Subject that maps to the userName in the SAML [default: $subject]" + exit 1 +} + +scriptsDir=$(dirname $(readlink -f $0)) +certsDir=$scriptsDir/../data/input/certs + +userName="" +certPath=$certsDir/selfSignedCert.pem +subject="samlTestSubject" + +if [ $# -gt 3 -o "$1" = "--help" ]; then + helpMessage +fi +if [ $# -ge 1 ]; then + userName=$1 +fi +if [ $# -ge 2 ]; then + certPath=$2 +fi +if [ $# -ge 3 ]; then + subject=$3 +fi + +$scriptsDir/start-VGAuthService + +if [ $userName != "" ]; then + /usr/sbin/useradd $userName + + sleep 1 + $scriptsDir/vgAuth addUser $userName $certPath $subject +fi diff --git a/open-vm-tools/common-agent/etc/scripts/start-VGAuthService b/open-vm-tools/common-agent/etc/scripts/start-VGAuthService new file mode 100644 index 000000000..6480f81ae --- /dev/null +++ b/open-vm-tools/common-agent/etc/scripts/start-VGAuthService @@ -0,0 +1,32 @@ +#!/bin/sh + +helpMessage() { + local defStartType=$1 + + echo "*** $0 {startType}" + echo " Starts VgAuth" + echo " startType: How to start the listener (daemon, foreground, valgrindMemChecks, valgrindProfiling) [default: $defStartType]" + exit 1 +} + +startType="daemon" +if [ $# -gt 1 -o "$1" = "--help" ]; then + helpMessage "$startType" +fi +if [ $# -ge 1 ]; then + startType=$1 +fi + +scriptsDir=$(dirname $(readlink -f $0)) +configDir=$scriptsDir/../config + +. $scriptsDir/caf-common +sourceCafenv "$configDir" + +processName="VGAuthService" + +export LD_LIBRARY_PATH=$CAF_ROOT_DIR/lib + +#enableCoreFiles + +startVgAuthProcess "$startType" "$CAF_LOG_DIR" "$CAF_BIN_DIR" "$processName" diff --git a/open-vm-tools/common-agent/etc/scripts/start-listener b/open-vm-tools/common-agent/etc/scripts/start-listener new file mode 100644 index 000000000..1148b5c10 --- /dev/null +++ b/open-vm-tools/common-agent/etc/scripts/start-listener @@ -0,0 +1,31 @@ +#!/bin/sh + +helpMessage() { + local defStartType=$1 + + echo "*** $0 {startType}" + echo " Starts the listener" + echo " startType: How to start the listener (daemon, foreground, valgrindMemChecks, valgrindProfiling) [default: $defStartType]" + exit 1 +} + +startType="daemon" +if [ $# -gt 1 -o "$1" = "--help" ]; then + helpMessage "$startType" +fi +if [ $# -ge 1 ]; then + startType=$1 +fi + +scriptsDir=$(dirname $(readlink -f $0)) +configDir=$scriptsDir/../config +. $scriptsDir/caf-common +sourceCafenv "$configDir" + +processName="CommAmqpListener" + +export LD_LIBRARY_PATH="$CAF_LIB_DIR" + +#enableCoreFiles + +startCafProcess "$startType" "$CAF_LOG_DIR" "$CAF_BIN_DIR" "$processName" diff --git a/open-vm-tools/common-agent/etc/scripts/start-ma b/open-vm-tools/common-agent/etc/scripts/start-ma new file mode 100644 index 000000000..a576aa88a --- /dev/null +++ b/open-vm-tools/common-agent/etc/scripts/start-ma @@ -0,0 +1,32 @@ +#!/bin/sh + +helpMessage() { + local defStartType=$1 + + echo "*** $0 {startType}" + echo " Starts the Management Agent" + echo " startType: How to start the listener (daemon, foreground, valgrindMemChecks, valgrindProfiling) [default: $defStartType]" + exit 1 +} + +startType="daemon" +if [ $# -gt 1 -o "$1" = "--help" ]; then + helpMessage "$startType" +fi +if [ $# -ge 1 ]; then + startType=$1 +fi + +scriptsDir=$(dirname $(readlink -f $0)) +configDir=$scriptsDir/../config + +. $scriptsDir/caf-common +sourceCafenv "$configDir" + +processName="ManagementAgentHost" + +export LD_LIBRARY_PATH="$CAF_LIB_DIR" + +#enableCoreFiles + +startCafProcess "$startType" "$CAF_LOG_DIR" "$CAF_BIN_DIR" "$processName" diff --git a/open-vm-tools/common-agent/etc/scripts/startTestProc b/open-vm-tools/common-agent/etc/scripts/startTestProc new file mode 100644 index 000000000..ab2256a89 --- /dev/null +++ b/open-vm-tools/common-agent/etc/scripts/startTestProc @@ -0,0 +1,6 @@ +#!/bin/bash + +echo $$ +while true; do + sleep 1000 +done diff --git a/open-vm-tools/common-agent/etc/scripts/stop-VGAuthService b/open-vm-tools/common-agent/etc/scripts/stop-VGAuthService new file mode 100644 index 000000000..7b9b671fb --- /dev/null +++ b/open-vm-tools/common-agent/etc/scripts/stop-VGAuthService @@ -0,0 +1,7 @@ +#!/bin/sh + +scriptsDir=$(dirname $(readlink -f $0)) +. $scriptsDir/caf-common + +processName="VGAuthService" +stopProcess "$processName" diff --git a/open-vm-tools/common-agent/etc/scripts/stop-listener b/open-vm-tools/common-agent/etc/scripts/stop-listener new file mode 100644 index 000000000..aadb2bc95 --- /dev/null +++ b/open-vm-tools/common-agent/etc/scripts/stop-listener @@ -0,0 +1,9 @@ +#!/bin/sh + +scriptsDir=$(dirname $(readlink -f $0)) +configDir=$scriptsDir/../config +. $scriptsDir/caf-common +sourceCafenv "$configDir" + +processName="CommAmqpListener" +stopProcess "$CAF_BIN_DIR" "$processName" diff --git a/open-vm-tools/common-agent/etc/scripts/stop-ma b/open-vm-tools/common-agent/etc/scripts/stop-ma new file mode 100644 index 000000000..24b50ce82 --- /dev/null +++ b/open-vm-tools/common-agent/etc/scripts/stop-ma @@ -0,0 +1,10 @@ +#!/bin/sh + +scriptsDir=$(dirname $(readlink -f $0)) +configDir=$scriptsDir/../config + +. $scriptsDir/caf-common +sourceCafenv "$configDir" + +processName="ManagementAgentHost" +stopProcess "$CAF_BIN_DIR" "$processName" diff --git a/open-vm-tools/common-agent/etc/scripts/tearDownVgAuth b/open-vm-tools/common-agent/etc/scripts/tearDownVgAuth new file mode 100644 index 000000000..92f5e63f4 --- /dev/null +++ b/open-vm-tools/common-agent/etc/scripts/tearDownVgAuth @@ -0,0 +1,39 @@ +#!/bin/bash + +helpMessage() { + echo "*** $0 {userName} {certPath} {subject}" + echo " Stops the VgAuth service and optionally removes the user and user->subject mapping" + echo " userName: The name of the user to be removed [default: $userName]" + echo " certPath: Path to the certificate [default: $certPath]" + echo " subject: Subject that maps to the userName in the SAML [default: $subject]" + exit 1 +} + +scriptsDir=$(dirname $(readlink -f $0)) +certsDir=$scriptsDir/../data/input/certs + +userName="" +certPath=$certsDir/selfSignedCert.pem +subject="samlTestSubject" + +if [ $# -gt 3 -o "$1" = "--help" ]; then + helpMessage +fi +if [ $# -ge 1 ]; then + userName=$1 +fi +if [ $# -ge 2 ]; then + certPath=$2 +fi +if [ $# -ge 3 ]; then + subject=$3 +fi + +if [ $userName != "" ]; then + $scriptsDir/vgAuth removeUser $userName $certPath $subject + + sleep 1 + /usr/sbin/userdel -r $userName +fi + +$scriptsDir/stop-VGAuthService diff --git a/open-vm-tools/common-agent/etc/scripts/vgAuth b/open-vm-tools/common-agent/etc/scripts/vgAuth new file mode 100644 index 000000000..b1b6d8248 --- /dev/null +++ b/open-vm-tools/common-agent/etc/scripts/vgAuth @@ -0,0 +1,82 @@ +#!/bin/bash + +helpMessage() { + echo "*** $0 Action {Username} {CertPath} {Subject}" + echo " Manages the VGAuth alias store" + echo " Action: help, addUser, removeUser, listAll, listUser" + echo " Username: The name of the user to add to the alias store [default: $username]" + echo " CertPath: Path to the cert [default: $cert]" + echo " Subject: Subject of the cert [default: $subject]" + exit 1 +} + +scriptsDir=$(dirname $(readlink -f $0)) +configDir=$scriptsDir/../config + +. $scriptsDir/caf-common +sourceCafenv "$configDir" + +vgAuthCliName=vmware-vgauth-cmd +if [ -f /usr/lib/vmware-vgauth/$vgAuthCliName ]; then + vgAuthCliPath=/usr/lib/vmware-vgauth/$vgAuthCliName +else + if [ -f $CAF_BIN_DIR/$vgAuthCliName ]; then + vgAuthCliPath=$CAF_BIN_DIR/$vgAuthCliName + export LD_LIBRARY_PATH=$CAF_LIB_DIR + else + echo "*** $vgAuthCliName not found" + exit 1 + fi +fi + +action=$1 +username="testuser" +cert=$CAF_INPUT_DIR/certs/selfSignedCert.pem +subject="samlTestSubject" + +if [ $# -lt 1 -o $# -gt 4 -o "$1" = "--help" ]; then + helpMessage +fi +if [ $# -ge 2 ]; then + username=$2 +fi +if [ $# -ge 3 ]; then + cert=$3 +fi +if [ $# -ge 4 ]; then + subject=$4 +fi + +case "$action" in + "addUser") + userLineCnt=$($vgAuthCli list --username=$username | wc -l) + if [ $userLineCnt = 0 ]; then + echo "*** Addding $username ***" + $vgAuthCli add --global --username=$username --file $cert --subject=$subject + else + echo "*** User already exists... Doing nothing - $username" + fi + ;; + "removeUser") + userLineCnt=$($vgAuthCli list --username=$username | wc -l) + if [ $userLineCnt = 0 ]; then + echo "*** User already gone... Doing nothing - $username" + else + echo "*** Removing $username ***" + $vgAuthCli remove --username=$username --file $cert --subject=$subject + fi + ;; + "listAll") + $vgAuthCli list + ;; + "listUser") + echo "*** Listing $username ***" + $vgAuthCli list --username=$username + ;; + "help") + helpMessage + ;; + *) + helpMessage + ;; +esac diff --git a/open-vm-tools/common-agent/input/Makefile.am b/open-vm-tools/common-agent/input/Makefile.am new file mode 100644 index 000000000..3107bc046 --- /dev/null +++ b/open-vm-tools/common-agent/input/Makefile.am @@ -0,0 +1,23 @@ +################################################################################ +### Copyright (C) 2015 VMware, Inc. All rights reserved. +### +### This program is free software; you can redistribute it and/or modify +### it under the terms of version 2 of the GNU General Public License as +### published by the Free Software Foundation. +### +### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +################################################################################ + +confdir=/var/vmware-caf/pme/data/input + +conf_SCRIPTS = \ + installProviderHeader.sh + +SUBDIRS = invokers providerReg diff --git a/open-vm-tools/common-agent/input/installProviderHeader.sh b/open-vm-tools/common-agent/input/installProviderHeader.sh new file mode 100644 index 000000000..08b085fc4 --- /dev/null +++ b/open-vm-tools/common-agent/input/installProviderHeader.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +export CAF_TMP_DIR=$CAF_OUTPUT_DIR/tmp +export CAF_INPUT_DIR=$CAF_INPUT_DIR +export CAF_OUTPUT_DIR=$CAF_OUTPUT_DIR +export CAF_PROVIDERREG_DIR=$CAF_OUTPUT_DIR/providerReg +export CAF_INVOKERS_DIR=$CAF_OUTPUT_DIR/invokers +export CAF_PROVIDERS_DIR=$CAF_OUTPUT_DIR/providers +export CAF_COMMONPACKAGES_DIR=$CAF_OUTPUT_DIR/commonPackages diff --git a/open-vm-tools/common-agent/input/invokers/Makefile.am b/open-vm-tools/common-agent/input/invokers/Makefile.am new file mode 100644 index 000000000..e3878ce7e --- /dev/null +++ b/open-vm-tools/common-agent/input/invokers/Makefile.am @@ -0,0 +1,24 @@ +################################################################################ +### Copyright (C) 2015 VMware, Inc. All rights reserved. +### +### This program is free software; you can redistribute it and/or modify +### it under the terms of version 2 of the GNU General Public License as +### published by the Free Software Foundation. +### +### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +################################################################################ + +confdir=/var/vmware-caf/pme/data/input/invokers + +conf_SCRIPTS = \ + caf_ConfigProvider_1_0_0.sh \ + caf_InstallProvider_1_0_0.sh \ + caf_RemoteCommandProvider_1_0_0.sh \ + cafTestInfra_CafTestInfraProvider_1_0_0.sh diff --git a/open-vm-tools/common-agent/input/invokers/cafTestInfra_CafTestInfraProvider_1_0_0.sh b/open-vm-tools/common-agent/input/invokers/cafTestInfra_CafTestInfraProvider_1_0_0.sh new file mode 100644 index 000000000..43b0db966 --- /dev/null +++ b/open-vm-tools/common-agent/input/invokers/cafTestInfra_CafTestInfraProvider_1_0_0.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CAF_LIB_DIR +$CAF_BIN_DIR/TestInfraProvider $* diff --git a/open-vm-tools/common-agent/input/invokers/caf_ConfigProvider_1_0_0.sh b/open-vm-tools/common-agent/input/invokers/caf_ConfigProvider_1_0_0.sh new file mode 100644 index 000000000..fb75d8fb2 --- /dev/null +++ b/open-vm-tools/common-agent/input/invokers/caf_ConfigProvider_1_0_0.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CAF_LIB_DIR +$CAF_BIN_DIR/ConfigProvider $* diff --git a/open-vm-tools/common-agent/input/invokers/caf_InstallProvider_1_0_0.sh b/open-vm-tools/common-agent/input/invokers/caf_InstallProvider_1_0_0.sh new file mode 100644 index 000000000..14ab9ba8a --- /dev/null +++ b/open-vm-tools/common-agent/input/invokers/caf_InstallProvider_1_0_0.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CAF_LIB_DIR +$CAF_BIN_DIR/InstallProvider $* diff --git a/open-vm-tools/common-agent/input/invokers/caf_RemoteCommandProvider_1_0_0.sh b/open-vm-tools/common-agent/input/invokers/caf_RemoteCommandProvider_1_0_0.sh new file mode 100644 index 000000000..050683458 --- /dev/null +++ b/open-vm-tools/common-agent/input/invokers/caf_RemoteCommandProvider_1_0_0.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CAF_LIB_DIR +$CAF_BIN_DIR/RemoteCommandProvider $* diff --git a/open-vm-tools/common-agent/input/providerReg/Makefile.am b/open-vm-tools/common-agent/input/providerReg/Makefile.am new file mode 100644 index 000000000..fbcd119fb --- /dev/null +++ b/open-vm-tools/common-agent/input/providerReg/Makefile.am @@ -0,0 +1,24 @@ +################################################################################ +### Copyright (C) 2015 VMware, Inc. All rights reserved. +### +### This program is free software; you can redistribute it and/or modify +### it under the terms of version 2 of the GNU General Public License as +### published by the Free Software Foundation. +### +### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +################################################################################ + +confdir=/var/vmware-caf/pme/data/input/providerReg + +conf_DATA = \ + caf_ConfigProvider_1_0_0.xml \ + caf_InstallProvider_1_0_0.xml \ + caf_RemoteCommandProvider_1_0_0.xml \ + cafTestInfra_CafTestInfraProvider_1_0_0.xml diff --git a/open-vm-tools/common-agent/input/providerReg/cafTestInfra_CafTestInfraProvider_1_0_0.xml b/open-vm-tools/common-agent/input/providerReg/cafTestInfra_CafTestInfraProvider_1_0_0.xml new file mode 100644 index 000000000..049a680bb --- /dev/null +++ b/open-vm-tools/common-agent/input/providerReg/cafTestInfra_CafTestInfraProvider_1_0_0.xml @@ -0,0 +1,12 @@ + + + diff --git a/open-vm-tools/common-agent/input/providerReg/caf_ConfigProvider_1_0_0.xml b/open-vm-tools/common-agent/input/providerReg/caf_ConfigProvider_1_0_0.xml new file mode 100644 index 000000000..49f96e6c3 --- /dev/null +++ b/open-vm-tools/common-agent/input/providerReg/caf_ConfigProvider_1_0_0.xml @@ -0,0 +1,12 @@ + + + diff --git a/open-vm-tools/common-agent/input/providerReg/caf_InstallProvider_1_0_0.xml b/open-vm-tools/common-agent/input/providerReg/caf_InstallProvider_1_0_0.xml new file mode 100644 index 000000000..291b9c622 --- /dev/null +++ b/open-vm-tools/common-agent/input/providerReg/caf_InstallProvider_1_0_0.xml @@ -0,0 +1,12 @@ + + + diff --git a/open-vm-tools/common-agent/input/providerReg/caf_RemoteCommandProvider_1_0_0.xml b/open-vm-tools/common-agent/input/providerReg/caf_RemoteCommandProvider_1_0_0.xml new file mode 100644 index 000000000..094bcdbe1 --- /dev/null +++ b/open-vm-tools/common-agent/input/providerReg/caf_RemoteCommandProvider_1_0_0.xml @@ -0,0 +1,12 @@ + + + diff --git a/open-vm-tools/common-agent/schemas/XMLSchema-hasFacetAndProperty.xsd b/open-vm-tools/common-agent/schemas/XMLSchema-hasFacetAndProperty.xsd new file mode 100644 index 000000000..df871d5a5 --- /dev/null +++ b/open-vm-tools/common-agent/schemas/XMLSchema-hasFacetAndProperty.xsd @@ -0,0 +1,142 @@ + + + + + + + +]> + + + + + This schema defines 2 elements for use in the +appinfo portion section of (potentially) all builtin datatypes in the schema +for XML Schema Part 2: Datatypes. + One intended use of +this appinfo is in the generation of the HTML version of the XML Schema Part 2: +Datatypes specification itself. All portions of the HTML text which describe +the facets and/or properties of each datatype is generated by an XSLT +transformation which keys off of this appinfo. + Schema +processors may have another use for this appinfo (although one certainly not +required in any way by the specification). The information may be useful in +dynamically building validation modules/classes and/or user-interfaces for +schema creation. + + + + + + + + hasFacet is used to signal that the contraining facet + given in the name attribute is applicable to a primitive + datatype (and all types derived from it). + + + Note: this element will only appear in the appinfo of + primitive types or built-in types derived by "list". + + + A schema processor (or the XSLT which generates the + HTML version of the XML Schema Part 2: Datatypes + specification) which reads a derived simpleType + definition should walk up the base type chain until + it reaches the primitive type at the top of the chain + and "push" all facets found their down to all derived + types in the chain. + + + + + + + + + + This datatype names all existing contraining facets. + + + Question: should each of the enumerations below be + given a documentation annotation, which would contain + the text to be used in the definition of the facet + in the XML Schema Part 2: Datatypes specification? + Might be nice to try to collect all of that information + together here. + + + + + + + + + + + + + + + + + + + + + + + + + + + + hasProperty is used to signal that the property +given in the name attribute has the value given in the value attribute for the +datatype in which it occurs (and all types derived from it, which do not +override the value of the property). + Note: this element +may appear in the appinfo of primitive and built-in derived types. + A schema processor (or the XSLT which generates the HTML version of +the XML Schema Part 2: Datatypes specification) which reads a simpleType +definition should gather the information from any occurances of hasProperty in +that simpleType definition, and then walk up the base type chain gathering +information from any occurances of hasProperty (unless a value was given to the +name in a dervied type) until either it reaches the primitive type at the top +of the chain or it has gathered values for all existing properties. + + + + + + + + This datatype names all existing fundamental +facets, otherwise known as properties (with the exception of +equality, a property which has no +value). + Question: should each of +the enumerations below be given a documentation annotation, which would contain +the text to be used in the definition of the properties in the XML Schema Part +2: Datatypes specification? Might be nice to try to collect all of that +information together here. + + + + + + + + + + + + + + diff --git a/open-vm-tools/common-agent/schemas/XMLSchema-instance.xsd b/open-vm-tools/common-agent/schemas/XMLSchema-instance.xsd new file mode 100644 index 000000000..f47577b8a --- /dev/null +++ b/open-vm-tools/common-agent/schemas/XMLSchema-instance.xsd @@ -0,0 +1,37 @@ + + + + + + + +]> + + + +

XML Schema instance namespace

+

See the XML Schema + Recommendation for an introduction

+ + +
+ $Date: 2001/03/16 20:25:57 $
+ $Id: XMLSchema-instance.xsd,v 1.4 2001/03/16 20:25:57 ht Exp $ +
+
+ +

This schema should never be used as such: + the XML + Schema Recommendation forbids the declaration of + attributes in this namespace

+
+
+ + + + + +
diff --git a/open-vm-tools/common-agent/schemas/XMLSchema.dtd b/open-vm-tools/common-agent/schemas/XMLSchema.dtd new file mode 100644 index 000000000..d3c70b3a2 --- /dev/null +++ b/open-vm-tools/common-agent/schemas/XMLSchema.dtd @@ -0,0 +1,402 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +%xs-datatypes; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/open-vm-tools/common-agent/schemas/XMLSchema.xsd b/open-vm-tools/common-agent/schemas/XMLSchema.xsd new file mode 100644 index 000000000..0d375eec9 --- /dev/null +++ b/open-vm-tools/common-agent/schemas/XMLSchema.xsd @@ -0,0 +1,2424 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]> + + + + Part 1 version: Id: structures.xsd,v 1.2 2004/01/15 11:34:25 ht Exp + Part 2 version: Id: datatypes.xsd,v 1.3 2004/01/23 18:11:13 ht Exp + + + + + + The schema corresponding to this document is normative, + with respect to the syntactic constraints it expresses in the + XML Schema language. The documentation (within <documentation> elements) + below, is not normative, but rather highlights important aspects of + the W3C Recommendation of which this is a part + + + + + The simpleType element and all of its members are defined + towards the end of this schema document + + + + + + Get access to the xml: attribute groups for xml:lang + as declared on 'schema' and 'documentation' below + + + + + + + + This type is extended by almost all schema types + to allow attributes from other namespaces to be + added to user schemas. + + + + + + + + + + + + + This type is extended by all types which allow annotation + other than <schema> itself + + + + + + + + + + + + + + + + This group is for the + elements which occur freely at the top level of schemas. + All of their types are based on the "annotated" type by extension. + + + + + + + + + + + + + This group is for the + elements which can self-redefine (see <redefine> below). + + + + + + + + + + + + + A utility type, not for public use + + + + + + + + + + + A utility type, not for public use + + + + + + + + + + + A utility type, not for public use + + #all or (possibly empty) subset of {extension, restriction} + + + + + + + + + + + + + + + + + A utility type, not for public use + + + + + + + + + + + + + A utility type, not for public use + + #all or (possibly empty) subset of {extension, restriction, list, union} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + for maxOccurs + + + + + + + + + + + + for all particles + + + + + + + for element, group and attributeGroup, + which both define and reference + + + + + + + + 'complexType' uses this + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This branch is short for + <complexContent> + <restriction base="xs:anyType"> + ... + </restriction> + </complexContent> + + + + + + + + + + + + + + + Will be restricted to required or forbidden + + + + + + Not allowed if simpleContent child is chosen. + May be overriden by setting on complexContent child. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This choice is added simply to + make this a valid restriction per the REC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Overrides any setting on complexType parent. + + + + + + + + + + + + + + + This choice is added simply to + make this a valid restriction per the REC + + + + + + + + + + + + + + + + + No typeDefParticle group reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A utility type, not for public use + + #all or (possibly empty) subset of {substitution, extension, + restriction} + + + + + + + + + + + + + + + + + + + + + + + + + The element element can be used either + at the top level to define an element-type binding globally, + or within a content model to either reference a globally-defined + element or type or declare an element-type binding locally. + The ref form is not allowed at the top level. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + group type for explicit groups, named top-level groups and + group references + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + group type for the three kinds of group + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This choice with min/max is here to + avoid a pblm with the Elt:All/Choice/Seq + Particle derivation constraint + + + + + + + + + + restricted max/min + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Only elements allowed inside + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + simple type for the value of the 'namespace' attr of + 'any' and 'anyAttribute' + + + + Value is + ##any - - any non-conflicting WFXML/attribute at all + + ##other - - any non-conflicting WFXML/attribute from + namespace other than targetNS + + ##local - - any unqualified non-conflicting WFXML/attribute + + one or - - any non-conflicting WFXML/attribute from + more URI the listed namespaces + references + (space separated) + + ##targetNamespace or ##local may appear in the above list, to + refer to the targetNamespace of the enclosing + schema or an absent targetNamespace respectively + + + + + + A utility type, not for public use + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A subset of XPath expressions for use +in selectors + A utility type, not for public +use + + + + The following pattern is intended to allow XPath + expressions per the following EBNF: + Selector ::= Path ( '|' Path )* + Path ::= ('.//')? Step ( '/' Step )* + Step ::= '.' | NameTest + NameTest ::= QName | '*' | NCName ':' '*' + child:: is also allowed + + + + + + + + + + + + + + + + + + + + + + + A subset of XPath expressions for use +in fields + A utility type, not for public +use + + + + The following pattern is intended to allow XPath + expressions per the same EBNF as for selector, + with the following change: + Path ::= ('.//')? ( Step '/' )* ( Step | '@' NameTest ) + + + + + + + + + + + + + + + + + + + + + + + + + + + The three kinds of identity constraints, all with + type of or derived from 'keybase'. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A utility type, not for public use + + A public identifier, per ISO 8879 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + notations for use within XML Schema schemas + + + + + + + + + Not the real urType, but as close an approximation as we can + get in the XML representation + + + + + + + + + + First the built-in primitive datatypes. These definitions are for + information only, the real built-in definitions are magic. + + + + For each built-in datatype in this schema (both primitive and + derived) can be uniquely addressed via a URI constructed + as follows: + 1) the base URI is the URI of the XML Schema namespace + 2) the fragment identifier is the name of the datatype + + For example, to address the int datatype, the URI is: + + http://www.w3.org/2001/XMLSchema#int + + Additionally, each facet definition element can be uniquely + addressed via a URI constructed as follows: + 1) the base URI is the URI of the XML Schema namespace + 2) the fragment identifier is the name of the facet + + For example, to address the maxInclusive facet, the URI is: + + http://www.w3.org/2001/XMLSchema#maxInclusive + + Additionally, each facet usage in a built-in datatype definition + can be uniquely addressed via a URI constructed as follows: + 1) the base URI is the URI of the XML Schema namespace + 2) the fragment identifier is the name of the datatype, followed + by a period (".") followed by the name of the facet + + For example, to address the usage of the maxInclusive facet in + the definition of int, the URI is: + + http://www.w3.org/2001/XMLSchema#int.maxInclusive + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NOTATION cannot be used directly in a schema; rather a type + must be derived from it by specifying at least one enumeration + facet whose value is the name of a NOTATION declared in the + schema. + + + + + + + + + + Now the derived primitive types + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + pattern specifies the content of section 2.12 of XML 1.0e2 + and RFC 3066 (Revised version of RFC 1766). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + pattern matches production 7 from the XML spec + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + pattern matches production 5 from the XML spec + + + + + + + + + + + + + + + pattern matches production 4 from the Namespaces in XML spec + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A utility type, not for public use + + + + + + + + + + + + + + + + + + + + + + #all or (possibly empty) subset of {restriction, union, list} + + + A utility type, not for public use + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Can be restricted to required or forbidden + + + + + + + + + + + + + + + + + + Required at the top level + + + + + + + + + + + + + + + + + + + Forbidden when nested + + + + + + + + + + + + + + + + + + + We should use a substitution group for facets, but + that's ruled out because it would allow users to + add their own, which we're not ready for yet. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + base attribute and simpleType child are mutually + exclusive, but one or other is required + + + + + + + + + + + + + + + + itemType attribute and simpleType child are mutually + exclusive, but one or other is required + + + + + + + + + + + + + + + + + + memberTypes attribute must be non-empty or there must be + at least one simpleType child + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/open-vm-tools/common-agent/schemas/datatypes.dtd b/open-vm-tools/common-agent/schemas/datatypes.dtd new file mode 100644 index 000000000..ed07e4e94 --- /dev/null +++ b/open-vm-tools/common-agent/schemas/datatypes.dtd @@ -0,0 +1,203 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/open-vm-tools/common-agent/schemas/saml-schema-assertion-2.0.xsd b/open-vm-tools/common-agent/schemas/saml-schema-assertion-2.0.xsd new file mode 100644 index 000000000..6aa3b27d6 --- /dev/null +++ b/open-vm-tools/common-agent/schemas/saml-schema-assertion-2.0.xsd @@ -0,0 +1,283 @@ + + + + + + + Document identifier: saml-schema-assertion-2.0 + Location: http://docs.oasis-open.org/security/saml/v2.0/ + Revision history: + V1.0 (November, 2002): + Initial Standard Schema. + V1.1 (September, 2003): + Updates within the same V1.0 namespace. + V2.0 (March, 2005): + New assertion schema for SAML V2.0 namespace. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/open-vm-tools/common-agent/schemas/xenc-schema.xsd b/open-vm-tools/common-agent/schemas/xenc-schema.xsd new file mode 100644 index 000000000..8b3571d08 --- /dev/null +++ b/open-vm-tools/common-agent/schemas/xenc-schema.xsd @@ -0,0 +1,135 @@ + + + + + + ]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/open-vm-tools/common-agent/schemas/xml.xsd b/open-vm-tools/common-agent/schemas/xml.xsd new file mode 100644 index 000000000..20555e269 --- /dev/null +++ b/open-vm-tools/common-agent/schemas/xml.xsd @@ -0,0 +1,287 @@ + + + + + + +
+

About the XML namespace

+ +
+

+ This schema document describes the XML namespace, in a form + suitable for import by other schema documents. +

+

+ See + http://www.w3.org/XML/1998/namespace.html and + + http://www.w3.org/TR/REC-xml for information + about this namespace. +

+

+ Note that local names in this namespace are intended to be + defined only by the World Wide Web Consortium or its subgroups. + The names currently defined in this namespace are listed below. + They should not be used with conflicting semantics by any Working + Group, specification, or document instance. +

+

+ See further below in this document for more information about how to refer to this schema document from your own + XSD schema documents and about the + namespace-versioning policy governing this schema document. +

+
+
+
+
+ + + + +
+ +

lang (as an attribute name)

+

+ denotes an attribute whose value + is a language code for the natural language of the content of + any element; its value is inherited. This name is reserved + by virtue of its definition in the XML specification.

+ +
+
+

Notes

+

+ Attempting to install the relevant ISO 2- and 3-letter + codes as the enumerated possible values is probably never + going to be a realistic possibility. +

+

+ See BCP 47 at + http://www.rfc-editor.org/rfc/bcp/bcp47.txt + and the IANA language subtag registry at + + http://www.iana.org/assignments/language-subtag-registry + for further information. +

+

+ The union allows for the 'un-declaration' of xml:lang with + the empty string. +

+
+
+
+ + + + + + + + + +
+ + + + +
+ +

space (as an attribute name)

+

+ denotes an attribute whose + value is a keyword indicating what whitespace processing + discipline is intended for the content of the element; its + value is inherited. This name is reserved by virtue of its + definition in the XML specification.

+ +
+
+
+ + + + + + +
+ + + +
+ +

base (as an attribute name)

+

+ denotes an attribute whose value + provides a URI to be used as the base for interpreting any + relative URIs in the scope of the element on which it + appears; its value is inherited. This name is reserved + by virtue of its definition in the XML Base specification.

+ +

+ See http://www.w3.org/TR/xmlbase/ + for information about this attribute. +

+
+
+
+
+ + + + +
+ +

id (as an attribute name)

+

+ denotes an attribute whose value + should be interpreted as if declared to be of type ID. + This name is reserved by virtue of its definition in the + xml:id specification.

+ +

+ See http://www.w3.org/TR/xml-id/ + for information about this attribute. +

+
+
+
+
+ + + + + + + + + + +
+ +

Father (in any context at all)

+ +
+

+ denotes Jon Bosak, the chair of + the original XML Working Group. This name is reserved by + the following decision of the W3C XML Plenary and + XML Coordination groups: +

+
+

+ In appreciation for his vision, leadership and + dedication the W3C XML Plenary on this 10th day of + February, 2000, reserves for Jon Bosak in perpetuity + the XML name "xml:Father". +

+
+
+
+
+
+ + + +
+

About this schema document

+ +
+

+ This schema defines attributes and an attribute group suitable + for use by schemas wishing to allow xml:base, + xml:lang, xml:space or + xml:id attributes on elements they define. +

+

+ To enable this, such a schema must import this schema for + the XML namespace, e.g. as follows: +

+
+          <schema . . .>
+           . . .
+           <import namespace="http://www.w3.org/XML/1998/namespace"
+                      schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+     
+

+ or +

+
+           <import namespace="http://www.w3.org/XML/1998/namespace"
+                      schemaLocation="http://www.w3.org/2009/01/xml.xsd"/>
+     
+

+ Subsequently, qualified reference to any of the attributes or the + group defined below will have the desired effect, e.g. +

+
+          <type . . .>
+           . . .
+           <attributeGroup ref="xml:specialAttrs"/>
+     
+

+ will define a type which will schema-validate an instance element + with any of those attributes. +

+
+
+
+
+ + + +
+

Versioning policy for this schema document

+
+

+ In keeping with the XML Schema WG's standard versioning + policy, this schema document will persist at + + http://www.w3.org/2009/01/xml.xsd. +

+

+ At the date of issue it can also be found at + + http://www.w3.org/2001/xml.xsd. +

+

+ The schema document at that URI may however change in the future, + in order to remain compatible with the latest version of XML + Schema itself, or with the XML namespace itself. In other words, + if the XML Schema or XML namespaces change, the version of this + document at + http://www.w3.org/2001/xml.xsd + + will change accordingly; the version at + + http://www.w3.org/2009/01/xml.xsd + + will not change. +

+

+ Previous dated (and unchanging) versions of this schema + document are at: +

+ +
+
+
+
+ +
+ diff --git a/open-vm-tools/common-agent/schemas/xmldsig-core-schema.xsd b/open-vm-tools/common-agent/schemas/xmldsig-core-schema.xsd new file mode 100644 index 000000000..d78b7431f --- /dev/null +++ b/open-vm-tools/common-agent/schemas/xmldsig-core-schema.xsd @@ -0,0 +1,308 @@ + + + + + + ]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/open-vm-tools/config/compile b/open-vm-tools/config/compile deleted file mode 100755 index 1b1d23216..000000000 --- a/open-vm-tools/config/compile +++ /dev/null @@ -1,142 +0,0 @@ -#! /bin/sh -# Wrapper for compilers which do not understand `-c -o'. - -scriptversion=2005-05-14.22 - -# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. -# Written by Tom Tromey . -# -# 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, or (at your option) -# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# This file is maintained in Automake, please report -# bugs to or send patches to -# . - -case $1 in - '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: compile [--help] [--version] PROGRAM [ARGS] - -Wrapper for compilers which do not understand `-c -o'. -Remove `-o dest.o' from ARGS, run PROGRAM with the remaining -arguments, and rename the output as expected. - -If you are trying to build a whole package this is not the -right script to run: please start by reading the file `INSTALL'. - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "compile $scriptversion" - exit $? - ;; -esac - -ofile= -cfile= -eat= - -for arg -do - if test -n "$eat"; then - eat= - else - case $1 in - -o) - # configure might choose to run compile as `compile cc -o foo foo.c'. - # So we strip `-o arg' only if arg is an object. - eat=1 - case $2 in - *.o | *.obj) - ofile=$2 - ;; - *) - set x "$@" -o "$2" - shift - ;; - esac - ;; - *.c) - cfile=$1 - set x "$@" "$1" - shift - ;; - *) - set x "$@" "$1" - shift - ;; - esac - fi - shift -done - -if test -z "$ofile" || test -z "$cfile"; then - # If no `-o' option was seen then we might have been invoked from a - # pattern rule where we don't need one. That is ok -- this is a - # normal compilation that the losing compiler can handle. If no - # `.c' file was seen then we are probably linking. That is also - # ok. - exec "$@" -fi - -# Name of file we expect compiler to create. -cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'` - -# Create the lock directory. -# Note: use `[/.-]' here to ensure that we don't use the same name -# that we are using for the .o file. Also, base the name on the expected -# object file name, since that is what matters with a parallel build. -lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d -while true; do - if mkdir "$lockdir" >/dev/null 2>&1; then - break - fi - sleep 1 -done -# FIXME: race condition here if user kills between mkdir and trap. -trap "rmdir '$lockdir'; exit 1" 1 2 15 - -# Run the compile. -"$@" -ret=$? - -if test -f "$cofile"; then - mv "$cofile" "$ofile" -elif test -f "${cofile}bj"; then - mv "${cofile}bj" "$ofile" -fi - -rmdir "$lockdir" -exit $ret - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/open-vm-tools/config/config.guess b/open-vm-tools/config/config.guess deleted file mode 100755 index 396482d6c..000000000 --- a/open-vm-tools/config/config.guess +++ /dev/null @@ -1,1500 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -# Inc. - -timestamp='2006-07-02' - -# This file 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 -# (at your option) 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., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner . -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[45]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep __LP64__ >/dev/null - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - i*:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - x86:Interix*:[3456]*) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - EM64T:Interix*:[3456]*) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; - arm*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - cris:Linux:*:*) - echo cris-axis-linux-gnu - exit ;; - crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu - exit ;; - frv:Linux:*:*) - echo frv-unknown-linux-gnu - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - mips:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips - #undef mipsel - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips64 - #undef mips64el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mips64el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - or32:Linux:*:*) - echo or32-unknown-linux-gnu - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit ;; - coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^LIBC/{ - s: ::g - p - }'`" - test x"${LIBC}" != x && { - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit - } - test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - -cat >&2 < in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/open-vm-tools/config/config.sub b/open-vm-tools/config/config.sub deleted file mode 100755 index fab0aa355..000000000 --- a/open-vm-tools/config/config.sub +++ /dev/null @@ -1,1616 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -# Inc. - -timestamp='2006-09-20' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file 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 -# (at your option) 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., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray) - os= - basic_machine=$1 - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64vr | mips64vrel \ - | mips64orion | mips64orionel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | mt \ - | msp430 \ - | nios | nios2 \ - | ns16k | ns32k \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ - | score \ - | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ - | v850 | v850e \ - | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k) - basic_machine=$basic_machine-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tron-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa-* \ - | ymp-* \ - | z8k-*) - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16c) - basic_machine=cr16c-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; - -zvmoe) - os=-zvmoe - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-haiku) - os=-haiku - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/open-vm-tools/config/depcomp b/open-vm-tools/config/depcomp deleted file mode 100755 index ca5ea4e1e..000000000 --- a/open-vm-tools/config/depcomp +++ /dev/null @@ -1,584 +0,0 @@ -#! /bin/sh -# depcomp - compile a program generating dependencies as side-effects - -scriptversion=2006-10-15.18 - -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software -# Foundation, Inc. - -# 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, or (at your option) -# 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., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Originally written by Alexandre Oliva . - -case $1 in - '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: depcomp [--help] [--version] PROGRAM [ARGS] - -Run PROGRAMS ARGS to compile a file, generating dependencies -as side-effects. - -Environment variables: - depmode Dependency tracking mode. - source Source file read by `PROGRAMS ARGS'. - object Object file output by `PROGRAMS ARGS'. - DEPDIR directory where to store dependencies. - depfile Dependency file to output. - tmpdepfile Temporary file to use when outputing dependencies. - libtool Whether libtool is used (yes/no). - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "depcomp $scriptversion" - exit $? - ;; -esac - -if test -z "$depmode" || test -z "$source" || test -z "$object"; then - echo "depcomp: Variables source, object and depmode must be set" 1>&2 - exit 1 -fi - -# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. -depfile=${depfile-`echo "$object" | - sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} -tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} - -rm -f "$tmpdepfile" - -# Some modes work just like other modes, but use different flags. We -# parameterize here, but still list the modes in the big case below, -# to make depend.m4 easier to write. Note that we *cannot* use a case -# here, because this file can only contain one case statement. -if test "$depmode" = hp; then - # HP compiler uses -M and no extra arg. - gccflag=-M - depmode=gcc -fi - -if test "$depmode" = dashXmstdout; then - # This is just like dashmstdout with a different argument. - dashmflag=-xM - depmode=dashmstdout -fi - -case "$depmode" in -gcc3) -## gcc 3 implements dependency tracking that does exactly what -## we want. Yay! Note: for some reason libtool 1.4 doesn't like -## it if -MD -MP comes after the -MF stuff. Hmm. -## Unfortunately, FreeBSD c89 acceptance of flags depends upon -## the command line argument order; so add the flags where they -## appear in depend2.am. Note that the slowdown incurred here -## affects only configure: in makefiles, %FASTDEP% shortcuts this. - for arg - do - case $arg in - -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; - *) set fnord "$@" "$arg" ;; - esac - shift # fnord - shift # $arg - done - "$@" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - mv "$tmpdepfile" "$depfile" - ;; - -gcc) -## There are various ways to get dependency output from gcc. Here's -## why we pick this rather obscure method: -## - Don't want to use -MD because we'd like the dependencies to end -## up in a subdir. Having to rename by hand is ugly. -## (We might end up doing this anyway to support other compilers.) -## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like -## -MM, not -M (despite what the docs say). -## - Using -M directly means running the compiler twice (even worse -## than renaming). - if test -z "$gccflag"; then - gccflag=-MD, - fi - "$@" -Wp,"$gccflag$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - echo "$object : \\" > "$depfile" - alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz -## The second -e expression handles DOS-style file names with drive letters. - sed -e 's/^[^:]*: / /' \ - -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the `deleted header file' problem. -## The problem is that when a header file which appears in a .P file -## is deleted, the dependency causes make to die (because there is -## typically no way to rebuild the header). We avoid this by adding -## dummy dependencies for each header file. Too bad gcc doesn't do -## this for us directly. - tr ' ' ' -' < "$tmpdepfile" | -## Some versions of gcc put a space before the `:'. On the theory -## that the space means something, we add a space to the output as -## well. -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -sgi) - if test "$libtool" = yes; then - "$@" "-Wp,-MDupdate,$tmpdepfile" - else - "$@" -MDupdate "$tmpdepfile" - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - - if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files - echo "$object : \\" > "$depfile" - - # Clip off the initial element (the dependent). Don't try to be - # clever and replace this with sed code, as IRIX sed won't handle - # lines with more than a fixed number of characters (4096 in - # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like `#:fec' to the end of the - # dependency line. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr ' -' ' ' >> $depfile - echo >> $depfile - - # The second pass generates a dummy entry for each header file. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> $depfile - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -aix) - # The C for AIX Compiler uses -M and outputs the dependencies - # in a .u file. In older versions, this file always lives in the - # current directory. Also, the AIX compiler puts `$object:' at the - # start of each line; $object doesn't have directory information. - # Version 6 uses the directory in both cases. - stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` - tmpdepfile="$stripped.u" - if test "$libtool" = yes; then - "$@" -Wc,-M - else - "$@" -M - fi - stat=$? - - if test -f "$tmpdepfile"; then : - else - stripped=`echo "$stripped" | sed 's,^.*/,,'` - tmpdepfile="$stripped.u" - fi - - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - - if test -f "$tmpdepfile"; then - outname="$stripped.o" - # Each line is of the form `foo.o: dependent.h'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" - sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -icc) - # Intel's C compiler understands `-MD -MF file'. However on - # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c - # ICC 7.0 will fill foo.d with something like - # foo.o: sub/foo.c - # foo.o: sub/foo.h - # which is wrong. We want: - # sub/foo.o: sub/foo.c - # sub/foo.o: sub/foo.h - # sub/foo.c: - # sub/foo.h: - # ICC 7.1 will output - # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using \ : - # foo.o: sub/foo.c ... \ - # sub/foo.h ... \ - # ... - - "$@" -MD -MF "$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - # Each line is of the form `foo.o: dependent.h', - # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process this invocation - # correctly. Breaking it into two sed invocations is a workaround. - sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | - sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp2) - # The "hp" stanza above does not work with aCC (C++) and HP's ia64 - # compilers, which have integrated preprocessors. The correct option - # to use with these is +Maked; it writes dependencies to a file named - # 'foo.d', which lands next to the object file, wherever that - # happens to be. - # Much of this is similar to the tru64 case; see comments there. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir.libs/$base.d - "$@" -Wc,+Maked - else - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir$base.d - "$@" +Maked - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" - # Add `dependent.h:' lines. - sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" "$tmpdepfile2" - ;; - -tru64) - # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. - # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in `foo.d' instead, so we check for that too. - # Subdirectories are respected. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - - if test "$libtool" = yes; then - # With Tru64 cc, shared objects can also be used to make a - # static library. This mechanism is used in libtool 1.4 series to - # handle both shared and static libraries in a single compilation. - # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. - # - # With libtool 1.5 this exception was removed, and libtool now - # generates 2 separate objects for the 2 libraries. These two - # compilations output dependencies in $dir.libs/$base.o.d and - # in $dir$base.o.d. We have to check for both files, because - # one of the two compilations can be disabled. We should prefer - # $dir$base.o.d over $dir.libs/$base.o.d because the latter is - # automatically cleaned when .libs/ is deleted, while ignoring - # the former would cause a distcleancheck panic. - tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 - tmpdepfile2=$dir$base.o.d # libtool 1.5 - tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 - tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 - "$@" -Wc,-MD - else - tmpdepfile1=$dir$base.o.d - tmpdepfile2=$dir$base.d - tmpdepfile3=$dir$base.d - tmpdepfile4=$dir$base.d - "$@" -MD - fi - - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -#nosideeffect) - # This comment above is used by automake to tell side-effect - # dependency tracking mechanisms from slower ones. - -dashmstdout) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for `:' - # in the target name. This is to cope with DOS-style filenames: - # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. - "$@" $dashmflag | - sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - tr ' ' ' -' < "$tmpdepfile" | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -dashXmstdout) - # This case only exists to satisfy depend.m4. It is never actually - # run, as this mode is specially recognized in the preamble. - exit 1 - ;; - -makedepend) - "$@" || exit $? - # Remove any Libtool call - if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do - shift - done - shift - fi - # X makedepend - shift - cleared=no - for arg in "$@"; do - case $cleared in - no) - set ""; shift - cleared=yes ;; - esac - case "$arg" in - -D*|-I*) - set fnord "$@" "$arg"; shift ;; - # Strip any option that makedepend may not understand. Remove - # the object too, otherwise makedepend will parse it as a source file. - -*|$object) - ;; - *) - set fnord "$@" "$arg"; shift ;; - esac - done - obj_suffix="`echo $object | sed 's/^.*\././'`" - touch "$tmpdepfile" - ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' ' -' | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" "$tmpdepfile".bak - ;; - -cpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - "$@" -E | - sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | - sed '$ s: \\$::' > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - cat < "$tmpdepfile" >> "$depfile" - sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvisualcpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o, - # because we must use -o when running libtool. - "$@" || exit $? - IFS=" " - for arg - do - case "$arg" in - "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; - *) - set fnord "$@" "$arg" - shift - shift - ;; - esac - done - "$@" -E | - sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" - echo " " >> "$depfile" - . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -none) - exec "$@" - ;; - -*) - echo "Unknown depmode $depmode" 1>&2 - exit 1 - ;; -esac - -exit 0 - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/open-vm-tools/config/install-sh b/open-vm-tools/config/install-sh deleted file mode 100755 index 4fbbae7b7..000000000 --- a/open-vm-tools/config/install-sh +++ /dev/null @@ -1,507 +0,0 @@ -#!/bin/sh -# install - install a program, script, or datafile - -scriptversion=2006-10-14.15 - -# This originates from X11R5 (mit/util/scripts/install.sh), which was -# later released in X11R6 (xc/config/util/install.sh) with the -# following copyright and license. -# -# Copyright (C) 1994 X Consortium -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- -# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Except as contained in this notice, the name of the X Consortium shall not -# be used in advertising or otherwise to promote the sale, use or other deal- -# ings in this Software without prior written authorization from the X Consor- -# tium. -# -# -# FSF changes to this file are in the public domain. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. - -nl=' -' -IFS=" "" $nl" - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" -if test -z "$doit"; then - doit_exec=exec -else - doit_exec=$doit -fi - -# Put in absolute file names if you don't have them in your path; -# or use environment vars. - -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" - -posix_glob= -posix_mkdir= - -# Desired mode of installed file. -mode=0755 - -chmodcmd=$chmodprog -chowncmd= -chgrpcmd= -stripcmd= -rmcmd="$rmprog -f" -mvcmd="$mvprog" -src= -dst= -dir_arg= -dstarg= -no_target_directory= - -usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE - or: $0 [OPTION]... SRCFILES... DIRECTORY - or: $0 [OPTION]... -t DIRECTORY SRCFILES... - or: $0 [OPTION]... -d DIRECTORIES... - -In the 1st form, copy SRCFILE to DSTFILE. -In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. -In the 4th, create DIRECTORIES. - -Options: --c (ignored) --d create directories instead of installing files. --g GROUP $chgrpprog installed files to GROUP. --m MODE $chmodprog installed files to MODE. --o USER $chownprog installed files to USER. --s $stripprog installed files. --t DIRECTORY install into DIRECTORY. --T report an error if DSTFILE is a directory. ---help display this help and exit. ---version display version info and exit. - -Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG -" - -while test $# -ne 0; do - case $1 in - -c) shift - continue;; - - -d) dir_arg=true - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - --help) echo "$usage"; exit $?;; - - -m) mode=$2 - shift - shift - case $mode in - *' '* | *' '* | *' -'* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -s) stripcmd=$stripprog - shift - continue;; - - -t) dstarg=$2 - shift - shift - continue;; - - -T) no_target_directory=true - shift - continue;; - - --version) echo "$0 $scriptversion"; exit $?;; - - --) shift - break;; - - -*) echo "$0: invalid option: $1" >&2 - exit 1;; - - *) break;; - esac -done - -if test $# -ne 0 && test -z "$dir_arg$dstarg"; then - # When -d is used, all remaining arguments are directories to create. - # When -t is used, the destination is already specified. - # Otherwise, the last argument is the destination. Remove it from $@. - for arg - do - if test -n "$dstarg"; then - # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dstarg" - shift # fnord - fi - shift # arg - dstarg=$arg - done -fi - -if test $# -eq 0; then - if test -z "$dir_arg"; then - echo "$0: no input file specified." >&2 - exit 1 - fi - # It's OK to call `install-sh -d' without argument. - # This can happen when creating conditional directories. - exit 0 -fi - -if test -z "$dir_arg"; then - trap '(exit $?); exit' 1 2 13 15 - - # Set umask so as not to create temps with too-generous modes. - # However, 'strip' requires both read and write access to temps. - case $mode in - # Optimize common cases. - *644) cp_umask=133;; - *755) cp_umask=22;; - - *[0-7]) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw='% 200' - fi - cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; - *) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw=,u+rw - fi - cp_umask=$mode$u_plus_rw;; - esac -fi - -for src -do - # Protect names starting with `-'. - case $src in - -*) src=./$src ;; - esac - - if test -n "$dir_arg"; then - dst=$src - dstdir=$dst - test -d "$dstdir" - dstdir_status=$? - else - - # Waiting for this to be detected by the "$cpprog $src $dsttmp" command - # might cause directories to be created, which would be especially bad - # if $src (and thus $dsttmp) contains '*'. - if test ! -f "$src" && test ! -d "$src"; then - echo "$0: $src does not exist." >&2 - exit 1 - fi - - if test -z "$dstarg"; then - echo "$0: no destination specified." >&2 - exit 1 - fi - - dst=$dstarg - # Protect names starting with `-'. - case $dst in - -*) dst=./$dst ;; - esac - - # If destination is a directory, append the input filename; won't work - # if double slashes aren't ignored. - if test -d "$dst"; then - if test -n "$no_target_directory"; then - echo "$0: $dstarg: Is a directory" >&2 - exit 1 - fi - dstdir=$dst - dst=$dstdir/`basename "$src"` - dstdir_status=0 - else - # Prefer dirname, but fall back on a substitute if dirname fails. - dstdir=` - (dirname "$dst") 2>/dev/null || - expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$dst" : 'X\(//\)[^/]' \| \ - X"$dst" : 'X\(//\)$' \| \ - X"$dst" : 'X\(/\)' \| . 2>/dev/null || - echo X"$dst" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q' - ` - - test -d "$dstdir" - dstdir_status=$? - fi - fi - - obsolete_mkdir_used=false - - if test $dstdir_status != 0; then - case $posix_mkdir in - '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - - if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writeable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/d" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null - fi - trap '' 0;; - esac;; - esac - - if - $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" - ) - then : - else - - # The umask is ridiculous, or mkdir does not conform to POSIX, - # or it failed possibly due to a race condition. Create the - # directory the slow way, step by step, checking for races as we go. - - case $dstdir in - /*) prefix=/ ;; - -*) prefix=./ ;; - *) prefix= ;; - esac - - case $posix_glob in - '') - if (set -f) 2>/dev/null; then - posix_glob=true - else - posix_glob=false - fi ;; - esac - - oIFS=$IFS - IFS=/ - $posix_glob && set -f - set fnord $dstdir - shift - $posix_glob && set +f - IFS=$oIFS - - prefixes= - - for d - do - test -z "$d" && continue - - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask=$mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ - done - - if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true - fi - fi - fi - - if test -n "$dir_arg"; then - { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && - { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || - test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 - else - - # Make a couple of temp file names in the proper directory. - dsttmp=$dstdir/_inst.$$_ - rmtmp=$dstdir/_rm.$$_ - - # Trap to clean up those temp files at exit. - trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 - - # Copy the file name to the temp name. - (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && - - # and set any options; do chmod last to preserve setuid bits. - # - # If any of these fail, we abort the whole thing. If we want to - # ignore errors from any of these, just make sure not to ignore - # errors from the above "$doit $cpprog $src $dsttmp" command. - # - { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ - && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ - && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ - && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && - - # Now rename the file to the real destination. - { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \ - || { - # The rename failed, perhaps because mv can't rename something else - # to itself, or perhaps because mv is so ancient that it does not - # support -f. - - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - if test -f "$dst"; then - $doit $rmcmd -f "$dst" 2>/dev/null \ - || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \ - && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\ - || { - echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - else - : - fi - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" - } - } || exit 1 - - trap '' 0 - fi -done - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/open-vm-tools/config/ltmain.sh b/open-vm-tools/config/ltmain.sh deleted file mode 100755 index d6f3ad72b..000000000 --- a/open-vm-tools/config/ltmain.sh +++ /dev/null @@ -1,7750 +0,0 @@ -# Generated from ltmain.m4sh. - -# ltmain.sh (GNU libtool) 2.2 -# Written by Gordon Matzigkeit , 1996 - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# GNU Libtool 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 -# (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, -# or obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -# Usage: $progname [OPTION]... [MODE-ARG]... -# -# Provide generalized library-building support services. -# -# --config show all configuration variables -# --debug enable verbose shell tracing -# -n, --dry-run display commands without modifying any files -# --features display basic configuration information and exit -# --mode=MODE use operation mode MODE -# --preserve-dup-deps don't remove duplicate dependency libraries -# --quiet, --silent don't print informational messages -# --tag=TAG use configuration variables from tag TAG -# -v, --verbose print informational messages (default) -# --version print version information -# -h, --help print short or long help message -# -# MODE must be one of the following: -# -# clean remove files from the build directory -# compile compile a source file into a libtool object -# execute automatically set library path, then run a program -# finish complete the installation of libtool libraries -# install install libraries or executables -# link create a library or an executable -# uninstall remove libraries from an installed directory -# -# MODE-ARGS vary depending on the MODE. -# Try `$progname --help --mode=MODE' for a more detailed description of MODE. -# -# When reporting a bug, please describe a test case to reproduce it and -# include the following information: -# -# host-triplet: $host -# shell: $SHELL -# compiler: $LTCC -# compiler flags: $LTCFLAGS -# linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.2 -# automake: $automake_version -# autoconf: $autoconf_version -# -# Report bugs to . - -PROGRAM=ltmain.sh -PACKAGE=libtool -VERSION=2.2 -TIMESTAMP="" -package_revision=1.2599 - -# Be Bourne compatible -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 - # 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 -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# NLS nuisances: We save the old values to restore during execute mode. -# Only set LANG and LC_ALL to C if already set. -# These must not be set unconditionally because not all systems understand -# e.g. LANG=C (notably SCO). -for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES -do - eval "if test \"\${$lt_var+set}\" = set; then - save_$lt_var=\$$lt_var - $lt_var=C - export $lt_var - fi" -done - -$lt_unset CDPATH - - - - - -: ${CP="cp -f"} -: ${ECHO="echo"} -: ${EGREP="/bin/grep -E"} -: ${FGREP="/bin/grep -F"} -: ${GREP="/bin/grep"} -: ${LN_S="ln -s"} -: ${MAKE="make"} -: ${MKDIR="mkdir"} -: ${MV="mv -f"} -: ${RM="rm -f"} -: ${SED="/bin/sed"} -: ${SHELL="${CONFIG_SHELL-/bin/sh}"} -: ${Xsed="$SED -e 1s/^X//"} - -# Global variables: -EXIT_SUCCESS=0 -EXIT_FAILURE=1 -EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. -EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. - -exit_status=$EXIT_SUCCESS - -# Make sure IFS has a sensible default -lt_nl=' -' -IFS=" $lt_nl" - -dirname="s,/[^/]*$,," -basename="s,^.*/,," - -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath="$0" - -# The name of this program: -# In the unlikely event $progname began with a '-', it would play havoc with -# func_echo (imagine progname=-n), so we prepend ./ in that case: -progname=`$ECHO "X$progpath" | $Xsed -e "$basename" -e 's,^-,./-,'` - -# Make sure we have an absolute path for reexecution: -case $progpath in - [\\/]*|[A-Za-z]:\\*) ;; - *[\\/]*) - progdir=`$ECHO "X$progpath" | $Xsed -e "$dirname"` - progdir=`cd "$progdir" && pwd` - progpath="$progdir/$progname" - ;; - *) - save_IFS="$IFS" - IFS=: - for progdir in $PATH; do - IFS="$save_IFS" - test -x "$progdir/$progname" && break - done - IFS="$save_IFS" - test -n "$progdir" || progdir=`pwd` - progpath="$progdir/$progname" - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed="${SED}"' -e 1s/^X//' -sed_quote_subst='s/\([`"$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Re-`\' parameter expansions in output of double_quote_subst that were -# `\'-ed in input to the same. If an odd number of `\' preceded a '$' -# in input to double_quote_subst, that '$' was protected from expansion. -# Since each input `\' is now two `\'s, look for any number of runs of -# four `\'s followed by two `\'s and then a '$'. `\' that '$'. -bs='\\' -bs2='\\\\' -bs4='\\\\\\\\' -dollar='\$' -sed_double_backslash="\ - s/$bs4/&\\ -/g - s/^$bs2$dollar/$bs&/ - s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g - s/\n//g" - -# Standard options: -opt_dry_run=false -opt_help=false -opt_quiet=false -opt_verbose=false - -# func_echo arg... -# Echo program name prefixed message, along with the current mode -# name if it has been set yet. -func_echo () -{ - $ECHO "$progname${mode+: }$mode: $*" -} - -# func_verbose arg... -# Echo program name prefixed message in verbose mode only. -func_verbose () -{ - $opt_verbose && func_echo ${1+"$@"} - - # A bug in bash halts the script if the last line of a function - # fails when set -e is in force, so we need another command to - # work around that: - : -} - -# func_error arg... -# Echo program name prefixed message to standard error. -func_error () -{ - $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 -} - -# func_warning arg... -# Echo program name prefixed warning message to standard error. -func_warning () -{ - $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 -} - -# func_fatal_error arg... -# Echo program name prefixed message to standard error, and exit. -func_fatal_error () -{ - func_error ${1+"$@"} - exit $EXIT_FAILURE -} - -# func_fatal_help arg... -# Echo program name prefixed message to standard error, followed by -# a help hint, and exit. -func_fatal_help () -{ - func_error ${1+"$@"} - func_fatal_error "$help" -} -help="Try \`$progname --help' for more information." ## default - - -# func_grep expression filename -# Check whether EXPRESSION matches any line of FILENAME, without output. -func_grep () -{ - $GREP "$1" "$2" >/dev/null 2>&1 -} - - -# func_mkdir_p directory-path -# Make sure the entire path to DIRECTORY-PATH is available. -func_mkdir_p () -{ - my_directory_path="$1" - my_dir_list= - - if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then - - # Protect directory names starting with `-' - case $my_directory_path in - -*) my_directory_path="./$my_directory_path" ;; - esac - - # While some portion of DIR does not yet exist... - while test ! -d "$my_directory_path"; do - # ...make a list in topmost first order. Use a colon delimited - # list incase some portion of path contains whitespace. - my_dir_list="$my_directory_path:$my_dir_list" - - # If the last portion added has no slash in it, the list is done - case $my_directory_path in */*) ;; *) break ;; esac - - # ...otherwise throw away the child directory and loop - my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"` - done - my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'` - - save_mkdir_p_IFS="$IFS"; IFS=':' - for my_dir in $my_dir_list; do - IFS="$save_mkdir_p_IFS" - # mkdir can fail with a `File exist' error if two processes - # try to create one of the directories concurrently. Don't - # stop in that case! - $MKDIR "$my_dir" 2>/dev/null || : - done - IFS="$save_mkdir_p_IFS" - - # Bail out if we (or some other process) failed to create a directory. - test -d "$my_directory_path" || \ - func_fatal_error "Failed to create \`$1'" - fi -} - - -# func_mktempdir [string] -# Make a temporary directory that won't clash with other running -# libtool processes, and avoids race conditions if possible. If -# given, STRING is the basename for that directory. -func_mktempdir () -{ - my_template="${TMPDIR-/tmp}/${1-$progname}" - - if test "$opt_dry_run" = ":"; then - # Return a directory name, but don't create it in dry-run mode - my_tmpdir="${my_template}-$$" - else - - # If mktemp works, use that first and foremost - my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` - - if test ! -d "$my_tmpdir"; then - # Failing that, at least try and use $RANDOM to avoid a race - my_tmpdir="${my_template}-${RANDOM-0}$$" - - save_mktempdir_umask=`umask` - umask 0077 - $MKDIR "$my_tmpdir" - umask $save_mktempdir_umask - fi - - # If we're not in dry-run mode, bomb out on failure - test -d "$my_tmpdir" || \ - func_fatal_error "cannot create temporary directory \`$my_tmpdir'" - fi - - $ECHO "X$my_tmpdir" | $Xsed -} - - -# func_quote_for_eval arg -# Aesthetically quote ARG to be evaled later. -# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT -# is double-quoted, suitable for a subsequent eval, whereas -# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters -# which are still active within double quotes backslashified. -func_quote_for_eval () -{ - case $1 in - *[\\\`\"\$]*) - func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;; - *) - func_quote_for_eval_unquoted_result="$1" ;; - esac - - case $func_quote_for_eval_unquoted_result in - # Double-quote args containing shell metacharacters to delay - # word splitting, command substitution and and variable - # expansion for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" - ;; - *) - func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" - esac -} - - -# func_quote_for_expand arg -# Aesthetically quote ARG to be evaled later; same as above, -# but do not quote variable references. -func_quote_for_expand () -{ - case $1 in - *[\\\`\"]*) - my_arg=`$ECHO "X$1" | $Xsed \ - -e "$double_quote_subst" -e "$sed_double_backslash"` ;; - *) - my_arg="$1" ;; - esac - - case $my_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting and command substitution for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - my_arg="\"$my_arg\"" - ;; - esac - - func_quote_for_expand_result="$my_arg" -} - - -# func_show_eval cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. -func_show_eval () -{ - my_cmd="$1" - my_fail_exp="${2-:}" - - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } - - if ${opt_dry_run-false}; then :; else - eval "$my_cmd" - my_status=$? - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" - fi - fi -} - - - - - -# func_version -# Echo version message to standard output and exit. -func_version () -{ - $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / { - s/^# // - s/^# *$// - s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ - p - }' < "$progpath" - exit $? -} - -# func_usage -# Echo short help message to standard output and exit. -func_usage () -{ - $SED -n '/^# Usage:/,/# -h/ { - s/^# // - s/^# *$// - s/\$progname/'$progname'/ - p - }' < "$progpath" - $ECHO - $ECHO "run \`$progname --help | more' for full usage" - exit $? -} - -# func_help -# Echo long help message to standard output and exit. -func_help () -{ - $SED -n '/^# Usage:/,/# Report bugs to/ { - s/^# // - s/^# *$// - s*\$progname*'$progname'* - s*\$host*'"$host"'* - s*\$SHELL*'"$SHELL"'* - s*\$LTCC*'"$LTCC"'* - s*\$LTCFLAGS*'"$LTCFLAGS"'* - s*\$LD*'"$LD"'* - s/\$with_gnu_ld/'"$with_gnu_ld"'/ - s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ - s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ - p - }' < "$progpath" - exit $? -} - -# func_missing_arg argname -# Echo program name prefixed message to standard error and set global -# exit_cmd. -func_missing_arg () -{ - func_error "missing argument for $1" - exit_cmd=exit -} - -exit_cmd=: - - - - - -# Check that we have a working $ECHO. -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell, and then maybe $ECHO will work. - exec $SHELL "$progpath" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat </dev/null 2>&1; then - taglist="$taglist $tagname" - - # Evaluate the configuration. Be careful to quote the path - # and the sed script, to avoid splitting on whitespace, but - # also don't use non-portable quotes within backquotes within - # quotes we have to do it in 2 steps: - extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` - eval "$extractedcf" - else - func_error "ignoring unknown tag $tagname" - fi - ;; - esac -} - - -func_mode_help () -{ - # We need to display help for each of the modes. - case $mode in - "") - # Generic help is extracted from the usage comments - # at the start of this file. - func_help - ;; - - clean) - $ECHO \ -"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... - -Remove files from the build directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, object or program, all the files associated -with it are deleted. Otherwise, only FILE itself is deleted using RM." - ;; - - compile) - $ECHO \ -"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - -Compile a source file into a libtool library object. - -This mode accepts the following additional options: - - -o OUTPUT-FILE set the output file name to OUTPUT-FILE - -no-suppress do not suppress compiler output for multiple passes - -prefer-pic try to building PIC objects only - -prefer-non-pic try to building non-PIC objects only - -shared do not build a \`.o' file suitable for static linking - -static only build a \`.o' file suitable for static linking - -COMPILE-COMMAND is a command to be used in creating a \`standard' object file -from the given SOURCEFILE. - -The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix \`.c' with the -library object suffix, \`.lo'." - ;; - - execute) - $ECHO \ -"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... - -Automatically set library path, then run a program. - -This mode accepts the following additional options: - - -dlopen FILE add the directory containing FILE to the library path - -This mode sets the library path environment variable according to \`-dlopen' -flags. - -If any of the ARGS are libtool executable wrappers, then they are translated -into their corresponding uninstalled binary, and any of their required library -directories are added to the library path. - -Then, COMMAND is executed, with ARGS as arguments." - ;; - - finish) - $ECHO \ -"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... - -Complete the installation of libtool libraries. - -Each LIBDIR is a directory that contains libtool libraries. - -The commands that this mode executes may require superuser privileges. Use -the \`--dry-run' option if you just want to see what would be executed." - ;; - - install) - $ECHO \ -"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... - -Install executables or libraries. - -INSTALL-COMMAND is the installation command. The first component should be -either the \`install' or \`cp' program. - -The following components of INSTALL-COMMAND are treated specially: - - -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation - -The rest of the components are interpreted as arguments to that command (only -BSD-compatible install options are recognized)." - ;; - - link) - $ECHO \ -"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... - -Link object files or libraries together to form another library, or to -create an executable program. - -LINK-COMMAND is a command using the C compiler that you would use to create -a program from several object files. - -The following components of LINK-COMMAND are treated specially: - - -all-static do not do any dynamic linking at all - -avoid-version do not add a version suffix if possible - -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime - -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols - -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) - -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE - -export-symbols-regex REGEX - try to export only the symbols matching REGEX - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -module build a library that can dlopened - -no-fast-install disable the fast-install mode - -no-install link a not-installable executable - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE Use a list of object files found in FILE to specify objects - -precious-files-regex REGEX - don't remove output files matching REGEX - -release RELEASE specify package release information - -rpath LIBDIR the created library will eventually be installed in LIBDIR - -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -shared only do dynamic linking of libtool libraries - -shrext SUFFIX override the standard shared library file extension - -static do not do any dynamic linking of uninstalled libtool libraries - -static-libtool-libs - do not do any dynamic linking of libtool libraries - -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] - -weak LIBNAME declare that the target provides the LIBNAME interface - -All other options (arguments beginning with \`-') are ignored. - -Every other argument is treated as a filename. Files ending in \`.la' are -treated as uninstalled libtool libraries, other files are standard or library -object files. - -If the OUTPUT-FILE ends in \`.la', then a libtool library is created, -only library objects (\`.lo' files) may be specified, and \`-rpath' is -required, except when creating a convenience library. - -If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created -using \`ar' and \`ranlib', or on Windows using \`lib'. - -If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file -is created, otherwise an executable program is created." - ;; - - uninstall) - $ECHO \ -"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -Remove libraries from an installation directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, all the files associated with it are deleted. -Otherwise, only FILE itself is deleted using RM." - ;; - - *) - func_fatal_help "invalid operation mode \`$mode'" - ;; - esac - - $ECHO - $ECHO "Try \`$progname --help' for more information about other modes." - - exit $? -} - -# Generated shell functions inserted here. - - -# Parse options once, thoroughly. This comes as soon as possible in -# the script to make things like `libtool --version' happen quickly. -{ - - # Shorthand for --mode=foo, only valid as the first argument - case $1 in - clean|clea|cle|cl) - shift; set dummy --mode clean ${1+"$@"}; shift - ;; - compile|compil|compi|comp|com|co|c) - shift; set dummy --mode compile ${1+"$@"}; shift - ;; - execute|execut|execu|exec|exe|ex|e) - shift; set dummy --mode execute ${1+"$@"}; shift - ;; - finish|finis|fini|fin|fi|f) - shift; set dummy --mode finish ${1+"$@"}; shift - ;; - install|instal|insta|inst|ins|in|i) - shift; set dummy --mode install ${1+"$@"}; shift - ;; - link|lin|li|l) - shift; set dummy --mode link ${1+"$@"}; shift - ;; - uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) - shift; set dummy --mode uninstall ${1+"$@"}; shift - ;; - esac - - # Parse non-mode specific arguments: - while test "$#" -gt 0; do - opt="$1" - shift - - case $opt in - --config) func_config ;; - - --debug) preserve_args="$preserve_args $opt" - func_echo "enabling shell trace mode" - opt_debug='set -x' - $opt_debug - ;; - - -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break - execute_dlfiles="$execute_dlfiles $1" - shift - ;; - - --dry-run | -n) opt_dry_run=: ;; - --features) func_features ;; - --finish) mode="finish" ;; - - --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break - case $1 in - # Valid mode arguments: - clean) ;; - compile) ;; - execute) ;; - finish) ;; - install) ;; - link) ;; - relink) ;; - uninstall) ;; - - # Catch anything else as an error - *) func_error "invalid argument for $opt" - exit_cmd=exit - break - ;; - esac - - mode="$1" - shift - ;; - - --preserve-dup-deps) - opt_duplicate_deps=: ;; - - --quiet|--silent) preserve_args="$preserve_args $opt" - opt_silent=: - ;; - - --verbose| -v) preserve_args="$preserve_args $opt" - opt_silent=false - ;; - - --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break - preserve_args="$preserve_args $opt $1" - func_enable_tag "$1" # tagname is set here - shift - ;; - - # Separate optargs to long options: - -dlopen=*|--mode=*|--tag=*) - func_opt_split "$opt" - set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} - shift - ;; - - -\?|-h) func_usage ;; - --help) opt_help=: ;; - --version) func_version ;; - - -*) func_fatal_help "unrecognized option \`$opt'" ;; - - *) nonopt="$opt" - break - ;; - esac - done - - # Now that we've collected a possible --mode arg, show help if necessary - $opt_help && func_mode_help - - case $host in - *cygwin* | *mingw* | *pw32*) - # don't eliminate duplications in $postdeps and $predeps - opt_duplicate_compiler_generated_deps=: - ;; - *) - opt_duplicate_compiler_generated_deps=$opt_duplicate_deps - ;; - esac - - # Having warned about all mis-specified options, bail out if - # anything was wrong. - $exit_cmd $EXIT_FAILURE -} - -# func_check_version_match -# Ensure that we are using m4 macros, and libtool script from the same -# release of libtool. -func_check_version_match () -{ - if test "$package_revision" != "$macro_revision"; then - if test "$VERSION" != "$macro_version"; then - if test -z "$macro_version"; then - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from an older release. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - fi - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, -$progname: but the definition of this LT_INIT comes from revision $macro_revision. -$progname: You should recreate aclocal.m4 with macros from revision $package_revision -$progname: of $PACKAGE $VERSION and run autoconf again. -_LT_EOF - fi - - exit $EXIT_MISMATCH - fi -} - - -## ----------- ## -## Main. ## -## ----------- ## - -{ - # Sanity checks first: - func_check_version_match - - if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then - func_fatal_configuration "not configured to build any kind of library" - fi - - test -z "$mode" && func_fatal_error "error: you must specify a MODE." - - - # Darwin sucks - eval std_shrext=\"$shrext_cmds\" - - - # Only execute mode is allowed to have -dlopen flags. - if test -n "$execute_dlfiles" && test "$mode" != execute; then - func_error "unrecognized option \`-dlopen'" - $ECHO "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$progname --help --mode=$mode' for more information." -} - - -# func_lalib_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_lalib_p () -{ - $SED -e 4q "$1" 2>/dev/null \ - | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 -} - -# func_lalib_unsafe_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. -# This function implements the same check as func_lalib_p without -# resorting to external programs. To this end, it redirects stdin and -# closes it afterwards, without saving the original file descriptor. -# As a safety measure, use it only where a negative result would be -# fatal anyway. Works if `file' does not exist. -func_lalib_unsafe_p () -{ - lalib_p=no - if test -r "$1" && exec 5<&1 <"$1"; then - for lalib_p_l in 1 2 3 4 - do - read lalib_p_line - case "$lalib_p_line" in - \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; - esac - done - exec 1<&5 5<&- - fi - test "$lalib_p" = yes -} - -# func_ltwrapper_script_p file -# True iff FILE is a libtool wrapper script -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_script_p () -{ - func_lalib_p "$1" -} - -# func_ltwrapper_executable_p file -# True iff FILE is a libtool wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_executable_p () -{ - func_ltwrapper_exec_suffix= - case $1 in - *.exe) ;; - *) func_ltwrapper_exec_suffix=.exe ;; - esac - $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 -} - -# func_ltwrapper_scriptname file -# Assumes file is an ltwrapper_executable -# uses $file to determine the appropriate filename for a -# temporary ltwrapper_script. -func_ltwrapper_scriptname () -{ - func_ltwrapper_scriptname_result="" - if func_ltwrapper_executable_p "$1"; then - func_dirname_and_basename "$1" "" "." - func_stripname '' '.exe' "$func_basename_result" - func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" - fi -} - -# func_ltwrapper_p file -# True iff FILE is a libtool wrapper script or wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_p () -{ - func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" -} - - -# func_execute_cmds commands fail_cmd -# Execute tilde-delimited COMMANDS. -# If FAIL_CMD is given, eval that upon failure. -# FAIL_CMD may read-access the current command in variable CMD! -func_execute_cmds () -{ - $opt_debug - save_ifs=$IFS; IFS='~' - for cmd in $1; do - IFS=$save_ifs - eval cmd=\"$cmd\" - func_show_eval "$cmd" "${2-:}" - done - IFS=$save_ifs -} - - -# func_source file -# Source FILE, adding directory component if necessary. -# Note that it is not necessary on cygwin/mingw to append a dot to -# FILE even if both FILE and FILE.exe exist: automatic-append-.exe -# behavior happens only for exec(3), not for open(2)! Also, sourcing -# `FILE.' does not work on cygwin managed mounts. -func_source () -{ - $opt_debug - case $1 in - */* | *\\*) . "$1" ;; - *) . "./$1" ;; - esac -} - - -# func_win32_libid arg -# return the library type of file 'arg' -# -# Need a lot of goo to handle *both* DLLs and import libs -# Has to be a shell function in order to 'eat' the argument -# that is supplied when $file_magic_command is called. -func_win32_libid () -{ - $opt_debug - win32_libid_type="unknown" - win32_fileres=`file -L $1 2>/dev/null` - case $win32_fileres in - *ar\ archive\ import\ library*) # definitely import - win32_libid_type="x86 archive import" - ;; - *ar\ archive*) # could be an import, or static - if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | - $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then - win32_nmres=`eval $NM -f posix -A $1 | - $SED -n -e ' - 1,100{ - / I /{ - s,.*,import, - p - q - } - }'` - case $win32_nmres in - import*) win32_libid_type="x86 archive import";; - *) win32_libid_type="x86 archive static";; - esac - fi - ;; - *DLL*) - win32_libid_type="x86 DLL" - ;; - *executable*) # but shell scripts are "executable" too... - case $win32_fileres in - *MS\ Windows\ PE\ Intel*) - win32_libid_type="x86 DLL" - ;; - esac - ;; - esac - $ECHO "$win32_libid_type" -} - - - -# func_infer_tag arg -# Infer tagged configuration to use if any are available and -# if one wasn't chosen via the "--tag" command line option. -# Only attempt this if the compiler in the base compile -# command doesn't match the default compiler. -# arg is usually of the form 'gcc ...' -func_infer_tag () -{ - $opt_debug - if test -n "$available_tags" && test -z "$tagname"; then - CC_quoted= - for arg in $CC; do - func_quote_for_eval "$arg" - CC_quoted="$CC_quoted $func_quote_for_eval_result" - done - case $@ in - # Blanks in the command may have been stripped by the calling shell, - # but not from the CC environment variable when configure was run. - " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;; - # Blanks at the start of $base_compile will cause this to fail - # if we don't check for them as well. - *) - for z in $available_tags; do - if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then - # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" - CC_quoted= - for arg in $CC; do - # Double-quote args containing other shell metacharacters. - func_quote_for_eval "$arg" - CC_quoted="$CC_quoted $func_quote_for_eval_result" - done - case "$@ " in - " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) - # The compiler in the base compile command matches - # the one in the tagged configuration. - # Assume this is the tagged configuration we want. - tagname=$z - break - ;; - esac - fi - done - # If $tagname still isn't set, then no tagged configuration - # was found and let the user know that the "--tag" command - # line option must be used. - if test -z "$tagname"; then - func_echo "unable to infer tagged configuration" - func_fatal_error "specify a tag with \`--tag'" -# else -# func_verbose "using $tagname tagged configuration" - fi - ;; - esac - fi -} - - - -# func_generate_dlsyms outputname originator pic_p -# Extract symbols from dlprefiles and create ${outputname}S.o with -# a dlpreopen symbol table. -func_generate_dlsyms () -{ - $opt_debug - my_outputname="$1" - my_originator="$2" - my_pic_p="${3-no}" - my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` - my_dlsyms= - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - if test -n "$NM" && test -n "$global_symbol_pipe"; then - my_dlsyms="${my_outputname}S.c" - else - func_error "not configured to extract global symbols from dlpreopened files" - fi - fi - - if test -n "$my_dlsyms"; then - case $my_dlsyms in - "") ;; - *.c) - # Discover the nlist of each of the dlfiles. - nlist="$output_objdir/${my_outputname}.nm" - - func_show_eval "$RM $nlist ${nlist}S ${nlist}T" - - # Parse the name list into a source file. - func_verbose "creating $output_objdir/$my_dlsyms" - - $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ -/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ -/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ - -#ifdef __cplusplus -extern \"C\" { -#endif - -/* External symbol declarations for the compiler. */\ -" - - if test "$dlself" = yes; then - func_verbose "generating symbol list for \`$output'" - - $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" - - # Add our own program objects to the symbol list. - progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - for progfile in $progfiles; do - func_verbose "extracting global C symbols from \`$progfile'" - $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" - done - - if test -n "$exclude_expsyms"; then - $opt_dry_run || { - eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - if test -n "$export_symbols_regex"; then - $opt_dry_run || { - eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - export_symbols="$output_objdir/$outputname.exp" - $opt_dry_run || { - $RM $export_symbols - eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - case $host in - *cygwin* | *mingw* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' - ;; - esac - } - else - $opt_dry_run || { - eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' - eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - case $host in - *cygwin | *mingw* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' - ;; - esac - } - fi - fi - - for dlprefile in $dlprefiles; do - func_verbose "extracting global C symbols from \`$dlprefile'" - func_basename "$dlprefile" - name="$func_basename_result" - $opt_dry_run || { - eval '$ECHO ": $name " >> "$nlist"' - eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" - } - done - - $opt_dry_run || { - # Make sure we have at least an empty file. - test -f "$nlist" || : > "$nlist" - - if test -n "$exclude_expsyms"; then - $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T - $MV "$nlist"T "$nlist" - fi - - # Try sorting and uniquifying the output. - if $GREP -v "^: " < "$nlist" | - if sort -k 3 /dev/null 2>&1; then - sort -k 3 - else - sort +2 - fi | - uniq > "$nlist"S; then - : - else - $GREP -v "^: " < "$nlist" > "$nlist"S - fi - - if test -f "$nlist"S; then - eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' - else - $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms" - fi - - $ECHO >> "$output_objdir/$my_dlsyms" "\ - -/* The mapping between symbol names and symbols. */ -typedef struct { - const char *name; - void *address; -} lt_dlsymlist; -" - case $host in - *cygwin* | *mingw* ) - $ECHO >> "$output_objdir/$my_dlsyms" "\ -/* DATA imports from DLLs on WIN32 con't be const, because - runtime relocations are performed -- see ld's documentation - on pseudo-relocs. */" - lt_dlsym_const= ;; - *osf5*) - echo >> "$output_objdir/$my_dlsyms" "\ -/* This system does not cope well with relocations in const data */" - lt_dlsym_const= ;; - *) - lt_dlsym_const=const ;; - esac - - $ECHO >> "$output_objdir/$my_dlsyms" "\ -extern $lt_dlsym_const lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[]; -$lt_dlsym_const lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[] = -{\ - { \"$my_originator\", (void *) 0 }," - - case $need_lib_prefix in - no) - eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - *) - eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - esac - $ECHO >> "$output_objdir/$my_dlsyms" "\ - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt_${my_prefix}_LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif\ -" - } # !$opt_dry_run - - pic_flag_for_symtable= - case "$compile_command " in - *" -static "*) ;; - *) - case $host in - # compiling the symbol table file with pic_flag works around - # a FreeBSD bug that causes programs to crash when -lm is - # linked before any other PIC object. But we must not use - # pic_flag when linking with -static. The problem exists in - # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) - pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; - *-*-hpux*) - pic_flag_for_symtable=" $pic_flag" ;; - *) - if test "X$my_pic_p" != Xno; then - pic_flag_for_symtable=" $pic_flag" - fi - ;; - esac - ;; - esac - symtab_cflags= - for arg in $LTCFLAGS; do - case $arg in - -pie | -fpie | -fPIE) ;; - *) symtab_cflags="$symtab_cflags $arg" ;; - esac - done - - # Now compile the dynamic symbol file. - func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' - - # Clean up the generated files. - func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' - - # Transform the symbol file into the correct name. - symfileobj="$output_objdir/${my_outputname}S.$objext" - case $host in - *cygwin* | *mingw* ) - if test -f "$output_objdir/$my_outputname.def"; then - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - else - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - fi - ;; - *) - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - ;; - esac - ;; - *) - func_fatal_error "unknown suffix for \`$my_dlsyms'" - ;; - esac - else - # We keep going just in case the user didn't refer to - # lt_preloaded_symbols. The linker will fail if global_symbol_pipe - # really was required. - - # Nullify the symbol file. - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` - fi -} - -# func_extract_an_archive dir oldlib -func_extract_an_archive () -{ - $opt_debug - f_ex_an_ar_dir="$1"; shift - f_ex_an_ar_oldlib="$1" - func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' - if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then - : - else - func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" - fi -} - - -# func_extract_archives gentop oldlib ... -func_extract_archives () -{ - $opt_debug - my_gentop="$1"; shift - my_oldlibs=${1+"$@"} - my_oldobjs="" - my_xlib="" - my_xabs="" - my_xdir="" - - for my_xlib in $my_oldlibs; do - # Extract the objects. - case $my_xlib in - [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; - *) my_xabs=`pwd`"/$my_xlib" ;; - esac - func_basename "$my_xlib" - my_xlib="$func_basename_result" - my_xlib_u=$my_xlib - while :; do - case " $extracted_archives " in - *" $my_xlib_u "*) - extracted_serial=`expr $extracted_serial + 1` - my_xlib_u=lt$extracted_serial-$my_xlib ;; - *) break ;; - esac - done - extracted_archives="$extracted_archives $my_xlib_u" - my_xdir="$my_gentop/$my_xlib_u" - - func_mkdir_p "$my_xdir" - - case $host in - *-darwin*) - func_verbose "Extracting $my_xabs" - # Do not bother doing anything if just a dry run - $opt_dry_run || { - darwin_orig_dir=`pwd` - cd $my_xdir || exit $? - darwin_archive=$my_xabs - darwin_curdir=`pwd` - darwin_base_archive=`basename "$darwin_archive"` - darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` - if test -n "$darwin_arches"; then - darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` - darwin_arch= - func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches ; do - func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" - lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" - cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" - func_extract_an_archive "`pwd`" "${darwin_base_archive}" - cd "$darwin_curdir" - $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" - done # $darwin_arches - ## Okay now we've a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` - darwin_file= - darwin_files= - for darwin_file in $darwin_filelist; do - darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` - lipo -create -output "$darwin_file" $darwin_files - done # $darwin_filelist - $RM -rf unfat-$$ - cd "$darwin_orig_dir" - else - cd $darwin_orig_dir - func_extract_an_archive "$my_xdir" "$my_xabs" - fi # $darwin_arches - } # !$opt_dry_run - ;; - *) - func_extract_an_archive "$my_xdir" "$my_xabs" - ;; - esac - my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` - done - - func_extract_archives_result="$my_oldobjs" -} - - - -# func_write_libtool_object output_name pic_name nonpic_name -# Create a libtool object file (analogous to a ".la" file), -# but don't create it if we're doing a dry run. -func_write_libtool_object () -{ - write_libobj=${1} - if test "$build_libtool_libs" = yes; then - write_lobj=\'${2}\' - else - write_lobj=none - fi - - if test "$build_old_libs" = yes; then - write_oldobj=\'${3}\' - else - write_oldobj=none - fi - - $opt_dry_run || { - cat >${write_libobj}T <?"'"'"' &()|`$[]' \ - && func_warning "libobj name \`$libobj' may not contain shell special characters." - func_dirname_and_basename "$obj" "/" "" - objname="$func_basename_result" - xdir="$func_dirname_result" - lobj=${xdir}$objdir/$objname - - test -z "$base_compile" && \ - func_fatal_help "you must specify a compilation command" - - # Delete any leftover library objects. - if test "$build_old_libs" = yes; then - removelist="$obj $lobj $libobj ${libobj}T" - else - removelist="$lobj $libobj ${libobj}T" - fi - - $opt_dry_run || $RM $removelist - trap "$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE" 1 2 15 - - # On Cygwin there's no "real" PIC flag so we must build both object types - case $host_os in - cygwin* | mingw* | pw32* | os2*) - pic_mode=default - ;; - esac - if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then - # non-PIC code in shared libraries is not supported - pic_mode=default - fi - - # Calculate the filename of the output object if compiler does - # not support -o with -c - if test "$compiler_c_o" = no; then - output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} - lockfile="$output_obj.lock" - removelist="$removelist $output_obj $lockfile" - trap "$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE" 1 2 15 - else - output_obj= - need_locks=no - lockfile= - fi - - # Lock this critical section if it is needed - # We use this script file to make the link, it avoids creating a new file - if test "$need_locks" = yes; then - until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do - func_echo "Waiting for $lockfile to be removed" - sleep 2 - done - elif test "$need_locks" = warn; then - if test -f "$lockfile"; then - $ECHO "\ -*** ERROR, $lockfile exists and contains: -`cat $lockfile 2>/dev/null` - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - $ECHO "$srcfile" > "$lockfile" - fi - - if test -n "$fix_srcfile_path"; then - eval srcfile=\"$fix_srcfile_path\" - fi - func_quote_for_eval "$srcfile" - qsrcfile=$func_quote_for_eval_result - - $opt_dry_run || $RM "$libobj" "${libobj}T" - - # Only build a PIC object if we are building libtool libraries. - if test "$build_libtool_libs" = yes; then - # Without this assignment, base_compile gets emptied. - fbsd_hideous_sh_bug=$base_compile - - if test "$pic_mode" != no; then - command="$base_compile $qsrcfile $pic_flag" - else - # Don't build PIC code - command="$base_compile $qsrcfile" - fi - - func_mkdir_p "$xdir$objdir" - - if test -z "$output_obj"; then - # Place PIC objects in $objdir - command="$command -o $lobj" - fi - - $opt_dry_run || $RM "$lobj" "$output_obj" - - func_show_eval "$command" \ - 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' - - if test "$need_locks" = warn && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed, then go on to compile the next one - if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then - func_show_eval '$MV "$output_obj" "$lobj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - - # Allow error messages only from the first compilation. - if test "$suppress_opt" = yes; then - suppress_output=' >/dev/null 2>&1' - fi - fi - - # Only build a position-dependent object if we build old libraries. - if test "$build_old_libs" = yes; then - if test "$pic_mode" != yes; then - # Don't build PIC code - command="$base_compile $qsrcfile$pie_flag" - else - command="$base_compile $qsrcfile $pic_flag" - fi - if test "$compiler_c_o" = yes; then - command="$command -o $obj" - fi - - # Suppress compiler output if we already did a PIC compilation. - command="$command$suppress_output" - $opt_dry_run || $RM "$obj" "$output_obj" - func_show_eval "$command" \ - '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' - - if test "$need_locks" = warn && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed - if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then - func_show_eval '$MV "$output_obj" "$obj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - fi - - $opt_dry_run || { - func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" - - # Unlock the critical section if it was locked - if test "$need_locks" != no; then - $RM "$lockfile" - fi - } - - exit $EXIT_SUCCESS -} - -test "$mode" = compile && func_mode_compile ${1+"$@"} - - -# func_mode_execute arg... -func_mode_execute () -{ - $opt_debug - # The first argument is the command name. - cmd="$nonopt" - test -z "$cmd" && \ - func_fatal_help "you must specify a COMMAND" - - # Handle -dlopen flags immediately. - for file in $execute_dlfiles; do - test -f "$file" \ - || func_fatal_help "\`$file' is not a file" - - dir= - case $file in - *.la) - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$lib' is not a valid libtool archive" - - # Read the libtool library. - dlname= - library_names= - func_source "$file" - - # Skip this library if it cannot be dlopened. - if test -z "$dlname"; then - # Warn if it was a shared library. - test -n "$library_names" && \ - func_warning "\`$file' was not linked with \`-export-dynamic'" - continue - fi - - func_dirname "$file" "" "." - dir="$func_dirname_result" - - if test -f "$dir/$objdir/$dlname"; then - dir="$dir/$objdir" - else - if test ! -f "$dir/$dlname"; then - func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" - fi - fi - ;; - - *.lo) - # Just add the directory containing the .lo file. - func_dirname "$file" "" "." - dir="$func_dirname_result" - ;; - - *) - func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" - continue - ;; - esac - - # Get the absolute pathname. - absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" - - # Now add the directory to shlibpath_var. - if eval "test -z \"\$$shlibpath_var\""; then - eval "$shlibpath_var=\"\$dir\"" - else - eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done - - # This variable tells wrapper scripts just to set shlibpath_var - # rather than running their programs. - libtool_execute_magic="$magic" - - # Check if any of the arguments is a wrapper script. - args= - for file - do - case $file in - -*) ;; - *) - # Do a test to see if this is really a libtool program. - if func_ltwrapper_script_p "$file"; then - func_source "$file" - elif func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - func_source "$func_ltwrapper_scriptname_result" - fi - # Transform arg to wrapped name. - file="$progdir/$program" - ;; - esac - # Quote arguments (to preserve shell metacharacters). - func_quote_for_eval "$file" - args="$args $func_quote_for_eval_result" - done - - if test "X$opt_dry_run" = Xfalse; then - if test -n "$shlibpath_var"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" - fi - - # Restore saved environment variables - for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES - do - eval "if test \"\${save_$lt_var+set}\" = set; then - $lt_var=\$save_$lt_var; export $lt_var - else - $lt_unset $lt_var - fi" - done - - # Now prepare to actually exec the command. - exec_cmd="\$cmd$args" - else - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" - $ECHO "export $shlibpath_var" - fi - $ECHO "$cmd$args" - exit $EXIT_SUCCESS - fi -} - -test "$mode" = execute && func_mode_execute ${1+"$@"} - - -# func_mode_finish arg... -func_mode_finish () -{ - $opt_debug - libdirs="$nonopt" - admincmds= - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for dir - do - libdirs="$libdirs $dir" - done - - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. - func_execute_cmds "$finish_cmds" 'admincmds="$admincmds -'"$cmd"'"' - fi - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" - $opt_dry_run || eval "$cmds" || admincmds="$admincmds - $cmds" - fi - done - fi - - # Exit here if they wanted silent mode. - $opt_silent && exit $EXIT_SUCCESS - - $ECHO "X----------------------------------------------------------------------" | $Xsed - $ECHO "Libraries have been installed in:" - for libdir in $libdirs; do - $ECHO " $libdir" - done - $ECHO - $ECHO "If you ever happen to want to link against installed libraries" - $ECHO "in a given directory, LIBDIR, you must either use libtool, and" - $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'" - $ECHO "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable" - $ECHO " during execution" - fi - if test -n "$runpath_var"; then - $ECHO " - add LIBDIR to the \`$runpath_var' environment variable" - $ECHO " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" - - $ECHO " - use the \`$flag' linker flag" - fi - if test -n "$admincmds"; then - $ECHO " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" - fi - $ECHO - - $ECHO "See any operating system documentation about shared libraries for" - case $host in - solaris2.[6789]|solaris2.1[0-9]) - $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual" - $ECHO "pages." - ;; - *) - $ECHO "more information, such as the ld(1) and ld.so(8) manual pages." - ;; - esac - $ECHO "X----------------------------------------------------------------------" | $Xsed - exit $EXIT_SUCCESS -} - -test "$mode" = finish && func_mode_finish ${1+"$@"} - - -# func_mode_install arg... -func_mode_install () -{ - $opt_debug - # There may be an optional sh(1) argument at the beginning of - # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || - # Allow the use of GNU shtool's install command. - $ECHO "X$nonopt" | $GREP shtool >/dev/null; then - # Aesthetically quote it. - func_quote_for_eval "$nonopt" - install_prog="$func_quote_for_eval_result " - arg=$1 - shift - else - install_prog= - arg=$nonopt - fi - - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - func_quote_for_eval "$arg" - install_prog="$install_prog$func_quote_for_eval_result" - - # We need to accept at least all the BSD install flags. - dest= - files= - opts= - prev= - install_type= - isdir=no - stripme= - for arg - do - if test -n "$dest"; then - files="$files $dest" - dest=$arg - continue - fi - - case $arg in - -d) isdir=yes ;; - -f) - case " $install_prog " in - *[\\\ /]cp\ *) ;; - *) prev=$arg ;; - esac - ;; - -g | -m | -o) - prev=$arg - ;; - -s) - stripme=" -s" - continue - ;; - -*) - ;; - *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - prev= - else - dest=$arg - continue - fi - ;; - esac - - # Aesthetically quote the argument. - func_quote_for_eval "$arg" - install_prog="$install_prog $func_quote_for_eval_result" - done - - test -z "$install_prog" && \ - func_fatal_help "you must specify an install program" - - test -n "$prev" && \ - func_fatal_help "the \`$prev' option requires an argument" - - if test -z "$files"; then - if test -z "$dest"; then - func_fatal_help "no file or destination specified" - else - func_fatal_help "you must specify a destination" - fi - fi - - # Strip any trailing slash from the destination. - func_stripname '' '/' "$dest" - dest=$func_stripname_result - - # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test "$isdir" = yes; then - destdir="$dest" - destname= - else - func_dirname_and_basename "$dest" "" "." - destdir="$func_dirname_result" - destname="$func_basename_result" - - # Not a directory, so check to see that there is only one file specified. - set dummy $files; shift - test "$#" -gt 1 && \ - func_fatal_help "\`$dest' is not a directory" - fi - case $destdir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - for file in $files; do - case $file in - *.lo) ;; - *) - func_fatal_help "\`$destdir' must be an absolute directory name" - ;; - esac - done - ;; - esac - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - staticlibs= - future_libdirs= - current_libdirs= - for file in $files; do - - # Do each installation. - case $file in - *.$libext) - # Do the static libraries later. - staticlibs="$staticlibs $file" - ;; - - *.la) - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$file' is not a valid libtool archive" - - library_names= - old_library= - relink_command= - func_source "$file" - - # Add the libdir to current_libdirs if it is the destination. - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; - *) current_libdirs="$current_libdirs $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) future_libdirs="$future_libdirs $libdir" ;; - esac - fi - - func_dirname "$file" "/" "" - dir="$func_dirname_result" - dir="$dir$objdir" - - if test -n "$relink_command"; then - # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"` - - # Don't allow the user to place us outside of our expected - # location b/c this prevents finding dependent libraries that - # are installed to the same prefix. - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. - test "$inst_prefix_dir" = "$destdir" && \ - func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. - relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` - else - relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"` - fi - - func_warning "relinking \`$file'" - func_show_eval "$relink_command" \ - 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' - fi - - # See the names of the shared library. - set dummy $library_names; shift - if test -n "$1"; then - realname="$1" - shift - - srcname="$realname" - test -n "$relink_command" && srcname="$realname"T - - # Install the shared library and build the symlinks. - func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \ - 'exit $?' - tstripme="$stripme" - case $host_os in - cygwin* | mingw* | pw32*) - case $realname in - *.dll.a) - tstripme="" - ;; - esac - ;; - esac - if test -n "$tstripme" && test -n "$striplib"; then - func_show_eval "$striplib $destdir/$realname" 'exit $?' - fi - - if test "$#" -gt 0; then - # Delete the old symlinks, and create new ones. - # Try `ln -sf' first, because the `ln' binary might depend on - # the symlink we replace! Solaris /bin/ln does not understand -f, - # so we also need to try rm && ln -s. - for linkname - do - test "$linkname" != "$realname" \ - && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" - done - fi - - # Do each command in the postinstall commands. - lib="$destdir/$realname" - func_execute_cmds "$postinstall_cmds" 'exit $?' - fi - - # Install the pseudo-library for information purposes. - func_basename "$file" - name="$func_basename_result" - instname="$dir/$name"i - func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' - - # Maybe install the static library, too. - test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" - ;; - - *.lo) - # Install (i.e. copy) a libtool object. - - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" - fi - - # Deduce the name of the destination old-style object file. - case $destfile in - *.lo) - func_lo2o "$destfile" - staticdest=$func_lo2o_result - ;; - *.$objext) - staticdest="$destfile" - destfile= - ;; - *) - func_fatal_help "cannot copy a libtool object to \`$destfile'" - ;; - esac - - # Install the libtool object if requested. - test -n "$destfile" && \ - func_show_eval "$install_prog $file $destfile" 'exit $?' - - # Install the old object if enabled. - if test "$build_old_libs" = yes; then - # Deduce the name of the old-style object file. - func_lo2o "$file" - staticobj=$func_lo2o_result - func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' - fi - exit $EXIT_SUCCESS - ;; - - *) - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" - fi - - # If the file is missing, and there is a .exe on the end, strip it - # because it is most likely a libtool script we actually want to - # install - stripped_ext="" - case $file in - *.exe) - if test ! -f "$file"; then - func_stripname '' '.exe' "$file" - file=$func_stripname_result - stripped_ext=".exe" - fi - ;; - esac - - # Do a test to see if this is really a libtool program. - case $host in - *cygwin*|*mingw*) - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - wrapper=$func_ltwrapper_scriptname_result - else - func_stripname '' '.exe' "$file" - wrapper=$func_stripname_result - fi - ;; - *) - wrapper=$file - ;; - esac - if func_ltwrapper_script_p "$wrapper"; then - notinst_deplibs= - relink_command= - - func_source "$wrapper" - - # Check the variables that should have been set. - test -z "$generated_by_libtool_version" && \ - func_fatal_error "invalid libtool wrapper script \`$wrapper'" - - finalize=yes - for lib in $notinst_deplibs; do - # Check to see that each library is installed. - libdir= - if test -f "$lib"; then - func_source "$lib" - fi - libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test - if test -n "$libdir" && test ! -f "$libfile"; then - func_warning "\`$lib' has not been installed in \`$libdir'" - finalize=no - fi - done - - relink_command= - func_source "$wrapper" - - outputname= - if test "$fast_install" = no && test -n "$relink_command"; then - $opt_dry_run || { - if test "$finalize" = yes; then - tmpdir=`func_mktempdir` - func_basename "$file$stripped_ext" - file="$func_basename_result" - outputname="$tmpdir/$file" - # Replace the output file specification. - relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` - - $opt_silent || { - func_quote_for_expand "$relink_command" - eval "func_echo $func_quote_for_expand_result" - } - if eval "$relink_command"; then : - else - func_error "error: relink \`$file' with the above command before installing it" - $opt_dry_run || ${RM}r "$tmpdir" - continue - fi - file="$outputname" - else - func_warning "cannot relink \`$file'" - fi - } - else - # Install the binary that we compiled earlier. - file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` - fi - fi - - # remove .exe since cygwin /usr/bin/install will append another - # one anyway - case $install_prog,$host in - */usr/bin/install*,*cygwin*) - case $file:$destfile in - *.exe:*.exe) - # this is ok - ;; - *.exe:*) - destfile=$destfile.exe - ;; - *:*.exe) - func_stripname '' '.exe' "$destfile" - destfile=$func_stripname_result - ;; - esac - ;; - esac - func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' - $opt_dry_run || if test -n "$outputname"; then - ${RM}r "$tmpdir" - fi - ;; - esac - done - - for file in $staticlibs; do - func_basename "$file" - name="$func_basename_result" - - # Set up the ranlib parameters. - oldlib="$destdir/$name" - - func_show_eval "$install_prog \$file \$oldlib" 'exit $?' - - if test -n "$stripme" && test -n "$old_striplib"; then - func_show_eval "$old_striplib $oldlib" 'exit $?' - fi - - # Do each command in the postinstall commands. - func_execute_cmds "$old_postinstall_cmds" 'exit $?' - done - - test -n "$future_libdirs" && \ - func_warning "remember to run \`$progname --finish$future_libdirs'" - - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - $opt_dry_run && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' - else - exit $EXIT_SUCCESS - fi -} - -test "$mode" = install && func_mode_install ${1+"$@"} - - -# func_emit_wrapper arg -# -# emit a libtool wrapper script on stdout -# don't directly open a file because we may want to -# incorporate the script contents within a cygwin/mingw -# wrapper executable. Must ONLY be called from within -# func_mode_link because it depends on a number of variable -# set therein. -# -# arg is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR -# variable will take. If 'yes', then the emitted script -# will assume that the directory in which it is stored is -# the '.lib' directory. This is a cygwin/mingw-specific -# behavior. -func_emit_wrapper () -{ - func_emit_wrapper_arg1=no - if test -n "$1" ; then - func_emit_wrapper_arg1=$1 - fi - - $ECHO "\ -#! $SHELL - -# $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION -# -# The $output program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='${SED} -e 1s/^X//' -sed_quote_subst='$sed_quote_subst' - -# Be Bourne compatible -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 - # 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 -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command=\"$relink_command\" - -# This environment variable determines our operation mode. -if test \"\$libtool_install_magic\" = \"$magic\"; then - # install mode needs the following variables: - generated_by_libtool_version='$macro_version' - notinst_deplibs='$notinst_deplibs' -else - # When we are sourced in execute mode, \$file and \$ECHO are already set. - if test \"\$libtool_execute_magic\" != \"$magic\"; then - ECHO=\"$qecho\" - file=\"\$0\" - # Make sure echo works. - if test \"X\$1\" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift - elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then - # Yippee, \$ECHO works! - : - else - # Restart under the correct shell, and then maybe \$ECHO will work. - exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} - fi - fi\ -" - $ECHO "\ - - # Find the directory that this script lives in. - thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` - test \"x\$thisdir\" = \"x\$file\" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` - while test -n \"\$file\"; do - destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` - - # If there was a directory component, then change thisdir. - if test \"x\$destdir\" != \"x\$file\"; then - case \"\$destdir\" in - [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; - *) thisdir=\"\$thisdir/\$destdir\" ;; - esac - fi - - file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` - done - - # Usually 'no', except on cygwin/mingw when embedded into - # the cwrapper. - WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 - if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then - # special case for '.' - if test \"\$thisdir\" = \".\"; then - thisdir=\`pwd\` - fi - # remove .libs from thisdir - case \"\$thisdir\" in - *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;; - $objdir ) thisdir=. ;; - esac - fi - - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" -" - - if test "$fast_install" = yes; then - $ECHO "\ - program=lt-'$outputname'$exeext - progdir=\"\$thisdir/$objdir\" - - if test ! -f \"\$progdir/\$program\" || - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ - test \"X\$file\" != \"X\$progdir/\$program\"; }; then - - file=\"\$\$-\$program\" - - if test ! -d \"\$progdir\"; then - $MKDIR \"\$progdir\" - else - $RM \"\$progdir/\$file\" - fi" - - $ECHO "\ - - # relink executable if necessary - if test -n \"\$relink_command\"; then - if relink_command_output=\`eval \$relink_command 2>&1\`; then : - else - $ECHO \"\$relink_command_output\" >&2 - $RM \"\$progdir/\$file\" - exit 1 - fi - fi - - $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || - { $RM \"\$progdir/\$program\"; - $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } - $RM \"\$progdir/\$file\" - fi" - else - $ECHO "\ - program='$outputname' - progdir=\"\$thisdir/$objdir\" -" - fi - - $ECHO "\ - - if test -f \"\$progdir/\$program\"; then" - - # Export our shlibpath_var if we have one. - if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $ECHO "\ - # Add our own library path to $shlibpath_var - $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" - - # Some systems cannot cope with colon-terminated $shlibpath_var - # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` - - export $shlibpath_var -" - fi - - # fixup the dll searchpath if we need to. - if test -n "$dllsearchpath"; then - $ECHO "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - - $ECHO "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. -" - case $host in - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2*) - $ECHO "\ - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" - ;; - - *) - $ECHO "\ - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" - ;; - esac - $ECHO "\ - \$ECHO \"\$0: cannot exec \$program \$*\" - exit 1 - fi - else - # The program doesn't exist. - \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 - \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 - $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 - exit 1 - fi -fi\ -" -} -# end: func_emit_wrapper - -# func_emit_cwrapperexe_src -# emit the source code for a wrapper executable on stdout -# Must ONLY be called from within func_mode_link because -# it depends on a number of variable set therein. -func_emit_cwrapperexe_src () -{ - cat < -#include -#ifdef _MSC_VER -# include -# include -#else -# include -# include -#endif -#include -#include -#include -#include -#include -#include -#include - -#if defined(PATH_MAX) -# define LT_PATHMAX PATH_MAX -#elif defined(MAXPATHLEN) -# define LT_PATHMAX MAXPATHLEN -#else -# define LT_PATHMAX 1024 -#endif - -#ifndef S_IXOTH -# define S_IXOTH 0 -#endif -#ifndef S_IXGRP -# define S_IXGRP 0 -#endif - -#ifdef _MSC_VER -# define S_IXUSR _S_IEXEC -# define stat _stat -# ifndef _INTPTR_T_DEFINED -# define intptr_t int -# endif -#endif - -#ifndef DIR_SEPARATOR -# define DIR_SEPARATOR '/' -# define PATH_SEPARATOR ':' -#endif - -#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ - defined (__OS2__) -# define HAVE_DOS_BASED_FILE_SYSTEM -# ifndef DIR_SEPARATOR_2 -# define DIR_SEPARATOR_2 '\\' -# endif -# ifndef PATH_SEPARATOR_2 -# define PATH_SEPARATOR_2 ';' -# endif -#endif - -#ifndef DIR_SEPARATOR_2 -# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) -#else /* DIR_SEPARATOR_2 */ -# define IS_DIR_SEPARATOR(ch) \ - (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) -#endif /* DIR_SEPARATOR_2 */ - -#ifndef PATH_SEPARATOR_2 -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) -#else /* PATH_SEPARATOR_2 */ -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) -#endif /* PATH_SEPARATOR_2 */ - -#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) -#define XFREE(stale) do { \ - if (stale) { free ((void *) stale); stale = 0; } \ -} while (0) - -#undef LTWRAPPER_DEBUGPRINTF -#if defined DEBUGWRAPPER -# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args -static void -ltwrapper_debugprintf (const char *fmt, ...) -{ - va_list args; - va_start (args, fmt); - (void) vfprintf (stderr, fmt, args); - va_end (args); -} -#else -# define LTWRAPPER_DEBUGPRINTF(args) -#endif - -const char *program_name = NULL; - -void *xmalloc (size_t num); -char *xstrdup (const char *string); -const char *base_name (const char *name); -char *find_executable (const char *wrapper); -char *chase_symlinks (const char *pathspec); -int make_executable (const char *path); -int check_executable (const char *path); -char *strendzap (char *str, const char *pat); -void lt_fatal (const char *message, ...); - -static const char *script_text = -EOF - - func_emit_wrapper yes | - $SED -e 's/\([\\"]\)/\\\1/g' \ - -e 's/^/ "/' -e 's/$/\\n"/' - echo ";" - - cat </dev/null || echo $SHELL` - case $lt_newargv0 in - *.exe | *.EXE) ;; - *) lt_newargv0=$lt_newargv0.exe ;; - esac - ;; - * ) lt_newargv0=$SHELL ;; - esac - fi - - cat <= 0) - && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) - return 1; - else - return 0; -} - -int -make_executable (const char *path) -{ - int rval = 0; - struct stat st; - - LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", - path ? (*path ? path : "EMPTY!") : "NULL!")); - if ((!path) || (!*path)) - return 0; - - if (stat (path, &st) >= 0) - { - rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); - } - return rval; -} - -/* Searches for the full path of the wrapper. Returns - newly allocated full path name if found, NULL otherwise - Does not chase symlinks, even on platforms that support them. -*/ -char * -find_executable (const char *wrapper) -{ - int has_slash = 0; - const char *p; - const char *p_next; - /* static buffer for getcwd */ - char tmp[LT_PATHMAX + 1]; - int tmp_len; - char *concat_name; - - LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", - wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); - - if ((wrapper == NULL) || (*wrapper == '\0')) - return NULL; - - /* Absolute path? */ -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - else - { -#endif - if (IS_DIR_SEPARATOR (wrapper[0])) - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - } -#endif - - for (p = wrapper; *p; p++) - if (*p == '/') - { - has_slash = 1; - break; - } - if (!has_slash) - { - /* no slashes; search PATH */ - const char *path = getenv ("PATH"); - if (path != NULL) - { - for (p = path; *p; p = p_next) - { - const char *q; - size_t p_len; - for (q = p; *q; q++) - if (IS_PATH_SEPARATOR (*q)) - break; - p_len = q - p; - p_next = (*q == '\0' ? q : q + 1); - if (p_len == 0) - { - /* empty path: current directory */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen (tmp); - concat_name = - XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - } - else - { - concat_name = - XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, p, p_len); - concat_name[p_len] = '/'; - strcpy (concat_name + p_len + 1, wrapper); - } - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - } - /* not found in PATH; assume curdir */ - } - /* Relative path | not found in path: prepend cwd */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen (tmp); - concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - return NULL; -} - -char * -chase_symlinks (const char *pathspec) -{ -#ifndef S_ISLNK - return xstrdup (pathspec); -#else - char buf[LT_PATHMAX]; - struct stat s; - char *tmp_pathspec = xstrdup (pathspec); - char *p; - int has_symlinks = 0; - while (strlen (tmp_pathspec) && !has_symlinks) - { - LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", - tmp_pathspec)); - if (lstat (tmp_pathspec, &s) == 0) - { - if (S_ISLNK (s.st_mode) != 0) - { - has_symlinks = 1; - break; - } - - /* search backwards for last DIR_SEPARATOR */ - p = tmp_pathspec + strlen (tmp_pathspec) - 1; - while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - p--; - if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - { - /* no more DIR_SEPARATORS left */ - break; - } - *p = '\0'; - } - else - { - char *errstr = strerror (errno); - lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); - } - } - XFREE (tmp_pathspec); - - if (!has_symlinks) - { - return xstrdup (pathspec); - } - - tmp_pathspec = realpath (pathspec, buf); - if (tmp_pathspec == 0) - { - lt_fatal ("Could not follow symlinks for %s", pathspec); - } - return xstrdup (tmp_pathspec); -#endif -} - -char * -strendzap (char *str, const char *pat) -{ - size_t len, patlen; - - assert (str != NULL); - assert (pat != NULL); - - len = strlen (str); - patlen = strlen (pat); - - if (patlen <= len) - { - str += len - patlen; - if (strcmp (str, pat) == 0) - *str = '\0'; - } - return str; -} - -static void -lt_error_core (int exit_status, const char *mode, - const char *message, va_list ap) -{ - fprintf (stderr, "%s: %s: ", program_name, mode); - vfprintf (stderr, message, ap); - fprintf (stderr, ".\n"); - - if (exit_status >= 0) - exit (exit_status); -} - -void -lt_fatal (const char *message, ...) -{ - va_list ap; - va_start (ap, message); - lt_error_core (EXIT_FAILURE, "FATAL", message, ap); - va_end (ap); -} -EOF -} -# end: func_emit_cwrapperexe_src - -# func_mode_link arg... -func_mode_link () -{ - $opt_debug - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - # It is impossible to link a dll without this setting, and - # we shouldn't force the makefile maintainer to figure out - # which system we are compiling for in order to pass an extra - # flag for every libtool invocation. - # allow_undefined=no - - # FIXME: Unfortunately, there are problems with the above when trying - # to make a dll which has undefined symbols, in which case not - # even a static library is built. For now, we need to specify - # -no-undefined on the libtool link line when we can be certain - # that all symbols are satisfied, otherwise we get a static library. - allow_undefined=yes - ;; - *) - allow_undefined=yes - ;; - esac - libtool_args=$nonopt - base_compile="$nonopt $@" - compile_command=$nonopt - finalize_command=$nonopt - - compile_rpath= - finalize_rpath= - compile_shlibpath= - finalize_shlibpath= - convenience= - old_convenience= - deplibs= - old_deplibs= - compiler_flags= - linker_flags= - dllsearchpath= - lib_search_path=`pwd` - inst_prefix_dir= - new_inherited_linker_flags= - - avoid_version=no - dlfiles= - dlprefiles= - dlself=no - export_dynamic=no - export_symbols= - export_symbols_regex= - generated= - libobjs= - ltlibs= - module=no - no_install=no - objs= - non_pic_objects= - precious_files_regex= - prefer_static_libs=no - preload=no - prev= - prevarg= - release= - rpath= - xrpath= - perm_rpath= - temp_rpath= - thread_safe=no - vinfo= - vinfo_number=no - weak_libs= - single_module="${wl}-single_module" - func_infer_tag $base_compile - - # We need to know -static, to get the right output filenames. - for arg - do - case $arg in - -shared) - test "$build_libtool_libs" != yes && \ - func_fatal_configuration "can not build a shared library" - build_old_libs=no - break - ;; - -all-static | -static | -static-libtool-libs) - case $arg in - -all-static) - if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then - func_warning "complete static linking is impossible in this configuration" - fi - if test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - # See comment for -static flag below, for more details. - func_append compile_command " $link_static_flag" - func_append finalize_command " $link_static_flag" - fi - prefer_static_libs=yes - ;; - -static) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=built - ;; - -static-libtool-libs) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - esac - build_libtool_libs=no - build_old_libs=yes - break - ;; - esac - done - - # See if our shared archives depend on static archives. - test -n "$old_archive_from_new_cmds" && build_old_libs=yes - - # Go through the arguments, transforming them on the way. - while test "$#" -gt 0; do - arg="$1" - shift - func_quote_for_eval "$arg" - qarg=$func_quote_for_eval_unquoted_result - func_append libtool_args " $func_quote_for_eval_result" - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - output) - func_append compile_command " @OUTPUT@" - func_append finalize_command " @OUTPUT@" - ;; - esac - - case $prev in - dlfiles|dlprefiles) - if test "$preload" = no; then - # Add the symbol object into the linking commands. - func_append compile_command " @SYMFILE@" - func_append finalize_command " @SYMFILE@" - preload=yes - fi - case $arg in - *.la | *.lo) ;; # We handle these cases below. - force) - if test "$dlself" = no; then - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - self) - if test "$prev" = dlprefiles; then - dlself=yes - elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then - dlself=yes - else - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - *) - if test "$prev" = dlfiles; then - dlfiles="$dlfiles $arg" - else - dlprefiles="$dlprefiles $arg" - fi - prev= - continue - ;; - esac - ;; - expsyms) - export_symbols="$arg" - test -f "$arg" \ - || func_fatal_error "symbol file \`$arg' does not exist" - prev= - continue - ;; - expsyms_regex) - export_symbols_regex="$arg" - prev= - continue - ;; - framework) - case $host in - *-*-darwin*) - case "$deplibs " in - *" $qarg.ltframework "*) ;; - *) deplibs="$deplibs $qarg.ltframework" # this is fixed later - ;; - esac - ;; - esac - prev= - continue - ;; - inst_prefix) - inst_prefix_dir="$arg" - prev= - continue - ;; - objectlist) - if test -f "$arg"; then - save_arg=$arg - moreargs= - for fil in `cat "$save_arg"` - do -# moreargs="$moreargs $fil" - arg=$fil - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "\`$arg' is not a valid libtool object" - fi - fi - done - else - func_fatal_error "link input file \`$arg' does not exist" - fi - arg=$save_arg - prev= - continue - ;; - precious_regex) - precious_files_regex="$arg" - prev= - continue - ;; - release) - release="-$arg" - prev= - continue - ;; - rpath | xrpath) - # We need an absolute path. - case $arg in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - if test "$prev" = rpath; then - case "$rpath " in - *" $arg "*) ;; - *) rpath="$rpath $arg" ;; - esac - else - case "$xrpath " in - *" $arg "*) ;; - *) xrpath="$xrpath $arg" ;; - esac - fi - prev= - continue - ;; - shrext) - shrext_cmds="$arg" - prev= - continue - ;; - weak) - weak_libs="$weak_libs $arg" - prev= - continue - ;; - xcclinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xcompiler) - compiler_flags="$compiler_flags $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xlinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $wl$qarg" - prev= - func_append compile_command " $wl$qarg" - func_append finalize_command " $wl$qarg" - continue - ;; - *) - eval "$prev=\"\$arg\"" - prev= - continue - ;; - esac - fi # test -n "$prev" - - prevarg="$arg" - - case $arg in - -all-static) - # The effects of -all-static are defined in a previous loop. - continue - ;; - - -allow-undefined) - # FIXME: remove this flag sometime in the future. - func_fatal_error "\`-allow-undefined' must not be used because it is the default" - ;; - - -avoid-version) - avoid_version=yes - continue - ;; - - -dlopen) - prev=dlfiles - continue - ;; - - -dlpreopen) - prev=dlprefiles - continue - ;; - - -export-dynamic) - export_dynamic=yes - continue - ;; - - -export-symbols | -export-symbols-regex) - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - func_fatal_error "more than one -exported-symbols argument is not allowed" - fi - if test "X$arg" = "X-export-symbols"; then - prev=expsyms - else - prev=expsyms_regex - fi - continue - ;; - - -framework) - prev=framework - continue - ;; - - -inst-prefix-dir) - prev=inst_prefix - continue - ;; - - # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* - # so, if we see these flags be careful not to treat them like -L - -L[A-Z][A-Z]*:*) - case $with_gcc/$host in - no/*-*-irix* | /*-*-irix*) - func_append compile_command " $arg" - func_append finalize_command " $arg" - ;; - esac - continue - ;; - - -L*) - func_stripname '-L' '' "$arg" - dir=$func_stripname_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - absdir=`cd "$dir" && pwd` - test -z "$absdir" && \ - func_fatal_error "cannot determine absolute directory name of \`$dir'" - dir="$absdir" - ;; - esac - case "$deplibs " in - *" -L$dir "*) ;; - *) - deplibs="$deplibs -L$dir" - lib_search_path="$lib_search_path $dir" - ;; - esac - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$dir:"*) ;; - *) dllsearchpath="$dllsearchpath:$dir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - continue - ;; - - -l*) - if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) - # These systems don't actually have a C or math library (as such) - continue - ;; - *-*-os2*) - # These systems don't actually have a C library (as such) - test "X$arg" = "X-lc" && continue - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - test "X$arg" = "X-lc" && continue - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C and math libraries are in the System framework - deplibs="$deplibs System.ltframework" - continue - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - test "X$arg" = "X-lc" && continue - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - test "X$arg" = "X-lc" && continue - ;; - esac - elif test "X$arg" = "X-lc_r"; then - case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc_r directly, use -pthread flag. - continue - ;; - esac - fi - deplibs="$deplibs $arg" - continue - ;; - - -module) - module=yes - continue - ;; - - # Tru64 UNIX uses -model [arg] to determine the layout of C++ - # classes, name mangling, and exception handling. - # Darwin uses the -arch flag to determine output architecture. - -model|-arch|-isysroot) - compiler_flags="$compiler_flags $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - prev=xcompiler - continue - ;; - - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - compiler_flags="$compiler_flags $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - case "$new_inherited_linker_flags " in - *" $arg "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; - esac - continue - ;; - - -multi_module) - single_module="${wl}-multi_module" - continue - ;; - - -no-fast-install) - fast_install=no - continue - ;; - - -no-install) - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*) - # The PATH hackery in wrapper scripts is required on Windows - # and Darwin in order for the loader to find any dlls it needs. - func_warning "\`-no-install' is ignored for $host" - func_warning "assuming \`-no-fast-install' instead" - fast_install=no - ;; - *) no_install=yes ;; - esac - continue - ;; - - -no-undefined) - allow_undefined=no - continue - ;; - - -objectlist) - prev=objectlist - continue - ;; - - -o) prev=output ;; - - -precious-files-regex) - prev=precious_regex - continue - ;; - - -release) - prev=release - continue - ;; - - -rpath) - prev=rpath - continue - ;; - - -R) - prev=xrpath - continue - ;; - - -R*) - func_stripname '-R' '' "$arg" - dir=$func_stripname_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - continue - ;; - - -shared) - # The effects of -shared are defined in a previous loop. - continue - ;; - - -shrext) - prev=shrext - continue - ;; - - -static | -static-libtool-libs) - # The effects of -static are defined in a previous loop. - # We used to do the same as -all-static on platforms that - # didn't have a PIC flag, but the assumption that the effects - # would be equivalent was wrong. It would break on at least - # Digital Unix and AIX. - continue - ;; - - -thread-safe) - thread_safe=yes - continue - ;; - - -version-info) - prev=vinfo - continue - ;; - - -version-number) - prev=vinfo - vinfo_number=yes - continue - ;; - - -weak) - prev=weak - continue - ;; - - -Wc,*) - func_stripname '-Wc,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" - arg="$arg $wl$func_quote_for_eval_result" - compiler_flags="$compiler_flags $func_quote_for_eval_result" - done - IFS="$save_ifs" - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Wl,*) - func_stripname '-Wl,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" - arg="$arg $wl$func_quote_for_eval_result" - compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" - linker_flags="$linker_flags $func_quote_for_eval_result" - done - IFS="$save_ifs" - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Xcompiler) - prev=xcompiler - continue - ;; - - -Xlinker) - prev=xlinker - continue - ;; - - -XCClinker) - prev=xcclinker - continue - ;; - - # -msg_* for osf cc - -msg_*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - - # -64, -mips[0-9] enable 64-bit mode on the SGI compiler - # -r[0-9][0-9]* specifies the processor on the SGI compiler - # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler - # +DA*, +DD* enable 64-bit mode on the HP compiler - # -q* pass through compiler args for the IBM compiler - # -m*, -t[45]*, -txscale* pass through architecture-specific - # compiler args for GCC - # -F/path gives path to uninstalled frameworks, gcc on darwin - # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC - # @file GCC response files - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - func_append compile_command " $arg" - func_append finalize_command " $arg" - compiler_flags="$compiler_flags $arg" - continue - ;; - - # Some other compiler flag. - -* | +*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - - *.$objext) - # A standard object. - objs="$objs $arg" - ;; - - *.lo) - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "\`$arg' is not a valid libtool object" - fi - fi - ;; - - *.$libext) - # An archive. - deplibs="$deplibs $arg" - old_deplibs="$old_deplibs $arg" - continue - ;; - - *.la) - # A libtool-controlled library. - - if test "$prev" = dlfiles; then - # This library was specified with -dlopen. - dlfiles="$dlfiles $arg" - prev= - elif test "$prev" = dlprefiles; then - # The library was specified with -dlpreopen. - dlprefiles="$dlprefiles $arg" - prev= - else - deplibs="$deplibs $arg" - fi - continue - ;; - - # Some other compiler argument. - *) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - esac # arg - - # Now actually substitute the argument into the commands. - if test -n "$arg"; then - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - done # argument parsing loop - - test -n "$prev" && \ - func_fatal_help "the \`$prevarg' option requires an argument" - - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then - eval arg=\"$export_dynamic_flag_spec\" - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - - oldlibs= - # calculate the name of the file, without its directory - func_basename "$output" - outputname="$func_basename_result" - libobjs_save="$libobjs" - - if test -n "$shlibpath_var"; then - # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` - else - shlib_search_path= - fi - eval sys_lib_search_path=\"$sys_lib_search_path_spec\" - eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - - func_dirname "$output" "/" "" - output_objdir="$func_dirname_result$objdir" - # Create the object directory. - func_mkdir_p "$output_objdir" - - # Determine the type of output - case $output in - "") - func_fatal_help "you must specify an output file" - ;; - *.$libext) linkmode=oldlib ;; - *.lo | *.$objext) linkmode=obj ;; - *.la) linkmode=lib ;; - *) linkmode=prog ;; # Anything else should be a program. - esac - - specialdeplibs= - - libs= - # Find all interdependent deplibs by searching for libraries - # that are linked more than once (e.g. -la -lb -la) - for deplib in $deplibs; do - if $opt_duplicate_deps ; then - case "$libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - libs="$libs $deplib" - done - - if test "$linkmode" = lib; then - libs="$predeps $libs $compiler_lib_search_path $postdeps" - - # Compute libraries that are listed more than once in $predeps - # $postdeps and mark them as special (i.e., whose duplicates are - # not to be eliminated). - pre_post_deps= - if $opt_duplicate_compiler_generated_deps; then - for pre_post_dep in $predeps $postdeps; do - case "$pre_post_deps " in - *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; - esac - pre_post_deps="$pre_post_deps $pre_post_dep" - done - fi - pre_post_deps= - fi - - deplibs= - newdependency_libs= - newlib_search_path= - need_relink=no # whether we're linking any uninstalled libtool libraries - notinst_deplibs= # not-installed libtool libraries - notinst_path= # paths that contain not-installed libtool libraries - - case $linkmode in - lib) - passes="conv dlpreopen link" - for file in $dlfiles $dlprefiles; do - case $file in - *.la) ;; - *) - func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" - ;; - esac - done - ;; - prog) - compile_deplibs= - finalize_deplibs= - alldeplibs=no - newdlfiles= - newdlprefiles= - passes="conv scan dlopen dlpreopen link" - ;; - *) passes="conv" - ;; - esac - - for pass in $passes; do - # The preopen pass in lib mode reverses $deplibs; put it back here - # so that -L comes before libs that need it for instance... - if test "$linkmode,$pass" = "lib,link"; then - ## FIXME: Find the place where the list is rebuilt in the wrong - ## order, and fix it there properly - tmp_deplibs= - for deplib in $deplibs; do - tmp_deplibs="$deplib $tmp_deplibs" - done - deplibs="$tmp_deplibs" - fi - - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan"; then - libs="$deplibs" - deplibs= - fi - if test "$linkmode" = prog; then - case $pass in - dlopen) libs="$dlfiles" ;; - dlpreopen) libs="$dlprefiles" ;; - link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; - esac - fi - if test "$linkmode,$pass" = "lib,dlpreopen"; then - # Collect and forward deplibs of preopened libtool libs - for lib in $dlprefiles; do - # Ignore non-libtool-libs - dependency_libs= - case $lib in - *.la) func_source "$lib" ;; - esac - - # Collect preopened libtool deplibs, except any this library - # has declared as weak libs - for deplib in $dependency_libs; do - deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"` - case " $weak_libs " in - *" $deplib_base "*) ;; - *) deplibs="$deplibs $deplib" ;; - esac - done - done - libs="$dlprefiles" - fi - if test "$pass" = dlopen; then - # Collect dlpreopened libraries - save_deplibs="$deplibs" - deplibs= - fi - - for deplib in $libs; do - lib= - found=no - case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - compiler_flags="$compiler_flags $deplib" - if test "$linkmode" = lib ; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; - esac - fi - fi - continue - ;; - -l*) - if test "$linkmode" != lib && test "$linkmode" != prog; then - func_warning "\`-l' is ignored for archives/objects" - continue - fi - func_stripname '-l' '' "$deplib" - name=$func_stripname_result - if test "$linkmode" = lib; then - searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" - else - searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" - fi - for searchdir in $searchdirs; do - for search_ext in .la $std_shrext .so .a; do - # Search the libtool library - lib="$searchdir/lib${name}${search_ext}" - if test -f "$lib"; then - if test "$search_ext" = ".la"; then - found=yes - else - found=no - fi - break 2 - fi - done - done - if test "$found" != yes; then - # deplib doesn't seem to be a libtool library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - else # deplib is a libtool library - # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, - # We need to do some special things here, and not later. - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $deplib "*) - if func_lalib_p "$lib"; then - library_names= - old_library= - func_source "$lib" - for l in $old_library $library_names; do - ll="$l" - done - if test "X$ll" = "X$old_library" ; then # only static version available - found=no - func_dirname "$lib" "" "." - ladir="$func_dirname_result" - lib=$ladir/$old_library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - fi - fi - ;; - *) ;; - esac - fi - fi - ;; # -l - *.ltframework) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - if test "$linkmode" = lib ; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; - esac - fi - fi - continue - ;; - -L*) - case $linkmode in - lib) - deplibs="$deplib $deplibs" - test "$pass" = conv && continue - newdependency_libs="$deplib $newdependency_libs" - func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" - ;; - prog) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - if test "$pass" = scan; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" - ;; - *) - func_warning "\`-L' is ignored for archives/objects" - ;; - esac # linkmode - continue - ;; # -L - -R*) - if test "$pass" = link; then - func_stripname '-R' '' "$deplib" - dir=$func_stripname_result - # Make sure the xrpath contains only unique directories. - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - fi - deplibs="$deplib $deplibs" - continue - ;; - *.la) lib="$deplib" ;; - *.$libext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - case $linkmode in - lib) - # Linking convenience modules into shared libraries is allowed, - # but linking other static libraries is non-portable. - case " $dlpreconveniencelibs " in - *" $deplib "*) ;; - *) - valid_a_lib=no - case $deplibs_check_method in - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=yes - fi - ;; - pass_all) - valid_a_lib=yes - ;; - esac - if test "$valid_a_lib" != yes; then - $ECHO - $ECHO "*** Warning: Trying to link with static lib archive $deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because the file extensions .$libext of this argument makes me believe" - $ECHO "*** that it is just a static archive that I should not use here." - else - $ECHO - $ECHO "*** Warning: Linking the shared library $output against the" - $ECHO "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" - fi - ;; - esac - continue - ;; - prog) - if test "$pass" != link; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - continue - ;; - esac # linkmode - ;; # *.$libext - *.lo | *.$objext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - elif test "$linkmode" = prog; then - if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then - # If there is no dlopen support or we're linking statically, - # we need to preload. - newdlprefiles="$newdlprefiles $deplib" - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - newdlfiles="$newdlfiles $deplib" - fi - fi - continue - ;; - %DEPLIBS%) - alldeplibs=yes - continue - ;; - esac # case $deplib - - if test "$found" = yes || test -f "$lib"; then : - else - func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" - fi - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$lib" \ - || func_fatal_error "\`$lib' is not a valid libtool archive" - - func_dirname "$lib" "" "." - ladir="$func_dirname_result" - - dlname= - dlopen= - dlpreopen= - libdir= - library_names= - old_library= - inherited_linker_flags= - # If the library was installed with an old release of libtool, - # it will not redefine variables installed, or shouldnotlink - installed=yes - shouldnotlink=no - avoidtemprpath= - - - # Read the .la file - func_source "$lib" - - # Convert "-framework foo" to "foo.ltframework" - if test -n "$inherited_linker_flags"; then - tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` - for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do - case " $new_inherited_linker_flags " in - *" $tmp_inherited_linker_flag "*) ;; - *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; - esac - done - fi - dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan" || - { test "$linkmode" != prog && test "$linkmode" != lib; }; then - test -n "$dlopen" && dlfiles="$dlfiles $dlopen" - test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" - fi - - if test "$pass" = conv; then - # Only check for convenience libraries - deplibs="$lib $deplibs" - if test -z "$libdir"; then - if test -z "$old_library"; then - func_fatal_error "cannot find name of link library for \`$lib'" - fi - # It is a libtool convenience library, so add in its objects. - convenience="$convenience $ladir/$objdir/$old_library" - old_convenience="$old_convenience $ladir/$objdir/$old_library" - elif test "$linkmode" != prog && test "$linkmode" != lib; then - func_fatal_error "\`$lib' is not a convenience library" - fi - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if $opt_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - continue - fi # $pass = conv - - - # Get the name of the library we link against. - linklib= - for l in $old_library $library_names; do - linklib="$l" - done - if test -z "$linklib"; then - func_fatal_error "cannot find name of link library for \`$lib'" - fi - - # This library was specified with -dlopen. - if test "$pass" = dlopen; then - if test -z "$libdir"; then - func_fatal_error "cannot -dlopen a convenience library: \`$lib'" - fi - if test -z "$dlname" || - test "$dlopen_support" != yes || - test "$build_libtool_libs" = no; then - # If there is no dlname, no dlopen support or we're linking - # statically, we need to preload. We also need to preload any - # dependent libraries so libltdl's deplib preloader doesn't - # bomb out in the load deplibs phase. - dlprefiles="$dlprefiles $lib $dependency_libs" - else - newdlfiles="$newdlfiles $lib" - fi - continue - fi # $pass = dlopen - - # We need an absolute path. - case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; - *) - abs_ladir=`cd "$ladir" && pwd` - if test -z "$abs_ladir"; then - func_warning "cannot determine absolute directory name of \`$ladir'" - func_warning "passing it literally to the linker, although it might fail" - abs_ladir="$ladir" - fi - ;; - esac - func_basename "$lib" - laname="$func_basename_result" - - # Find the relevant object directory and library name. - if test "X$installed" = Xyes; then - if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - func_warning "library \`$lib' was moved." - dir="$ladir" - absdir="$abs_ladir" - libdir="$abs_ladir" - else - dir="$libdir" - absdir="$libdir" - fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes - else - if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then - dir="$ladir" - absdir="$abs_ladir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - else - dir="$ladir/$objdir" - absdir="$abs_ladir/$objdir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - fi - fi # $installed = yes - func_stripname 'lib' '.la' "$laname" - name=$func_stripname_result - - # This library was specified with -dlpreopen. - if test "$pass" = dlpreopen; then - if test -z "$libdir" && test "$linkmode" = prog; then - func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" - fi - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - newdlprefiles="$newdlprefiles $dir/$old_library" - # Keep a list of preopened convenience libraries to check - # that they are being used correctly in the link pass. - test -z "$libdir" && \ - dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" - # Otherwise, use the dlname, so that lt_dlopen finds it. - elif test -n "$dlname"; then - newdlprefiles="$newdlprefiles $dir/$dlname" - else - newdlprefiles="$newdlprefiles $dir/$linklib" - fi - fi # $pass = dlpreopen - - if test -z "$libdir"; then - # Link the convenience library - if test "$linkmode" = lib; then - deplibs="$dir/$old_library $deplibs" - elif test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$dir/$old_library $compile_deplibs" - finalize_deplibs="$dir/$old_library $finalize_deplibs" - else - deplibs="$lib $deplibs" # used for prog,scan pass - fi - continue - fi - - - if test "$linkmode" = prog && test "$pass" != link; then - newlib_search_path="$newlib_search_path $ladir" - deplibs="$lib $deplibs" - - linkalldeplibs=no - if test "$link_all_deplibs" != no || test -z "$library_names" || - test "$build_libtool_libs" = no; then - linkalldeplibs=yes - fi - - tmp_libs= - for deplib in $dependency_libs; do - case $deplib in - -L*) func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" - ;; - esac - # Need to link against all dependency_libs? - if test "$linkalldeplibs" = yes; then - deplibs="$deplib $deplibs" - else - # Need to hardcode shared library paths - # or/and link against static libraries - newdependency_libs="$deplib $newdependency_libs" - fi - if $opt_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done # for deplib - continue - fi # $linkmode = prog... - - if test "$linkmode,$pass" = "prog,link"; then - if test -n "$library_names" && - { { test "$prefer_static_libs" = no || - test "$prefer_static_libs,$installed" = "built,yes"; } || - test -z "$old_library"; }; then - # We need to hardcode the library path - if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then - # Make sure the rpath contains only unique directories. - case "$temp_rpath:" in - *"$absdir:"*) ;; - *) temp_rpath="$temp_rpath$absdir:" ;; - esac - fi - - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - fi # $linkmode,$pass = prog,link... - - if test "$alldeplibs" = yes && - { test "$deplibs_check_method" = pass_all || - { test "$build_libtool_libs" = yes && - test -n "$library_names"; }; }; then - # We only need to search for static libraries - continue - fi - fi - - link_static=no # Whether the deplib will be linked statically - use_static_libs=$prefer_static_libs - if test "$use_static_libs" = built && test "$installed" = yes; then - use_static_libs=no - fi - if test -n "$library_names" && - { test "$use_static_libs" = no || test -z "$old_library"; }; then - case $host in - *cygwin* | *mingw*) - # No point in relinking DLLs because paths are not encoded - notinst_deplibs="$notinst_deplibs $lib" - need_relink=no - ;; - *) - if test "$installed" = no; then - notinst_deplibs="$notinst_deplibs $lib" - need_relink=yes - fi - ;; - esac - # This is a shared library - - # Warn about portability, can't link against -module's on some - # systems (darwin). Don't bleat about dlopened modules though! - dlopenmodule="" - for dlpremoduletest in $dlprefiles; do - if test "X$dlpremoduletest" = "X$lib"; then - dlopenmodule="$dlpremoduletest" - break - fi - done - if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then - $ECHO - if test "$linkmode" = prog; then - $ECHO "*** Warning: Linking the executable $output against the loadable module" - else - $ECHO "*** Warning: Linking the shared library $output against the loadable module" - fi - $ECHO "*** $linklib is not portable!" - fi - if test "$linkmode" = lib && - test "$hardcode_into_libs" = yes; then - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - fi - - if test -n "$old_archive_from_expsyms_cmds"; then - # figure out the soname - set dummy $library_names - shift - realname="$1" - shift - libname=`eval "\\$ECHO \"$libname_spec\""` - # use dlname if we got it. it's perfectly good, no? - if test -n "$dlname"; then - soname="$dlname" - elif test -n "$soname_spec"; then - # bleh windows - case $host in - *cygwin* | mingw*) - major=`expr $current - $age` - versuffix="-$major" - ;; - esac - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - - # Make a new name for the extract_expsyms_cmds to use - soroot="$soname" - func_basename "$soroot" - soname="$func_basename_result" - func_stripname 'lib' '.dll' "$soname" - newlib=libimp-$func_stripname_result.a - - # If the library has no export list, then create one now - if test -f "$output_objdir/$soname-def"; then : - else - func_verbose "extracting exported symbol list from \`$soname'" - func_execute_cmds "$extract_expsyms_cmds" 'exit $?' - fi - - # Create $newlib - if test -f "$output_objdir/$newlib"; then :; else - func_verbose "generating import library for \`$soname'" - func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' - fi - # make sure the library variables are pointing to the new library - dir=$output_objdir - linklib=$newlib - fi # test -n "$old_archive_from_expsyms_cmds" - - if test "$linkmode" = prog || test "$mode" != relink; then - add_shlibpath= - add_dir= - add= - lib_linked=yes - case $hardcode_action in - immediate | unsupported) - if test "$hardcode_direct" = no; then - add="$dir/$linklib" - case $host in - *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; - *-*-sysv4*uw2*) add_dir="-L$dir" ;; - *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ - *-*-unixware7*) add_dir="-L$dir" ;; - *-*-darwin* ) - # if the lib is a (non-dlopened) module then we can not - # link against it, someone is ignoring the earlier warnings - if /usr/bin/file -L $add 2> /dev/null | - $GREP ": [^:]* bundle" >/dev/null ; then - if test "X$dlopenmodule" != "X$lib"; then - $ECHO "*** Warning: lib $linklib is a module, not a shared library" - if test -z "$old_library" ; then - $ECHO - $ECHO "*** And there doesn't seem to be a static archive available" - $ECHO "*** The link will probably fail, sorry" - else - add="$dir/$old_library" - fi - elif test -n "$old_library"; then - add="$dir/$old_library" - fi - fi - esac - elif test "$hardcode_minus_L" = no; then - case $host in - *-*-sunos*) add_shlibpath="$dir" ;; - esac - add_dir="-L$dir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = no; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - relink) - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$dir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$dir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - *) lib_linked=no ;; - esac - - if test "$lib_linked" != yes; then - func_fatal_configuration "unsupported hardcode properties" - fi - - if test -n "$add_shlibpath"; then - case :$compile_shlibpath: in - *":$add_shlibpath:"*) ;; - *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; - esac - fi - if test "$linkmode" = prog; then - test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" - test -n "$add" && compile_deplibs="$add $compile_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - if test "$hardcode_direct" != yes && - test "$hardcode_minus_L" != yes && - test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - fi - fi - fi - - if test "$linkmode" = prog || test "$mode" = relink; then - add_shlibpath= - add_dir= - add= - # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$libdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$libdir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - add="-l$name" - elif test "$hardcode_automatic" = yes; then - if test -n "$inst_prefix_dir" && - test -f "$inst_prefix_dir$libdir/$linklib" ; then - add="$inst_prefix_dir$libdir/$linklib" - else - add="$libdir/$linklib" - fi - else - # We cannot seem to hardcode it, guess we'll fake it. - add_dir="-L$libdir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - fi - - if test "$linkmode" = prog; then - test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" - test -n "$add" && finalize_deplibs="$add $finalize_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - fi - fi - elif test "$linkmode" = prog; then - # Here we assume that one of hardcode_direct or hardcode_minus_L - # is not unsupported. This is valid on all known static and - # shared platforms. - if test "$hardcode_direct" != unsupported; then - test -n "$old_library" && linklib="$old_library" - compile_deplibs="$dir/$linklib $compile_deplibs" - finalize_deplibs="$dir/$linklib $finalize_deplibs" - else - compile_deplibs="-l$name -L$dir $compile_deplibs" - finalize_deplibs="-l$name -L$dir $finalize_deplibs" - fi - elif test "$build_libtool_libs" = yes; then - # Not a shared library - if test "$deplibs_check_method" != pass_all; then - # We're trying link a shared library against a static one - # but the system doesn't support it. - - # Just print a warning and add the library to dependency_libs so - # that the program can be linked against the static library. - $ECHO - $ECHO "*** Warning: This system can not link to static lib archive $lib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have." - if test "$module" = yes; then - $ECHO "*** But as you try to build a module library, libtool will still create " - $ECHO "*** a static module, that should work as long as the dlopening application" - $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime." - if test -z "$global_symbol_pipe"; then - $ECHO - $ECHO "*** However, this would only work if libtool was able to extract symbol" - $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" - $ECHO "*** not find such a program. So, this module is probably useless." - $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - else - deplibs="$dir/$old_library $deplibs" - link_static=yes - fi - fi # link shared/static library? - - if test "$linkmode" = lib; then - if test -n "$dependency_libs" && - { test "$hardcode_into_libs" != yes || - test "$build_old_libs" = yes || - test "$link_static" = yes; }; then - # Extract -R from dependency_libs - temp_deplibs= - for libdir in $dependency_libs; do - case $libdir in - -R*) func_stripname '-R' '' "$libdir" - temp_xrpath=$func_stripname_result - case " $xrpath " in - *" $temp_xrpath "*) ;; - *) xrpath="$xrpath $temp_xrpath";; - esac;; - *) temp_deplibs="$temp_deplibs $libdir";; - esac - done - dependency_libs="$temp_deplibs" - fi - - newlib_search_path="$newlib_search_path $absdir" - # Link against this library - test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" - # ... and its dependency_libs - tmp_libs= - for deplib in $dependency_libs; do - newdependency_libs="$deplib $newdependency_libs" - if $opt_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - - if test "$link_all_deplibs" != no; then - # Add the search paths of all dependency libraries - for deplib in $dependency_libs; do - case $deplib in - -L*) path="$deplib" ;; - *.la) - func_dirname "$deplib" "" "." - dir="$func_dirname_result" - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - func_warning "cannot determine absolute directory name of \`$dir'" - absdir="$dir" - fi - ;; - esac - if $GREP "^installed=no" $deplib > /dev/null; then - case $host in - *-*-darwin*) - depdepl= - eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names" ; then - for tmp in $deplibrary_names ; do - depdepl=$tmp - done - if test -f "$absdir/$objdir/$depdepl" ; then - depdepl="$absdir/$objdir/$depdepl" - darwin_install_name=`otool -L $depdepl | $SED -n -e '3q;2,2p' | $SED -e 's/(.*//'` - darwin_install_name=`$ECHO $darwin_install_name` - if test -z "$darwin_install_name"; then - darwin_install_name=`otool64 -L $depdepl | $SED -n -e '3q;2,2p' | $SED -e 's/(.*//'` - darwin_install_name=`$ECHO $darwin_install_name` - fi - compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" - linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" - path= - fi - fi - ;; - *) - path="-L$absdir/$objdir" - ;; - esac - else - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" - test "$absdir" != "$libdir" && \ - func_warning "\`$deplib' seems to be moved" - - path="-L$absdir" - fi - ;; - esac - case " $deplibs " in - *" $path "*) ;; - *) deplibs="$path $deplibs" ;; - esac - done - fi # link_all_deplibs != no - fi # linkmode = lib - done # for deplib in $libs - if test "$pass" = link; then - if test "$linkmode" = "prog"; then - compile_deplibs="$new_inherited_linker_flags $compile_deplibs" - finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" - else - compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - fi - fi - dependency_libs="$newdependency_libs" - if test "$pass" = dlpreopen; then - # Link the dlpreopened libraries before other libraries - for deplib in $save_deplibs; do - deplibs="$deplib $deplibs" - done - fi - if test "$pass" != dlopen; then - if test "$pass" != conv; then - # Make sure lib_search_path contains only unique directories. - lib_search_path= - for dir in $newlib_search_path; do - case "$lib_search_path " in - *" $dir "*) ;; - *) lib_search_path="$lib_search_path $dir" ;; - esac - done - newlib_search_path= - fi - - if test "$linkmode,$pass" != "prog,link"; then - vars="deplibs" - else - vars="compile_deplibs finalize_deplibs" - fi - for var in $vars dependency_libs; do - # Add libraries to $var in reverse order - eval tmp_libs=\"\$$var\" - new_libs= - for deplib in $tmp_libs; do - # FIXME: Pedantically, this is the right thing to do, so - # that some nasty dependency loop isn't accidentally - # broken: - #new_libs="$deplib $new_libs" - # Pragmatically, this seems to cause very few problems in - # practice: - case $deplib in - -L*) new_libs="$deplib $new_libs" ;; - -R*) ;; - *) - # And here is the reason: when a library appears more - # than once as an explicit dependence of a library, or - # is implicitly linked in more than once by the - # compiler, it is considered special, and multiple - # occurrences thereof are not removed. Compare this - # with having the same library being listed as a - # dependency of multiple other libraries: in this case, - # we know (pedantically, we assume) the library does not - # need to be listed more than once, so we keep only the - # last copy. This is not always right, but it is rare - # enough that we require users that really mean to play - # such unportable linking tricks to link the library - # using -Wl,-lname, so that libtool does not consider it - # for duplicate removal. - case " $specialdeplibs " in - *" $deplib "*) new_libs="$deplib $new_libs" ;; - *) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$deplib $new_libs" ;; - esac - ;; - esac - ;; - esac - done - tmp_libs= - for deplib in $new_libs; do - case $deplib in - -L*) - case " $tmp_libs " in - *" $deplib "*) ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - done - eval $var=\"$tmp_libs\" - done # for var - fi - # Last step: remove runtime libs from dependency_libs - # (they stay in deplibs) - tmp_libs= - for i in $dependency_libs ; do - case " $predeps $postdeps $compiler_lib_search_path " in - *" $i "*) - i="" - ;; - esac - if test -n "$i" ; then - tmp_libs="$tmp_libs $i" - fi - done - dependency_libs=$tmp_libs - done # for pass - if test "$linkmode" = prog; then - dlfiles="$newdlfiles" - fi - if test "$linkmode" = prog || test "$linkmode" = lib; then - dlprefiles="$newdlprefiles" - fi - - case $linkmode in - oldlib) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for archives" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for archives" ;; - esac - - test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for archives" - - test -n "$xrpath" && \ - func_warning "\`-R' is ignored for archives" - - test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for archives" - - test -n "$release" && \ - func_warning "\`-release' is ignored for archives" - - test -n "$export_symbols$export_symbols_regex" && \ - func_warning "\`-export-symbols' is ignored for archives" - - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs="$output" - objs="$objs$old_deplibs" - ;; - - lib) - # Make sure we only generate libraries of the form `libNAME.la'. - case $outputname in - lib*) - func_stripname 'lib' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - ;; - *) - test "$module" = no && \ - func_fatal_help "libtool library \`$output' must begin with \`lib'" - - if test "$need_lib_prefix" != no; then - # Add the "lib" prefix for modules if required - func_stripname '' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - else - func_stripname '' '.la' "$outputname" - libname=$func_stripname_result - fi - ;; - esac - - if test -n "$objs"; then - if test "$deplibs_check_method" != pass_all; then - func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" - else - $ECHO - $ECHO "*** Warning: Linking the shared library $output against the non-libtool" - $ECHO "*** objects $objs is not portable!" - libobjs="$libobjs $objs" - fi - fi - - test "$dlself" != no && \ - func_warning "\`-dlopen self' is ignored for libtool libraries" - - set dummy $rpath - shift - test "$#" -gt 1 && \ - func_warning "ignoring multiple \`-rpath's for a libtool library" - - install_libdir="$1" - - oldlibs= - if test -z "$rpath"; then - if test "$build_libtool_libs" = yes; then - # Building a libtool convenience library. - # Some compilers have problems with a `.al' extension so - # convenience libraries should have the same extension an - # archive normally would. - oldlibs="$output_objdir/$libname.$libext $oldlibs" - build_libtool_libs=convenience - build_old_libs=yes - fi - - test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for convenience libraries" - - test -n "$release" && \ - func_warning "\`-release' is ignored for convenience libraries" - else - - # Parse the version information argument. - save_ifs="$IFS"; IFS=':' - set dummy $vinfo 0 0 0 - shift - IFS="$save_ifs" - - test -n "$7" && \ - func_fatal_help "too many parameters to \`-version-info'" - - # convert absolute version numbers to libtool ages - # this retains compatibility with .la files and attempts - # to make the code below a bit more comprehensible - - case $vinfo_number in - yes) - number_major="$1" - number_minor="$2" - number_revision="$3" - # - # There are really only two kinds -- those that - # use the current revision as the major version - # and those that subtract age and use age as - # a minor version. But, then there is irix - # which has an extra 1 added just for fun - # - case $version_type in - darwin|linux|osf|windows|none) - current=`expr $number_major + $number_minor` - age="$number_minor" - revision="$number_revision" - ;; - freebsd-aout|freebsd-elf|sunos) - current="$number_major" - revision="$number_minor" - age="0" - ;; - irix|nonstopux) - current=`expr $number_major + $number_minor` - age="$number_minor" - revision="$number_minor" - lt_irix_increment=no - ;; - esac - ;; - no) - current="$1" - revision="$2" - age="$3" - ;; - esac - - # Check that each of the things are valid numbers. - case $current in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "CURRENT \`$current' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - case $revision in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "REVISION \`$revision' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - case $age in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "AGE \`$age' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - if test "$age" -gt "$current"; then - func_error "AGE \`$age' is greater than the current interface number \`$current'" - func_fatal_error "\`$vinfo' is not valid version information" - fi - - # Calculate the version variables. - major= - versuffix= - verstring= - case $version_type in - none) ;; - - darwin) - # Like Linux, but with the current version available in - # verstring for coding it into the library header - major=.`expr $current - $age` - versuffix="$major.$age.$revision" - # Darwin ld doesn't like 0 for these options... - minor_current=`expr $current + 1` - xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" - ;; - - freebsd-aout) - major=".$current" - versuffix=".$current.$revision"; - ;; - - freebsd-elf) - major=".$current" - versuffix=".$current" - ;; - - irix | nonstopux) - if test "X$lt_irix_increment" = "Xno"; then - major=`expr $current - $age` - else - major=`expr $current - $age + 1` - fi - - case $version_type in - nonstopux) verstring_prefix=nonstopux ;; - *) verstring_prefix=sgi ;; - esac - verstring="$verstring_prefix$major.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$revision - while test "$loop" -ne 0; do - iface=`expr $revision - $loop` - loop=`expr $loop - 1` - verstring="$verstring_prefix$major.$iface:$verstring" - done - - # Before this point, $major must not contain `.'. - major=.$major - versuffix="$major.$revision" - ;; - - linux) - major=.`expr $current - $age` - versuffix="$major.$age.$revision" - ;; - - osf) - major=.`expr $current - $age` - versuffix=".$current.$age.$revision" - verstring="$current.$age.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$age - while test "$loop" -ne 0; do - iface=`expr $current - $loop` - loop=`expr $loop - 1` - verstring="$verstring:${iface}.0" - done - - # Make executables depend on our current version. - verstring="$verstring:${current}.0" - ;; - - qnx) - major=".$current" - versuffix=".$current" - ;; - - sunos) - major=".$current" - versuffix=".$current.$revision" - ;; - - windows) - # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 filesystems. - major=`expr $current - $age` - versuffix="-$major" - ;; - - *) - func_fatal_configuration "unknown library version type \`$version_type'" - ;; - esac - - # Clear the version info if we defaulted, and they specified a release. - if test -z "$vinfo" && test -n "$release"; then - major= - case $version_type in - darwin) - # we can't check for "0.0" in archive_cmds due to quoting - # problems, so we reset it completely - verstring= - ;; - *) - verstring="0.0" - ;; - esac - if test "$need_version" = no; then - versuffix= - else - versuffix=".0.0" - fi - fi - - # Remove version info from name if versioning should be avoided - if test "$avoid_version" = yes && test "$need_version" = no; then - major= - versuffix= - verstring="" - fi - - # Check to see if the archive will have undefined symbols. - if test "$allow_undefined" = yes; then - if test "$allow_undefined_flag" = unsupported; then - func_warning "undefined symbols not allowed in $host shared libraries" - build_libtool_libs=no - build_old_libs=yes - fi - else - # Don't allow undefined symbols. - allow_undefined_flag="$no_undefined_flag" - fi - - fi - - func_generate_dlsyms "$libname" "$libname" "yes" - libobjs="$libobjs $symfileobj" - test "X$libobjs" = "X " && libobjs= - - if test "$mode" != relink; then - # Remove our outputs, but don't remove object files since they - # may have been created when compiling PIC objects. - removelist= - tempremovelist=`$ECHO "$output_objdir/*"` - for p in $tempremovelist; do - case $p in - *.$objext) - ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) - if test "X$precious_files_regex" != "X"; then - if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 - then - continue - fi - fi - removelist="$removelist $p" - ;; - *) ;; - esac - done - test -n "$removelist" && \ - func_show_eval "${RM}r \$removelist" - fi - - # Now set the variables for building old libraries. - if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then - oldlibs="$oldlibs $output_objdir/$libname.$libext" - - # Transform .lo files to .o files. - oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` - fi - - # Eliminate all temporary directories. - #for path in $notinst_path; do - # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"` - # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"` - # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"` - #done - - if test -n "$xrpath"; then - # If the user specified any rpath flags, then add them. - temp_xrpath= - for libdir in $xrpath; do - temp_xrpath="$temp_xrpath -R$libdir" - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then - dependency_libs="$temp_xrpath $dependency_libs" - fi - fi - - # Make sure dlfiles contains only unique files that won't be dlpreopened - old_dlfiles="$dlfiles" - dlfiles= - for lib in $old_dlfiles; do - case " $dlprefiles $dlfiles " in - *" $lib "*) ;; - *) dlfiles="$dlfiles $lib" ;; - esac - done - - # Make sure dlprefiles contains only unique files - old_dlprefiles="$dlprefiles" - dlprefiles= - for lib in $old_dlprefiles; do - case "$dlprefiles " in - *" $lib "*) ;; - *) dlprefiles="$dlprefiles $lib" ;; - esac - done - - if test "$build_libtool_libs" = yes; then - if test -n "$rpath"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) - # these systems don't actually have a c library (as such)! - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C library is in the System framework - deplibs="$deplibs System.ltframework" - ;; - *-*-netbsd*) - # Don't link with libc until the a.out ld.so is fixed. - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - ;; - *) - # Add libc to deplibs on all other systems if necessary. - if test "$build_libtool_need_lc" = "yes"; then - deplibs="$deplibs -lc" - fi - ;; - esac - fi - - # Transform deplibs into only deplibs that can be linked in shared. - name_save=$name - libname_save=$libname - release_save=$release - versuffix_save=$versuffix - major_save=$major - # I'm not sure if I'm treating the release correctly. I think - # release should show up in the -l (ie -lgmp5) so we don't want to - # add it in twice. Is that correct? - release="" - versuffix="" - major="" - newdeplibs= - droppeddeps=no - case $deplibs_check_method in - pass_all) - # Don't check for shared/static. Everything works. - # This might be a little naive. We might want to check - # whether the library exists or not. But this is on - # osf3 & osf4 and I'm not really sure... Just - # implementing what was already the behavior. - newdeplibs=$deplibs - ;; - test_compile) - # This code stresses the "libraries are programs" paradigm to its - # limits. Maybe even breaks it. We compile a program, linking it - # against the deplibs as a proxy for the library. Then we can check - # whether they linked in statically or dynamically with ldd. - $opt_dry_run || $RM conftest.c - cat > conftest.c </dev/null` - for potent_lib in $potential_libs; do - # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null | - $GREP " -> " >/dev/null; then - continue - fi - # The statement above tries to avoid entering an - # endless loop below, in case of cyclic links. - # We might still enter an endless loop, since a link - # loop can be closed while we follow links, - # but so what? - potlib="$potent_lib" - while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` - case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; - esac - done - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | - $SED -e 10q | - $EGREP "$file_magic_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - $ECHO - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $ECHO "*** with $libname but no candidates were found. (...for file magic test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a file magic. Last file checked: $potlib" - fi - fi - else - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - fi - done # Gone through all deplibs. - ;; - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - for a_deplib in $deplibs; do - name=`expr $a_deplib : '-l\(.*\)'` - # If $name is empty we are operating on a -L argument. - if test -n "$name" && test "$name" != "0"; then - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $a_deplib "*) - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - ;; - esac - fi - if test -n "$a_deplib" ; then - libname=`eval "\\$ECHO \"$libname_spec\""` - for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` - for potent_lib in $potential_libs; do - potlib="$potent_lib" # see symlink-check above in file_magic test - if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \ - $EGREP "$match_pattern_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - $ECHO - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a regex pattern. Last file checked: $potlib" - fi - fi - else - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - fi - done # Gone through all deplibs. - ;; - none | unknown | *) - newdeplibs="" - tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \ - -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'` - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - for i in $predeps $postdeps ; do - # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"` - done - fi - if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' | - $GREP . >/dev/null; then - $ECHO - if test "X$deplibs_check_method" = "Xnone"; then - $ECHO "*** Warning: inter-library dependencies are not supported in this platform." - else - $ECHO "*** Warning: inter-library dependencies are not known to be supported." - fi - $ECHO "*** All declared inter-library dependencies are being dropped." - droppeddeps=yes - fi - ;; - esac - versuffix=$versuffix_save - major=$major_save - release=$release_save - libname=$libname_save - name=$name_save - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library with the System framework - newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` - ;; - esac - - if test "$droppeddeps" = yes; then - if test "$module" = yes; then - $ECHO - $ECHO "*** Warning: libtool could not satisfy all declared inter-library" - $ECHO "*** dependencies of module $libname. Therefore, libtool will create" - $ECHO "*** a static module, that should work as long as the dlopening" - $ECHO "*** application is linked with the -dlopen flag." - if test -z "$global_symbol_pipe"; then - $ECHO - $ECHO "*** However, this would only work if libtool was able to extract symbol" - $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" - $ECHO "*** not find such a program. So, this module is probably useless." - $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - else - $ECHO "*** The inter-library dependencies that have been dropped here will be" - $ECHO "*** automatically added whenever a program is linked with this library" - $ECHO "*** or is declared to -dlopen it." - - if test "$allow_undefined" = no; then - $ECHO - $ECHO "*** Since this library must not contain undefined symbols," - $ECHO "*** because either the platform does not support them or" - $ECHO "*** it was explicitly requested with -no-undefined," - $ECHO "*** libtool will only create a static version of it." - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - fi - fi - # Done checking deplibs! - deplibs=$newdeplibs - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - case $host in - *-*-darwin*) - newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - deplibs="$new_libs" - - # All the library-specific variables (install_libdir is set above). - library_names= - old_library= - dlname= - - # Test again, we may have decided not to build it any more - if test "$build_libtool_libs" = yes; then - if test "$hardcode_into_libs" = yes; then - # Hardcode the library paths - hardcode_libdirs= - dep_rpath= - rpath="$finalize_rpath" - test "$mode" != relink && rpath="$compile_rpath$rpath" - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - dep_rpath="$dep_rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - if test -n "$hardcode_libdir_flag_spec_ld"; then - eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" - else - eval dep_rpath=\"$hardcode_libdir_flag_spec\" - fi - fi - if test -n "$runpath_var" && test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" - fi - test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" - fi - - shlibpath="$finalize_shlibpath" - test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" - if test -n "$shlibpath"; then - eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" - fi - - # Get the real and link names of the library. - eval shared_ext=\"$shrext_cmds\" - eval library_names=\"$library_names_spec\" - set dummy $library_names - shift - realname="$1" - shift - - if test -n "$soname_spec"; then - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - if test -z "$dlname"; then - dlname=$soname - fi - - lib="$output_objdir/$realname" - linknames= - for link - do - linknames="$linknames $link" - done - - # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - test "X$libobjs" = "X " && libobjs= - - delfiles= - if test -n "$export_symbols" && test -n "$include_expsyms"; then - $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" - export_symbols="$output_objdir/$libname.uexp" - delfiles="$delfiles $export_symbols" - fi - - orig_export_symbols= - case $host_os in - cygwin* | mingw*) - if test -n "$export_symbols" && test -z "$export_symbols_regex"; then - # exporting using user supplied symfile - if test "x`$SED 1q $export_symbols`" != xEXPORTS; then - # and it's NOT already a .def file. Must figure out - # which of the given symbols are data symbols and tag - # them as such. So, trigger use of export_symbols_cmds. - # export_symbols gets reassigned inside the "prepare - # the list of exported symbols" if statement, so the - # include_expsyms logic still works. - orig_export_symbols="$export_symbols" - export_symbols= - always_export_symbols=yes - fi - fi - ;; - esac - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $opt_dry_run || $RM $export_symbols - cmds=$export_symbols_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - if len=`expr "X$cmd" : ".*"` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - func_show_eval "$cmd" 'exit $?' - skipped_export=false - else - # The command line is too long to execute in one step. - func_verbose "using reloadable object file for export list..." - skipped_export=: - # Break out early, otherwise skipped_export may be - # set to false by a later but shorter cmd. - break - fi - done - IFS="$save_ifs" - if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - fi - - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' - fi - - if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - - tmp_deplibs= - for test_deplib in $deplibs; do - case " $convenience " in - *" $test_deplib "*) ;; - *) - tmp_deplibs="$tmp_deplibs $test_deplib" - ;; - esac - done - deplibs="$tmp_deplibs" - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec" && - test "$compiler_needs_object" = yes && - test -z "$libobjs"; then - # extract the archives, so we have objects to list. - # TODO: could optimize this to just extract one archive. - whole_archive_flag_spec= - fi - if test -n "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - else - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - libobjs="$libobjs $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - fi - - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then - eval flag=\"$thread_safe_flag_spec\" - linker_flags="$linker_flags $flag" - fi - - # Make a backup of the uninstalled library when relinking - if test "$mode" = relink; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? - fi - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - eval test_cmds=\"$module_expsym_cmds\" - cmds=$module_expsym_cmds - else - eval test_cmds=\"$module_cmds\" - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - eval test_cmds=\"$archive_expsym_cmds\" - cmds=$archive_expsym_cmds - else - eval test_cmds=\"$archive_cmds\" - cmds=$archive_cmds - fi - fi - - if test "X$skipped_export" != "X:" && - len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - : - else - # The command line is too long to link in one step, link piecewise - # or, if using GNU ld and skipped_export is not :, use a linker - # script. - - # Save the value of $output and $libobjs because we want to - # use them later. If we have whole_archive_flag_spec, we - # want to use save_libobjs as it was before - # whole_archive_flag_spec was expanded, because we can't - # assume the linker understands whole_archive_flag_spec. - # This may have to be revisited, in case too many - # convenience libraries get linked in and end up exceeding - # the spec. - if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - fi - save_output=$output - output_la=`$ECHO "X$output" | $Xsed -e "$basename"` - - # Clear the reloadable object creation command queue and - # initialize k to one. - test_cmds= - concat_cmds= - objlist= - last_robj= - k=1 - - if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then - output=${output_objdir}/${output_la}.lnkscript - func_verbose "creating GNU ld script: $output" - $ECHO 'INPUT (' > $output - for obj in $save_libobjs - do - $ECHO "$obj" >> $output - done - $ECHO ')' >> $output - delfiles="$delfiles $output" - elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then - output=${output_objdir}/${output_la}.lnk - func_verbose "creating linker input file list: $output" - : > $output - set x $save_libobjs - shift - firstobj= - if test "$compiler_needs_object" = yes; then - firstobj="$1 " - shift - fi - for obj - do - $ECHO "$obj" >> $output - done - delfiles="$delfiles $output" - output=$firstobj\"$file_list_spec$output\" - else - if test -n "$save_libobjs"; then - func_verbose "creating reloadable object files..." - output=$output_objdir/$output_la-${k}.$objext - # Loop over the list of objects to be linked. - for obj in $save_libobjs - do - eval test_cmds=\"$reload_cmds $objlist $last_robj\" - if test "X$objlist" = X || - { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len"; }; then - objlist="$objlist $obj" - else - # The command $test_cmds is almost too long, add a - # command to the queue. - if test "$k" -eq 1 ; then - # The first file doesn't have a previous command to add. - eval concat_cmds=\"$reload_cmds $objlist $last_robj\" - else - # All subsequent reloadable object files will link in - # the last one created. - eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\" - fi - last_robj=$output_objdir/$output_la-${k}.$objext - k=`expr $k + 1` - output=$output_objdir/$output_la-${k}.$objext - objlist=$obj - len=1 - fi - done - # Handle the remaining objects by creating one last - # reloadable object file. All subsequent reloadable object - # files will link in the last one created. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" - if test -n "$last_robj"; then - eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" - fi - delfiles="$delfiles $output" - - else - output= - fi - - if ${skipped_export-false}; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $opt_dry_run || $RM $export_symbols - libobjs=$output - # Append the command to create the export file. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" - if test -n "$last_robj"; then - eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" - fi - fi - - test -n "$save_libobjs" && - func_verbose "creating a temporary reloadable object file: $output" - - # Loop through the commands generated above and execute them. - save_ifs="$IFS"; IFS='~' - for cmd in $concat_cmds; do - IFS="$save_ifs" - $opt_silent || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - if test -n "$export_symbols_regex" && ${skipped_export-false}; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - - if ${skipped_export-false}; then - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' - fi - - if test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - fi - - libobjs=$output - # Restore the value of output. - output=$save_output - - if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - fi - # Expand the library linking commands again to reset the - # value of $libobjs for piecewise linking. - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - cmds=$module_expsym_cmds - else - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - cmds=$archive_expsym_cmds - else - cmds=$archive_cmds - fi - fi - fi - - if test -n "$delfiles"; then - # Append the command to remove temporary files to $cmds. - eval cmds=\"\$cmds~\$RM $delfiles\" - fi - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $dlprefiles - libobjs="$libobjs $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $opt_silent || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? - - if test -n "$convenience"; then - if test -z "$whole_archive_flag_spec"; then - func_show_eval '${RM}r "$gentop"' - fi - fi - - exit $EXIT_SUCCESS - fi - - # Create links to the real library. - for linkname in $linknames; do - if test "$realname" != "$linkname"; then - func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' - fi - done - - # If -module or -export-dynamic was specified, set the dlname. - if test "$module" = yes || test "$export_dynamic" = yes; then - # On all known operating systems, these are identical. - dlname="$soname" - fi - fi - ;; - - obj) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for objects" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for objects" ;; - esac - - test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for objects" - - test -n "$xrpath" && \ - func_warning "\`-R' is ignored for objects" - - test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for objects" - - test -n "$release" && \ - func_warning "\`-release' is ignored for objects" - - case $output in - *.lo) - test -n "$objs$old_deplibs" && \ - func_fatal_error "cannot build library object \`$output' from non-libtool objects" - - libobj=$output - func_lo2o "$libobj" - obj=$func_lo2o_result - ;; - *) - libobj= - obj="$output" - ;; - esac - - # Delete the old objects. - $opt_dry_run || $RM $obj $libobj - - # Objects from convenience libraries. This assumes - # single-version convenience libraries. Whenever we create - # different ones for PIC/non-PIC, this we'll have to duplicate - # the extraction. - reload_conv_objs= - gentop= - # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec and hope we can get by with - # turning comma into space.. - wl= - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` - else - gentop="$output_objdir/${obj}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - reload_conv_objs="$reload_objs $func_extract_archives_result" - fi - fi - - # Create the old-style object. - reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test - - output="$obj" - func_execute_cmds "$reload_cmds" 'exit $?' - - # Exit if we aren't doing a library object file. - if test -z "$libobj"; then - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - fi - - if test "$build_libtool_libs" != yes; then - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - # Create an invalid libtool object if no PIC, so that we don't - # accidentally link it into a program. - # $show "echo timestamp > $libobj" - # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? - exit $EXIT_SUCCESS - fi - - if test -n "$pic_flag" || test "$pic_mode" != default; then - # Only do commands if we really have different PIC objects. - reload_objs="$libobjs $reload_conv_objs" - output="$libobj" - func_execute_cmds "$reload_cmds" 'exit $?' - fi - - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - ;; - - prog) - case $host in - *cygwin*) func_stripname '' '.exe' "$output" - output=$func_stripname_result.exe;; - esac - test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for programs" - - test -n "$release" && \ - func_warning "\`-release' is ignored for programs" - - test "$preload" = yes \ - && test "$dlopen_support" = unknown \ - && test "$dlopen_self" = unknown \ - && test "$dlopen_self_static" = unknown && \ - func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` - finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` - ;; - esac - - case $host in - *-*-darwin*) - # Don't allow lazy linking, it breaks C++ global constructors - # But is supposedly fixed on 10.4 or later (yay!). - if test "$tagname" = CXX ; then - case ${MACOSX_DEPLOYMENT_TARGET-10.0} in - 10.[0123]) - compile_command="$compile_command ${wl}-bind_at_load" - finalize_command="$finalize_command ${wl}-bind_at_load" - ;; - esac - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $compile_deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $compile_deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - compile_deplibs="$new_libs" - - - compile_command="$compile_command $compile_deplibs" - finalize_command="$finalize_command $finalize_deplibs" - - if test -n "$rpath$xrpath"; then - # If the user specified any rpath flags, then add them. - for libdir in $rpath $xrpath; do - # This is the magic to use -rpath. - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - fi - - # Now hardcode the library paths - rpath= - hardcode_libdirs= - for libdir in $compile_rpath $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$libdir:"*) ;; - *) dllsearchpath="$dllsearchpath:$libdir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - compile_rpath="$rpath" - - rpath= - hardcode_libdirs= - for libdir in $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$finalize_perm_rpath " in - *" $libdir "*) ;; - *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - finalize_rpath="$rpath" - - if test -n "$libobjs" && test "$build_old_libs" = yes; then - # Transform all the library objects into standard objects. - compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - fi - - func_generate_dlsyms "$outputname" "@PROGRAM@" "no" - - # template prelinking step - if test -n "$prelink_cmds"; then - func_execute_cmds "$prelink_cmds" 'exit $?' - fi - - wrappers_required=yes - case $host in - *cygwin* | *mingw* ) - if test "$build_libtool_libs" != yes; then - wrappers_required=no - fi - ;; - *) - if test "$need_relink" = no || test "$build_libtool_libs" != yes; then - wrappers_required=no - fi - ;; - esac - if test "$wrappers_required" = no; then - # Replace the output file specification. - compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - link_command="$compile_command$compile_rpath" - - # We have no uninstalled library dependencies, so finalize right now. - exit_status=0 - func_show_eval "$link_command" 'exit_status=$?' - - # Delete the generated files. - if test -f "$output_objdir/${outputname}S.${objext}"; then - func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' - fi - - exit $exit_status - fi - - if test -n "$compile_shlibpath$finalize_shlibpath"; then - compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" - fi - if test -n "$finalize_shlibpath"; then - finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" - fi - - compile_var= - finalize_var= - if test -n "$runpath_var"; then - if test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - compile_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - if test -n "$finalize_perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $finalize_perm_rpath; do - rpath="$rpath$dir:" - done - finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - fi - - if test "$no_install" = yes; then - # We don't need to create a wrapper script. - link_command="$compile_var$compile_command$compile_rpath" - # Replace the output file specification. - link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - # Delete the old output file. - $opt_dry_run || $RM $output - # Link the executable and exit - func_show_eval "$link_command" 'exit $?' - exit $EXIT_SUCCESS - fi - - if test "$hardcode_action" = relink; then - # Fast installation is not supported - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - - func_warning "this platform does not like uninstalled shared libraries" - func_warning "\`$output' will be relinked during installation" - else - if test "$fast_install" != no; then - link_command="$finalize_var$compile_command$finalize_rpath" - if test "$fast_install" = yes; then - relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` - else - # fast_install is set to needless - relink_command= - fi - else - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - fi - fi - - # Replace the output file specification. - link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` - - # Delete the old output files. - $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname - - func_show_eval "$link_command" 'exit $?' - - # Now create the wrapper script. - func_verbose "creating $output" - - # Quote the relink command for shipping. - if test -n "$relink_command"; then - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` - fi - - # Quote $ECHO for shipping. - if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then - case $progpath in - [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; - *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; - esac - qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"` - else - qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"` - fi - - # Only actually do things if not in dry run mode. - $opt_dry_run || { - # win32 will think the script is a binary if it has - # a .exe suffix, so we strip it off here. - case $output in - *.exe) func_stripname '' '.exe' "$output" - output=$func_stripname_result ;; - esac - # test for cygwin because mv fails w/o .exe extensions - case $host in - *cygwin*) - exeext=.exe - func_stripname '' '.exe' "$outputname" - outputname=$func_stripname_result ;; - *) exeext= ;; - esac - case $host in - *cygwin* | *mingw* ) - func_dirname_and_basename "$output" "" "." - output_name=$func_basename_result - output_path=$func_dirname_result - cwrappersource="$output_path/$objdir/lt-$output_name.c" - cwrapper="$output_path/$output_name.exe" - $RM $cwrappersource $cwrapper - trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 - - func_emit_cwrapperexe_src > $cwrappersource - - # we should really use a build-platform specific compiler - # here, but OTOH, the wrappers (shell script and this C one) - # are only useful if you want to execute the "real" binary. - # Since the "real" binary is built for $host, then this - # wrapper might as well be built for $host, too. - $opt_dry_run || { - $LTCC $LTCFLAGS -o $cwrapper $cwrappersource - $STRIP $cwrapper - } - - # Now, create the wrapper script for func_source use: - func_ltwrapper_scriptname $cwrapper - $RM $func_ltwrapper_scriptname_result - trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 - $opt_dry_run || { - $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result - } - ;; - * ) - $RM $output - trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 - - func_emit_wrapper no > $output - chmod +x $output - ;; - esac - } - exit $EXIT_SUCCESS - ;; - esac - - # See if we need to build an old-fashioned archive. - for oldlib in $oldlibs; do - - if test "$build_libtool_libs" = convenience; then - oldobjs="$libobjs_save $symfileobj" - addlibs="$convenience" - build_libtool_libs=no - else - if test "$build_libtool_libs" = module; then - oldobjs="$libobjs_save" - build_libtool_libs=no - else - oldobjs="$old_deplibs $non_pic_objects" - if test "$preload" = yes && test -f "$symfileobj"; then - oldobjs="$oldobjs $symfileobj" - fi - fi - addlibs="$old_convenience" - fi - - if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $addlibs - oldobjs="$oldobjs $func_extract_archives_result" - fi - - # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then - cmds=$old_archive_from_new_cmds - else - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $dlprefiles - oldobjs="$oldobjs $func_extract_archives_result" - fi - - # POSIX demands no paths to be encoded in archives. We have - # to avoid creating archives with duplicate basenames if we - # might have to extract them afterwards, e.g., when creating a - # static archive out of a convenience library, or when linking - # the entirety of a libtool archive into another (currently - # not supported by libtool). - if (for obj in $oldobjs - do - func_basename "$obj" - $ECHO "$func_basename_result" - done | sort | sort -uc >/dev/null 2>&1); then - : - else - $ECHO "copying selected object files to avoid basename conflicts..." - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - func_mkdir_p "$gentop" - save_oldobjs=$oldobjs - oldobjs= - counter=1 - for obj in $save_oldobjs - do - func_basename "$obj" - objbase="$func_basename_result" - case " $oldobjs " in - " ") oldobjs=$obj ;; - *[\ /]"$objbase "*) - while :; do - # Make sure we don't pick an alternate name that also - # overlaps. - newobj=lt$counter-$objbase - counter=`expr $counter + 1` - case " $oldobjs " in - *[\ /]"$newobj "*) ;; - *) if test ! -f "$gentop/$newobj"; then break; fi ;; - esac - done - func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - oldobjs="$oldobjs $gentop/$newobj" - ;; - *) oldobjs="$oldobjs $obj" ;; - esac - done - fi - eval cmds=\"$old_archive_cmds\" - - if len=`expr "X$cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - cmds=$old_archive_cmds - else - # the command line is too long to link in one step, link in parts - func_verbose "using piecewise archive linking..." - save_RANLIB=$RANLIB - RANLIB=: - objlist= - concat_cmds= - save_oldobjs=$oldobjs - # Is there a better way of finding the last object in the list? - for obj in $save_oldobjs - do - last_oldobj=$obj - done - for obj in $save_oldobjs - do - oldobjs="$objlist $obj" - objlist="$objlist $obj" - eval test_cmds=\"$old_archive_cmds\" - if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len"; then - : - else - # the above command should be used before it gets too long - oldobjs=$objlist - if test "$obj" = "$last_oldobj" ; then - RANLIB=$save_RANLIB - fi - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" - objlist= - fi - done - RANLIB=$save_RANLIB - oldobjs=$objlist - if test "X$oldobjs" = "X" ; then - eval cmds=\"\$concat_cmds\" - else - eval cmds=\"\$concat_cmds~\$old_archive_cmds\" - fi - fi - fi - func_execute_cmds "$cmds" 'exit $?' - done - - test -n "$generated" && \ - func_show_eval "${RM}r$generated" - - # Now create the libtool archive. - case $output in - *.la) - old_library= - test "$build_old_libs" = yes && old_library="$libname.$libext" - func_verbose "creating $output" - - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` - if test "$hardcode_automatic" = yes ; then - relink_command= - fi - - # Only create the output if not a dry run. - $opt_dry_run || { - for installed in no yes; do - if test "$installed" = yes; then - if test -z "$install_libdir"; then - break - fi - output="$output_objdir/$outputname"i - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do - case $deplib in - *.la) - func_basename "$deplib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" - newdependency_libs="$newdependency_libs $libdir/$name" - ;; - *) newdependency_libs="$newdependency_libs $deplib" ;; - esac - done - dependency_libs="$newdependency_libs" - newdlfiles= - - for lib in $dlfiles; do - case $lib in - *.la) - func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" - newdlfiles="$newdlfiles $libdir/$name" - ;; - *) newdlfiles="$newdlfiles $lib" ;; - esac - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - *.la) - # Only pass preopened files to the pseudo-archive (for - # eventual linking with the app. that links it) if we - # didn't already link the preopened objects directly into - # the library: - func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" - newdlprefiles="$newdlprefiles $libdir/$name" - ;; - esac - done - dlprefiles="$newdlprefiles" - else - newdlfiles= - for lib in $dlfiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlfiles="$newdlfiles $abs" - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlprefiles="$newdlprefiles $abs" - done - dlprefiles="$newdlprefiles" - fi - $RM $output - # place dlname in correct position for cygwin - tdlname=$dlname - case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; - esac - $ECHO > $output "\ -# $outputname - a libtool library file -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='$tdlname' - -# Names of this library. -library_names='$library_names' - -# The name of the static archive. -old_library='$old_library' - -# Linker flags that can not go in dependency_libs. -inherited_linker_flags='$new_inherited_linker_flags' - -# Libraries that this one depends upon. -dependency_libs='$dependency_libs' - -# Names of additional weak libraries provided by this library -weak_library_names='$weak_libs' - -# Version information for $libname. -current=$current -age=$age -revision=$revision - -# Is this an already installed library? -installed=$installed - -# Should we warn about portability when linking against -modules? -shouldnotlink=$module - -# Files to dlopen/dlpreopen -dlopen='$dlfiles' -dlpreopen='$dlprefiles' - -# Directory that this library needs to be installed in: -libdir='$install_libdir'" - if test "$installed" = no && test "$need_relink" = yes; then - $ECHO >> $output "\ -relink_command=\"$relink_command\"" - fi - done - } - - # Do a symbolic link so that the libtool archive can be found in - # LD_LIBRARY_PATH before the program is installed. - func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' - ;; - esac - exit $EXIT_SUCCESS -} - -{ test "$mode" = link || test "$mode" = relink; } && - func_mode_link ${1+"$@"} - - -# func_mode_uninstall arg... -func_mode_uninstall () -{ - $opt_debug - RM="$nonopt" - files= - rmforce= - exit_status=0 - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - for arg - do - case $arg in - -f) RM="$RM $arg"; rmforce=yes ;; - -*) RM="$RM $arg" ;; - *) files="$files $arg" ;; - esac - done - - test -z "$RM" && \ - func_fatal_help "you must specify an RM program" - - rmdirs= - - origobjdir="$objdir" - for file in $files; do - func_dirname "$file" "" "." - dir="$func_dirname_result" - if test "X$dir" = X.; then - objdir="$origobjdir" - else - objdir="$dir/$origobjdir" - fi - func_basename "$file" - name="$func_basename_result" - test "$mode" = uninstall && objdir="$dir" - - # Remember objdir for removal later, being careful to avoid duplicates - if test "$mode" = clean; then - case " $rmdirs " in - *" $objdir "*) ;; - *) rmdirs="$rmdirs $objdir" ;; - esac - fi - - # Don't error if the file doesn't exist and rm -f was used. - if { test -L "$file"; } >/dev/null 2>&1 || - { test -h "$file"; } >/dev/null 2>&1 || - test -f "$file"; then - : - elif test -d "$file"; then - exit_status=1 - continue - elif test "$rmforce" = yes; then - continue - fi - - rmfiles="$file" - - case $name in - *.la) - # Possibly a libtool archive, so verify it. - if func_lalib_p "$file"; then - func_source $dir/$name - - # Delete the libtool libraries and symlinks. - for n in $library_names; do - rmfiles="$rmfiles $objdir/$n" - done - test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" - - case "$mode" in - clean) - case " $library_names " in - # " " in the beginning catches empty $dlname - *" $dlname "*) ;; - *) rmfiles="$rmfiles $objdir/$dlname" ;; - esac - test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" - ;; - uninstall) - if test -n "$library_names"; then - # Do each command in the postuninstall commands. - func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' - fi - - if test -n "$old_library"; then - # Do each command in the old_postuninstall commands. - func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' - fi - # FIXME: should reinstall the best remaining shared library. - ;; - esac - fi - ;; - - *.lo) - # Possibly a libtool object, so verify it. - if func_lalib_p "$file"; then - - # Read the .lo file - func_source $dir/$name - - # Add PIC object to the list of files to remove. - if test -n "$pic_object" && - test "$pic_object" != none; then - rmfiles="$rmfiles $dir/$pic_object" - fi - - # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" && - test "$non_pic_object" != none; then - rmfiles="$rmfiles $dir/$non_pic_object" - fi - fi - ;; - - *) - if test "$mode" = clean ; then - noexename=$name - case $file in - *.exe) - func_stripname '' '.exe' "$file" - file=$func_stripname_result - func_stripname '' '.exe' "$name" - noexename=$func_stripname_result - # $file with .exe has already been added to rmfiles, - # add $file without .exe - rmfiles="$rmfiles $file" - ;; - esac - # Do a test to see if this is a libtool program. - if func_ltwrapper_p "$file"; then - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - relink_command= - func_source $func_ltwrapper_scriptname_result - rmfiles="$rmfiles $func_ltwrapper_scriptname_result" - else - relink_command= - func_source $dir/$noexename - fi - - # note $name still contains .exe if it was in $file originally - # as does the version of $file that was added into $rmfiles - rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" - if test "$fast_install" = yes && test -n "$relink_command"; then - rmfiles="$rmfiles $objdir/lt-$name" - fi - if test "X$noexename" != "X$name" ; then - rmfiles="$rmfiles $objdir/lt-${noexename}.c" - fi - fi - fi - ;; - esac - func_show_eval "$RM $rmfiles" 'exit_status=1' - done - objdir="$origobjdir" - - # Try to remove the ${objdir}s in the directories where we deleted files - for dir in $rmdirs; do - if test -d "$dir"; then - func_show_eval "rmdir $dir >/dev/null 2>&1" - fi - done - - exit $exit_status -} - -{ test "$mode" = uninstall || test "$mode" = clean; } && - func_mode_uninstall ${1+"$@"} - -test -z "$mode" && { - help="$generic_help" - func_fatal_help "you must specify a MODE" -} - -test -z "$exec_cmd" && \ - func_fatal_help "invalid operation mode \`$mode'" - -if test -n "$exec_cmd"; then - eval exec "$exec_cmd" - exit $EXIT_FAILURE -fi - -exit $exit_status - - -# The TAGs below are defined such that we never get into a situation -# in which we disable both kinds of libraries. Given conflicting -# choices, we go for a static library, that is the most portable, -# since we can't tell whether shared libraries were disabled because -# the user asked for that or because the platform doesn't support -# them. This is particularly important on AIX, because we don't -# support having both static and shared libraries enabled at the same -# time on that platform, so we default to a shared-only configuration. -# If a disable-shared tag is given, we'll fallback to a static-only -# configuration. But we'll never go from static-only to shared-only. - -# ### BEGIN LIBTOOL TAG CONFIG: disable-shared -build_libtool_libs=no -build_old_libs=yes -# ### END LIBTOOL TAG CONFIG: disable-shared - -# ### BEGIN LIBTOOL TAG CONFIG: disable-static -build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` -# ### END LIBTOOL TAG CONFIG: disable-static - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: -# vi:sw=2 - diff --git a/open-vm-tools/config/missing b/open-vm-tools/config/missing deleted file mode 100755 index 1c8ff7049..000000000 --- a/open-vm-tools/config/missing +++ /dev/null @@ -1,367 +0,0 @@ -#! /bin/sh -# Common stub for a few missing GNU programs while installing. - -scriptversion=2006-05-10.23 - -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 -# Free Software Foundation, Inc. -# Originally by Fran,cois Pinard , 1996. - -# 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, or (at your option) -# 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., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 -fi - -run=: -sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' -sed_minuso='s/.* -o \([^ ]*\).*/\1/p' - -# In the cases where this matters, `missing' is being run in the -# srcdir already. -if test -f configure.ac; then - configure_ac=configure.ac -else - configure_ac=configure.in -fi - -msg="missing on your system" - -case $1 in ---run) - # Try to run requested program, and just exit if it succeeds. - run= - shift - "$@" && exit 0 - # Exit code 63 means version mismatch. This often happens - # when the user try to use an ancient version of a tool on - # a file that requires a minimum version. In this case we - # we should proceed has if the program had been absent, or - # if --run hadn't been passed. - if test $? = 63; then - run=: - msg="probably too old" - fi - ;; - - -h|--h|--he|--hel|--help) - echo "\ -$0 [OPTION]... PROGRAM [ARGUMENT]... - -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. - -Options: - -h, --help display this help and exit - -v, --version output version information and exit - --run try to run the given command, and emulate it if it fails - -Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - autom4te touch the output file, or create a stub one - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c - help2man touch the output file - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags - yacc create \`y.tab.[ch]', if possible, from existing .[ch] - -Send bug reports to ." - exit $? - ;; - - -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing $scriptversion (GNU Automake)" - exit $? - ;; - - -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 - ;; - -esac - -# Now exit if we have it, but it failed. Also exit now if we -# don't have it and --version was passed (most likely to detect -# the program). -case $1 in - lex|yacc) - # Not GNU programs, they don't have --version. - ;; - - tar) - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - exit 1 - fi - ;; - - *) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - # Could not run --version or --help. This is probably someone - # running `$TOOL --version' or `$TOOL --help' to check whether - # $TOOL exists and not knowing $TOOL uses missing. - exit 1 - fi - ;; -esac - -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case $1 in - aclocal*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acinclude.m4' or \`${configure_ac}'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`${configure_ac}'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acconfig.h' or \`${configure_ac}'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case $f in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - autom4te) - echo 1>&2 "\ -WARNING: \`$1' is needed, but is $msg. - You might have modified some files without having the - proper tools for further handling them. - You can get \`$1' as part of \`Autoconf' from any GNU - archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo "#! /bin/sh" - echo "# Created by GNU Automake missing as a replacement of" - echo "# $ $@" - echo "exit 0" - chmod +x $file - exit 1 - fi - ;; - - bison|yacc) - echo 1>&2 "\ -WARNING: \`$1' $msg. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." - rm -f y.tab.c y.tab.h - if test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if test ! -f y.tab.h; then - echo >y.tab.h - fi - if test ! -f y.tab.c; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex|flex) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if test ! -f lex.yy.c; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - help2man) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a dependency of a manual page. You may need the - \`Help2man' package in order for those modifications to take - effect. You can get \`Help2man' from any GNU archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo ".ab help2man is required to generate this page" - exit 1 - fi - ;; - - makeinfo) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." - # The file to touch is that specified with -o ... - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -z "$file"; then - # ... or it is the one specified with @setfilename ... - infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n ' - /^@setfilename/{ - s/.* \([^ ]*\) *$/\1/ - p - q - }' $infile` - # ... or it is derived from the source name (dir/f.texi becomes f.info) - test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info - fi - # If the file does not exist, the user really needs makeinfo; - # let's fail without touching anything. - test -f $file || exit 1 - touch $file - ;; - - tar) - shift - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case $firstarg in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case $firstarg in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and is $msg. - You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequisites for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; -esac - -exit 0 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/open-vm-tools/configure b/open-vm-tools/configure deleted file mode 100755 index 62cf44796..000000000 --- a/open-vm-tools/configure +++ /dev/null @@ -1,34205 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for open-vm-tools 10.0.5. -# -# Report bugs to . -# -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006 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 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 - # 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 - - - - -# 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 - -# 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 - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -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.) -as_nl=' -' -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 - 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. -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) >/dev/null 2>&1 && $as_unset $as_var - fi -done - -# Required to use basename. -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 - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -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'` - -# CDPATH. -$as_unset CDPATH - - -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 -} - -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 - 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=. - case $as_dir in - /*) - 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=: - # Zsh 3.x and 4.x performs 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=: - # Zsh 3.x and 4.x performs 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 - test "x$as_lineno_1" != "x$as_lineno_2" && - 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 autoconf@gnu.org about your system, - echo including any error possibly output before this - echo message -} - - - - 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 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 - # 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 - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - 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 - { (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 sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -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 -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi -echo >conf$$.file -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 -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=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -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'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - - - -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$lt_ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` - ;; -esac - -ECHO=${lt_ECHO-echo} -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell. - exec $SHELL "$0" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat <<_LT_EOF -$* -_LT_EOF - exit 0 -fi - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test -z "$lt_ECHO"; then - if test "X${echo_test_string+set}" != Xset; then - # find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if { echo_test_string=`eval $cmd`; } 2>/dev/null && - { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null - then - break - fi - done - fi - - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : - else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$ECHO" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - ECHO='print -r' - elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} - else - # Try using printf. - ECHO='printf %s\n' - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - ECHO="$CONFIG_SHELL $0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$CONFIG_SHELL $0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do - if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "$0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} - else - # Oops. We lost completely, so just stick with echo. - ECHO=echo - fi - fi - fi - fi - fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -lt_ECHO=$ECHO -if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then - lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" -fi - - - - -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` - -# -# 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} - -# Identity of this package. -PACKAGE_NAME='open-vm-tools' -PACKAGE_TARNAME='open-vm-tools' -PACKAGE_VERSION='10.0.5' -PACKAGE_STRING='open-vm-tools 10.0.5' -PACKAGE_BUGREPORT='open-vm-tools-devel@lists.sourceforge.net' - -ac_unique_file="checkvm/checkvm.c" -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#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 -datarootdir -datadir -sysconfdir -sharedstatedir -localstatedir -includedir -oldincludedir -docdir -infodir -htmldir -dvidir -pdfdir -psdir -libdir -localedir -mandir -DEFS -ECHO_C -ECHO_N -ECHO_T -LIBS -build_alias -host_alias -target_alias -build -build_cpu -build_vendor -build_os -host -host_cpu -host_vendor -host_os -INSTALL_PROGRAM -INSTALL_SCRIPT -INSTALL_DATA -am__isrc -CYGPATH_W -PACKAGE -VERSION -ACLOCAL -AUTOCONF -AUTOMAKE -AUTOHEADER -MAKEINFO -install_sh -STRIP -INSTALL_STRIP_PROGRAM -mkdir_p -AWK -SET_MAKE -am__leading_dot -AMTAR -am__tar -am__untar -CC -CFLAGS -LDFLAGS -CPPFLAGS -ac_ct_CC -EXEEXT -OBJEXT -DEPDIR -am__include -am__quote -AMDEP_TRUE -AMDEP_FALSE -AMDEPBACKSLASH -CCDEPMODE -am__fastdepCC_TRUE -am__fastdepCC_FALSE -CPP -CXX -CXXFLAGS -ac_ct_CXX -CXXDEPMODE -am__fastdepCXX_TRUE -am__fastdepCXX_FALSE -SED -LN_S -LIBTOOL -GREP -EGREP -FGREP -LD -DUMPBIN -ac_ct_DUMPBIN -NM -AR -RANLIB -lt_ECHO -DSYMUTIL -NMEDIT -CXXCPP -HAVE_PKG_CONFIG -XMKMF -X_CFLAGS -X_PRE_LIBS -X_LIBS -X_EXTRA_LIBS -ac_vmw_lib_cfg -MSPACK_CPPFLAGS -MSPACK_LIBS -GLIB2_CPPFLAGS -GLIB2_LIBS -GMODULE_CPPFLAGS -GMODULE_LIBS -GOBJECT_CPPFLAGS -GOBJECT_LIBS -GTHREAD_CPPFLAGS -GTHREAD_LIBS -have_genmarshal -FUSE_CPPFLAGS -FUSE_LIBS -PAM_CPPFLAGS -PAM_LIBS -SSL_CPPFLAGS -SSL_LIBS -XERCES_CPPFLAGS -XERCES_LIBS -XMLSECURITY_CPPFLAGS -XMLSECURITY_LIBS -CUNIT_CPPFLAGS -CUNIT_LIBS -GTK_CPPFLAGS -GTK_LIBS -GTKMM_CPPFLAGS -GTKMM_LIBS -PROCPS_CPPFLAGS -PROCPS_LIBS -DNET_CPPFLAGS -DNET_LIBS -have_cxx -ICU_CPPFLAGS -ICU_LIBS -RPCGEN -have_doxygen -DOT -HAVE_DOT -MSCGEN -MSCGEN_DIR -BUILD_HGFSMOUNTER_TRUE -BUILD_HGFSMOUNTER_FALSE -LINUX_TRUE -LINUX_FALSE -SOLARIS_TRUE -SOLARIS_FALSE -FREEBSD_TRUE -FREEBSD_FALSE -FREEBSD_CUSTOM_SYSDIR_TRUE -FREEBSD_CUSTOM_SYSDIR_FALSE -THIRTY_TWO_BIT_USERSPACE_TRUE -THIRTY_TWO_BIT_USERSPACE_FALSE -HAVE_X11_TRUE -HAVE_X11_FALSE -HAVE_ICU_TRUE -HAVE_ICU_FALSE -WITH_KERNEL_MODULES_TRUE -WITH_KERNEL_MODULES_FALSE -HAVE_XSM_TRUE -HAVE_XSM_FALSE -HAVE_XCOMPOSITE_TRUE -HAVE_XCOMPOSITE_FALSE -ENABLE_TESTS_TRUE -ENABLE_TESTS_FALSE -WITH_ROOT_PRIVILEGES_TRUE -WITH_ROOT_PRIVILEGES_FALSE -HAVE_DNET_TRUE -HAVE_DNET_FALSE -HAVE_DOXYGEN_TRUE -HAVE_DOXYGEN_FALSE -HAVE_FUSE_TRUE -HAVE_FUSE_FALSE -HAVE_GNU_LD_TRUE -HAVE_GNU_LD_FALSE -HAVE_GTKMM_TRUE -HAVE_GTKMM_FALSE -HAVE_PAM_TRUE -HAVE_PAM_FALSE -USE_SLASH_PROC_TRUE -USE_SLASH_PROC_FALSE -USE_PRINTF_WRAPPERS_TRUE -USE_PRINTF_WRAPPERS_FALSE -ENABLE_DEPLOYPKG_TRUE -ENABLE_DEPLOYPKG_FALSE -ENABLE_GRABBITMQPROXY_TRUE -ENABLE_GRABBITMQPROXY_FALSE -ENABLE_VGAUTH_TRUE -ENABLE_VGAUTH_FALSE -HAVE_VSOCK_TRUE -HAVE_VSOCK_FALSE -HGFS_LIBS -TOOLS_VERSION -TARGET_OS -KERNEL_RELEASE -LINUXINCLUDE -MODULES_OS -MODULES_DIR -MODULES -COMMON_XLIBS -XSM_LIBS -XCOMPOSITE_LIBS -PAM_PREFIX -PLUGIN_CPPFLAGS -PLUGIN_LDFLAGS -VMTOOLS_CPPFLAGS -VMTOOLS_LIBS -RPCGENFLAGS -XDR_LIBS -TEST_PLUGIN_INSTALLDIR -COMMON_PLUGIN_INSTALLDIR -VMSVC_PLUGIN_INSTALLDIR -VMUSR_PLUGIN_INSTALLDIR -SYSDIR -INSTVMSG -RPCGEN_WRAPPER -LIB_AUTH_CPPFLAGS -LIB_IMPERSONATE_CPPFLAGS -LIB_USER_CPPFLAGS -LIBVMTOOLS_LIBADD -VIX_LIBADD -VGAUTH_LIBADD -LIBOBJS -LTLIBOBJS' -ac_subst_files='' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP -CXX -CXXFLAGS -CCC -CXXCPP -XMKMF' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# 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' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -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 - ac_prev= - continue - fi - - 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_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -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-\(.*\)'` - # 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 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=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-\([^=]*\)'` - # 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 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -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 ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --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) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --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 ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_package=`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 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=\$ac_optarg ;; - - -without-* | --without-*) - ac_package=`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 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) { echo "$as_me: error: unrecognized option: $ac_option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } - ;; - - *=*) - 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 - { (exit 1); exit 1; }; } - 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 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} - ;; - - esac -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 - { (exit 1); exit 1; }; } -fi - -# Be sure to have absolute directory names. -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=\$$ac_var - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - { 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' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -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. - 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 - fi -fi - -ac_tool_prefix= -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 .` || - { echo "$as_me: error: Working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { 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 the parent directory. - ac_confdir=`$as_dirname -- "$0" || -$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'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 - { (exit 1); exit 1; }; } - 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. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures open-vm-tools 10.0.5 to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -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] - --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/open-vm-tools] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -Program names: - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names - -X features: - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of open-vm-tools 10.0.5:";; - esac - cat <<\_ACEOF - -Optional Features: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --disable-multimon disables multimon, enabled by default - --disable-docs disables generation of API documentation; by - default, docs are built if doxygen is available. - --disable-tests disable compilation of test code. - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors - --enable-shared[=PKGS] build shared libraries [default=yes] - --enable-static[=PKGS] build static libraries [default=yes] - --enable-fast-install[=PKGS] - optimize for fast installation [default=yes] - --disable-libtool-lock avoid locking (might break parallel builds) - --disable-deploypkg do not build deploypkg plugin. - --disable-grabbitmqproxy - do not build grabbitmqproxy plugin. - --disable-vgauth do not build vgauth. - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --without-root-privileges - does not perform any operations that require root - privileges - --without-kernel-modules - does not compile or install the kernel modules - --with-kernel-release specifies the kernel release you want to build - against - --with-linuxdir specifies the Linux directory you want to use - --without-gtk2 compiles without Gtk 2.0 - --without-gtkmm compiles without Gtkmm, sigc++, and related libs - --with-pic try to use only PIC/non-PIC objects [default=use - both] - --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-x use the X Window System - --without-pam compiles without PAM support. - --without-ssl compiles without openssl support (disables - grabbitmqproxy and vgauth). - --without-xmlsecurity compiles without xml-security-c support (disables - vgauth). - --without-xerces compiles without xerces support (disables vgauth). - --with-pam-prefix specifies where pam files go. Default is - $(sysconfdir) - --without-procps compiles without libproc (disables support for - meminfo) - --without-dnet compiles without libdnet (disables support for - nicinfo) - --without-icu disables support for ICU - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries 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 - CXX C++ compiler command - CXXFLAGS C++ compiler flags - CXXCPP C++ preprocessor - XMKMF Path to xmkmf, Makefile generator for X Window System - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to . -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`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 - .) # We are building in place. - ac_srcdir=. - 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 - 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 - - 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 || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -open-vm-tools configure 10.0.5 -generated by GNU Autoconf 2.61 - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006 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 -fi -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 open-vm-tools $as_me 10.0.5, which was -generated by GNU Autoconf 2.61. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 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` -/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` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - echo "PATH: $as_dir" -done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; - 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - ac_configure_args="$ac_configure_args '$ac_arg'" - ;; - esac - done -done -$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } - -# 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: 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. - { - echo - - cat <<\_ASBOX -## ---------------- ## -## Cache variables. ## -## ---------------- ## -_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_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done - (set) 2>&1 | - 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" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - cat <<\_ASBOX -## ----------------- ## -## Output variables. ## -## ----------------- ## -_ASBOX - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## -## File substitutions. ## -## ------------------- ## -_ASBOX - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## -## confdefs.h. ## -## ----------- ## -_ASBOX - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" - echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 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 -f -r conftest* confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer explicitly selected file to automatically selected ones. -if test -n "$CONFIG_SITE"; then - set x "$CONFIG_SITE" -elif test "x$prefix" != xNONE; then - set x "$prefix/share/config.site" "$prefix/etc/config.site" -else - set x "$ac_default_prefix/share/config.site" \ - "$ac_default_prefix/etc/config.site" -fi -shift -for ac_site_file -do - 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;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" - fi -done - -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;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { echo "$as_me:$LINENO: creating cache $cache_file" >&5 -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 $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 - 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;} - 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;} - 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=: - 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=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; - esac - 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;} - { (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 - - - -# In order to make this configure script auto-detect situations where -# people have a 32-bit userland running with a 64-bit kernel, we try to ask -# the compiler (assumedly gcc) for its default Target:. -# We have to set up $TEST_CC manually, since AC_PROG_CC hasn't yet been run (and can't be until AC_CANONICAL_HOST & AC_CANONICAL_BUILD are run) -# The purpose of all this is to set up $host_alias/$build_alias in a more -# intelligent way than config.guess currently does. -TEST_CC="$CC_FOR_BUILD" -test -z "$TEST_CC" && TEST_CC="$HOST_CC" -test -z "$TEST_CC" && TEST_CC="$CC" -if test -n "$TEST_CC" -a -z "$host_alias"; then - host_alias="`$TEST_CC -dumpmachine`" - if test -z "$build_alias" -a -n "$host_alias"; then - build_alias="$host_alias" - fi -fi -unset TEST_CC - -# checkvm/checkvm.c has no special significance - we just need to pass in a file that -# helps autoconf verify that it really has found the source tree. - - -# Keep the top-level directory tidy by putting auxiliary build tools and local -# macros in separate subdirectories. -ac_aux_dir= -for ac_dir in config "$srcdir"/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 - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - 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 config \"$srcdir\"/config" >&5 -echo "$as_me: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&2;} - { (exit 1); exit 1; }; } -fi - -# 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. - - - - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 -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; } -if test "${ac_cv_build+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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 && - { { 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;} - { (exit 1); exit 1; }; } -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 -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; } -case $ac_cv_build in -*-*-*) ;; -*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 -echo "$as_me: error: invalid value of canonical build" >&2;} - { (exit 1); exit 1; }; };; -esac -build=$ac_cv_build -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 - - -{ echo "$as_me:$LINENO: checking host system type" >&5 -echo $ECHO_N "checking host system type... $ECHO_C" >&6; } -if test "${ac_cv_host+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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` || - { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 -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; } -case $ac_cv_host in -*-*-*) ;; -*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 -echo "$as_me: error: invalid value of canonical host" >&2;} - { (exit 1); exit 1; }; };; -esac -host=$ac_cv_host -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 - - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 -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; } -if test "${ac_cv_build+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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 && - { { 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;} - { (exit 1); exit 1; }; } -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 -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; } -case $ac_cv_build in -*-*-*) ;; -*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 -echo "$as_me: error: invalid value of canonical build" >&2;} - { (exit 1); exit 1; }; };; -esac -build=$ac_cv_build -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 - - - -# Quote the regular expressions -case "$host_cpu" in - i[3456]86) - userSpaceBitness="32" - ;; - x86_64) - userSpaceBitness="64" - ;; - *) - { { echo "$as_me:$LINENO: error: Unknown architecture." >&5 -echo "$as_me: error: Unknown architecture." >&2;} - { (exit 1); exit 1; }; } - ;; -esac - -# Operational arguments. - -# Check whether --with-root-privileges was given. -if test "${with_root_privileges+set}" = set; then - withval=$with_root_privileges; -else - with_root_privileges=yes -fi - - -# Kernel arguments. -# The kernel args have to go here otherwise the KERNEL_RELEASE won't be visible -# to getOsVersion() - -# Check whether --with-kernel-modules was given. -if test "${with_kernel_modules+set}" = set; then - withval=$with_kernel_modules; -else - with_kernel_modules=yes -fi - - - -# Check whether --with-kernel-release was given. -if test "${with_kernel_release+set}" = set; then - withval=$with_kernel_release; KERNEL_RELEASE="$withval" -else - KERNEL_RELEASE=`uname -r` -fi - - - -# Check whether --with-linuxdir was given. -if test "${with_linuxdir+set}" = set; then - withval=$with_linuxdir; LINUXDIR="$withval" -else - LINUXDIR=/lib/modules/$KERNEL_RELEASE -fi - - -# Turn the uname output into something we can run comparisons on. -getOsVersion() { - major_version="`echo $KERNEL_RELEASE | cut -f1 -d. | cut -f1 -d-`" - minor_version="`echo $KERNEL_RELEASE | cut -f2 -d. | cut -f1 -d-`" - micro_version="`echo $KERNEL_RELEASE | cut -f3 -d. | cut -f1 -d-`" - printf '%02d%02d%03d' $major_version $minor_version $micro_version -} - -case "$host_os" in - linux*) - os="linux" - ;; - freebsd*) - os="freebsd" - ;; - kfreebsd*-gnu) - os="kfreebsd-gnu" - ;; - solaris*) - os="solaris" - ;; - *) - { echo "$as_me:$LINENO: WARNING: This is an untested and unsupported Operating System. Proceed at your own peril." >&5 -echo "$as_me: WARNING: This is an untested and unsupported Operating System. Proceed at your own peril." >&2;} - ;; -esac -osVersion="`getOsVersion`" - -if test "$with_kernel_modules" = "yes"; then - case "$os" in - linux) - if test "$osVersion" -lt 206009; then - { { echo "$as_me:$LINENO: error: Kernels prior to 2.6.9 are not supported in this release of open-vm-tools. Configure using --without-kernel-modules to suppress building kernel drivers." >&5 -echo "$as_me: error: Kernels prior to 2.6.9 are not supported in this release of open-vm-tools. Configure using --without-kernel-modules to suppress building kernel drivers." >&2;} - { (exit 1); exit 1; }; } - fi - if test ! -d "$LINUXDIR/kernel/"; then - { { echo "$as_me:$LINENO: error: $LINUXDIR/kernel does not exist" >&5 -echo "$as_me: error: $LINUXDIR/kernel does not exist" >&2;} - { (exit 1); exit 1; }; } - fi - LINUXINCLUDE="$LINUXDIR/build/include" - if test ! -d "$LINUXINCLUDE"; then - { { echo "$as_me:$LINENO: error: Can't find include dir under $LINUXDIR" >&5 -echo "$as_me: error: Can't find include dir under $LINUXDIR" >&2;} - { (exit 1); exit 1; }; } - fi - ;; - - freebsd) - freebsd_sysdir=/usr/src/sys - if test -n "$SYSDIR"; then - freebsd_sysdir="$SYSDIR" - fi - if test ! -f "$freebsd_sysdir/conf/kmod.mk"; then - { { echo "$as_me:$LINENO: error: FreeBSD kernel tree not found. Please install the kernel sources (or provide the location using SYSDIR) or configure using --without-kernel-modules." >&5 -echo "$as_me: error: FreeBSD kernel tree not found. Please install the kernel sources (or provide the location using SYSDIR) or configure using --without-kernel-modules." >&2;} - { (exit 1); exit 1; }; } - fi - ;; - esac -fi - -# Arguments for disabling individual open-vm-tools features or libraries. -# Check whether --enable-multimon was given. -if test "${enable_multimon+set}" = set; then - enableval=$enable_multimon; enable_multimon="$enableval" -else - enable_multimon="yes" -fi - - - -# Check whether --with-gtk2 was given. -if test "${with_gtk2+set}" = set; then - withval=$with_gtk2; with_gtk2="$withval" -else - with_gtk2="yes" -fi - - - -# Check whether --with-gtkmm was given. -if test "${with_gtkmm+set}" = set; then - withval=$with_gtkmm; with_gtkmm="$withval" -else - with_gtkmm="yes" -fi - - -# Check whether --enable-docs was given. -if test "${enable_docs+set}" = set; then - enableval=$enable_docs; enable_docs="$enableval" -else - enable_docs="yes" -fi - - -# Check whether --enable-tests was given. -if test "${enable_tests+set}" = set; then - enableval=$enable_tests; enable_tests="$enableval" -else - enable_tests="auto" -fi - - -am__api_version='1.10' - -# 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 { 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 - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - done - done - ;; -esac -done -IFS=$as_save_IFS - - -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 -{ echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$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' - -{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5 -echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } -# Just in case -sleep 1 -echo timestamp > conftest.file -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t $srcdir/configure conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" >&5 -echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" >&2;} - { (exit 1); exit 1; }; } - fi - - test "$2" = conftest.file - ) -then - # Ok. - : -else - { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! -Check your system clock" >&5 -echo "$as_me: error: newly created file is older than distributed files! -Check your system clock" >&2;} - { (exit 1); exit 1; }; } -fi -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } -test "$program_prefix" != NONE && - program_transform_name="s&^&$program_prefix&;$program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. echo might interpret backslashes. -# By default was `s,x,x', remove it if useless. -cat <<\_ACEOF >conftest.sed -s/[\\$]/&&/g;s/;s,x,x,$// -_ACEOF -program_transform_name=`echo $program_transform_name | sed -f conftest.sed` -rm -f conftest.sed - -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` - -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 -echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} -fi - -{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 -echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } -if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done -done -IFS=$as_save_IFS - -fi - - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P 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. - test -d ./--version && rmdir ./--version - MKDIR_P="$ac_install_sh -d" - fi -fi -{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5 -echo "${ECHO_T}$MKDIR_P" >&6; } - -mkdir_p="$MKDIR_P" -case $mkdir_p in - [\\/$]* | ?:[\\/]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac - -for ac_prog in gawk mawk nawk awk -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_AWK+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # 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_AWK="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { echo "$as_me:$LINENO: result: $AWK" >&5 -echo "${ECHO_T}$AWK" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$AWK" && break -done - -{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } -set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - SET_MAKE= -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null - -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - am__isrc=' -I$(srcdir)' - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 -echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} - { (exit 1); exit 1; }; } - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi - - -# Define the identity of the package. - PACKAGE='open-vm-tools' - VERSION='10.0.5' - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE "$PACKAGE" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define VERSION "$VERSION" -_ACEOF - -# Some tools Automake needs. - -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} - - -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} - - -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} - - -AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} - - -MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - -install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} - -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; 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_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # 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_STRIP="${ac_tool_prefix}strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { echo "$as_me:$LINENO: result: $STRIP" >&5 -echo "${ECHO_T}$STRIP" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; 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_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # 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_STRIP="strip" - 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_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -echo "${ECHO_T}$ac_ct_STRIP" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -# Always define AMTAR for backward compatibility. - -AMTAR=${AMTAR-"${am_missing_run}tar"} - -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' - - - - - - -### -### Constants -### -# These need to be declared after initialization. - -# Some of our macro call-sites require changes to -# CPPFLAGS/CFLAGS/LDFLAGS. In such places, we save the original value -# of CPPFLAGS/CFLAGS/LDFLAGS before the macro call and restore it when -# the call is done. We must perform this save at each macro site, -# because CPPFLAGS/CFLAGS/LDFLAGS may change over the course of -# configuration. -# -# CPPFLAGS is intended for preprocessor options (-D and -I mainly) -# CFLAGS is intended for compiler options (-O, -f, -W, and so forth) - -CPPFLAGS="$CPPFLAGS -DUSING_AUTOCONF=1 -DOPEN_VM_TOOLS" - -### -### Programs -### -# C preprocessor and compiler. -DEPDIR="${am__leading_dot}deps" - -ac_config_commands="$ac_config_commands depfiles" - - -am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo done -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 -echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi -fi - - -{ echo "$as_me:$LINENO: result: $_am_result" >&5 -echo "${ECHO_T}$_am_result" >&6; } -rm -f confinc confmf - -# Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then - enableval=$enable_dependency_tracking; -fi - -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi - if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= -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 -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 -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" - 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 "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 { 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 - 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; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&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 -{ 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 { 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 - 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 -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 { 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 - 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 - { 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 "$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 -{ 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 { 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 - 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 - - - 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 -{ 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 { 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 - 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; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}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:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&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 -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` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - -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 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out 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[^ ]*//'` -# -# List of possible output files, starting from the most likely. -# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) -# only as a last resort. b.out is created by i960 compilers. -ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' -# -# The IRIX 6 linker writes into existing files which may not be -# executable, retaining their permissions. Remove them first so a -# subsequent execution test works. -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # 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 | *.map | *.inf | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - 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 - ac_file='' -fi - -{ echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6; } -if test -z "$ac_file"; then - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { 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 -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } -fi - -ac_exeext=$ac_cv_exeext - -# 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; } -# 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' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - 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. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&5 -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; }; } - fi - fi -fi -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - -rm -f a.out a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -# 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 { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - 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 -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -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 | *.map | *.inf | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { 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 -See \`config.log' for more details." >&2;} - { (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; } - -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; } -if test "${ac_cv_objext+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. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - 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 | *.map | *.inf ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - 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 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&2;} - { (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; } -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; } -if test "${ac_cv_c_compiler_gnu+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. */ - -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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -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 -{ 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 -{ 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 - 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -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 -{ 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 -fi -{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -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) - { echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6; } ;; - xno) - { echo "$as_me:$LINENO: result: unsupported" >&5 -echo "${ECHO_T}unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -echo "${ECHO_T}$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 - -depcc="$CC" am_compiler_list= - -{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - case $depmode in - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - none) break ;; - esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. - if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 -echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -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 -{ 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. - 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 "echo \"\$as_me:$LINENO: $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 && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - 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 "echo \"\$as_me:$LINENO: $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 && { - 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 -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 -{ 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 -/* 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 "echo \"\$as_me:$LINENO: $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 && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - 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 "echo \"\$as_me:$LINENO: $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 && { - 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 -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 - { { 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 - -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 -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" - 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 "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 { 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 - 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; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&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 -{ 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 { 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 - 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 -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 { 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 - 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 - { 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 "$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 -{ 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 { 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 - 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 - - - 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 -{ 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 { 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 - 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; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}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:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&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 -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` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 -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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -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 -{ 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 -{ 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 - 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -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 -{ 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 -fi -{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -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) - { echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6; } ;; - xno) - { echo "$as_me:$LINENO: result: unsupported" >&5 -echo "${ECHO_T}unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -echo "${ECHO_T}$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 - -depcc="$CC" am_compiler_list= - -{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - case $depmode in - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - none) break ;; - esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. - if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 -echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - - -# C++ compiler. Note that unlike AC_PROG_CC, this call does not trigger an -# error if no C++ compiler was found; it'll just set the variable CXX to 'g++'. -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC - 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_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # 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_CXX="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - { echo "$as_me:$LINENO: result: $CXX" >&5 -echo "${ECHO_T}$CXX" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$CXX" && break - done -fi -if test -z "$CXX"; then - ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC -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_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # 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_CXX="$ac_prog" - 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_CXX=$ac_cv_prog_ac_ct_CXX -if test -n "$ac_ct_CXX"; then - { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 -echo "${ECHO_T}$ac_ct_CXX" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$ac_ct_CXX" && break -done - - if test "x$ac_ct_CXX" = x; then - CXX="g++" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CXX=$ac_ct_CXX - fi -fi - - fi -fi -# Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C++ compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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_cxx_compiler_gnu+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. */ - -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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_compiler_gnu=yes -else - 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_cxx_compiler_gnu=$ac_compiler_gnu - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } -GXX=`test $ac_compiler_gnu = yes && echo yes` -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 -echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cxx_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CXXFLAGS="" - 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cxx_g=yes -else - 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_cxx_werror_flag=$ac_save_cxx_werror_flag -fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -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 - -depcc="$CXX" am_compiler_list= - -{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } -if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CXX_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - case $depmode in - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - none) break ;; - esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. - if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CXX_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CXX_dependencies_compiler_type=none -fi - -fi -{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 -echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } -CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then - am__fastdepCXX_TRUE= - am__fastdepCXX_FALSE='#' -else - am__fastdepCXX_TRUE='#' - am__fastdepCXX_FALSE= -fi - - - -# This allows features like per-target compiler flags. I.e., you can compile -# one copy of the same sources twice with different flags. (See lib/guestApp -# for an example.) -if test "x$CC" != xcc; then - { echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 -echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6; } -else - { echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5 -echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6; } -fi -set dummy $CC; ac_cc=`echo $2 | - sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_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. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -# Make sure it works both with $CC and with simple cc. -# We do the test twice because some compilers refuse to overwrite an -# existing .o file with -o, though they will create one. -ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' -rm -f conftest2.* -if { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - test -f conftest2.$ac_objext && { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; -then - eval ac_cv_prog_cc_${ac_cc}_c_o=yes - if test "x$CC" != xcc; then - # Test first that cc exists at all. - if { ac_try='cc -c conftest.$ac_ext >&5' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' - rm -f conftest2.* - if { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - test -f conftest2.$ac_objext && { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; - then - # cc works too. - : - else - # cc exists but doesn't like -o. - eval ac_cv_prog_cc_${ac_cc}_c_o=no - fi - fi - fi -else - eval ac_cv_prog_cc_${ac_cc}_c_o=no -fi -rm -f core conftest* - -fi -if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define NO_MINUS_C_MINUS_O 1 -_ACEOF - -fi - -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi - - - -# Needed for the various install and uninstall hooks. -# 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 { 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 - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - done - done - ;; -esac -done -IFS=$as_save_IFS - - -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 -{ echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$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' - -{ echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 -echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; } -if test "${ac_cv_path_SED+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" | sed 99q >conftest.sed - $as_unset ac_script || ac_script= - # Extract the first word of "sed gsed" to use in msg output -if test -z "$SED"; then -set dummy sed gsed; ac_prog_name=$2 -if test "${ac_cv_path_SED+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_path_SED_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 -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue - # Check for GNU ac_path_SED and select it if it is found. - # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -*) - ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - echo '' >> "conftest.nl" - "$ac_path_SED" -f conftest.sed < "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_SED_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_SED="$ac_path_SED" - ac_path_SED_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_SED_found && break 3 - done -done - -done -IFS=$as_save_IFS - - -fi - -SED="$ac_cv_path_SED" -if test -z "$SED"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in \$PATH" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in \$PATH" >&2;} - { (exit 1); exit 1; }; } -fi - -else - ac_cv_path_SED=$SED -fi - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5 -echo "${ECHO_T}$ac_cv_path_SED" >&6; } - SED="$ac_cv_path_SED" - rm -f conftest.sed - -{ echo "$as_me:$LINENO: checking whether ln -s works" >&5 -echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } -else - { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 -echo "${ECHO_T}no, using $LN_S" >&6; } -fi - -{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 -echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } -if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done -done -IFS=$as_save_IFS - -fi - - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P 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. - test -d ./--version && rmdir ./--version - MKDIR_P="$ac_install_sh -d" - fi -fi -{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5 -echo "${ECHO_T}$MKDIR_P" >&6; } - - -# Needed for creating the archives in lib/ and the shared libraries. -case `pwd` in - *\ * | *\ *) - { echo "$as_me:$LINENO: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; -esac - - - -macro_version='2.2' -macro_revision='1.2599' - - - - - - - - - - - - - -ltmain="$ac_aux_dir/ltmain.sh" - -{ echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 -echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; } -if test "${ac_cv_path_SED+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" | sed 99q >conftest.sed - $as_unset ac_script || ac_script= - # Extract the first word of "sed gsed" to use in msg output -if test -z "$SED"; then -set dummy sed gsed; ac_prog_name=$2 -if test "${ac_cv_path_SED+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_path_SED_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 -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue - # Check for GNU ac_path_SED and select it if it is found. - # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -*) - ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - echo '' >> "conftest.nl" - "$ac_path_SED" -f conftest.sed < "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_SED_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_SED="$ac_path_SED" - ac_path_SED_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_SED_found && break 3 - done -done - -done -IFS=$as_save_IFS - - -fi - -SED="$ac_cv_path_SED" -if test -z "$SED"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in \$PATH" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in \$PATH" >&2;} - { (exit 1); exit 1; }; } -fi - -else - ac_cv_path_SED=$SED -fi - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5 -echo "${ECHO_T}$ac_cv_path_SED" >&6; } - SED="$ac_cv_path_SED" - rm -f conftest.sed - -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" - - - - - - - - - - - -{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 -echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Extract the first word of "grep ggrep" to use in msg output -if test -z "$GREP"; then -set dummy grep ggrep; ac_prog_name=$2 -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - 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 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - 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 - - -fi - -GREP="$ac_cv_path_GREP" -if test -z "$GREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } -fi - -else - ac_cv_path_GREP=$GREP -fi - - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 -echo "${ECHO_T}$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - # Extract the first word of "egrep" to use in msg output -if test -z "$EGREP"; then -set dummy egrep; ac_prog_name=$2 -if test "${ac_cv_path_EGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - 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 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - 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 - - -fi - -EGREP="$ac_cv_path_EGREP" -if test -z "$EGREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name 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_path_EGREP" >&5 -echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ echo "$as_me:$LINENO: checking for fgrep" >&5 -echo $ECHO_N "checking for fgrep... $ECHO_C" >&6; } -if test "${ac_cv_path_FGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 - then ac_cv_path_FGREP="$GREP -F" - else - # Extract the first word of "fgrep" to use in msg output -if test -z "$FGREP"; then -set dummy fgrep; ac_prog_name=$2 -if test "${ac_cv_path_FGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_path_FGREP_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 fgrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue - # Check for GNU ac_path_FGREP and select it if it is found. - # Check for GNU $ac_path_FGREP -case `"$ac_path_FGREP" --version 2>&1` in -*GNU*) - ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; -*) - ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - echo 'FGREP' >> "conftest.nl" - "$ac_path_FGREP" FGREP < "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_FGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_FGREP="$ac_path_FGREP" - ac_path_FGREP_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_FGREP_found && break 3 - done -done - -done -IFS=$as_save_IFS - - -fi - -FGREP="$ac_cv_path_FGREP" -if test -z "$FGREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } -fi - -else - ac_cv_path_FGREP=$FGREP -fi - - - fi -fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_FGREP" >&5 -echo "${ECHO_T}$ac_cv_path_FGREP" >&6; } - FGREP="$ac_cv_path_FGREP" - - -test -z "$GREP" && GREP=grep - - - - - - - - - - - - - - - - - - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 -echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { echo "$as_me:$LINENO: checking for GNU ld" >&5 -echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } -else - { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 -echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } -fi -if test "${lt_cv_path_LD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -echo "${ECHO_T}$LD" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi -test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 -echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} - { (exit 1); exit 1; }; } -{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 -echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - - - -{ echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5 -echo $ECHO_N "checking for BSD- or MS-compatible name lister (nm)... $ECHO_C" >&6; } -if test "${lt_cv_path_NM+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi -fi -{ echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 -echo "${ECHO_T}$lt_cv_path_NM" >&6; } -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$ac_tool_prefix"; then - for ac_prog in "dumpbin -symbols" "link -dump -symbols" - 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_DUMPBIN+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$DUMPBIN"; then - ac_cv_prog_DUMPBIN="$DUMPBIN" # 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_DUMPBIN="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -DUMPBIN=$ac_cv_prog_DUMPBIN -if test -n "$DUMPBIN"; then - { echo "$as_me:$LINENO: result: $DUMPBIN" >&5 -echo "${ECHO_T}$DUMPBIN" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$DUMPBIN" && break - done -fi -if test -z "$DUMPBIN"; then - ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in "dumpbin -symbols" "link -dump -symbols" -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_DUMPBIN+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_DUMPBIN"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # 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_DUMPBIN="$ac_prog" - 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_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN -if test -n "$ac_ct_DUMPBIN"; then - { echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5 -echo "${ECHO_T}$ac_ct_DUMPBIN" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$ac_ct_DUMPBIN" && break -done - - if test "x$ac_ct_DUMPBIN" = x; then - DUMPBIN=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - DUMPBIN=$ac_ct_DUMPBIN - fi -fi - - - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm - - - - - - -{ echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5 -echo $ECHO_N "checking the name lister ($NM) interface... $ECHO_C" >&6; } -if test "${lt_cv_nm_interface+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:6523: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 - (eval echo "\"\$as_me:6526: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 - (eval echo "\"\$as_me:6529: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest* -fi -{ echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5 -echo "${ECHO_T}$lt_cv_nm_interface" >&6; } - -# find the maximum length of command line arguments -{ echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 -echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; } -if test "${lt_cv_sys_max_cmd_len+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ - = "XX$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac - -fi - -if test -n $lt_cv_sys_max_cmd_len ; then - { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 -echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; } -else - { echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6; } -fi -max_cmd_len=$lt_cv_sys_max_cmd_len - - - - - - - -: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} - -{ echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5 -echo $ECHO_N "checking whether the shell understands some XSI constructs... $ECHO_C" >&6; } -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, ) >/dev/null 2>&1 \ - && xsi_shell=yes -{ echo "$as_me:$LINENO: result: $xsi_shell" >&5 -echo "${ECHO_T}$xsi_shell" >&6; } - - -{ echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5 -echo $ECHO_N "checking whether the shell understands \"+=\"... $ECHO_C" >&6; } -lt_shell_append=no -( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -{ echo "$as_me:$LINENO: result: $lt_shell_append" >&5 -echo "${ECHO_T}$lt_shell_append" >&6; } - - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi - - - - - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac - - - - - - - - - -{ echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 -echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; } -if test "${lt_cv_ld_reload_flag+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_ld_reload_flag='-r' -fi -{ echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 -echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6; } -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac - - - - - - - - - - -{ echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 -echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6; } -if test "${lt_cv_deplibs_check_method+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. - -case $host_os in -aix[4-9]*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[45]*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[3-9]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 -echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6; } -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; 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_AR+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # 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_AR="${ac_tool_prefix}ar" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_AR"; then - ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; 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_AR+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # 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_AR="ar" - 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_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 -echo "${ECHO_T}$ac_ct_AR" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -else - AR="$ac_cv_prog_AR" -fi - -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru - - - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; 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_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # 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_STRIP="${ac_tool_prefix}strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { echo "$as_me:$LINENO: result: $STRIP" >&5 -echo "${ECHO_T}$STRIP" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; 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_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # 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_STRIP="strip" - 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_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -echo "${ECHO_T}$ac_ct_STRIP" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -test -z "$STRIP" && STRIP=: - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; 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_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # 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_RANLIB="${ac_tool_prefix}ranlib" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; 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_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # 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_RANLIB="ranlib" - 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_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -test -z "$RANLIB" && RANLIB=: - - - - - - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# Check for command to grab the raw symbol name followed by C symbol from nm. -{ echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 -echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; } -if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | pw32*) - symcode='[ABCDGISTW]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[ABCDEGRST]' - fi - ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' - ;; -osf*) - symcode='[BCDEGQRST]' - ;; -solaris*) - symcode='[BDRT]' - ;; -sco3.2v5*) - symcode='[DT]' - ;; -sysv4.2uw2*) - symcode='[DT]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[ABDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK '"\ -" {last_section=section; section=\$ 3};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Now try to grab the symbols. - nlist=conftest.nm - if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 - (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - 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); } && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done - -fi - -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { echo "$as_me:$LINENO: result: failed" >&5 -echo "${ECHO_T}failed" >&6; } -else - { echo "$as_me:$LINENO: result: ok" >&5 -echo "${ECHO_T}ok" >&6; } -fi - - - - - - - - - - - - - - - - - - - - - - - -# Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then - enableval=$enable_libtool_lock; -fi - -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '#line 7628 "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - { echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 -echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6; } -if test "${lt_cv_cc_needs_belf+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - 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 - - 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 conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - lt_cv_cc_needs_belf=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - lt_cv_cc_needs_belf=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext 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 - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 -echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6; } - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" - - - case $host_os in - rhapsody* | darwin*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. -set dummy ${ac_tool_prefix}dsymutil; 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_DSYMUTIL+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$DSYMUTIL"; then - ac_cv_prog_DSYMUTIL="$DSYMUTIL" # 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_DSYMUTIL="${ac_tool_prefix}dsymutil" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -DSYMUTIL=$ac_cv_prog_DSYMUTIL -if test -n "$DSYMUTIL"; then - { echo "$as_me:$LINENO: result: $DSYMUTIL" >&5 -echo "${ECHO_T}$DSYMUTIL" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DSYMUTIL"; then - ac_ct_DSYMUTIL=$DSYMUTIL - # Extract the first word of "dsymutil", so it can be a program name with args. -set dummy dsymutil; 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_DSYMUTIL+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_DSYMUTIL"; then - ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # 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_DSYMUTIL="dsymutil" - 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_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL -if test -n "$ac_ct_DSYMUTIL"; then - { echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5 -echo "${ECHO_T}$ac_ct_DSYMUTIL" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_DSYMUTIL" = x; then - DSYMUTIL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - DSYMUTIL=$ac_ct_DSYMUTIL - fi -else - DSYMUTIL="$ac_cv_prog_DSYMUTIL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. -set dummy ${ac_tool_prefix}nmedit; 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_NMEDIT+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$NMEDIT"; then - ac_cv_prog_NMEDIT="$NMEDIT" # 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_NMEDIT="${ac_tool_prefix}nmedit" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -NMEDIT=$ac_cv_prog_NMEDIT -if test -n "$NMEDIT"; then - { echo "$as_me:$LINENO: result: $NMEDIT" >&5 -echo "${ECHO_T}$NMEDIT" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_NMEDIT"; then - ac_ct_NMEDIT=$NMEDIT - # Extract the first word of "nmedit", so it can be a program name with args. -set dummy nmedit; 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_NMEDIT+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_NMEDIT"; then - ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # 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_NMEDIT="nmedit" - 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_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT -if test -n "$ac_ct_NMEDIT"; then - { echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5 -echo "${ECHO_T}$ac_ct_NMEDIT" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_NMEDIT" = x; then - NMEDIT=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - NMEDIT=$ac_ct_NMEDIT - fi -else - NMEDIT="$ac_cv_prog_NMEDIT" -fi - - - - - - - - - - - - - { echo "$as_me:$LINENO: checking for -single_module linker flag" >&5 -echo $ECHO_N "checking for -single_module linker flag... $ECHO_C" >&6; } -if test "${lt_cv_apple_cc_single_mod+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - echo "int foo(void){return 1;}" > conftest.c - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib ${wl}-single_module conftest.c - if test -f libconftest.dylib; then - lt_cv_apple_cc_single_mod=yes - rm -rf libconftest.dylib* - fi - rm conftest.c - fi -fi -{ echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5 -echo "${ECHO_T}$lt_cv_apple_cc_single_mod" >&6; } - { echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5 -echo $ECHO_N "checking for -exported_symbols_list linker flag... $ECHO_C" >&6; } -if test "${lt_cv_ld_exported_symbols_list+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - 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 conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - lt_cv_ld_exported_symbols_list=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - lt_cv_ld_exported_symbols_list=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5 -echo "${ECHO_T}$lt_cv_ld_exported_symbols_list" >&6; } - case $host_os in - rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[012]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac - - -{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } -if test "${ac_cv_header_stdc+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. */ -#include -#include -#include -#include - -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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_stdc=no -fi - -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. - 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 (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - 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 (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then - : -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -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)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - 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 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_header_stdc=no -fi -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; } -if test $ac_cv_header_stdc = yes; then - -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. - - - - - - - - - -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 { as_var=$as_ac_Header; eval "test \"\${$as_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. */ -$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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&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 - - - -for ac_header in dlfcn.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 { as_var=$as_ac_Header; eval "test \"\${$as_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. */ -$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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&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 - - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC - 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_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # 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_CXX="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - { echo "$as_me:$LINENO: result: $CXX" >&5 -echo "${ECHO_T}$CXX" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$CXX" && break - done -fi -if test -z "$CXX"; then - ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC -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_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # 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_CXX="$ac_prog" - 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_CXX=$ac_cv_prog_ac_ct_CXX -if test -n "$ac_ct_CXX"; then - { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 -echo "${ECHO_T}$ac_ct_CXX" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$ac_ct_CXX" && break -done - - if test "x$ac_ct_CXX" = x; then - CXX="g++" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CXX=$ac_ct_CXX - fi -fi - - fi -fi -# Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C++ compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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_cxx_compiler_gnu+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. */ - -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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_compiler_gnu=yes -else - 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_cxx_compiler_gnu=$ac_compiler_gnu - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } -GXX=`test $ac_compiler_gnu = yes && echo yes` -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 -echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cxx_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CXXFLAGS="" - 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cxx_g=yes -else - 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_cxx_werror_flag=$ac_save_cxx_werror_flag -fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -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 - -depcc="$CXX" am_compiler_list= - -{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } -if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CXX_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - case $depmode in - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - none) break ;; - esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. - if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CXX_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CXX_dependencies_compiler_type=none -fi - -fi -{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 -echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } -CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then - am__fastdepCXX_TRUE= - am__fastdepCXX_FALSE='#' -else - am__fastdepCXX_TRUE='#' - am__fastdepCXX_FALSE= -fi - - -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_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; } -if test -z "$CXXCPP"; then - if test "${ac_cv_prog_CXXCPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Double quotes because CXXCPP needs to be expanded - for CXXCPP in "$CXX -E" "/lib/cpp" - do - ac_preproc_ok=false -for ac_cxx_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 "echo \"\$as_me:$LINENO: $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 && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - : -else - 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 "echo \"\$as_me:$LINENO: $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 && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - 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_CXXCPP=$CXXCPP - -fi - CXXCPP=$ac_cv_prog_CXXCPP -else - ac_cv_prog_CXXCPP=$CXXCPP -fi -{ echo "$as_me:$LINENO: result: $CXXCPP" >&5 -echo "${ECHO_T}$CXXCPP" >&6; } -ac_preproc_ok=false -for ac_cxx_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 "echo \"\$as_me:$LINENO: $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 && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - : -else - 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 "echo \"\$as_me:$LINENO: $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 && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - 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 - _lt_caught_CXX_error=yes -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 - -else - _lt_caught_CXX_error=yes -fi - - - - - -# Set options - - - - enable_dlopen=no - - - enable_win32_dll=no - - - # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_shared=yes -fi - - - - - - - - - - # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_static=yes -fi - - - - - - - - - - -# Check whether --with-pic was given. -if test "${with_pic+set}" = set; then - withval=$with_pic; pic_mode="$withval" -else - pic_mode=default -fi - - -test -z "$pic_mode" && pic_mode=default - - - - - - - - # Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then - enableval=$enable_fast_install; p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_fast_install=yes -fi - - - - - - - - - - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - - - - - - - - - - - - - - - - - - - - - - - - - -test -z "$LN_S" && LN_S="ln -s" - - - - - - - - - - - - - - -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -{ echo "$as_me:$LINENO: checking for objdir" >&5 -echo $ECHO_N "checking for objdir... $ECHO_C" >&6; } -if test "${lt_cv_objdir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null -fi -{ echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 -echo "${ECHO_T}$lt_cv_objdir" >&6; } -objdir=$lt_cv_objdir - - - - - -cat >>confdefs.h <<_ACEOF -#define LT_OBJDIR "$lt_cv_objdir/" -_ACEOF - - - - - - - - - - - - - - - - - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 -echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/${ac_tool_prefix}file; then - lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 -echo "${ECHO_T}$MAGIC_CMD" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - - - -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - { echo "$as_me:$LINENO: checking for file" >&5 -echo $ECHO_N "checking for file... $ECHO_C" >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/file; then - lt_cv_path_MAGIC_CMD="$ac_dir/file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 -echo "${ECHO_T}$MAGIC_CMD" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - else - MAGIC_CMD=: - fi -fi - - fi - ;; -esac - -# Use C for the default configuration in the libtool script - -lt_save_CC="$CC" -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 - - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -objext=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - -lt_prog_compiler_no_builtin_flag= - -if test "$GCC" = yes; then - lt_prog_compiler_no_builtin_flag=' -fno-builtin' - - { echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9645: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:9649: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $RM conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } - -if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then - lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" -else - : -fi - -fi - - - - - - - lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= - -{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } - - if test "$GCC" = yes; then - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_static='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - fi - ;; - - amigaos*) - if test "$host_cpu" = m68k; then - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' - fi - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - ;; - - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic - fi - ;; - - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - icc* | ecc* | ifort*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - xl*) - # IBM XL C 8.0/Fortran 10.1 on PPC - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-qpic' - lt_prog_compiler_static='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' - ;; - esac - ;; - esac - ;; - - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; - - uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared=no - ;; - esac - fi - -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; -esac -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic" >&6; } - - - - - - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic"; then - { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_pic_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9963: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:9967: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works=yes - fi - fi - $RM conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_pic_works" >&6; } - -if test x"$lt_cv_prog_compiler_pic_works" = xyes; then - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; - esac -else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no -fi - -fi - - - - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_static_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_static_works=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works=yes - fi - else - lt_cv_prog_compiler_static_works=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_static_works" >&6; } - -if test x"$lt_cv_prog_compiler_static_works" = xyes; then - : -else - lt_prog_compiler_static= -fi - - - - - - - - { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:10068: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:10072: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6; } - - - - - - - { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:10123: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:10127: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6; } - - - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6; } - if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - - - - - - - { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } - - runpath_var= - allow_undefined_flag= - always_export_symbols=no - archive_cmds= - archive_expsym_cmds= - compiler_needs_object=no - enable_shared_with_static_runtimes=no - export_dynamic_flag_spec= - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - hardcode_automatic=no - hardcode_direct=no - hardcode_direct_absolute=no - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld= - hardcode_libdir_separator= - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - inherit_rpath=no - link_all_deplibs=unknown - module_cmds= - module_expsym_cmds= - old_archive_from_new_cmds= - old_archive_from_expsyms_cmds= - thread_safe_flag_spec= - whole_archive_flag_spec= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - ld_shlibs=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -_LT_EOF - fi - ;; - - amigaos*) - if test "$host_cpu" = m68k; then - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - fi - - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - ld_shlibs=no - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; - - cygwin* | mingw* | pw32*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs=no - fi - ;; - - interix[3-9]*) - hardcode_direct=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag= - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - compiler_needs_object=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - xlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld='-rpath $libdir' - archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - ld_shlibs=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - - if test "$ld_shlibs" = no; then - runpath_var= - hardcode_libdir_flag_spec= - export_dynamic_flag_spec= - whole_archive_flag_spec= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix[4-9]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds='' - hardcode_direct=yes - hardcode_direct_absolute=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - file_list_spec='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - 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 conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - 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 conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag=' ${wl}-bernotok' - allow_undefined_flag=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' - archive_cmds_need_lc=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - if test "$host_cpu" = m68k; then - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - fi - # see comment about different semantics on the GNU ld section - ld_shlibs=no - ;; - - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic - ;; - - cygwin* | mingw* | pw32*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes=yes - ;; - - darwin* | rhapsody*) - - - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - whole_archive_flag_spec='' - link_all_deplibs=yes - allow_undefined_flag="$_lt_dar_allow_undefined" - if test "$GCC" = "yes"; then - output_verbose_link_cmd=echo - archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - - else - ld_shlibs=no - fi - - ;; - - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - freebsd1*) - ld_shlibs=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - hpux9*) - if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - export_dynamic_flag_spec='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_flag_spec_ld='+b $libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat >conftest.$ac_ext <<_ACEOF -int foo(void) {} -_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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - inherit_rpath=yes - link_all_deplibs=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - newsos6) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_shlibpath_var=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - hardcode_shlibpath_var=no - hardcode_direct_absolute=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-R$libdir' - ;; - *) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - archive_cmds_need_lc='no' - hardcode_libdir_separator=: - ;; - - solaris*) - no_undefined_flag=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds='$CC -r -o $output$reload_objs' - hardcode_direct=no - ;; - motorola) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='${wl}-z,text' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag='${wl}-z,text' - allow_undefined_flag='${wl}-z,nodefs' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-R,$libdir' - hardcode_libdir_separator=':' - link_all_deplibs=yes - export_dynamic_flag_spec='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - *) - ld_shlibs=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec='${wl}-Blargedynsym' - ;; - esac - fi - fi - -{ echo "$as_me:$LINENO: result: $ld_shlibs" >&5 -echo "${ECHO_T}$ld_shlibs" >&6; } -test "$ld_shlibs" = no && can_build_shared=no - -with_gnu_ld=$with_gnu_ld - - - - - - - - - - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc=no - else - archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - { echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 -echo "${ECHO_T}$archive_cmds_need_lc" >&6; } - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } - -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[lt_foo]++; } - if (lt_freq[lt_foo] == 1) { print lt_foo; } -}'` - sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[4-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - if test "$host_cpu" = m68k; then - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - else - dynamic_linker=no - fi - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[3-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - 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 conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then - shlibpath_overrides_runpath=yes -fi - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux - need_lib_prefix=no - need_version=no - library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || - test -n "$runpath_var" || - test "X$hardcode_automatic" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$hardcode_direct" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && - test "$hardcode_minus_L" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -{ echo "$as_me:$LINENO: result: $hardcode_action" >&5 -echo "${ECHO_T}$hardcode_action" >&6; } - -if test "$hardcode_action" = relink || - test "$inherit_rpath" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $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 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 -char dlopen (); -int -main () -{ -return dlopen (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_dl_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dl_dlopen=no -fi - -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_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } -if test $ac_cv_lib_dl_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - -fi - - ;; - - *) - { echo "$as_me:$LINENO: checking for shl_load" >&5 -echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; } -if test "${ac_cv_func_shl_load+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 shl_load to an innocuous variant, in case declares shl_load. - For example, HP-UX 11i declares gettimeofday. */ -#define shl_load innocuous_shl_load - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char shl_load (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef shl_load - -/* 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 -char shl_load (); -/* 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_shl_load || defined __stub___shl_load -choke me -#endif - -int -main () -{ -return shl_load (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_shl_load=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_shl_load=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 -echo "${ECHO_T}$ac_cv_func_shl_load" >&6; } -if test $ac_cv_func_shl_load = yes; then - lt_cv_dlopen="shl_load" -else - { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } -if test "${ac_cv_lib_dld_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $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 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 -char shl_load (); -int -main () -{ -return shl_load (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_dld_shl_load=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dld_shl_load=no -fi - -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_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } -if test $ac_cv_lib_dld_shl_load = yes; then - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" -else - { echo "$as_me:$LINENO: checking for dlopen" >&5 -echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; } -if test "${ac_cv_func_dlopen+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 dlopen to an innocuous variant, in case declares dlopen. - For example, HP-UX 11i declares gettimeofday. */ -#define dlopen innocuous_dlopen - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char dlopen (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef dlopen - -/* 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 -char dlopen (); -/* 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_dlopen || defined __stub___dlopen -choke me -#endif - -int -main () -{ -return dlopen (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_dlopen=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 -echo "${ECHO_T}$ac_cv_func_dlopen" >&6; } -if test $ac_cv_func_dlopen = yes; then - lt_cv_dlopen="dlopen" -else - { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $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 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 -char dlopen (); -int -main () -{ -return dlopen (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_dl_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dl_dlopen=no -fi - -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_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } -if test $ac_cv_lib_dl_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 -echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; } -if test "${ac_cv_lib_svld_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $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 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 -char dlopen (); -int -main () -{ -return dlopen (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_svld_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_svld_dlopen=no -fi - -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_svld_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; } -if test $ac_cv_lib_svld_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -else - { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 -echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; } -if test "${ac_cv_lib_dld_dld_link+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $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 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 -char dld_link (); -int -main () -{ -return dld_link (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_dld_dld_link=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dld_dld_link=no -fi - -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_dld_dld_link" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; } -if test $ac_cv_lib_dld_dld_link = yes; then - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" -fi - - -fi - - -fi - - -fi - - -fi - - -fi - - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 -echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; } -if test "${lt_cv_dlopen_self+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line 12862 "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -#ifdef __cplusplus -extern "C" void exit (int); -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - exit (status); -} -_LT_EOF - 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); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* - - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 -echo "${ECHO_T}$lt_cv_dlopen_self" >&6; } - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 -echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; } -if test "${lt_cv_dlopen_self_static+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line 12962 "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -#ifdef __cplusplus -extern "C" void exit (int); -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - exit (status); -} -_LT_EOF - 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); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* - - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 -echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6; } - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - - - - - - - - - - - - - - - - - -striplib= -old_striplib= -{ echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 -echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - ;; - *) - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - ;; - esac -fi - - - - - - - - - - - - - # Report which library types will actually be built - { echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 -echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } - { echo "$as_me:$LINENO: result: $can_build_shared" >&5 -echo "${ECHO_T}$can_build_shared" >&6; } - - { echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 -echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[4-9]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - { echo "$as_me:$LINENO: result: $enable_shared" >&5 -echo "${ECHO_T}$enable_shared" >&6; } - - { echo "$as_me:$LINENO: checking whether to build static libraries" >&5 -echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - { echo "$as_me:$LINENO: result: $enable_static" >&5 -echo "${ECHO_T}$enable_static" >&6; } - - - - -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 - -CC="$lt_save_CC" - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -archive_cmds_need_lc_CXX=no -allow_undefined_flag_CXX= -always_export_symbols_CXX=no -archive_expsym_cmds_CXX= -compiler_needs_object_CXX=no -export_dynamic_flag_spec_CXX= -hardcode_direct_CXX=no -hardcode_direct_absolute_CXX=no -hardcode_libdir_flag_spec_CXX= -hardcode_libdir_flag_spec_ld_CXX= -hardcode_libdir_separator_CXX= -hardcode_minus_L_CXX=no -hardcode_shlibpath_var_CXX=unsupported -hardcode_automatic_CXX=no -inherit_rpath_CXX=no -module_cmds_CXX= -module_expsym_cmds_CXX= -link_all_deplibs_CXX=unknown -old_archive_cmds_CXX=$old_archive_cmds -no_undefined_flag_CXX= -whole_archive_flag_spec_CXX= -enable_shared_with_static_runtimes_CXX=no - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -objext_CXX=$objext - -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_caught_CXX_error" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[]) { return(0); }' - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - - # save warnings/boilerplate of simple test code - ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* - - ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - $as_unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - compiler=$CC - compiler_CXX=$CC - for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test "$GXX" = yes; then - lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' - else - lt_prog_compiler_no_builtin_flag_CXX= - fi - - if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 -echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { echo "$as_me:$LINENO: checking for GNU ld" >&5 -echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } -else - { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 -echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } -fi -if test "${lt_cv_path_LD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -echo "${ECHO_T}$LD" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi -test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 -echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} - { (exit 1); exit 1; }; } -{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 -echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_CXX= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - - else - GXX=no - with_gnu_ld=no - wlarc= - fi - - # PORTME: fill in a description of your system's C++ link characteristics - { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } - ld_shlibs_CXX=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aix[4-9]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds_CXX='' - hardcode_direct_CXX=yes - hardcode_direct_absolute_CXX=yes - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - file_list_spec_CXX='${wl}-f,' - - if test "$GXX" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct_CXX=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_CXX=yes - hardcode_libdir_flag_spec_CXX='-L$libdir' - hardcode_libdir_separator_CXX= - fi - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - always_export_symbols_CXX=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag_CXX='-berok' - # Determine the default libpath from the value encoded in an empty - # executable. - 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 conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" - - archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_CXX="-z nodefs" - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - 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 conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag_CXX=' ${wl}-bernotok' - allow_undefined_flag_CXX=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_CXX='$convenience' - archive_cmds_need_lc_CXX=yes - # This is similar to how AIX traditionally builds its shared - # libraries. - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_CXX=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs_CXX=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - cygwin* | mingw* | pw32*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_CXX='-L$libdir' - allow_undefined_flag_CXX=unsupported - always_export_symbols_CXX=no - enable_shared_with_static_runtimes_CXX=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_CXX=no - fi - ;; - darwin* | rhapsody*) - - - archive_cmds_need_lc_CXX=no - hardcode_direct_CXX=no - hardcode_automatic_CXX=yes - hardcode_shlibpath_var_CXX=unsupported - whole_archive_flag_spec_CXX='' - link_all_deplibs_CXX=yes - allow_undefined_flag_CXX="$_lt_dar_allow_undefined" - if test "$GCC" = "yes"; then - output_verbose_link_cmd=echo - archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - if test "$lt_cv_apple_cc_single_mod" != "yes"; then - archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" - fi - - else - ld_shlibs_CXX=no - fi - - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - freebsd[12]*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - ld_shlibs_CXX=no - ;; - - freebsd-elf*) - archive_cmds_need_lc_CXX=no - ;; - - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - ld_shlibs_CXX=yes - ;; - - gnu*) - ;; - - hpux9*) - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_CXX=: - export_dynamic_flag_spec_CXX='${wl}-E' - hardcode_direct_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC*) - archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes; then - archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_CXX=: - - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - export_dynamic_flag_spec_CXX='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - ;; - *) - hardcode_direct_CXX=yes - hardcode_direct_absolute_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - - interix[3-9]*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' - fi - fi - link_all_deplibs_CXX=yes - ;; - esac - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - inherit_rpath_CXX=yes - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - archive_cmds_need_lc_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *pgCC\ [1-5]* | *pgcpp\ [1-5]*) - prelink_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' - old_archive_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ - $RANLIB $oldlib' - archive_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - archive_expsym_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - *) # Version 6 will use weak symbols - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - esac - - hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - xl*) - # IBM XL 8.0 on PPC, with GNU ld - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' - hardcode_libdir_flag_spec_CXX='-R$libdir' - whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - compiler_needs_object_CXX=yes - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - - lynxos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - m88k*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - - *nto* | *qnx*) - ld_shlibs_CXX=yes - ;; - - openbsd2*) - # C++ shared libraries are fairly broken - ld_shlibs_CXX=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - hardcode_direct_absolute_CXX=yes - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - export_dynamic_flag_spec_CXX='${wl}-E' - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd=echo - else - ld_shlibs_CXX=no - fi - ;; - - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - hardcode_libdir_separator_CXX=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - cxx*) - case $host in - osf3*) - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - ;; - *) - allow_undefined_flag_CXX=' -expect_unresolved \*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ - $RM $lib.exp' - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - ;; - esac - - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - case $host in - osf3*) - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - *) - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - esac - - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - - psos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - archive_cmds_need_lc_CXX=yes - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_shlibpath_var_CXX=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' - ;; - esac - link_all_deplibs_CXX=yes - - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - no_undefined_flag_CXX=' ${wl}-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - fi - - hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_CXX='${wl}-z,text' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag_CXX='${wl}-z,text' - allow_undefined_flag_CXX='${wl}-z,nodefs' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - export_dynamic_flag_spec_CXX='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - vxworks*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - - { echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 -echo "${ECHO_T}$ld_shlibs_CXX" >&6; } - test "$ld_shlibs_CXX" = no && can_build_shared=no - - GCC_CXX="$GXX" - LD_CXX="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - # Dependencies to place before and after the object being linked: -predep_objects_CXX= -postdep_objects_CXX= -predeps_CXX= -postdeps_CXX= -compiler_lib_search_path_CXX= - -cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_LT_EOF - -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case $p in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" || - test $p = "-R"; then - prev=$p - continue - else - prev= - fi - - if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$compiler_lib_search_path_CXX"; then - compiler_lib_search_path_CXX="${prev}${p}" - else - compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$postdeps_CXX"; then - postdeps_CXX="${prev}${p}" - else - postdeps_CXX="${postdeps_CXX} ${prev}${p}" - fi - fi - ;; - - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test "$pre_test_object_deps_done" = no; then - if test -z "$predep_objects_CXX"; then - predep_objects_CXX="$p" - else - predep_objects_CXX="$predep_objects_CXX $p" - fi - else - if test -z "$postdep_objects_CXX"; then - postdep_objects_CXX="$p" - else - postdep_objects_CXX="$postdep_objects_CXX $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling CXX test program" -fi - -$RM -f confest.$objext - -# PORTME: override above test on systems where it is broken -case $host_os in -interix[3-9]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - predep_objects_CXX= - postdep_objects_CXX= - postdeps_CXX= - ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - if test "$solaris_use_stlport4" != yes; then - postdeps_CXX='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - postdeps_CXX='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac - - -case " $postdeps_CXX " in -*" -lc "*) archive_cmds_need_lc_CXX=no ;; -esac - compiler_lib_search_dirs_CXX= -if test -n "${compiler_lib_search_path_CXX}"; then - compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - lt_prog_compiler_wl_CXX= -lt_prog_compiler_pic_CXX= -lt_prog_compiler_static_CXX= - -{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } - - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - fi - ;; - amigaos*) - if test "$host_cpu" = m68k; then - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' - fi - ;; - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic_CXX='-DDLL_EXPORT' - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_CXX='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - lt_prog_compiler_pic_CXX= - ;; - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_CXX=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic_CXX='-fPIC -shared' - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - else - case $host_os in - aix[4-9]*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - else - lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++*) - lt_prog_compiler_pic_CXX='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - lt_prog_compiler_pic_CXX='+Z' - fi - ;; - aCC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_CXX='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - lt_prog_compiler_wl_CXX='--backend -Wl,' - lt_prog_compiler_pic_CXX='-fPIC' - ;; - icpc* | ecpc* ) - # Intel C++ - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-fpic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - xlc* | xlC*) - # IBM XL 8.0 on PPC - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-qpic' - lt_prog_compiler_static_CXX='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - lt_prog_compiler_pic_CXX='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd*) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic_CXX='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - lt_prog_compiler_wl_CXX='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - lt_prog_compiler_pic_CXX='-pic' - ;; - cxx*) - # Digital/Compaq C++ - lt_prog_compiler_wl_CXX='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - lt_prog_compiler_pic_CXX='-pic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - lcc*) - # Lucid - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - lt_prog_compiler_pic_CXX='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - lt_prog_compiler_can_build_shared_CXX=no - ;; - esac - fi - -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_CXX= - ;; - *) - lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" - ;; -esac -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6; } - - - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_CXX"; then - { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_pic_works_CXX=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14957: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:14961: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works_CXX=yes - fi - fi - $RM conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_CXX" >&6; } - -if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then - case $lt_prog_compiler_pic_CXX in - "" | " "*) ;; - *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; - esac -else - lt_prog_compiler_pic_CXX= - lt_prog_compiler_can_build_shared_CXX=no -fi - -fi - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" -{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_static_works_CXX=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works_CXX=yes - fi - else - lt_cv_prog_compiler_static_works_CXX=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_CXX" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_static_works_CXX" >&6; } - -if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then - : -else - lt_prog_compiler_static_CXX= -fi - - - - - { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_c_o_CXX=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15056: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:15060: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_CXX=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6; } - - - - { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_c_o_CXX=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15108: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:15112: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_CXX=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6; } - - - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6; } - if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - - - - { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } - - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - case $host_os in - aix[4-9]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - export_symbols_cmds_CXX="$ltdll_cmds" - ;; - cygwin* | mingw*) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' - ;; - *) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac - exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - -{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 -echo "${ECHO_T}$ld_shlibs_CXX" >&6; } -test "$ld_shlibs_CXX" = no && can_build_shared=no - -with_gnu_ld_CXX=$with_gnu_ld - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_CXX" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_CXX=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds_CXX in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_CXX - pic_flag=$lt_prog_compiler_pic_CXX - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_CXX - allow_undefined_flag_CXX= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc_CXX=no - else - archive_cmds_need_lc_CXX=yes - fi - allow_undefined_flag_CXX=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 -echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6; } - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } - -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[4-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - if test "$host_cpu" = m68k; then - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - else - dynamic_linker=no - fi - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[3-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" - 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 conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then - shlibpath_overrides_runpath=yes -fi - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux - need_lib_prefix=no - need_version=no - library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } -hardcode_action_CXX= -if test -n "$hardcode_libdir_flag_spec_CXX" || - test -n "$runpath_var_CXX" || - test "X$hardcode_automatic_CXX" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$hardcode_direct_CXX" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && - test "$hardcode_minus_L_CXX" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_CXX=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_CXX=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_CXX=unsupported -fi -{ echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 -echo "${ECHO_T}$hardcode_action_CXX" >&6; } - -if test "$hardcode_action_CXX" = relink || - test "$inherit_rpath_CXX" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - - fi # test -n "$compiler" - - CC=$lt_save_CC - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test "$_lt_caught_CXX_error" != yes - -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_commands="$ac_config_commands libtool" - - - - -# Only expand once: - - -if test "$ac_cv_prog_AR" = false; then - { { echo "$as_me:$LINENO: error: The 'ar' utility was not found. Please put ar on the path." >&5 -echo "$as_me: error: The 'ar' utility was not found. Please put ar on the path." >&2;} - { (exit 1); exit 1; }; } -fi - -# We use pkg-config to set up the cflags and libs for gtk. -# 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_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$HAVE_PKG_CONFIG"; then - ac_cv_prog_HAVE_PKG_CONFIG="$HAVE_PKG_CONFIG" # 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_PKG_CONFIG="yes" - 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_PKG_CONFIG" && ac_cv_prog_HAVE_PKG_CONFIG="no" -fi -fi -HAVE_PKG_CONFIG=$ac_cv_prog_HAVE_PKG_CONFIG -if test -n "$HAVE_PKG_CONFIG"; then - { echo "$as_me:$LINENO: result: $HAVE_PKG_CONFIG" >&5 -echo "${ECHO_T}$HAVE_PKG_CONFIG" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - -if test "$GCC" != "yes"; then - { { echo "$as_me:$LINENO: error: Only GCC is currently supported. Please put gcc in the path." >&5 -echo "$as_me: error: Only GCC is currently supported. Please put gcc in the path." >&2;} - { (exit 1); exit 1; }; } -fi - -### -### Libraries -### - -{ echo "$as_me:$LINENO: checking for X" >&5 -echo $ECHO_N "checking for X... $ECHO_C" >&6; } - - -# Check whether --with-x was given. -if test "${with_x+set}" = set; then - withval=$with_x; -fi - -# $have_x is `yes', `no', `disabled', or empty when we do not yet know. -if test "x$with_x" = xno; then - # The user explicitly disabled X. - have_x=disabled -else - case $x_includes,$x_libraries in #( - *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5 -echo "$as_me: error: Cannot use X directory names containing '" >&2;} - { (exit 1); exit 1; }; };; #( - *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # One or both of the vars are not set, and there is no cached value. -ac_x_includes=no ac_x_libraries=no -rm -f -r conftest.dir -if mkdir conftest.dir; then - cd conftest.dir - cat >Imakefile <<'_ACEOF' -incroot: - @echo incroot='${INCROOT}' -usrlibdir: - @echo usrlibdir='${USRLIBDIR}' -libdir: - @echo libdir='${LIBDIR}' -_ACEOF - if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then - # GNU make sometimes prints "make[1]: Entering...", which would confuse us. - for ac_var in incroot usrlibdir libdir; do - eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" - done - # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. - for ac_extension in a so sl; do - if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && - test -f "$ac_im_libdir/libX11.$ac_extension"; then - ac_im_usrlibdir=$ac_im_libdir; break - fi - done - # Screen out bogus values from the imake configuration. They are - # bogus both because they are the default anyway, and because - # using them would break gcc on systems where it needs fixed includes. - case $ac_im_incroot in - /usr/include) ac_x_includes= ;; - *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; - esac - case $ac_im_usrlibdir in - /usr/lib | /lib) ;; - *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; - esac - fi - cd .. - rm -f -r conftest.dir -fi - -# Standard set of common directories for X headers. -# Check X11 before X11Rn because it is often a symlink to the current release. -ac_x_header_dirs=' -/usr/X11/include -/usr/X11R6/include -/usr/X11R5/include -/usr/X11R4/include - -/usr/include/X11 -/usr/include/X11R6 -/usr/include/X11R5 -/usr/include/X11R4 - -/usr/local/X11/include -/usr/local/X11R6/include -/usr/local/X11R5/include -/usr/local/X11R4/include - -/usr/local/include/X11 -/usr/local/include/X11R6 -/usr/local/include/X11R5 -/usr/local/include/X11R4 - -/usr/X386/include -/usr/x386/include -/usr/XFree86/include/X11 - -/usr/include -/usr/local/include -/usr/unsupported/include -/usr/athena/include -/usr/local/x11r5/include -/usr/lpp/Xamples/include - -/usr/openwin/include -/usr/openwin/share/include' - -if test "$ac_x_includes" = no; then - # Guess where to find include files, by looking for Xlib.h. - # First, try using that file with no special directory specified. - 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 "echo \"\$as_me:$LINENO: $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 && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - # We can compile using X headers with no special include directory. -ac_x_includes= -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - for ac_dir in $ac_x_header_dirs; do - if test -r "$ac_dir/X11/Xlib.h"; then - ac_x_includes=$ac_dir - break - fi -done -fi - -rm -f conftest.err conftest.$ac_ext -fi # $ac_x_includes = no - -if test "$ac_x_libraries" = no; then - # Check for the libraries. - # See if we find them without any special options. - # Don't add to $LIBS permanently. - ac_save_LIBS=$LIBS - LIBS="-lX11 $LIBS" - 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 () -{ -XrmInitialize () - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - LIBS=$ac_save_LIBS -# We can link X programs with no special library path. -ac_x_libraries= -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - LIBS=$ac_save_LIBS -for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` -do - # Don't even attempt the hair of trying to link an X program! - for ac_extension in a so sl; do - if test -r "$ac_dir/libX11.$ac_extension"; then - ac_x_libraries=$ac_dir - break 2 - fi - done -done -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi # $ac_x_libraries = no - -case $ac_x_includes,$ac_x_libraries in #( - no,* | *,no | *\'*) - # Didn't find X, or a directory has "'" in its name. - ac_cv_have_x="have_x=no";; #( - *) - # Record where we found X for the cache. - ac_cv_have_x="have_x=yes\ - ac_x_includes='$ac_x_includes'\ - ac_x_libraries='$ac_x_libraries'" -esac -fi -;; #( - *) have_x=yes;; - esac - eval "$ac_cv_have_x" -fi # $with_x != no - -if test "$have_x" != yes; then - { echo "$as_me:$LINENO: result: $have_x" >&5 -echo "${ECHO_T}$have_x" >&6; } - no_x=yes -else - # If each of the values was on the command line, it overrides each guess. - test "x$x_includes" = xNONE && x_includes=$ac_x_includes - test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries - # Update the cache value to reflect the command line values. - ac_cv_have_x="have_x=yes\ - ac_x_includes='$x_includes'\ - ac_x_libraries='$x_libraries'" - { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5 -echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; } -fi - -if test "$no_x" = yes; then - # Not all programs may use this symbol, but it does not hurt to define it. - -cat >>confdefs.h <<\_ACEOF -#define X_DISPLAY_MISSING 1 -_ACEOF - - X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= -else - if test -n "$x_includes"; then - X_CFLAGS="$X_CFLAGS -I$x_includes" - fi - - # It would also be nice to do this for all -L options, not just this one. - if test -n "$x_libraries"; then - X_LIBS="$X_LIBS -L$x_libraries" - # For Solaris; some versions of Sun CC require a space after -R and - # others require no space. Words are not sufficient . . . . - { echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5 -echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6; } - ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" - ac_xsave_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - 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 conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - X_LIBS="$X_LIBS -R$x_libraries" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - LIBS="$ac_xsave_LIBS -R $x_libraries" - 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 conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - X_LIBS="$X_LIBS -R $x_libraries" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { echo "$as_me:$LINENO: result: neither works" >&5 -echo "${ECHO_T}neither works" >&6; } -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - ac_c_werror_flag=$ac_xsave_c_werror_flag - LIBS=$ac_xsave_LIBS - fi - - # Check for system-dependent libraries X programs must link with. - # Do this before checking for the system-independent R6 libraries - # (-lICE), since we may need -lsocket or whatever for X linking. - - if test "$ISC" = yes; then - X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" - else - # Martyn Johnson says this is needed for Ultrix, if the X - # libraries were built with DECnet support. And Karl Berry says - # the Alpha needs dnet_stub (dnet does not exist). - ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* 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 -char XOpenDisplay (); -int -main () -{ -return XOpenDisplay (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5 -echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; } -if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldnet $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 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 -char dnet_ntoa (); -int -main () -{ -return dnet_ntoa (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_dnet_dnet_ntoa=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dnet_dnet_ntoa=no -fi - -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_dnet_dnet_ntoa" >&5 -echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; } -if test $ac_cv_lib_dnet_dnet_ntoa = yes; then - X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" -fi - - if test $ac_cv_lib_dnet_dnet_ntoa = no; then - { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5 -echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6; } -if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldnet_stub $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 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 -char dnet_ntoa (); -int -main () -{ -return dnet_ntoa (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_dnet_stub_dnet_ntoa=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dnet_stub_dnet_ntoa=no -fi - -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_dnet_stub_dnet_ntoa" >&5 -echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } -if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then - X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" -fi - - fi -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$ac_xsave_LIBS" - - # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, - # to get the SysV transport functions. - # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) - # needs -lnsl. - # The nsl library prevents programs from opening the X display - # on Irix 5.2, according to T.E. Dickey. - # The functions gethostbyname, getservbyname, and inet_addr are - # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. - { echo "$as_me:$LINENO: checking for gethostbyname" >&5 -echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; } -if test "${ac_cv_func_gethostbyname+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 gethostbyname to an innocuous variant, in case declares gethostbyname. - For example, HP-UX 11i declares gettimeofday. */ -#define gethostbyname innocuous_gethostbyname - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char gethostbyname (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef gethostbyname - -/* 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 -char gethostbyname (); -/* 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_gethostbyname || defined __stub___gethostbyname -choke me -#endif - -int -main () -{ -return gethostbyname (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_gethostbyname=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_gethostbyname=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; } - - if test $ac_cv_func_gethostbyname = no; then - { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 -echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; } -if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lnsl $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 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 -char gethostbyname (); -int -main () -{ -return gethostbyname (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_nsl_gethostbyname=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_nsl_gethostbyname=no -fi - -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_nsl_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; } -if test $ac_cv_lib_nsl_gethostbyname = yes; then - X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" -fi - - if test $ac_cv_lib_nsl_gethostbyname = no; then - { echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5 -echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6; } -if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lbsd $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 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 -char gethostbyname (); -int -main () -{ -return gethostbyname (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_bsd_gethostbyname=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_bsd_gethostbyname=no -fi - -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_bsd_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6; } -if test $ac_cv_lib_bsd_gethostbyname = yes; then - X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" -fi - - fi - fi - - # lieder@skyler.mavd.honeywell.com says without -lsocket, - # socket/setsockopt and other routines are undefined under SCO ODT - # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary - # on later versions), says Simon Leinen: it contains gethostby* - # variants that don't use the name server (or something). -lsocket - # must be given before -lnsl if both are needed. We assume that - # if connect needs -lnsl, so does gethostbyname. - { echo "$as_me:$LINENO: checking for connect" >&5 -echo $ECHO_N "checking for connect... $ECHO_C" >&6; } -if test "${ac_cv_func_connect+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 connect to an innocuous variant, in case declares connect. - For example, HP-UX 11i declares gettimeofday. */ -#define connect innocuous_connect - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char connect (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef connect - -/* 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 -char connect (); -/* 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_connect || defined __stub___connect -choke me -#endif - -int -main () -{ -return connect (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_connect=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_connect=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 -echo "${ECHO_T}$ac_cv_func_connect" >&6; } - - if test $ac_cv_func_connect = no; then - { echo "$as_me:$LINENO: checking for connect in -lsocket" >&5 -echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6; } -if test "${ac_cv_lib_socket_connect+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsocket $X_EXTRA_LIBS $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 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 -char connect (); -int -main () -{ -return connect (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_socket_connect=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_socket_connect=no -fi - -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_socket_connect" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6; } -if test $ac_cv_lib_socket_connect = yes; then - X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" -fi - - fi - - # Guillermo Gomez says -lposix is necessary on A/UX. - { echo "$as_me:$LINENO: checking for remove" >&5 -echo $ECHO_N "checking for remove... $ECHO_C" >&6; } -if test "${ac_cv_func_remove+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 remove to an innocuous variant, in case declares remove. - For example, HP-UX 11i declares gettimeofday. */ -#define remove innocuous_remove - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char remove (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef remove - -/* 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 -char remove (); -/* 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_remove || defined __stub___remove -choke me -#endif - -int -main () -{ -return remove (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_remove=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_remove=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5 -echo "${ECHO_T}$ac_cv_func_remove" >&6; } - - if test $ac_cv_func_remove = no; then - { echo "$as_me:$LINENO: checking for remove in -lposix" >&5 -echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6; } -if test "${ac_cv_lib_posix_remove+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lposix $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 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 -char remove (); -int -main () -{ -return remove (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_posix_remove=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_posix_remove=no -fi - -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_posix_remove" >&5 -echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6; } -if test $ac_cv_lib_posix_remove = yes; then - X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" -fi - - fi - - # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. - { echo "$as_me:$LINENO: checking for shmat" >&5 -echo $ECHO_N "checking for shmat... $ECHO_C" >&6; } -if test "${ac_cv_func_shmat+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 shmat to an innocuous variant, in case declares shmat. - For example, HP-UX 11i declares gettimeofday. */ -#define shmat innocuous_shmat - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char shmat (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef shmat - -/* 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 -char shmat (); -/* 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_shmat || defined __stub___shmat -choke me -#endif - -int -main () -{ -return shmat (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_shmat=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_shmat=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5 -echo "${ECHO_T}$ac_cv_func_shmat" >&6; } - - if test $ac_cv_func_shmat = no; then - { echo "$as_me:$LINENO: checking for shmat in -lipc" >&5 -echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6; } -if test "${ac_cv_lib_ipc_shmat+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lipc $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 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 -char shmat (); -int -main () -{ -return shmat (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_ipc_shmat=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_ipc_shmat=no -fi - -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_ipc_shmat" >&5 -echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6; } -if test $ac_cv_lib_ipc_shmat = yes; then - X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" -fi - - fi - fi - - # Check for libraries that X11R6 Xt/Xaw programs need. - ac_save_LDFLAGS=$LDFLAGS - test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" - # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to - # check for ICE first), but we must link in the order -lSM -lICE or - # we get undefined symbols. So assume we have SM if we have ICE. - # These have to be linked with before -lX11, unlike the other - # libraries we check for below, so use a different variable. - # John Interrante, Karl Berry - { echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5 -echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6; } -if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lICE $X_EXTRA_LIBS $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 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 -char IceConnectionNumber (); -int -main () -{ -return IceConnectionNumber (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_ICE_IceConnectionNumber=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_ICE_IceConnectionNumber=no -fi - -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_ICE_IceConnectionNumber" >&5 -echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6; } -if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then - X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" -fi - - LDFLAGS=$ac_save_LDFLAGS - -fi - - -# -# Check for libintl.h. When configuring using "--without-x", /usr/local/include -# may not be added to the include path, so code that use glib's i18n functions -# would fail to compile because it can't find libintl.h. -# -if test "${ac_cv_header_libintl_h+set}" = set; then - { echo "$as_me:$LINENO: checking for libintl.h" >&5 -echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; } -if test "${ac_cv_header_libintl_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5 -echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking libintl.h usability" >&5 -echo $ECHO_N "checking libintl.h 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 -_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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core 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 libintl.h presence" >&5 -echo $ECHO_N "checking libintl.h 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 -_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 "echo \"\$as_me:$LINENO: $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 && { - 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 -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: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: libintl.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: libintl.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for libintl.h" >&5 -echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; } -if test "${ac_cv_header_libintl_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_libintl_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5 -echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; } - -fi -if test $ac_cv_header_libintl_h = yes; then - : -else - have_libintl=no -fi - - -if test "$have_libintl" = "no"; then - unset ac_cv_header_libintl_h - CPPFLAGS="$CPPFLAGS -I/usr/local/include" - if test "${ac_cv_header_libintl_h+set}" = set; then - { echo "$as_me:$LINENO: checking for libintl.h" >&5 -echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; } -if test "${ac_cv_header_libintl_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5 -echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking libintl.h usability" >&5 -echo $ECHO_N "checking libintl.h 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 -_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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core 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 libintl.h presence" >&5 -echo $ECHO_N "checking libintl.h 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 -_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 "echo \"\$as_me:$LINENO: $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 && { - 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 -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: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: libintl.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: libintl.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for libintl.h" >&5 -echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; } -if test "${ac_cv_header_libintl_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_libintl_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5 -echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; } - -fi -if test $ac_cv_header_libintl_h = yes; then - : -else - { { echo "$as_me:$LINENO: error: libintl.h not found. Make sure you have the gettext headers installed." >&5 -echo "$as_me: error: libintl.h not found. Make sure you have the gettext headers installed." >&2;} - { (exit 1); exit 1; }; } -fi - - -fi - -# Check whether --enable-deploypkg was given. -if test "${enable_deploypkg+set}" = set; then - enableval=$enable_deploypkg; -else - enable_deploypkg=yes -fi - - -if test "$enable_deploypkg" = "yes"; then - - - if test -z "mspack"; then - { { echo "$as_me:$LINENO: error: 'library' parameter is required.'" >&5 -echo "$as_me: error: 'library' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - if test -z "MSPACK"; then - { { echo "$as_me:$LINENO: error: 'lvar' parameter is required.'" >&5 -echo "$as_me: error: 'lvar' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - - ac_vmw_have_lib=0 - ac_vmw_have_lib_func=0 - ac_vmw_have_lib_header=0 - ac_vmw_custom_libs= - - # - # First, try any user-defined CUSTOM_* flags. - # - if test -n "${CUSTOM_MSPACK_CPPFLAGS}" || test -n "${CUSTOM_MSPACK_LIBS}"; then - ac_vmw_custom_libs="${CUSTOM_MSPACK_LIBS} -lmspack" - if test -n "mspack.h"; then - ORIGINAL_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="${CUSTOM_MSPACK_CPPFLAGS} $CPPFLAGS" - - if test "${ac_cv_header_mspack_h+set}" = set; then - { echo "$as_me:$LINENO: checking for mspack.h" >&5 -echo $ECHO_N "checking for mspack.h... $ECHO_C" >&6; } -if test "${ac_cv_header_mspack_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_mspack_h" >&5 -echo "${ECHO_T}$ac_cv_header_mspack_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking mspack.h usability" >&5 -echo $ECHO_N "checking mspack.h 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 -_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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core 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 mspack.h presence" >&5 -echo $ECHO_N "checking mspack.h 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 -_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 "echo \"\$as_me:$LINENO: $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 && { - 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 -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: mspack.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: mspack.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: mspack.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: mspack.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: mspack.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: mspack.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: mspack.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: mspack.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: mspack.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: mspack.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: mspack.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: mspack.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: mspack.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: mspack.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: mspack.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: mspack.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for mspack.h" >&5 -echo $ECHO_N "checking for mspack.h... $ECHO_C" >&6; } -if test "${ac_cv_header_mspack_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_mspack_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_mspack_h" >&5 -echo "${ECHO_T}$ac_cv_header_mspack_h" >&6; } - -fi -if test $ac_cv_header_mspack_h = yes; then - ac_vmw_have_lib_header=1 -fi - - - - CPPFLAGS="$ORIGINAL_CPPFLAGS" - else - ac_vmw_have_lib_header=1 - fi - - # Check a specific function in the library if requested. - # If it hasn't, just pick a random function from libc, just to make - # sure the linker can find the library being tested. - if test $ac_vmw_have_lib_header -eq 1; then - if test -n ""; then - ac_vmw_function= - else - ac_vmw_function=strlen - fi - as_ac_Lib=`echo "ac_cv_lib_mspack_$ac_vmw_function" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_vmw_function in -lmspack" >&5 -echo $ECHO_N "checking for $ac_vmw_function in -lmspack... $ECHO_C" >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lmspack $ac_vmw_custom_libs $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 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 -char $ac_vmw_function (); -int -main () -{ -return $ac_vmw_function (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_Lib=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" -fi - -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 -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - ac_vmw_have_lib_func=1 -fi - - fi - - if test $ac_vmw_have_lib_func -eq 1 && test $ac_vmw_have_lib_header -eq 1; then - MSPACK_CPPFLAGS="${CUSTOM_MSPACK_CPPFLAGS}" - MSPACK_LIBS="$ac_vmw_custom_libs" - ac_vmw_have_lib=1 - fi - fi - - # If that didn't work, try with pkg-config. - if test $ac_vmw_have_lib -eq 0 && test "$HAVE_PKG_CONFIG" = "yes" && test -n "libmspack"; then - if test -n "0.0.20040308alpha"; then - { echo "$as_me:$LINENO: checking for libmspack >= 0.0.20040308alpha (via pkg-config)" >&5 -echo $ECHO_N "checking for libmspack >= 0.0.20040308alpha (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists 'libmspack >= 0.0.20040308alpha'; then - ac_vmw_have_lib=1 - fi - else - { echo "$as_me:$LINENO: checking for libmspack (via pkg-config)" >&5 -echo $ECHO_N "checking for libmspack (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists 'libmspack'; then - ac_vmw_have_lib=1 - fi - fi - - if test $ac_vmw_have_lib -eq 1; then - # Sometimes pkg-config might fail; for example, "pkg-config gtk+-2.0 --cflags" - # fails on OpenSolaris B71. So be pessimistic. - ac_vmw_cppflags="`pkg-config --cflags libmspack`" - ac_vmw_ret1=$? - ac_vmw_libs="`pkg-config --libs libmspack`" - ac_vmw_ret2=$? - if test $ac_vmw_ret1 -eq 0 && test $ac_vmw_ret2 -eq 0; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - MSPACK_CPPFLAGS="$ac_vmw_cppflags" - MSPACK_LIBS="$ac_vmw_libs" - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - - # If we still haven't found the lib, try with the library's custom "config" script. - # Before checking, flush the AC_PATH_PROG cached variable. - unset ac_cv_path_ac_vmw_lib_cfg - unset ac_vmw_lib_cfg - if test $ac_vmw_have_lib -eq 0 && test -n ""; then - # Extract the first word of "", so it can be a program name with args. -set dummy ; 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_path_ac_vmw_lib_cfg+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_vmw_lib_cfg in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_vmw_lib_cfg="$ac_vmw_lib_cfg" # Let the user override the test with a path. - ;; - *) - 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_path_ac_vmw_lib_cfg="$as_dir/$ac_word$ac_exec_ext" - 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_path_ac_vmw_lib_cfg" && ac_cv_path_ac_vmw_lib_cfg="no" - ;; -esac -fi -ac_vmw_lib_cfg=$ac_cv_path_ac_vmw_lib_cfg -if test -n "$ac_vmw_lib_cfg"; then - { echo "$as_me:$LINENO: result: $ac_vmw_lib_cfg" >&5 -echo "${ECHO_T}$ac_vmw_lib_cfg" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "$ac_vmw_lib_cfg" != "no"; then - # XXX: icu-config does not follow the "--cflags" and "--libs" convention, - # so single it out here to avoid having to replicate all the rest of the - # logic elsewhere. - if test `basename "$ac_vmw_lib_cfg"` = "icu-config"; then - MSPACK_CPPFLAGS="`$ac_vmw_lib_cfg --cppflags`" - MSPACK_LIBS="`$ac_vmw_lib_cfg --ldflags`" - else - MSPACK_CPPFLAGS="`$ac_vmw_lib_cfg --cflags`" - MSPACK_LIBS="`$ac_vmw_lib_cfg --libs`" - fi - ac_vmw_have_lib=1 - fi - fi - - # Finish by executing the user provided action. The call to "true" is needed - # because the actions are optional, and we need something inside the block. - if test $ac_vmw_have_lib -eq 1; then - - - true - - else - true - { { echo "$as_me:$LINENO: error: mspack >= 0.0.20040308alpha is required." >&5 -echo "$as_me: error: mspack >= 0.0.20040308alpha is required." >&2;} - { (exit 1); exit 1; }; } - fi - -fi - -# Check whether --enable-grabbitmqproxy was given. -if test "${enable_grabbitmqproxy+set}" = set; then - enableval=$enable_grabbitmqproxy; -else - enable_grabbitmqproxy=yes -fi - - -# -# Check for glib 2.6.14 or greater. -# - - - if test -z "glib-2.0"; then - { { echo "$as_me:$LINENO: error: 'library' parameter is required.'" >&5 -echo "$as_me: error: 'library' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - if test -z "GLIB2"; then - { { echo "$as_me:$LINENO: error: 'lvar' parameter is required.'" >&5 -echo "$as_me: error: 'lvar' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - - ac_vmw_have_lib=0 - ac_vmw_have_lib_func=0 - ac_vmw_have_lib_header=0 - ac_vmw_custom_libs= - - # - # First, try any user-defined CUSTOM_* flags. - # - if test -n "${CUSTOM_GLIB2_CPPFLAGS}" || test -n "${CUSTOM_GLIB2_LIBS}"; then - ac_vmw_custom_libs="${CUSTOM_GLIB2_LIBS} -lglib-2.0" - if test -n "glib.h"; then - ORIGINAL_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="${CUSTOM_GLIB2_CPPFLAGS} $CPPFLAGS" - - if test "${ac_cv_header_glib_h+set}" = set; then - { echo "$as_me:$LINENO: checking for glib.h" >&5 -echo $ECHO_N "checking for glib.h... $ECHO_C" >&6; } -if test "${ac_cv_header_glib_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_glib_h" >&5 -echo "${ECHO_T}$ac_cv_header_glib_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking glib.h usability" >&5 -echo $ECHO_N "checking glib.h 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 -_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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core 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 glib.h presence" >&5 -echo $ECHO_N "checking glib.h 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 -_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 "echo \"\$as_me:$LINENO: $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 && { - 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 -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: glib.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: glib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: glib.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: glib.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: glib.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: glib.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: glib.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: glib.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: glib.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: glib.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: glib.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: glib.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: glib.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: glib.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: glib.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: glib.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for glib.h" >&5 -echo $ECHO_N "checking for glib.h... $ECHO_C" >&6; } -if test "${ac_cv_header_glib_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_glib_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_glib_h" >&5 -echo "${ECHO_T}$ac_cv_header_glib_h" >&6; } - -fi -if test $ac_cv_header_glib_h = yes; then - ac_vmw_have_lib_header=1 -fi - - - - CPPFLAGS="$ORIGINAL_CPPFLAGS" - else - ac_vmw_have_lib_header=1 - fi - - # Check a specific function in the library if requested. - # If it hasn't, just pick a random function from libc, just to make - # sure the linker can find the library being tested. - if test $ac_vmw_have_lib_header -eq 1; then - if test -n "g_key_file_new"; then - ac_vmw_function=g_key_file_new - else - ac_vmw_function=strlen - fi - as_ac_Lib=`echo "ac_cv_lib_glib-2.0_$ac_vmw_function" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_vmw_function in -lglib-2.0" >&5 -echo $ECHO_N "checking for $ac_vmw_function in -lglib-2.0... $ECHO_C" >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lglib-2.0 $ac_vmw_custom_libs $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 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 -char $ac_vmw_function (); -int -main () -{ -return $ac_vmw_function (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_Lib=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" -fi - -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 -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - ac_vmw_have_lib_func=1 -fi - - fi - - if test $ac_vmw_have_lib_func -eq 1 && test $ac_vmw_have_lib_header -eq 1; then - GLIB2_CPPFLAGS="${CUSTOM_GLIB2_CPPFLAGS}" - GLIB2_LIBS="$ac_vmw_custom_libs" - ac_vmw_have_lib=1 - fi - fi - - # If that didn't work, try with pkg-config. - if test $ac_vmw_have_lib -eq 0 && test "$HAVE_PKG_CONFIG" = "yes" && test -n "glib-2.0"; then - if test -n "2.14.0"; then - { echo "$as_me:$LINENO: checking for glib-2.0 >= 2.14.0 (via pkg-config)" >&5 -echo $ECHO_N "checking for glib-2.0 >= 2.14.0 (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists 'glib-2.0 >= 2.14.0'; then - ac_vmw_have_lib=1 - fi - else - { echo "$as_me:$LINENO: checking for glib-2.0 (via pkg-config)" >&5 -echo $ECHO_N "checking for glib-2.0 (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists 'glib-2.0'; then - ac_vmw_have_lib=1 - fi - fi - - if test $ac_vmw_have_lib -eq 1; then - # Sometimes pkg-config might fail; for example, "pkg-config gtk+-2.0 --cflags" - # fails on OpenSolaris B71. So be pessimistic. - ac_vmw_cppflags="`pkg-config --cflags glib-2.0`" - ac_vmw_ret1=$? - ac_vmw_libs="`pkg-config --libs glib-2.0`" - ac_vmw_ret2=$? - if test $ac_vmw_ret1 -eq 0 && test $ac_vmw_ret2 -eq 0; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - GLIB2_CPPFLAGS="$ac_vmw_cppflags" - GLIB2_LIBS="$ac_vmw_libs" - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - - # If we still haven't found the lib, try with the library's custom "config" script. - # Before checking, flush the AC_PATH_PROG cached variable. - unset ac_cv_path_ac_vmw_lib_cfg - unset ac_vmw_lib_cfg - if test $ac_vmw_have_lib -eq 0 && test -n ""; then - # Extract the first word of "", so it can be a program name with args. -set dummy ; 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_path_ac_vmw_lib_cfg+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_vmw_lib_cfg in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_vmw_lib_cfg="$ac_vmw_lib_cfg" # Let the user override the test with a path. - ;; - *) - 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_path_ac_vmw_lib_cfg="$as_dir/$ac_word$ac_exec_ext" - 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_path_ac_vmw_lib_cfg" && ac_cv_path_ac_vmw_lib_cfg="no" - ;; -esac -fi -ac_vmw_lib_cfg=$ac_cv_path_ac_vmw_lib_cfg -if test -n "$ac_vmw_lib_cfg"; then - { echo "$as_me:$LINENO: result: $ac_vmw_lib_cfg" >&5 -echo "${ECHO_T}$ac_vmw_lib_cfg" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "$ac_vmw_lib_cfg" != "no"; then - # XXX: icu-config does not follow the "--cflags" and "--libs" convention, - # so single it out here to avoid having to replicate all the rest of the - # logic elsewhere. - if test `basename "$ac_vmw_lib_cfg"` = "icu-config"; then - GLIB2_CPPFLAGS="`$ac_vmw_lib_cfg --cppflags`" - GLIB2_LIBS="`$ac_vmw_lib_cfg --ldflags`" - else - GLIB2_CPPFLAGS="`$ac_vmw_lib_cfg --cflags`" - GLIB2_LIBS="`$ac_vmw_lib_cfg --libs`" - fi - ac_vmw_have_lib=1 - fi - fi - - # Finish by executing the user provided action. The call to "true" is needed - # because the actions are optional, and we need something inside the block. - if test $ac_vmw_have_lib -eq 1; then - - - true - - else - true - { { echo "$as_me:$LINENO: error: glib2 >= 2.14.0 is required." >&5 -echo "$as_me: error: glib2 >= 2.14.0 is required." >&2;} - { (exit 1); exit 1; }; } - fi - - - - - if test -z "gmodule-2.0"; then - { { echo "$as_me:$LINENO: error: 'library' parameter is required.'" >&5 -echo "$as_me: error: 'library' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - if test -z "GMODULE"; then - { { echo "$as_me:$LINENO: error: 'lvar' parameter is required.'" >&5 -echo "$as_me: error: 'lvar' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - - ac_vmw_have_lib=0 - ac_vmw_have_lib_func=0 - ac_vmw_have_lib_header=0 - ac_vmw_custom_libs= - - # - # First, try any user-defined CUSTOM_* flags. - # - if test -n "${CUSTOM_GMODULE_CPPFLAGS}" || test -n "${CUSTOM_GMODULE_LIBS}"; then - ac_vmw_custom_libs="${CUSTOM_GMODULE_LIBS} -lgmodule-2.0" - if test -n ""; then - ORIGINAL_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="${CUSTOM_GMODULE_CPPFLAGS} $CPPFLAGS" - - if test "${ac_cv_header_+set}" = set; then - { echo "$as_me:$LINENO: checking for " >&5 -echo $ECHO_N "checking for ... $ECHO_C" >&6; } -if test "${ac_cv_header_+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 -echo "${ECHO_T}$ac_cv_header_" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking usability" >&5 -echo $ECHO_N "checking 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 <> -_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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core 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 presence" >&5 -echo $ECHO_N "checking 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 <> -_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 "echo \"\$as_me:$LINENO: $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 && { - 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 -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: : accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: : accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: : proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: : proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: : present but cannot be compiled" >&5 -echo "$as_me: WARNING: : present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: : check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: : check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: : see the Autoconf documentation" >&5 -echo "$as_me: WARNING: : see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: : section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: : section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: : proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: : proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: : in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: : in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for " >&5 -echo $ECHO_N "checking for ... $ECHO_C" >&6; } -if test "${ac_cv_header_+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 -echo "${ECHO_T}$ac_cv_header_" >&6; } - -fi -if test $ac_cv_header_ = yes; then - ac_vmw_have_lib_header=1 -fi - - - - CPPFLAGS="$ORIGINAL_CPPFLAGS" - else - ac_vmw_have_lib_header=1 - fi - - # Check a specific function in the library if requested. - # If it hasn't, just pick a random function from libc, just to make - # sure the linker can find the library being tested. - if test $ac_vmw_have_lib_header -eq 1; then - if test -n ""; then - ac_vmw_function= - else - ac_vmw_function=strlen - fi - as_ac_Lib=`echo "ac_cv_lib_gmodule-2.0_$ac_vmw_function" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_vmw_function in -lgmodule-2.0" >&5 -echo $ECHO_N "checking for $ac_vmw_function in -lgmodule-2.0... $ECHO_C" >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lgmodule-2.0 $ac_vmw_custom_libs $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 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 -char $ac_vmw_function (); -int -main () -{ -return $ac_vmw_function (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_Lib=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" -fi - -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 -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - ac_vmw_have_lib_func=1 -fi - - fi - - if test $ac_vmw_have_lib_func -eq 1 && test $ac_vmw_have_lib_header -eq 1; then - GMODULE_CPPFLAGS="${CUSTOM_GMODULE_CPPFLAGS}" - GMODULE_LIBS="$ac_vmw_custom_libs" - ac_vmw_have_lib=1 - fi - fi - - # If that didn't work, try with pkg-config. - if test $ac_vmw_have_lib -eq 0 && test "$HAVE_PKG_CONFIG" = "yes" && test -n "gmodule-2.0"; then - if test -n "2.14.0"; then - { echo "$as_me:$LINENO: checking for gmodule-2.0 >= 2.14.0 (via pkg-config)" >&5 -echo $ECHO_N "checking for gmodule-2.0 >= 2.14.0 (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists 'gmodule-2.0 >= 2.14.0'; then - ac_vmw_have_lib=1 - fi - else - { echo "$as_me:$LINENO: checking for gmodule-2.0 (via pkg-config)" >&5 -echo $ECHO_N "checking for gmodule-2.0 (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists 'gmodule-2.0'; then - ac_vmw_have_lib=1 - fi - fi - - if test $ac_vmw_have_lib -eq 1; then - # Sometimes pkg-config might fail; for example, "pkg-config gtk+-2.0 --cflags" - # fails on OpenSolaris B71. So be pessimistic. - ac_vmw_cppflags="`pkg-config --cflags gmodule-2.0`" - ac_vmw_ret1=$? - ac_vmw_libs="`pkg-config --libs gmodule-2.0`" - ac_vmw_ret2=$? - if test $ac_vmw_ret1 -eq 0 && test $ac_vmw_ret2 -eq 0; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - GMODULE_CPPFLAGS="$ac_vmw_cppflags" - GMODULE_LIBS="$ac_vmw_libs" - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - - # If we still haven't found the lib, try with the library's custom "config" script. - # Before checking, flush the AC_PATH_PROG cached variable. - unset ac_cv_path_ac_vmw_lib_cfg - unset ac_vmw_lib_cfg - if test $ac_vmw_have_lib -eq 0 && test -n ""; then - # Extract the first word of "", so it can be a program name with args. -set dummy ; 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_path_ac_vmw_lib_cfg+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_vmw_lib_cfg in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_vmw_lib_cfg="$ac_vmw_lib_cfg" # Let the user override the test with a path. - ;; - *) - 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_path_ac_vmw_lib_cfg="$as_dir/$ac_word$ac_exec_ext" - 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_path_ac_vmw_lib_cfg" && ac_cv_path_ac_vmw_lib_cfg="no" - ;; -esac -fi -ac_vmw_lib_cfg=$ac_cv_path_ac_vmw_lib_cfg -if test -n "$ac_vmw_lib_cfg"; then - { echo "$as_me:$LINENO: result: $ac_vmw_lib_cfg" >&5 -echo "${ECHO_T}$ac_vmw_lib_cfg" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "$ac_vmw_lib_cfg" != "no"; then - # XXX: icu-config does not follow the "--cflags" and "--libs" convention, - # so single it out here to avoid having to replicate all the rest of the - # logic elsewhere. - if test `basename "$ac_vmw_lib_cfg"` = "icu-config"; then - GMODULE_CPPFLAGS="`$ac_vmw_lib_cfg --cppflags`" - GMODULE_LIBS="`$ac_vmw_lib_cfg --ldflags`" - else - GMODULE_CPPFLAGS="`$ac_vmw_lib_cfg --cflags`" - GMODULE_LIBS="`$ac_vmw_lib_cfg --libs`" - fi - ac_vmw_have_lib=1 - fi - fi - - # Finish by executing the user provided action. The call to "true" is needed - # because the actions are optional, and we need something inside the block. - if test $ac_vmw_have_lib -eq 1; then - - - true - - else - true - { { echo "$as_me:$LINENO: error: gmodule >= 2.14.0 is required." >&5 -echo "$as_me: error: gmodule >= 2.14.0 is required." >&2;} - { (exit 1); exit 1; }; } - fi - - - - if test -z "gobject-2.0"; then - { { echo "$as_me:$LINENO: error: 'library' parameter is required.'" >&5 -echo "$as_me: error: 'library' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - if test -z "GOBJECT"; then - { { echo "$as_me:$LINENO: error: 'lvar' parameter is required.'" >&5 -echo "$as_me: error: 'lvar' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - - ac_vmw_have_lib=0 - ac_vmw_have_lib_func=0 - ac_vmw_have_lib_header=0 - ac_vmw_custom_libs= - - # - # First, try any user-defined CUSTOM_* flags. - # - if test -n "${CUSTOM_GOBJECT_CPPFLAGS}" || test -n "${CUSTOM_GOBJECT_LIBS}"; then - ac_vmw_custom_libs="${CUSTOM_GOBJECT_LIBS} -lgobject-2.0" - if test -n "glib-object.h"; then - ORIGINAL_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="${CUSTOM_GOBJECT_CPPFLAGS} $CPPFLAGS" - - if test "${ac_cv_header_glib_object_h+set}" = set; then - { echo "$as_me:$LINENO: checking for glib-object.h" >&5 -echo $ECHO_N "checking for glib-object.h... $ECHO_C" >&6; } -if test "${ac_cv_header_glib_object_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_glib_object_h" >&5 -echo "${ECHO_T}$ac_cv_header_glib_object_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking glib-object.h usability" >&5 -echo $ECHO_N "checking glib-object.h 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 -_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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core 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 glib-object.h presence" >&5 -echo $ECHO_N "checking glib-object.h 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 -_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 "echo \"\$as_me:$LINENO: $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 && { - 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 -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: glib-object.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: glib-object.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: glib-object.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: glib-object.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: glib-object.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: glib-object.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: glib-object.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: glib-object.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: glib-object.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: glib-object.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: glib-object.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: glib-object.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: glib-object.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: glib-object.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: glib-object.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: glib-object.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for glib-object.h" >&5 -echo $ECHO_N "checking for glib-object.h... $ECHO_C" >&6; } -if test "${ac_cv_header_glib_object_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_glib_object_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_glib_object_h" >&5 -echo "${ECHO_T}$ac_cv_header_glib_object_h" >&6; } - -fi -if test $ac_cv_header_glib_object_h = yes; then - ac_vmw_have_lib_header=1 -fi - - - - CPPFLAGS="$ORIGINAL_CPPFLAGS" - else - ac_vmw_have_lib_header=1 - fi - - # Check a specific function in the library if requested. - # If it hasn't, just pick a random function from libc, just to make - # sure the linker can find the library being tested. - if test $ac_vmw_have_lib_header -eq 1; then - if test -n ""; then - ac_vmw_function= - else - ac_vmw_function=strlen - fi - as_ac_Lib=`echo "ac_cv_lib_gobject-2.0_$ac_vmw_function" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_vmw_function in -lgobject-2.0" >&5 -echo $ECHO_N "checking for $ac_vmw_function in -lgobject-2.0... $ECHO_C" >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lgobject-2.0 $ac_vmw_custom_libs $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 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 -char $ac_vmw_function (); -int -main () -{ -return $ac_vmw_function (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_Lib=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" -fi - -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 -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - ac_vmw_have_lib_func=1 -fi - - fi - - if test $ac_vmw_have_lib_func -eq 1 && test $ac_vmw_have_lib_header -eq 1; then - GOBJECT_CPPFLAGS="${CUSTOM_GOBJECT_CPPFLAGS}" - GOBJECT_LIBS="$ac_vmw_custom_libs" - ac_vmw_have_lib=1 - fi - fi - - # If that didn't work, try with pkg-config. - if test $ac_vmw_have_lib -eq 0 && test "$HAVE_PKG_CONFIG" = "yes" && test -n "gobject-2.0"; then - if test -n "2.14.0"; then - { echo "$as_me:$LINENO: checking for gobject-2.0 >= 2.14.0 (via pkg-config)" >&5 -echo $ECHO_N "checking for gobject-2.0 >= 2.14.0 (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists 'gobject-2.0 >= 2.14.0'; then - ac_vmw_have_lib=1 - fi - else - { echo "$as_me:$LINENO: checking for gobject-2.0 (via pkg-config)" >&5 -echo $ECHO_N "checking for gobject-2.0 (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists 'gobject-2.0'; then - ac_vmw_have_lib=1 - fi - fi - - if test $ac_vmw_have_lib -eq 1; then - # Sometimes pkg-config might fail; for example, "pkg-config gtk+-2.0 --cflags" - # fails on OpenSolaris B71. So be pessimistic. - ac_vmw_cppflags="`pkg-config --cflags gobject-2.0`" - ac_vmw_ret1=$? - ac_vmw_libs="`pkg-config --libs gobject-2.0`" - ac_vmw_ret2=$? - if test $ac_vmw_ret1 -eq 0 && test $ac_vmw_ret2 -eq 0; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - GOBJECT_CPPFLAGS="$ac_vmw_cppflags" - GOBJECT_LIBS="$ac_vmw_libs" - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - - # If we still haven't found the lib, try with the library's custom "config" script. - # Before checking, flush the AC_PATH_PROG cached variable. - unset ac_cv_path_ac_vmw_lib_cfg - unset ac_vmw_lib_cfg - if test $ac_vmw_have_lib -eq 0 && test -n ""; then - # Extract the first word of "", so it can be a program name with args. -set dummy ; 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_path_ac_vmw_lib_cfg+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_vmw_lib_cfg in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_vmw_lib_cfg="$ac_vmw_lib_cfg" # Let the user override the test with a path. - ;; - *) - 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_path_ac_vmw_lib_cfg="$as_dir/$ac_word$ac_exec_ext" - 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_path_ac_vmw_lib_cfg" && ac_cv_path_ac_vmw_lib_cfg="no" - ;; -esac -fi -ac_vmw_lib_cfg=$ac_cv_path_ac_vmw_lib_cfg -if test -n "$ac_vmw_lib_cfg"; then - { echo "$as_me:$LINENO: result: $ac_vmw_lib_cfg" >&5 -echo "${ECHO_T}$ac_vmw_lib_cfg" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "$ac_vmw_lib_cfg" != "no"; then - # XXX: icu-config does not follow the "--cflags" and "--libs" convention, - # so single it out here to avoid having to replicate all the rest of the - # logic elsewhere. - if test `basename "$ac_vmw_lib_cfg"` = "icu-config"; then - GOBJECT_CPPFLAGS="`$ac_vmw_lib_cfg --cppflags`" - GOBJECT_LIBS="`$ac_vmw_lib_cfg --ldflags`" - else - GOBJECT_CPPFLAGS="`$ac_vmw_lib_cfg --cflags`" - GOBJECT_LIBS="`$ac_vmw_lib_cfg --libs`" - fi - ac_vmw_have_lib=1 - fi - fi - - # Finish by executing the user provided action. The call to "true" is needed - # because the actions are optional, and we need something inside the block. - if test $ac_vmw_have_lib -eq 1; then - - - true - - else - true - { { echo "$as_me:$LINENO: error: gobject >= 2.14.0 is required." >&5 -echo "$as_me: error: gobject >= 2.14.0 is required." >&2;} - { (exit 1); exit 1; }; } - fi - - - - if test -z "gthread-2.0"; then - { { echo "$as_me:$LINENO: error: 'library' parameter is required.'" >&5 -echo "$as_me: error: 'library' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - if test -z "GTHREAD"; then - { { echo "$as_me:$LINENO: error: 'lvar' parameter is required.'" >&5 -echo "$as_me: error: 'lvar' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - - ac_vmw_have_lib=0 - ac_vmw_have_lib_func=0 - ac_vmw_have_lib_header=0 - ac_vmw_custom_libs= - - # - # First, try any user-defined CUSTOM_* flags. - # - if test -n "${CUSTOM_GTHREAD_CPPFLAGS}" || test -n "${CUSTOM_GTHREAD_LIBS}"; then - ac_vmw_custom_libs="${CUSTOM_GTHREAD_LIBS} -lgthread-2.0" - if test -n ""; then - ORIGINAL_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="${CUSTOM_GTHREAD_CPPFLAGS} $CPPFLAGS" - - if test "${ac_cv_header_+set}" = set; then - { echo "$as_me:$LINENO: checking for " >&5 -echo $ECHO_N "checking for ... $ECHO_C" >&6; } -if test "${ac_cv_header_+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 -echo "${ECHO_T}$ac_cv_header_" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking usability" >&5 -echo $ECHO_N "checking 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 <> -_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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core 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 presence" >&5 -echo $ECHO_N "checking 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 <> -_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 "echo \"\$as_me:$LINENO: $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 && { - 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 -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: : accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: : accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: : proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: : proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: : present but cannot be compiled" >&5 -echo "$as_me: WARNING: : present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: : check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: : check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: : see the Autoconf documentation" >&5 -echo "$as_me: WARNING: : see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: : section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: : section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: : proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: : proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: : in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: : in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for " >&5 -echo $ECHO_N "checking for ... $ECHO_C" >&6; } -if test "${ac_cv_header_+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 -echo "${ECHO_T}$ac_cv_header_" >&6; } - -fi -if test $ac_cv_header_ = yes; then - ac_vmw_have_lib_header=1 -fi - - - - CPPFLAGS="$ORIGINAL_CPPFLAGS" - else - ac_vmw_have_lib_header=1 - fi - - # Check a specific function in the library if requested. - # If it hasn't, just pick a random function from libc, just to make - # sure the linker can find the library being tested. - if test $ac_vmw_have_lib_header -eq 1; then - if test -n ""; then - ac_vmw_function= - else - ac_vmw_function=strlen - fi - as_ac_Lib=`echo "ac_cv_lib_gthread-2.0_$ac_vmw_function" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_vmw_function in -lgthread-2.0" >&5 -echo $ECHO_N "checking for $ac_vmw_function in -lgthread-2.0... $ECHO_C" >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lgthread-2.0 $ac_vmw_custom_libs $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 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 -char $ac_vmw_function (); -int -main () -{ -return $ac_vmw_function (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_Lib=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" -fi - -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 -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - ac_vmw_have_lib_func=1 -fi - - fi - - if test $ac_vmw_have_lib_func -eq 1 && test $ac_vmw_have_lib_header -eq 1; then - GTHREAD_CPPFLAGS="${CUSTOM_GTHREAD_CPPFLAGS}" - GTHREAD_LIBS="$ac_vmw_custom_libs" - ac_vmw_have_lib=1 - fi - fi - - # If that didn't work, try with pkg-config. - if test $ac_vmw_have_lib -eq 0 && test "$HAVE_PKG_CONFIG" = "yes" && test -n "gthread-2.0"; then - if test -n "2.14.0"; then - { echo "$as_me:$LINENO: checking for gthread-2.0 >= 2.14.0 (via pkg-config)" >&5 -echo $ECHO_N "checking for gthread-2.0 >= 2.14.0 (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists 'gthread-2.0 >= 2.14.0'; then - ac_vmw_have_lib=1 - fi - else - { echo "$as_me:$LINENO: checking for gthread-2.0 (via pkg-config)" >&5 -echo $ECHO_N "checking for gthread-2.0 (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists 'gthread-2.0'; then - ac_vmw_have_lib=1 - fi - fi - - if test $ac_vmw_have_lib -eq 1; then - # Sometimes pkg-config might fail; for example, "pkg-config gtk+-2.0 --cflags" - # fails on OpenSolaris B71. So be pessimistic. - ac_vmw_cppflags="`pkg-config --cflags gthread-2.0`" - ac_vmw_ret1=$? - ac_vmw_libs="`pkg-config --libs gthread-2.0`" - ac_vmw_ret2=$? - if test $ac_vmw_ret1 -eq 0 && test $ac_vmw_ret2 -eq 0; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - GTHREAD_CPPFLAGS="$ac_vmw_cppflags" - GTHREAD_LIBS="$ac_vmw_libs" - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - - # If we still haven't found the lib, try with the library's custom "config" script. - # Before checking, flush the AC_PATH_PROG cached variable. - unset ac_cv_path_ac_vmw_lib_cfg - unset ac_vmw_lib_cfg - if test $ac_vmw_have_lib -eq 0 && test -n ""; then - # Extract the first word of "", so it can be a program name with args. -set dummy ; 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_path_ac_vmw_lib_cfg+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_vmw_lib_cfg in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_vmw_lib_cfg="$ac_vmw_lib_cfg" # Let the user override the test with a path. - ;; - *) - 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_path_ac_vmw_lib_cfg="$as_dir/$ac_word$ac_exec_ext" - 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_path_ac_vmw_lib_cfg" && ac_cv_path_ac_vmw_lib_cfg="no" - ;; -esac -fi -ac_vmw_lib_cfg=$ac_cv_path_ac_vmw_lib_cfg -if test -n "$ac_vmw_lib_cfg"; then - { echo "$as_me:$LINENO: result: $ac_vmw_lib_cfg" >&5 -echo "${ECHO_T}$ac_vmw_lib_cfg" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "$ac_vmw_lib_cfg" != "no"; then - # XXX: icu-config does not follow the "--cflags" and "--libs" convention, - # so single it out here to avoid having to replicate all the rest of the - # logic elsewhere. - if test `basename "$ac_vmw_lib_cfg"` = "icu-config"; then - GTHREAD_CPPFLAGS="`$ac_vmw_lib_cfg --cppflags`" - GTHREAD_LIBS="`$ac_vmw_lib_cfg --ldflags`" - else - GTHREAD_CPPFLAGS="`$ac_vmw_lib_cfg --cflags`" - GTHREAD_LIBS="`$ac_vmw_lib_cfg --libs`" - fi - ac_vmw_have_lib=1 - fi - fi - - # Finish by executing the user provided action. The call to "true" is needed - # because the actions are optional, and we need something inside the block. - if test $ac_vmw_have_lib -eq 1; then - - - true - - else - true - { { echo "$as_me:$LINENO: error: glib >= 2.14.0 is required." >&5 -echo "$as_me: error: glib >= 2.14.0 is required." >&2;} - { (exit 1); exit 1; }; } - fi - -# Extract the first word of "glib-genmarshal", so it can be a program name with args. -set dummy glib-genmarshal; 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_genmarshal+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$have_genmarshal"; then - ac_cv_prog_have_genmarshal="$have_genmarshal" # 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_genmarshal="yes" - 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_genmarshal" && ac_cv_prog_have_genmarshal="no" -fi -fi -have_genmarshal=$ac_cv_prog_have_genmarshal -if test -n "$have_genmarshal"; then - { echo "$as_me:$LINENO: result: $have_genmarshal" >&5 -echo "${ECHO_T}$have_genmarshal" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - -if test "$have_genmarshal" != "yes"; then - { { echo "$as_me:$LINENO: error: glib-genmarshal is required; make sure it's available in your path." >&5 -echo "$as_me: error: glib-genmarshal is required; make sure it's available in your path." >&2;} - { (exit 1); exit 1; }; } -fi - -# -# Check for fuse. -# - - - if test -z "fuse"; then - { { echo "$as_me:$LINENO: error: 'library' parameter is required.'" >&5 -echo "$as_me: error: 'library' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - if test -z "FUSE"; then - { { echo "$as_me:$LINENO: error: 'lvar' parameter is required.'" >&5 -echo "$as_me: error: 'lvar' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - - ac_vmw_have_lib=0 - ac_vmw_have_lib_func=0 - ac_vmw_have_lib_header=0 - ac_vmw_custom_libs= - - # - # First, try any user-defined CUSTOM_* flags. - # - if test -n "${CUSTOM_FUSE_CPPFLAGS}" || test -n "${CUSTOM_FUSE_LIBS}"; then - ac_vmw_custom_libs="${CUSTOM_FUSE_LIBS} -lfuse" - if test -n "fuse.h"; then - ORIGINAL_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="${CUSTOM_FUSE_CPPFLAGS} $CPPFLAGS" - - if test "${ac_cv_header_fuse_h+set}" = set; then - { echo "$as_me:$LINENO: checking for fuse.h" >&5 -echo $ECHO_N "checking for fuse.h... $ECHO_C" >&6; } -if test "${ac_cv_header_fuse_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_fuse_h" >&5 -echo "${ECHO_T}$ac_cv_header_fuse_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking fuse.h usability" >&5 -echo $ECHO_N "checking fuse.h 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 -_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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core 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 fuse.h presence" >&5 -echo $ECHO_N "checking fuse.h 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 -_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 "echo \"\$as_me:$LINENO: $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 && { - 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 -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: fuse.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: fuse.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: fuse.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: fuse.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: fuse.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: fuse.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: fuse.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: fuse.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: fuse.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: fuse.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: fuse.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: fuse.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: fuse.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: fuse.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: fuse.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: fuse.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for fuse.h" >&5 -echo $ECHO_N "checking for fuse.h... $ECHO_C" >&6; } -if test "${ac_cv_header_fuse_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_fuse_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_fuse_h" >&5 -echo "${ECHO_T}$ac_cv_header_fuse_h" >&6; } - -fi -if test $ac_cv_header_fuse_h = yes; then - ac_vmw_have_lib_header=1 -fi - - - - CPPFLAGS="$ORIGINAL_CPPFLAGS" - else - ac_vmw_have_lib_header=1 - fi - - # Check a specific function in the library if requested. - # If it hasn't, just pick a random function from libc, just to make - # sure the linker can find the library being tested. - if test $ac_vmw_have_lib_header -eq 1; then - if test -n "fuse_main"; then - ac_vmw_function=fuse_main - else - ac_vmw_function=strlen - fi - as_ac_Lib=`echo "ac_cv_lib_fuse_$ac_vmw_function" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_vmw_function in -lfuse" >&5 -echo $ECHO_N "checking for $ac_vmw_function in -lfuse... $ECHO_C" >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lfuse $ac_vmw_custom_libs $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 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 -char $ac_vmw_function (); -int -main () -{ -return $ac_vmw_function (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_Lib=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" -fi - -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 -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - ac_vmw_have_lib_func=1 -fi - - fi - - if test $ac_vmw_have_lib_func -eq 1 && test $ac_vmw_have_lib_header -eq 1; then - FUSE_CPPFLAGS="${CUSTOM_FUSE_CPPFLAGS}" - FUSE_LIBS="$ac_vmw_custom_libs" - ac_vmw_have_lib=1 - fi - fi - - # If that didn't work, try with pkg-config. - if test $ac_vmw_have_lib -eq 0 && test "$HAVE_PKG_CONFIG" = "yes" && test -n "fuse"; then - if test -n ""; then - { echo "$as_me:$LINENO: checking for fuse >= (via pkg-config)" >&5 -echo $ECHO_N "checking for fuse >= (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists 'fuse >= '; then - ac_vmw_have_lib=1 - fi - else - { echo "$as_me:$LINENO: checking for fuse (via pkg-config)" >&5 -echo $ECHO_N "checking for fuse (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists 'fuse'; then - ac_vmw_have_lib=1 - fi - fi - - if test $ac_vmw_have_lib -eq 1; then - # Sometimes pkg-config might fail; for example, "pkg-config gtk+-2.0 --cflags" - # fails on OpenSolaris B71. So be pessimistic. - ac_vmw_cppflags="`pkg-config --cflags fuse`" - ac_vmw_ret1=$? - ac_vmw_libs="`pkg-config --libs fuse`" - ac_vmw_ret2=$? - if test $ac_vmw_ret1 -eq 0 && test $ac_vmw_ret2 -eq 0; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - FUSE_CPPFLAGS="$ac_vmw_cppflags" - FUSE_LIBS="$ac_vmw_libs" - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - - # If we still haven't found the lib, try with the library's custom "config" script. - # Before checking, flush the AC_PATH_PROG cached variable. - unset ac_cv_path_ac_vmw_lib_cfg - unset ac_vmw_lib_cfg - if test $ac_vmw_have_lib -eq 0 && test -n ""; then - # Extract the first word of "", so it can be a program name with args. -set dummy ; 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_path_ac_vmw_lib_cfg+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_vmw_lib_cfg in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_vmw_lib_cfg="$ac_vmw_lib_cfg" # Let the user override the test with a path. - ;; - *) - 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_path_ac_vmw_lib_cfg="$as_dir/$ac_word$ac_exec_ext" - 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_path_ac_vmw_lib_cfg" && ac_cv_path_ac_vmw_lib_cfg="no" - ;; -esac -fi -ac_vmw_lib_cfg=$ac_cv_path_ac_vmw_lib_cfg -if test -n "$ac_vmw_lib_cfg"; then - { echo "$as_me:$LINENO: result: $ac_vmw_lib_cfg" >&5 -echo "${ECHO_T}$ac_vmw_lib_cfg" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "$ac_vmw_lib_cfg" != "no"; then - # XXX: icu-config does not follow the "--cflags" and "--libs" convention, - # so single it out here to avoid having to replicate all the rest of the - # logic elsewhere. - if test `basename "$ac_vmw_lib_cfg"` = "icu-config"; then - FUSE_CPPFLAGS="`$ac_vmw_lib_cfg --cppflags`" - FUSE_LIBS="`$ac_vmw_lib_cfg --ldflags`" - else - FUSE_CPPFLAGS="`$ac_vmw_lib_cfg --cflags`" - FUSE_LIBS="`$ac_vmw_lib_cfg --libs`" - fi - ac_vmw_have_lib=1 - fi - fi - - # Finish by executing the user provided action. The call to "true" is needed - # because the actions are optional, and we need something inside the block. - if test $ac_vmw_have_lib -eq 1; then - - - true - have_fuse=yes - else - true - have_fuse=no; - { echo "$as_me:$LINENO: WARNING: Fuse is missing, vmblock-fuse/vmhgfs-fuse will be disabled." >&5 -echo "$as_me: WARNING: Fuse is missing, vmblock-fuse/vmhgfs-fuse will be disabled." >&2;} - fi - - -# -# Check for PAM. -# - -# Check whether --with-pam was given. -if test "${with_pam+set}" = set; then - withval=$with_pam; -else - with_pam=yes -fi - - -if test "$with_pam" = "yes"; then - - if test -z "$CUSTOM_PAM_CPPFLAGS"; then - if test "$os" = freebsd; then - CUSTOM_PAM_CPPFLAGS="-I/usr/local/include" - else - CUSTOM_PAM_CPPFLAGS="-I/usr/include" - fi - if test -n ""; then - CUSTOM_PAM_CPPFLAGS="${CUSTOM_PAM_CPPFLAGS}/" - fi - fi - - - - if test -z "pam"; then - { { echo "$as_me:$LINENO: error: 'library' parameter is required.'" >&5 -echo "$as_me: error: 'library' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - if test -z "PAM"; then - { { echo "$as_me:$LINENO: error: 'lvar' parameter is required.'" >&5 -echo "$as_me: error: 'lvar' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - - ac_vmw_have_lib=0 - ac_vmw_have_lib_func=0 - ac_vmw_have_lib_header=0 - ac_vmw_custom_libs= - - # - # First, try any user-defined CUSTOM_* flags. - # - if test -n "${CUSTOM_PAM_CPPFLAGS}" || test -n "${CUSTOM_PAM_LIBS}"; then - ac_vmw_custom_libs="${CUSTOM_PAM_LIBS} -lpam" - if test -n "security/pam_appl.h"; then - ORIGINAL_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="${CUSTOM_PAM_CPPFLAGS} $CPPFLAGS" - - if test "${ac_cv_header_security_pam_appl_h+set}" = set; then - { echo "$as_me:$LINENO: checking for security/pam_appl.h" >&5 -echo $ECHO_N "checking for security/pam_appl.h... $ECHO_C" >&6; } -if test "${ac_cv_header_security_pam_appl_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_security_pam_appl_h" >&5 -echo "${ECHO_T}$ac_cv_header_security_pam_appl_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking security/pam_appl.h usability" >&5 -echo $ECHO_N "checking security/pam_appl.h 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 -_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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core 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 security/pam_appl.h presence" >&5 -echo $ECHO_N "checking security/pam_appl.h 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 -_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 "echo \"\$as_me:$LINENO: $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 && { - 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 -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: security/pam_appl.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: security/pam_appl.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: security/pam_appl.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: security/pam_appl.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: security/pam_appl.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: security/pam_appl.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: security/pam_appl.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: security/pam_appl.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: security/pam_appl.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for security/pam_appl.h" >&5 -echo $ECHO_N "checking for security/pam_appl.h... $ECHO_C" >&6; } -if test "${ac_cv_header_security_pam_appl_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_security_pam_appl_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_security_pam_appl_h" >&5 -echo "${ECHO_T}$ac_cv_header_security_pam_appl_h" >&6; } - -fi -if test $ac_cv_header_security_pam_appl_h = yes; then - ac_vmw_have_lib_header=1 -fi - - - - CPPFLAGS="$ORIGINAL_CPPFLAGS" - else - ac_vmw_have_lib_header=1 - fi - - # Check a specific function in the library if requested. - # If it hasn't, just pick a random function from libc, just to make - # sure the linker can find the library being tested. - if test $ac_vmw_have_lib_header -eq 1; then - if test -n "pam_start"; then - ac_vmw_function=pam_start - else - ac_vmw_function=strlen - fi - as_ac_Lib=`echo "ac_cv_lib_pam_$ac_vmw_function" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_vmw_function in -lpam" >&5 -echo $ECHO_N "checking for $ac_vmw_function in -lpam... $ECHO_C" >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpam $ac_vmw_custom_libs $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 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 -char $ac_vmw_function (); -int -main () -{ -return $ac_vmw_function (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_Lib=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" -fi - -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 -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - ac_vmw_have_lib_func=1 -fi - - fi - - if test $ac_vmw_have_lib_func -eq 1 && test $ac_vmw_have_lib_header -eq 1; then - PAM_CPPFLAGS="${CUSTOM_PAM_CPPFLAGS}" - PAM_LIBS="$ac_vmw_custom_libs" - ac_vmw_have_lib=1 - fi - fi - - # If that didn't work, try with pkg-config. - if test $ac_vmw_have_lib -eq 0 && test "$HAVE_PKG_CONFIG" = "yes" && test -n ""; then - if test -n ""; then - { echo "$as_me:$LINENO: checking for >= (via pkg-config)" >&5 -echo $ECHO_N "checking for >= (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists ' >= '; then - ac_vmw_have_lib=1 - fi - else - { echo "$as_me:$LINENO: checking for (via pkg-config)" >&5 -echo $ECHO_N "checking for (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists ''; then - ac_vmw_have_lib=1 - fi - fi - - if test $ac_vmw_have_lib -eq 1; then - # Sometimes pkg-config might fail; for example, "pkg-config gtk+-2.0 --cflags" - # fails on OpenSolaris B71. So be pessimistic. - ac_vmw_cppflags="`pkg-config --cflags `" - ac_vmw_ret1=$? - ac_vmw_libs="`pkg-config --libs `" - ac_vmw_ret2=$? - if test $ac_vmw_ret1 -eq 0 && test $ac_vmw_ret2 -eq 0; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - PAM_CPPFLAGS="$ac_vmw_cppflags" - PAM_LIBS="$ac_vmw_libs" - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - - # If we still haven't found the lib, try with the library's custom "config" script. - # Before checking, flush the AC_PATH_PROG cached variable. - unset ac_cv_path_ac_vmw_lib_cfg - unset ac_vmw_lib_cfg - if test $ac_vmw_have_lib -eq 0 && test -n ""; then - # Extract the first word of "", so it can be a program name with args. -set dummy ; 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_path_ac_vmw_lib_cfg+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_vmw_lib_cfg in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_vmw_lib_cfg="$ac_vmw_lib_cfg" # Let the user override the test with a path. - ;; - *) - 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_path_ac_vmw_lib_cfg="$as_dir/$ac_word$ac_exec_ext" - 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_path_ac_vmw_lib_cfg" && ac_cv_path_ac_vmw_lib_cfg="no" - ;; -esac -fi -ac_vmw_lib_cfg=$ac_cv_path_ac_vmw_lib_cfg -if test -n "$ac_vmw_lib_cfg"; then - { echo "$as_me:$LINENO: result: $ac_vmw_lib_cfg" >&5 -echo "${ECHO_T}$ac_vmw_lib_cfg" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "$ac_vmw_lib_cfg" != "no"; then - # XXX: icu-config does not follow the "--cflags" and "--libs" convention, - # so single it out here to avoid having to replicate all the rest of the - # logic elsewhere. - if test `basename "$ac_vmw_lib_cfg"` = "icu-config"; then - PAM_CPPFLAGS="`$ac_vmw_lib_cfg --cppflags`" - PAM_LIBS="`$ac_vmw_lib_cfg --ldflags`" - else - PAM_CPPFLAGS="`$ac_vmw_lib_cfg --cflags`" - PAM_LIBS="`$ac_vmw_lib_cfg --libs`" - fi - ac_vmw_have_lib=1 - fi - fi - - # Finish by executing the user provided action. The call to "true" is needed - # because the actions are optional, and we need something inside the block. - if test $ac_vmw_have_lib -eq 1; then - - - true - PAM_CPPFLAGS="$PAM_CPPFLAGS -DUSE_PAM" - else - true - - feature="" - if test -z "$feature"; then - feature="PAM" - fi - { { echo "$as_me:$LINENO: error: Cannot find PAM library. Please configure without $feature (using --without-pam), or install the PAM libraries and devel package(s)." >&5 -echo "$as_me: error: Cannot find PAM library. Please configure without $feature (using --without-pam), or install the PAM libraries and devel package(s)." >&2;} - { (exit 1); exit 1; }; } - - fi - -fi - -# Check whether --enable-vgauth was given. -if test "${enable_vgauth+set}" = set; then - enableval=$enable_vgauth; -else - enable_vgauth=yes -fi - - -# -# Check for openssl, xerces-c and xml-security-c -# - -# Check whether --with-ssl was given. -if test "${with_ssl+set}" = set; then - withval=$with_ssl; - enable_grabbitmqproxy=no - enable_vgauth=no - -else - with_ssl=yes -fi - - - -# Check whether --with-xmlsecurity was given. -if test "${with_xmlsecurity+set}" = set; then - withval=$with_xmlsecurity; enable_vgauth=no -else - with_xmlsecurity=yes -fi - - - -# Check whether --with-xerces was given. -if test "${with_xerces+set}" = set; then - withval=$with_xerces; enable_vgauth=no -else - with_xerces=yes -fi - - -if test "$enable_vgauth" = "yes" -o "$enable_grabbitmqproxy" = "yes"; then - - if test -z "$CUSTOM_SSL_CPPFLAGS"; then - if test "$os" = freebsd; then - CUSTOM_SSL_CPPFLAGS="-I/usr/local/include" - else - CUSTOM_SSL_CPPFLAGS="-I/usr/include" - fi - if test -n ""; then - CUSTOM_SSL_CPPFLAGS="${CUSTOM_SSL_CPPFLAGS}/" - fi - fi - - - - if test -z "ssl"; then - { { echo "$as_me:$LINENO: error: 'library' parameter is required.'" >&5 -echo "$as_me: error: 'library' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - if test -z "SSL"; then - { { echo "$as_me:$LINENO: error: 'lvar' parameter is required.'" >&5 -echo "$as_me: error: 'lvar' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - - ac_vmw_have_lib=0 - ac_vmw_have_lib_func=0 - ac_vmw_have_lib_header=0 - ac_vmw_custom_libs= - - # - # First, try any user-defined CUSTOM_* flags. - # - if test -n "${CUSTOM_SSL_CPPFLAGS}" || test -n "${CUSTOM_SSL_LIBS}"; then - ac_vmw_custom_libs="${CUSTOM_SSL_LIBS} -lssl" - if test -n ""; then - ORIGINAL_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="${CUSTOM_SSL_CPPFLAGS} $CPPFLAGS" - - if test "${ac_cv_header_+set}" = set; then - { echo "$as_me:$LINENO: checking for " >&5 -echo $ECHO_N "checking for ... $ECHO_C" >&6; } -if test "${ac_cv_header_+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 -echo "${ECHO_T}$ac_cv_header_" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking usability" >&5 -echo $ECHO_N "checking 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 <> -_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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core 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 presence" >&5 -echo $ECHO_N "checking 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 <> -_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 "echo \"\$as_me:$LINENO: $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 && { - 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 -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: : accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: : accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: : proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: : proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: : present but cannot be compiled" >&5 -echo "$as_me: WARNING: : present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: : check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: : check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: : see the Autoconf documentation" >&5 -echo "$as_me: WARNING: : see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: : section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: : section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: : proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: : proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: : in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: : in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for " >&5 -echo $ECHO_N "checking for ... $ECHO_C" >&6; } -if test "${ac_cv_header_+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 -echo "${ECHO_T}$ac_cv_header_" >&6; } - -fi -if test $ac_cv_header_ = yes; then - ac_vmw_have_lib_header=1 -fi - - - - CPPFLAGS="$ORIGINAL_CPPFLAGS" - else - ac_vmw_have_lib_header=1 - fi - - # Check a specific function in the library if requested. - # If it hasn't, just pick a random function from libc, just to make - # sure the linker can find the library being tested. - if test $ac_vmw_have_lib_header -eq 1; then - if test -n ""; then - ac_vmw_function= - else - ac_vmw_function=strlen - fi - as_ac_Lib=`echo "ac_cv_lib_ssl_$ac_vmw_function" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_vmw_function in -lssl" >&5 -echo $ECHO_N "checking for $ac_vmw_function in -lssl... $ECHO_C" >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lssl $ac_vmw_custom_libs $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 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 -char $ac_vmw_function (); -int -main () -{ -return $ac_vmw_function (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_Lib=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" -fi - -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 -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - ac_vmw_have_lib_func=1 -fi - - fi - - if test $ac_vmw_have_lib_func -eq 1 && test $ac_vmw_have_lib_header -eq 1; then - SSL_CPPFLAGS="${CUSTOM_SSL_CPPFLAGS}" - SSL_LIBS="$ac_vmw_custom_libs" - ac_vmw_have_lib=1 - fi - fi - - # If that didn't work, try with pkg-config. - if test $ac_vmw_have_lib -eq 0 && test "$HAVE_PKG_CONFIG" = "yes" && test -n ""; then - if test -n ""; then - { echo "$as_me:$LINENO: checking for >= (via pkg-config)" >&5 -echo $ECHO_N "checking for >= (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists ' >= '; then - ac_vmw_have_lib=1 - fi - else - { echo "$as_me:$LINENO: checking for (via pkg-config)" >&5 -echo $ECHO_N "checking for (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists ''; then - ac_vmw_have_lib=1 - fi - fi - - if test $ac_vmw_have_lib -eq 1; then - # Sometimes pkg-config might fail; for example, "pkg-config gtk+-2.0 --cflags" - # fails on OpenSolaris B71. So be pessimistic. - ac_vmw_cppflags="`pkg-config --cflags `" - ac_vmw_ret1=$? - ac_vmw_libs="`pkg-config --libs `" - ac_vmw_ret2=$? - if test $ac_vmw_ret1 -eq 0 && test $ac_vmw_ret2 -eq 0; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - SSL_CPPFLAGS="$ac_vmw_cppflags" - SSL_LIBS="$ac_vmw_libs" - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - - # If we still haven't found the lib, try with the library's custom "config" script. - # Before checking, flush the AC_PATH_PROG cached variable. - unset ac_cv_path_ac_vmw_lib_cfg - unset ac_vmw_lib_cfg - if test $ac_vmw_have_lib -eq 0 && test -n ""; then - # Extract the first word of "", so it can be a program name with args. -set dummy ; 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_path_ac_vmw_lib_cfg+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_vmw_lib_cfg in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_vmw_lib_cfg="$ac_vmw_lib_cfg" # Let the user override the test with a path. - ;; - *) - 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_path_ac_vmw_lib_cfg="$as_dir/$ac_word$ac_exec_ext" - 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_path_ac_vmw_lib_cfg" && ac_cv_path_ac_vmw_lib_cfg="no" - ;; -esac -fi -ac_vmw_lib_cfg=$ac_cv_path_ac_vmw_lib_cfg -if test -n "$ac_vmw_lib_cfg"; then - { echo "$as_me:$LINENO: result: $ac_vmw_lib_cfg" >&5 -echo "${ECHO_T}$ac_vmw_lib_cfg" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "$ac_vmw_lib_cfg" != "no"; then - # XXX: icu-config does not follow the "--cflags" and "--libs" convention, - # so single it out here to avoid having to replicate all the rest of the - # logic elsewhere. - if test `basename "$ac_vmw_lib_cfg"` = "icu-config"; then - SSL_CPPFLAGS="`$ac_vmw_lib_cfg --cppflags`" - SSL_LIBS="`$ac_vmw_lib_cfg --ldflags`" - else - SSL_CPPFLAGS="`$ac_vmw_lib_cfg --cflags`" - SSL_LIBS="`$ac_vmw_lib_cfg --libs`" - fi - ac_vmw_have_lib=1 - fi - fi - - # Finish by executing the user provided action. The call to "true" is needed - # because the actions are optional, and we need something inside the block. - if test $ac_vmw_have_lib -eq 1; then - - - true - - else - true - - feature="" - if test -z "$feature"; then - feature="SSL" - fi - { { echo "$as_me:$LINENO: error: Cannot find SSL library. Please configure without $feature (using --without-ssl), or install the SSL libraries and devel package(s)." >&5 -echo "$as_me: error: Cannot find SSL library. Please configure without $feature (using --without-ssl), or install the SSL libraries and devel package(s)." >&2;} - { (exit 1); exit 1; }; } - - fi - -fi - -if test "$enable_vgauth" = "yes"; then - CPPFLAGS="$CPPFLAGS -DUSE_VGAUTH" - - if test -z "$CUSTOM_XERCES_CPPFLAGS"; then - if test "$os" = freebsd; then - CUSTOM_XERCES_CPPFLAGS="-I/usr/local/include" - else - CUSTOM_XERCES_CPPFLAGS="-I/usr/include" - fi - if test -n ""; then - CUSTOM_XERCES_CPPFLAGS="${CUSTOM_XERCES_CPPFLAGS}/" - fi - fi - - - - if test -z "xerces-c"; then - { { echo "$as_me:$LINENO: error: 'library' parameter is required.'" >&5 -echo "$as_me: error: 'library' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - if test -z "XERCES"; then - { { echo "$as_me:$LINENO: error: 'lvar' parameter is required.'" >&5 -echo "$as_me: error: 'lvar' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - - ac_vmw_have_lib=0 - ac_vmw_have_lib_func=0 - ac_vmw_have_lib_header=0 - ac_vmw_custom_libs= - - # - # First, try any user-defined CUSTOM_* flags. - # - if test -n "${CUSTOM_XERCES_CPPFLAGS}" || test -n "${CUSTOM_XERCES_LIBS}"; then - ac_vmw_custom_libs="${CUSTOM_XERCES_LIBS} -lxerces-c" - if test -n ""; then - ORIGINAL_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="${CUSTOM_XERCES_CPPFLAGS} $CPPFLAGS" - - if test "${ac_cv_header_+set}" = set; then - { echo "$as_me:$LINENO: checking for " >&5 -echo $ECHO_N "checking for ... $ECHO_C" >&6; } -if test "${ac_cv_header_+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 -echo "${ECHO_T}$ac_cv_header_" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking usability" >&5 -echo $ECHO_N "checking 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 <> -_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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core 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 presence" >&5 -echo $ECHO_N "checking 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 <> -_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 "echo \"\$as_me:$LINENO: $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 && { - 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 -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: : accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: : accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: : proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: : proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: : present but cannot be compiled" >&5 -echo "$as_me: WARNING: : present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: : check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: : check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: : see the Autoconf documentation" >&5 -echo "$as_me: WARNING: : see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: : section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: : section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: : proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: : proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: : in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: : in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for " >&5 -echo $ECHO_N "checking for ... $ECHO_C" >&6; } -if test "${ac_cv_header_+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 -echo "${ECHO_T}$ac_cv_header_" >&6; } - -fi -if test $ac_cv_header_ = yes; then - ac_vmw_have_lib_header=1 -fi - - - - CPPFLAGS="$ORIGINAL_CPPFLAGS" - else - ac_vmw_have_lib_header=1 - fi - - # Check a specific function in the library if requested. - # If it hasn't, just pick a random function from libc, just to make - # sure the linker can find the library being tested. - if test $ac_vmw_have_lib_header -eq 1; then - if test -n ""; then - ac_vmw_function= - else - ac_vmw_function=strlen - fi - as_ac_Lib=`echo "ac_cv_lib_xerces-c_$ac_vmw_function" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_vmw_function in -lxerces-c" >&5 -echo $ECHO_N "checking for $ac_vmw_function in -lxerces-c... $ECHO_C" >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lxerces-c $ac_vmw_custom_libs $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 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 -char $ac_vmw_function (); -int -main () -{ -return $ac_vmw_function (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_Lib=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" -fi - -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 -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - ac_vmw_have_lib_func=1 -fi - - fi - - if test $ac_vmw_have_lib_func -eq 1 && test $ac_vmw_have_lib_header -eq 1; then - XERCES_CPPFLAGS="${CUSTOM_XERCES_CPPFLAGS}" - XERCES_LIBS="$ac_vmw_custom_libs" - ac_vmw_have_lib=1 - fi - fi - - # If that didn't work, try with pkg-config. - if test $ac_vmw_have_lib -eq 0 && test "$HAVE_PKG_CONFIG" = "yes" && test -n ""; then - if test -n ""; then - { echo "$as_me:$LINENO: checking for >= (via pkg-config)" >&5 -echo $ECHO_N "checking for >= (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists ' >= '; then - ac_vmw_have_lib=1 - fi - else - { echo "$as_me:$LINENO: checking for (via pkg-config)" >&5 -echo $ECHO_N "checking for (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists ''; then - ac_vmw_have_lib=1 - fi - fi - - if test $ac_vmw_have_lib -eq 1; then - # Sometimes pkg-config might fail; for example, "pkg-config gtk+-2.0 --cflags" - # fails on OpenSolaris B71. So be pessimistic. - ac_vmw_cppflags="`pkg-config --cflags `" - ac_vmw_ret1=$? - ac_vmw_libs="`pkg-config --libs `" - ac_vmw_ret2=$? - if test $ac_vmw_ret1 -eq 0 && test $ac_vmw_ret2 -eq 0; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - XERCES_CPPFLAGS="$ac_vmw_cppflags" - XERCES_LIBS="$ac_vmw_libs" - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - - # If we still haven't found the lib, try with the library's custom "config" script. - # Before checking, flush the AC_PATH_PROG cached variable. - unset ac_cv_path_ac_vmw_lib_cfg - unset ac_vmw_lib_cfg - if test $ac_vmw_have_lib -eq 0 && test -n ""; then - # Extract the first word of "", so it can be a program name with args. -set dummy ; 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_path_ac_vmw_lib_cfg+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_vmw_lib_cfg in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_vmw_lib_cfg="$ac_vmw_lib_cfg" # Let the user override the test with a path. - ;; - *) - 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_path_ac_vmw_lib_cfg="$as_dir/$ac_word$ac_exec_ext" - 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_path_ac_vmw_lib_cfg" && ac_cv_path_ac_vmw_lib_cfg="no" - ;; -esac -fi -ac_vmw_lib_cfg=$ac_cv_path_ac_vmw_lib_cfg -if test -n "$ac_vmw_lib_cfg"; then - { echo "$as_me:$LINENO: result: $ac_vmw_lib_cfg" >&5 -echo "${ECHO_T}$ac_vmw_lib_cfg" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "$ac_vmw_lib_cfg" != "no"; then - # XXX: icu-config does not follow the "--cflags" and "--libs" convention, - # so single it out here to avoid having to replicate all the rest of the - # logic elsewhere. - if test `basename "$ac_vmw_lib_cfg"` = "icu-config"; then - XERCES_CPPFLAGS="`$ac_vmw_lib_cfg --cppflags`" - XERCES_LIBS="`$ac_vmw_lib_cfg --ldflags`" - else - XERCES_CPPFLAGS="`$ac_vmw_lib_cfg --cflags`" - XERCES_LIBS="`$ac_vmw_lib_cfg --libs`" - fi - ac_vmw_have_lib=1 - fi - fi - - # Finish by executing the user provided action. The call to "true" is needed - # because the actions are optional, and we need something inside the block. - if test $ac_vmw_have_lib -eq 1; then - - - true - - else - true - - feature="" - if test -z "$feature"; then - feature="XERCES" - fi - { { echo "$as_me:$LINENO: error: Cannot find XERCES library. Please configure without $feature (using --without-xerces-c), or install the XERCES libraries and devel package(s)." >&5 -echo "$as_me: error: Cannot find XERCES library. Please configure without $feature (using --without-xerces-c), or install the XERCES libraries and devel package(s)." >&2;} - { (exit 1); exit 1; }; } - - fi - - - - if test -z "$CUSTOM_XMLSECURITY_CPPFLAGS"; then - if test "$os" = freebsd; then - CUSTOM_XMLSECURITY_CPPFLAGS="-I/usr/local/include" - else - CUSTOM_XMLSECURITY_CPPFLAGS="-I/usr/include" - fi - if test -n ""; then - CUSTOM_XMLSECURITY_CPPFLAGS="${CUSTOM_XMLSECURITY_CPPFLAGS}/" - fi - fi - - - - if test -z "xml-security-c"; then - { { echo "$as_me:$LINENO: error: 'library' parameter is required.'" >&5 -echo "$as_me: error: 'library' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - if test -z "XMLSECURITY"; then - { { echo "$as_me:$LINENO: error: 'lvar' parameter is required.'" >&5 -echo "$as_me: error: 'lvar' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - - ac_vmw_have_lib=0 - ac_vmw_have_lib_func=0 - ac_vmw_have_lib_header=0 - ac_vmw_custom_libs= - - # - # First, try any user-defined CUSTOM_* flags. - # - if test -n "${CUSTOM_XMLSECURITY_CPPFLAGS}" || test -n "${CUSTOM_XMLSECURITY_LIBS}"; then - ac_vmw_custom_libs="${CUSTOM_XMLSECURITY_LIBS} -lxml-security-c" - if test -n ""; then - ORIGINAL_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="${CUSTOM_XMLSECURITY_CPPFLAGS} $CPPFLAGS" - - if test "${ac_cv_header_+set}" = set; then - { echo "$as_me:$LINENO: checking for " >&5 -echo $ECHO_N "checking for ... $ECHO_C" >&6; } -if test "${ac_cv_header_+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 -echo "${ECHO_T}$ac_cv_header_" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking usability" >&5 -echo $ECHO_N "checking 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 <> -_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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core 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 presence" >&5 -echo $ECHO_N "checking 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 <> -_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 "echo \"\$as_me:$LINENO: $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 && { - 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 -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: : accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: : accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: : proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: : proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: : present but cannot be compiled" >&5 -echo "$as_me: WARNING: : present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: : check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: : check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: : see the Autoconf documentation" >&5 -echo "$as_me: WARNING: : see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: : section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: : section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: : proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: : proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: : in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: : in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for " >&5 -echo $ECHO_N "checking for ... $ECHO_C" >&6; } -if test "${ac_cv_header_+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 -echo "${ECHO_T}$ac_cv_header_" >&6; } - -fi -if test $ac_cv_header_ = yes; then - ac_vmw_have_lib_header=1 -fi - - - - CPPFLAGS="$ORIGINAL_CPPFLAGS" - else - ac_vmw_have_lib_header=1 - fi - - # Check a specific function in the library if requested. - # If it hasn't, just pick a random function from libc, just to make - # sure the linker can find the library being tested. - if test $ac_vmw_have_lib_header -eq 1; then - if test -n ""; then - ac_vmw_function= - else - ac_vmw_function=strlen - fi - as_ac_Lib=`echo "ac_cv_lib_xml-security-c_$ac_vmw_function" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_vmw_function in -lxml-security-c" >&5 -echo $ECHO_N "checking for $ac_vmw_function in -lxml-security-c... $ECHO_C" >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lxml-security-c $ac_vmw_custom_libs $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 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 -char $ac_vmw_function (); -int -main () -{ -return $ac_vmw_function (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_Lib=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" -fi - -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 -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - ac_vmw_have_lib_func=1 -fi - - fi - - if test $ac_vmw_have_lib_func -eq 1 && test $ac_vmw_have_lib_header -eq 1; then - XMLSECURITY_CPPFLAGS="${CUSTOM_XMLSECURITY_CPPFLAGS}" - XMLSECURITY_LIBS="$ac_vmw_custom_libs" - ac_vmw_have_lib=1 - fi - fi - - # If that didn't work, try with pkg-config. - if test $ac_vmw_have_lib -eq 0 && test "$HAVE_PKG_CONFIG" = "yes" && test -n ""; then - if test -n ""; then - { echo "$as_me:$LINENO: checking for >= (via pkg-config)" >&5 -echo $ECHO_N "checking for >= (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists ' >= '; then - ac_vmw_have_lib=1 - fi - else - { echo "$as_me:$LINENO: checking for (via pkg-config)" >&5 -echo $ECHO_N "checking for (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists ''; then - ac_vmw_have_lib=1 - fi - fi - - if test $ac_vmw_have_lib -eq 1; then - # Sometimes pkg-config might fail; for example, "pkg-config gtk+-2.0 --cflags" - # fails on OpenSolaris B71. So be pessimistic. - ac_vmw_cppflags="`pkg-config --cflags `" - ac_vmw_ret1=$? - ac_vmw_libs="`pkg-config --libs `" - ac_vmw_ret2=$? - if test $ac_vmw_ret1 -eq 0 && test $ac_vmw_ret2 -eq 0; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - XMLSECURITY_CPPFLAGS="$ac_vmw_cppflags" - XMLSECURITY_LIBS="$ac_vmw_libs" - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - - # If we still haven't found the lib, try with the library's custom "config" script. - # Before checking, flush the AC_PATH_PROG cached variable. - unset ac_cv_path_ac_vmw_lib_cfg - unset ac_vmw_lib_cfg - if test $ac_vmw_have_lib -eq 0 && test -n ""; then - # Extract the first word of "", so it can be a program name with args. -set dummy ; 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_path_ac_vmw_lib_cfg+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_vmw_lib_cfg in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_vmw_lib_cfg="$ac_vmw_lib_cfg" # Let the user override the test with a path. - ;; - *) - 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_path_ac_vmw_lib_cfg="$as_dir/$ac_word$ac_exec_ext" - 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_path_ac_vmw_lib_cfg" && ac_cv_path_ac_vmw_lib_cfg="no" - ;; -esac -fi -ac_vmw_lib_cfg=$ac_cv_path_ac_vmw_lib_cfg -if test -n "$ac_vmw_lib_cfg"; then - { echo "$as_me:$LINENO: result: $ac_vmw_lib_cfg" >&5 -echo "${ECHO_T}$ac_vmw_lib_cfg" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "$ac_vmw_lib_cfg" != "no"; then - # XXX: icu-config does not follow the "--cflags" and "--libs" convention, - # so single it out here to avoid having to replicate all the rest of the - # logic elsewhere. - if test `basename "$ac_vmw_lib_cfg"` = "icu-config"; then - XMLSECURITY_CPPFLAGS="`$ac_vmw_lib_cfg --cppflags`" - XMLSECURITY_LIBS="`$ac_vmw_lib_cfg --ldflags`" - else - XMLSECURITY_CPPFLAGS="`$ac_vmw_lib_cfg --cflags`" - XMLSECURITY_LIBS="`$ac_vmw_lib_cfg --libs`" - fi - ac_vmw_have_lib=1 - fi - fi - - # Finish by executing the user provided action. The call to "true" is needed - # because the actions are optional, and we need something inside the block. - if test $ac_vmw_have_lib -eq 1; then - - - true - - else - true - - feature="" - if test -z "$feature"; then - feature="XMLSECURITY" - fi - { { echo "$as_me:$LINENO: error: Cannot find XMLSECURITY library. Please configure without $feature (using --without-xml-security-c), or install the XMLSECURITY libraries and devel package(s)." >&5 -echo "$as_me: error: Cannot find XMLSECURITY library. Please configure without $feature (using --without-xml-security-c), or install the XMLSECURITY libraries and devel package(s)." >&2;} - { (exit 1); exit 1; }; } - - fi - -fi - -# -# Check for CUnit and disable test code if not available. -# -if test "$enable_tests" = "auto" -o "$enable_tests" = "yes"; then - - if test -z "$CUSTOM_CUNIT_CPPFLAGS"; then - if test "$os" = freebsd; then - CUSTOM_CUNIT_CPPFLAGS="-I/usr/local/include" - else - CUSTOM_CUNIT_CPPFLAGS="-I/usr/include" - fi - if test -n ""; then - CUSTOM_CUNIT_CPPFLAGS="${CUSTOM_CUNIT_CPPFLAGS}/" - fi - fi - - - - if test -z "cunit"; then - { { echo "$as_me:$LINENO: error: 'library' parameter is required.'" >&5 -echo "$as_me: error: 'library' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - if test -z "CUNIT"; then - { { echo "$as_me:$LINENO: error: 'lvar' parameter is required.'" >&5 -echo "$as_me: error: 'lvar' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - - ac_vmw_have_lib=0 - ac_vmw_have_lib_func=0 - ac_vmw_have_lib_header=0 - ac_vmw_custom_libs= - - # - # First, try any user-defined CUSTOM_* flags. - # - if test -n "${CUSTOM_CUNIT_CPPFLAGS}" || test -n "${CUSTOM_CUNIT_LIBS}"; then - ac_vmw_custom_libs="${CUSTOM_CUNIT_LIBS} -lcunit" - if test -n "CUnit/CUnit.h"; then - ORIGINAL_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="${CUSTOM_CUNIT_CPPFLAGS} $CPPFLAGS" - - if test "${ac_cv_header_CUnit_CUnit_h+set}" = set; then - { echo "$as_me:$LINENO: checking for CUnit/CUnit.h" >&5 -echo $ECHO_N "checking for CUnit/CUnit.h... $ECHO_C" >&6; } -if test "${ac_cv_header_CUnit_CUnit_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_CUnit_CUnit_h" >&5 -echo "${ECHO_T}$ac_cv_header_CUnit_CUnit_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking CUnit/CUnit.h usability" >&5 -echo $ECHO_N "checking CUnit/CUnit.h 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 -_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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core 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 CUnit/CUnit.h presence" >&5 -echo $ECHO_N "checking CUnit/CUnit.h 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 -_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 "echo \"\$as_me:$LINENO: $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 && { - 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 -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: CUnit/CUnit.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: CUnit/CUnit.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: CUnit/CUnit.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: CUnit/CUnit.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: CUnit/CUnit.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: CUnit/CUnit.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: CUnit/CUnit.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: CUnit/CUnit.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: CUnit/CUnit.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: CUnit/CUnit.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: CUnit/CUnit.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: CUnit/CUnit.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: CUnit/CUnit.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: CUnit/CUnit.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: CUnit/CUnit.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: CUnit/CUnit.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for CUnit/CUnit.h" >&5 -echo $ECHO_N "checking for CUnit/CUnit.h... $ECHO_C" >&6; } -if test "${ac_cv_header_CUnit_CUnit_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_CUnit_CUnit_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_CUnit_CUnit_h" >&5 -echo "${ECHO_T}$ac_cv_header_CUnit_CUnit_h" >&6; } - -fi -if test $ac_cv_header_CUnit_CUnit_h = yes; then - ac_vmw_have_lib_header=1 -fi - - - - CPPFLAGS="$ORIGINAL_CPPFLAGS" - else - ac_vmw_have_lib_header=1 - fi - - # Check a specific function in the library if requested. - # If it hasn't, just pick a random function from libc, just to make - # sure the linker can find the library being tested. - if test $ac_vmw_have_lib_header -eq 1; then - if test -n "CU_initialize_registry"; then - ac_vmw_function=CU_initialize_registry - else - ac_vmw_function=strlen - fi - as_ac_Lib=`echo "ac_cv_lib_cunit_$ac_vmw_function" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_vmw_function in -lcunit" >&5 -echo $ECHO_N "checking for $ac_vmw_function in -lcunit... $ECHO_C" >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lcunit $ac_vmw_custom_libs $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 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 -char $ac_vmw_function (); -int -main () -{ -return $ac_vmw_function (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_Lib=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" -fi - -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 -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - ac_vmw_have_lib_func=1 -fi - - fi - - if test $ac_vmw_have_lib_func -eq 1 && test $ac_vmw_have_lib_header -eq 1; then - CUNIT_CPPFLAGS="${CUSTOM_CUNIT_CPPFLAGS}" - CUNIT_LIBS="$ac_vmw_custom_libs" - ac_vmw_have_lib=1 - fi - fi - - # If that didn't work, try with pkg-config. - if test $ac_vmw_have_lib -eq 0 && test "$HAVE_PKG_CONFIG" = "yes" && test -n ""; then - if test -n ""; then - { echo "$as_me:$LINENO: checking for >= (via pkg-config)" >&5 -echo $ECHO_N "checking for >= (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists ' >= '; then - ac_vmw_have_lib=1 - fi - else - { echo "$as_me:$LINENO: checking for (via pkg-config)" >&5 -echo $ECHO_N "checking for (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists ''; then - ac_vmw_have_lib=1 - fi - fi - - if test $ac_vmw_have_lib -eq 1; then - # Sometimes pkg-config might fail; for example, "pkg-config gtk+-2.0 --cflags" - # fails on OpenSolaris B71. So be pessimistic. - ac_vmw_cppflags="`pkg-config --cflags `" - ac_vmw_ret1=$? - ac_vmw_libs="`pkg-config --libs `" - ac_vmw_ret2=$? - if test $ac_vmw_ret1 -eq 0 && test $ac_vmw_ret2 -eq 0; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - CUNIT_CPPFLAGS="$ac_vmw_cppflags" - CUNIT_LIBS="$ac_vmw_libs" - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - - # If we still haven't found the lib, try with the library's custom "config" script. - # Before checking, flush the AC_PATH_PROG cached variable. - unset ac_cv_path_ac_vmw_lib_cfg - unset ac_vmw_lib_cfg - if test $ac_vmw_have_lib -eq 0 && test -n ""; then - # Extract the first word of "", so it can be a program name with args. -set dummy ; 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_path_ac_vmw_lib_cfg+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_vmw_lib_cfg in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_vmw_lib_cfg="$ac_vmw_lib_cfg" # Let the user override the test with a path. - ;; - *) - 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_path_ac_vmw_lib_cfg="$as_dir/$ac_word$ac_exec_ext" - 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_path_ac_vmw_lib_cfg" && ac_cv_path_ac_vmw_lib_cfg="no" - ;; -esac -fi -ac_vmw_lib_cfg=$ac_cv_path_ac_vmw_lib_cfg -if test -n "$ac_vmw_lib_cfg"; then - { echo "$as_me:$LINENO: result: $ac_vmw_lib_cfg" >&5 -echo "${ECHO_T}$ac_vmw_lib_cfg" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "$ac_vmw_lib_cfg" != "no"; then - # XXX: icu-config does not follow the "--cflags" and "--libs" convention, - # so single it out here to avoid having to replicate all the rest of the - # logic elsewhere. - if test `basename "$ac_vmw_lib_cfg"` = "icu-config"; then - CUNIT_CPPFLAGS="`$ac_vmw_lib_cfg --cppflags`" - CUNIT_LIBS="`$ac_vmw_lib_cfg --ldflags`" - else - CUNIT_CPPFLAGS="`$ac_vmw_lib_cfg --cflags`" - CUNIT_LIBS="`$ac_vmw_lib_cfg --libs`" - fi - ac_vmw_have_lib=1 - fi - fi - - # Finish by executing the user provided action. The call to "true" is needed - # because the actions are optional, and we need something inside the block. - if test $ac_vmw_have_lib -eq 1; then - - - true - have_cunit=yes - else - true - have_cunit=no - fi - - if test "$have_cunit" = "no"; then - if test "$enable_tests" = "yes"; then - - feature="" - if test -z "$feature"; then - feature="CUNIT" - fi - { { echo "$as_me:$LINENO: error: Cannot find CUNIT library. Please configure without $feature (using --without-cunit), or install the CUNIT libraries and devel package(s)." >&5 -echo "$as_me: error: Cannot find CUNIT library. Please configure without $feature (using --without-cunit), or install the CUNIT libraries and devel package(s)." >&2;} - { (exit 1); exit 1; }; } - - else - { echo "$as_me:$LINENO: WARNING: CUnit not found, tests won't be compiled." >&5 -echo "$as_me: WARNING: CUnit not found, tests won't be compiled." >&2;} - fi - fi -fi - -# If the user explicitly disables X11, then don't try to detect the X-related libraries -if test "$have_x" = "disabled"; then - enable_multimon="no" -elif test "$have_x" != "yes"; then - { { echo "$as_me:$LINENO: error: The X11 libraries were not found. Please configure without X11 (using --without-x), or install the libX11 devel package(s)." >&5 -echo "$as_me: error: The X11 libraries were not found. Please configure without X11 (using --without-x), or install the libX11 devel package(s)." >&2;} - { (exit 1); exit 1; }; } -else - CPPFLAGS="$CPPFLAGS $X_CFLAGS" - COMMON_XLIBS="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS" - - { echo "$as_me:$LINENO: checking for XeviQueryVersion in -lXext" >&5 -echo $ECHO_N "checking for XeviQueryVersion in -lXext... $ECHO_C" >&6; } -if test "${ac_cv_lib_Xext_XeviQueryVersion+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lXext $COMMON_XLIBS $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 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 -char XeviQueryVersion (); -int -main () -{ -return XeviQueryVersion (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_Xext_XeviQueryVersion=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_Xext_XeviQueryVersion=no -fi - -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_Xext_XeviQueryVersion" >&5 -echo "${ECHO_T}$ac_cv_lib_Xext_XeviQueryVersion" >&6; } -if test $ac_cv_lib_Xext_XeviQueryVersion = yes; then - COMMON_XLIBS="-lXext $COMMON_XLIBS" -else - { { echo "$as_me:$LINENO: error: libXext not found. Please configure without X11 (using --without-x), or install the libXext devel package(s)." >&5 -echo "$as_me: error: libXext not found. Please configure without X11 (using --without-x), or install the libXext devel package(s)." >&2;} - { (exit 1); exit 1; }; } -fi - - - { echo "$as_me:$LINENO: checking for X11/extensions/extutil.h" >&5 -echo $ECHO_N "checking for X11/extensions/extutil.h... $ECHO_C" >&6; } -if test "${ac_cv_header_X11_extensions_extutil_h+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. */ -#include - #include - -#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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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_X11_extensions_extutil_h=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_X11_extensions_extutil_h=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_extutil_h" >&5 -echo "${ECHO_T}$ac_cv_header_X11_extensions_extutil_h" >&6; } -if test $ac_cv_header_X11_extensions_extutil_h = yes; then - : -else - { { echo "$as_me:$LINENO: error: X11/extensions/extutil.h header not found - you're probably on Solaris 10 or older. Please copy that header file onto your system manually, or configure without X11 (using --without-x)." >&5 -echo "$as_me: error: X11/extensions/extutil.h header not found - you're probably on Solaris 10 or older. Please copy that header file onto your system manually, or configure without X11 (using --without-x)." >&2;} - { (exit 1); exit 1; }; } -fi - - - - if test "$enable_multimon" != "no"; then - { echo "$as_me:$LINENO: checking for XineramaQueryVersion in -lXinerama" >&5 -echo $ECHO_N "checking for XineramaQueryVersion in -lXinerama... $ECHO_C" >&6; } -if test "${ac_cv_lib_Xinerama_XineramaQueryVersion+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lXinerama $COMMON_XLIBS $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 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 -char XineramaQueryVersion (); -int -main () -{ -return XineramaQueryVersion (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_Xinerama_XineramaQueryVersion=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_Xinerama_XineramaQueryVersion=no -fi - -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_Xinerama_XineramaQueryVersion" >&5 -echo "${ECHO_T}$ac_cv_lib_Xinerama_XineramaQueryVersion" >&6; } -if test $ac_cv_lib_Xinerama_XineramaQueryVersion = yes; then - COMMON_XLIBS="-lXinerama $COMMON_XLIBS" -else - { { echo "$as_me:$LINENO: error: libXinerama not found. Please configure without multimon (using --disable-multimon), configure without X11 (using --without-x), or install the libXinerama devel package(s)." >&5 -echo "$as_me: error: libXinerama not found. Please configure without multimon (using --disable-multimon), configure without X11 (using --without-x), or install the libXinerama devel package(s)." >&2;} - { (exit 1); exit 1; }; } -fi - - fi - - { echo "$as_me:$LINENO: checking for XOpenDevice in -lXi" >&5 -echo $ECHO_N "checking for XOpenDevice in -lXi... $ECHO_C" >&6; } -if test "${ac_cv_lib_Xi_XOpenDevice+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lXi $COMMON_XLIBS $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 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 -char XOpenDevice (); -int -main () -{ -return XOpenDevice (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_Xi_XOpenDevice=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_Xi_XOpenDevice=no -fi - -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_Xi_XOpenDevice" >&5 -echo "${ECHO_T}$ac_cv_lib_Xi_XOpenDevice" >&6; } -if test $ac_cv_lib_Xi_XOpenDevice = yes; then - COMMON_XLIBS="-lXi $COMMON_XLIBS" -else - { { echo "$as_me:$LINENO: error: libXi not found. Please configure without X11 (using --without-x), or install the libXi devel package(s)." >&5 -echo "$as_me: error: libXi not found. Please configure without X11 (using --without-x), or install the libXi devel package(s)." >&2;} - { (exit 1); exit 1; }; } -fi - - - { echo "$as_me:$LINENO: checking for XRenderQueryVersion in -lXrender" >&5 -echo $ECHO_N "checking for XRenderQueryVersion in -lXrender... $ECHO_C" >&6; } -if test "${ac_cv_lib_Xrender_XRenderQueryVersion+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lXrender $COMMON_XLIBS $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 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 -char XRenderQueryVersion (); -int -main () -{ -return XRenderQueryVersion (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_Xrender_XRenderQueryVersion=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_Xrender_XRenderQueryVersion=no -fi - -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_Xrender_XRenderQueryVersion" >&5 -echo "${ECHO_T}$ac_cv_lib_Xrender_XRenderQueryVersion" >&6; } -if test $ac_cv_lib_Xrender_XRenderQueryVersion = yes; then - COMMON_XLIBS="-lXrender $COMMON_XLIBS" -else - { { echo "$as_me:$LINENO: error: libXrender not found. Please configure without X11 (using --without-x), or install the libXrender devel package(s)." >&5 -echo "$as_me: error: libXrender not found. Please configure without X11 (using --without-x), or install the libXrender devel package(s)." >&2;} - { (exit 1); exit 1; }; } -fi - - - { echo "$as_me:$LINENO: checking for XRRQueryVersion in -lXrandr" >&5 -echo $ECHO_N "checking for XRRQueryVersion in -lXrandr... $ECHO_C" >&6; } -if test "${ac_cv_lib_Xrandr_XRRQueryVersion+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lXrandr $COMMON_XLIBS $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 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 -char XRRQueryVersion (); -int -main () -{ -return XRRQueryVersion (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_Xrandr_XRRQueryVersion=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_Xrandr_XRRQueryVersion=no -fi - -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_Xrandr_XRRQueryVersion" >&5 -echo "${ECHO_T}$ac_cv_lib_Xrandr_XRRQueryVersion" >&6; } -if test $ac_cv_lib_Xrandr_XRRQueryVersion = yes; then - COMMON_XLIBS="-lXrandr $COMMON_XLIBS" -else - { { echo "$as_me:$LINENO: error: libXrandr not found. Please configure without X11 (using --without-x) or install the libXrandr devel package(s)." >&5 -echo "$as_me: error: libXrandr not found. Please configure without X11 (using --without-x) or install the libXrandr devel package(s)." >&2;} - { (exit 1); exit 1; }; } -fi - - - { echo "$as_me:$LINENO: checking for XTestQueryExtension in -lXtst" >&5 -echo $ECHO_N "checking for XTestQueryExtension in -lXtst... $ECHO_C" >&6; } -if test "${ac_cv_lib_Xtst_XTestQueryExtension+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lXtst $COMMON_XLIBS $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 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 -char XTestQueryExtension (); -int -main () -{ -return XTestQueryExtension (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_Xtst_XTestQueryExtension=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_Xtst_XTestQueryExtension=no -fi - -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_Xtst_XTestQueryExtension" >&5 -echo "${ECHO_T}$ac_cv_lib_Xtst_XTestQueryExtension" >&6; } -if test $ac_cv_lib_Xtst_XTestQueryExtension = yes; then - COMMON_XLIBS="-lXtst $COMMON_XLIBS" -else - { { echo "$as_me:$LINENO: error: libXtst not found. Please configure without X11 (using --without-x) or install the libXtst devel package(s)." >&5 -echo "$as_me: error: libXtst not found. Please configure without X11 (using --without-x) or install the libXtst devel package(s)." >&2;} - { (exit 1); exit 1; }; } -fi - - - { echo "$as_me:$LINENO: checking for SmcOpenConnection in -lSM" >&5 -echo $ECHO_N "checking for SmcOpenConnection in -lSM... $ECHO_C" >&6; } -if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lSM $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 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 -char SmcOpenConnection (); -int -main () -{ -return SmcOpenConnection (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_SM_SmcOpenConnection=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_SM_SmcOpenConnection=no -fi - -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_SM_SmcOpenConnection" >&5 -echo "${ECHO_T}$ac_cv_lib_SM_SmcOpenConnection" >&6; } -if test $ac_cv_lib_SM_SmcOpenConnection = yes; then - XSM_LIBS="-lSM -lICE" && have_xsm_lib="yes" -else - - -lICE -fi - - - - -for ac_header in X11/SM/SMlib.h X11/ICE/ICElib.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$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; } -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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core 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 -/* 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 "echo \"\$as_me:$LINENO: $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 && { - 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 -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 open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&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 - have_xsm_header="yes" -fi - -done - - if test "$have_xsm_lib" = "yes" -a "$have_xsm_header" = "yes"; then - have_xsm="yes" - fi - - { echo "$as_me:$LINENO: checking for XCompositeQueryExtension in -lXcomposite" >&5 -echo $ECHO_N "checking for XCompositeQueryExtension in -lXcomposite... $ECHO_C" >&6; } -if test "${ac_cv_lib_Xcomposite_XCompositeQueryExtension+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lXcomposite $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 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 -char XCompositeQueryExtension (); -int -main () -{ -return XCompositeQueryExtension (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_Xcomposite_XCompositeQueryExtension=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_Xcomposite_XCompositeQueryExtension=no -fi - -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_Xcomposite_XCompositeQueryExtension" >&5 -echo "${ECHO_T}$ac_cv_lib_Xcomposite_XCompositeQueryExtension" >&6; } -if test $ac_cv_lib_Xcomposite_XCompositeQueryExtension = yes; then - XCOMPOSITE_LIBS="-lXcomposite" -else - have_xcomposite="no" - -fi - - -for ac_header in X11/extensions/Xcomposite.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$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; } -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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core 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 -/* 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 "echo \"\$as_me:$LINENO: $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 && { - 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 -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 open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&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 - -else - have_xcomposite="no" -fi - -done - - if test "$have_xcomposite" != "no"; then - have_xcomposite="yes" - fi - - # Check whether we have gtk+ 2.0. - if test "$with_gtk2" != "no"; then - # gdk_display_get_default_group (added in gtk+ 2.4.0) is function currently - # needed by vmware-user. - - - if test -z "gtk-x11-2.0"; then - { { echo "$as_me:$LINENO: error: 'library' parameter is required.'" >&5 -echo "$as_me: error: 'library' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - if test -z "GTK"; then - { { echo "$as_me:$LINENO: error: 'lvar' parameter is required.'" >&5 -echo "$as_me: error: 'lvar' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - - ac_vmw_have_lib=0 - ac_vmw_have_lib_func=0 - ac_vmw_have_lib_header=0 - ac_vmw_custom_libs= - - # - # First, try any user-defined CUSTOM_* flags. - # - if test -n "${CUSTOM_GTK_CPPFLAGS}" || test -n "${CUSTOM_GTK_LIBS}"; then - ac_vmw_custom_libs="${CUSTOM_GTK_LIBS} -lgtk-x11-2.0" - if test -n "gtk/gtk.h"; then - ORIGINAL_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="${CUSTOM_GTK_CPPFLAGS} $CPPFLAGS" - - if test "${ac_cv_header_gtk_gtk_h+set}" = set; then - { echo "$as_me:$LINENO: checking for gtk/gtk.h" >&5 -echo $ECHO_N "checking for gtk/gtk.h... $ECHO_C" >&6; } -if test "${ac_cv_header_gtk_gtk_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_gtk_gtk_h" >&5 -echo "${ECHO_T}$ac_cv_header_gtk_gtk_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking gtk/gtk.h usability" >&5 -echo $ECHO_N "checking gtk/gtk.h 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 -_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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core 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 gtk/gtk.h presence" >&5 -echo $ECHO_N "checking gtk/gtk.h 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 -_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 "echo \"\$as_me:$LINENO: $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 && { - 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 -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: gtk/gtk.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: gtk/gtk.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: gtk/gtk.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: gtk/gtk.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: gtk/gtk.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: gtk/gtk.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: gtk/gtk.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: gtk/gtk.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: gtk/gtk.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: gtk/gtk.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: gtk/gtk.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: gtk/gtk.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: gtk/gtk.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: gtk/gtk.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: gtk/gtk.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: gtk/gtk.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for gtk/gtk.h" >&5 -echo $ECHO_N "checking for gtk/gtk.h... $ECHO_C" >&6; } -if test "${ac_cv_header_gtk_gtk_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_gtk_gtk_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_gtk_gtk_h" >&5 -echo "${ECHO_T}$ac_cv_header_gtk_gtk_h" >&6; } - -fi -if test $ac_cv_header_gtk_gtk_h = yes; then - ac_vmw_have_lib_header=1 -fi - - - - CPPFLAGS="$ORIGINAL_CPPFLAGS" - else - ac_vmw_have_lib_header=1 - fi - - # Check a specific function in the library if requested. - # If it hasn't, just pick a random function from libc, just to make - # sure the linker can find the library being tested. - if test $ac_vmw_have_lib_header -eq 1; then - if test -n "gdk_display_get_default_group"; then - ac_vmw_function=gdk_display_get_default_group - else - ac_vmw_function=strlen - fi - as_ac_Lib=`echo "ac_cv_lib_gtk-x11-2.0_$ac_vmw_function" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_vmw_function in -lgtk-x11-2.0" >&5 -echo $ECHO_N "checking for $ac_vmw_function in -lgtk-x11-2.0... $ECHO_C" >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lgtk-x11-2.0 $ac_vmw_custom_libs $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 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 -char $ac_vmw_function (); -int -main () -{ -return $ac_vmw_function (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_Lib=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" -fi - -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 -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - ac_vmw_have_lib_func=1 -fi - - fi - - if test $ac_vmw_have_lib_func -eq 1 && test $ac_vmw_have_lib_header -eq 1; then - GTK_CPPFLAGS="${CUSTOM_GTK_CPPFLAGS}" - GTK_LIBS="$ac_vmw_custom_libs" - ac_vmw_have_lib=1 - fi - fi - - # If that didn't work, try with pkg-config. - if test $ac_vmw_have_lib -eq 0 && test "$HAVE_PKG_CONFIG" = "yes" && test -n "gtk+-2.0"; then - if test -n "2.4.0"; then - { echo "$as_me:$LINENO: checking for gtk+-2.0 >= 2.4.0 (via pkg-config)" >&5 -echo $ECHO_N "checking for gtk+-2.0 >= 2.4.0 (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists 'gtk+-2.0 >= 2.4.0'; then - ac_vmw_have_lib=1 - fi - else - { echo "$as_me:$LINENO: checking for gtk+-2.0 (via pkg-config)" >&5 -echo $ECHO_N "checking for gtk+-2.0 (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists 'gtk+-2.0'; then - ac_vmw_have_lib=1 - fi - fi - - if test $ac_vmw_have_lib -eq 1; then - # Sometimes pkg-config might fail; for example, "pkg-config gtk+-2.0 --cflags" - # fails on OpenSolaris B71. So be pessimistic. - ac_vmw_cppflags="`pkg-config --cflags gtk+-2.0`" - ac_vmw_ret1=$? - ac_vmw_libs="`pkg-config --libs gtk+-2.0`" - ac_vmw_ret2=$? - if test $ac_vmw_ret1 -eq 0 && test $ac_vmw_ret2 -eq 0; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - GTK_CPPFLAGS="$ac_vmw_cppflags" - GTK_LIBS="$ac_vmw_libs" - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - - # If we still haven't found the lib, try with the library's custom "config" script. - # Before checking, flush the AC_PATH_PROG cached variable. - unset ac_cv_path_ac_vmw_lib_cfg - unset ac_vmw_lib_cfg - if test $ac_vmw_have_lib -eq 0 && test -n ""; then - # Extract the first word of "", so it can be a program name with args. -set dummy ; 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_path_ac_vmw_lib_cfg+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_vmw_lib_cfg in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_vmw_lib_cfg="$ac_vmw_lib_cfg" # Let the user override the test with a path. - ;; - *) - 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_path_ac_vmw_lib_cfg="$as_dir/$ac_word$ac_exec_ext" - 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_path_ac_vmw_lib_cfg" && ac_cv_path_ac_vmw_lib_cfg="no" - ;; -esac -fi -ac_vmw_lib_cfg=$ac_cv_path_ac_vmw_lib_cfg -if test -n "$ac_vmw_lib_cfg"; then - { echo "$as_me:$LINENO: result: $ac_vmw_lib_cfg" >&5 -echo "${ECHO_T}$ac_vmw_lib_cfg" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "$ac_vmw_lib_cfg" != "no"; then - # XXX: icu-config does not follow the "--cflags" and "--libs" convention, - # so single it out here to avoid having to replicate all the rest of the - # logic elsewhere. - if test `basename "$ac_vmw_lib_cfg"` = "icu-config"; then - GTK_CPPFLAGS="`$ac_vmw_lib_cfg --cppflags`" - GTK_LIBS="`$ac_vmw_lib_cfg --ldflags`" - else - GTK_CPPFLAGS="`$ac_vmw_lib_cfg --cflags`" - GTK_LIBS="`$ac_vmw_lib_cfg --libs`" - fi - ac_vmw_have_lib=1 - fi - fi - - # Finish by executing the user provided action. The call to "true" is needed - # because the actions are optional, and we need something inside the block. - if test $ac_vmw_have_lib -eq 1; then - - - true - GTK_CPPFLAGS="$GTK_CPPFLAGS -DGTK2" - else - true - { { echo "$as_me:$LINENO: error: Gtk+ 2.0 library not found or too old. Please configure without Gtk+ support (using --without-gtk2) or install the Gtk+ 2.0 devel package." >&5 -echo "$as_me: error: Gtk+ 2.0 library not found or too old. Please configure without Gtk+ support (using --without-gtk2) or install the Gtk+ 2.0 devel package." >&2;} - { (exit 1); exit 1; }; } - fi - - fi - - # - # Check for gtkmm 2.4.0 or greater. - # - - if test "$with_gtkmm" != "no"; then - CUSTOM_GTKMM_CPPFLAGS="$CUSTOM_GTKMM_CPPFLAGS $GTK_CPPFLAGS" - - - - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - - - if test -z "gtkmm-2.4"; then - { { echo "$as_me:$LINENO: error: 'library' parameter is required.'" >&5 -echo "$as_me: error: 'library' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - if test -z "GTKMM"; then - { { echo "$as_me:$LINENO: error: 'lvar' parameter is required.'" >&5 -echo "$as_me: error: 'lvar' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - - ac_vmw_have_lib=0 - ac_vmw_have_lib_func=0 - ac_vmw_have_lib_header=0 - ac_vmw_custom_libs= - - # - # First, try any user-defined CUSTOM_* flags. - # - if test -n "${CUSTOM_GTKMM_CPPFLAGS}" || test -n "${CUSTOM_GTKMM_LIBS}"; then - ac_vmw_custom_libs="${CUSTOM_GTKMM_LIBS} -lgtkmm-2.4" - if test -n "gtkmm.h"; then - ORIGINAL_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="${CUSTOM_GTKMM_CPPFLAGS} $CPPFLAGS" - - if test "${ac_cv_header_gtkmm_h+set}" = set; then - { echo "$as_me:$LINENO: checking for gtkmm.h" >&5 -echo $ECHO_N "checking for gtkmm.h... $ECHO_C" >&6; } -if test "${ac_cv_header_gtkmm_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_gtkmm_h" >&5 -echo "${ECHO_T}$ac_cv_header_gtkmm_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking gtkmm.h usability" >&5 -echo $ECHO_N "checking gtkmm.h 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 -_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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; 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 core 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 gtkmm.h presence" >&5 -echo $ECHO_N "checking gtkmm.h 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 -_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 "echo \"\$as_me:$LINENO: $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 && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.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_cxx_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: gtkmm.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: gtkmm.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: gtkmm.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: gtkmm.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: gtkmm.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: gtkmm.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: gtkmm.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: gtkmm.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: gtkmm.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: gtkmm.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: gtkmm.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: gtkmm.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: gtkmm.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: gtkmm.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: gtkmm.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: gtkmm.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for gtkmm.h" >&5 -echo $ECHO_N "checking for gtkmm.h... $ECHO_C" >&6; } -if test "${ac_cv_header_gtkmm_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_gtkmm_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_gtkmm_h" >&5 -echo "${ECHO_T}$ac_cv_header_gtkmm_h" >&6; } - -fi -if test $ac_cv_header_gtkmm_h = yes; then - ac_vmw_have_lib_header=1 -fi - - - - CPPFLAGS="$ORIGINAL_CPPFLAGS" - else - ac_vmw_have_lib_header=1 - fi - - # Check a specific function in the library if requested. - # If it hasn't, just pick a random function from libc, just to make - # sure the linker can find the library being tested. - if test $ac_vmw_have_lib_header -eq 1; then - if test -n ""; then - ac_vmw_function= - else - ac_vmw_function=strlen - fi - as_ac_Lib=`echo "ac_cv_lib_gtkmm-2.4_$ac_vmw_function" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_vmw_function in -lgtkmm-2.4" >&5 -echo $ECHO_N "checking for $ac_vmw_function in -lgtkmm-2.4... $ECHO_C" >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lgtkmm-2.4 $ac_vmw_custom_libs $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 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 -char $ac_vmw_function (); -int -main () -{ -return $ac_vmw_function (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_Lib=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" -fi - -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 -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - ac_vmw_have_lib_func=1 -fi - - fi - - if test $ac_vmw_have_lib_func -eq 1 && test $ac_vmw_have_lib_header -eq 1; then - GTKMM_CPPFLAGS="${CUSTOM_GTKMM_CPPFLAGS}" - GTKMM_LIBS="$ac_vmw_custom_libs" - ac_vmw_have_lib=1 - fi - fi - - # If that didn't work, try with pkg-config. - if test $ac_vmw_have_lib -eq 0 && test "$HAVE_PKG_CONFIG" = "yes" && test -n "gtkmm-2.4"; then - if test -n "2.4.0"; then - { echo "$as_me:$LINENO: checking for gtkmm-2.4 >= 2.4.0 (via pkg-config)" >&5 -echo $ECHO_N "checking for gtkmm-2.4 >= 2.4.0 (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists 'gtkmm-2.4 >= 2.4.0'; then - ac_vmw_have_lib=1 - fi - else - { echo "$as_me:$LINENO: checking for gtkmm-2.4 (via pkg-config)" >&5 -echo $ECHO_N "checking for gtkmm-2.4 (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists 'gtkmm-2.4'; then - ac_vmw_have_lib=1 - fi - fi - - if test $ac_vmw_have_lib -eq 1; then - # Sometimes pkg-config might fail; for example, "pkg-config gtk+-2.0 --cflags" - # fails on OpenSolaris B71. So be pessimistic. - ac_vmw_cppflags="`pkg-config --cflags gtkmm-2.4`" - ac_vmw_ret1=$? - ac_vmw_libs="`pkg-config --libs gtkmm-2.4`" - ac_vmw_ret2=$? - if test $ac_vmw_ret1 -eq 0 && test $ac_vmw_ret2 -eq 0; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - GTKMM_CPPFLAGS="$ac_vmw_cppflags" - GTKMM_LIBS="$ac_vmw_libs" - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - - # If we still haven't found the lib, try with the library's custom "config" script. - # Before checking, flush the AC_PATH_PROG cached variable. - unset ac_cv_path_ac_vmw_lib_cfg - unset ac_vmw_lib_cfg - if test $ac_vmw_have_lib -eq 0 && test -n ""; then - # Extract the first word of "", so it can be a program name with args. -set dummy ; 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_path_ac_vmw_lib_cfg+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_vmw_lib_cfg in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_vmw_lib_cfg="$ac_vmw_lib_cfg" # Let the user override the test with a path. - ;; - *) - 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_path_ac_vmw_lib_cfg="$as_dir/$ac_word$ac_exec_ext" - 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_path_ac_vmw_lib_cfg" && ac_cv_path_ac_vmw_lib_cfg="no" - ;; -esac -fi -ac_vmw_lib_cfg=$ac_cv_path_ac_vmw_lib_cfg -if test -n "$ac_vmw_lib_cfg"; then - { echo "$as_me:$LINENO: result: $ac_vmw_lib_cfg" >&5 -echo "${ECHO_T}$ac_vmw_lib_cfg" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "$ac_vmw_lib_cfg" != "no"; then - # XXX: icu-config does not follow the "--cflags" and "--libs" convention, - # so single it out here to avoid having to replicate all the rest of the - # logic elsewhere. - if test `basename "$ac_vmw_lib_cfg"` = "icu-config"; then - GTKMM_CPPFLAGS="`$ac_vmw_lib_cfg --cppflags`" - GTKMM_LIBS="`$ac_vmw_lib_cfg --ldflags`" - else - GTKMM_CPPFLAGS="`$ac_vmw_lib_cfg --cflags`" - GTKMM_LIBS="`$ac_vmw_lib_cfg --libs`" - fi - ac_vmw_have_lib=1 - fi - fi - - # Finish by executing the user provided action. The call to "true" is needed - # because the actions are optional, and we need something inside the block. - if test $ac_vmw_have_lib -eq 1; then - - - true - GTKMM_CPPFLAGS="$GTKMM_CPPFLAGS -DHAVE_GTKMM" - else - true - { { echo "$as_me:$LINENO: error: gtkmm library not found. Please install the libgtkmm devel package(s), or re-configure using --without-gtkmm." >&5 -echo "$as_me: error: gtkmm library not found. Please install the libgtkmm devel package(s), or re-configure using --without-gtkmm." >&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 - - - fi -fi # End of checks for X libraries - -{ echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5 -echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6; } -if test "${ac_cv_lib_crypt_crypt+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lcrypt $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 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 -char crypt (); -int -main () -{ -return crypt (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_crypt_crypt=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_crypt_crypt=no -fi - -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_crypt_crypt" >&5 -echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6; } -if test $ac_cv_lib_crypt_crypt = yes; then - HAVE_CRYPT="yes" -else - { { echo "$as_me:$LINENO: error: libcrypt not found. Please install the libc/libcrypt devel package(s)." >&5 -echo "$as_me: error: libcrypt not found. Please install the libc/libcrypt devel package(s)." >&2;} - { (exit 1); exit 1; }; } -fi - - - -for ac_func in dlopen -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 { as_var=$as_ac_var; eval "test \"\${$as_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 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 -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 -#endif - -int -main () -{ -return $ac_func (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -else - { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $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 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 -char dlopen (); -int -main () -{ -return dlopen (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_dl_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dl_dlopen=no -fi - -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_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } -if test $ac_cv_lib_dl_dlopen = yes; then - VIX_LIBADD="$VIX_LIBADD -ldl" - LIBVMTOOLS_LIBADD="$LIBVMTOOLS_LIBADD -ldl" - VGAUTH_LIBADD="$VGAUTH_LIBADD -ldl" - -else - { { echo "$as_me:$LINENO: error: dlopen was not found, but is required for open-vm-tools to function properly. Please contact your OS vendor." >&5 -echo "$as_me: error: dlopen was not found, but is required for open-vm-tools to function properly. Please contact your OS vendor." >&2;} - { (exit 1); exit 1; }; } -fi - -fi -done - - - -for ac_func in ecvt -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 { as_var=$as_ac_var; eval "test \"\${$as_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 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 -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 -#endif - -int -main () -{ -return $ac_func (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -for ac_func in fcvt -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 { as_var=$as_ac_var; eval "test \"\${$as_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 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 -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 -#endif - -int -main () -{ -return $ac_func (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -if test "$os" = "freebsd" -a "$osVersion" -ge 600000; then - { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lthr" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lthr... $ECHO_C" >&6; } -if test "${ac_cv_lib_thr_pthread_mutex_init+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lthr $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 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 -char pthread_mutex_init (); -int -main () -{ -return pthread_mutex_init (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_thr_pthread_mutex_init=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_thr_pthread_mutex_init=no -fi - -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_thr_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_thr_pthread_mutex_init" >&6; } -if test $ac_cv_lib_thr_pthread_mutex_init = yes; then - THREAD_LIB=-lthr -else - { { echo "$as_me:$LINENO: error: Unable to locate required threading library libthr." >&5 -echo "$as_me: error: Unable to locate required threading library libthr." >&2;} - { (exit 1); exit 1; }; } -fi - -else - { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6; } -if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpthread $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 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 -char pthread_mutex_init (); -int -main () -{ -return pthread_mutex_init (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_pthread_pthread_mutex_init=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_pthread_pthread_mutex_init=no -fi - -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_pthread_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6; } -if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then - THREAD_LIB=-lpthread -else - { { echo "$as_me:$LINENO: error: libpthread not found. Please install the libc/libpthread devel package(s)." >&5 -echo "$as_me: error: libpthread not found. Please install the libc/libpthread devel package(s)." >&2;} - { (exit 1); exit 1; }; } -fi - -fi - -# PAM prefix - -# Check whether --with-pam-prefix was given. -if test "${with_pam_prefix+set}" = set; then - withval=$with_pam_prefix; PAM_PREFIX="$withval" -else - PAM_PREFIX='$(sysconfdir)' -fi - - -if test "$os" = "linux"; then - -# Check whether --with-procps was given. -if test "${with_procps+set}" = set; then - withval=$with_procps; -else - with_procps=yes -fi - -else - with_procps="no" -fi - -if test "$with_procps" = "yes"; then - - have_procps=no - - if test -z "$CUSTOM_PROCPS_NAME" && test -z "$CUSTOM_PROCPS_LIBS"; then - # See if we have procps-ng (that finally supports pkg-config). - - - if test -z "procps-ng"; then - { { echo "$as_me:$LINENO: error: 'library' parameter is required.'" >&5 -echo "$as_me: error: 'library' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - if test -z "PROCPS"; then - { { echo "$as_me:$LINENO: error: 'lvar' parameter is required.'" >&5 -echo "$as_me: error: 'lvar' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - - ac_vmw_have_lib=0 - ac_vmw_have_lib_func=0 - ac_vmw_have_lib_header=0 - ac_vmw_custom_libs= - - # - # First, try any user-defined CUSTOM_* flags. - # - if test -n "${CUSTOM_PROCPS_CPPFLAGS}" || test -n "${CUSTOM_PROCPS_LIBS}"; then - ac_vmw_custom_libs="${CUSTOM_PROCPS_LIBS} -lprocps-ng" - if test -n ""; then - ORIGINAL_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="${CUSTOM_PROCPS_CPPFLAGS} $CPPFLAGS" - - if test "${ac_cv_header_+set}" = set; then - { echo "$as_me:$LINENO: checking for " >&5 -echo $ECHO_N "checking for ... $ECHO_C" >&6; } -if test "${ac_cv_header_+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 -echo "${ECHO_T}$ac_cv_header_" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking usability" >&5 -echo $ECHO_N "checking 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 <> -_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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core 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 presence" >&5 -echo $ECHO_N "checking 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 <> -_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 "echo \"\$as_me:$LINENO: $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 && { - 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 -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: : accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: : accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: : proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: : proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: : present but cannot be compiled" >&5 -echo "$as_me: WARNING: : present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: : check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: : check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: : see the Autoconf documentation" >&5 -echo "$as_me: WARNING: : see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: : section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: : section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: : proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: : proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: : in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: : in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for " >&5 -echo $ECHO_N "checking for ... $ECHO_C" >&6; } -if test "${ac_cv_header_+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 -echo "${ECHO_T}$ac_cv_header_" >&6; } - -fi -if test $ac_cv_header_ = yes; then - ac_vmw_have_lib_header=1 -fi - - - - CPPFLAGS="$ORIGINAL_CPPFLAGS" - else - ac_vmw_have_lib_header=1 - fi - - # Check a specific function in the library if requested. - # If it hasn't, just pick a random function from libc, just to make - # sure the linker can find the library being tested. - if test $ac_vmw_have_lib_header -eq 1; then - if test -n ""; then - ac_vmw_function= - else - ac_vmw_function=strlen - fi - as_ac_Lib=`echo "ac_cv_lib_procps-ng_$ac_vmw_function" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_vmw_function in -lprocps-ng" >&5 -echo $ECHO_N "checking for $ac_vmw_function in -lprocps-ng... $ECHO_C" >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lprocps-ng $ac_vmw_custom_libs $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 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 -char $ac_vmw_function (); -int -main () -{ -return $ac_vmw_function (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_Lib=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" -fi - -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 -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - ac_vmw_have_lib_func=1 -fi - - fi - - if test $ac_vmw_have_lib_func -eq 1 && test $ac_vmw_have_lib_header -eq 1; then - PROCPS_CPPFLAGS="${CUSTOM_PROCPS_CPPFLAGS}" - PROCPS_LIBS="$ac_vmw_custom_libs" - ac_vmw_have_lib=1 - fi - fi - - # If that didn't work, try with pkg-config. - if test $ac_vmw_have_lib -eq 0 && test "$HAVE_PKG_CONFIG" = "yes" && test -n "libprocps"; then - if test -n ""; then - { echo "$as_me:$LINENO: checking for libprocps >= (via pkg-config)" >&5 -echo $ECHO_N "checking for libprocps >= (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists 'libprocps >= '; then - ac_vmw_have_lib=1 - fi - else - { echo "$as_me:$LINENO: checking for libprocps (via pkg-config)" >&5 -echo $ECHO_N "checking for libprocps (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists 'libprocps'; then - ac_vmw_have_lib=1 - fi - fi - - if test $ac_vmw_have_lib -eq 1; then - # Sometimes pkg-config might fail; for example, "pkg-config gtk+-2.0 --cflags" - # fails on OpenSolaris B71. So be pessimistic. - ac_vmw_cppflags="`pkg-config --cflags libprocps`" - ac_vmw_ret1=$? - ac_vmw_libs="`pkg-config --libs libprocps`" - ac_vmw_ret2=$? - if test $ac_vmw_ret1 -eq 0 && test $ac_vmw_ret2 -eq 0; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - PROCPS_CPPFLAGS="$ac_vmw_cppflags" - PROCPS_LIBS="$ac_vmw_libs" - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - - # If we still haven't found the lib, try with the library's custom "config" script. - # Before checking, flush the AC_PATH_PROG cached variable. - unset ac_cv_path_ac_vmw_lib_cfg - unset ac_vmw_lib_cfg - if test $ac_vmw_have_lib -eq 0 && test -n ""; then - # Extract the first word of "", so it can be a program name with args. -set dummy ; 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_path_ac_vmw_lib_cfg+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_vmw_lib_cfg in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_vmw_lib_cfg="$ac_vmw_lib_cfg" # Let the user override the test with a path. - ;; - *) - 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_path_ac_vmw_lib_cfg="$as_dir/$ac_word$ac_exec_ext" - 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_path_ac_vmw_lib_cfg" && ac_cv_path_ac_vmw_lib_cfg="no" - ;; -esac -fi -ac_vmw_lib_cfg=$ac_cv_path_ac_vmw_lib_cfg -if test -n "$ac_vmw_lib_cfg"; then - { echo "$as_me:$LINENO: result: $ac_vmw_lib_cfg" >&5 -echo "${ECHO_T}$ac_vmw_lib_cfg" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "$ac_vmw_lib_cfg" != "no"; then - # XXX: icu-config does not follow the "--cflags" and "--libs" convention, - # so single it out here to avoid having to replicate all the rest of the - # logic elsewhere. - if test `basename "$ac_vmw_lib_cfg"` = "icu-config"; then - PROCPS_CPPFLAGS="`$ac_vmw_lib_cfg --cppflags`" - PROCPS_LIBS="`$ac_vmw_lib_cfg --ldflags`" - else - PROCPS_CPPFLAGS="`$ac_vmw_lib_cfg --cflags`" - PROCPS_LIBS="`$ac_vmw_lib_cfg --libs`" - fi - ac_vmw_have_lib=1 - fi - fi - - # Finish by executing the user provided action. The call to "true" is needed - # because the actions are optional, and we need something inside the block. - if test $ac_vmw_have_lib -eq 1; then - - - true - - have_procps=yes; - - else - true - - fi - - fi - - if test "$have_procps" = "no"; then - # Let's see if there is an older procps version, one that does not - # support pkg-config. - if test -z "$CUSTOM_PROCPS_NAME"; then - CUSTOM_PROCPS_NAME=proc - fi - - # XXX: no pkg-config and no procps-config means we need to - # hard-code a sensible default. - if test -z "$CUSTOM_PROCPS_LIBS"; then - CUSTOM_PROCPS_LIBS="-L/lib" - fi - - # Some distros provide libproc-${version}.so only, others provide the - # libproc.so symlink. Try both to see what sticks (but only try the 3.2.7 - # and 3.2.8 versions - adding every possible version here would be a mess). - # - # Users can help by providing CUSTOM_PROCPS_NAME / CUSTOM_PROCPS_LIBS if - # necessary. - - - if test -z "$CUSTOM_PROCPS_NAME"; then - { { echo "$as_me:$LINENO: error: 'library' parameter is required.'" >&5 -echo "$as_me: error: 'library' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - if test -z "PROCPS"; then - { { echo "$as_me:$LINENO: error: 'lvar' parameter is required.'" >&5 -echo "$as_me: error: 'lvar' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - - ac_vmw_have_lib=0 - ac_vmw_have_lib_func=0 - ac_vmw_have_lib_header=0 - ac_vmw_custom_libs= - - # - # First, try any user-defined CUSTOM_* flags. - # - if test -n "${CUSTOM_PROCPS_CPPFLAGS}" || test -n "${CUSTOM_PROCPS_LIBS}"; then - ac_vmw_custom_libs="${CUSTOM_PROCPS_LIBS} -l$CUSTOM_PROCPS_NAME" - if test -n ""; then - ORIGINAL_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="${CUSTOM_PROCPS_CPPFLAGS} $CPPFLAGS" - - if test "${ac_cv_header_+set}" = set; then - { echo "$as_me:$LINENO: checking for " >&5 -echo $ECHO_N "checking for ... $ECHO_C" >&6; } -if test "${ac_cv_header_+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 -echo "${ECHO_T}$ac_cv_header_" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking usability" >&5 -echo $ECHO_N "checking 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 <> -_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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core 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 presence" >&5 -echo $ECHO_N "checking 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 <> -_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 "echo \"\$as_me:$LINENO: $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 && { - 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 -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: : accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: : accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: : proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: : proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: : present but cannot be compiled" >&5 -echo "$as_me: WARNING: : present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: : check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: : check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: : see the Autoconf documentation" >&5 -echo "$as_me: WARNING: : see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: : section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: : section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: : proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: : proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: : in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: : in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for " >&5 -echo $ECHO_N "checking for ... $ECHO_C" >&6; } -if test "${ac_cv_header_+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 -echo "${ECHO_T}$ac_cv_header_" >&6; } - -fi -if test $ac_cv_header_ = yes; then - ac_vmw_have_lib_header=1 -fi - - - - CPPFLAGS="$ORIGINAL_CPPFLAGS" - else - ac_vmw_have_lib_header=1 - fi - - # Check a specific function in the library if requested. - # If it hasn't, just pick a random function from libc, just to make - # sure the linker can find the library being tested. - if test $ac_vmw_have_lib_header -eq 1; then - if test -n "getstat"; then - ac_vmw_function=getstat - else - ac_vmw_function=strlen - fi - as_ac_Lib=`echo "ac_cv_lib_$CUSTOM_PROCPS_NAME''_$ac_vmw_function" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_vmw_function in -l$CUSTOM_PROCPS_NAME" >&5 -echo $ECHO_N "checking for $ac_vmw_function in -l$CUSTOM_PROCPS_NAME... $ECHO_C" >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-l$CUSTOM_PROCPS_NAME $ac_vmw_custom_libs $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 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 -char $ac_vmw_function (); -int -main () -{ -return $ac_vmw_function (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_Lib=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" -fi - -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 -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - ac_vmw_have_lib_func=1 -fi - - fi - - if test $ac_vmw_have_lib_func -eq 1 && test $ac_vmw_have_lib_header -eq 1; then - PROCPS_CPPFLAGS="${CUSTOM_PROCPS_CPPFLAGS}" - PROCPS_LIBS="$ac_vmw_custom_libs" - ac_vmw_have_lib=1 - fi - fi - - # If that didn't work, try with pkg-config. - if test $ac_vmw_have_lib -eq 0 && test "$HAVE_PKG_CONFIG" = "yes" && test -n ""; then - if test -n ""; then - { echo "$as_me:$LINENO: checking for >= (via pkg-config)" >&5 -echo $ECHO_N "checking for >= (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists ' >= '; then - ac_vmw_have_lib=1 - fi - else - { echo "$as_me:$LINENO: checking for (via pkg-config)" >&5 -echo $ECHO_N "checking for (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists ''; then - ac_vmw_have_lib=1 - fi - fi - - if test $ac_vmw_have_lib -eq 1; then - # Sometimes pkg-config might fail; for example, "pkg-config gtk+-2.0 --cflags" - # fails on OpenSolaris B71. So be pessimistic. - ac_vmw_cppflags="`pkg-config --cflags `" - ac_vmw_ret1=$? - ac_vmw_libs="`pkg-config --libs `" - ac_vmw_ret2=$? - if test $ac_vmw_ret1 -eq 0 && test $ac_vmw_ret2 -eq 0; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - PROCPS_CPPFLAGS="$ac_vmw_cppflags" - PROCPS_LIBS="$ac_vmw_libs" - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - - # If we still haven't found the lib, try with the library's custom "config" script. - # Before checking, flush the AC_PATH_PROG cached variable. - unset ac_cv_path_ac_vmw_lib_cfg - unset ac_vmw_lib_cfg - if test $ac_vmw_have_lib -eq 0 && test -n ""; then - # Extract the first word of "", so it can be a program name with args. -set dummy ; 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_path_ac_vmw_lib_cfg+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_vmw_lib_cfg in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_vmw_lib_cfg="$ac_vmw_lib_cfg" # Let the user override the test with a path. - ;; - *) - 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_path_ac_vmw_lib_cfg="$as_dir/$ac_word$ac_exec_ext" - 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_path_ac_vmw_lib_cfg" && ac_cv_path_ac_vmw_lib_cfg="no" - ;; -esac -fi -ac_vmw_lib_cfg=$ac_cv_path_ac_vmw_lib_cfg -if test -n "$ac_vmw_lib_cfg"; then - { echo "$as_me:$LINENO: result: $ac_vmw_lib_cfg" >&5 -echo "${ECHO_T}$ac_vmw_lib_cfg" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "$ac_vmw_lib_cfg" != "no"; then - # XXX: icu-config does not follow the "--cflags" and "--libs" convention, - # so single it out here to avoid having to replicate all the rest of the - # logic elsewhere. - if test `basename "$ac_vmw_lib_cfg"` = "icu-config"; then - PROCPS_CPPFLAGS="`$ac_vmw_lib_cfg --cppflags`" - PROCPS_LIBS="`$ac_vmw_lib_cfg --ldflags`" - else - PROCPS_CPPFLAGS="`$ac_vmw_lib_cfg --cflags`" - PROCPS_LIBS="`$ac_vmw_lib_cfg --libs`" - fi - ac_vmw_have_lib=1 - fi - fi - - # Finish by executing the user provided action. The call to "true" is needed - # because the actions are optional, and we need something inside the block. - if test $ac_vmw_have_lib -eq 1; then - - - true - - have_procps=yes; - - else - true - - fi - - fi - - if test "$have_procps" = "no"; then - - - if test -z "proc-3.2.8"; then - { { echo "$as_me:$LINENO: error: 'library' parameter is required.'" >&5 -echo "$as_me: error: 'library' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - if test -z "PROCPS"; then - { { echo "$as_me:$LINENO: error: 'lvar' parameter is required.'" >&5 -echo "$as_me: error: 'lvar' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - - ac_vmw_have_lib=0 - ac_vmw_have_lib_func=0 - ac_vmw_have_lib_header=0 - ac_vmw_custom_libs= - - # - # First, try any user-defined CUSTOM_* flags. - # - if test -n "${CUSTOM_PROCPS_CPPFLAGS}" || test -n "${CUSTOM_PROCPS_LIBS}"; then - ac_vmw_custom_libs="${CUSTOM_PROCPS_LIBS} -lproc-3.2.8" - if test -n ""; then - ORIGINAL_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="${CUSTOM_PROCPS_CPPFLAGS} $CPPFLAGS" - - if test "${ac_cv_header_+set}" = set; then - { echo "$as_me:$LINENO: checking for " >&5 -echo $ECHO_N "checking for ... $ECHO_C" >&6; } -if test "${ac_cv_header_+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 -echo "${ECHO_T}$ac_cv_header_" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking usability" >&5 -echo $ECHO_N "checking 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 <> -_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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core 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 presence" >&5 -echo $ECHO_N "checking 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 <> -_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 "echo \"\$as_me:$LINENO: $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 && { - 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 -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: : accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: : accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: : proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: : proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: : present but cannot be compiled" >&5 -echo "$as_me: WARNING: : present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: : check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: : check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: : see the Autoconf documentation" >&5 -echo "$as_me: WARNING: : see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: : section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: : section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: : proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: : proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: : in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: : in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for " >&5 -echo $ECHO_N "checking for ... $ECHO_C" >&6; } -if test "${ac_cv_header_+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 -echo "${ECHO_T}$ac_cv_header_" >&6; } - -fi -if test $ac_cv_header_ = yes; then - ac_vmw_have_lib_header=1 -fi - - - - CPPFLAGS="$ORIGINAL_CPPFLAGS" - else - ac_vmw_have_lib_header=1 - fi - - # Check a specific function in the library if requested. - # If it hasn't, just pick a random function from libc, just to make - # sure the linker can find the library being tested. - if test $ac_vmw_have_lib_header -eq 1; then - if test -n "getstat"; then - ac_vmw_function=getstat - else - ac_vmw_function=strlen - fi - as_ac_Lib=`echo "ac_cv_lib_proc-3.2.8_$ac_vmw_function" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_vmw_function in -lproc-3.2.8" >&5 -echo $ECHO_N "checking for $ac_vmw_function in -lproc-3.2.8... $ECHO_C" >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lproc-3.2.8 $ac_vmw_custom_libs $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 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 -char $ac_vmw_function (); -int -main () -{ -return $ac_vmw_function (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_Lib=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" -fi - -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 -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - ac_vmw_have_lib_func=1 -fi - - fi - - if test $ac_vmw_have_lib_func -eq 1 && test $ac_vmw_have_lib_header -eq 1; then - PROCPS_CPPFLAGS="${CUSTOM_PROCPS_CPPFLAGS}" - PROCPS_LIBS="$ac_vmw_custom_libs" - ac_vmw_have_lib=1 - fi - fi - - # If that didn't work, try with pkg-config. - if test $ac_vmw_have_lib -eq 0 && test "$HAVE_PKG_CONFIG" = "yes" && test -n ""; then - if test -n ""; then - { echo "$as_me:$LINENO: checking for >= (via pkg-config)" >&5 -echo $ECHO_N "checking for >= (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists ' >= '; then - ac_vmw_have_lib=1 - fi - else - { echo "$as_me:$LINENO: checking for (via pkg-config)" >&5 -echo $ECHO_N "checking for (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists ''; then - ac_vmw_have_lib=1 - fi - fi - - if test $ac_vmw_have_lib -eq 1; then - # Sometimes pkg-config might fail; for example, "pkg-config gtk+-2.0 --cflags" - # fails on OpenSolaris B71. So be pessimistic. - ac_vmw_cppflags="`pkg-config --cflags `" - ac_vmw_ret1=$? - ac_vmw_libs="`pkg-config --libs `" - ac_vmw_ret2=$? - if test $ac_vmw_ret1 -eq 0 && test $ac_vmw_ret2 -eq 0; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - PROCPS_CPPFLAGS="$ac_vmw_cppflags" - PROCPS_LIBS="$ac_vmw_libs" - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - - # If we still haven't found the lib, try with the library's custom "config" script. - # Before checking, flush the AC_PATH_PROG cached variable. - unset ac_cv_path_ac_vmw_lib_cfg - unset ac_vmw_lib_cfg - if test $ac_vmw_have_lib -eq 0 && test -n ""; then - # Extract the first word of "", so it can be a program name with args. -set dummy ; 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_path_ac_vmw_lib_cfg+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_vmw_lib_cfg in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_vmw_lib_cfg="$ac_vmw_lib_cfg" # Let the user override the test with a path. - ;; - *) - 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_path_ac_vmw_lib_cfg="$as_dir/$ac_word$ac_exec_ext" - 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_path_ac_vmw_lib_cfg" && ac_cv_path_ac_vmw_lib_cfg="no" - ;; -esac -fi -ac_vmw_lib_cfg=$ac_cv_path_ac_vmw_lib_cfg -if test -n "$ac_vmw_lib_cfg"; then - { echo "$as_me:$LINENO: result: $ac_vmw_lib_cfg" >&5 -echo "${ECHO_T}$ac_vmw_lib_cfg" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "$ac_vmw_lib_cfg" != "no"; then - # XXX: icu-config does not follow the "--cflags" and "--libs" convention, - # so single it out here to avoid having to replicate all the rest of the - # logic elsewhere. - if test `basename "$ac_vmw_lib_cfg"` = "icu-config"; then - PROCPS_CPPFLAGS="`$ac_vmw_lib_cfg --cppflags`" - PROCPS_LIBS="`$ac_vmw_lib_cfg --ldflags`" - else - PROCPS_CPPFLAGS="`$ac_vmw_lib_cfg --cflags`" - PROCPS_LIBS="`$ac_vmw_lib_cfg --libs`" - fi - ac_vmw_have_lib=1 - fi - fi - - # Finish by executing the user provided action. The call to "true" is needed - # because the actions are optional, and we need something inside the block. - if test $ac_vmw_have_lib -eq 1; then - - - true - - have_procps=yes; - - else - true - - fi - - fi - - if test "$have_procps" = "no"; then - - - if test -z "proc-3.2.7"; then - { { echo "$as_me:$LINENO: error: 'library' parameter is required.'" >&5 -echo "$as_me: error: 'library' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - if test -z "PROCPS"; then - { { echo "$as_me:$LINENO: error: 'lvar' parameter is required.'" >&5 -echo "$as_me: error: 'lvar' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - - ac_vmw_have_lib=0 - ac_vmw_have_lib_func=0 - ac_vmw_have_lib_header=0 - ac_vmw_custom_libs= - - # - # First, try any user-defined CUSTOM_* flags. - # - if test -n "${CUSTOM_PROCPS_CPPFLAGS}" || test -n "${CUSTOM_PROCPS_LIBS}"; then - ac_vmw_custom_libs="${CUSTOM_PROCPS_LIBS} -lproc-3.2.7" - if test -n ""; then - ORIGINAL_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="${CUSTOM_PROCPS_CPPFLAGS} $CPPFLAGS" - - if test "${ac_cv_header_+set}" = set; then - { echo "$as_me:$LINENO: checking for " >&5 -echo $ECHO_N "checking for ... $ECHO_C" >&6; } -if test "${ac_cv_header_+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 -echo "${ECHO_T}$ac_cv_header_" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking usability" >&5 -echo $ECHO_N "checking 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 <> -_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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core 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 presence" >&5 -echo $ECHO_N "checking 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 <> -_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 "echo \"\$as_me:$LINENO: $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 && { - 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 -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: : accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: : accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: : proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: : proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: : present but cannot be compiled" >&5 -echo "$as_me: WARNING: : present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: : check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: : check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: : see the Autoconf documentation" >&5 -echo "$as_me: WARNING: : see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: : section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: : section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: : proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: : proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: : in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: : in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for " >&5 -echo $ECHO_N "checking for ... $ECHO_C" >&6; } -if test "${ac_cv_header_+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 -echo "${ECHO_T}$ac_cv_header_" >&6; } - -fi -if test $ac_cv_header_ = yes; then - ac_vmw_have_lib_header=1 -fi - - - - CPPFLAGS="$ORIGINAL_CPPFLAGS" - else - ac_vmw_have_lib_header=1 - fi - - # Check a specific function in the library if requested. - # If it hasn't, just pick a random function from libc, just to make - # sure the linker can find the library being tested. - if test $ac_vmw_have_lib_header -eq 1; then - if test -n "getstat"; then - ac_vmw_function=getstat - else - ac_vmw_function=strlen - fi - as_ac_Lib=`echo "ac_cv_lib_proc-3.2.7_$ac_vmw_function" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_vmw_function in -lproc-3.2.7" >&5 -echo $ECHO_N "checking for $ac_vmw_function in -lproc-3.2.7... $ECHO_C" >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lproc-3.2.7 $ac_vmw_custom_libs $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 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 -char $ac_vmw_function (); -int -main () -{ -return $ac_vmw_function (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_Lib=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" -fi - -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 -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - ac_vmw_have_lib_func=1 -fi - - fi - - if test $ac_vmw_have_lib_func -eq 1 && test $ac_vmw_have_lib_header -eq 1; then - PROCPS_CPPFLAGS="${CUSTOM_PROCPS_CPPFLAGS}" - PROCPS_LIBS="$ac_vmw_custom_libs" - ac_vmw_have_lib=1 - fi - fi - - # If that didn't work, try with pkg-config. - if test $ac_vmw_have_lib -eq 0 && test "$HAVE_PKG_CONFIG" = "yes" && test -n ""; then - if test -n ""; then - { echo "$as_me:$LINENO: checking for >= (via pkg-config)" >&5 -echo $ECHO_N "checking for >= (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists ' >= '; then - ac_vmw_have_lib=1 - fi - else - { echo "$as_me:$LINENO: checking for (via pkg-config)" >&5 -echo $ECHO_N "checking for (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists ''; then - ac_vmw_have_lib=1 - fi - fi - - if test $ac_vmw_have_lib -eq 1; then - # Sometimes pkg-config might fail; for example, "pkg-config gtk+-2.0 --cflags" - # fails on OpenSolaris B71. So be pessimistic. - ac_vmw_cppflags="`pkg-config --cflags `" - ac_vmw_ret1=$? - ac_vmw_libs="`pkg-config --libs `" - ac_vmw_ret2=$? - if test $ac_vmw_ret1 -eq 0 && test $ac_vmw_ret2 -eq 0; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - PROCPS_CPPFLAGS="$ac_vmw_cppflags" - PROCPS_LIBS="$ac_vmw_libs" - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - - # If we still haven't found the lib, try with the library's custom "config" script. - # Before checking, flush the AC_PATH_PROG cached variable. - unset ac_cv_path_ac_vmw_lib_cfg - unset ac_vmw_lib_cfg - if test $ac_vmw_have_lib -eq 0 && test -n ""; then - # Extract the first word of "", so it can be a program name with args. -set dummy ; 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_path_ac_vmw_lib_cfg+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_vmw_lib_cfg in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_vmw_lib_cfg="$ac_vmw_lib_cfg" # Let the user override the test with a path. - ;; - *) - 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_path_ac_vmw_lib_cfg="$as_dir/$ac_word$ac_exec_ext" - 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_path_ac_vmw_lib_cfg" && ac_cv_path_ac_vmw_lib_cfg="no" - ;; -esac -fi -ac_vmw_lib_cfg=$ac_cv_path_ac_vmw_lib_cfg -if test -n "$ac_vmw_lib_cfg"; then - { echo "$as_me:$LINENO: result: $ac_vmw_lib_cfg" >&5 -echo "${ECHO_T}$ac_vmw_lib_cfg" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "$ac_vmw_lib_cfg" != "no"; then - # XXX: icu-config does not follow the "--cflags" and "--libs" convention, - # so single it out here to avoid having to replicate all the rest of the - # logic elsewhere. - if test `basename "$ac_vmw_lib_cfg"` = "icu-config"; then - PROCPS_CPPFLAGS="`$ac_vmw_lib_cfg --cppflags`" - PROCPS_LIBS="`$ac_vmw_lib_cfg --ldflags`" - else - PROCPS_CPPFLAGS="`$ac_vmw_lib_cfg --cflags`" - PROCPS_LIBS="`$ac_vmw_lib_cfg --libs`" - fi - ac_vmw_have_lib=1 - fi - fi - - # Finish by executing the user provided action. The call to "true" is needed - # because the actions are optional, and we need something inside the block. - if test $ac_vmw_have_lib -eq 1; then - - - true - - else - true - { { echo "$as_me:$LINENO: error: libproc not found. Please configure without procps (using --without-procps) or install procps - http://procps.sourceforge.net" >&5 -echo "$as_me: error: libproc not found. Please configure without procps (using --without-procps) or install procps - http://procps.sourceforge.net" >&2;} - { (exit 1); exit 1; }; } - fi - - fi -fi - -if test "$with_procps" != "yes"; then - -cat >>confdefs.h <<\_ACEOF -#define NO_PROCPS 1 -_ACEOF - -fi - - -# Check whether --with-dnet was given. -if test "${with_dnet+set}" = set; then - withval=$with_dnet; -else - with_dnet=yes -fi - - -have_dnet="no" -if test "$with_dnet" = "yes"; then - # On Debian, dnet is installed via the libdumbnet package. We need to - # detect this so that our source files include dumbnet.h instead of - # dnet.h, which is part of a different package altogether. - - - if test -z "dumbnet"; then - { { echo "$as_me:$LINENO: error: 'library' parameter is required.'" >&5 -echo "$as_me: error: 'library' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - if test -z "DNET"; then - { { echo "$as_me:$LINENO: error: 'lvar' parameter is required.'" >&5 -echo "$as_me: error: 'lvar' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - - ac_vmw_have_lib=0 - ac_vmw_have_lib_func=0 - ac_vmw_have_lib_header=0 - ac_vmw_custom_libs= - - # - # First, try any user-defined CUSTOM_* flags. - # - if test -n "${CUSTOM_DNET_CPPFLAGS}" || test -n "${CUSTOM_DNET_LIBS}"; then - ac_vmw_custom_libs="${CUSTOM_DNET_LIBS} -ldumbnet" - if test -n "dumbnet.h"; then - ORIGINAL_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="${CUSTOM_DNET_CPPFLAGS} $CPPFLAGS" - - if test "${ac_cv_header_dumbnet_h+set}" = set; then - { echo "$as_me:$LINENO: checking for dumbnet.h" >&5 -echo $ECHO_N "checking for dumbnet.h... $ECHO_C" >&6; } -if test "${ac_cv_header_dumbnet_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_dumbnet_h" >&5 -echo "${ECHO_T}$ac_cv_header_dumbnet_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking dumbnet.h usability" >&5 -echo $ECHO_N "checking dumbnet.h 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 -_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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core 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 dumbnet.h presence" >&5 -echo $ECHO_N "checking dumbnet.h 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 -_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 "echo \"\$as_me:$LINENO: $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 && { - 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 -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: dumbnet.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: dumbnet.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: dumbnet.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: dumbnet.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: dumbnet.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: dumbnet.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: dumbnet.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: dumbnet.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: dumbnet.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: dumbnet.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: dumbnet.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: dumbnet.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: dumbnet.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: dumbnet.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: dumbnet.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: dumbnet.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for dumbnet.h" >&5 -echo $ECHO_N "checking for dumbnet.h... $ECHO_C" >&6; } -if test "${ac_cv_header_dumbnet_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_dumbnet_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_dumbnet_h" >&5 -echo "${ECHO_T}$ac_cv_header_dumbnet_h" >&6; } - -fi -if test $ac_cv_header_dumbnet_h = yes; then - ac_vmw_have_lib_header=1 -fi - - - - CPPFLAGS="$ORIGINAL_CPPFLAGS" - else - ac_vmw_have_lib_header=1 - fi - - # Check a specific function in the library if requested. - # If it hasn't, just pick a random function from libc, just to make - # sure the linker can find the library being tested. - if test $ac_vmw_have_lib_header -eq 1; then - if test -n "intf_open"; then - ac_vmw_function=intf_open - else - ac_vmw_function=strlen - fi - as_ac_Lib=`echo "ac_cv_lib_dumbnet_$ac_vmw_function" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_vmw_function in -ldumbnet" >&5 -echo $ECHO_N "checking for $ac_vmw_function in -ldumbnet... $ECHO_C" >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldumbnet $ac_vmw_custom_libs $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 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 -char $ac_vmw_function (); -int -main () -{ -return $ac_vmw_function (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_Lib=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" -fi - -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 -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - ac_vmw_have_lib_func=1 -fi - - fi - - if test $ac_vmw_have_lib_func -eq 1 && test $ac_vmw_have_lib_header -eq 1; then - DNET_CPPFLAGS="${CUSTOM_DNET_CPPFLAGS}" - DNET_LIBS="$ac_vmw_custom_libs" - ac_vmw_have_lib=1 - fi - fi - - # If that didn't work, try with pkg-config. - if test $ac_vmw_have_lib -eq 0 && test "$HAVE_PKG_CONFIG" = "yes" && test -n ""; then - if test -n ""; then - { echo "$as_me:$LINENO: checking for >= (via pkg-config)" >&5 -echo $ECHO_N "checking for >= (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists ' >= '; then - ac_vmw_have_lib=1 - fi - else - { echo "$as_me:$LINENO: checking for (via pkg-config)" >&5 -echo $ECHO_N "checking for (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists ''; then - ac_vmw_have_lib=1 - fi - fi - - if test $ac_vmw_have_lib -eq 1; then - # Sometimes pkg-config might fail; for example, "pkg-config gtk+-2.0 --cflags" - # fails on OpenSolaris B71. So be pessimistic. - ac_vmw_cppflags="`pkg-config --cflags `" - ac_vmw_ret1=$? - ac_vmw_libs="`pkg-config --libs `" - ac_vmw_ret2=$? - if test $ac_vmw_ret1 -eq 0 && test $ac_vmw_ret2 -eq 0; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - DNET_CPPFLAGS="$ac_vmw_cppflags" - DNET_LIBS="$ac_vmw_libs" - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - - # If we still haven't found the lib, try with the library's custom "config" script. - # Before checking, flush the AC_PATH_PROG cached variable. - unset ac_cv_path_ac_vmw_lib_cfg - unset ac_vmw_lib_cfg - if test $ac_vmw_have_lib -eq 0 && test -n "dumbnet-config"; then - # Extract the first word of "dumbnet-config", so it can be a program name with args. -set dummy dumbnet-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_path_ac_vmw_lib_cfg+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_vmw_lib_cfg in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_vmw_lib_cfg="$ac_vmw_lib_cfg" # Let the user override the test with a path. - ;; - *) - 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_path_ac_vmw_lib_cfg="$as_dir/$ac_word$ac_exec_ext" - 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_path_ac_vmw_lib_cfg" && ac_cv_path_ac_vmw_lib_cfg="no" - ;; -esac -fi -ac_vmw_lib_cfg=$ac_cv_path_ac_vmw_lib_cfg -if test -n "$ac_vmw_lib_cfg"; then - { echo "$as_me:$LINENO: result: $ac_vmw_lib_cfg" >&5 -echo "${ECHO_T}$ac_vmw_lib_cfg" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "$ac_vmw_lib_cfg" != "no"; then - # XXX: icu-config does not follow the "--cflags" and "--libs" convention, - # so single it out here to avoid having to replicate all the rest of the - # logic elsewhere. - if test `basename "$ac_vmw_lib_cfg"` = "icu-config"; then - DNET_CPPFLAGS="`$ac_vmw_lib_cfg --cppflags`" - DNET_LIBS="`$ac_vmw_lib_cfg --ldflags`" - else - DNET_CPPFLAGS="`$ac_vmw_lib_cfg --cflags`" - DNET_LIBS="`$ac_vmw_lib_cfg --libs`" - fi - ac_vmw_have_lib=1 - fi - fi - - # Finish by executing the user provided action. The call to "true" is needed - # because the actions are optional, and we need something inside the block. - if test $ac_vmw_have_lib -eq 1; then - - - true - have_dnet="yes"; - -cat >>confdefs.h <<\_ACEOF -#define DNET_IS_DUMBNET 1 -_ACEOF - - else - true - - fi - - - if test $have_dnet = "no"; then - - - if test -z "dnet"; then - { { echo "$as_me:$LINENO: error: 'library' parameter is required.'" >&5 -echo "$as_me: error: 'library' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - if test -z "DNET"; then - { { echo "$as_me:$LINENO: error: 'lvar' parameter is required.'" >&5 -echo "$as_me: error: 'lvar' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - - ac_vmw_have_lib=0 - ac_vmw_have_lib_func=0 - ac_vmw_have_lib_header=0 - ac_vmw_custom_libs= - - # - # First, try any user-defined CUSTOM_* flags. - # - if test -n "${CUSTOM_DNET_CPPFLAGS}" || test -n "${CUSTOM_DNET_LIBS}"; then - ac_vmw_custom_libs="${CUSTOM_DNET_LIBS} -ldnet" - if test -n "dnet.h"; then - ORIGINAL_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="${CUSTOM_DNET_CPPFLAGS} $CPPFLAGS" - - if test "${ac_cv_header_dnet_h+set}" = set; then - { echo "$as_me:$LINENO: checking for dnet.h" >&5 -echo $ECHO_N "checking for dnet.h... $ECHO_C" >&6; } -if test "${ac_cv_header_dnet_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_dnet_h" >&5 -echo "${ECHO_T}$ac_cv_header_dnet_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking dnet.h usability" >&5 -echo $ECHO_N "checking dnet.h 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 -_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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core 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 dnet.h presence" >&5 -echo $ECHO_N "checking dnet.h 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 -_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 "echo \"\$as_me:$LINENO: $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 && { - 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 -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: dnet.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: dnet.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: dnet.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: dnet.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: dnet.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: dnet.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: dnet.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: dnet.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: dnet.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: dnet.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: dnet.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: dnet.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: dnet.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: dnet.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: dnet.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: dnet.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for dnet.h" >&5 -echo $ECHO_N "checking for dnet.h... $ECHO_C" >&6; } -if test "${ac_cv_header_dnet_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_dnet_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_dnet_h" >&5 -echo "${ECHO_T}$ac_cv_header_dnet_h" >&6; } - -fi -if test $ac_cv_header_dnet_h = yes; then - ac_vmw_have_lib_header=1 -fi - - - - CPPFLAGS="$ORIGINAL_CPPFLAGS" - else - ac_vmw_have_lib_header=1 - fi - - # Check a specific function in the library if requested. - # If it hasn't, just pick a random function from libc, just to make - # sure the linker can find the library being tested. - if test $ac_vmw_have_lib_header -eq 1; then - if test -n "intf_open"; then - ac_vmw_function=intf_open - else - ac_vmw_function=strlen - fi - as_ac_Lib=`echo "ac_cv_lib_dnet_$ac_vmw_function" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_vmw_function in -ldnet" >&5 -echo $ECHO_N "checking for $ac_vmw_function in -ldnet... $ECHO_C" >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldnet $ac_vmw_custom_libs $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 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 -char $ac_vmw_function (); -int -main () -{ -return $ac_vmw_function (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_Lib=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" -fi - -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 -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - ac_vmw_have_lib_func=1 -fi - - fi - - if test $ac_vmw_have_lib_func -eq 1 && test $ac_vmw_have_lib_header -eq 1; then - DNET_CPPFLAGS="${CUSTOM_DNET_CPPFLAGS}" - DNET_LIBS="$ac_vmw_custom_libs" - ac_vmw_have_lib=1 - fi - fi - - # If that didn't work, try with pkg-config. - if test $ac_vmw_have_lib -eq 0 && test "$HAVE_PKG_CONFIG" = "yes" && test -n ""; then - if test -n ""; then - { echo "$as_me:$LINENO: checking for >= (via pkg-config)" >&5 -echo $ECHO_N "checking for >= (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists ' >= '; then - ac_vmw_have_lib=1 - fi - else - { echo "$as_me:$LINENO: checking for (via pkg-config)" >&5 -echo $ECHO_N "checking for (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists ''; then - ac_vmw_have_lib=1 - fi - fi - - if test $ac_vmw_have_lib -eq 1; then - # Sometimes pkg-config might fail; for example, "pkg-config gtk+-2.0 --cflags" - # fails on OpenSolaris B71. So be pessimistic. - ac_vmw_cppflags="`pkg-config --cflags `" - ac_vmw_ret1=$? - ac_vmw_libs="`pkg-config --libs `" - ac_vmw_ret2=$? - if test $ac_vmw_ret1 -eq 0 && test $ac_vmw_ret2 -eq 0; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - DNET_CPPFLAGS="$ac_vmw_cppflags" - DNET_LIBS="$ac_vmw_libs" - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - - # If we still haven't found the lib, try with the library's custom "config" script. - # Before checking, flush the AC_PATH_PROG cached variable. - unset ac_cv_path_ac_vmw_lib_cfg - unset ac_vmw_lib_cfg - if test $ac_vmw_have_lib -eq 0 && test -n "dnet-config"; then - # Extract the first word of "dnet-config", so it can be a program name with args. -set dummy dnet-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_path_ac_vmw_lib_cfg+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_vmw_lib_cfg in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_vmw_lib_cfg="$ac_vmw_lib_cfg" # Let the user override the test with a path. - ;; - *) - 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_path_ac_vmw_lib_cfg="$as_dir/$ac_word$ac_exec_ext" - 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_path_ac_vmw_lib_cfg" && ac_cv_path_ac_vmw_lib_cfg="no" - ;; -esac -fi -ac_vmw_lib_cfg=$ac_cv_path_ac_vmw_lib_cfg -if test -n "$ac_vmw_lib_cfg"; then - { echo "$as_me:$LINENO: result: $ac_vmw_lib_cfg" >&5 -echo "${ECHO_T}$ac_vmw_lib_cfg" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "$ac_vmw_lib_cfg" != "no"; then - # XXX: icu-config does not follow the "--cflags" and "--libs" convention, - # so single it out here to avoid having to replicate all the rest of the - # logic elsewhere. - if test `basename "$ac_vmw_lib_cfg"` = "icu-config"; then - DNET_CPPFLAGS="`$ac_vmw_lib_cfg --cppflags`" - DNET_LIBS="`$ac_vmw_lib_cfg --ldflags`" - else - DNET_CPPFLAGS="`$ac_vmw_lib_cfg --cflags`" - DNET_LIBS="`$ac_vmw_lib_cfg --libs`" - fi - ac_vmw_have_lib=1 - fi - fi - - # Finish by executing the user provided action. The call to "true" is needed - # because the actions are optional, and we need something inside the block. - if test $ac_vmw_have_lib -eq 1; then - - - true - have_dnet="yes" - else - true - - fi - - fi - - if test $have_dnet = "no"; then - { { echo "$as_me:$LINENO: error: dnet-config was not found on your PATH. Please configure without dnet (using --without-dnet) or install dnet - http://libdnet.sourceforge.net" >&5 -echo "$as_me: error: dnet-config was not found on your PATH. Please configure without dnet (using --without-dnet) or install dnet - http://libdnet.sourceforge.net" >&2;} - { (exit 1); exit 1; }; } - fi -fi - -if test "$with_dnet" != "yes"; then - -cat >>confdefs.h <<\_ACEOF -#define NO_DNET 1 -_ACEOF - -fi - - -# Check whether --with-icu was given. -if test "${with_icu+set}" = set; then - withval=$with_icu; -else - with_icu=yes -fi - - -if test "$have_x" = "yes" -o "$with_icu" = "yes"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}$CXX", so it can be a program name with args. -set dummy ${ac_tool_prefix}$CXX; 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_cxx+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$have_cxx"; then - ac_cv_prog_have_cxx="$have_cxx" # 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_cxx="${ac_tool_prefix}$CXX" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -have_cxx=$ac_cv_prog_have_cxx -if test -n "$have_cxx"; then - { echo "$as_me:$LINENO: result: $have_cxx" >&5 -echo "${ECHO_T}$have_cxx" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_have_cxx"; then - ac_ct_have_cxx=$have_cxx - # Extract the first word of "$CXX", so it can be a program name with args. -set dummy $CXX; 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_have_cxx+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_have_cxx"; then - ac_cv_prog_ac_ct_have_cxx="$ac_ct_have_cxx" # 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_have_cxx="$CXX" - 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_have_cxx=$ac_cv_prog_ac_ct_have_cxx -if test -n "$ac_ct_have_cxx"; then - { echo "$as_me:$LINENO: result: $ac_ct_have_cxx" >&5 -echo "${ECHO_T}$ac_ct_have_cxx" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_have_cxx" = x; then - have_cxx="no" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - have_cxx=$ac_ct_have_cxx - fi -else - have_cxx="$ac_cv_prog_have_cxx" -fi - - if test "$have_cxx" = "no"; then - { { echo "$as_me:$LINENO: error: C++ compiler not found. Make sure you have a C++ compiler installed or configure without X11 (using --without-x) and without ICU (using --without-icu)." >&5 -echo "$as_me: error: C++ compiler not found. Make sure you have a C++ compiler installed or configure without X11 (using --without-x) and without ICU (using --without-icu)." >&2;} - { (exit 1); exit 1; }; } - fi -fi - -if test "$with_icu" = "yes"; then - - - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - - - if test -z "icuuc"; then - { { echo "$as_me:$LINENO: error: 'library' parameter is required.'" >&5 -echo "$as_me: error: 'library' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - if test -z "ICU"; then - { { echo "$as_me:$LINENO: error: 'lvar' parameter is required.'" >&5 -echo "$as_me: error: 'lvar' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - - ac_vmw_have_lib=0 - ac_vmw_have_lib_func=0 - ac_vmw_have_lib_header=0 - ac_vmw_custom_libs= - - # - # First, try any user-defined CUSTOM_* flags. - # - if test -n "${CUSTOM_ICU_CPPFLAGS}" || test -n "${CUSTOM_ICU_LIBS}"; then - ac_vmw_custom_libs="${CUSTOM_ICU_LIBS} -licuuc" - if test -n "unicode/utf.h"; then - ORIGINAL_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="${CUSTOM_ICU_CPPFLAGS} $CPPFLAGS" - - if test "${ac_cv_header_unicode_utf_h+set}" = set; then - { echo "$as_me:$LINENO: checking for unicode/utf.h" >&5 -echo $ECHO_N "checking for unicode/utf.h... $ECHO_C" >&6; } -if test "${ac_cv_header_unicode_utf_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_unicode_utf_h" >&5 -echo "${ECHO_T}$ac_cv_header_unicode_utf_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking unicode/utf.h usability" >&5 -echo $ECHO_N "checking unicode/utf.h 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 -_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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; 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 core 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 unicode/utf.h presence" >&5 -echo $ECHO_N "checking unicode/utf.h 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 -_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 "echo \"\$as_me:$LINENO: $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 && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.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_cxx_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: unicode/utf.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: unicode/utf.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: unicode/utf.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: unicode/utf.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: unicode/utf.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: unicode/utf.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: unicode/utf.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: unicode/utf.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: unicode/utf.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: unicode/utf.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: unicode/utf.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: unicode/utf.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: unicode/utf.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: unicode/utf.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: unicode/utf.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: unicode/utf.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for unicode/utf.h" >&5 -echo $ECHO_N "checking for unicode/utf.h... $ECHO_C" >&6; } -if test "${ac_cv_header_unicode_utf_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_unicode_utf_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_unicode_utf_h" >&5 -echo "${ECHO_T}$ac_cv_header_unicode_utf_h" >&6; } - -fi -if test $ac_cv_header_unicode_utf_h = yes; then - ac_vmw_have_lib_header=1 -fi - - - - CPPFLAGS="$ORIGINAL_CPPFLAGS" - else - ac_vmw_have_lib_header=1 - fi - - # Check a specific function in the library if requested. - # If it hasn't, just pick a random function from libc, just to make - # sure the linker can find the library being tested. - if test $ac_vmw_have_lib_header -eq 1; then - if test -n ""; then - ac_vmw_function= - else - ac_vmw_function=strlen - fi - as_ac_Lib=`echo "ac_cv_lib_icuuc_$ac_vmw_function" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_vmw_function in -licuuc" >&5 -echo $ECHO_N "checking for $ac_vmw_function in -licuuc... $ECHO_C" >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-licuuc $ac_vmw_custom_libs $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 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 -char $ac_vmw_function (); -int -main () -{ -return $ac_vmw_function (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_Lib=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" -fi - -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 -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - ac_vmw_have_lib_func=1 -fi - - fi - - if test $ac_vmw_have_lib_func -eq 1 && test $ac_vmw_have_lib_header -eq 1; then - ICU_CPPFLAGS="${CUSTOM_ICU_CPPFLAGS}" - ICU_LIBS="$ac_vmw_custom_libs" - ac_vmw_have_lib=1 - fi - fi - - # If that didn't work, try with pkg-config. - if test $ac_vmw_have_lib -eq 0 && test "$HAVE_PKG_CONFIG" = "yes" && test -n ""; then - if test -n ""; then - { echo "$as_me:$LINENO: checking for >= (via pkg-config)" >&5 -echo $ECHO_N "checking for >= (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists ' >= '; then - ac_vmw_have_lib=1 - fi - else - { echo "$as_me:$LINENO: checking for (via pkg-config)" >&5 -echo $ECHO_N "checking for (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists ''; then - ac_vmw_have_lib=1 - fi - fi - - if test $ac_vmw_have_lib -eq 1; then - # Sometimes pkg-config might fail; for example, "pkg-config gtk+-2.0 --cflags" - # fails on OpenSolaris B71. So be pessimistic. - ac_vmw_cppflags="`pkg-config --cflags `" - ac_vmw_ret1=$? - ac_vmw_libs="`pkg-config --libs `" - ac_vmw_ret2=$? - if test $ac_vmw_ret1 -eq 0 && test $ac_vmw_ret2 -eq 0; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - ICU_CPPFLAGS="$ac_vmw_cppflags" - ICU_LIBS="$ac_vmw_libs" - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - - # If we still haven't found the lib, try with the library's custom "config" script. - # Before checking, flush the AC_PATH_PROG cached variable. - unset ac_cv_path_ac_vmw_lib_cfg - unset ac_vmw_lib_cfg - if test $ac_vmw_have_lib -eq 0 && test -n "icu-config"; then - # Extract the first word of "icu-config", so it can be a program name with args. -set dummy icu-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_path_ac_vmw_lib_cfg+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_vmw_lib_cfg in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_vmw_lib_cfg="$ac_vmw_lib_cfg" # Let the user override the test with a path. - ;; - *) - 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_path_ac_vmw_lib_cfg="$as_dir/$ac_word$ac_exec_ext" - 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_path_ac_vmw_lib_cfg" && ac_cv_path_ac_vmw_lib_cfg="no" - ;; -esac -fi -ac_vmw_lib_cfg=$ac_cv_path_ac_vmw_lib_cfg -if test -n "$ac_vmw_lib_cfg"; then - { echo "$as_me:$LINENO: result: $ac_vmw_lib_cfg" >&5 -echo "${ECHO_T}$ac_vmw_lib_cfg" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "$ac_vmw_lib_cfg" != "no"; then - # XXX: icu-config does not follow the "--cflags" and "--libs" convention, - # so single it out here to avoid having to replicate all the rest of the - # logic elsewhere. - if test `basename "$ac_vmw_lib_cfg"` = "icu-config"; then - ICU_CPPFLAGS="`$ac_vmw_lib_cfg --cppflags`" - ICU_LIBS="`$ac_vmw_lib_cfg --ldflags`" - else - ICU_CPPFLAGS="`$ac_vmw_lib_cfg --cflags`" - ICU_LIBS="`$ac_vmw_lib_cfg --libs`" - fi - ac_vmw_have_lib=1 - fi - fi - - # Finish by executing the user provided action. The call to "true" is needed - # because the actions are optional, and we need something inside the block. - if test $ac_vmw_have_lib -eq 1; then - - - true - ICU_CPPFLAGS="$ICU_CPPFLAGS -DUSE_ICU" - else - true - { { echo "$as_me:$LINENO: error: ICU library not found. Please configure without ICU (using --without-icu) or install ICU - http://www.icu-project.org" >&5 -echo "$as_me: error: ICU library not found. Please configure without ICU (using --without-icu) or install ICU - http://www.icu-project.org" >&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 - - - # Check whether we have ICU >= 3.8. - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - { echo "$as_me:$LINENO: checking for ucasemap_utf8ToTitle in ICU" >&5 -echo $ECHO_N "checking for ucasemap_utf8ToTitle in ICU... $ECHO_C" >&6; } - ORIGINAL_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $ICU_CPPFLAGS" - 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 () -{ - - (void) &ucasemap_utf8ToTitle; - return 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - - ICU_CPPFLAGS="$ICU_CPPFLAGS -DHAVE_ICU_38" - { 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 - - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CPPFLAGS="$ORIGINAL_CPPFLAGS" - 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 - - - # Easier to give all modules the ICU defines/includes... - CPPFLAGS="$CPPFLAGS $ICU_CPPFLAGS" -else - CPPFLAGS="$CPPFLAGS -DNO_ICU" -fi - -# Extract the first word of "rpcgen", so it can be a program name with args. -set dummy rpcgen; 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_path_RPCGEN+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $RPCGEN in - [\\/]* | ?:[\\/]*) - ac_cv_path_RPCGEN="$RPCGEN" # Let the user override the test with a path. - ;; - *) - 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_path_RPCGEN="$as_dir/$ac_word$ac_exec_ext" - 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_path_RPCGEN" && ac_cv_path_RPCGEN=" { { echo "$as_me:$LINENO: error: rpcgen not found. Please install the libc devel package." >&5 -echo "$as_me: error: rpcgen not found. Please install the libc devel package." >&2;} - { (exit 1); exit 1; }; } " - ;; -esac -fi -RPCGEN=$ac_cv_path_RPCGEN -if test -n "$RPCGEN"; then - { echo "$as_me:$LINENO: result: $RPCGEN" >&5 -echo "${ECHO_T}$RPCGEN" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - -### -### Headers -### - - -for ac_header in crypt.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$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; } -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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core 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 -/* 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 "echo \"\$as_me:$LINENO: $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 && { - 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 -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 open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&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 - - -for ac_header in inttypes.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$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; } -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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core 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 -/* 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 "echo \"\$as_me:$LINENO: $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 && { - 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 -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 open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&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 - - -for ac_header in stdint.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$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; } -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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core 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 -/* 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 "echo \"\$as_me:$LINENO: $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 && { - 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 -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 open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&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 - - -for ac_header in stdlib.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$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; } -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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core 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 -/* 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 "echo \"\$as_me:$LINENO: $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 && { - 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 -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 open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&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 - - -for ac_header in wchar.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$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; } -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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core 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 -/* 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 "echo \"\$as_me:$LINENO: $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 && { - 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 -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 open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&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 - - -for ac_header in sys/inttypes.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$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; } -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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core 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 -/* 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 "echo \"\$as_me:$LINENO: $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 && { - 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 -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 open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&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 - - -for ac_header in sys/io.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$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; } -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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core 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 -/* 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 "echo \"\$as_me:$LINENO: $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 && { - 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 -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 open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&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 - - -for ac_header in sys/param.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$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; } -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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core 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 -/* 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 "echo \"\$as_me:$LINENO: $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 && { - 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 -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 open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&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 - # Required to make the sys/user.h check work correctly on FreeBSD - -for ac_header in sys/sysinfo.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$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; } -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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core 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 -/* 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 "echo \"\$as_me:$LINENO: $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 && { - 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 -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 open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&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 - - -for ac_header in sys/types.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$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; } -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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core 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 -/* 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 "echo \"\$as_me:$LINENO: $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 && { - 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 -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 open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&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 - - -for ac_header in sys/user.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 { as_var=$as_ac_Header; eval "test \"\${$as_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. */ - -#ifdef HAVE_SYS_PARAM_H -# 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&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 - - -for ac_header in sys/vfs.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$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; } -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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core 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 -/* 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 "echo \"\$as_me:$LINENO: $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 && { - 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 -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 open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&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 - - -for ac_header in syslimits.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$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; } -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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core 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 -/* 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 "echo \"\$as_me:$LINENO: $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 && { - 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 -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 open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&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 - - -for ac_header in unwind.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$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; } -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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core 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 -/* 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 "echo \"\$as_me:$LINENO: $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 && { - 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 -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 open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&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 - - -if test "${ac_cv_header_wchar_h+set}" = set; then - { echo "$as_me:$LINENO: checking for wchar.h" >&5 -echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; } -if test "${ac_cv_header_wchar_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5 -echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking wchar.h usability" >&5 -echo $ECHO_N "checking wchar.h 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 -_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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core 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 wchar.h presence" >&5 -echo $ECHO_N "checking wchar.h 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 -_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 "echo \"\$as_me:$LINENO: $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 && { - 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 -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: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for wchar.h" >&5 -echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; } -if test "${ac_cv_header_wchar_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_wchar_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5 -echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; } - -fi -if test $ac_cv_header_wchar_h = yes; then - HAVE_WCHAR_H="yes" -else - HAVE_WCHAR_H="no" -fi - - - -if test "$os" = "linux"; then - # Make sure kernel-headers package is installed. - if test "${ac_cv_header_linux_unistd_h+set}" = set; then - { echo "$as_me:$LINENO: checking for linux/unistd.h" >&5 -echo $ECHO_N "checking for linux/unistd.h... $ECHO_C" >&6; } -if test "${ac_cv_header_linux_unistd_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_linux_unistd_h" >&5 -echo "${ECHO_T}$ac_cv_header_linux_unistd_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking linux/unistd.h usability" >&5 -echo $ECHO_N "checking linux/unistd.h 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 -_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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core 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 linux/unistd.h presence" >&5 -echo $ECHO_N "checking linux/unistd.h 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 -_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 "echo \"\$as_me:$LINENO: $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 && { - 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 -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: linux/unistd.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: linux/unistd.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: linux/unistd.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: linux/unistd.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: linux/unistd.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: linux/unistd.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: linux/unistd.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: linux/unistd.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: linux/unistd.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: linux/unistd.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: linux/unistd.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: linux/unistd.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: linux/unistd.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: linux/unistd.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: linux/unistd.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: linux/unistd.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for linux/unistd.h" >&5 -echo $ECHO_N "checking for linux/unistd.h... $ECHO_C" >&6; } -if test "${ac_cv_header_linux_unistd_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_linux_unistd_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_linux_unistd_h" >&5 -echo "${ECHO_T}$ac_cv_header_linux_unistd_h" >&6; } - -fi -if test $ac_cv_header_linux_unistd_h = yes; then - : -else - { { echo "$as_me:$LINENO: error: linux/unistd.h is not found. Please install kernel-headers/linux-userspace-headers/linux-libc-dev package." >&5 -echo "$as_me: error: linux/unistd.h is not found. Please install kernel-headers/linux-userspace-headers/linux-libc-dev package." >&2;} - { (exit 1); exit 1; }; } -fi - - -fi - -if test "$enable_multimon" != "no"; then - { echo "$as_me:$LINENO: checking for X11/extensions/panoramiXproto.h" >&5 -echo $ECHO_N "checking for X11/extensions/panoramiXproto.h... $ECHO_C" >&6; } -if test "${ac_cv_header_X11_extensions_panoramiXproto_h+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. */ -#include - #include - -#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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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_X11_extensions_panoramiXproto_h=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_X11_extensions_panoramiXproto_h=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_panoramiXproto_h" >&5 -echo "${ECHO_T}$ac_cv_header_X11_extensions_panoramiXproto_h" >&6; } -if test $ac_cv_header_X11_extensions_panoramiXproto_h = yes; then - : -else - { { echo "$as_me:$LINENO: error: panoramiXproto.h not found. Please configure without multimon (using --disable-multimon) or install the libXinerama devel package(s)." >&5 -echo "$as_me: error: panoramiXproto.h not found. Please configure without multimon (using --disable-multimon) or install the libXinerama devel package(s)." >&2;} - { (exit 1); exit 1; }; } -fi - - -fi - -bsdPrintfWrappers=no -if test "$os" = "linux"; then - { echo "$as_me:$LINENO: checking for ecvt in -lc" >&5 -echo $ECHO_N "checking for ecvt in -lc... $ECHO_C" >&6; } -if test "${ac_cv_lib_c_ecvt+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lc $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 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 -char ecvt (); -int -main () -{ -return ecvt (); - ; - 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 "echo \"\$as_me:$LINENO: $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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_c_ecvt=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_c_ecvt=no -fi - -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_c_ecvt" >&5 -echo "${ECHO_T}$ac_cv_lib_c_ecvt" >&6; } -if test $ac_cv_lib_c_ecvt = yes; then - bsdPrintfWrappers=yes -fi - -fi - -### -### Typdefs, structs, and compiler quarks. -### -{ echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5 -echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6; } -if test "${ac_cv_header_stdbool_h+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. */ - -#include -#ifndef bool - "error: bool is not defined" -#endif -#ifndef false - "error: false is not defined" -#endif -#if false - "error: false is not 0" -#endif -#ifndef true - "error: true is not defined" -#endif -#if true != 1 - "error: true is not 1" -#endif -#ifndef __bool_true_false_are_defined - "error: __bool_true_false_are_defined is not defined" -#endif - - struct s { _Bool s: 1; _Bool t; } s; - - char a[true == 1 ? 1 : -1]; - char b[false == 0 ? 1 : -1]; - char c[__bool_true_false_are_defined == 1 ? 1 : -1]; - char d[(bool) 0.5 == true ? 1 : -1]; - bool e = &s; - char f[(_Bool) 0.0 == false ? 1 : -1]; - char g[true]; - char h[sizeof (_Bool)]; - char i[sizeof s.t]; - enum { j = false, k = true, l = false * true, m = true * 256 }; - _Bool n[m]; - char o[sizeof n == m * sizeof n[0] ? 1 : -1]; - char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; -# if defined __xlc__ || defined __GNUC__ - /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0 - reported by James Lemley on 2005-10-05; see - http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html - This test is not quite right, since xlc is allowed to - reject this program, as the initializer for xlcbug is - not one of the forms that C requires support for. - However, doing the test right would require a runtime - test, and that would make cross-compilation harder. - Let us hope that IBM fixes the xlc bug, and also adds - support for this kind of constant expression. In the - meantime, this test will reject xlc, which is OK, since - our stdbool.h substitute should suffice. We also test - this with GCC, where it should work, to detect more - quickly whether someone messes up the test in the - future. */ - char digs[] = "0123456789"; - int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1); -# endif - /* Catch a bug in an HP-UX C compiler. See - http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html - http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html - */ - _Bool q = true; - _Bool *pq = &q; - -int -main () -{ - - *pq |= q; - *pq |= ! q; - /* Refer to every declared value, to avoid compiler optimizations. */ - return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l - + !m + !n + !o + !p + !q + !pq); - - ; - 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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_stdbool_h=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_stdbool_h=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6; } -{ echo "$as_me:$LINENO: checking for _Bool" >&5 -echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; } -if test "${ac_cv_type__Bool+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. */ -$ac_includes_default -typedef _Bool ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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_type__Bool=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type__Bool=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5 -echo "${ECHO_T}$ac_cv_type__Bool" >&6; } -if test $ac_cv_type__Bool = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE__BOOL 1 -_ACEOF - - -fi - -if test $ac_cv_header_stdbool_h = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_STDBOOL_H 1 -_ACEOF - -fi - -{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 -echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; } -if test "${ac_cv_c_const+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. */ - -int -main () -{ -/* FIXME: Include the comments suggested by Paul. */ -#ifndef __cplusplus - /* Ultrix mips cc rejects this. */ - typedef int charset[2]; - const charset cs; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *pcpcc; - char **ppc; - /* NEC SVR4.0.2 mips cc rejects this. */ - struct point {int x, y;}; - static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in - an arm of an if-expression whose if-part is not a constant - expression */ - const char *g = "string"; - pcpcc = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++pcpcc; - ppc = (char**) pcpcc; - pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this. */ - char *t; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; - if (s) return 0; - } - { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; - } - { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; - } - { /* AIX XL C 1.02.0.0 rejects this saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - if (!foo) return 0; - } - return !cs[0] && !zero.x; -#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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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_const=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_c_const=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 -echo "${ECHO_T}$ac_cv_c_const" >&6; } -if test $ac_cv_c_const = no; then - -cat >>confdefs.h <<\_ACEOF -#define const -_ACEOF - -fi - -{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 -echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; } -if test "${ac_cv_type_uid_t+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. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "uid_t" >/dev/null 2>&1; then - ac_cv_type_uid_t=yes -else - ac_cv_type_uid_t=no -fi -rm -f conftest* - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 -echo "${ECHO_T}$ac_cv_type_uid_t" >&6; } -if test $ac_cv_type_uid_t = no; then - -cat >>confdefs.h <<\_ACEOF -#define uid_t int -_ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define gid_t int -_ACEOF - -fi - -{ echo "$as_me:$LINENO: checking for inline" >&5 -echo $ECHO_N "checking for inline... $ECHO_C" >&6; } -if test "${ac_cv_c_inline+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - -_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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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_inline=$ac_kw -else - 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 - test "$ac_cv_c_inline" != no && break -done - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 -echo "${ECHO_T}$ac_cv_c_inline" >&6; } - - -case $ac_cv_c_inline in - inline | yes) ;; - *) - case $ac_cv_c_inline in - no) ac_val=;; - *) ac_val=$ac_cv_c_inline;; - esac - cat >>confdefs.h <<_ACEOF -#ifndef __cplusplus -#define inline $ac_val -#endif -_ACEOF - ;; -esac - -{ echo "$as_me:$LINENO: checking for mode_t" >&5 -echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; } -if test "${ac_cv_type_mode_t+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. */ -$ac_includes_default -typedef mode_t ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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_type_mode_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_mode_t=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 -echo "${ECHO_T}$ac_cv_type_mode_t" >&6; } -if test $ac_cv_type_mode_t = yes; then - : -else - -cat >>confdefs.h <<_ACEOF -#define mode_t int -_ACEOF - -fi - -{ echo "$as_me:$LINENO: checking for off_t" >&5 -echo $ECHO_N "checking for off_t... $ECHO_C" >&6; } -if test "${ac_cv_type_off_t+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. */ -$ac_includes_default -typedef off_t ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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_type_off_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_off_t=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 -echo "${ECHO_T}$ac_cv_type_off_t" >&6; } -if test $ac_cv_type_off_t = yes; then - : -else - -cat >>confdefs.h <<_ACEOF -#define off_t long int -_ACEOF - -fi - -{ echo "$as_me:$LINENO: checking for pid_t" >&5 -echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } -if test "${ac_cv_type_pid_t+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. */ -$ac_includes_default -typedef pid_t ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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_type_pid_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_pid_t=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 -echo "${ECHO_T}$ac_cv_type_pid_t" >&6; } -if test $ac_cv_type_pid_t = yes; then - : -else - -cat >>confdefs.h <<_ACEOF -#define pid_t int -_ACEOF - -fi - -{ echo "$as_me:$LINENO: checking for size_t" >&5 -echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } -if test "${ac_cv_type_size_t+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. */ -$ac_includes_default -typedef size_t ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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_type_size_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_size_t=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -echo "${ECHO_T}$ac_cv_type_size_t" >&6; } -if test $ac_cv_type_size_t = yes; then - : -else - -cat >>confdefs.h <<_ACEOF -#define size_t unsigned int -_ACEOF - -fi - -{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5 -echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; } -if test "${ac_cv_member_struct_stat_st_rdev+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. */ -$ac_includes_default -int -main () -{ -static struct stat ac_aggr; -if (ac_aggr.st_rdev) -return 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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_member_struct_stat_st_rdev=yes -else - 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 struct stat ac_aggr; -if (sizeof ac_aggr.st_rdev) -return 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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_member_struct_stat_st_rdev=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_member_struct_stat_st_rdev=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 -{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5 -echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; } -if test $ac_cv_member_struct_stat_st_rdev = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_RDEV 1 -_ACEOF - - -fi - -{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 -echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } -if test "${ac_cv_header_time+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. */ -#include -#include -#include - -int -main () -{ -if ((struct tm *) 0) -return 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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_time=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_time=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 -echo "${ECHO_T}$ac_cv_header_time" >&6; } -if test $ac_cv_header_time = yes; then - -cat >>confdefs.h <<\_ACEOF -#define TIME_WITH_SYS_TIME 1 -_ACEOF - -fi - -{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 -echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; } -if test "${ac_cv_struct_tm+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. */ -#include -#include - -int -main () -{ -struct tm tm; - int *p = &tm.tm_sec; - return !p; - ; - 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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_struct_tm=time.h -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_struct_tm=sys/time.h -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 -echo "${ECHO_T}$ac_cv_struct_tm" >&6; } -if test $ac_cv_struct_tm = sys/time.h; then - -cat >>confdefs.h <<\_ACEOF -#define TM_IN_SYS_TIME 1 -_ACEOF - -fi - -{ echo "$as_me:$LINENO: checking for working volatile" >&5 -echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; } -if test "${ac_cv_c_volatile+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. */ - -int -main () -{ - -volatile int x; -int * volatile y = (int *) 0; -return !x && !y; - ; - 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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_volatile=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_c_volatile=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5 -echo "${ECHO_T}$ac_cv_c_volatile" >&6; } -if test $ac_cv_c_volatile = no; then - -cat >>confdefs.h <<\_ACEOF -#define volatile -_ACEOF - -fi - - -### -### Specific features and OS/arch flags / actions -### - -### General flags / actions -CFLAGS="$CFLAGS -Wall" -CFLAGS="$CFLAGS -Werror" - -# -Wno-unknown-pragmas is due to gcc not understanding '#pragma ident' -# in Xlib.h on OpenSolaris. -# Glib2 keep changing mutex APIs so we also need to disable 'deprecated' -# warnings for now (-Wno-deprecated-declarations). -for TEST_CFLAG in -Wno-pointer-sign -Wno-unused-value -fno-strict-aliasing \ - -Wno-unknown-pragmas -Wno-uninitialized -Wno-deprecated-declarations; do - { echo "$as_me:$LINENO: checking for GCC flag $TEST_CFLAG" >&5 -echo $ECHO_N "checking for GCC flag $TEST_CFLAG... $ECHO_C" >&6; } - ORIGINAL_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $TEST_CFLAG" - NEW_CFLAG="" - 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; - - ; - 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - NEW_CFLAG=" $TEST_CFLAG" - { 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 - - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS="$ORIGINAL_CFLAGS$NEW_CFLAG" -done -CPPFLAGS="$CPPFLAGS -DVMX86_TOOLS" -CPPFLAGS="$CPPFLAGS" - -# -fvisibility is used by "core service" plugins, but not required. -ORIGINAL_CFLAGS="$CFLAGS" -CFLAGS="$CFLAGS -fvisibility=hidden" -{ echo "$as_me:$LINENO: checking for GCC flag -fvisibility" >&5 -echo $ECHO_N "checking for GCC flag -fvisibility... $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. */ - -int -main () -{ -return 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - PLUGIN_CPPFLAGS="-fvisibility=hidden -DGCC_EXPLICIT_EXPORT"; - { 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 - - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -CFLAGS="$ORIGINAL_CFLAGS" - -# Detect "unused-but-set-variable" gcc warning and disable it. -ORIGINAL_CFLAGS="$CFLAGS" -CFLAGS="$CFLAGS -Wno-unused-but-set-variable" -{ echo "$as_me:$LINENO: checking for GCC flag -Wno-unused-but-set-variable" >&5 -echo $ECHO_N "checking for GCC flag -Wno-unused-but-set-variable... $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. */ - -int -main () -{ -return 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ORIGINAL_CFLAGS="$ORIGINAL_CFLAGS -Wno-unused-but-set-variable"; - { 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 - - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -CFLAGS="$ORIGINAL_CFLAGS" - - -BUILDDIR="`pwd`" - -INCLUDE_DIR="`cd $srcdir; pwd`/lib/include" -BLD_INCLUDE_DIR="$BUILDDIR/lib/include" -CPPFLAGS="-I$INCLUDE_DIR -I$BLD_INCLUDE_DIR $CPPFLAGS" - -### -### Documentation. -### - -if test "$enable_docs" = "yes"; then - # Extract the first word of "doxygen", so it can be a program name with args. -set dummy doxygen; 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_doxygen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$have_doxygen"; then - ac_cv_prog_have_doxygen="$have_doxygen" # 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_doxygen="yes" - 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_doxygen" && ac_cv_prog_have_doxygen="no" -fi -fi -have_doxygen=$ac_cv_prog_have_doxygen -if test -n "$have_doxygen"; then - { echo "$as_me:$LINENO: result: $have_doxygen" >&5 -echo "${ECHO_T}$have_doxygen" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "$have_doxygen" = "no"; then - { echo "$as_me:$LINENO: WARNING: doxygen not found; API documentation will not be generated." >&5 -echo "$as_me: WARNING: doxygen not found; API documentation will not be generated." >&2;} - else - # Extract the first word of "dot", so it can be a program name with args. -set dummy dot; 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_path_DOT+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $DOT in - [\\/]* | ?:[\\/]*) - ac_cv_path_DOT="$DOT" # Let the user override the test with a path. - ;; - *) - 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_path_DOT="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - ;; -esac -fi -DOT=$ac_cv_path_DOT -if test -n "$DOT"; then - { echo "$as_me:$LINENO: result: $DOT" >&5 -echo "${ECHO_T}$DOT" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "$DOT" = ""; then - HAVE_DOT=NO - else - DOT=`dirname $DOT` - HAVE_DOT=YES - fi - - - - # Extract the first word of "mscgen", so it can be a program name with args. -set dummy mscgen; 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_path_MSCGEN+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $MSCGEN in - [\\/]* | ?:[\\/]*) - ac_cv_path_MSCGEN="$MSCGEN" # Let the user override the test with a path. - ;; - *) - 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_path_MSCGEN="$as_dir/$ac_word$ac_exec_ext" - 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_path_MSCGEN" && ac_cv_path_MSCGEN="no" - ;; -esac -fi -MSCGEN=$ac_cv_path_MSCGEN -if test -n "$MSCGEN"; then - { echo "$as_me:$LINENO: result: $MSCGEN" >&5 -echo "${ECHO_T}$MSCGEN" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "$MSCGEN" != "no"; then - MSCGEN_DIR="`dirname $MSCGEN`" - else - MSCGEN_DIR= - fi - - fi -fi - -### -### OS/arch-specific flags / actions -### - -MODULES="" -MODULES_OS="$os" -TARGET_OS="$os" -MODULES_DIR="" -buildHgfsmounter=no - -if test "$os" = "linux"; then - MODULES_DIR="$LINUXDIR/kernel/" - - CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=64" - CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE" - CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500" - CPPFLAGS="$CPPFLAGS -D_BSD_SOURCE" - CPPFLAGS="$CPPFLAGS -D_SVID_SOURCE" - CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE" - - LIBVMTOOLS_LIBADD="$LIBVMTOOLS_LIBADD -lrt" - - # vmxnet is not supported for kernels 3.3.0 and newer - if test "$osVersion" -lt 303000; then - MODULES="$MODULES vmxnet" - fi - # See if we need vmhgfs module. Starting with 4.0.0 we use FUSE - if test "$osVersion" -lt 400000; then - MODULES="$MODULES vmhgfs" - fi - # See if we need vmci and vsock modules. Starting with 3.9 they made - # their way into mainline kernel. - if test "$osVersion" -lt 309000; then - MODULES="$MODULES vmci vsock" - fi - if test "$osVersion" -lt 300000; then - MODULES="$MODULES vmblock vmsync" - fi - buildHgfsmounter=yes -fi - -if test "$os" = "freebsd" || test "$os" = "kfreebsd-gnu"; then - LIBVMTOOLS_LIBADD="$LIBVMTOOLS_LIBADD -lkvm" - MODULES_DIR="/boot/modules" - - if test "$osVersion" -ge 302000; then - MODULES="$MODULES vmmemctl" - fi - if test "$osVersion" -ge 409000; then - MODULES="$MODULES vmxnet" - fi - if test "$osVersion" -ge 600000; then - MODULES="$MODULES vmblock" - fi - - if test "$with_kernel_modules" = "yes"; then - echo "****************************************************************" - echo " You are building FreeBSD kernel modules. Make sure you use " - echo " 'make' to build open-vm-tools, and not GNU make ('gmake'). " - echo "****************************************************************" - fi -fi - -if test "$os" = "solaris"; then - LIB_IMPERSONATE_CPPFLAGS="$LIB_IMPERSONATE_CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS" - LIB_USER_CPPFLAGS="$LIB_USER_CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS" - - LIBVMTOOLS_LIBADD="$LIBVMTOOLS_LIBADD -lsocket" - LIBVMTOOLS_LIBADD="$LIBVMTOOLS_LIBADD -lnsl" - LIBVMTOOLS_LIBADD="$LIBVMTOOLS_LIBADD -lresolv" - LIBVMTOOLS_LIBADD="$LIBVMTOOLS_LIBADD -lrpcsvc" - - # Setup defines to identify the OS version. - if test "$osVersion" -eq 509000; then - CPPFLAGS="$CPPFLAGS -DSOL9" - fi - if test "$osVersion" -eq 510000; then - CPPFLAGS="$CPPFLAGS -DSOL10" - fi - if test "$osVersion" -eq 511000; then - CPPFLAGS="$CPPFLAGS -DSOL11" - fi - - MODULES="$MODULES vmxnet vmmemctl" - - # HGFS and vmblock need Solaris 10 at least. - if test "$osVersion" -ge 510000; then - MODULES="$MODULES vmhgfs vmblock" - fi - - # vmxnet3 is built on Solaris 10 / 11 only if GLDv3 is installed. - if test "$osVersion" -gt 510000; then - if test "${ac_cv_header_sys_mac_h+set}" = set; then - { echo "$as_me:$LINENO: checking for sys/mac.h" >&5 -echo $ECHO_N "checking for sys/mac.h... $ECHO_C" >&6; } -if test "${ac_cv_header_sys_mac_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mac_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_mac_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking sys/mac.h usability" >&5 -echo $ECHO_N "checking sys/mac.h 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 -_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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_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 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core 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 sys/mac.h presence" >&5 -echo $ECHO_N "checking sys/mac.h 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 -_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 "echo \"\$as_me:$LINENO: $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 && { - 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 -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: sys/mac.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: sys/mac.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/mac.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: sys/mac.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: sys/mac.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: sys/mac.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/mac.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: sys/mac.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/mac.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: sys/mac.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/mac.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: sys/mac.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/mac.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: sys/mac.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/mac.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: sys/mac.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for sys/mac.h" >&5 -echo $ECHO_N "checking for sys/mac.h... $ECHO_C" >&6; } -if test "${ac_cv_header_sys_mac_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_sys_mac_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mac_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_mac_h" >&6; } - -fi -if test $ac_cv_header_sys_mac_h = yes; then - MODULES="$MODULES vmxnet3" -else - { echo "$as_me:$LINENO: WARNING: GLDv3 (sys/mac.h) is not installed, vmxnet3 will not be compiled." >&5 -echo "$as_me: WARNING: GLDv3 (sys/mac.h) is not installed, vmxnet3 will not be compiled." >&2;} -fi - - - fi - - if test "$with_kernel_modules" = "yes"; then - echo "****************************************************************" - echo " You are building Solaris kernel modules. Make sure you use " - echo " GNU make to build open-vm-tools. " - echo "****************************************************************" - fi -fi - - if test "$buildHgfsmounter" = "yes"; then - BUILD_HGFSMOUNTER_TRUE= - BUILD_HGFSMOUNTER_FALSE='#' -else - BUILD_HGFSMOUNTER_TRUE='#' - BUILD_HGFSMOUNTER_FALSE= -fi - - if test "$os" = "linux"; then - LINUX_TRUE= - LINUX_FALSE='#' -else - LINUX_TRUE='#' - LINUX_FALSE= -fi - - if test "$os" = "solaris"; then - SOLARIS_TRUE= - SOLARIS_FALSE='#' -else - SOLARIS_TRUE='#' - SOLARIS_FALSE= -fi - - if test "$os" = "freebsd" -o "$os" = "kfreebsd-gnu"; then - FREEBSD_TRUE= - FREEBSD_FALSE='#' -else - FREEBSD_TRUE='#' - FREEBSD_FALSE= -fi - - if test \( "$os" = "freebsd" -o "$os" = "kfreebsd-gnu" \) -a -n "$SYSDIR"; then - FREEBSD_CUSTOM_SYSDIR_TRUE= - FREEBSD_CUSTOM_SYSDIR_FALSE='#' -else - FREEBSD_CUSTOM_SYSDIR_TRUE='#' - FREEBSD_CUSTOM_SYSDIR_FALSE= -fi - - if test "$userSpaceBitness" = "32"; then - THIRTY_TWO_BIT_USERSPACE_TRUE= - THIRTY_TWO_BIT_USERSPACE_FALSE='#' -else - THIRTY_TWO_BIT_USERSPACE_TRUE='#' - THIRTY_TWO_BIT_USERSPACE_FALSE= -fi - - if test "$have_x" = "yes"; then - HAVE_X11_TRUE= - HAVE_X11_FALSE='#' -else - HAVE_X11_TRUE='#' - HAVE_X11_FALSE= -fi - - if test "$with_icu" = "yes"; then - HAVE_ICU_TRUE= - HAVE_ICU_FALSE='#' -else - HAVE_ICU_TRUE='#' - HAVE_ICU_FALSE= -fi - - if test "$with_kernel_modules" = "yes"; then - WITH_KERNEL_MODULES_TRUE= - WITH_KERNEL_MODULES_FALSE='#' -else - WITH_KERNEL_MODULES_TRUE='#' - WITH_KERNEL_MODULES_FALSE= -fi - - if test "$have_xsm" = "yes"; then - HAVE_XSM_TRUE= - HAVE_XSM_FALSE='#' -else - HAVE_XSM_TRUE='#' - HAVE_XSM_FALSE= -fi - - if test "$have_xcomposite" = "yes"; then - HAVE_XCOMPOSITE_TRUE= - HAVE_XCOMPOSITE_FALSE='#' -else - HAVE_XCOMPOSITE_TRUE='#' - HAVE_XCOMPOSITE_FALSE= -fi - - if test "$have_cunit" = "yes"; then - ENABLE_TESTS_TRUE= - ENABLE_TESTS_FALSE='#' -else - ENABLE_TESTS_TRUE='#' - ENABLE_TESTS_FALSE= -fi - - if test "$with_root_privileges" = "yes"; then - WITH_ROOT_PRIVILEGES_TRUE= - WITH_ROOT_PRIVILEGES_FALSE='#' -else - WITH_ROOT_PRIVILEGES_TRUE='#' - WITH_ROOT_PRIVILEGES_FALSE= -fi - - if test "$have_dnet" = "yes"; then - HAVE_DNET_TRUE= - HAVE_DNET_FALSE='#' -else - HAVE_DNET_TRUE='#' - HAVE_DNET_FALSE= -fi - - if test "$have_doxygen" = "yes"; then - HAVE_DOXYGEN_TRUE= - HAVE_DOXYGEN_FALSE='#' -else - HAVE_DOXYGEN_TRUE='#' - HAVE_DOXYGEN_FALSE= -fi - - if test "$have_fuse" = "yes"; then - HAVE_FUSE_TRUE= - HAVE_FUSE_FALSE='#' -else - HAVE_FUSE_TRUE='#' - HAVE_FUSE_FALSE= -fi - - if test "$with_gnu_ld" = "yes"; then - HAVE_GNU_LD_TRUE= - HAVE_GNU_LD_FALSE='#' -else - HAVE_GNU_LD_TRUE='#' - HAVE_GNU_LD_FALSE= -fi - - if test "$have_x" = "yes" -a "$with_gtkmm" = "yes"; then - HAVE_GTKMM_TRUE= - HAVE_GTKMM_FALSE='#' -else - HAVE_GTKMM_TRUE='#' - HAVE_GTKMM_FALSE= -fi - - if test "$with_pam" = "yes"; then - HAVE_PAM_TRUE= - HAVE_PAM_FALSE='#' -else - HAVE_PAM_TRUE='#' - HAVE_PAM_FALSE= -fi - - if test "$os" = "linux"; then - USE_SLASH_PROC_TRUE= - USE_SLASH_PROC_FALSE='#' -else - USE_SLASH_PROC_TRUE='#' - USE_SLASH_PROC_FALSE= -fi - - if test "$bsdPrintfWrappers" = "yes"; then - USE_PRINTF_WRAPPERS_TRUE= - USE_PRINTF_WRAPPERS_FALSE='#' -else - USE_PRINTF_WRAPPERS_TRUE='#' - USE_PRINTF_WRAPPERS_FALSE= -fi - - if test "$enable_deploypkg" = "yes"; then - ENABLE_DEPLOYPKG_TRUE= - ENABLE_DEPLOYPKG_FALSE='#' -else - ENABLE_DEPLOYPKG_TRUE='#' - ENABLE_DEPLOYPKG_FALSE= -fi - - if test "$enable_grabbitmqproxy" = "yes"; then - ENABLE_GRABBITMQPROXY_TRUE= - ENABLE_GRABBITMQPROXY_FALSE='#' -else - ENABLE_GRABBITMQPROXY_TRUE='#' - ENABLE_GRABBITMQPROXY_FALSE= -fi - - if test "$enable_vgauth" = "yes"; then - ENABLE_VGAUTH_TRUE= - ENABLE_VGAUTH_FALSE='#' -else - ENABLE_VGAUTH_TRUE='#' - ENABLE_VGAUTH_FALSE= -fi - - if test "$os" = "linux"; then - HAVE_VSOCK_TRUE= - HAVE_VSOCK_FALSE='#' -else - HAVE_VSOCK_TRUE='#' - HAVE_VSOCK_FALSE= -fi - - -if test "$have_xsm" != "yes"; then -cat >>confdefs.h <<\_ACEOF -#define NO_XSM 1 -_ACEOF - -fi - -if test "$have_xcomposite" != "yes"; then - cat >>confdefs.h <<\_ACEOF -#define NO_XCOMPOSITE 1 -_ACEOF - -fi - -### Feature-specific flags / actions -# Combine where possible - -# If control reaches this point and multimon is still enabled, then we know -# all of the tests for required components have passed and it's safe to allow -# multimon. Otherwise, it should be disabled. -if test "$enable_multimon" = "no"; then - # XXX: For consistency, change this to ENABLE_MULTIMON. This will require - # some additional code cleanup. - -cat >>confdefs.h <<\_ACEOF -#define NO_MULTIMON 1 -_ACEOF - -fi - -LIB_AUTH_CPPFLAGS="$LIB_AUTH_CPPFLAGS $PAM_CPPFLAGS" -if test "$HAVE_CRYPT" = "yes"; then - LIBVMTOOLS_LIBADD="$LIBVMTOOLS_LIBADD -lcrypt" - VIX_LIBADD="$VIX_LIBADD -lcrypt" -fi - - -LIBVMTOOLS_LIBADD="$LIBVMTOOLS_LIBADD $THREAD_LIB" -VIX_LIBADD="$VIX_LIBADD $THREAD_LIB" - -### Core Services definitions. - -HGFS_LIBS="$BUILDDIR/libhgfs/libhgfs.la" - -VMTOOLS_LIBS="$BUILDDIR/libvmtools/libvmtools.la $GLIB2_LIBS" -VMTOOLS_CPPFLAGS="-DVMTOOLS_USE_GLIB $GLIB2_CPPFLAGS" - -PLUGIN_CPPFLAGS="$VMTOOLS_CPPFLAGS $PLUGIN_CPPFLAGS" -PLUGIN_LDFLAGS="-Wl,-z,defs -Wl,-lc -shared -module -avoid-version" - -# In Solaris, the XDR-related functions are not in libc like in Linux and -# FreeBSD, so binaries need to be linked to some extra libraries. -XDR_LIBS= -if test "$os" = "solaris"; then - XDR_LIBS="-lnsl -lrpcsvc" -fi - -# Installation directories for core services plugins. -TEST_PLUGIN_INSTALLDIR=$datadir/open-vm-tools/tests -COMMON_PLUGIN_INSTALLDIR=$libdir/open-vm-tools/plugins/common -VMSVC_PLUGIN_INSTALLDIR=$libdir/open-vm-tools/plugins/vmsvc -VMUSR_PLUGIN_INSTALLDIR=$libdir/open-vm-tools/plugins/vmusr - -# General definitions -INSTVMSG='$(SHELL) $(top_srcdir)/scripts/build/instvmsg.sh' -RPCGEN_WRAPPER='$(SHELL) $(top_builddir)/scripts/build/rpcgen_wrapper.sh' - -### General substs - - - - - - - - - - - - - - - - - - - - - - - -if test "$os" = "freebsd" -a -n "$SYSDIR"; then - # If SYSDIR is not defined, AC_SUBST expands to nothing, so we need something - # inside this block. - true - -fi - - - -### Lib substs - - - - - - -### Program substs - - - - -### -### Create the Makefiles -### -ac_config_files="$ac_config_files Makefile lib/Makefile lib/appUtil/Makefile lib/auth/Makefile lib/backdoor/Makefile lib/asyncsocket/Makefile lib/sslDirect/Makefile lib/pollGtk/Makefile lib/poll/Makefile lib/dataMap/Makefile lib/hashMap/Makefile lib/dict/Makefile lib/dynxdr/Makefile lib/err/Makefile lib/file/Makefile lib/foundryMsg/Makefile lib/glibUtils/Makefile lib/guestApp/Makefile lib/guestRpc/Makefile lib/hgfs/Makefile lib/hgfsBd/Makefile lib/hgfsHelper/Makefile lib/hgfsServer/Makefile lib/hgfsServerManagerGuest/Makefile lib/hgfsServerPolicyGuest/Makefile lib/hgfsUri/Makefile lib/impersonate/Makefile lib/lock/Makefile lib/message/Makefile lib/misc/Makefile lib/netUtil/Makefile lib/nicInfo/Makefile lib/panic/Makefile lib/panicDefault/Makefile lib/procMgr/Makefile lib/rpcChannel/Makefile lib/rpcIn/Makefile lib/rpcOut/Makefile lib/rpcVmx/Makefile lib/slashProc/Makefile lib/string/Makefile lib/stubs/Makefile lib/syncDriver/Makefile lib/system/Makefile lib/unicode/Makefile lib/user/Makefile lib/vmCheck/Makefile lib/vmSignal/Makefile lib/wiper/Makefile lib/xdg/Makefile services/Makefile services/vmtoolsd/Makefile services/plugins/Makefile services/plugins/desktopEvents/Makefile services/plugins/dndcp/Makefile services/plugins/grabbitmqProxy/Makefile services/plugins/guestInfo/Makefile services/plugins/hgfsServer/Makefile services/plugins/powerOps/Makefile services/plugins/resolutionSet/Makefile services/plugins/timeSync/Makefile services/plugins/vix/Makefile services/plugins/vmbackup/Makefile services/plugins/deployPkg/Makefile vmware-user-suid-wrapper/Makefile toolbox/Makefile hgfsclient/Makefile hgfsmounter/Makefile checkvm/Makefile rpctool/Makefile guestproxycerttool/Makefile vgauth/Makefile vgauth/lib/Makefile vgauth/cli/Makefile vgauth/service/Makefile libguestlib/Makefile libguestlib/vmguestlib.pc libDeployPkg/Makefile libDeployPkg/libDeployPkg.pc libhgfs/Makefile libvmtools/Makefile xferlogs/Makefile modules/Makefile vmblock-fuse/Makefile vmhgfs-fuse/Makefile vmblockmounter/Makefile tests/Makefile tests/vmrpcdbg/Makefile tests/testDebug/Makefile tests/testPlugin/Makefile tests/testVmblock/Makefile docs/Makefile docs/api/Makefile scripts/Makefile scripts/build/rpcgen_wrapper.sh" - - -### -### Output -### -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 -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_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, 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_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done - - (set) 2>&1 | - 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 "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - 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 "$as_me:$LINENO: updating cache $cache_file" >&5 -echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file - else - { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -# -# If the first sed substitution is executed (which looks for macros that -# take arguments), then branch to the quote section. Otherwise, -# look for a macro that doesn't take arguments. -ac_script=' -t clear -:clear -s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g -t quote -s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g -t quote -b any -:quote -s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g -s/\[/\\&/g -s/\]/\\&/g -s/\$/$$/g -H -:any -${ - g - s/^\n// - s/\n/ /g - p -} -' -DEFS=`sed -n "$ac_script" confdefs.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_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`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 - -LTLIBOBJS=$ac_ltlibobjs - - -if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${BUILD_HGFSMOUNTER_TRUE}" && test -z "${BUILD_HGFSMOUNTER_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"BUILD_HGFSMOUNTER\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"BUILD_HGFSMOUNTER\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${LINUX_TRUE}" && test -z "${LINUX_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"LINUX\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"LINUX\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${SOLARIS_TRUE}" && test -z "${SOLARIS_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"SOLARIS\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"SOLARIS\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${FREEBSD_TRUE}" && test -z "${FREEBSD_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"FREEBSD\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"FREEBSD\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${FREEBSD_CUSTOM_SYSDIR_TRUE}" && test -z "${FREEBSD_CUSTOM_SYSDIR_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"FREEBSD_CUSTOM_SYSDIR\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"FREEBSD_CUSTOM_SYSDIR\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${THIRTY_TWO_BIT_USERSPACE_TRUE}" && test -z "${THIRTY_TWO_BIT_USERSPACE_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"THIRTY_TWO_BIT_USERSPACE\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"THIRTY_TWO_BIT_USERSPACE\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${HAVE_X11_TRUE}" && test -z "${HAVE_X11_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"HAVE_X11\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"HAVE_X11\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${HAVE_ICU_TRUE}" && test -z "${HAVE_ICU_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"HAVE_ICU\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"HAVE_ICU\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${WITH_KERNEL_MODULES_TRUE}" && test -z "${WITH_KERNEL_MODULES_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"WITH_KERNEL_MODULES\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"WITH_KERNEL_MODULES\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${HAVE_XSM_TRUE}" && test -z "${HAVE_XSM_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"HAVE_XSM\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"HAVE_XSM\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${HAVE_XCOMPOSITE_TRUE}" && test -z "${HAVE_XCOMPOSITE_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"HAVE_XCOMPOSITE\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"HAVE_XCOMPOSITE\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${ENABLE_TESTS_TRUE}" && test -z "${ENABLE_TESTS_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"ENABLE_TESTS\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"ENABLE_TESTS\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${WITH_ROOT_PRIVILEGES_TRUE}" && test -z "${WITH_ROOT_PRIVILEGES_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"WITH_ROOT_PRIVILEGES\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"WITH_ROOT_PRIVILEGES\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${HAVE_DNET_TRUE}" && test -z "${HAVE_DNET_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"HAVE_DNET\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"HAVE_DNET\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${HAVE_DOXYGEN_TRUE}" && test -z "${HAVE_DOXYGEN_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"HAVE_DOXYGEN\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"HAVE_DOXYGEN\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${HAVE_FUSE_TRUE}" && test -z "${HAVE_FUSE_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"HAVE_FUSE\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"HAVE_FUSE\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${HAVE_GNU_LD_TRUE}" && test -z "${HAVE_GNU_LD_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"HAVE_GNU_LD\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"HAVE_GNU_LD\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${HAVE_GTKMM_TRUE}" && test -z "${HAVE_GTKMM_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"HAVE_GTKMM\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"HAVE_GTKMM\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${HAVE_PAM_TRUE}" && test -z "${HAVE_PAM_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"HAVE_PAM\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"HAVE_PAM\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${USE_SLASH_PROC_TRUE}" && test -z "${USE_SLASH_PROC_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"USE_SLASH_PROC\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"USE_SLASH_PROC\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${USE_PRINTF_WRAPPERS_TRUE}" && test -z "${USE_PRINTF_WRAPPERS_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"USE_PRINTF_WRAPPERS\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"USE_PRINTF_WRAPPERS\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${ENABLE_DEPLOYPKG_TRUE}" && test -z "${ENABLE_DEPLOYPKG_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"ENABLE_DEPLOYPKG\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"ENABLE_DEPLOYPKG\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${ENABLE_GRABBITMQPROXY_TRUE}" && test -z "${ENABLE_GRABBITMQPROXY_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"ENABLE_GRABBITMQPROXY\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"ENABLE_GRABBITMQPROXY\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${ENABLE_VGAUTH_TRUE}" && test -z "${ENABLE_VGAUTH_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"ENABLE_VGAUTH\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"ENABLE_VGAUTH\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${HAVE_VSOCK_TRUE}" && test -z "${HAVE_VSOCK_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"HAVE_VSOCK\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"HAVE_VSOCK\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi - -: ${CONFIG_STATUS=./config.status} -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 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# 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 - # 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 - - - - -# 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 - -# 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 - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -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.) -as_nl=' -' -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 - 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. -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) >/dev/null 2>&1 && $as_unset $as_var - fi -done - -# Required to use basename. -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 - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -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'` - -# CDPATH. -$as_unset CDPATH - - - - 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 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 - # 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 - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - 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 - { (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 sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -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 -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi -echo >conf$$.file -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 -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=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -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'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 - -# 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. -ac_log=" -This file was extended by open-vm-tools $as_me 10.0.5, which was -generated by GNU Autoconf 2.61. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF -# Files that config.status was made for. -config_files="$ac_config_files" -config_commands="$ac_config_commands" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. - -Usage: $0 [OPTIONS] [FILE]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - -q, --quiet 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 - -Configuration files: -$config_files - -Configuration commands: -$config_commands - -Report bugs to ." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -ac_cs_version="\\ -open-vm-tools config.status 10.0.5 -configured by $0, generated by GNU Autoconf 2.61, - with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" - -Copyright (C) 2006 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' -_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. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - echo "$ac_cs_version"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" - ac_need_defaults=false;; - --he | --h | --help | --hel | -h ) - 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: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } ;; - - *) ac_config_targets="$ac_config_targets $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -if \$ac_cs_recheck; then - echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - CONFIG_SHELL=$SHELL - export CONFIG_SHELL - exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -# -# INIT-COMMANDS -# -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" - - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' -macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' -enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' -pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' -enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' -host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' -host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' -host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' -build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' -build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' -build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' -SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' -Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' -GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' -EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' -FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' -LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' -NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' -LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' -max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' -ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' -exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' -lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' -lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' -lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' -reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' -reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' -deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' -file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' -AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' -AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' -STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' -RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' -old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' -CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' -CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' -compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' -GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' -objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' -SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' -ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' -MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' -need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' -DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' -NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' -libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' -shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' -extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' -export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' -module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' -module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' -with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' -allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' -no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' -inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' -link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' -fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' -always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' -export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' -exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' -include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' -prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' -file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' -variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' -need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' -need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' -version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' -runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' -shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' -shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' -libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' -library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' -soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' -postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' -finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' -sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' -sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' -old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' -striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_dirs='`$ECHO "X$compiler_lib_search_dirs" | $Xsed -e "$delay_single_quote_subst"`' -predep_objects='`$ECHO "X$predep_objects" | $Xsed -e "$delay_single_quote_subst"`' -postdep_objects='`$ECHO "X$postdep_objects" | $Xsed -e "$delay_single_quote_subst"`' -predeps='`$ECHO "X$predeps" | $Xsed -e "$delay_single_quote_subst"`' -postdeps='`$ECHO "X$postdeps" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_path='`$ECHO "X$compiler_lib_search_path" | $Xsed -e "$delay_single_quote_subst"`' -LD_CXX='`$ECHO "X$LD_CXX" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_cmds_CXX='`$ECHO "X$old_archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_CXX='`$ECHO "X$compiler_CXX" | $Xsed -e "$delay_single_quote_subst"`' -GCC_CXX='`$ECHO "X$GCC_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "X$lt_prog_compiler_no_builtin_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_wl_CXX='`$ECHO "X$lt_prog_compiler_wl_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_pic_CXX='`$ECHO "X$lt_prog_compiler_pic_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_static_CXX='`$ECHO "X$lt_prog_compiler_static_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o_CXX='`$ECHO "X$lt_cv_prog_compiler_c_o_CXX" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_need_lc_CXX='`$ECHO "X$archive_cmds_need_lc_CXX" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes_CXX='`$ECHO "X$enable_shared_with_static_runtimes_CXX" | $Xsed -e "$delay_single_quote_subst"`' -export_dynamic_flag_spec_CXX='`$ECHO "X$export_dynamic_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -whole_archive_flag_spec_CXX='`$ECHO "X$whole_archive_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_needs_object_CXX='`$ECHO "X$compiler_needs_object_CXX" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_new_cmds_CXX='`$ECHO "X$old_archive_from_new_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds_CXX='`$ECHO "X$old_archive_from_expsyms_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_CXX='`$ECHO "X$archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -archive_expsym_cmds_CXX='`$ECHO "X$archive_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -module_cmds_CXX='`$ECHO "X$module_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -module_expsym_cmds_CXX='`$ECHO "X$module_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -with_gnu_ld_CXX='`$ECHO "X$with_gnu_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' -allow_undefined_flag_CXX='`$ECHO "X$allow_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' -no_undefined_flag_CXX='`$ECHO "X$no_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_CXX='`$ECHO "X$hardcode_libdir_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld_CXX='`$ECHO "X$hardcode_libdir_flag_spec_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_separator_CXX='`$ECHO "X$hardcode_libdir_separator_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_CXX='`$ECHO "X$hardcode_direct_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_absolute_CXX='`$ECHO "X$hardcode_direct_absolute_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_minus_L_CXX='`$ECHO "X$hardcode_minus_L_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_shlibpath_var_CXX='`$ECHO "X$hardcode_shlibpath_var_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_automatic_CXX='`$ECHO "X$hardcode_automatic_CXX" | $Xsed -e "$delay_single_quote_subst"`' -inherit_rpath_CXX='`$ECHO "X$inherit_rpath_CXX" | $Xsed -e "$delay_single_quote_subst"`' -link_all_deplibs_CXX='`$ECHO "X$link_all_deplibs_CXX" | $Xsed -e "$delay_single_quote_subst"`' -fix_srcfile_path_CXX='`$ECHO "X$fix_srcfile_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' -always_export_symbols_CXX='`$ECHO "X$always_export_symbols_CXX" | $Xsed -e "$delay_single_quote_subst"`' -export_symbols_cmds_CXX='`$ECHO "X$export_symbols_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -exclude_expsyms_CXX='`$ECHO "X$exclude_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' -include_expsyms_CXX='`$ECHO "X$include_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' -prelink_cmds_CXX='`$ECHO "X$prelink_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -file_list_spec_CXX='`$ECHO "X$file_list_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_action_CXX='`$ECHO "X$hardcode_action_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_dirs_CXX='`$ECHO "X$compiler_lib_search_dirs_CXX" | $Xsed -e "$delay_single_quote_subst"`' -predep_objects_CXX='`$ECHO "X$predep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' -postdep_objects_CXX='`$ECHO "X$postdep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' -predeps_CXX='`$ECHO "X$predeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' -postdeps_CXX='`$ECHO "X$postdeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_path_CXX='`$ECHO "X$compiler_lib_search_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' - -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# Quote evaled strings. -for var in SED \ -GREP \ -EGREP \ -FGREP \ -LD \ -NM \ -LN_S \ -lt_SP2NL \ -lt_NL2SP \ -reload_flag \ -deplibs_check_method \ -file_magic_cmd \ -AR \ -AR_FLAGS \ -STRIP \ -RANLIB \ -CC \ -CFLAGS \ -compiler \ -lt_cv_sys_global_symbol_pipe \ -lt_cv_sys_global_symbol_to_cdecl \ -lt_cv_sys_global_symbol_to_c_name_address \ -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -SHELL \ -ECHO \ -lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_wl \ -lt_prog_compiler_pic \ -lt_prog_compiler_static \ -lt_cv_prog_compiler_c_o \ -need_locks \ -DSYMUTIL \ -NMEDIT \ -shrext_cmds \ -export_dynamic_flag_spec \ -whole_archive_flag_spec \ -compiler_needs_object \ -with_gnu_ld \ -allow_undefined_flag \ -no_undefined_flag \ -hardcode_libdir_flag_spec \ -hardcode_libdir_flag_spec_ld \ -hardcode_libdir_separator \ -fix_srcfile_path \ -exclude_expsyms \ -include_expsyms \ -file_list_spec \ -variables_saved_for_relink \ -libname_spec \ -library_names_spec \ -soname_spec \ -finish_eval \ -old_striplib \ -striplib \ -compiler_lib_search_dirs \ -predep_objects \ -postdep_objects \ -predeps \ -postdeps \ -compiler_lib_search_path \ -LD_CXX \ -compiler_CXX \ -lt_prog_compiler_no_builtin_flag_CXX \ -lt_prog_compiler_wl_CXX \ -lt_prog_compiler_pic_CXX \ -lt_prog_compiler_static_CXX \ -lt_cv_prog_compiler_c_o_CXX \ -export_dynamic_flag_spec_CXX \ -whole_archive_flag_spec_CXX \ -compiler_needs_object_CXX \ -with_gnu_ld_CXX \ -allow_undefined_flag_CXX \ -no_undefined_flag_CXX \ -hardcode_libdir_flag_spec_CXX \ -hardcode_libdir_flag_spec_ld_CXX \ -hardcode_libdir_separator_CXX \ -fix_srcfile_path_CXX \ -exclude_expsyms_CXX \ -include_expsyms_CXX \ -file_list_spec_CXX \ -compiler_lib_search_dirs_CXX \ -predep_objects_CXX \ -postdep_objects_CXX \ -predeps_CXX \ -postdeps_CXX \ -compiler_lib_search_path_CXX; do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in reload_cmds \ -old_postinstall_cmds \ -old_postuninstall_cmds \ -old_archive_cmds \ -extract_expsyms_cmds \ -old_archive_from_new_cmds \ -old_archive_from_expsyms_cmds \ -archive_cmds \ -archive_expsym_cmds \ -module_cmds \ -module_expsym_cmds \ -export_symbols_cmds \ -prelink_cmds \ -postinstall_cmds \ -postuninstall_cmds \ -finish_cmds \ -sys_lib_search_path_spec \ -sys_lib_dlsearch_path_spec \ -old_archive_cmds_CXX \ -old_archive_from_new_cmds_CXX \ -old_archive_from_expsyms_cmds_CXX \ -archive_cmds_CXX \ -archive_expsym_cmds_CXX \ -module_cmds_CXX \ -module_expsym_cmds_CXX \ -export_symbols_cmds_CXX \ -prelink_cmds_CXX; do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Fix-up fallback echo if it was mangled by the above quoting rules. -case \$lt_ECHO in -*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` - ;; -esac - -ac_aux_dir='$ac_aux_dir' -xsi_shell='$xsi_shell' -lt_shell_append='$lt_shell_append' - -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - - - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile' - - - - - - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; - "lib/appUtil/Makefile") CONFIG_FILES="$CONFIG_FILES lib/appUtil/Makefile" ;; - "lib/auth/Makefile") CONFIG_FILES="$CONFIG_FILES lib/auth/Makefile" ;; - "lib/backdoor/Makefile") CONFIG_FILES="$CONFIG_FILES lib/backdoor/Makefile" ;; - "lib/asyncsocket/Makefile") CONFIG_FILES="$CONFIG_FILES lib/asyncsocket/Makefile" ;; - "lib/sslDirect/Makefile") CONFIG_FILES="$CONFIG_FILES lib/sslDirect/Makefile" ;; - "lib/pollGtk/Makefile") CONFIG_FILES="$CONFIG_FILES lib/pollGtk/Makefile" ;; - "lib/poll/Makefile") CONFIG_FILES="$CONFIG_FILES lib/poll/Makefile" ;; - "lib/dataMap/Makefile") CONFIG_FILES="$CONFIG_FILES lib/dataMap/Makefile" ;; - "lib/hashMap/Makefile") CONFIG_FILES="$CONFIG_FILES lib/hashMap/Makefile" ;; - "lib/dict/Makefile") CONFIG_FILES="$CONFIG_FILES lib/dict/Makefile" ;; - "lib/dynxdr/Makefile") CONFIG_FILES="$CONFIG_FILES lib/dynxdr/Makefile" ;; - "lib/err/Makefile") CONFIG_FILES="$CONFIG_FILES lib/err/Makefile" ;; - "lib/file/Makefile") CONFIG_FILES="$CONFIG_FILES lib/file/Makefile" ;; - "lib/foundryMsg/Makefile") CONFIG_FILES="$CONFIG_FILES lib/foundryMsg/Makefile" ;; - "lib/glibUtils/Makefile") CONFIG_FILES="$CONFIG_FILES lib/glibUtils/Makefile" ;; - "lib/guestApp/Makefile") CONFIG_FILES="$CONFIG_FILES lib/guestApp/Makefile" ;; - "lib/guestRpc/Makefile") CONFIG_FILES="$CONFIG_FILES lib/guestRpc/Makefile" ;; - "lib/hgfs/Makefile") CONFIG_FILES="$CONFIG_FILES lib/hgfs/Makefile" ;; - "lib/hgfsBd/Makefile") CONFIG_FILES="$CONFIG_FILES lib/hgfsBd/Makefile" ;; - "lib/hgfsHelper/Makefile") CONFIG_FILES="$CONFIG_FILES lib/hgfsHelper/Makefile" ;; - "lib/hgfsServer/Makefile") CONFIG_FILES="$CONFIG_FILES lib/hgfsServer/Makefile" ;; - "lib/hgfsServerManagerGuest/Makefile") CONFIG_FILES="$CONFIG_FILES lib/hgfsServerManagerGuest/Makefile" ;; - "lib/hgfsServerPolicyGuest/Makefile") CONFIG_FILES="$CONFIG_FILES lib/hgfsServerPolicyGuest/Makefile" ;; - "lib/hgfsUri/Makefile") CONFIG_FILES="$CONFIG_FILES lib/hgfsUri/Makefile" ;; - "lib/impersonate/Makefile") CONFIG_FILES="$CONFIG_FILES lib/impersonate/Makefile" ;; - "lib/lock/Makefile") CONFIG_FILES="$CONFIG_FILES lib/lock/Makefile" ;; - "lib/message/Makefile") CONFIG_FILES="$CONFIG_FILES lib/message/Makefile" ;; - "lib/misc/Makefile") CONFIG_FILES="$CONFIG_FILES lib/misc/Makefile" ;; - "lib/netUtil/Makefile") CONFIG_FILES="$CONFIG_FILES lib/netUtil/Makefile" ;; - "lib/nicInfo/Makefile") CONFIG_FILES="$CONFIG_FILES lib/nicInfo/Makefile" ;; - "lib/panic/Makefile") CONFIG_FILES="$CONFIG_FILES lib/panic/Makefile" ;; - "lib/panicDefault/Makefile") CONFIG_FILES="$CONFIG_FILES lib/panicDefault/Makefile" ;; - "lib/procMgr/Makefile") CONFIG_FILES="$CONFIG_FILES lib/procMgr/Makefile" ;; - "lib/rpcChannel/Makefile") CONFIG_FILES="$CONFIG_FILES lib/rpcChannel/Makefile" ;; - "lib/rpcIn/Makefile") CONFIG_FILES="$CONFIG_FILES lib/rpcIn/Makefile" ;; - "lib/rpcOut/Makefile") CONFIG_FILES="$CONFIG_FILES lib/rpcOut/Makefile" ;; - "lib/rpcVmx/Makefile") CONFIG_FILES="$CONFIG_FILES lib/rpcVmx/Makefile" ;; - "lib/slashProc/Makefile") CONFIG_FILES="$CONFIG_FILES lib/slashProc/Makefile" ;; - "lib/string/Makefile") CONFIG_FILES="$CONFIG_FILES lib/string/Makefile" ;; - "lib/stubs/Makefile") CONFIG_FILES="$CONFIG_FILES lib/stubs/Makefile" ;; - "lib/syncDriver/Makefile") CONFIG_FILES="$CONFIG_FILES lib/syncDriver/Makefile" ;; - "lib/system/Makefile") CONFIG_FILES="$CONFIG_FILES lib/system/Makefile" ;; - "lib/unicode/Makefile") CONFIG_FILES="$CONFIG_FILES lib/unicode/Makefile" ;; - "lib/user/Makefile") CONFIG_FILES="$CONFIG_FILES lib/user/Makefile" ;; - "lib/vmCheck/Makefile") CONFIG_FILES="$CONFIG_FILES lib/vmCheck/Makefile" ;; - "lib/vmSignal/Makefile") CONFIG_FILES="$CONFIG_FILES lib/vmSignal/Makefile" ;; - "lib/wiper/Makefile") CONFIG_FILES="$CONFIG_FILES lib/wiper/Makefile" ;; - "lib/xdg/Makefile") CONFIG_FILES="$CONFIG_FILES lib/xdg/Makefile" ;; - "services/Makefile") CONFIG_FILES="$CONFIG_FILES services/Makefile" ;; - "services/vmtoolsd/Makefile") CONFIG_FILES="$CONFIG_FILES services/vmtoolsd/Makefile" ;; - "services/plugins/Makefile") CONFIG_FILES="$CONFIG_FILES services/plugins/Makefile" ;; - "services/plugins/desktopEvents/Makefile") CONFIG_FILES="$CONFIG_FILES services/plugins/desktopEvents/Makefile" ;; - "services/plugins/dndcp/Makefile") CONFIG_FILES="$CONFIG_FILES services/plugins/dndcp/Makefile" ;; - "services/plugins/grabbitmqProxy/Makefile") CONFIG_FILES="$CONFIG_FILES services/plugins/grabbitmqProxy/Makefile" ;; - "services/plugins/guestInfo/Makefile") CONFIG_FILES="$CONFIG_FILES services/plugins/guestInfo/Makefile" ;; - "services/plugins/hgfsServer/Makefile") CONFIG_FILES="$CONFIG_FILES services/plugins/hgfsServer/Makefile" ;; - "services/plugins/powerOps/Makefile") CONFIG_FILES="$CONFIG_FILES services/plugins/powerOps/Makefile" ;; - "services/plugins/resolutionSet/Makefile") CONFIG_FILES="$CONFIG_FILES services/plugins/resolutionSet/Makefile" ;; - "services/plugins/timeSync/Makefile") CONFIG_FILES="$CONFIG_FILES services/plugins/timeSync/Makefile" ;; - "services/plugins/vix/Makefile") CONFIG_FILES="$CONFIG_FILES services/plugins/vix/Makefile" ;; - "services/plugins/vmbackup/Makefile") CONFIG_FILES="$CONFIG_FILES services/plugins/vmbackup/Makefile" ;; - "services/plugins/deployPkg/Makefile") CONFIG_FILES="$CONFIG_FILES services/plugins/deployPkg/Makefile" ;; - "vmware-user-suid-wrapper/Makefile") CONFIG_FILES="$CONFIG_FILES vmware-user-suid-wrapper/Makefile" ;; - "toolbox/Makefile") CONFIG_FILES="$CONFIG_FILES toolbox/Makefile" ;; - "hgfsclient/Makefile") CONFIG_FILES="$CONFIG_FILES hgfsclient/Makefile" ;; - "hgfsmounter/Makefile") CONFIG_FILES="$CONFIG_FILES hgfsmounter/Makefile" ;; - "checkvm/Makefile") CONFIG_FILES="$CONFIG_FILES checkvm/Makefile" ;; - "rpctool/Makefile") CONFIG_FILES="$CONFIG_FILES rpctool/Makefile" ;; - "guestproxycerttool/Makefile") CONFIG_FILES="$CONFIG_FILES guestproxycerttool/Makefile" ;; - "vgauth/Makefile") CONFIG_FILES="$CONFIG_FILES vgauth/Makefile" ;; - "vgauth/lib/Makefile") CONFIG_FILES="$CONFIG_FILES vgauth/lib/Makefile" ;; - "vgauth/cli/Makefile") CONFIG_FILES="$CONFIG_FILES vgauth/cli/Makefile" ;; - "vgauth/service/Makefile") CONFIG_FILES="$CONFIG_FILES vgauth/service/Makefile" ;; - "libguestlib/Makefile") CONFIG_FILES="$CONFIG_FILES libguestlib/Makefile" ;; - "libguestlib/vmguestlib.pc") CONFIG_FILES="$CONFIG_FILES libguestlib/vmguestlib.pc" ;; - "libDeployPkg/Makefile") CONFIG_FILES="$CONFIG_FILES libDeployPkg/Makefile" ;; - "libDeployPkg/libDeployPkg.pc") CONFIG_FILES="$CONFIG_FILES libDeployPkg/libDeployPkg.pc" ;; - "libhgfs/Makefile") CONFIG_FILES="$CONFIG_FILES libhgfs/Makefile" ;; - "libvmtools/Makefile") CONFIG_FILES="$CONFIG_FILES libvmtools/Makefile" ;; - "xferlogs/Makefile") CONFIG_FILES="$CONFIG_FILES xferlogs/Makefile" ;; - "modules/Makefile") CONFIG_FILES="$CONFIG_FILES modules/Makefile" ;; - "vmblock-fuse/Makefile") CONFIG_FILES="$CONFIG_FILES vmblock-fuse/Makefile" ;; - "vmhgfs-fuse/Makefile") CONFIG_FILES="$CONFIG_FILES vmhgfs-fuse/Makefile" ;; - "vmblockmounter/Makefile") CONFIG_FILES="$CONFIG_FILES vmblockmounter/Makefile" ;; - "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; - "tests/vmrpcdbg/Makefile") CONFIG_FILES="$CONFIG_FILES tests/vmrpcdbg/Makefile" ;; - "tests/testDebug/Makefile") CONFIG_FILES="$CONFIG_FILES tests/testDebug/Makefile" ;; - "tests/testPlugin/Makefile") CONFIG_FILES="$CONFIG_FILES tests/testPlugin/Makefile" ;; - "tests/testVmblock/Makefile") CONFIG_FILES="$CONFIG_FILES tests/testVmblock/Makefile" ;; - "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; - "docs/api/Makefile") CONFIG_FILES="$CONFIG_FILES docs/api/Makefile" ;; - "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;; - "scripts/build/rpcgen_wrapper.sh") CONFIG_FILES="$CONFIG_FILES scripts/build/rpcgen_wrapper.sh" ;; - - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -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 -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# 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 || -{ - 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 "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || -{ - echo "$me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} - -# -# Set up the sed scripts for 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 - -_ACEOF - - - -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -SHELL!$SHELL$ac_delim -PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim -PACKAGE_NAME!$PACKAGE_NAME$ac_delim -PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim -PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim -PACKAGE_STRING!$PACKAGE_STRING$ac_delim -PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim -exec_prefix!$exec_prefix$ac_delim -prefix!$prefix$ac_delim -program_transform_name!$program_transform_name$ac_delim -bindir!$bindir$ac_delim -sbindir!$sbindir$ac_delim -libexecdir!$libexecdir$ac_delim -datarootdir!$datarootdir$ac_delim -datadir!$datadir$ac_delim -sysconfdir!$sysconfdir$ac_delim -sharedstatedir!$sharedstatedir$ac_delim -localstatedir!$localstatedir$ac_delim -includedir!$includedir$ac_delim -oldincludedir!$oldincludedir$ac_delim -docdir!$docdir$ac_delim -infodir!$infodir$ac_delim -htmldir!$htmldir$ac_delim -dvidir!$dvidir$ac_delim -pdfdir!$pdfdir$ac_delim -psdir!$psdir$ac_delim -libdir!$libdir$ac_delim -localedir!$localedir$ac_delim -mandir!$mandir$ac_delim -DEFS!$DEFS$ac_delim -ECHO_C!$ECHO_C$ac_delim -ECHO_N!$ECHO_N$ac_delim -ECHO_T!$ECHO_T$ac_delim -LIBS!$LIBS$ac_delim -build_alias!$build_alias$ac_delim -host_alias!$host_alias$ac_delim -target_alias!$target_alias$ac_delim -build!$build$ac_delim -build_cpu!$build_cpu$ac_delim -build_vendor!$build_vendor$ac_delim -build_os!$build_os$ac_delim -host!$host$ac_delim -host_cpu!$host_cpu$ac_delim -host_vendor!$host_vendor$ac_delim -host_os!$host_os$ac_delim -INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim -INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim -INSTALL_DATA!$INSTALL_DATA$ac_delim -am__isrc!$am__isrc$ac_delim -CYGPATH_W!$CYGPATH_W$ac_delim -PACKAGE!$PACKAGE$ac_delim -VERSION!$VERSION$ac_delim -ACLOCAL!$ACLOCAL$ac_delim -AUTOCONF!$AUTOCONF$ac_delim -AUTOMAKE!$AUTOMAKE$ac_delim -AUTOHEADER!$AUTOHEADER$ac_delim -MAKEINFO!$MAKEINFO$ac_delim -install_sh!$install_sh$ac_delim -STRIP!$STRIP$ac_delim -INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim -mkdir_p!$mkdir_p$ac_delim -AWK!$AWK$ac_delim -SET_MAKE!$SET_MAKE$ac_delim -am__leading_dot!$am__leading_dot$ac_delim -AMTAR!$AMTAR$ac_delim -am__tar!$am__tar$ac_delim -am__untar!$am__untar$ac_delim -CC!$CC$ac_delim -CFLAGS!$CFLAGS$ac_delim -LDFLAGS!$LDFLAGS$ac_delim -CPPFLAGS!$CPPFLAGS$ac_delim -ac_ct_CC!$ac_ct_CC$ac_delim -EXEEXT!$EXEEXT$ac_delim -OBJEXT!$OBJEXT$ac_delim -DEPDIR!$DEPDIR$ac_delim -am__include!$am__include$ac_delim -am__quote!$am__quote$ac_delim -AMDEP_TRUE!$AMDEP_TRUE$ac_delim -AMDEP_FALSE!$AMDEP_FALSE$ac_delim -AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim -CCDEPMODE!$CCDEPMODE$ac_delim -am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim -am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim -CPP!$CPP$ac_delim -CXX!$CXX$ac_delim -CXXFLAGS!$CXXFLAGS$ac_delim -ac_ct_CXX!$ac_ct_CXX$ac_delim -CXXDEPMODE!$CXXDEPMODE$ac_delim -am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim -am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim -SED!$SED$ac_delim -LN_S!$LN_S$ac_delim -LIBTOOL!$LIBTOOL$ac_delim -GREP!$GREP$ac_delim -EGREP!$EGREP$ac_delim -FGREP!$FGREP$ac_delim -LD!$LD$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -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 - -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi - -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -CEOF$ac_eof -_ACEOF - - -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -DUMPBIN!$DUMPBIN$ac_delim -ac_ct_DUMPBIN!$ac_ct_DUMPBIN$ac_delim -NM!$NM$ac_delim -AR!$AR$ac_delim -RANLIB!$RANLIB$ac_delim -lt_ECHO!$lt_ECHO$ac_delim -DSYMUTIL!$DSYMUTIL$ac_delim -NMEDIT!$NMEDIT$ac_delim -CXXCPP!$CXXCPP$ac_delim -HAVE_PKG_CONFIG!$HAVE_PKG_CONFIG$ac_delim -XMKMF!$XMKMF$ac_delim -X_CFLAGS!$X_CFLAGS$ac_delim -X_PRE_LIBS!$X_PRE_LIBS$ac_delim -X_LIBS!$X_LIBS$ac_delim -X_EXTRA_LIBS!$X_EXTRA_LIBS$ac_delim -ac_vmw_lib_cfg!$ac_vmw_lib_cfg$ac_delim -MSPACK_CPPFLAGS!$MSPACK_CPPFLAGS$ac_delim -MSPACK_LIBS!$MSPACK_LIBS$ac_delim -GLIB2_CPPFLAGS!$GLIB2_CPPFLAGS$ac_delim -GLIB2_LIBS!$GLIB2_LIBS$ac_delim -GMODULE_CPPFLAGS!$GMODULE_CPPFLAGS$ac_delim -GMODULE_LIBS!$GMODULE_LIBS$ac_delim -GOBJECT_CPPFLAGS!$GOBJECT_CPPFLAGS$ac_delim -GOBJECT_LIBS!$GOBJECT_LIBS$ac_delim -GTHREAD_CPPFLAGS!$GTHREAD_CPPFLAGS$ac_delim -GTHREAD_LIBS!$GTHREAD_LIBS$ac_delim -have_genmarshal!$have_genmarshal$ac_delim -FUSE_CPPFLAGS!$FUSE_CPPFLAGS$ac_delim -FUSE_LIBS!$FUSE_LIBS$ac_delim -PAM_CPPFLAGS!$PAM_CPPFLAGS$ac_delim -PAM_LIBS!$PAM_LIBS$ac_delim -SSL_CPPFLAGS!$SSL_CPPFLAGS$ac_delim -SSL_LIBS!$SSL_LIBS$ac_delim -XERCES_CPPFLAGS!$XERCES_CPPFLAGS$ac_delim -XERCES_LIBS!$XERCES_LIBS$ac_delim -XMLSECURITY_CPPFLAGS!$XMLSECURITY_CPPFLAGS$ac_delim -XMLSECURITY_LIBS!$XMLSECURITY_LIBS$ac_delim -CUNIT_CPPFLAGS!$CUNIT_CPPFLAGS$ac_delim -CUNIT_LIBS!$CUNIT_LIBS$ac_delim -GTK_CPPFLAGS!$GTK_CPPFLAGS$ac_delim -GTK_LIBS!$GTK_LIBS$ac_delim -GTKMM_CPPFLAGS!$GTKMM_CPPFLAGS$ac_delim -GTKMM_LIBS!$GTKMM_LIBS$ac_delim -PROCPS_CPPFLAGS!$PROCPS_CPPFLAGS$ac_delim -PROCPS_LIBS!$PROCPS_LIBS$ac_delim -DNET_CPPFLAGS!$DNET_CPPFLAGS$ac_delim -DNET_LIBS!$DNET_LIBS$ac_delim -have_cxx!$have_cxx$ac_delim -ICU_CPPFLAGS!$ICU_CPPFLAGS$ac_delim -ICU_LIBS!$ICU_LIBS$ac_delim -RPCGEN!$RPCGEN$ac_delim -have_doxygen!$have_doxygen$ac_delim -DOT!$DOT$ac_delim -HAVE_DOT!$HAVE_DOT$ac_delim -MSCGEN!$MSCGEN$ac_delim -MSCGEN_DIR!$MSCGEN_DIR$ac_delim -BUILD_HGFSMOUNTER_TRUE!$BUILD_HGFSMOUNTER_TRUE$ac_delim -BUILD_HGFSMOUNTER_FALSE!$BUILD_HGFSMOUNTER_FALSE$ac_delim -LINUX_TRUE!$LINUX_TRUE$ac_delim -LINUX_FALSE!$LINUX_FALSE$ac_delim -SOLARIS_TRUE!$SOLARIS_TRUE$ac_delim -SOLARIS_FALSE!$SOLARIS_FALSE$ac_delim -FREEBSD_TRUE!$FREEBSD_TRUE$ac_delim -FREEBSD_FALSE!$FREEBSD_FALSE$ac_delim -FREEBSD_CUSTOM_SYSDIR_TRUE!$FREEBSD_CUSTOM_SYSDIR_TRUE$ac_delim -FREEBSD_CUSTOM_SYSDIR_FALSE!$FREEBSD_CUSTOM_SYSDIR_FALSE$ac_delim -THIRTY_TWO_BIT_USERSPACE_TRUE!$THIRTY_TWO_BIT_USERSPACE_TRUE$ac_delim -THIRTY_TWO_BIT_USERSPACE_FALSE!$THIRTY_TWO_BIT_USERSPACE_FALSE$ac_delim -HAVE_X11_TRUE!$HAVE_X11_TRUE$ac_delim -HAVE_X11_FALSE!$HAVE_X11_FALSE$ac_delim -HAVE_ICU_TRUE!$HAVE_ICU_TRUE$ac_delim -HAVE_ICU_FALSE!$HAVE_ICU_FALSE$ac_delim -WITH_KERNEL_MODULES_TRUE!$WITH_KERNEL_MODULES_TRUE$ac_delim -WITH_KERNEL_MODULES_FALSE!$WITH_KERNEL_MODULES_FALSE$ac_delim -HAVE_XSM_TRUE!$HAVE_XSM_TRUE$ac_delim -HAVE_XSM_FALSE!$HAVE_XSM_FALSE$ac_delim -HAVE_XCOMPOSITE_TRUE!$HAVE_XCOMPOSITE_TRUE$ac_delim -HAVE_XCOMPOSITE_FALSE!$HAVE_XCOMPOSITE_FALSE$ac_delim -ENABLE_TESTS_TRUE!$ENABLE_TESTS_TRUE$ac_delim -ENABLE_TESTS_FALSE!$ENABLE_TESTS_FALSE$ac_delim -WITH_ROOT_PRIVILEGES_TRUE!$WITH_ROOT_PRIVILEGES_TRUE$ac_delim -WITH_ROOT_PRIVILEGES_FALSE!$WITH_ROOT_PRIVILEGES_FALSE$ac_delim -HAVE_DNET_TRUE!$HAVE_DNET_TRUE$ac_delim -HAVE_DNET_FALSE!$HAVE_DNET_FALSE$ac_delim -HAVE_DOXYGEN_TRUE!$HAVE_DOXYGEN_TRUE$ac_delim -HAVE_DOXYGEN_FALSE!$HAVE_DOXYGEN_FALSE$ac_delim -HAVE_FUSE_TRUE!$HAVE_FUSE_TRUE$ac_delim -HAVE_FUSE_FALSE!$HAVE_FUSE_FALSE$ac_delim -HAVE_GNU_LD_TRUE!$HAVE_GNU_LD_TRUE$ac_delim -HAVE_GNU_LD_FALSE!$HAVE_GNU_LD_FALSE$ac_delim -HAVE_GTKMM_TRUE!$HAVE_GTKMM_TRUE$ac_delim -HAVE_GTKMM_FALSE!$HAVE_GTKMM_FALSE$ac_delim -HAVE_PAM_TRUE!$HAVE_PAM_TRUE$ac_delim -HAVE_PAM_FALSE!$HAVE_PAM_FALSE$ac_delim -USE_SLASH_PROC_TRUE!$USE_SLASH_PROC_TRUE$ac_delim -USE_SLASH_PROC_FALSE!$USE_SLASH_PROC_FALSE$ac_delim -USE_PRINTF_WRAPPERS_TRUE!$USE_PRINTF_WRAPPERS_TRUE$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -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 - -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi - -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -CEOF$ac_eof -_ACEOF - - -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -USE_PRINTF_WRAPPERS_FALSE!$USE_PRINTF_WRAPPERS_FALSE$ac_delim -ENABLE_DEPLOYPKG_TRUE!$ENABLE_DEPLOYPKG_TRUE$ac_delim -ENABLE_DEPLOYPKG_FALSE!$ENABLE_DEPLOYPKG_FALSE$ac_delim -ENABLE_GRABBITMQPROXY_TRUE!$ENABLE_GRABBITMQPROXY_TRUE$ac_delim -ENABLE_GRABBITMQPROXY_FALSE!$ENABLE_GRABBITMQPROXY_FALSE$ac_delim -ENABLE_VGAUTH_TRUE!$ENABLE_VGAUTH_TRUE$ac_delim -ENABLE_VGAUTH_FALSE!$ENABLE_VGAUTH_FALSE$ac_delim -HAVE_VSOCK_TRUE!$HAVE_VSOCK_TRUE$ac_delim -HAVE_VSOCK_FALSE!$HAVE_VSOCK_FALSE$ac_delim -HGFS_LIBS!$HGFS_LIBS$ac_delim -TOOLS_VERSION!$TOOLS_VERSION$ac_delim -TARGET_OS!$TARGET_OS$ac_delim -KERNEL_RELEASE!$KERNEL_RELEASE$ac_delim -LINUXINCLUDE!$LINUXINCLUDE$ac_delim -MODULES_OS!$MODULES_OS$ac_delim -MODULES_DIR!$MODULES_DIR$ac_delim -MODULES!$MODULES$ac_delim -COMMON_XLIBS!$COMMON_XLIBS$ac_delim -XSM_LIBS!$XSM_LIBS$ac_delim -XCOMPOSITE_LIBS!$XCOMPOSITE_LIBS$ac_delim -PAM_PREFIX!$PAM_PREFIX$ac_delim -PLUGIN_CPPFLAGS!$PLUGIN_CPPFLAGS$ac_delim -PLUGIN_LDFLAGS!$PLUGIN_LDFLAGS$ac_delim -VMTOOLS_CPPFLAGS!$VMTOOLS_CPPFLAGS$ac_delim -VMTOOLS_LIBS!$VMTOOLS_LIBS$ac_delim -RPCGENFLAGS!$RPCGENFLAGS$ac_delim -XDR_LIBS!$XDR_LIBS$ac_delim -TEST_PLUGIN_INSTALLDIR!$TEST_PLUGIN_INSTALLDIR$ac_delim -COMMON_PLUGIN_INSTALLDIR!$COMMON_PLUGIN_INSTALLDIR$ac_delim -VMSVC_PLUGIN_INSTALLDIR!$VMSVC_PLUGIN_INSTALLDIR$ac_delim -VMUSR_PLUGIN_INSTALLDIR!$VMUSR_PLUGIN_INSTALLDIR$ac_delim -SYSDIR!$SYSDIR$ac_delim -INSTVMSG!$INSTVMSG$ac_delim -RPCGEN_WRAPPER!$RPCGEN_WRAPPER$ac_delim -LIB_AUTH_CPPFLAGS!$LIB_AUTH_CPPFLAGS$ac_delim -LIB_IMPERSONATE_CPPFLAGS!$LIB_IMPERSONATE_CPPFLAGS$ac_delim -LIB_USER_CPPFLAGS!$LIB_USER_CPPFLAGS$ac_delim -LIBVMTOOLS_LIBADD!$LIBVMTOOLS_LIBADD$ac_delim -VIX_LIBADD!$VIX_LIBADD$ac_delim -VGAUTH_LIBADD!$VGAUTH_LIBADD$ac_delim -LIBOBJS!$LIBOBJS$ac_delim -LTLIBOBJS!$LTLIBOBJS$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 42; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -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 - -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi - -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-3.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -:end -s/|#_!!_#|//g -CEOF$ac_eof -_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 -fi # test -n "$CONFIG_FILES" - - -for ac_tag in :F $CONFIG_FILES :C $CONFIG_COMMANDS -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 -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 || - { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; - 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 "`IFS=: - echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - fi - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin";; - 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'` - { 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 :; do - case $as_dir in #( - *\'*) as_qdir=`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'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`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 - .) # We are building in place. - ac_srcdir=. - 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 - 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 - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -# 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= - -case `sed -n '/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p -' $ac_file_inputs` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - 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 - -# 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 - sed "$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s&@configure_input@&$configure_input&;t t -s&@top_builddir@&$ac_top_builddir_sub&;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 -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" | sed -f "$tmp/subs-3.sed" >$tmp/out - -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"; } && - { 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 -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;} - - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out"; rm -f "$tmp/out";; - *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; - esac - ;; - - - :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 -echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir=$dirpart/$fdir - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`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'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done -done - ;; - "libtool":C) - - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me (GNU $PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool 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 (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - -# The names of the tagged configurations supported by this script. -available_tags="CXX " - -# ### BEGIN LIBTOOL CONFIG - -# Which release of libtool.m4 was used? -macro_version=$macro_version -macro_revision=$macro_revision - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# What type of objects to build. -pic_mode=$pic_mode - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="\$SED -e 1s/^X//" - -# A grep program that handles long lines. -GREP=$lt_GREP - -# An ERE matcher. -EGREP=$lt_EGREP - -# A literal string matcher. -FGREP=$lt_FGREP - -# A BSD- or MS-compatible name lister. -NM=$lt_NM - -# Whether we need soft or hard links. -LN_S=$lt_LN_S - -# What is the maximum length of a command? -max_cmd_len=$max_cmd_len - -# Object file suffix (normally "o"). -objext=$ac_objext - -# Executable file suffix (normally ""). -exeext=$exeext - -# whether the shell understands "unset". -lt_unset=$lt_unset - -# turn spaces into newlines. -SP2NL=$lt_lt_SP2NL - -# turn newlines into spaces. -NL2SP=$lt_lt_NL2SP - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == "file_magic". -file_magic_cmd=$lt_file_magic_cmd - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A symbol stripping program. -STRIP=$lt_STRIP - -# Commands used to install an old-style archive. -RANLIB=$lt_RANLIB -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# A C compiler. -LTCC=$lt_CC - -# LTCC compiler flags. -LTCFLAGS=$lt_CFLAGS - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration. -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair. -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# Transform the output of nm in a C name address pair when lib prefix is needed. -global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# An echo program that does not interpret backslashes. -ECHO=$lt_ECHO - -# Used to examine libraries when file_magic_cmd begins with "file". -MAGIC_CMD=$MAGIC_CMD - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Tool to manipulate archived DWARF debug symbol files on Mac OS X. -DSYMUTIL=$lt_DSYMUTIL - -# Tool to change global to local symbols on Mac OS X. -NMEDIT=$lt_NMEDIT - -# Old archive suffix (normally "a"). -libext=$libext - -# Shared library suffix (normally ".so"). -shrext_cmds=$lt_shrext_cmds - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at link time. -variables_saved_for_relink=$lt_variables_saved_for_relink - -# Do we need the "lib" prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Library versioning type. -version_type=$version_type - -# Shared library runtime path variable. -runpath_var=$runpath_var - -# Shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Command to use after installation of a shared archive. -postinstall_cmds=$lt_postinstall_cmds - -# Command to use after uninstallation of a shared archive. -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# As "finish_cmds", except a single script fragment to be evaled but -# not shown. -finish_eval=$lt_finish_eval - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Compile-time system search path for libraries. -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - - -# The linker used to build libraries. -LD=$lt_LD - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds - -# A language specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU compiler? -with_gcc=$GCC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec - -# If ld is used when linking, flag to hardcode \$libdir into a binary -# during linking. This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \${shlibpath_var} if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# The directories searched by this compiler when creating a shared library. -compiler_lib_search_dirs=$lt_compiler_lib_search_dirs - -# Dependencies to place before and after the objects being linked to -# create a shared library. -predep_objects=$lt_predep_objects -postdep_objects=$lt_postdep_objects -predeps=$lt_predeps -postdeps=$lt_postdeps - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path - -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - -ltmain="$ac_aux_dir/ltmain.sh" - - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[^=]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` -} -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1+=\$2" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1=\$$1\$2" -} -_LT_EOF - ;; - esac - - - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - - - cat <<_LT_EOF >> "$ofile" - -# ### BEGIN LIBTOOL TAG CONFIG: CXX - -# The linker used to build libraries. -LD=$lt_LD_CXX - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds_CXX - -# A language specific compiler. -CC=$lt_compiler_CXX - -# Is the compiler the GNU compiler? -with_gcc=$GCC_CXX - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_CXX - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_CXX - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_CXX - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_CXX - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object_CXX - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds_CXX -archive_expsym_cmds=$lt_archive_expsym_cmds_CXX - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds_CXX -module_expsym_cmds=$lt_module_expsym_cmds_CXX - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld_CXX - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_CXX - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_CXX - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX - -# If ld is used when linking, flag to hardcode \$libdir into a binary -# during linking. This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct_CXX - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \${shlibpath_var} if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute_CXX - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L_CXX - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic_CXX - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath_CXX - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_CXX - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path_CXX - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols_CXX - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_CXX - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_CXX - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_CXX - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds_CXX - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec_CXX - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_CXX - -# The directories searched by this compiler when creating a shared library. -compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX - -# Dependencies to place before and after the objects being linked to -# create a shared library. -predep_objects=$lt_predep_objects_CXX -postdep_objects=$lt_postdep_objects_CXX -predeps=$lt_predeps_CXX -postdeps=$lt_postdeps_CXX - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_CXX - -# ### END LIBTOOL TAG CONFIG: CXX -_LT_EOF - - ;; - - esac -done # for ac_tag - - -{ (exit 0); exit 0; } -_ACEOF -chmod +x $CONFIG_STATUS -ac_clean_files=$ac_clean_files_save - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || { (exit 1); exit 1; } -fi - diff --git a/open-vm-tools/configure.ac b/open-vm-tools/configure.ac index 04e3bac2e..75860ecbc 100644 --- a/open-vm-tools/configure.ac +++ b/open-vm-tools/configure.ac @@ -39,10 +39,10 @@ ### Initialization ### -TOOLS_VERSION="10.0.5" +TOOLS_VERSION="10.0.0" AC_INIT( [open-vm-tools], - [10.0.5], + [10.0.0], [open-vm-tools-devel@lists.sourceforge.net]) # In order to make this configure script auto-detect situations where @@ -153,7 +153,7 @@ if test "$with_kernel_modules" = "yes"; then fi LINUXINCLUDE="$LINUXDIR/build/include" if test ! -d "$LINUXINCLUDE"; then - AC_MSG_ERROR([Can't find include dir under $LINUXDIR]) + AC_MSG_ERROR([Cannot find include dir under $LINUXDIR]) fi ;; @@ -362,7 +362,7 @@ AC_CHECK_PROG([have_genmarshal], [no]) if test "$have_genmarshal" != "yes"; then - AC_MSG_ERROR([glib-genmarshal is required; make sure it's available in your path.]) + AC_MSG_ERROR([glib-genmarshal is required; make sure it is available in your path.]) fi # @@ -407,15 +407,26 @@ AC_ARG_ENABLE([vgauth], [], [enable_vgauth=yes]) +if test "$enable_vgauth" = "yes" ; then + AC_ARG_ENABLE([caf], + [AS_HELP_STRING([--disable-caf], + [do not build CAF (Common Agent Framework).])], + [], + [enable_caf=no]) +else + enable_caf=no +fi + # # Check for openssl, xerces-c and xml-security-c # AC_ARG_WITH([ssl], [AS_HELP_STRING([--without-ssl], - [compiles without openssl support (disables grabbitmqproxy and vgauth).])], + [compiles without openssl support (disables grabbitmqproxy, vgauth and CAF).])], [ enable_grabbitmqproxy=no enable_vgauth=no + enable_caf=no ], [with_ssl=yes]) @@ -431,15 +442,18 @@ AC_ARG_WITH([xerces], [enable_vgauth=no], [with_xerces=yes]) +# Make sure we are building with openssl 1.0.1 and above so that +# we use only TLSv1_2. + if test "$enable_vgauth" = "yes" -o "$enable_grabbitmqproxy" = "yes"; then AC_VMW_DEFAULT_FLAGS([SSL]) AC_VMW_CHECK_LIB([ssl], [SSL], + [openssl], [], + [1.0.1], [], - [], - [], - [], + [BIO_new_file], [], [AC_VMW_LIB_ERROR([SSL], [ssl])]) fi @@ -467,6 +481,8 @@ if test "$enable_vgauth" = "yes"; then [], [], [AC_VMW_LIB_ERROR([XMLSECURITY], [xml-security-c])]) +else + enable_caf=no fi # @@ -514,7 +530,7 @@ else [X11/extensions/extutil.h], [], [AC_MSG_ERROR( - [X11/extensions/extutil.h header not found - you're probably on Solaris 10 or older. Please copy that header file onto your system manually, or configure without X11 (using --without-x).])], + [X11/extensions/extutil.h header not found - you are probably on Solaris 10 or older. Please copy that header file onto your system manually, or configure without X11 (using --without-x).])], [#include #include ]) @@ -619,6 +635,28 @@ else [], [GTKMM_CPPFLAGS="$GTKMM_CPPFLAGS -DHAVE_GTKMM"], [AC_MSG_ERROR([gtkmm library not found. Please install the libgtkmm devel package(s), or re-configure using --without-gtkmm.])]) + + # + # libsigc++-2.0 >= 2.5.1 requires C++11 support + # + # Calling AC_VMW_CHECK_LIBXX would duplicate the sigc++ + # flags we would have already got as part of gtkmm call + # above. This is OK because we are not seeing any issues + # because of this and calling AC_VMW_CHECK_LIBXX function + # provides other benefits like picking custom flags. + # + # AC_VMW_CHECK_LIBXX sets CPPFLAGS and LIBS variables only, + # so we have to use SIGCXX_CPPFLAGS instead of SIGCXX_CXXFLAGS. + # + AC_VMW_CHECK_LIBXX([sigc++-2.0], + [SIGCXX], + [sigc++-2.0], + [], + [2.5.1], + [sigc++.h], + [], + [SIGCXX_CPPFLAGS="$SIGCXX_CPPFLAGS -std=c++11"], + [SIGCXX_CPPFLAGS="$SIGCXX_CPPFLAGS"]) fi fi # End of checks for X libraries @@ -645,6 +683,8 @@ AC_CHECK_FUNCS( AC_CHECK_FUNCS([ecvt]) AC_CHECK_FUNCS([fcvt]) +AC_CHECK_FUNC([mkdtemp], [have_mkdtemp=yes]) + if test "$os" = "freebsd" -a "$osVersion" -ge 600000; then AC_CHECK_LIB( [thr], @@ -779,7 +819,7 @@ if test "$with_dnet" = "yes"; then [dumbnet.h], [intf_open], [have_dnet="yes"; - AC_DEFINE([DNET_IS_DUMBNET], 1, [Define to 1 if substituting Debian's libdumbnet for libdnet.])], + AC_DEFINE([DNET_IS_DUMBNET], 1, [Define to 1 if substituting libdumbnet for libdnet in Debian.])], []) if test $have_dnet = "no"; then @@ -851,6 +891,52 @@ else CPPFLAGS="$CPPFLAGS -DNO_ICU" fi +if test "$enable_caf" = "yes"; then + AC_VMW_CHECK_LIBXX([log4cpp], + [LOG4CPP], + [], + [log4cpp-config], + [], + [Appender.hh], + [], + [have_log4cpp="yes"], + [AC_VMW_LIB_ERROR([LOG4CPP], [log4cpp])]) + + AC_VMW_CHECK_LIB([rabbitmq], + [LIBRABBITMQ], + [librabbitmq], + [], + [0.7.1], + [amqp_tcp_socket.h], + [], + [have_librabbitmq="yes"], + [AC_VMW_LIB_ERROR([LIBRABBITMQ], [librabbitmq])]) + + # + # CAF requires glib 2.34 or greater. + # + AC_VMW_CHECK_LIB([glib-2.0], + [GLIB2], + [glib-2.0], + [], + [2.34.0], + [glib.h], + [g_key_file_new], + [], + [AC_MSG_ERROR([glib2 >= 2.34.0 is required.])]) + + AC_VMW_CHECK_LIB([gthread-2.0], + [GTHREAD], + [gthread-2.0], + [], + [2.34.0], + [], + [], + [], + [AC_MSG_ERROR([glib >= 2.34.0 is required.])]) + +fi + AC_PATH_PROG( [RPCGEN], [rpcgen], @@ -1154,7 +1240,9 @@ AM_CONDITIONAL(USE_PRINTF_WRAPPERS, test "$bsdPrintfWrappers" = "yes") AM_CONDITIONAL(ENABLE_DEPLOYPKG, test "$enable_deploypkg" = "yes") AM_CONDITIONAL(ENABLE_GRABBITMQPROXY, test "$enable_grabbitmqproxy" = "yes") AM_CONDITIONAL(ENABLE_VGAUTH, test "$enable_vgauth" = "yes") +AM_CONDITIONAL(ENABLE_CAF, test "$enable_caf" = "yes") AM_CONDITIONAL(HAVE_VSOCK, test "$os" = "linux") +AM_CONDITIONAL(HAVE_MKDTEMP, test "$have_mkdtemp" = "yes") if test "$have_xsm" != "yes"; then AC_DEFINE([NO_XSM], 1, []) @@ -1209,6 +1297,15 @@ COMMON_PLUGIN_INSTALLDIR=$libdir/open-vm-tools/plugins/common VMSVC_PLUGIN_INSTALLDIR=$libdir/open-vm-tools/plugins/vmsvc VMUSR_PLUGIN_INSTALLDIR=$libdir/open-vm-tools/plugins/vmusr +# Installation directories for caf binary/so files +#CAF_PME_BIN_DIR=${sbindir}/vmware-caf/pme/bin +CAF_PME_BIN_DIR=${libdir}/open-vm-tools/vmware-caf/pme/bin +CAF_PME_LIB_DIR=${libdir}/open-vm-tools/vmware-caf/pme/lib + +# Installation directories for caf subsys so files +CAF_SUBSYS_DIR=${libdir}/open-vm-tools/vmware-caf/pme/lib +CAF_SUBSYS_LDFLAGS="-Wl,-z,defs -Wl,-lc -shared -module -avoid-version" + # General definitions INSTVMSG='$(SHELL) $(top_srcdir)/scripts/build/instvmsg.sh' RPCGEN_WRAPPER='$(SHELL) $(top_builddir)/scripts/build/rpcgen_wrapper.sh' @@ -1237,6 +1334,10 @@ AC_SUBST([TEST_PLUGIN_INSTALLDIR]) AC_SUBST([COMMON_PLUGIN_INSTALLDIR]) AC_SUBST([VMSVC_PLUGIN_INSTALLDIR]) AC_SUBST([VMUSR_PLUGIN_INSTALLDIR]) +AC_SUBST([CAF_SUBSYS_DIR]) +AC_SUBST([CAF_SUBSYS_LDFLAGS]) +AC_SUBST([CAF_PME_BIN_DIR]) +AC_SUBST([CAF_PME_LIB_DIR]) if test "$os" = "freebsd" -a -n "$SYSDIR"; then # If SYSDIR is not defined, AC_SUBST expands to nothing, so we need something # inside this block. @@ -1334,6 +1435,7 @@ AC_CONFIG_FILES([ \ rpctool/Makefile \ guestproxycerttool/Makefile \ vgauth/Makefile \ + namespacetool/Makefile \ vgauth/lib/Makefile \ vgauth/cli/Makefile \ vgauth/service/Makefile \ @@ -1343,6 +1445,18 @@ AC_CONFIG_FILES([ \ libDeployPkg/libDeployPkg.pc \ libhgfs/Makefile \ libvmtools/Makefile \ + common-agent/Cpp/Framework/Makefile \ + common-agent/Cpp/Communication/Makefile \ + common-agent/Cpp/InternalProviders/Makefile \ + common-agent/Cpp/ManagementAgent/Makefile \ + common-agent/Cpp/ProviderFx/Makefile \ + common-agent/input/Makefile \ + common-agent/input/invokers/Makefile \ + common-agent/input/providerReg/Makefile \ + common-agent/etc/Makefile \ + common-agent/etc/config/Makefile \ + common-agent/etc/scripts/Makefile \ + common-agent/etc/install/Makefile \ xferlogs/Makefile \ modules/Makefile \ vmblock-fuse/Makefile \ @@ -1355,7 +1469,7 @@ AC_CONFIG_FILES([ \ tests/testVmblock/Makefile \ docs/Makefile \ docs/api/Makefile \ - scripts/Makefile \ + scripts/Makefile \ scripts/build/rpcgen_wrapper.sh \ ]) diff --git a/open-vm-tools/docs/Makefile.in b/open-vm-tools/docs/Makefile.in deleted file mode 100644 index 42ef2c1bd..000000000 --- a/open-vm-tools/docs/Makefile.in +++ /dev/null @@ -1,582 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@HAVE_DOXYGEN_TRUE@am__append_1 = api -subdir = docs -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = api -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUBDIRS = $(am__append_1) -all: all-recursive - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu docs/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-exec-am: - -install-html: install-html-recursive - -install-info: install-info-recursive - -install-man: - -install-pdf: install-pdf-recursive - -install-ps: install-ps-recursive - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ - install-strip - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - ctags ctags-recursive distclean distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/docs/api/Makefile.in b/open-vm-tools/docs/api/Makefile.in deleted file mode 100644 index 44df66a41..000000000 --- a/open-vm-tools/docs/api/Makefile.in +++ /dev/null @@ -1,458 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = docs/api -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -DOXYGEN_INPUT = $(top_srcdir)/docs/api $(top_srcdir)/docs/api/services \ - $(top_srcdir)/lib/include/vmware/tools \ - $(top_srcdir)/libvmtools $(top_srcdir)/tests/vmrpcdbg -DOXYGEN_CPP_PREDEFINED = G_LOCK_DEFINE_STATIC(x) G_LOG_DOMAIN= -DOXYGEN_CPP_EXPAND = -DOXYGEN_EXTRA_PATTERNS = *.c *.doxy *.h *.txt -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/api/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu docs/api/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile all-local -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-data-local - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: all all-am all-local check check-am clean clean-generic \ - clean-libtool distclean distclean-generic distclean-libtool \ - distdir dvi dvi-am html html-am info info-am install \ - install-am install-data install-data-am install-data-local \ - install-dvi install-dvi-am install-exec install-exec-am \ - install-html install-html-am install-info install-info-am \ - install-man install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am uninstall uninstall-am - - -# This rule has no dependencies, so it's executed every time. Not optimal, -# but generation of the docs is pretty quick, and having the right dependencies -# here is very non-trivial. -build/index.html: - mkdir -p build - sed \ - -e 's,##{BUILD_DIR}##,$(top_builddir),' \ - -e 's,##{BUILD_OUTPUT}##,build,' \ - -e 's,##{CLIENT_ROOT}##,$(top_srcdir),' \ - -e 's,##{CPP_EXPAND}##,$(DOXYGEN_CPP_EXPAND),' \ - -e 's,##{CPP_PREDEFINED}##,$(DOXYGEN_CPP_PREDEFINED),' \ - -e 's,##{DOT}##,@DOT@,' \ - -e 's,##{FILE_PATTERNS}##,$(DOXYGEN_EXTRA_PATTERNS),' \ - -e 's,##{HAVE_DOT}##,@HAVE_DOT@,' \ - -e 's,##{INCLUDE_PATHS}##,$(top_srcdir)/lib/include,' \ - -e 's,##{INPUT_PATHS}##,$(DOXYGEN_INPUT),' \ - -e 's,##{MSCGEN_DIR}##,@MSCGEN_DIR@,' \ - -e 's,##{PERL}##,,' \ - -e 's,##{PROJECT_NAME}##,@PACKAGE_STRING@,' \ - -e 's,##{PROJECT_VERSION}##,@TOOLS_VERSION@,' \ - -e 's,##{WARNING_LOG}##,warnings.log,' \ - $(top_srcdir)/docs/api/doxygen.conf > doxygen.parsed.conf - doxygen doxygen.parsed.conf > /dev/null - -all-local: build/index.html - -install-data-local: - mkdir -p $(DESTDIR)$(docdir)/api - cp -r build/* $(DESTDIR)$(docdir)/api -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/docs/api/services/utils.txt b/open-vm-tools/docs/api/services/utils.txt new file mode 100644 index 000000000..e69de29bb diff --git a/open-vm-tools/guestproxycerttool/Makefile.in b/open-vm-tools/guestproxycerttool/Makefile.in deleted file mode 100644 index c25228199..000000000 --- a/open-vm-tools/guestproxycerttool/Makefile.in +++ /dev/null @@ -1,616 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2014-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -bin_PROGRAMS = vmware-guestproxycerttool$(EXEEXT) -@HAVE_ICU_TRUE@am__append_1 = @ICU_LIBS@ -subdir = guestproxycerttool -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) -PROGRAMS = $(bin_PROGRAMS) -am_vmware_guestproxycerttool_OBJECTS = \ - vmware_guestproxycerttool-cert_key.$(OBJEXT) \ - vmware_guestproxycerttool-cert_util.$(OBJEXT) \ - vmware_guestproxycerttool-cert_tool.$(OBJEXT) -vmware_guestproxycerttool_OBJECTS = \ - $(am_vmware_guestproxycerttool_OBJECTS) -am__DEPENDENCIES_1 = -vmware_guestproxycerttool_DEPENDENCIES = $(am__DEPENDENCIES_1) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(vmware_guestproxycerttool_SOURCES) -DIST_SOURCES = $(vmware_guestproxycerttool_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -vmware_guestproxycerttool_LDADD = @SSL_LIBS@ -lcrypto @GLIB2_LIBS@ \ - $(am__append_1) -vmware_guestproxycerttool_CPPFLAGS = @SSL_CPPFLAGS@ @GLIB2_CPPFLAGS@ -vmware_guestproxycerttool_SOURCES = cert_key.c cert_util.c cert_tool.c -@HAVE_ICU_FALSE@vmware_guestproxycerttool_LINK = $(LINK) -@HAVE_ICU_TRUE@vmware_guestproxycerttool_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ -@HAVE_ICU_TRUE@ $(LIBTOOLFLAGS) --mode=link $(CXX) \ -@HAVE_ICU_TRUE@ $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ -@HAVE_ICU_TRUE@ $(LDFLAGS) -o $@ - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu guestproxycerttool/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu guestproxycerttool/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ - else :; fi; \ - done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -vmware-guestproxycerttool$(EXEEXT): $(vmware_guestproxycerttool_OBJECTS) $(vmware_guestproxycerttool_DEPENDENCIES) - @rm -f vmware-guestproxycerttool$(EXEEXT) - $(vmware_guestproxycerttool_LINK) $(vmware_guestproxycerttool_OBJECTS) $(vmware_guestproxycerttool_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmware_guestproxycerttool-cert_key.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmware_guestproxycerttool-cert_tool.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmware_guestproxycerttool-cert_util.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -vmware_guestproxycerttool-cert_key.o: cert_key.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_guestproxycerttool_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_guestproxycerttool-cert_key.o -MD -MP -MF $(DEPDIR)/vmware_guestproxycerttool-cert_key.Tpo -c -o vmware_guestproxycerttool-cert_key.o `test -f 'cert_key.c' || echo '$(srcdir)/'`cert_key.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_guestproxycerttool-cert_key.Tpo $(DEPDIR)/vmware_guestproxycerttool-cert_key.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cert_key.c' object='vmware_guestproxycerttool-cert_key.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_guestproxycerttool_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_guestproxycerttool-cert_key.o `test -f 'cert_key.c' || echo '$(srcdir)/'`cert_key.c - -vmware_guestproxycerttool-cert_key.obj: cert_key.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_guestproxycerttool_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_guestproxycerttool-cert_key.obj -MD -MP -MF $(DEPDIR)/vmware_guestproxycerttool-cert_key.Tpo -c -o vmware_guestproxycerttool-cert_key.obj `if test -f 'cert_key.c'; then $(CYGPATH_W) 'cert_key.c'; else $(CYGPATH_W) '$(srcdir)/cert_key.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_guestproxycerttool-cert_key.Tpo $(DEPDIR)/vmware_guestproxycerttool-cert_key.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cert_key.c' object='vmware_guestproxycerttool-cert_key.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_guestproxycerttool_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_guestproxycerttool-cert_key.obj `if test -f 'cert_key.c'; then $(CYGPATH_W) 'cert_key.c'; else $(CYGPATH_W) '$(srcdir)/cert_key.c'; fi` - -vmware_guestproxycerttool-cert_util.o: cert_util.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_guestproxycerttool_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_guestproxycerttool-cert_util.o -MD -MP -MF $(DEPDIR)/vmware_guestproxycerttool-cert_util.Tpo -c -o vmware_guestproxycerttool-cert_util.o `test -f 'cert_util.c' || echo '$(srcdir)/'`cert_util.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_guestproxycerttool-cert_util.Tpo $(DEPDIR)/vmware_guestproxycerttool-cert_util.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cert_util.c' object='vmware_guestproxycerttool-cert_util.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_guestproxycerttool_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_guestproxycerttool-cert_util.o `test -f 'cert_util.c' || echo '$(srcdir)/'`cert_util.c - -vmware_guestproxycerttool-cert_util.obj: cert_util.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_guestproxycerttool_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_guestproxycerttool-cert_util.obj -MD -MP -MF $(DEPDIR)/vmware_guestproxycerttool-cert_util.Tpo -c -o vmware_guestproxycerttool-cert_util.obj `if test -f 'cert_util.c'; then $(CYGPATH_W) 'cert_util.c'; else $(CYGPATH_W) '$(srcdir)/cert_util.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_guestproxycerttool-cert_util.Tpo $(DEPDIR)/vmware_guestproxycerttool-cert_util.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cert_util.c' object='vmware_guestproxycerttool-cert_util.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_guestproxycerttool_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_guestproxycerttool-cert_util.obj `if test -f 'cert_util.c'; then $(CYGPATH_W) 'cert_util.c'; else $(CYGPATH_W) '$(srcdir)/cert_util.c'; fi` - -vmware_guestproxycerttool-cert_tool.o: cert_tool.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_guestproxycerttool_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_guestproxycerttool-cert_tool.o -MD -MP -MF $(DEPDIR)/vmware_guestproxycerttool-cert_tool.Tpo -c -o vmware_guestproxycerttool-cert_tool.o `test -f 'cert_tool.c' || echo '$(srcdir)/'`cert_tool.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_guestproxycerttool-cert_tool.Tpo $(DEPDIR)/vmware_guestproxycerttool-cert_tool.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cert_tool.c' object='vmware_guestproxycerttool-cert_tool.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_guestproxycerttool_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_guestproxycerttool-cert_tool.o `test -f 'cert_tool.c' || echo '$(srcdir)/'`cert_tool.c - -vmware_guestproxycerttool-cert_tool.obj: cert_tool.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_guestproxycerttool_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_guestproxycerttool-cert_tool.obj -MD -MP -MF $(DEPDIR)/vmware_guestproxycerttool-cert_tool.Tpo -c -o vmware_guestproxycerttool-cert_tool.obj `if test -f 'cert_tool.c'; then $(CYGPATH_W) 'cert_tool.c'; else $(CYGPATH_W) '$(srcdir)/cert_tool.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_guestproxycerttool-cert_tool.Tpo $(DEPDIR)/vmware_guestproxycerttool-cert_tool.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cert_tool.c' object='vmware_guestproxycerttool-cert_tool.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_guestproxycerttool_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_guestproxycerttool-cert_tool.obj `if test -f 'cert_tool.c'; then $(CYGPATH_W) 'cert_tool.c'; else $(CYGPATH_W) '$(srcdir)/cert_tool.c'; fi` - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: - for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: install-binPROGRAMS - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-binPROGRAMS - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/hgfsclient/Makefile.in b/open-vm-tools/hgfsclient/Makefile.in deleted file mode 100644 index c22e9ef8d..000000000 --- a/open-vm-tools/hgfsclient/Makefile.in +++ /dev/null @@ -1,583 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -bin_PROGRAMS = vmware-hgfsclient$(EXEEXT) -@HAVE_ICU_TRUE@am__append_1 = @ICU_LIBS@ -subdir = hgfsclient -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) -PROGRAMS = $(bin_PROGRAMS) -am_vmware_hgfsclient_OBJECTS = vmware_hgfsclient-hgfsclient.$(OBJEXT) -vmware_hgfsclient_OBJECTS = $(am_vmware_hgfsclient_OBJECTS) -am__DEPENDENCIES_1 = -vmware_hgfsclient_DEPENDENCIES = ../lib/hgfsBd/libHgfsBd.la \ - $(am__DEPENDENCIES_1) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(vmware_hgfsclient_SOURCES) -DIST_SOURCES = $(vmware_hgfsclient_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -vmware_hgfsclient_LDADD = ../lib/hgfsBd/libHgfsBd.la @VMTOOLS_LIBS@ \ - @HGFS_LIBS@ $(am__append_1) -vmware_hgfsclient_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -vmware_hgfsclient_SOURCES = hgfsclient.c -@HAVE_ICU_FALSE@vmware_hgfsclient_LINK = $(LINK) -@HAVE_ICU_TRUE@vmware_hgfsclient_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ -@HAVE_ICU_TRUE@ $(LIBTOOLFLAGS) --mode=link $(CXX) \ -@HAVE_ICU_TRUE@ $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ -@HAVE_ICU_TRUE@ $(LDFLAGS) -o $@ - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu hgfsclient/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu hgfsclient/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ - else :; fi; \ - done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -vmware-hgfsclient$(EXEEXT): $(vmware_hgfsclient_OBJECTS) $(vmware_hgfsclient_DEPENDENCIES) - @rm -f vmware-hgfsclient$(EXEEXT) - $(vmware_hgfsclient_LINK) $(vmware_hgfsclient_OBJECTS) $(vmware_hgfsclient_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmware_hgfsclient-hgfsclient.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -vmware_hgfsclient-hgfsclient.o: hgfsclient.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_hgfsclient_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_hgfsclient-hgfsclient.o -MD -MP -MF $(DEPDIR)/vmware_hgfsclient-hgfsclient.Tpo -c -o vmware_hgfsclient-hgfsclient.o `test -f 'hgfsclient.c' || echo '$(srcdir)/'`hgfsclient.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_hgfsclient-hgfsclient.Tpo $(DEPDIR)/vmware_hgfsclient-hgfsclient.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hgfsclient.c' object='vmware_hgfsclient-hgfsclient.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_hgfsclient_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_hgfsclient-hgfsclient.o `test -f 'hgfsclient.c' || echo '$(srcdir)/'`hgfsclient.c - -vmware_hgfsclient-hgfsclient.obj: hgfsclient.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_hgfsclient_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_hgfsclient-hgfsclient.obj -MD -MP -MF $(DEPDIR)/vmware_hgfsclient-hgfsclient.Tpo -c -o vmware_hgfsclient-hgfsclient.obj `if test -f 'hgfsclient.c'; then $(CYGPATH_W) 'hgfsclient.c'; else $(CYGPATH_W) '$(srcdir)/hgfsclient.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_hgfsclient-hgfsclient.Tpo $(DEPDIR)/vmware_hgfsclient-hgfsclient.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hgfsclient.c' object='vmware_hgfsclient-hgfsclient.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_hgfsclient_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_hgfsclient-hgfsclient.obj `if test -f 'hgfsclient.c'; then $(CYGPATH_W) 'hgfsclient.c'; else $(CYGPATH_W) '$(srcdir)/hgfsclient.c'; fi` - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: - for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: install-binPROGRAMS - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-binPROGRAMS - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/hgfsmounter/Makefile.in b/open-vm-tools/hgfsmounter/Makefile.in deleted file mode 100644 index 09cad4ee9..000000000 --- a/open-vm-tools/hgfsmounter/Makefile.in +++ /dev/null @@ -1,585 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -sbin_PROGRAMS = mount.vmhgfs$(EXEEXT) -subdir = hgfsmounter -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__installdirs = "$(DESTDIR)$(sbindir)" -sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM) -PROGRAMS = $(sbin_PROGRAMS) -am_mount_vmhgfs_OBJECTS = hgfsmounter.$(OBJEXT) -mount_vmhgfs_OBJECTS = $(am_mount_vmhgfs_OBJECTS) -mount_vmhgfs_DEPENDENCIES = ../lib/string/libString.la \ - ../lib/panicDefault/libPanicDefault.la \ - ../lib/panic/libPanic.la ../lib/lock/libLock.la \ - ../lib/misc/libMisc.la ../lib/stubs/libStubs.la -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(mount_vmhgfs_SOURCES) -DIST_SOURCES = $(mount_vmhgfs_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -mount_vmhgfs_LDADD = ../lib/string/libString.la \ - ../lib/panicDefault/libPanicDefault.la \ - ../lib/panic/libPanic.la ../lib/lock/libLock.la \ - ../lib/misc/libMisc.la ../lib/stubs/libStubs.la -mount_vmhgfs_SOURCES = hgfsmounter.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu hgfsmounter/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu hgfsmounter/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-sbinPROGRAMS: $(sbin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)" - @list='$(sbin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(sbinPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(sbindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(sbinPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(sbindir)/$$f" || exit 1; \ - else :; fi; \ - done - -uninstall-sbinPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(sbin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(sbindir)/$$f'"; \ - rm -f "$(DESTDIR)$(sbindir)/$$f"; \ - done - -clean-sbinPROGRAMS: - @list='$(sbin_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -mount.vmhgfs$(EXEEXT): $(mount_vmhgfs_OBJECTS) $(mount_vmhgfs_DEPENDENCIES) - @rm -f mount.vmhgfs$(EXEEXT) - $(LINK) $(mount_vmhgfs_OBJECTS) $(mount_vmhgfs_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hgfsmounter.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: - for dir in "$(DESTDIR)$(sbindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: install-sbinPROGRAMS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-sbinPROGRAMS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook - -.MAKE: install-am install-exec-am install-strip uninstall-am - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-sbinPROGRAMS ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-exec-hook \ - install-html install-html-am install-info install-info-am \ - install-man install-pdf install-pdf-am install-ps \ - install-ps-am install-sbinPROGRAMS install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-hook \ - uninstall-sbinPROGRAMS - - -@FREEBSD_TRUE@install-exec-hook: -@FREEBSD_TRUE@ mv $(DESTDIR)$(sbindir)/mount.vmhgfs \ -@FREEBSD_TRUE@ $(DESTDIR)$(sbindir)/mount_vmhgfs -@FREEBSD_TRUE@ -$(MKDIR_P) $(DESTDIR)/sbin -@FREEBSD_TRUE@ -$(LN_S) $(DESTDIR)$(sbindir)/mount_vmhgfs \ -@FREEBSD_TRUE@ $(DESTDIR)/sbin/mount_vmhgfs &> /dev/null -@FREEBSD_TRUE@uninstall-hook: -@FREEBSD_TRUE@ rm -f $(DESTDIR)$(sbindir)/mount_vmhgfs -@FREEBSD_FALSE@install-exec-hook: -@FREEBSD_FALSE@ -$(MKDIR_P) $(DESTDIR)/sbin -@FREEBSD_FALSE@ -$(LN_S) $(DESTDIR)$(sbindir)/mount.vmhgfs \ -@FREEBSD_FALSE@ $(DESTDIR)/sbin/mount.vmhgfs &> /dev/null -@FREEBSD_FALSE@uninstall-hook: -@FREEBSD_FALSE@ rm -f $(DESTDIR)/sbin/mount.vmhgfs -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/Makefile.in b/open-vm-tools/lib/Makefile.in deleted file mode 100644 index e01e06193..000000000 --- a/open-vm-tools/lib/Makefile.in +++ /dev/null @@ -1,599 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@HAVE_X11_TRUE@am__append_1 = appUtil -@HAVE_VSOCK_TRUE@am__append_2 = asyncsocket -@HAVE_GTKMM_TRUE@am__append_3 = hgfsUri -@USE_SLASH_PROC_TRUE@am__append_4 = slashProc -subdir = lib -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = guestRpc appUtil auth backdoor asyncsocket sslDirect \ - pollGtk poll dataMap hashMap dict dynxdr err file foundryMsg \ - glibUtils guestApp hgfs hgfsBd hgfsHelper hgfsServer \ - hgfsServerManagerGuest hgfsServerPolicyGuest hgfsUri \ - impersonate lock message misc netUtil nicInfo panic \ - panicDefault procMgr rpcChannel rpcIn rpcOut rpcVmx slashProc \ - string stubs syncDriver system unicode user vmCheck vmSignal \ - wiper xdg -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUBDIRS = guestRpc $(am__append_1) auth backdoor $(am__append_2) \ - sslDirect pollGtk poll dataMap hashMap dict dynxdr err file \ - foundryMsg glibUtils guestApp hgfs hgfsBd hgfsHelper \ - hgfsServer hgfsServerManagerGuest hgfsServerPolicyGuest \ - $(am__append_3) impersonate lock message misc netUtil nicInfo \ - panic panicDefault procMgr rpcChannel rpcIn rpcOut rpcVmx \ - $(am__append_4) string stubs syncDriver system unicode user \ - vmCheck vmSignal wiper xdg -all: all-recursive - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-exec-am: - -install-html: install-html-recursive - -install-info: install-info-recursive - -install-man: - -install-pdf: install-pdf-recursive - -install-ps: install-ps-recursive - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ - install-strip - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - ctags ctags-recursive distclean distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/appUtil/Makefile.in b/open-vm-tools/lib/appUtil/Makefile.in deleted file mode 100644 index 20f2c6c61..000000000 --- a/open-vm-tools/lib/appUtil/Makefile.in +++ /dev/null @@ -1,534 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2008-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/appUtil -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libAppUtil_la_LIBADD = -am_libAppUtil_la_OBJECTS = appUtil.lo appUtilX11.lo -libAppUtil_la_OBJECTS = $(am_libAppUtil_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libAppUtil_la_SOURCES) -DIST_SOURCES = $(libAppUtil_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libAppUtil.la -libAppUtil_la_SOURCES = appUtil.c appUtilX11.c -AM_CFLAGS = @GTK_CPPFLAGS@ -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/appUtil/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/appUtil/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libAppUtil.la: $(libAppUtil_la_OBJECTS) $(libAppUtil_la_DEPENDENCIES) - $(LINK) $(libAppUtil_la_OBJECTS) $(libAppUtil_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/appUtil.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/appUtilX11.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/asyncsocket/Makefile.am b/open-vm-tools/lib/asyncsocket/Makefile.am index 394a3f224..ead9657ae 100644 --- a/open-vm-tools/lib/asyncsocket/Makefile.am +++ b/open-vm-tools/lib/asyncsocket/Makefile.am @@ -19,6 +19,7 @@ noinst_LTLIBRARIES = libAsyncSocket.la libAsyncSocket_la_SOURCES = libAsyncSocket_la_SOURCES += asyncsocket.c +libAsyncSocket_la_SOURCES += asyncSocketInterface.c AM_CFLAGS = AM_CFLAGS += -DUSE_SSL_DIRECT diff --git a/open-vm-tools/lib/asyncsocket/Makefile.in b/open-vm-tools/lib/asyncsocket/Makefile.in deleted file mode 100644 index 3307ae6f5..000000000 --- a/open-vm-tools/lib/asyncsocket/Makefile.in +++ /dev/null @@ -1,533 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2013-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/asyncsocket -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libAsyncSocket_la_LIBADD = -am_libAsyncSocket_la_OBJECTS = asyncsocket.lo -libAsyncSocket_la_OBJECTS = $(am_libAsyncSocket_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libAsyncSocket_la_SOURCES) -DIST_SOURCES = $(libAsyncSocket_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libAsyncSocket.la -libAsyncSocket_la_SOURCES = asyncsocket.c -AM_CFLAGS = -DUSE_SSL_DIRECT -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/asyncsocket/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/asyncsocket/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libAsyncSocket.la: $(libAsyncSocket_la_OBJECTS) $(libAsyncSocket_la_DEPENDENCIES) - $(LINK) $(libAsyncSocket_la_OBJECTS) $(libAsyncSocket_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asyncsocket.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/asyncsocket/asyncSocketInt.h b/open-vm-tools/lib/asyncsocket/asyncSocketInt.h index 322f02388..ac5e66430 100644 --- a/open-vm-tools/lib/asyncsocket/asyncSocketInt.h +++ b/open-vm-tools/lib/asyncsocket/asyncSocketInt.h @@ -108,6 +108,14 @@ #define ASOCK_EWOULDBLOCK EWOULDBLOCK #endif +#define WEBSOCKET_HTTP_BUFFER_SIZE 8192 + +typedef struct WebSocketHttpRequest { + char buf[WEBSOCKET_HTTP_BUFFER_SIZE + 1]; /* used for request & response */ + int32 bufLen; + Bool overflow; +} WebSocketHttpRequest; + typedef enum { WEB_SOCKET_FRAME_OPCODE_BINARY = 0x02, WEB_SOCKET_FRAME_OPCODE_CLOSE = 0x08, @@ -145,6 +153,7 @@ typedef enum { typedef enum { ASYNCSOCKET_TYPE_SOCKET = 0, ASYNCSOCKET_TYPE_NAMEDPIPE = 1, + ASYNCSOCKET_TYPE_PROXYSOCKET = 2, } AsyncSocketType; /* @@ -165,6 +174,25 @@ typedef struct SendBufList { char *encodedBuf; } SendBufList; +/* + * Callback to allow user handling of custom upgrade request headers + */ +typedef int (*AsyncWebSocketUpgradeRequestFn) (AsyncSocket *asock, + WebSocketHttpRequest *httpRequest); + +/* + * Callback to allow user handling of custom upgrade request headers + */ +typedef int (*AsyncWebSocketUpgradeResponseFn) (AsyncSocket *asock, + WebSocketHttpRequest *httpRequest); + +typedef enum { + CONNECTING_PRIMARY_SOCKET = 0, + CONNECTED_PRIMARY_SOCKET, + CONNECTING_SECONDARY_SOCKET, + CONNECTED_SECONDARY_SOCKET, +} AsyncProxySocketState; + struct AsyncSocket { uint32 id; AsyncSocketState state; @@ -177,7 +205,7 @@ struct AsyncSocket { int genericErrno; AsyncSocketErrorFn errorFn; void *errorClientData; - VmTimeType drainTimeoutUS; + Bool errorSeen; struct sockaddr_storage localAddr; socklen_t localAddrLen; @@ -187,8 +215,18 @@ struct AsyncSocket { AsyncSocketConnectFn connectFn; AsyncSocketRecvFn recvFn; AsyncSocketSslAcceptFn sslAcceptFn; - void *clientData; /* shared by recvFn, connectFn and sslAcceptFn */ + AsyncSocketSslConnectFn sslConnectFn; + int sslPollFlags; /* shared by sslAcceptFn, sslConnectFn */ + + /* shared by recvFn, connectFn, sslAcceptFn and sslConnectFn */ + void *clientData; + AsyncSocketPollParams pollParams; + PollerFunction internalConnectFn; + + /* governs optional AsyncSocket_Close() behavior */ + int flushEnabledMaxWaitMsec; + AsyncSocketCloseCb closeCb; void *recvBuf; int recvPos; @@ -253,12 +291,32 @@ struct AsyncSocket { char *upgradeNonceBase64; rqContext *randomContext; uint16 closeStatus; + AsyncWebSocketUpgradeRequestFn upgradeRequestPrepareFn; + AsyncWebSocketUpgradeResponseFn upgradeResponseProcessFn; } webSocket; + struct { + AsyncProxySocketState proxySocketState; + char *secondaryUrl; + char *e2ePort; + char *secondaryIP; + char *secondaryPort; + SSLVerifyParam *secondarySslVerifyParam; + const char *akey; + const char *label; + void *privData; + struct TCP2SCTPListenerArg *tcp2sctp; + AsyncSocket *primarySocket; + AsyncSocket *secondarySocket; + } proxySocket; + #ifdef _WIN32 struct { char *pipeName; uint32 connectCount; + uint32 numInstances; + DWORD openMode; + DWORD pipeMode; HANDLE pipe; OVERLAPPED rd; OVERLAPPED wr; @@ -276,20 +334,71 @@ struct AsyncSocket { }; typedef struct AsyncSocketVTable { + AsyncSocketState (*getState)(AsyncSocket *sock); + int (*getGenericErrno)(AsyncSocket *s); + int (*getFd)(AsyncSocket *asock); + int (*getRemoteIPStr)(AsyncSocket *asock, const char **ipStr); + int (*getINETIPStr)(AsyncSocket *asock, int socketFamily, char **ipRetStr); + unsigned int (*getPort)(AsyncSocket *asock); + + int (*useNodelay)(AsyncSocket *asock, Bool nodelay); + int (*setTCPTimeouts)(AsyncSocket *asock, int keepIdle, int keepIntvl, + int keepCnt); + Bool (*setBufferSizes)(AsyncSocket *asock, int sendSz, int recvSz); + void (*setSendLowLatencyMode)(AsyncSocket *asock, Bool enable); + + Bool (*connectSSL)(AsyncSocket *asock, struct _SSLVerifyParam *verifyParam, + void *sslContext); + void (*startSslConnect)(AsyncSocket *asock, + struct _SSLVerifyParam *verifyParam, void *sslCtx, + AsyncSocketSslConnectFn sslConnectFn, + void *clientData); + Bool (*acceptSSL)(AsyncSocket *asock); + void (*startSslAccept)(AsyncSocket *asock, void *sslCtx, + AsyncSocketSslAcceptFn sslAcceptFn, + void *clientData); + int (*flush)(AsyncSocket *asock, int timeoutMS); + + int (*recv)(AsyncSocket *asock, void *buf, int len, Bool partial, void *cb, + void *cbData); + int (*recvPassedFd)(AsyncSocket *asock, void *buf, int len, void *cb, + void *cbData); + int (*getReceivedFd)(AsyncSocket *asock); + + int (*send)(AsyncSocket *asock, void *buf, int len, + AsyncSocketSendFn sendFn, void *clientData); + int (*isSendBufferFull)(AsyncSocket *asock); + + int (*close)(AsyncSocket *asock); + int (*cancelRecv)(AsyncSocket *asock, int *partialRecvd, void **recvBuf, + void **recvFn, Bool cancelOnSend); + void (*cancelCbForClose)(AsyncSocket *asock); + + int (*getLocalVMCIAddress)(AsyncSocket *asock, uint32 *cid, uint32 *port); + int (*getRemoteVMCIAddress)(AsyncSocket *asock, uint32 *cid, uint32 *port); + + // WebSocket Specific + char *(*getWebSocketURI)(AsyncSocket *asock); + char *(*getWebSocketCookie)(AsyncSocket *asock); + uint16 (*getWebSocketCloseStatus)(const AsyncSocket *asock); + const char *(*getWebSocketProtocol)(AsyncSocket *asock); + + // Internal void (*dispatchConnect)(AsyncSocket *asock, AsyncSocket *newsock); int (*prepareSend)(AsyncSocket *asock, void *buf, int len, AsyncSocketSendFn sendFn, void *clientData, Bool *bufferListWasEmpty); - int (*send)(AsyncSocket *asock, Bool bufferListWasEmpty, void *buf, int len); - int (*recv)(AsyncSocket *asock, void *buf, int len); + int (*sendInternal)(AsyncSocket *asock, Bool bufferListWasEmpty, void *buf, + int len); + int (*recvInternal)(AsyncSocket *asock, void *buf, int len); PollerFunction sendCallback; PollerFunction recvCallback; Bool (*hasDataPending)(AsyncSocket *asock); - void (*cancelListenCb)(AsyncSocket *asock); - void (*cancelRecvCb)(AsyncSocket *asock); - void (*cancelCbForClose)(AsyncSocket *asock); - Bool (*cancelCbForConnectingClose)(AsyncSocket *asock); - void (*close)(AsyncSocket *asock); + void (*cancelListenCbInternal)(AsyncSocket *asock); + void (*cancelRecvCbInternal)(AsyncSocket *asock); + void (*cancelCbForCloseInternal)(AsyncSocket *asock); + Bool (*cancelCbForConnectingCloseInternal)(AsyncSocket *asock); + void (*closeInternal)(AsyncSocket *asock); void (*release)(AsyncSocket *asock); } AsyncSocketVTable; @@ -364,4 +473,82 @@ AsyncSocket *AsyncSocketListenerCreate(const char *addrStr, const char *protocols[], int *outError); +AsyncSocketState AsyncSocketGetState(AsyncSocket *sock); +int AsyncSocketGetGenericErrno(AsyncSocket *s); +int AsyncSocketGetFd(AsyncSocket *asock); +int AsyncSocketGetRemoteIPStr(AsyncSocket *asock, const char **ipStr); +int AsyncSocketGetINETIPStr(AsyncSocket *asock, int socketFamily, + char **ipRetStr); +unsigned int AsyncSocketGetPort(AsyncSocket *asock); +int AsyncSocketUseNodelay(AsyncSocket *asock, Bool nodelay); +int AsyncSocketSetTCPTimeouts(AsyncSocket *asock, int keepIdle, + int keepIntvl, int keepCnt); +Bool AsyncSocketSetBufferSizes(AsyncSocket *asock, int sendSz, int recvSz); +void AsyncSocketSetSendLowLatencyMode(AsyncSocket *asock, Bool enable); +Bool AsyncSocketConnectSSL(AsyncSocket *asock, + struct _SSLVerifyParam *verifyParam, + void *sslContext); +void AsyncSocketStartSslConnect(AsyncSocket *asock, SSLVerifyParam *verifyParam, + void *sslCtx, + AsyncSocketSslConnectFn sslConnectFn, + void *clientData); +Bool AsyncSocketAcceptSSL(AsyncSocket *asock); +void AsyncSocketStartSslAccept(AsyncSocket *asock, void *sslCtx, + AsyncSocketSslAcceptFn sslAcceptFn, + void *clientData); +int AsyncSocketFlush(AsyncSocket *asock, int timeoutMS); + +int AsyncSocketRecv(AsyncSocket *asock, + void *buf, int len, Bool partial, void *cb, void *cbData); +int AsyncSocketRecvPassedFd(AsyncSocket *asock, void *buf, int len, + void *cb, void *cbData); +int AsyncSocketGetReceivedFd(AsyncSocket *asock); +int AsyncSocketSend(AsyncSocket *asock, void *buf, int len, + AsyncSocketSendFn sendFn, void *clientData); +int AsyncSocketIsSendBufferFull(AsyncSocket *asock); +int AsyncSocketClose(AsyncSocket *asock); +int AsyncSocketCancelRecv(AsyncSocket *asock, int *partialRecvd, + void **recvBuf, void **recvFn, Bool cancelOnSend); +void AsyncSocketCancelCbForClose(AsyncSocket *asock); +int AsyncSocketGetLocalVMCIAddress(AsyncSocket *asock, + uint32 *cid, uint32 *port); +int AsyncSocketGetRemoteVMCIAddress(AsyncSocket *asock, + uint32 *cid, uint32 *port); +char *AsyncSocketGetWebSocketURI(AsyncSocket *asock); +char *AsyncSocketGetWebSocketCookie(AsyncSocket *asock); +uint16 AsyncSocketGetWebSocketCloseStatus(const AsyncSocket *asock); +const char *AsyncSocketGetWebSocketProtocol(AsyncSocket *asock); + +/* + * Websocket Connect extension function. + */ +AsyncSocket * +AsyncSocket_ConnectWebSocketEx(const char *url, + struct _SSLVerifyParam *sslVerifyParam, + const char *cookies, + const char *protocols[], + AsyncSocketConnectFn connectFn, + void *clientData, + AsyncSocketConnectFlags flags, + AsyncSocketPollParams *pollParams, + AsyncWebSocketUpgradeRequestFn prepareRequestFn, + AsyncWebSocketUpgradeResponseFn processResponseFn, + void *privData, + int *error); + +/* + * Utilities for building and parsing http request/response strings. + */ +void WebSocketHttpRequestPrintf(WebSocketHttpRequest *request, + const char *format, ...); + +void WebSocketHttpRequestReset(WebSocketHttpRequest *request); +char *WebSocketHttpRequestGetHeader(const WebSocketHttpRequest *request, + const char *webKey); +Bool WebSocketHttpRequestHasHeader(const WebSocketHttpRequest *request, + const char *key); +char *WebSocketHttpRequestGetURI(const WebSocketHttpRequest *request); +char *WebSocketHttpRequestGetVerb(const WebSocketHttpRequest *request); +char *WebSocketHttpRequestGetPath(const WebSocketHttpRequest *request); + #endif // __ASYNC_SOCKET_INT_H__ diff --git a/open-vm-tools/lib/asyncsocket/asyncSocketInterface.c b/open-vm-tools/lib/asyncsocket/asyncSocketInterface.c new file mode 100644 index 000000000..e12233589 --- /dev/null +++ b/open-vm-tools/lib/asyncsocket/asyncSocketInterface.c @@ -0,0 +1,969 @@ +/********************************************************* + * Copyright (C) 2015 VMware, Inc. All rights reserved. + * + * This program 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 version 2.1 and no 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 Lesser GNU General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + *********************************************************/ + +/********************************************************* + * The contents of this file are subject to the terms of the Common + * Development and Distribution License (the "License") version 1.0 + * and no later version. You may not use this file except in + * compliance with the License. + * + * You can obtain a copy of the License at + * http://www.opensource.org/licenses/cddl1.php + * + * See the License for the specific language governing permissions + * and limitations under the License. + * + *********************************************************/ + +/* + * asyncSocketInterface.c -- + * + * This exposes the public functions of the AsyncSocket library. + * This file itself just contains stubs which call the function + * pointers in the socket's virtual table. + * + * Which entrypoints are virtual and which are base functionality? + * Guidelines: + * - functions affecting the underlying transport (e.g. TCP timeouts) + * are backend-specific and generally ARE virtualized. + * - functions with an immediate effect (e.g. queue bytes for send) + * generally ARE virtualized. + * - functions affecting the socket abstraction (e.g. how it reports errors + * to the caller) are basic functionality and generally are NOT virtualized. + * - functions affecting state which is queried later (e.g. close behavior) + * generally are NOT virtualized. + */ + +#include "asyncsocket.h" +#include "asyncSocketInt.h" + + +/* + *---------------------------------------------------------------------------- + * + * AsyncSocket_GetState -- + * + * Returns the state of the provided asock or ASOCKERR_INVAL. Note that + * unless this is called from a callback function, the state should be + * treated as transient (except the state AsyncSocketClosed). + * + * Results: + * AsyncSocketState enum. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------------- + */ + +AsyncSocketState +AsyncSocket_GetState(AsyncSocket *asock) +{ + if (!asock) { + return ASOCKERR_INVAL; + } + ASSERT(asock->vt->getState); + return asock->vt->getState(asock); +} + + +/* + *---------------------------------------------------------------------------- + * + * AsyncSocket_GetGenericErrno -- + * + * Used when an ASOCKERR_GENERIC is returned due to a system error. + * The errno that was returned by the system is stored in the asock + * struct and returned to the user in this function. + * + * XXX: This function is not thread-safe. The errno should be returned + * in a parameter to any function that can return ASOCKERR_GENERIC. + * + * Results: + * int error code + * + * Side effects: + * None + * + *---------------------------------------------------------------------------- + */ + +int +AsyncSocket_GetGenericErrno(AsyncSocket *asock) // IN: +{ + ASSERT(asock); + ASSERT(asock->vt->getGenericErrno); + return asock->vt->getGenericErrno(asock); +} + + +/* + *---------------------------------------------------------------------------- + * + * AsyncSocket_GetFd -- + * + * Returns the fd for this socket. + * + * Results: + * File descriptor. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------------- + */ + +int +AsyncSocket_GetFd(AsyncSocket *asock) +{ + ASSERT(asock->vt->getFd); + return asock->vt->getFd(asock); +} + + +/* + *---------------------------------------------------------------------------- + * + * AsyncSocket_GetRemoteIPStr -- + * + * Given an AsyncSocket object, returns the remote IP address associated + * with it, or an error if the request is meaningless for the underlying + * connection. + * + * Results: + * ASOCKERR_SUCCESS or ASOCKERR_GENERIC. + * + * Side effects: + * + * + *---------------------------------------------------------------------------- + */ + +int +AsyncSocket_GetRemoteIPStr(AsyncSocket *asock, // IN + const char **ipRetStr) // OUT +{ + ASSERT(asock); + ASSERT(asock->vt->getRemoteIPStr); + return asock->vt->getRemoteIPStr(asock, ipRetStr); +} + + +/* + *---------------------------------------------------------------------------- + * + * AsyncSocket_GetINETIPStr -- + * + * Given an AsyncSocket object, returns the IP addresses associated with + * the requested address family's file descriptor if available. + * + * Passing AF_UNSPEC to socketFamily will provide you with the first + * usable IP address found (if multiple are available), with a preference + * given to IPv6. + * + * It is the caller's responsibility to free ipRetStr. + * + * Results: + * ASOCKERR_SUCCESS. ASOCKERR_INVAL if there is no socket associated with + * address family requested. ASOCKERR_GENERIC for all other errors. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------------- + */ + +int +AsyncSocket_GetINETIPStr(AsyncSocket *asock, // IN + int socketFamily, // IN + char **ipRetStr) // OUT +{ + ASSERT(asock->vt->getINETIPStr); + return asock->vt->getINETIPStr(asock, socketFamily, ipRetStr); +} + + +/* + *---------------------------------------------------------------------------- + * + * AsyncSocket_GetPort -- + * + * Given an AsyncSocket object, returns the port number associated with + * the requested address family's file descriptor if available. + * + * Results: + * Port number in host byte order. MAX_UINT32 on error. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------------- + */ + +unsigned int +AsyncSocket_GetPort(AsyncSocket *asock) // IN +{ + ASSERT(asock->vt->getPort); + return asock->vt->getPort(asock); +} + + +/* + *---------------------------------------------------------------------------- + * + * AsyncSocket_UseNodelay -- + * + * Sets or unset TCP_NODELAY on the socket, which disables or + * enables Nagle's algorithm, respectively. + * + * Results: + * ASOCKERR_SUCCESS on success, ASOCKERR_GENERIC otherwise. + * + * Side Effects: + * Increased bandwidth usage for short messages on this socket + * due to TCP overhead, in exchange for lower latency. + * + *---------------------------------------------------------------------------- + */ + +int +AsyncSocket_UseNodelay(AsyncSocket *asock, // IN/OUT: + Bool nodelay) // IN: +{ + ASSERT(asock->vt->useNodelay); + return asock->vt->useNodelay(asock, nodelay); +} + + +/* + *---------------------------------------------------------------------------- + * + * AsyncSocket_SetTCPTimeouts -- + * + * Allow caller to set a number of TCP-specific timeout + * parameters on the socket for the active connection. + * + * Parameters: + * keepIdle -- The number of seconds a TCP connection must be idle before + * keep-alive probes are sent. + * keepIntvl -- The number of seconds between TCP keep-alive probes once + * they are being sent. + * keepCnt -- The number of keep-alive probes to send before killing + * the connection if no response is received from the peer. + * + * Results: + * ASOCKERR_SUCCESS on success, ASOCKERR_GENERIC otherwise. + * + * Side Effects: + * None. + * + *---------------------------------------------------------------------------- + */ + +#ifdef VMX86_SERVER +int +AsyncSocket_SetTCPTimeouts(AsyncSocket *asock, // IN/OUT: + int keepIdle, // IN + int keepIntvl, // IN + int keepCnt) // IN +{ + ASSERT(asock->vt->setTCPTimeouts); + return asock->vt->setTCPTimeouts(asock, keepIdle, keepIntvl, keepCnt); +} +#endif + + +/* + *----------------------------------------------------------------------------- + * + * AsyncSocket_SetBufferSizes -- + * + * Set socket level recv/send buffer sizes if they are less than given sizes + * + * Result + * TRUE: on success + * FALSE: on failure + * + * Side-effects + * None + * + *----------------------------------------------------------------------------- + */ + +Bool +AsyncSocket_SetBufferSizes(AsyncSocket *asock, // IN + int sendSz, // IN + int recvSz) // IN +{ + if (!asock) { + return FALSE; + } + ASSERT(asock->vt->setBufferSizes); + return asock->vt->setBufferSizes(asock, sendSz, recvSz); +} + + +/* + *----------------------------------------------------------------------------- + * + * AsyncSocket_SetSendLowLatencyMode -- + * + * Put the socket into a mode where we attempt to issue sends + * directly from within AsyncSocket_Send(). Ordinarily, we would + * set up a Poll callback from within AsyncSocket_Send(), which + * introduces some non-zero latency to the send path. In + * low-latency-send mode, that delay is potentially avoided. This + * does introduce a behavioural change; the send completion + * callback may be triggered before the call to Send() returns. As + * not all clients may be expecting this, we don't enable this mode + * unless requested by the client. + * + * Result + * None + * + * Side-effects + * See description above. + * + *----------------------------------------------------------------------------- + */ + +void +AsyncSocket_SetSendLowLatencyMode(AsyncSocket *asock, // IN + Bool enable) // IN +{ + ASSERT(asock->vt->setSendLowLatencyMode); + asock->vt->setSendLowLatencyMode(asock, enable); +} + + +/* + *----------------------------------------------------------------------------- + * + * AsyncSocket_StartSslConnect -- + * + * Start an asynchronous SSL connect operation. + * + * The supplied callback function is called when the operation is complete + * or an error occurs. The caller should only free the verifyParam argument + * after the sslConnectFn callback is called. + * + * Results: + * None. + * Error is always reported using the callback supplied. Detailed SSL + * verification error can be retrieved from verifyParam structure. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +void +AsyncSocket_StartSslConnect(AsyncSocket *asock, // IN + SSLVerifyParam *verifyParam, // IN/OPT + void *sslCtx, // IN + AsyncSocketSslConnectFn sslConnectFn, // IN + void *clientData) // IN +{ + ASSERT(asock); + ASSERT(asock->vt->startSslConnect); + asock->vt->startSslConnect(asock, verifyParam, sslCtx, sslConnectFn, + clientData); +} + + +/* + *----------------------------------------------------------------------------- + * + * AsyncSocket_ConnectSSL -- + * + * Initialize the socket's SSL object, by calling SSL_ConnectAndVerify. + * NOTE: This call is blocking. + * + * Results: + * TRUE if SSL_ConnectAndVerify succeeded, FALSE otherwise. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +Bool +AsyncSocket_ConnectSSL(AsyncSocket *asock, // IN + SSLVerifyParam *verifyParam, // IN/OPT + void *sslContext) // IN/OPT +{ + ASSERT(asock); + ASSERT(asock->vt->connectSSL); + return asock->vt->connectSSL(asock, verifyParam, sslContext); +} + + +/* + *----------------------------------------------------------------------------- + * + * AsyncSocket_AcceptSSL -- + * + * Initialize the socket's SSL object, by calling SSL_Accept. + * + * Results: + * TRUE if SSL_Accept succeeded, FALSE otherwise. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +Bool +AsyncSocket_AcceptSSL(AsyncSocket *asock) // IN +{ + ASSERT(asock); + ASSERT(asock->vt->acceptSSL); + return asock->vt->acceptSSL(asock); +} + + +/* + *----------------------------------------------------------------------------- + * + * AsyncSocket_StartSslAccept -- + * + * Start an asynchronous SSL accept operation. + * + * The supplied callback function is called when the operation is complete + * or an error occurs. + * + * Results: + * None. + * Error is always reported using the callback supplied. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +void +AsyncSocket_StartSslAccept(AsyncSocket *asock, // IN + void *sslCtx, // IN + AsyncSocketSslAcceptFn sslAcceptFn, // IN + void *clientData) // IN +{ + ASSERT(asock); + ASSERT(asock->vt->startSslAccept); + asock->vt->startSslAccept(asock, sslCtx, sslAcceptFn, clientData); +} + + +/* + *---------------------------------------------------------------------------- + * + * AsyncSocket_Flush -- + * + * Try to send any pending out buffers until we run out of buffers, or + * the timeout expires. + * + * Results: + * ASOCKERR_SUCCESS if it worked, ASOCKERR_GENERIC on system call + * failures, and ASOCKERR_TIMEOUT if we couldn't send enough data + * before the timeout expired. + * + * Side effects: + * None. + *---------------------------------------------------------------------------- + */ + +int +AsyncSocket_Flush(AsyncSocket *asock, // IN + int timeoutMS) // IN +{ + if (asock == NULL) { + Warning(ASOCKPREFIX "Flush called with invalid arguments!\n"); + return ASOCKERR_INVAL; + } + ASSERT(asock->vt->flush); + return asock->vt->flush(asock, timeoutMS); +} + + +/* + *---------------------------------------------------------------------------- + * + * AsyncSocket_Recv -- + * AsyncSocket_RecvPartial -- + * + * Registers a callback that will fire once the specified amount of data + * has been received on the socket. + * + * In the case of AsyncSocket_RecvPartial, the callback is fired + * once all or part of the data has been received on the socket. + * + * TCP usage: + * AsyncSocket_Recv(AsyncSocket *asock, + * void *buf, + * int len, + * AsyncSocketRecvFn recvFn, + * void *clientData) + * + * Results: + * ASOCKERR_*. + * + * Side effects: + * Could register poll callback. + * + *---------------------------------------------------------------------------- + */ + +int +AsyncSocket_Recv(AsyncSocket *asock, + void *buf, + int len, + void *cb, + void *cbData) +{ + ASSERT(asock->vt->recv); + if (!asock) { + Warning(ASOCKPREFIX "Recv called with invalid arguments!\n"); + return ASOCKERR_INVAL; + } + + return asock->vt->recv(asock, buf, len, FALSE, cb, cbData); +} + +int +AsyncSocket_RecvPartial(AsyncSocket *asock, + void *buf, + int len, + void *cb, + void *cbData) +{ + ASSERT(asock->vt->recv); + return asock->vt->recv(asock, buf, len, TRUE, cb, cbData); +} + + +/* + *---------------------------------------------------------------------------- + * + * AsyncSocket_RecvPassedFd -- + * + * See AsyncSocket_Recv. Besides that it allows for receiving one + * file descriptor... + * + * Results: + * ASOCKERR_*. + * + * Side effects: + * Could register poll callback. + * + *---------------------------------------------------------------------------- + */ + +int +AsyncSocket_RecvPassedFd(AsyncSocket *asock, // IN/OUT: socket + void *buf, // OUT: buffer with data + int len, // IN: length + void *cb, // IN: completion calback + void *cbData) // IN: callback's data +{ + if (!asock) { + Warning(ASOCKPREFIX "Recv called with invalid arguments!\n"); + return ASOCKERR_INVAL; + } + + ASSERT(asock->vt->recvPassedFd); + return asock->vt->recvPassedFd(asock, buf, len, cb, cbData); +} + + +/* + *----------------------------------------------------------------------------- + * + * AsyncSocket_GetReceivedFd -- + * + * Retrieve received file descriptor from socket. + * + * Results: + * File descriptor. Or -1 if none was received. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +int +AsyncSocket_GetReceivedFd(AsyncSocket *asock) // IN +{ + if (!asock) { + Warning(ASOCKPREFIX "Invalid socket while receiving fd!\n"); + return -1; + } + + ASSERT(asock->vt->getReceivedFd); + return asock->vt->getReceivedFd(asock); +} + + +/* + *---------------------------------------------------------------------------- + * + * AsyncSocket_Send -- + * + * Queues the provided data for sending on the socket. If a send callback + * is provided, the callback is fired after the data has been written to + * the socket. Note that this only guarantees that the data has been + * copied to the transmit buffer, we make no promises about whether it + * has actually been transmitted, or received by the client, when the + * callback is fired. + * + * Send callbacks should also be able to deal with being called if none + * or only some of the queued buffer has been transmitted, since the send + * callbacks for any remaining buffers are fired by AsyncSocket_Close(). + * This condition can be detected by checking the len parameter passed to + * the send callback. + * + * Results: + * ASOCKERR_*. + * + * Side effects: + * May register poll callback or perform I/O. + * + *---------------------------------------------------------------------------- + */ + +int +AsyncSocket_Send(AsyncSocket *asock, + void *buf, + int len, + AsyncSocketSendFn sendFn, + void *clientData) +{ + if (!asock || !buf || len <= 0) { + Warning(ASOCKPREFIX "Send called with invalid arguments! asynchSock: %p " + "buffer: %p length: %d\n", asock, buf, len); + return ASOCKERR_INVAL; + } + ASSERT(asock->vt->send); + return asock->vt->send(asock, buf, len, sendFn, clientData); +} + + +/* + *---------------------------------------------------------------------------- + * + * AsyncSocket_IsSendBufferFull -- + * + * Indicate if socket send buffer is full. Note that unless this is + * called from a callback function, the return value should be treated + * as transient. + * + * Results: + * 0: send space probably available, + * 1: send has reached maximum, + * ASOCKERR_GENERIC: null socket. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------------- + */ + +int +AsyncSocket_IsSendBufferFull(AsyncSocket *asock) +{ + if (!asock) { + return ASOCKERR_GENERIC; + } + ASSERT(asock->vt->isSendBufferFull); + return asock->vt->isSendBufferFull(asock); +} + + +/* + *---------------------------------------------------------------------------- + * + * AsyncSocket_Close -- + * + * AsyncSocket destructor. The destructor should be safe to call at any + * time. It's invoked automatically for I/O errors on slots that have no + * error handler set, and should be called manually by the error handler + * as necessary. It could also be called as part of the normal program + * flow. + * + * Results: + * ASOCKERR_*. + * + * Side effects: + * Closes the socket fd, unregisters all Poll callbacks, and fires the + * send triggers for any remaining output buffers. + * + *---------------------------------------------------------------------------- + */ + +int +AsyncSocket_Close(AsyncSocket *asock) +{ + if (!asock) { + return ASOCKERR_INVAL; + } + ASSERT(asock->vt->close); + return asock->vt->close(asock); +} + + +/* + *----------------------------------------------------------------------------- + * + * AsyncSocket_CancelRecv -- + * AsyncSocket_CancelRecvEx -- + * + * Call this function if you know what you are doing. This should be + * called if you want to synchronously receive the outstanding data on + * the socket. It removes the recv poll callback. It also returns number of + * partially read bytes (if any). A partially read response may exist as + * AsyncSocketRecvCallback calls the recv callback only when all the data + * has been received. + * + * Results: + * ASOCKERR_SUCCESS or ASOCKERR_INVAL. + * + * Side effects: + * Subsequent client call to AsyncSocket_Recv can reinstate async behaviour. + * + *----------------------------------------------------------------------------- + */ + +int +AsyncSocket_CancelRecv(AsyncSocket *asock, // IN + int *partialRecvd, // OUT + void **recvBuf, // OUT + void **recvFn) // OUT +{ + return AsyncSocket_CancelRecvEx(asock, partialRecvd, recvBuf, recvFn, FALSE); +} + +int +AsyncSocket_CancelRecvEx(AsyncSocket *asock, // IN + int *partialRecvd, // OUT + void **recvBuf, // OUT + void **recvFn, // OUT + Bool cancelOnSend) // IN +{ + if (!asock) { + Warning(ASOCKPREFIX "Invalid socket while cancelling recv request!\n"); + return ASOCKERR_INVAL; + } + ASSERT(asock->vt->cancelRecv); + return asock->vt->cancelRecv(asock, partialRecvd, recvBuf, recvFn, + cancelOnSend); +} + + +/* + *---------------------------------------------------------------------------- + * + * AsyncSocket_CancelCbForClose -- + * + * This is the external version of AsyncSocketCancelCbForCloseInt(). It + * takes care of acquiring any necessary lock before calling the internal + * function. + * + * Results: + * None. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------------- + */ + +void +AsyncSocket_CancelCbForClose(AsyncSocket *asock) // IN: +{ + ASSERT(asock->vt->cancelCbForClose); + asock->vt->cancelCbForClose(asock); +} + + +/* + *---------------------------------------------------------------------------- + * + * AsyncSocket_GetLocalVMCIAddress -- + * + * Given an AsyncSocket object, returns the local VMCI context ID and + * port number associated with it, or an error if the request is + * meaningless for the underlying connection. + * + * Results: + * ASOCKERR_SUCCESS or ASOCKERR_GENERIC. + * + * Side effects: + * + * + *---------------------------------------------------------------------------- + */ + +int +AsyncSocket_GetLocalVMCIAddress(AsyncSocket *asock, // IN + uint32 *cid, // OUT: optional + uint32 *port) // OUT: optional +{ + ASSERT(asock); + ASSERT(asock->vt->getLocalVMCIAddress); + return asock->vt->getLocalVMCIAddress(asock, cid, port); +} + + +/* + *---------------------------------------------------------------------------- + * + * AsyncSocket_GetRemoteVMCIAddress -- + * + * Given an AsyncSocket object, returns the remote VMCI context ID and + * port number associated with it, or an error if the request is + * meaningless for the underlying connection. + * + * Results: + * ASOCKERR_SUCCESS or ASOCKERR_GENERIC. + * + * Side effects: + * + * + *---------------------------------------------------------------------------- + */ + +int +AsyncSocket_GetRemoteVMCIAddress(AsyncSocket *asock, // IN + uint32 *cid, // OUT: optional + uint32 *port) // OUT: optional +{ + ASSERT(asock); + ASSERT(asock->vt->getRemoteVMCIAddress); + return asock->vt->getRemoteVMCIAddress(asock, cid, port); +} + + +/* + *---------------------------------------------------------------------------- + * + * AsyncSocket_GetWebSocketURI -- + * + * Return the URI supplied during a WebSocket connection request. + * + * Results: + * URI or Null if no URI was specified. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------------- + */ + +char * +AsyncSocket_GetWebSocketURI(AsyncSocket *asock) // IN +{ + ASSERT(asock); + ASSERT(asock->vt->getWebSocketURI); + return asock->vt->getWebSocketURI(asock); +} + + +/* + *---------------------------------------------------------------------------- + * + * AsyncSocket_GetWebSocketCookie -- + * + * Return the Cookie field value supplied during a WebSocket + * connection request. + * + * Results: + * Cookie, if asock is WebSocket. + * NULL, if asock is not WebSocket. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------------- + */ + +char * +AsyncSocket_GetWebSocketCookie(AsyncSocket *asock) // IN +{ + ASSERT(asock); + if (asock->vt->getWebSocketCookie) { + return asock->vt->getWebSocketCookie(asock); + } + return NULL; +} + + +/* + *---------------------------------------------------------------------------- + * + * AsyncSocket_GetWebSocketCloseStatus -- + * + * Retrieve the close status, if received, for a websocket connection. + * + * Results: + * Websocket close status code (>= 1000), or 0 if never received. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------------- + */ + +uint16 +AsyncSocket_GetWebSocketCloseStatus(const AsyncSocket *asock) // IN +{ + ASSERT(asock); + ASSERT(asock->vt->getWebSocketCloseStatus); + return asock->vt->getWebSocketCloseStatus(asock); +} + + +/* + *---------------------------------------------------------------------------- + * + * AsyncSocket_GetWebSocketProtocol -- + * + * Return the negotiated websocket protocol. Only valid until asock is + * destroyed. + * + * Results: + * NULL, if asock is not WebSocket. + * AsyncWebSocketProtocol *, if asock is WebSocket. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------------- + */ + +const char * +AsyncSocket_GetWebSocketProtocol(AsyncSocket *asock) // IN +{ + ASSERT(asock); + if (asock->vt->getWebSocketProtocol) { + return asock->vt->getWebSocketProtocol(asock); + } + return NULL; +} diff --git a/open-vm-tools/lib/asyncsocket/asyncsocket.c b/open-vm-tools/lib/asyncsocket/asyncsocket.c index 05f217a29..b95bd569b 100644 --- a/open-vm-tools/lib/asyncsocket/asyncsocket.c +++ b/open-vm-tools/lib/asyncsocket/asyncsocket.c @@ -128,18 +128,15 @@ static VMwareStatus AsyncSocketPollAdd(AsyncSocket *asock, Bool socket, ...); static Bool AsyncSocketPollRemove(AsyncSocket *asock, Bool socket, int flags, PollerFunction callback); -static unsigned int AsyncSocketGetPort(struct sockaddr_storage *addr); +static unsigned int AsyncSocketGetPortFromAddr(struct sockaddr_storage *addr); static AsyncSocket *AsyncSocketConnect(struct sockaddr_storage *addr, socklen_t addrLen, AsyncSocketConnectFn connectFn, void *clientData, - PollerFunction internalConnectFn, AsyncSocketConnectFlags flags, AsyncSocketPollParams *pollParams, int *outError); static int AsyncSocketConnectInternal(AsyncSocket *s); -static int AsyncSocketRecv(AsyncSocket *asock, void *buf, int len, - Bool fireOnPartial, void *cb, void *cbData); static Bool AsyncSocketHasDataPendingSocket(AsyncSocket *asock); static VMwareStatus AsyncSocketIPollAdd(AsyncSocket *asock, Bool socket, @@ -150,9 +147,39 @@ static Bool AsyncSocketIPollRemove(AsyncSocket *asock, Bool socket, int flags, static void AsyncSocketIPollSendCallback(void *clientData); static void AsyncSocketIPollRecvCallback(void *clientData); static Bool AsyncSocketAddListenCbSocket(AsyncSocket *asock); - +static void AsyncSocketSslConnectCallback(void *clientData); +static void AsyncSocketSslAcceptCallback(void *clientData); static const AsyncSocketVTable asyncStreamSocketVTable = { + AsyncSocketGetState, + AsyncSocketGetGenericErrno, + AsyncSocketGetFd, + AsyncSocketGetRemoteIPStr, + AsyncSocketGetINETIPStr, + AsyncSocketGetPort, + AsyncSocketUseNodelay, + AsyncSocketSetTCPTimeouts, + AsyncSocketSetBufferSizes, + AsyncSocketSetSendLowLatencyMode, + AsyncSocketConnectSSL, + AsyncSocketStartSslConnect, + AsyncSocketAcceptSSL, + AsyncSocketStartSslAccept, + AsyncSocketFlush, + AsyncSocketRecv, + AsyncSocketRecvPassedFd, + AsyncSocketGetReceivedFd, + AsyncSocketSend, + AsyncSocketIsSendBufferFull, + AsyncSocketClose, + AsyncSocketCancelRecv, + AsyncSocketCancelCbForClose, + AsyncSocketGetLocalVMCIAddress, + AsyncSocketGetRemoteVMCIAddress, + NULL, + NULL, + NULL, + NULL, AsyncSocketDispatchConnect, AsyncSocketSendInternal, AsyncSocketSendSocket, @@ -168,8 +195,36 @@ static const AsyncSocketVTable asyncStreamSocketVTable = { NULL, }; - static const AsyncSocketVTable asyncStreamSocketIPollVTable = { + AsyncSocketGetState, + AsyncSocketGetGenericErrno, + AsyncSocketGetFd, + AsyncSocketGetRemoteIPStr, + AsyncSocketGetINETIPStr, + AsyncSocketGetPort, + AsyncSocketUseNodelay, + AsyncSocketSetTCPTimeouts, + AsyncSocketSetBufferSizes, + AsyncSocketSetSendLowLatencyMode, + AsyncSocketConnectSSL, + AsyncSocketStartSslConnect, + AsyncSocketAcceptSSL, + AsyncSocketStartSslAccept, + AsyncSocketFlush, + AsyncSocketRecv, + AsyncSocketRecvPassedFd, + AsyncSocketGetReceivedFd, + AsyncSocketSend, + AsyncSocketIsSendBufferFull, + AsyncSocketClose, + AsyncSocketCancelRecv, + AsyncSocketCancelCbForClose, + AsyncSocketGetLocalVMCIAddress, + AsyncSocketGetRemoteVMCIAddress, + NULL, + NULL, + NULL, + NULL, AsyncSocketDispatchConnect, AsyncSocketSendInternal, AsyncSocketSendSocket, @@ -340,7 +395,7 @@ AsyncSocket_MsgError(int asyncSockError) // IN result = MSGID(asyncsocket.notconnected) "Local socket not connected"; break; case ASOCKERR_REMOTE_DISCONNECT: - result = MSGID(asyncsocket.remotedisconnect) "Remote connection failure"; + result = MSGID(asyncsocket.remotedisconnect) "Remote disconnected"; break; case ASOCKERR_CLOSED: result = MSGID(asyncsocket.closed) "Closed socket"; @@ -375,7 +430,7 @@ AsyncSocket_MsgError(int asyncSockError) // IN /* *---------------------------------------------------------------------------- * - * AsyncSocket_GetFd -- + * AsyncSocketGetFd -- * * Returns the fd for this socket. * @@ -389,7 +444,7 @@ AsyncSocket_MsgError(int asyncSockError) // IN */ int -AsyncSocket_GetFd(AsyncSocket *s) +AsyncSocketGetFd(AsyncSocket *s) { return s->fd; } @@ -466,7 +521,7 @@ AsyncSocketGetAddr(AsyncSocket *asock, // IN /* *---------------------------------------------------------------------------- * - * AsyncSocket_GetRemoteIPStr -- + * AsyncSocketGetRemoteIPStr -- * * Given an AsyncSocket object, returns the remote IP address associated * with it, or an error if the request is meaningless for the underlying @@ -482,8 +537,8 @@ AsyncSocketGetAddr(AsyncSocket *asock, // IN */ int -AsyncSocket_GetRemoteIPStr(AsyncSocket *asock, // IN - const char **ipRetStr) // OUT +AsyncSocketGetRemoteIPStr(AsyncSocket *asock, // IN + const char **ipRetStr) // OUT { int ret = ASOCKERR_SUCCESS; @@ -515,7 +570,7 @@ AsyncSocket_GetRemoteIPStr(AsyncSocket *asock, // IN /* *---------------------------------------------------------------------------- * - * AsyncSocket_GetINETIPStr -- + * AsyncSocketGetINETIPStr -- * * Given an AsyncSocket object, returns the IP addresses associated with * the requested address family's file descriptor if available. @@ -537,9 +592,9 @@ AsyncSocket_GetRemoteIPStr(AsyncSocket *asock, // IN */ int -AsyncSocket_GetINETIPStr(AsyncSocket *asock, // IN - int socketFamily, // IN - char **ipRetStr) // OUT +AsyncSocketGetINETIPStr(AsyncSocket *asock, // IN + int socketFamily, // IN + char **ipRetStr) // OUT { struct sockaddr_storage addr; socklen_t addrLen = sizeof addr; @@ -552,6 +607,8 @@ AsyncSocket_GetINETIPStr(AsyncSocket *asock, // IN char addrBuf[NI_MAXHOST]; if (ipRetStr == NULL) { + ASOCKWARN(asock, ("%s: Output string is not usable.\n", + __FUNCTION__)); ret = ASOCKERR_INVAL; } else if (Posix_GetNameInfo((struct sockaddr *)&addr, addrLen, addrBuf, sizeof addrBuf, NULL, 0, @@ -572,7 +629,7 @@ AsyncSocket_GetINETIPStr(AsyncSocket *asock, // IN /* *---------------------------------------------------------------------------- * - * AsyncSocket_GetLocalVMCIAddress -- + * AsyncSocketGetLocalVMCIAddress -- * * Given an AsyncSocket object, returns the local VMCI context ID and * port number associated with it, or an error if the request is @@ -588,9 +645,9 @@ AsyncSocket_GetINETIPStr(AsyncSocket *asock, // IN */ int -AsyncSocket_GetLocalVMCIAddress(AsyncSocket *asock, // IN - uint32 *cid, // OUT: optional - uint32 *port) // OUT: optional +AsyncSocketGetLocalVMCIAddress(AsyncSocket *asock, // IN + uint32 *cid, // OUT: optional + uint32 *port) // OUT: optional { ASSERT(asock); @@ -613,7 +670,7 @@ AsyncSocket_GetLocalVMCIAddress(AsyncSocket *asock, // IN /* *---------------------------------------------------------------------------- * - * AsyncSocket_GetRemoteVMCIAddress -- + * AsyncSocketGetRemoteVMCIAddress -- * * Given an AsyncSocket object, returns the remote VMCI context ID and * port number associated with it, or an error if the request is @@ -629,9 +686,9 @@ AsyncSocket_GetLocalVMCIAddress(AsyncSocket *asock, // IN */ int -AsyncSocket_GetRemoteVMCIAddress(AsyncSocket *asock, // IN - uint32 *cid, // OUT: optional - uint32 *port) // OUT: optional +AsyncSocketGetRemoteVMCIAddress(AsyncSocket *asock, // IN + uint32 *cid, // OUT: optional + uint32 *port) // OUT: optional { ASSERT(asock); @@ -885,6 +942,12 @@ AsyncSocketListenerCreate(const char *addrStr, // IN: optional asock->listenAsock6 = asock6; asock->listenAsock4 = asock4; + if (asock->pollParams.iPoll == NULL) { + asock->vt = &asyncStreamSocketVTable; + } else { + asock->vt = &asyncStreamSocketIPollVTable; + } + return asock; } else if (asock6) { return asock6; @@ -964,6 +1027,12 @@ AsyncSocketListenerCreateLoopback(unsigned int port, // IN asock->listenAsock6 = asock6; asock->listenAsock4 = asock4; + if (asock->pollParams.iPoll == NULL) { + asock->vt = &asyncStreamSocketVTable; + } else { + asock->vt = &asyncStreamSocketIPollVTable; + } + return asock; } else if (asock6) { return asock6; @@ -1172,7 +1241,7 @@ errorNoFd: /* *---------------------------------------------------------------------------- * - * AsyncSocketGetPort -- + * AsyncSocketGetPortFromAddr -- * * This is an internal routine that gets a port given an address. The * address must be in either AF_INET, AF_INET6 or AF_VMCI format. @@ -1187,7 +1256,7 @@ errorNoFd: */ static unsigned int -AsyncSocketGetPort(struct sockaddr_storage *addr) +AsyncSocketGetPortFromAddr(struct sockaddr_storage *addr) { ASSERT(NULL != addr); @@ -1215,7 +1284,7 @@ AsyncSocketGetPort(struct sockaddr_storage *addr) /* *---------------------------------------------------------------------------- * - * AsyncSocket_GetPort -- + * AsyncSocketGetPort -- * * Given an AsyncSocket object, returns the port number associated with * the requested address family's file descriptor if available. @@ -1230,7 +1299,7 @@ AsyncSocketGetPort(struct sockaddr_storage *addr) */ unsigned int -AsyncSocket_GetPort(AsyncSocket *asock) // IN +AsyncSocketGetPort(AsyncSocket *asock) // IN { AsyncSocket *tempAsock; struct sockaddr_storage addr; @@ -1251,7 +1320,7 @@ AsyncSocket_GetPort(AsyncSocket *asock) // IN if (AsyncSocketGetAddr(tempAsock, AF_UNSPEC, &addr, &addrLen) == ASOCKERR_SUCCESS) { - ret = AsyncSocketGetPort(&addr); + ret = AsyncSocketGetPortFromAddr(&addr); } AsyncSocketUnlock(tempAsock); @@ -1329,7 +1398,7 @@ AsyncSocketBind(AsyncSocket *asock, // IN ASSERT(NULL != asock->sslSock); ASSERT(NULL != addr); - port = AsyncSocketGetPort(addr); + port = AsyncSocketGetPortFromAddr(addr); ASOCKLG0(asock, ("creating new listening socket on port %d\n", port)); #ifndef _WIN32 @@ -1561,8 +1630,7 @@ AsyncSocketConnectImpl(int socketFamily, free(ipString); asock = AsyncSocketConnect(&addr, addrLen, connectFn, clientData, - AsyncSocketConnectCallback, flags, pollParams, - &error); + flags, pollParams, &error); if (!asock) { Warning(ASOCKPREFIX "%s connection attempt failed\n", socketFamily == AF_INET ? "IPv4" : "IPv6"); @@ -1675,8 +1743,7 @@ AsyncSocket_ConnectVMCI(unsigned int cid, // IN asock = AsyncSocketConnect((struct sockaddr_storage *)&addr, sizeof addr, connectFn, clientData, - AsyncSocketConnectCallback, flags, pollParams, - outError); + flags, pollParams, outError); VMCISock_ReleaseAFValueFd(vsockDev); return asock; @@ -1726,14 +1793,74 @@ AsyncSocket_ConnectUnixDomain(const char *path, // IN asock = AsyncSocketConnect((struct sockaddr_storage *)&addr, sizeof addr, connectFn, clientData, - AsyncSocketConnectCallback, flags, pollParams, - outError); + flags, pollParams, outError); return asock; } #endif +/* + *---------------------------------------------------------------------------- + * + * AsyncSocketConnectErrorCheck -- + * + * Check for error on a connecting socket and fire the connect callback + * is any error is found. This is only used on Windows. + * + * Results: + * None. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------------- + */ + +static void +AsyncSocketConnectErrorCheck(void *data) // IN: AsyncSocket * +{ + AsyncSocket *asock = data; + Bool removed; + PollerFunction func = NULL; + + ASSERT(AsyncSocketIsLocked(asock)); + + if (asock->state == AsyncSocketConnecting) { + int sockErr = 0; + int sockErrLen = sizeof sockErr; + + if (getsockopt(asock->fd, SOL_SOCKET, SO_ERROR, (void *)&sockErr, + (void *)&sockErrLen) == 0) { + if (sockErr == 0) { + /* There is no error; keep waiting. */ + return; + } + asock->genericErrno = sockErr; + } else { + asock->genericErrno = ASOCK_LASTERROR(); + } + ASOCKLG0(asock, ("Connection failed: %s\n", + Err_Errno2String(asock->genericErrno))); + /* Remove connect callback. */ + removed = AsyncSocketPollRemove(asock, TRUE, POLL_FLAG_WRITE, + asock->internalConnectFn); + ASSERT(removed); + func = asock->internalConnectFn; + } + + /* Remove this callback. */ + removed = AsyncSocketPollRemove(asock, FALSE, POLL_FLAG_PERIODIC, + AsyncSocketConnectErrorCheck); + ASSERT(removed); + asock->internalConnectFn = NULL; + + if (func) { + func(asock); + } +} + + /* *---------------------------------------------------------------------------- * @@ -1756,7 +1883,6 @@ AsyncSocketConnect(struct sockaddr_storage *addr, socklen_t addrLen, AsyncSocketConnectFn connectFn, void *clientData, - PollerFunction internalConnectFn, AsyncSocketConnectFlags flags, AsyncSocketPollParams *pollParams, int *outError) @@ -1774,12 +1900,6 @@ AsyncSocketConnect(struct sockaddr_storage *addr, goto error; } - if (!internalConnectFn) { - error = ASOCKERR_INVAL; - Warning(ASOCKPREFIX "invalid arguments to connect!\n"); - goto error; - } - /* * Create a new IP socket */ @@ -1801,7 +1921,7 @@ AsyncSocketConnect(struct sockaddr_storage *addr, } return AsyncSocketConnectWithAsock(asock, addr, addrLen, connectFn, - clientData, internalConnectFn, + clientData, AsyncSocketConnectCallback, pollParams, outError); error: @@ -1826,6 +1946,8 @@ AsyncSocketConnectWithAsock(AsyncSocket *asock, int sysErr; int error = ASOCKERR_GENERIC; + ASSERT(internalConnectFn != NULL); + /* * Call connect(), which can either succeed immediately or return an error * indicating that the connection is in progress. In the latter case, we @@ -1843,6 +1965,23 @@ AsyncSocketConnectWithAsock(AsyncSocket *asock, ASOCKLOG(1, asock, ("registering write callback for socket connect\n")); pollStatus = AsyncSocketPollAdd(asock, TRUE, POLL_FLAG_WRITE, internalConnectFn); + if (vmx86_win32 && pollStatus == VMWARE_STATUS_SUCCESS && + asock->pollParams.iPoll == NULL) { + /* + * Work around WSAPoll's bug of not reporting failed connection + * by periodically (500 ms) checking for error. + */ + pollStatus = AsyncSocketPollAdd(asock, FALSE, POLL_FLAG_PERIODIC, + AsyncSocketConnectErrorCheck, + 500 * 1000); + if (pollStatus == VMWARE_STATUS_SUCCESS) { + asock->internalConnectFn = internalConnectFn; + } else { + ASOCKLG0(asock, ("failed to register periodic error check\n")); + AsyncSocketPollRemove(asock, TRUE, POLL_FLAG_WRITE, + internalConnectFn); + } + } } else { sysErr = ASOCK_LASTERROR(); Log(ASOCKPREFIX "connect failed, error %d: %s\n", @@ -2046,7 +2185,7 @@ AsyncSocket_AttachToFd(int fd, /* *---------------------------------------------------------------------------- * - * AsyncSocket_UseNodelay -- + * AsyncSocketUseNodelay -- * * Sets or unset TCP_NODELAY on the socket, which disables or * enables Nagle's algorithm, respectively. @@ -2062,8 +2201,8 @@ AsyncSocket_AttachToFd(int fd, */ int -AsyncSocket_UseNodelay(AsyncSocket *asock, // IN/OUT: - Bool nodelay) // IN: +AsyncSocketUseNodelay(AsyncSocket *asock, // IN/OUT: + Bool nodelay) // IN: { int flag = nodelay ? 1 : 0; @@ -2085,7 +2224,7 @@ AsyncSocket_UseNodelay(AsyncSocket *asock, // IN/OUT: /* *---------------------------------------------------------------------------- * - * AsyncSocket_SetTCPTimeouts -- + * AsyncSocketSetTCPTimeouts -- * * Allow caller to set a number of TCP-specific timeout * parameters on the socket for the active connection. @@ -2107,13 +2246,13 @@ AsyncSocket_UseNodelay(AsyncSocket *asock, // IN/OUT: *---------------------------------------------------------------------------- */ -#ifdef VMX86_SERVER int -AsyncSocket_SetTCPTimeouts(AsyncSocket *asock, // IN/OUT: - int keepIdle, // IN - int keepIntvl, // IN - int keepCnt) // IN +AsyncSocketSetTCPTimeouts(AsyncSocket *asock, // IN/OUT: + int keepIdle, // IN + int keepIntvl, // IN + int keepCnt) // IN { +#ifdef VMX86_SERVER int val; int opt; @@ -2150,9 +2289,9 @@ error: LOG(0, (ASOCKPREFIX "could not set TCP Timeout %d, error %d: %s\n", opt, Err_Errno(), Err_ErrString())); AsyncSocketUnlock(asock); +#endif return ASOCKERR_GENERIC; } -#endif /* @@ -2218,7 +2357,6 @@ out: *---------------------------------------------------------------------------- * * AsyncSocket_Recv -- - * AsyncSocket_RecvPartial -- * * Registers a callback that will fire once the specified amount of data * has been received on the socket. @@ -2260,49 +2398,6 @@ out: *---------------------------------------------------------------------------- */ -int -AsyncSocket_Recv(AsyncSocket *asock, - void *buf, - int len, - void *cb, - void *cbData) -{ - return AsyncSocketRecv(asock, buf, len, FALSE, cb, cbData); -} - -int -AsyncSocket_RecvPartial(AsyncSocket *asock, - void *buf, - int len, - void *cb, - void *cbData) -{ - /* - * Not yet implemented/tested on windows named pipe (though support - * there should be easy). - */ - ASSERT(asock->asockType != ASYNCSOCKET_TYPE_NAMEDPIPE); - return AsyncSocketRecv(asock, buf, len, TRUE, cb, cbData); -} - - -/* - *---------------------------------------------------------------------------- - * - * AsyncSocketRecv -- - * - * Internal function to implement AsyncSocket_Recv and - * AsyncSocket_RecvPartial. - * - * Results: - * ASOCKERR_*. - * - * Side effects: - * Could register poll callback. - * - *---------------------------------------------------------------------------- - */ - int AsyncSocketRecv(AsyncSocket *asock, // IN: void *buf, // IN: unused @@ -2315,12 +2410,6 @@ AsyncSocketRecv(AsyncSocket *asock, // IN: void *clientData = NULL; int retVal; - if (!asock) { - Warning(ASOCKPREFIX "Recv called with invalid arguments!\n"); - - return ASOCKERR_INVAL; - } - if (!asock->errorFn) { ASOCKWARN(asock, ("%s: no registered error handler!\n", __FUNCTION__)); @@ -2362,8 +2451,8 @@ AsyncSocketRecv(AsyncSocket *asock, // IN: } ASSERT(asock->vt); - ASSERT(asock->vt->recv); - retVal = asock->vt->recv(asock, buf, len); + ASSERT(asock->vt->recvInternal); + retVal = asock->vt->recvInternal(asock, buf, len); if (retVal != ASOCKERR_SUCCESS) { goto outHaveLock; } @@ -2385,7 +2474,7 @@ outHaveLock: /* *---------------------------------------------------------------------------- * - * AsyncSocket_RecvPassedFd -- + * AsyncSocketRecvPassedFd -- * * See AsyncSocket_Recv. Besides that it allows for receiving one * file descriptor... @@ -2400,22 +2489,16 @@ outHaveLock: */ int -AsyncSocket_RecvPassedFd(AsyncSocket *asock, // IN/OUT: socket - void *buf, // OUT: buffer with data - int len, // IN: length - void *cb, // IN: completion calback - void *cbData) // IN: callback's data +AsyncSocketRecvPassedFd(AsyncSocket *asock, // IN/OUT: socket + void *buf, // OUT: buffer with data + int len, // IN: length + void *cb, // IN: completion calback + void *cbData) // IN: callback's data { int err; ASSERT(asock->asockType != ASYNCSOCKET_TYPE_NAMEDPIPE); - if (!asock) { - Warning(ASOCKPREFIX "Recv called with invalid arguments!\n"); - - return ASOCKERR_INVAL; - } - if (!asock->errorFn) { ASOCKWARN(asock, ("%s: no registered error handler!\n", __FUNCTION__)); @@ -2677,7 +2760,8 @@ AsyncSocket_RecvBlocking(AsyncSocket *s, int *received, int timeoutMS) { - return AsyncSocketBlockingWork(s, TRUE, buf, len, received, timeoutMS, FALSE); + return AsyncSocketBlockingWork(s, TRUE, buf, len, received, timeoutMS, + FALSE); } int @@ -2687,7 +2771,8 @@ AsyncSocket_RecvPartialBlocking(AsyncSocket *s, int *received, int timeoutMS) { - return AsyncSocketBlockingWork(s, TRUE, buf, len, received, timeoutMS, TRUE); + return AsyncSocketBlockingWork(s, TRUE, buf, len, received, timeoutMS, + TRUE); } int @@ -2730,6 +2815,7 @@ AsyncSocketBlockingWork(AsyncSocket *s, // IN: int sysErr; ASSERT(s->asockType != ASYNCSOCKET_TYPE_NAMEDPIPE); + ASSERT(s->asockType != ASYNCSOCKET_TYPE_PROXYSOCKET); if (s == NULL || buf == NULL || len <= 0) { Warning(ASOCKPREFIX "Recv called with invalid arguments!\n"); @@ -2866,7 +2952,7 @@ AsyncSocketSendSocket(AsyncSocket *asock, // IN: /* *---------------------------------------------------------------------------- * - * AsyncSocket_Send -- + * AsyncSocketSend -- * * Queues the provided data for sending on the socket. If a send callback * is provided, the callback is fired after the data has been written to @@ -2891,15 +2977,15 @@ AsyncSocketSendSocket(AsyncSocket *asock, // IN: */ int -AsyncSocket_Send(AsyncSocket *asock, - void *buf, - int len, - AsyncSocketSendFn sendFn, - void *clientData) +AsyncSocketSend(AsyncSocket *asock, + void *buf, + int len, + AsyncSocketSendFn sendFn, + void *clientData) { int retVal; - SendBufList *listBeforeAppend = asock->sendBufList; Bool bufferListWasEmpty = FALSE; + SendBufList **pcur; /* * Note: I think it should be fine to send with a length of zero and a @@ -2927,15 +3013,18 @@ AsyncSocket_Send(AsyncSocket *asock, ASSERT(asock->vt); ASSERT(asock->vt->prepareSend); - retVal = asock->vt->prepareSend(asock, buf, len, - sendFn, clientData, &bufferListWasEmpty); + retVal = asock->vt->prepareSend(asock, buf, len, sendFn, clientData, + &bufferListWasEmpty); if (retVal != ASOCKERR_SUCCESS) { + ASOCKLOG(1, asock, ("Failed to prepare buffer:%p for send. Error:%d\n", + buf, retVal)); goto outUndoAppend; } - ASSERT(asock->vt->send); - retVal = asock->vt->send(asock, bufferListWasEmpty, buf, len); + ASSERT(asock->vt->sendInternal); + retVal = asock->vt->sendInternal(asock, bufferListWasEmpty, buf, len); if (retVal != ASOCKERR_SUCCESS) { + ASOCKLOG(1, asock, ("Failed to send buffer:%p. Error:%d\n", buf, retVal)); goto outUndoAppend; } @@ -2943,13 +3032,23 @@ AsyncSocket_Send(AsyncSocket *asock, goto outHaveLock; outUndoAppend: - if (asock->sendBufList != listBeforeAppend) { - SendBufList *appendedBuffer = asock->sendBufList; - asock->sendBufList = listBeforeAppend; - if (asock->sendBufList == NULL) { - asock->sendBufTail = &(asock->sendBufList); + /* + * Remove the appended buffer from the sendBufList. We always append the + * buffer to the tail of the list. + */ + pcur = &asock->sendBufList; + if (*pcur != NULL) { + if (!bufferListWasEmpty) { + do { + pcur = &((*pcur)->next); + } while ((*pcur)->next != NULL); + } + + if ((*pcur)->buf == buf) { + free(*pcur); + *pcur = NULL; + asock->sendBufTail = pcur; } - free(appendedBuffer); } outHaveLock: @@ -3595,7 +3694,7 @@ done: /* *---------------------------------------------------------------------------- * - * AsyncSocket_GetGenericErrno -- + * AsyncSocketGetGenericErrno -- * * Used when an ASOCKERR_GENERIC is returned due to a system error. * The errno that was returned by the system is stored in the asock @@ -3614,7 +3713,7 @@ done: */ int -AsyncSocket_GetGenericErrno(AsyncSocket *s) // IN: +AsyncSocketGetGenericErrno(AsyncSocket *s) // IN: { ASSERT(s); @@ -3649,6 +3748,7 @@ AsyncSocket_WaitForConnection(AsyncSocket *s, // IN: Bool removed = FALSE; ASSERT(s->asockType != ASYNCSOCKET_TYPE_NAMEDPIPE); + ASSERT(s->asockType != ASYNCSOCKET_TYPE_PROXYSOCKET); AsyncSocketLock(s); @@ -3697,6 +3797,12 @@ AsyncSocket_WaitForConnection(AsyncSocket *s, // IN: AsyncSocketConnectCallback) || AsyncSocketPollRemove(s, FALSE, 0, AsyncSocketConnectCallback); ASSERT(removed); + if (s->internalConnectFn) { + removed = AsyncSocketPollRemove(s, FALSE, POLL_FLAG_PERIODIC, + AsyncSocketConnectErrorCheck); + ASSERT(removed); + s->internalConnectFn = NULL; + } } AsyncSocketUnlock(s); @@ -3791,12 +3897,15 @@ out: */ int -AsyncSocket_DoOneMsg(AsyncSocket *s, Bool read, int timeoutMS) +AsyncSocket_DoOneMsg(AsyncSocket *s, // IN + Bool read, // IN + int timeoutMS) // IN { int retVal; AsyncSocket *asock = NULL; ASSERT(s->asockType != ASYNCSOCKET_TYPE_NAMEDPIPE); + ASSERT(s->asockType != ASYNCSOCKET_TYPE_PROXYSOCKET); if (!s) { Warning(ASOCKPREFIX "DoOneMsg called with invalid paramters.\n"); @@ -3817,7 +3926,7 @@ AsyncSocket_DoOneMsg(AsyncSocket *s, Bool read, int timeoutMS) ASSERT(s->state == AsyncSocketConnected); ASSERT(s->recvCb); /* We are supposed to call someone... */ AsyncSocketAddRef(s); - s->vt->cancelRecvCb(s); + s->vt->cancelRecvCbInternal(s); s->recvCb = TRUE; /* We need to know if the callback cancel recv. */ s->inBlockingRecv++; @@ -3850,8 +3959,8 @@ AsyncSocket_DoOneMsg(AsyncSocket *s, Bool read, int timeoutMS) */ s->recvCb = FALSE; /* For re-registering the poll callback. */ if (retVal == ASOCKERR_SUCCESS || retVal == ASOCKERR_TIMEOUT) { - retVal = s->vt->recv(s, (uint8 *)s->recvBuf + s->recvPos, - s->recvLen - s->recvPos); + retVal = s->vt->recvInternal(s, (uint8 *)s->recvBuf + s->recvPos, + s->recvLen - s->recvPos); } if (retVal != ASOCKERR_SUCCESS) { s->recvBuf = NULL; @@ -3881,7 +3990,7 @@ AsyncSocket_DoOneMsg(AsyncSocket *s, Bool read, int timeoutMS) /* *---------------------------------------------------------------------------- * - * AsyncSocket_Flush -- + * AsyncSocketFlush -- * * Try to send any pending out buffers until we run out of buffers, or * the timeout expires. @@ -3897,7 +4006,8 @@ AsyncSocket_DoOneMsg(AsyncSocket *s, Bool read, int timeoutMS) */ int -AsyncSocket_Flush(AsyncSocket *s, int timeoutMS) +AsyncSocketFlush(AsyncSocket *s, // IN + int timeoutMS) // IN { VmTimeType now, done; int retVal; @@ -4227,8 +4337,8 @@ AsyncSocketCancelCbForCloseInt(AsyncSocket *asock) // IN: } ASSERT(asock->vt); - ASSERT(asock->vt->cancelCbForClose); - asock->vt->cancelCbForClose(asock); + ASSERT(asock->vt->cancelCbForCloseInternal); + asock->vt->cancelCbForCloseInternal(asock); AsyncSocketAddRef(asock); while (asock->sendBufList) { @@ -4258,7 +4368,7 @@ AsyncSocketCancelCbForCloseInt(AsyncSocket *asock) // IN: /* *---------------------------------------------------------------------------- * - * AsyncSocket_CancelCbForClose -- + * AsyncSocketCancelCbForClose -- * * This is the external version of AsyncSocketCancelCbForCloseInt(). It * takes care of acquiring any necessary lock before calling the internal @@ -4274,7 +4384,7 @@ AsyncSocketCancelCbForCloseInt(AsyncSocket *asock) // IN: */ void -AsyncSocket_CancelCbForClose(AsyncSocket *asock) // IN: +AsyncSocketCancelCbForClose(AsyncSocket *asock) // IN: { AsyncSocketLock(asock); AsyncSocketCancelCbForCloseInt(asock); @@ -4338,7 +4448,45 @@ AsyncSocketCancelCbForConnectingCloseSocket(AsyncSocket *asock) // IN /* *---------------------------------------------------------------------------- * - * AsyncSocket_Close -- + * AsyncSocket_SetCloseOptions -- + * + * Enables optional behavior for AsyncSocket_Close(): + * + * - If flushEnabledMaxWaitMsec is non-zero, the output stream + * will be flushed synchronously before the socket is closed. + * (default is zero: close socket right away without flushing) + * + * - If closeCb is set, the callback will be called asynchronously + * when the socket is actually destroyed. + * (default is NULL: no callback) + * + * Results: + * None. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------------- + */ + +void +AsyncSocket_SetCloseOptions(AsyncSocket *asock, // IN + int flushEnabledMaxWaitMsec, // IN + AsyncSocketCloseCb closeCb) // IN +{ + if (!asock) { + Warning("%s() called with NULL asock!\n", __FUNCTION__); + return; + } + asock->flushEnabledMaxWaitMsec = flushEnabledMaxWaitMsec; + asock->closeCb = closeCb; +} + + +/* + *---------------------------------------------------------------------------- + * + * AsyncSocketClose -- * * AsyncSocket destructor. The destructor should be safe to call at any * time. It's invoked automatically for I/O errors on slots that have no @@ -4357,14 +4505,10 @@ AsyncSocketCancelCbForConnectingCloseSocket(AsyncSocket *asock) // IN */ int -AsyncSocket_Close(AsyncSocket *asock) +AsyncSocketClose(AsyncSocket *asock) // IN { Bool isListener = TRUE; - if (!asock) { - return ASOCKERR_INVAL; - } - AsyncSocketLock(asock); if (asock->state == AsyncSocketClosed) { @@ -4389,6 +4533,17 @@ AsyncSocket_Close(AsyncSocket *asock) isListener = FALSE; + /* Flush output if requested via AsyncSocket_SetCloseOptions(). */ + if (asock->flushEnabledMaxWaitMsec && + asock->state == AsyncSocketConnected && + !asock->errorSeen) { + int ret = AsyncSocket_Flush(asock, asock->flushEnabledMaxWaitMsec); + if (ret != ASOCKERR_SUCCESS) { + ASOCKWARN(asock, ("AsyncSocket_Flush failed: %s. Closing now.\n", + AsyncSocket_Err2String(ret))); + } + } + /* * Set the new state to closed, and then check the old state and do the * right thing accordingly @@ -4404,15 +4559,15 @@ AsyncSocket_Close(AsyncSocket *asock) case AsyncSocketListening: ASOCKLOG(1, asock, ("old state was listening, removing accept " "callback\n")); - ASSERT(asock->vt->cancelListenCb); - asock->vt->cancelListenCb(asock); + ASSERT(asock->vt->cancelListenCbInternal); + asock->vt->cancelListenCbInternal(asock); break; case AsyncSocketConnecting: ASOCKLOG(1, asock, ("old state was connecting, removing connect " "callback\n")); - ASSERT(asock->vt->cancelCbForConnectingClose); - removed = asock->vt->cancelCbForConnectingClose(asock); + ASSERT(asock->vt->cancelCbForConnectingCloseInternal); + removed = asock->vt->cancelCbForConnectingCloseInternal(asock); if (!removed) { ASOCKLOG(1, asock, ("connect callback is not present in the poll " "list.\n")); @@ -4432,8 +4587,28 @@ AsyncSocket_Close(AsyncSocket *asock) NOT_REACHED(); } - ASSERT(asock->vt->close); - asock->vt->close(asock); + if (asock->internalConnectFn) { + removed = AsyncSocketPollRemove(asock, FALSE, POLL_FLAG_PERIODIC, + AsyncSocketConnectErrorCheck); + ASSERT(removed); + asock->internalConnectFn = NULL; + } + + if (asock->sslConnectFn && asock->sslPollFlags > 0) { + removed = AsyncSocketPollRemove(asock, TRUE, asock->sslPollFlags, + AsyncSocketSslConnectCallback); + ASSERT(removed); + } + + if (asock->sslAcceptFn && asock->sslPollFlags > 0) { + removed = AsyncSocketPollRemove(asock, TRUE, asock->sslPollFlags, + AsyncSocketSslAcceptCallback); + ASSERT(removed); + } + asock->sslPollFlags = 0; + + ASSERT(asock->vt->closeInternal); + asock->vt->closeInternal(asock); } AsyncSocketRelease(asock, TRUE); @@ -4445,7 +4620,7 @@ AsyncSocket_Close(AsyncSocket *asock) /* *---------------------------------------------------------------------------- * - * AsyncSocket_GetState -- + * AsyncSocketGetState -- * * Returns the state of the provided asock or ASOCKERR_INVAL. Note that * unless this is called from a callback function, the state should be @@ -4461,7 +4636,7 @@ AsyncSocket_Close(AsyncSocket *asock) */ AsyncSocketState -AsyncSocket_GetState(AsyncSocket *asock) +AsyncSocketGetState(AsyncSocket *asock) { return (asock ? asock->state : ASOCKERR_INVAL); } @@ -4470,7 +4645,7 @@ AsyncSocket_GetState(AsyncSocket *asock) /* *---------------------------------------------------------------------------- * - * AsyncSocket_IsSendBufferFull -- + * AsyncSocketIsSendBufferFull -- * * Indicate if socket send buffer is full. Note that unless this is * called from a callback function, the return value should be treated @@ -4488,7 +4663,7 @@ AsyncSocket_GetState(AsyncSocket *asock) */ int -AsyncSocket_IsSendBufferFull(AsyncSocket *asock) +AsyncSocketIsSendBufferFull(AsyncSocket *asock) { return (asock ? asock->sendBufFull : ASOCKERR_GENERIC); } @@ -4715,11 +4890,14 @@ void AsyncSocketHandleError(AsyncSocket *asock, int asockErr) { ASSERT(asock); + asock->errorSeen = TRUE; if (asock->errorFn) { - ASOCKLOG(3, asock, ("firing error callback\n")); + ASOCKLOG(3, asock, ("firing error callback (%s)\n", + AsyncSocket_Err2String(asockErr))); asock->errorFn(asockErr, asock, asock->errorClientData); } else { - ASOCKLOG(3, asock, ("no error callback, closing socket\n")); + ASOCKLOG(3, asock, ("no error callback, closing socket (%s)\n", + AsyncSocket_Err2String(asockErr))); AsyncSocket_Close(asock); } } @@ -5100,6 +5278,11 @@ AsyncSocketRelease(AsyncSocket *s, // IN: } if (0 == count) { ASOCKLOG(1, s, ("Final release; freeing asock struct\n")); + + if (s->closeCb) { + s->closeCb(s); + } + if (s->vt && s->vt->release) { s->vt->release(s); } @@ -5351,8 +5534,7 @@ AsyncSocketIPollRemove(AsyncSocket *asock, /* *----------------------------------------------------------------------------- * - * AsyncSocket_CancelRecv -- - * AsyncSocket_CancelRecvEx -- + * AsyncSocketCancelRecv -- * * Call this function if you know what you are doing. This should be * called if you want to synchronously receive the outstanding data on @@ -5371,31 +5553,14 @@ AsyncSocketIPollRemove(AsyncSocket *asock, */ int -AsyncSocket_CancelRecv(AsyncSocket *asock, // IN - int *partialRecvd, // OUT - void **recvBuf, // OUT - void **recvFn) // OUT -{ - return AsyncSocket_CancelRecvEx(asock, partialRecvd, recvBuf, recvFn, FALSE); -} - -int -AsyncSocket_CancelRecvEx(AsyncSocket *asock, // IN - int *partialRecvd, // OUT - void **recvBuf, // OUT - void **recvFn, // OUT - Bool cancelOnSend) // IN +AsyncSocketCancelRecv(AsyncSocket *asock, // IN + int *partialRecvd, // OUT + void **recvBuf, // OUT + void **recvFn, // OUT + Bool cancelOnSend) // IN { int retVal; - ASSERT(asock->asockType != ASYNCSOCKET_TYPE_NAMEDPIPE); - - if (!asock) { - Warning(ASOCKPREFIX "Invalid socket while cancelling recv request!\n"); - - return ASOCKERR_INVAL; - } - AsyncSocketLock(asock); if (asock->state != AsyncSocketConnected) { @@ -5419,8 +5584,8 @@ AsyncSocket_CancelRecvEx(AsyncSocket *asock, // IN } ASSERT(asock->vt); - ASSERT(asock->vt->cancelRecvCb); - asock->vt->cancelRecvCb(asock); + ASSERT(asock->vt->cancelRecvCbInternal); + asock->vt->cancelRecvCbInternal(asock); if (partialRecvd && asock->recvLen > 0) { ASOCKLOG(1, asock, ("Partially read %d bytes out of %d bytes while " @@ -5455,7 +5620,7 @@ outHaveLock: /* *----------------------------------------------------------------------------- * - * AsyncSocket_GetReceivedFd -- + * AsyncSocketGetReceivedFd -- * * Retrieve received file descriptor from socket. * @@ -5469,18 +5634,12 @@ outHaveLock: */ int -AsyncSocket_GetReceivedFd(AsyncSocket *asock) // IN +AsyncSocketGetReceivedFd(AsyncSocket *asock) // IN { int fd; ASSERT(asock->asockType != ASYNCSOCKET_TYPE_NAMEDPIPE); - if (!asock) { - Warning(ASOCKPREFIX "Invalid socket while receiving fd!\n"); - - return -1; - } - AsyncSocketLock(asock); if (asock->state != AsyncSocketConnected) { @@ -5498,12 +5657,11 @@ AsyncSocket_GetReceivedFd(AsyncSocket *asock) // IN return fd; } -#ifndef USE_SSL_DIRECT /* *----------------------------------------------------------------------------- * - * AsyncSocket_ConnectSSL -- + * AsyncSocketConnectSSL -- * * Initialize the socket's SSL object, by calling SSL_ConnectAndVerify. * NOTE: This call is blocking. @@ -5518,10 +5676,11 @@ AsyncSocket_GetReceivedFd(AsyncSocket *asock) // IN */ Bool -AsyncSocket_ConnectSSL(AsyncSocket *asock, // IN - SSLVerifyParam *verifyParam, // IN/OPT - void *sslContext) // IN/OPT +AsyncSocketConnectSSL(AsyncSocket *asock, // IN + SSLVerifyParam *verifyParam, // IN/OPT + void *sslContext) // IN/OPT { +#ifndef USE_SSL_DIRECT ASSERT(asock); ASSERT(asock->asockType != ASYNCSOCKET_TYPE_NAMEDPIPE); @@ -5531,13 +5690,16 @@ AsyncSocket_ConnectSSL(AsyncSocket *asock, // IN return SSL_ConnectAndVerifyWithContext(asock->sslSock, verifyParam, sslContext); +#else + return FALSE; +#endif } /* *----------------------------------------------------------------------------- * - * AsyncSocket_AcceptSSL -- + * AsyncSocketAcceptSSL -- * * Initialize the socket's SSL object, by calling SSL_Accept. * @@ -5551,15 +5713,146 @@ AsyncSocket_ConnectSSL(AsyncSocket *asock, // IN */ Bool -AsyncSocket_AcceptSSL(AsyncSocket *asock) // IN +AsyncSocketAcceptSSL(AsyncSocket *asock) // IN { +#ifndef USE_SSL_DIRECT ASSERT(asock); ASSERT(asock->asockType != ASYNCSOCKET_TYPE_NAMEDPIPE); return SSL_Accept(asock->sslSock); +#else + return FALSE; +#endif +} + + +/* + *---------------------------------------------------------------------------- + * + * AsyncSocketSslConnectCallback -- + * + * Poll callback to redrive an outstanding ssl connect operation. + * + * Results: + * None. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------------- + */ + +static void +AsyncSocketSslConnectCallback(void *clientData) // IN +{ +#ifndef USE_SSL_DIRECT + int sslOpCode; + VMwareStatus pollStatus; + AsyncSocket *asock = clientData; + + ASSERT(asock); + ASSERT(asock->pollParams.iPoll == NULL); + ASSERT(AsyncSocketIsLocked(asock)); + + AsyncSocketAddRef(asock); + + /* Only set if poll callback is registered */ + asock->sslPollFlags = 0; + + sslOpCode = SSL_TryCompleteConnect(asock->sslSock); + if (sslOpCode > 0) { + (*asock->sslConnectFn)(TRUE, asock, asock->clientData); + } else if (sslOpCode < 0) { + (*asock->sslConnectFn)(FALSE, asock, asock->clientData); + } else { + asock->sslPollFlags = SSL_WantRead(asock->sslSock) ? + POLL_FLAG_READ : POLL_FLAG_WRITE; + + /* register the poll callback to redrive the SSL connect */ + pollStatus = AsyncSocketPollAdd(asock, TRUE, asock->sslPollFlags, + AsyncSocketSslConnectCallback); + + if (pollStatus != VMWARE_STATUS_SUCCESS) { + ASOCKWARN(asock, ("failed to reinstall ssl connect callback!\n")); + asock->sslPollFlags = 0; + (*asock->sslConnectFn)(FALSE, asock, asock->clientData); + } + } + + AsyncSocketRelease(asock, FALSE); +#else + NOT_IMPLEMENTED(); +#endif +} + + +/* + *----------------------------------------------------------------------------- + * + * AsyncSocketStartSslConnect -- + * + * Start an asynchronous SSL connect operation. + * + * The supplied callback function is called when the operation is complete + * or an error occurs. + * + * Note: The client callback could be invoked from this function or + * from a poll callback. If there is any requirement to always + * invoke the client callback from outside this function, consider + * changing this code to use a poll timer callback with timeout + * set to zero. + * + * Results: + * None. + * Error is always reported using the callback supplied. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +void +AsyncSocketStartSslConnect(AsyncSocket *asock, // IN + SSLVerifyParam *verifyParam, // IN/OPT + void *sslCtx, // IN + AsyncSocketSslConnectFn sslConnectFn, // IN + void *clientData) // IN +{ +#ifndef USE_SSL_DIRECT + Bool ok; + + ASSERT(asock); + ASSERT(asock->asockType != ASYNCSOCKET_TYPE_NAMEDPIPE); + ASSERT(sslConnectFn); + + AsyncSocketLock(asock); + + if (asock->sslConnectFn || asock->sslAcceptFn) { + ASOCKWARN(asock, ("An SSL operation was already initiated.\n")); + goto done; + } + + ok = SSL_SetupConnectAndVerifyWithContext(asock->sslSock, verifyParam, + sslCtx); + if (!ok) { + /* Something went wrong already */ + (*sslConnectFn)(FALSE, asock, clientData); + goto done; + } + + asock->sslConnectFn = sslConnectFn; + asock->clientData = clientData; + + AsyncSocketSslConnectCallback(asock); + +done: + AsyncSocketUnlock(asock); +#else + NOT_IMPLEMENTED(); +#endif } -#endif /* ! USE_SSL_DIRECT */ /* *---------------------------------------------------------------------------- @@ -5590,21 +5883,26 @@ AsyncSocketSslAcceptCallback(void *clientData) AsyncSocketAddRef(asock); + /* Only set if poll callback is registered */ + asock->sslPollFlags = 0; + sslOpCode = SSL_TryCompleteAccept(asock->sslSock); if (sslOpCode > 0) { - (*asock->sslAcceptFn)(TRUE, asock, clientData); + (*asock->sslAcceptFn)(TRUE, asock, asock->clientData); } else if (sslOpCode < 0) { - (*asock->sslAcceptFn)(FALSE, asock, clientData); + (*asock->sslAcceptFn)(FALSE, asock, asock->clientData); } else { + asock->sslPollFlags = SSL_WantRead(asock->sslSock) ? + POLL_FLAG_READ : POLL_FLAG_WRITE; + /* register the poll callback to redrive the SSL accept */ - pollStatus = AsyncSocketPollAdd(asock, TRUE, - SSL_WantRead(asock->sslSock) ? - POLL_FLAG_READ : POLL_FLAG_WRITE, + pollStatus = AsyncSocketPollAdd(asock, TRUE, asock->sslPollFlags, AsyncSocketSslAcceptCallback); if (pollStatus != VMWARE_STATUS_SUCCESS) { ASOCKWARN(asock, ("failed to reinstall ssl accept callback!\n")); - (*asock->sslAcceptFn)(FALSE, asock, clientData); + asock->sslPollFlags = 0; + (*asock->sslAcceptFn)(FALSE, asock, asock->clientData); } } @@ -5615,7 +5913,7 @@ AsyncSocketSslAcceptCallback(void *clientData) /* *----------------------------------------------------------------------------- * - * AsyncSocket_StartSslAccept -- + * AsyncSocketStartSslAccept -- * * Start an asynchronous SSL accept operation. * @@ -5642,10 +5940,10 @@ AsyncSocketSslAcceptCallback(void *clientData) */ void -AsyncSocket_StartSslAccept(AsyncSocket *asock, // IN - void *sslCtx, // IN - AsyncSocketSslAcceptFn sslAcceptFn, // IN - void *clientData) // IN +AsyncSocketStartSslAccept(AsyncSocket *asock, // IN + void *sslCtx, // IN + AsyncSocketSslAcceptFn sslAcceptFn, // IN + void *clientData) // IN { Bool ok; @@ -5655,8 +5953,8 @@ AsyncSocket_StartSslAccept(AsyncSocket *asock, // IN AsyncSocketLock(asock); - if (asock->sslAcceptFn) { - ASOCKWARN(asock, ("A SSL accept operation has already been initiated.\n")); + if (asock->sslAcceptFn || asock->sslConnectFn) { + ASOCKWARN(asock, ("An SSL operation was already initiated.\n")); goto done; } @@ -5680,7 +5978,7 @@ done: /* *----------------------------------------------------------------------------- * - * AsyncSocket_SetBufferSizes -- + * AsyncSocketSetBufferSizes -- * * Set socket level recv/send buffer sizes if they are less than given sizes. * @@ -5695,9 +5993,9 @@ done: */ Bool -AsyncSocket_SetBufferSizes(AsyncSocket *asock, // IN - int sendSz, // IN - int recvSz) // IN +AsyncSocketSetBufferSizes(AsyncSocket *asock, // IN + int sendSz, // IN + int recvSz) // IN { int err; int buffSz; @@ -5705,10 +6003,6 @@ AsyncSocket_SetBufferSizes(AsyncSocket *asock, // IN int sysErr; int fd; - if (!asock) { - return FALSE; - } - fd = asock->fd; err = getsockopt(fd, SOL_SOCKET, SO_RCVBUF, (char *)&buffSz, &len); @@ -5758,7 +6052,7 @@ AsyncSocket_SetBufferSizes(AsyncSocket *asock, // IN /* *----------------------------------------------------------------------------- * - * AsyncSocket_SetSendLowLatencyMode -- + * AsyncSocketSetSendLowLatencyMode -- * * Put the socket into a mode where we attempt to issue sends * directly from within AsyncSocket_Send(). Ordinarily, we would @@ -5780,8 +6074,50 @@ AsyncSocket_SetBufferSizes(AsyncSocket *asock, // IN */ void -AsyncSocket_SetSendLowLatencyMode(AsyncSocket *asock, // IN - Bool enable) // IN +AsyncSocketSetSendLowLatencyMode(AsyncSocket *asock, // IN + Bool enable) // IN { asock->sendLowLatency = enable; } + + +#ifndef _WIN32 +/* + *----------------------------------------------------------------------------- + * + * AsyncSocket_ListenSocketUDS -- + * + * Listens on the specified unix domain socket, and accepts new socket + * connections. Fires the connect callback with new AsyncSocket object for + * each connection. + * + * Results: + * New AsyncSocket in listening state or NULL on error + * + * Side effects: + * Creates new Unix domain socket, binds and listens. + * + *----------------------------------------------------------------------------- + */ + +AsyncSocket * +AsyncSocket_ListenSocketUDS(const char *pipeName, // IN + AsyncSocketConnectFn connectFn, // IN + void *clientData, // IN + AsyncSocketPollParams *pollParams, // IN + int *outError) // OUT +{ + struct sockaddr_un addr; + + memset(&addr, 0, sizeof addr); + addr.sun_family = AF_UNIX; + Str_Strcpy(addr.sun_path, pipeName, sizeof addr.sun_path); + + Log(ASOCKPREFIX "creating new socket listening on %s\n", pipeName); + + return AsyncSocketListenImpl((struct sockaddr_storage *)&addr, + sizeof addr, + connectFn, clientData, pollParams, FALSE, + FALSE, NULL, outError); +} +#endif diff --git a/open-vm-tools/lib/auth/Makefile.in b/open-vm-tools/lib/auth/Makefile.in deleted file mode 100644 index 137963be3..000000000 --- a/open-vm-tools/lib/auth/Makefile.in +++ /dev/null @@ -1,533 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/auth -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libAuth_la_LIBADD = -am_libAuth_la_OBJECTS = authPosix.lo -libAuth_la_OBJECTS = $(am_libAuth_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libAuth_la_SOURCES) -DIST_SOURCES = $(libAuth_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libAuth.la -libAuth_la_SOURCES = authPosix.c -AM_CFLAGS = @LIB_AUTH_CPPFLAGS@ -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/auth/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/auth/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libAuth.la: $(libAuth_la_OBJECTS) $(libAuth_la_DEPENDENCIES) - $(LINK) $(libAuth_la_OBJECTS) $(libAuth_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/authPosix.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/backdoor/Makefile.in b/open-vm-tools/lib/backdoor/Makefile.in deleted file mode 100644 index 2daca1738..000000000 --- a/open-vm-tools/lib/backdoor/Makefile.in +++ /dev/null @@ -1,541 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@THIRTY_TWO_BIT_USERSPACE_TRUE@am__append_1 = backdoorGcc32.c -@THIRTY_TWO_BIT_USERSPACE_FALSE@am__append_2 = backdoorGcc64.c -subdir = lib/backdoor -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libBackdoor_la_LIBADD = -am__libBackdoor_la_SOURCES_DIST = backdoor.c backdoorGcc32.c \ - backdoorGcc64.c -@THIRTY_TWO_BIT_USERSPACE_TRUE@am__objects_1 = backdoorGcc32.lo -@THIRTY_TWO_BIT_USERSPACE_FALSE@am__objects_2 = backdoorGcc64.lo -am_libBackdoor_la_OBJECTS = backdoor.lo $(am__objects_1) \ - $(am__objects_2) -libBackdoor_la_OBJECTS = $(am_libBackdoor_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libBackdoor_la_SOURCES) -DIST_SOURCES = $(am__libBackdoor_la_SOURCES_DIST) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libBackdoor.la -libBackdoor_la_SOURCES = backdoor.c $(am__append_1) $(am__append_2) -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/backdoor/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/backdoor/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libBackdoor.la: $(libBackdoor_la_OBJECTS) $(libBackdoor_la_DEPENDENCIES) - $(LINK) $(libBackdoor_la_OBJECTS) $(libBackdoor_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/backdoor.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/backdoorGcc32.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/backdoorGcc64.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/dataMap/Makefile.in b/open-vm-tools/lib/dataMap/Makefile.in deleted file mode 100644 index 9c10d4d3c..000000000 --- a/open-vm-tools/lib/dataMap/Makefile.in +++ /dev/null @@ -1,532 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2013-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/dataMap -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libDataMap_la_LIBADD = -am_libDataMap_la_OBJECTS = dataMap.lo -libDataMap_la_OBJECTS = $(am_libDataMap_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libDataMap_la_SOURCES) -DIST_SOURCES = $(libDataMap_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libDataMap.la -libDataMap_la_SOURCES = dataMap.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/dataMap/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/dataMap/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libDataMap.la: $(libDataMap_la_OBJECTS) $(libDataMap_la_DEPENDENCIES) - $(LINK) $(libDataMap_la_OBJECTS) $(libDataMap_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dataMap.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/dict/Makefile.in b/open-vm-tools/lib/dict/Makefile.in deleted file mode 100644 index 55a8a9060..000000000 --- a/open-vm-tools/lib/dict/Makefile.in +++ /dev/null @@ -1,532 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/dict -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libDict_la_LIBADD = -am_libDict_la_OBJECTS = dictll.lo -libDict_la_OBJECTS = $(am_libDict_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libDict_la_SOURCES) -DIST_SOURCES = $(libDict_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libDict.la -libDict_la_SOURCES = dictll.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/dict/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/dict/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libDict.la: $(libDict_la_OBJECTS) $(libDict_la_DEPENDENCIES) - $(LINK) $(libDict_la_OBJECTS) $(libDict_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dictll.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/dynxdr/Makefile.in b/open-vm-tools/lib/dynxdr/Makefile.in deleted file mode 100644 index fbcbdede6..000000000 --- a/open-vm-tools/lib/dynxdr/Makefile.in +++ /dev/null @@ -1,533 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2008-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/dynxdr -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libDynxdr_la_LIBADD = -am_libDynxdr_la_OBJECTS = dynxdr.lo xdrutil.lo -libDynxdr_la_OBJECTS = $(am_libDynxdr_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libDynxdr_la_SOURCES) -DIST_SOURCES = $(libDynxdr_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libDynxdr.la -libDynxdr_la_SOURCES = dynxdr.c xdrutil.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/dynxdr/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/dynxdr/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libDynxdr.la: $(libDynxdr_la_OBJECTS) $(libDynxdr_la_DEPENDENCIES) - $(LINK) $(libDynxdr_la_OBJECTS) $(libDynxdr_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dynxdr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xdrutil.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/err/Makefile.in b/open-vm-tools/lib/err/Makefile.in deleted file mode 100644 index 91810ef07..000000000 --- a/open-vm-tools/lib/err/Makefile.in +++ /dev/null @@ -1,533 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/err -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libErr_la_LIBADD = -am_libErr_la_OBJECTS = err.lo errPosix.lo -libErr_la_OBJECTS = $(am_libErr_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libErr_la_SOURCES) -DIST_SOURCES = $(libErr_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libErr.la -libErr_la_SOURCES = err.c errPosix.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/err/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/err/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libErr.la: $(libErr_la_OBJECTS) $(libErr_la_DEPENDENCIES) - $(LINK) $(libErr_la_OBJECTS) $(libErr_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/err.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/errPosix.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/file/Makefile.in b/open-vm-tools/lib/file/Makefile.in deleted file mode 100644 index be6e6acf3..000000000 --- a/open-vm-tools/lib/file/Makefile.in +++ /dev/null @@ -1,544 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/file -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libFile_la_LIBADD = -am_libFile_la_OBJECTS = file.lo fileStandAlone.lo filePosix.lo \ - fileIO.lo fileIOPosix.lo fileLockPrimitive.lo fileLockPosix.lo \ - fileTempPosix.lo fileTemp.lo -libFile_la_OBJECTS = $(am_libFile_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libFile_la_SOURCES) -DIST_SOURCES = $(libFile_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libFile.la -libFile_la_SOURCES = file.c fileStandAlone.c filePosix.c fileIO.c \ - fileIOPosix.c fileLockPrimitive.c fileLockPosix.c \ - fileTempPosix.c fileTemp.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/file/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/file/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libFile.la: $(libFile_la_OBJECTS) $(libFile_la_DEPENDENCIES) - $(LINK) $(libFile_la_OBJECTS) $(libFile_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileIO.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileIOPosix.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileLockPosix.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileLockPrimitive.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filePosix.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileStandAlone.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileTemp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileTempPosix.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/file/file.c b/open-vm-tools/lib/file/file.c index ba86bad48..583d71cfb 100644 --- a/open-vm-tools/lib/file/file.c +++ b/open-vm-tools/lib/file/file.c @@ -2071,8 +2071,6 @@ FileSimpleRandom(void) "fileSimpleRandomLock", RANK_LEAF); - VERIFY(lck != NULL); - MXUser_AcquireExclLock(lck); if (UNLIKELY(context == NULL)) { diff --git a/open-vm-tools/lib/file/fileIOPosix.c b/open-vm-tools/lib/file/fileIOPosix.c index 18aa6412e..b8ef09d7e 100644 --- a/open-vm-tools/lib/file/fileIOPosix.c +++ b/open-vm-tools/lib/file/fileIOPosix.c @@ -2954,7 +2954,6 @@ FileIOAligned_PoolInit(void) alignedPool.lock = MXUser_CreateSingletonExclLock(&alignedPoolLockStorage, "alignedPoolLock", RANK_LEAF); - VERIFY(alignedPool.lock); } diff --git a/open-vm-tools/lib/file/filePosix.c b/open-vm-tools/lib/file/filePosix.c index c88e67465..cdfbc02df 100644 --- a/open-vm-tools/lib/file/filePosix.c +++ b/open-vm-tools/lib/file/filePosix.c @@ -68,6 +68,10 @@ #include "vmfs.h" #include "hashTable.h" +#ifdef VMX86_SERVER +#include "fs_public.h" +#endif + #define LOGLEVEL_MODULE main #include "loglevel_user.h" @@ -499,7 +503,7 @@ File_Cwd(const char *drive) // IN: /* *---------------------------------------------------------------------- * - * FileStripFwdSlashes -- + * File_StripFwdSlashes -- * * Returns a new string with the extraneous forward slashes ("/") removed. * @@ -512,8 +516,8 @@ File_Cwd(const char *drive) // IN: *---------------------------------------------------------------------- */ -static char * -FileStripFwdSlashes(const char *pathName) // IN: +char * +File_StripFwdSlashes(const char *pathName) // IN: { char *ptr; char *path; @@ -594,7 +598,7 @@ File_FullPath(const char *pathName) // IN: } else if (File_IsFullPath(pathName)) { ret = Posix_RealPath(pathName); if (ret == NULL) { - ret = FileStripFwdSlashes(pathName); + ret = File_StripFwdSlashes(pathName); } } else { char *path = Unicode_Join(cwd, DIRSEPS, pathName, NULL); @@ -602,7 +606,7 @@ File_FullPath(const char *pathName) // IN: ret = Posix_RealPath(path); if (ret == NULL) { - ret = FileStripFwdSlashes(path); + ret = File_StripFwdSlashes(path); } free(path); } @@ -633,8 +637,7 @@ Bool File_IsFullPath(const char *pathName) // IN: { /* start with a slash? */ - return (pathName == NULL) ? FALSE : - Unicode_StartsWith(pathName, DIRSEPS); + return pathName != NULL && pathName[0] == DIRSEPC; } @@ -1496,6 +1499,55 @@ File_SupportsMultiWriter(const char *pathName) // IN: } +/* + *---------------------------------------------------------------------- + * + * File_SupportsOptimisticLock -- + * + * Return TRUE if the given file is on an FS that supports the + * FILEIO_OPEN_OPTIMISTIC_LOCK flag (only VMFS). + * + * Results: + * See above. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +Bool +File_SupportsOptimisticLock(const char *pathName) // IN: +{ +#ifdef VMX86_SERVER + uint16 fsTypeNum; + char *dir; + char *tempPath = NULL; + const char *fullPath; + int res; + + /* + * File_GetVMFSFSType works much faster on directories, so get the + * directory. + */ + if (!File_IsFullPath(pathName)) { + tempPath = File_FullPath(pathName); + fullPath = tempPath; + } else { + fullPath = pathName; + } + File_GetPathName(fullPath, &dir, NULL); + res = File_GetVMFSFSType(dir, -1, &fsTypeNum); + free(tempPath); + free(dir); + + return (res == 0) ? IS_VMFS_FSTYPENUM(fsTypeNum) : FALSE; +#else + return FALSE; +#endif +} + + /* *---------------------------------------------------------------------- * diff --git a/open-vm-tools/lib/file/fileTempPosix.c b/open-vm-tools/lib/file/fileTempPosix.c index cbae9f358..41043823e 100644 --- a/open-vm-tools/lib/file/fileTempPosix.c +++ b/open-vm-tools/lib/file/fileTempPosix.c @@ -480,7 +480,6 @@ File_GetSafeTmpDir(Bool useConf) // IN: /* Get and take lock for our safe dir. */ lck = MXUser_CreateSingletonExclLock(&lckStorage, "getSafeTmpDirLock", RANK_getSafeTmpDirLock); - VERIFY(lck != NULL); MXUser_AcquireExclLock(lck); diff --git a/open-vm-tools/lib/foundryMsg/Makefile.in b/open-vm-tools/lib/foundryMsg/Makefile.in deleted file mode 100644 index 77c6a56f3..000000000 --- a/open-vm-tools/lib/foundryMsg/Makefile.in +++ /dev/null @@ -1,536 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/foundryMsg -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libFoundryMsg_la_LIBADD = -am_libFoundryMsg_la_OBJECTS = foundryMsg.lo \ - foundryPropertyListCommon.lo vixTranslateErrOpenSource.lo -libFoundryMsg_la_OBJECTS = $(am_libFoundryMsg_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libFoundryMsg_la_SOURCES) -DIST_SOURCES = $(libFoundryMsg_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libFoundryMsg.la -libFoundryMsg_la_SOURCES = foundryMsg.c foundryPropertyListCommon.c \ - vixTranslateErrOpenSource.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/foundryMsg/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/foundryMsg/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libFoundryMsg.la: $(libFoundryMsg_la_OBJECTS) $(libFoundryMsg_la_DEPENDENCIES) - $(LINK) $(libFoundryMsg_la_OBJECTS) $(libFoundryMsg_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/foundryMsg.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/foundryPropertyListCommon.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vixTranslateErrOpenSource.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/glibUtils/Makefile.in b/open-vm-tools/lib/glibUtils/Makefile.in deleted file mode 100644 index c55a10631..000000000 --- a/open-vm-tools/lib/glibUtils/Makefile.in +++ /dev/null @@ -1,557 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2011-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/glibUtils -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libGlibUtils_la_LIBADD = -am_libGlibUtils_la_OBJECTS = libGlibUtils_la-fileLogger.lo \ - libGlibUtils_la-stdLogger.lo libGlibUtils_la-sysLogger.lo -libGlibUtils_la_OBJECTS = $(am_libGlibUtils_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libGlibUtils_la_SOURCES) -DIST_SOURCES = $(libGlibUtils_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libGlibUtils.la -libGlibUtils_la_CPPFLAGS = @GLIB2_CPPFLAGS@ -libGlibUtils_la_SOURCES = fileLogger.c stdLogger.c sysLogger.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/glibUtils/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/glibUtils/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libGlibUtils.la: $(libGlibUtils_la_OBJECTS) $(libGlibUtils_la_DEPENDENCIES) - $(LINK) $(libGlibUtils_la_OBJECTS) $(libGlibUtils_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libGlibUtils_la-fileLogger.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libGlibUtils_la-stdLogger.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libGlibUtils_la-sysLogger.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libGlibUtils_la-fileLogger.lo: fileLogger.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libGlibUtils_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libGlibUtils_la-fileLogger.lo -MD -MP -MF $(DEPDIR)/libGlibUtils_la-fileLogger.Tpo -c -o libGlibUtils_la-fileLogger.lo `test -f 'fileLogger.c' || echo '$(srcdir)/'`fileLogger.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libGlibUtils_la-fileLogger.Tpo $(DEPDIR)/libGlibUtils_la-fileLogger.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fileLogger.c' object='libGlibUtils_la-fileLogger.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libGlibUtils_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libGlibUtils_la-fileLogger.lo `test -f 'fileLogger.c' || echo '$(srcdir)/'`fileLogger.c - -libGlibUtils_la-stdLogger.lo: stdLogger.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libGlibUtils_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libGlibUtils_la-stdLogger.lo -MD -MP -MF $(DEPDIR)/libGlibUtils_la-stdLogger.Tpo -c -o libGlibUtils_la-stdLogger.lo `test -f 'stdLogger.c' || echo '$(srcdir)/'`stdLogger.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libGlibUtils_la-stdLogger.Tpo $(DEPDIR)/libGlibUtils_la-stdLogger.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='stdLogger.c' object='libGlibUtils_la-stdLogger.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libGlibUtils_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libGlibUtils_la-stdLogger.lo `test -f 'stdLogger.c' || echo '$(srcdir)/'`stdLogger.c - -libGlibUtils_la-sysLogger.lo: sysLogger.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libGlibUtils_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libGlibUtils_la-sysLogger.lo -MD -MP -MF $(DEPDIR)/libGlibUtils_la-sysLogger.Tpo -c -o libGlibUtils_la-sysLogger.lo `test -f 'sysLogger.c' || echo '$(srcdir)/'`sysLogger.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libGlibUtils_la-sysLogger.Tpo $(DEPDIR)/libGlibUtils_la-sysLogger.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sysLogger.c' object='libGlibUtils_la-sysLogger.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libGlibUtils_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libGlibUtils_la-sysLogger.lo `test -f 'sysLogger.c' || echo '$(srcdir)/'`sysLogger.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/guestApp/Makefile.in b/open-vm-tools/lib/guestApp/Makefile.in deleted file mode 100644 index ed73b2a58..000000000 --- a/open-vm-tools/lib/guestApp/Makefile.in +++ /dev/null @@ -1,532 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/guestApp -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libGuestApp_la_LIBADD = -am_libGuestApp_la_OBJECTS = guestApp.lo -libGuestApp_la_OBJECTS = $(am_libGuestApp_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libGuestApp_la_SOURCES) -DIST_SOURCES = $(libGuestApp_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libGuestApp.la -libGuestApp_la_SOURCES = guestApp.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/guestApp/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/guestApp/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libGuestApp.la: $(libGuestApp_la_OBJECTS) $(libGuestApp_la_DEPENDENCIES) - $(LINK) $(libGuestApp_la_OBJECTS) $(libGuestApp_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/guestApp.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/guestRpc/Makefile.in b/open-vm-tools/lib/guestRpc/Makefile.in deleted file mode 100644 index 091f46042..000000000 --- a/open-vm-tools/lib/guestRpc/Makefile.in +++ /dev/null @@ -1,549 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2008-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/guestRpc -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libGuestRpc_la_LIBADD = -am_libGuestRpc_la_OBJECTS = nicinfo_xdr.lo -libGuestRpc_la_OBJECTS = $(am_libGuestRpc_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libGuestRpc_la_SOURCES) -DIST_SOURCES = $(libGuestRpc_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ - -# XXX: Autoreconf complains about this and recommends using AM_CFLAGS instead. -# Problem is, $(CFLAGS) is appended to the compiler command line after AM_CFLAGS -# and after libGuestRpc_la_CFLAGS, so "-Wall -Werror" will override this flag. -CFLAGS = @CFLAGS@ -Wno-unused -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libGuestRpc.la -libGuestRpc_la_SOURCES = nicinfo_xdr.c -CLEANFILES = nicinfo.h nicinfo_xdr.c -EXTRA_DIST = nicinfo.x -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/guestRpc/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/guestRpc/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libGuestRpc.la: $(libGuestRpc_la_OBJECTS) $(libGuestRpc_la_DEPENDENCIES) - $(LINK) $(libGuestRpc_la_OBJECTS) $(libGuestRpc_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nicinfo_xdr.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - - -# Rules to invoke rpcgen. rpcgen will generate funny paths in the generated -# files if not invoked in the same directory as the source file, so we need -# to copy the sources to the build dir before compiling them. - -nicinfo.h: nicinfo.x - @RPCGEN_WRAPPER@ lib/guestRpc/nicinfo.x $@ - -nicinfo_xdr.c: nicinfo.x nicinfo.h - @RPCGEN_WRAPPER@ lib/guestRpc/nicinfo.x $@ -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/hashMap/Makefile.in b/open-vm-tools/lib/hashMap/Makefile.in deleted file mode 100644 index e3be4af63..000000000 --- a/open-vm-tools/lib/hashMap/Makefile.in +++ /dev/null @@ -1,532 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2013-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/hashMap -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libHashMap_la_LIBADD = -am_libHashMap_la_OBJECTS = hashMap.lo -libHashMap_la_OBJECTS = $(am_libHashMap_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libHashMap_la_SOURCES) -DIST_SOURCES = $(libHashMap_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libHashMap.la -libHashMap_la_SOURCES = hashMap.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/hashMap/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/hashMap/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libHashMap.la: $(libHashMap_la_OBJECTS) $(libHashMap_la_DEPENDENCIES) - $(LINK) $(libHashMap_la_OBJECTS) $(libHashMap_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hashMap.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/hgfs/Makefile.in b/open-vm-tools/lib/hgfs/Makefile.in deleted file mode 100644 index cb84547dc..000000000 --- a/open-vm-tools/lib/hgfs/Makefile.in +++ /dev/null @@ -1,540 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/hgfs -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libHgfs_la_LIBADD = -am_libHgfs_la_OBJECTS = cpName.lo cpNameLite.lo cpNameLinux.lo \ - cpNameUtil.lo cpNameUtilLinux.lo hgfsUtil.lo hgfsEscape.lo -libHgfs_la_OBJECTS = $(am_libHgfs_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libHgfs_la_SOURCES) -DIST_SOURCES = $(libHgfs_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libHgfs.la -libHgfs_la_SOURCES = cpName.c cpNameLite.c cpNameLinux.c cpNameUtil.c \ - cpNameUtilLinux.c hgfsUtil.c hgfsEscape.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/hgfs/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/hgfs/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libHgfs.la: $(libHgfs_la_OBJECTS) $(libHgfs_la_DEPENDENCIES) - $(LINK) $(libHgfs_la_OBJECTS) $(libHgfs_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpName.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpNameLinux.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpNameLite.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpNameUtil.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpNameUtilLinux.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hgfsEscape.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hgfsUtil.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/hgfs/hgfsEscape.c b/open-vm-tools/lib/hgfs/hgfsEscape.c index 3193f1885..7da9f66db 100644 --- a/open-vm-tools/lib/hgfs/hgfsEscape.c +++ b/open-vm-tools/lib/hgfs/hgfsEscape.c @@ -758,6 +758,7 @@ HgfsEscape_Do(char const *bufIn, // IN: Buffer with unescaped input * On success, the size (excluding the NUL terminator) of the * escaped, NUL terminated buffer. * Returns 0 if the name is a valid Windows file name. + * Returns -1 if the name is not a valid file name. * * Side effects: * None @@ -774,15 +775,15 @@ HgfsEscape_GetSize(char const *bufIn, // IN: Buffer with unescaped input const char *end = bufIn + sizeIn; const char *next; - if (sizeIn == 0) { // No need toescape empty name. + if (sizeIn == 0) { // No need to escape an empty name. return 0; } if (bufIn[sizeIn - 1] == '\0') { /* - * In some cases a NUL terminated string is passed to HgfsEscape_GeSize - * so it make sense to support such input even if CPName_GetComponent + * In some cases, a NUL-terminated string is passed to HgfsEscape_GetSize, + * so it makes sense to support such input even if CPName_GetComponent * does not. Detect this case and make the input compliant with - * CPName_GetComponent by removing terminating NUL. + * CPName_GetComponent by removing the terminating NUL. */ end--; sizeIn--; @@ -794,7 +795,7 @@ HgfsEscape_GetSize(char const *bufIn, // IN: Buffer with unescaped input while (currentComponent - bufIn < sizeIn) { int componentSize = CPName_GetComponent(currentComponent, end, &next); if (componentSize < 0) { - Log("%s: failed to calculate escapde name size - name is invalid\n", __FUNCTION__); + Log("%s: failed to calculate escaped name size - name is invalid\n", __FUNCTION__); return -1; } result += HgfsEscapeGetComponentSize(currentComponent, componentSize); diff --git a/open-vm-tools/lib/hgfs/hgfsUtil.c b/open-vm-tools/lib/hgfs/hgfsUtil.c index 78737aae4..5eb661713 100644 --- a/open-vm-tools/lib/hgfs/hgfsUtil.c +++ b/open-vm-tools/lib/hgfs/hgfsUtil.c @@ -109,7 +109,7 @@ int HgfsConvertFromNtTimeNsec(struct timespec *unixTime, // OUT: Time in UNIX format uint64 ntTime) // IN: Time in Windows NT format { -#if !defined(VM_X86_64) && !defined(__arm__) +#ifdef __i386__ uint32 sec; uint32 nsec; @@ -134,7 +134,7 @@ HgfsConvertFromNtTimeNsec(struct timespec *unixTime, // OUT: Time in UNIX format return -1; } -#if !defined(VM_X86_64) && !defined(__arm__) +#ifdef __i386__ Div643232(ntTime - UNIX_EPOCH, 10000000, &sec, &nsec); unixTime->tv_sec = sec; unixTime->tv_nsec = nsec * 100; diff --git a/open-vm-tools/lib/hgfsBd/Makefile.in b/open-vm-tools/lib/hgfsBd/Makefile.in deleted file mode 100644 index f22ad6110..000000000 --- a/open-vm-tools/lib/hgfsBd/Makefile.in +++ /dev/null @@ -1,532 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/hgfsBd -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libHgfsBd_la_LIBADD = -am_libHgfsBd_la_OBJECTS = hgfsBd.lo -libHgfsBd_la_OBJECTS = $(am_libHgfsBd_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libHgfsBd_la_SOURCES) -DIST_SOURCES = $(libHgfsBd_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libHgfsBd.la -libHgfsBd_la_SOURCES = hgfsBd.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/hgfsBd/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/hgfsBd/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libHgfsBd.la: $(libHgfsBd_la_OBJECTS) $(libHgfsBd_la_DEPENDENCIES) - $(LINK) $(libHgfsBd_la_OBJECTS) $(libHgfsBd_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hgfsBd.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/hgfsHelper/Makefile.in b/open-vm-tools/lib/hgfsHelper/Makefile.in deleted file mode 100644 index 9fd405149..000000000 --- a/open-vm-tools/lib/hgfsHelper/Makefile.in +++ /dev/null @@ -1,532 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/hgfsHelper -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libHgfsHelper_la_LIBADD = -am_libHgfsHelper_la_OBJECTS = hgfsHelperPosix.lo -libHgfsHelper_la_OBJECTS = $(am_libHgfsHelper_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libHgfsHelper_la_SOURCES) -DIST_SOURCES = $(libHgfsHelper_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libHgfsHelper.la -libHgfsHelper_la_SOURCES = hgfsHelperPosix.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/hgfsHelper/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/hgfsHelper/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libHgfsHelper.la: $(libHgfsHelper_la_OBJECTS) $(libHgfsHelper_la_DEPENDENCIES) - $(LINK) $(libHgfsHelper_la_OBJECTS) $(libHgfsHelper_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hgfsHelperPosix.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/hgfsServer/Makefile.in b/open-vm-tools/lib/hgfsServer/Makefile.in deleted file mode 100644 index be7782a0e..000000000 --- a/open-vm-tools/lib/hgfsServer/Makefile.in +++ /dev/null @@ -1,545 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/hgfsServer -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libHgfsServer_la_LIBADD = -am_libHgfsServer_la_OBJECTS = hgfsServer.lo hgfsServerLinux.lo \ - hgfsServerPacketUtil.lo hgfsDirNotifyStub.lo \ - hgfsServerParameters.lo hgfsServerOplock.lo \ - hgfsServerOplockLinux.lo -libHgfsServer_la_OBJECTS = $(am_libHgfsServer_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libHgfsServer_la_SOURCES) -DIST_SOURCES = $(libHgfsServer_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libHgfsServer.la -libHgfsServer_la_SOURCES = hgfsServer.c hgfsServerLinux.c \ - hgfsServerPacketUtil.c hgfsDirNotifyStub.c \ - hgfsServerParameters.c hgfsServerOplock.c \ - hgfsServerOplockLinux.c -AM_CFLAGS = -DVMTOOLS_USE_GLIB @GLIB2_CPPFLAGS@ -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/hgfsServer/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/hgfsServer/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libHgfsServer.la: $(libHgfsServer_la_OBJECTS) $(libHgfsServer_la_DEPENDENCIES) - $(LINK) $(libHgfsServer_la_OBJECTS) $(libHgfsServer_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hgfsDirNotifyStub.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hgfsServer.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hgfsServerLinux.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hgfsServerOplock.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hgfsServerOplockLinux.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hgfsServerPacketUtil.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hgfsServerParameters.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/hgfsServer/hgfsServer.c b/open-vm-tools/lib/hgfsServer/hgfsServer.c index 0939655bc..681d59fa0 100644 --- a/open-vm-tools/lib/hgfsServer/hgfsServer.c +++ b/open-vm-tools/lib/hgfsServer/hgfsServer.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998,2014-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -3799,27 +3799,13 @@ HgfsServer_InitState(HgfsServerCallbacks **callbackTable, // IN/OUT: our DblLnkLst_Init(&gHgfsSharedFoldersList); gHgfsSharedFoldersLock = MXUser_CreateExclLock("sharedFoldersLock", RANK_hgfsSharedFolders); - if (NULL != gHgfsSharedFoldersLock) { - gHgfsAsyncLock = MXUser_CreateExclLock("asyncLock", - RANK_hgfsSharedFolders); - if (NULL != gHgfsAsyncLock) { - gHgfsAsyncVar = MXUser_CreateCondVarExclLock(gHgfsAsyncLock); - if (NULL != gHgfsAsyncVar) { - if (!HgfsPlatformInit()) { - LOG(4, ("Could not initialize server platform specific \n")); - result = FALSE; - } - } else { - LOG(4, ("%s: Could not create async counter cond var.\n", - __FUNCTION__)); - result = FALSE; - } - } else { - LOG(4, ("%s: Could not create async counter mutex.\n", __FUNCTION__)); - result = FALSE; - } - } else { - LOG(4, ("%s: Could not create shared folders mutex.\n", __FUNCTION__)); + gHgfsAsyncLock = MXUser_CreateExclLock("asyncLock", + RANK_hgfsSharedFolders); + + gHgfsAsyncVar = MXUser_CreateCondVarExclLock(gHgfsAsyncLock); + + if (!HgfsPlatformInit()) { + LOG(4, ("Could not initialize server platform specific \n")); result = FALSE; } @@ -3902,6 +3888,71 @@ HgfsServer_ExitState(void) } +/* + *----------------------------------------------------------------------------- + * + * HgfsServer_ShareAccessCheck -- + * + * Checks if the requested mode may be granted depending on read/write + * permissions. + * + * Results: + * An HgfsNameStatus value indicating the result is returned. + * + * Side effects: + * None + * + *----------------------------------------------------------------------------- + */ + +Bool +HgfsServer_ShareAccessCheck(HgfsOpenMode accessMode, // IN: open mode to check + Bool shareWriteable, // IN: share is writable + Bool shareReadable) // IN: share is readable +{ + /* + * See if access is allowed in the requested mode. + * + * XXX Yeah, this is retarded. We should be using bits instead of + * an enum for HgfsOpenMode. Add it to the todo list. [bac] + */ + + switch (HGFS_OPEN_MODE_ACCMODE(accessMode)) { + case HGFS_OPEN_MODE_READ_ONLY: + if (!shareReadable) { + LOG(4, ("%s: Read access denied\n", __FUNCTION__)); + + return FALSE; + } + break; + + case HGFS_OPEN_MODE_WRITE_ONLY: + if (!shareWriteable) { + LOG(4, ("%s: Write access denied\n", __FUNCTION__)); + + return FALSE; + } + break; + + case HGFS_OPEN_MODE_READ_WRITE: + if (!shareReadable || !shareWriteable) { + LOG(4, ("%s: Read/write access denied\n", __FUNCTION__)); + + return FALSE; + } + break; + + default: + LOG(0, ("%s: Invalid mode %d\n", __FUNCTION__, accessMode)); + ASSERT(FALSE); + + return FALSE; + } + + return TRUE; +} + + /* *----------------------------------------------------------------------------- * @@ -4158,11 +4209,6 @@ HgfsServerSessionConnect(void *transportData, // IN: tra transportSession->sessionArrayLock = MXUser_CreateExclLock("HgfsSessionArrayLock", RANK_hgfsSessionArrayLock); - if (transportSession->sessionArrayLock == NULL) { - LOG(4, ("%s: Could not create session sync mutex.\n", __FUNCTION__)); - free(transportSession); - return FALSE; - } DblLnkLst_Init(&transportSession->sessionArray); @@ -4216,31 +4262,12 @@ HgfsServerAllocateSession(HgfsTransportSessionInfo *transportSession, // IN: session->fileIOLock = MXUser_CreateExclLock("HgfsFileIOLock", RANK_hgfsFileIOLock); - if (session->fileIOLock == NULL) { - LOG(4, ("%s: Could not create node array sync mutex.\n", __FUNCTION__)); - free(session); - return FALSE; - } session->nodeArrayLock = MXUser_CreateExclLock("HgfsNodeArrayLock", RANK_hgfsNodeArrayLock); - if (session->nodeArrayLock == NULL) { - MXUser_DestroyExclLock(session->fileIOLock); - LOG(4, ("%s: Could not create node array sync mutex.\n", __FUNCTION__)); - free(session); - return FALSE; - } session->searchArrayLock = MXUser_CreateExclLock("HgfsSearchArrayLock", RANK_hgfsSearchArrayLock); - if (session->searchArrayLock == NULL) { - MXUser_DestroyExclLock(session->fileIOLock); - MXUser_DestroyExclLock(session->nodeArrayLock); - LOG(4, ("%s: Could not create search array sync mutex.\n", - __FUNCTION__)); - free(session); - return FALSE; - } session->sessionId = HgfsGenerateSessionId(); session->state = HGFS_SESSION_STATE_OPEN; @@ -7599,9 +7626,9 @@ HgfsServerGetattr(HgfsInputParam *input) // IN: Input params } if (HGFS_ERROR_SUCCESS == status && - !HgfsServerPolicy_CheckMode(HGFS_OPEN_MODE_READ_ONLY, - shareInfo.writePermissions, - shareInfo.readPermissions)) { + !HgfsServer_ShareAccessCheck(HGFS_OPEN_MODE_READ_ONLY, + shareInfo.writePermissions, + shareInfo.readPermissions)) { status = HGFS_ERROR_ACCESS_DENIED; } else if (status != HGFS_ERROR_SUCCESS) { /* @@ -7716,9 +7743,9 @@ HgfsServerSetattr(HgfsInputParam *input) // IN: Input params * handle for the oplocked node (or break the oplock) prior to making * a setattr request. Fail this request. */ - if (!HgfsServerPolicy_CheckMode(HGFS_OPEN_MODE_WRITE_ONLY, - shareInfo.writePermissions, - shareInfo.readPermissions)) { + if (!HgfsServer_ShareAccessCheck(HGFS_OPEN_MODE_WRITE_ONLY, + shareInfo.writePermissions, + shareInfo.readPermissions)) { status = HGFS_ERROR_ACCESS_DENIED; } else if (HGFS_NAME_STATUS_COMPLETE != HgfsServerPolicy_GetShareOptions(cpName, cpNameSize, diff --git a/open-vm-tools/lib/hgfsServer/hgfsServerParameters.c b/open-vm-tools/lib/hgfsServer/hgfsServerParameters.c index e17bb8863..9dd2e5ac2 100644 --- a/open-vm-tools/lib/hgfsServer/hgfsServerParameters.c +++ b/open-vm-tools/lib/hgfsServer/hgfsServerParameters.c @@ -5560,6 +5560,7 @@ HgfsUnpackSetWatchRequest(const void *packet, // IN: HGFS packet NOT_REACHED(); result = FALSE; } else { + LOG(4, ("%s: HGFS_OP_SET_WATCH_V4\n", __FUNCTION__)); result = HgfsUnpackSetWatchPayloadV4(requestV4, packetSize, useHandle, flags, events, cpName, cpNameSize, dir, caseFlags); } @@ -6094,11 +6095,13 @@ HgfsPackChangeNotifyRequestV4(HgfsSubscriberHandle watchId, // IN: watch size_t bufferSize, // IN: available space HgfsRequestNotifyV4 *reply) // OUT: notification buffer { - size_t size; + size_t size = 0; size_t notificationOffset; if (bufferSize < sizeof *reply) { - return 0; + LOG(4, ("%s: Error HGFS_OP_NOTIFY_V4 buf size %"FMTSZ"u reply size %"FMTSZ"u\n", + __FUNCTION__, bufferSize, sizeof *reply)); + goto exit; } reply->watchId = watchId; reply->flags = flags; @@ -6129,6 +6132,8 @@ HgfsPackChangeNotifyRequestV4(HgfsSubscriberHandle watchId, // IN: watch reply->flags = HGFS_NOTIFY_FLAG_OVERFLOW; } } + +exit: return size; } @@ -6163,7 +6168,7 @@ HgfsPackChangeNotificationRequest(void *packet, // IN/OUT: Hg size_t notifyRequestSize; HgfsRequestNotifyV4 *notifyRequest; HgfsHeader *header = packet; - Bool result; + Bool result = FALSE; ASSERT(packet); ASSERT(shareName); @@ -6172,8 +6177,12 @@ HgfsPackChangeNotificationRequest(void *packet, // IN/OUT: Hg ASSERT(session); ASSERT(bufferSize); + LOG(4, ("%s: HGFS_OP_NOTIFY_V4\n", __FUNCTION__)); + if (*bufferSize < sizeof *header) { - return FALSE; + LOG(4, ("%s: Error HGFS_OP_NOTIFY_V4 buf size %"FMTSZ"u min %"FMTSZ"u\n", + __FUNCTION__, *bufferSize, sizeof *header)); + goto exit; } /* @@ -6199,9 +6208,8 @@ HgfsPackChangeNotificationRequest(void *packet, // IN/OUT: Hg HGFS_PACKET_FLAG_REQUEST, *bufferSize, header); - } else { - result = FALSE; } +exit: return result; } diff --git a/open-vm-tools/lib/hgfsServerManagerGuest/Makefile.in b/open-vm-tools/lib/hgfsServerManagerGuest/Makefile.in deleted file mode 100644 index 3541ae253..000000000 --- a/open-vm-tools/lib/hgfsServerManagerGuest/Makefile.in +++ /dev/null @@ -1,537 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/hgfsServerManagerGuest -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libHgfsServerManagerGuest_la_LIBADD = -am_libHgfsServerManagerGuest_la_OBJECTS = hgfsServerManagerGuest.lo \ - hgfsChannelGuest.lo hgfsChannelGuestBd.lo -libHgfsServerManagerGuest_la_OBJECTS = \ - $(am_libHgfsServerManagerGuest_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libHgfsServerManagerGuest_la_SOURCES) -DIST_SOURCES = $(libHgfsServerManagerGuest_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libHgfsServerManagerGuest.la -libHgfsServerManagerGuest_la_SOURCES = hgfsServerManagerGuest.c \ - hgfsChannelGuest.c hgfsChannelGuestBd.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/hgfsServerManagerGuest/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/hgfsServerManagerGuest/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libHgfsServerManagerGuest.la: $(libHgfsServerManagerGuest_la_OBJECTS) $(libHgfsServerManagerGuest_la_DEPENDENCIES) - $(LINK) $(libHgfsServerManagerGuest_la_OBJECTS) $(libHgfsServerManagerGuest_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hgfsChannelGuest.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hgfsChannelGuestBd.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hgfsServerManagerGuest.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/hgfsServerPolicyGuest/Makefile.in b/open-vm-tools/lib/hgfsServerPolicyGuest/Makefile.in deleted file mode 100644 index 0e9202062..000000000 --- a/open-vm-tools/lib/hgfsServerPolicyGuest/Makefile.in +++ /dev/null @@ -1,533 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/hgfsServerPolicyGuest -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libHgfsServerPolicyGuest_la_LIBADD = -am_libHgfsServerPolicyGuest_la_OBJECTS = hgfsServerPolicyGuest.lo -libHgfsServerPolicyGuest_la_OBJECTS = \ - $(am_libHgfsServerPolicyGuest_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libHgfsServerPolicyGuest_la_SOURCES) -DIST_SOURCES = $(libHgfsServerPolicyGuest_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libHgfsServerPolicyGuest.la -libHgfsServerPolicyGuest_la_SOURCES = hgfsServerPolicyGuest.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/hgfsServerPolicyGuest/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/hgfsServerPolicyGuest/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libHgfsServerPolicyGuest.la: $(libHgfsServerPolicyGuest_la_OBJECTS) $(libHgfsServerPolicyGuest_la_DEPENDENCIES) - $(LINK) $(libHgfsServerPolicyGuest_la_OBJECTS) $(libHgfsServerPolicyGuest_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hgfsServerPolicyGuest.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/hgfsServerPolicyGuest/hgfsServerPolicyGuest.c b/open-vm-tools/lib/hgfsServerPolicyGuest/hgfsServerPolicyGuest.c index 470c5a546..f4dc6ee25 100644 --- a/open-vm-tools/lib/hgfsServerPolicyGuest/hgfsServerPolicyGuest.c +++ b/open-vm-tools/lib/hgfsServerPolicyGuest/hgfsServerPolicyGuest.c @@ -676,62 +676,3 @@ HgfsServerPolicy_GetShareMode(char const *nameIn, // IN: Share name to re return HGFS_NAME_STATUS_COMPLETE; } - - -/* - *----------------------------------------------------------------------------- - * - * HgfsServerPolicy_CheckMode -- - * - * Checks if the requested mode may be granted depending on read/write permissions. - * - * Results: - * TRUE if the requested mode can be granted, FALSE otherwise. - * - * Side effects: - * None - * - *----------------------------------------------------------------------------- - */ - -Bool -HgfsServerPolicy_CheckMode(HgfsOpenMode mode, // IN: mode to check - Bool writePermissions, // IN: callers write permissions - Bool readPermissions) // IN: callers read permissions -{ - /* - * See if access is allowed in the requested mode. - * - * XXX Yeah, this is retarded. We should be using bits instead of - * an enum for HgfsOpenMode. Add it to the todo list. [bac] - */ - switch (HGFS_OPEN_MODE_ACCMODE(mode)) { - case HGFS_OPEN_MODE_READ_ONLY: - if (!readPermissions) { - LOG(4, ("HgfsServerPolicyCheckMode: Read access denied\n")); - return FALSE; - } - break; - - case HGFS_OPEN_MODE_WRITE_ONLY: - if (!writePermissions) { - LOG(4, ("HgfsServerPolicyCheckMode: Write access denied\n")); - return FALSE; - } - break; - - case HGFS_OPEN_MODE_READ_WRITE: - if (!readPermissions || !writePermissions) { - LOG(4, ("HgfsServerPolicyCheckMode: Read/write access denied\n")); - return FALSE; - } - break; - - default: - LOG(0, ("HgfsServerPolicyCheckMode: Invalid mode\n")); - ASSERT(FALSE); - return FALSE; - } - - return TRUE; -} diff --git a/open-vm-tools/lib/impersonate/Makefile.in b/open-vm-tools/lib/impersonate/Makefile.in deleted file mode 100644 index d6e2c7799..000000000 --- a/open-vm-tools/lib/impersonate/Makefile.in +++ /dev/null @@ -1,534 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/impersonate -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libImpersonate_la_LIBADD = -am_libImpersonate_la_OBJECTS = impersonate.lo impersonatePosix.lo -libImpersonate_la_OBJECTS = $(am_libImpersonate_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libImpersonate_la_SOURCES) -DIST_SOURCES = $(libImpersonate_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libImpersonate.la -libImpersonate_la_SOURCES = impersonate.c impersonatePosix.c -AM_CFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/impersonate/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/impersonate/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libImpersonate.la: $(libImpersonate_la_OBJECTS) $(libImpersonate_la_DEPENDENCIES) - $(LINK) $(libImpersonate_la_OBJECTS) $(libImpersonate_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/impersonate.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/impersonatePosix.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/impersonate/impersonate.c b/open-vm-tools/lib/impersonate/impersonate.c index 6f2b2a93e..da333f7ea 100644 --- a/open-vm-tools/lib/impersonate/impersonate.c +++ b/open-vm-tools/lib/impersonate/impersonate.c @@ -59,7 +59,6 @@ ImpersonateGetLock(void) MXUserRecLock *lock = MXUser_CreateSingletonRecLock(&impersonateLockStorage, "impersonateLock", RANK_impersonateLock); - VERIFY(lock); return lock; } diff --git a/open-vm-tools/lib/include/appUtil.h b/open-vm-tools/lib/include/appUtil.h index eb7a97ab3..879898c59 100644 --- a/open-vm-tools/lib/include/appUtil.h +++ b/open-vm-tools/lib/include/appUtil.h @@ -40,6 +40,18 @@ extern "C" { }; #endif // __cplusplus +/* + * Platform-agnostic bitmask of types of handlers to include. + * Used by the AppUtil file type functions. + */ +typedef enum { + FILE_TYPE_INCLUDE_NONE = 0, + FILE_TYPE_INCLUDE_URI = 1, // Include URI handlers + FILE_TYPE_INCLUDE_PERCEIVED_HANDLERS = 1 << 1, // Include perceived type handlers + // (see bug 1440812). + FILE_TYPE_INCLUDE_ALL = FILE_TYPE_INCLUDE_URI | + FILE_TYPE_INCLUDE_PERCEIVED_HANDLERS +} FileTypeInclusions; #ifdef _WIN32 @@ -87,7 +99,7 @@ Bool AppUtil_GetDIBitsAlloc(HDC hdc, HICON AppUtil_GetWindowIcon(HWND hwnd, uint32 iconSize); -void AppUtil_BuildGlobalApplicationList(void); +void AppUtil_BuildGlobalApplicationList(FileTypeInclusions inclusions); wchar_t* AppUtil_SanitizeCommandLine(const wchar_t *commandLineUtf16); char *AppUtil_ActionURIForCommandLine(const WCHAR *commandLineUtf16); diff --git a/open-vm-tools/lib/include/asyncsocket.h b/open-vm-tools/lib/include/asyncsocket.h index 9d41a72b8..101bfddb2 100644 --- a/open-vm-tools/lib/include/asyncsocket.h +++ b/open-vm-tools/lib/include/asyncsocket.h @@ -49,6 +49,10 @@ #define INCLUDE_ALLOW_USERLEVEL #include "includeCheck.h" +#ifdef __APPLE__ +#include +#endif + /* * Error codes */ @@ -205,6 +209,9 @@ typedef void (*AsyncSocketConnectFn) (AsyncSocket *asock, void *clientData); typedef void (*AsyncSocketSslAcceptFn) (Bool status, AsyncSocket *asock, void *clientData); +typedef void (*AsyncSocketSslConnectFn) (Bool status, AsyncSocket *asock, + void *clientData); +typedef void (*AsyncSocketCloseCb) (AsyncSocket *asock); /* * Listen on port and fire callback with new asock @@ -243,6 +250,13 @@ AsyncSocket *AsyncSocket_ListenWebSocketUDS(const char *pipeName, void *clientData, AsyncSocketPollParams *pollParams, int *outError); + +AsyncSocket *AsyncSocket_ListenSocketUDS(const char *pipeName, + AsyncSocketConnectFn connectFn, + void *clientData, + AsyncSocketPollParams *pollParams, + int *outError); + #endif #endif @@ -271,15 +285,25 @@ AsyncSocket *AsyncSocket_ConnectUnixDomain(const char *path, int *error); #else AsyncSocket * -AsyncSocket_ConnectNamedPipe(char *pipeName, +AsyncSocket_ConnectNamedPipe(const char *pipeName, AsyncSocketConnectFn connectFn, void *clientData, AsyncSocketConnectFlags flags, AsyncSocketPollParams *pollParams, int *outError); + +AsyncSocket* +AsyncSocket_CreateNamedPipe(const char *pipeName, + AsyncSocketConnectFn connectFn, + void *clientData, + DWORD openMode, + DWORD pipeMode, + uint32 numInstances, + AsyncSocketPollParams *pollParams, + int *error); #endif -#ifndef VMX86_TOOLS +#if !defined VMX86_TOOLS || TARGET_OS_IPHONE AsyncSocket * AsyncSocket_ConnectWebSocket(const char *url, struct _SSLVerifyParam *sslVerifyParam, @@ -290,18 +314,32 @@ AsyncSocket_ConnectWebSocket(const char *url, AsyncSocketConnectFlags flags, AsyncSocketPollParams *pollParams, int *error); + +AsyncSocket * +AsyncSocket_ConnectProxySocket(const char *url, + struct _SSLVerifyParam *sslVerifyParam, + const char *cookies, + const char *protocols[], + AsyncSocketConnectFn connectFn, + void *clientData, + AsyncSocketConnectFlags flags, + AsyncSocketPollParams *pollParams, + int *error); #endif -#ifndef USE_SSL_DIRECT /* * Initiate SSL connection on existing asock, with optional cert verification */ Bool AsyncSocket_ConnectSSL(AsyncSocket *asock, struct _SSLVerifyParam *verifyParam, void *sslContext); -Bool AsyncSocket_AcceptSSL(AsyncSocket *asock); -#endif +void AsyncSocket_StartSslConnect(AsyncSocket *asock, + struct _SSLVerifyParam *verifyParam, + void *sslCtx, + AsyncSocketSslConnectFn sslConnectFn, + void *clientData); +Bool AsyncSocket_AcceptSSL(AsyncSocket *asock); void AsyncSocket_StartSslAccept(AsyncSocket *asock, void *sslCtx, AsyncSocketSslAcceptFn sslAcceptFn, @@ -413,12 +451,25 @@ Bool AsyncSocket_SetBufferSizes(AsyncSocket *asock, // IN int sendSz, // IN int recvSz); // IN +/* + * Set optional AsyncSocket_Close() behaviors. + */ +void AsyncSocket_SetCloseOptions(AsyncSocket *asock, + int flushEnabledMaxWaitMsec, + AsyncSocketCloseCb closeCb); + +/* + * Send websocket close frame. + */ +int +AsyncSocket_SendWebSocketCloseFrame(AsyncSocket *asock, + uint16 closeStatus); + /* * Close the connection and destroy the asock. */ int AsyncSocket_Close(AsyncSocket *asock); -#ifndef VMX86_TOOLS /* * Retrieve the URI Supplied for a websocket connection */ @@ -428,7 +479,6 @@ char *AsyncSocket_GetWebSocketURI(AsyncSocket *asock); * Retrieve the Cookie Supplied for a websocket connection */ char *AsyncSocket_GetWebSocketCookie(AsyncSocket *asock); -#endif /* * Retrieve the close status, if received, for a websocket connection diff --git a/open-vm-tools/lib/include/backdoor_def.h b/open-vm-tools/lib/include/backdoor_def.h index bdb29b54f..4d1a95203 100644 --- a/open-vm-tools/lib/include/backdoor_def.h +++ b/open-vm-tools/lib/include/backdoor_def.h @@ -145,6 +145,8 @@ # define BDOOR_CMD_FAS_GET_TABLE_SKIP 5 # define BDOOR_CMD_FAS_GET_SLEEP_ENABLES 6 # define BDOOR_CMD_FAS_GET_HARD_RESET_ENABLE 7 +# define BDOOR_CMD_FAS_GET_MOUSE_HID 8 +# define BDOOR_CMD_FAS_GET_SMBIOS_VERSION 9 #define BDOOR_CMD_SENDPSHAREHINTS 66 /* Not in use. Deprecated. */ #define BDOOR_CMD_ENABLE_USB_MOUSE 67 #define BDOOR_CMD_GET_VCPU_INFO 68 @@ -165,6 +167,7 @@ # define BDOOR_CMD_EBC_GET_ORDER 1 # define BDOOR_CMD_EBC_SHELL_ACTIVE 2 # define BDOOR_CMD_EBC_GET_NETWORK_BOOT_PROTOCOL 3 +# define BDOOR_CMD_EBC_QUICKBOOT_ENABLED 4 #define BDOOR_CMD_GET_HW_MODEL 74 /* CPL 0 only. */ #define BDOOR_CMD_GET_SVGA_CAPABILITIES 75 /* CPL 0 only. */ #define BDOOR_CMD_GET_FORCE_X2APIC 76 /* CPL 0 only */ @@ -181,13 +184,35 @@ # define BDOOR_CMD_MKSGS_ADD_PPN 1 # define BDOOR_CMD_MKSGS_REMOVE_PPN 2 #define BDOOR_CMD_ABSPOINTER_RESTRICT 86 -#define BDOOR_CMD_GUESTINTEGRITY 87 -# define BDOOR_CMD_GI_SETUP 0 -# define BDOOR_CMD_GI_REMOVE 1 +#define BDOOR_CMD_GUEST_INTEGRITY 87 +# define BDOOR_CMD_GI_GET_CAPABILITIES 0 +# define BDOOR_CMD_GI_SETUP_ENTRY_POINT 1 +# define BDOOR_CMD_GI_SETUP_ALERTS 2 +# define BDOOR_CMD_GI_SETUP_STORE 3 +# define BDOOR_CMD_GI_SETUP_EVENT_RING 4 +# define BDOOR_CMD_GI_SETUP_NON_FAULT_READ 5 +# define BDOOR_CMD_GI_ENTER_INTEGRITY_MODE 6 +# define BDOOR_CMD_GI_EXIT_INTEGRITY_MODE 7 +# define BDOOR_CMD_GI_RESET_INTEGRITY_MODE 8 +# define BDOOR_CMD_GI_GET_EVENT_RING_STATE 9 +# define BDOOR_CMD_GI_CONSUME_RING_EVENTS 10 +# define BDOOR_CMD_GI_WATCH_MAPPINGS_START 11 +# define BDOOR_CMD_GI_WATCH_MAPPINGS_STOP 12 +# define BDOOR_CMD_GI_CHECK_MAPPINGS_NOW 13 +# define BDOOR_CMD_GI_WATCH_PPNS_START 14 +# define BDOOR_CMD_GI_WATCH_PPNS_STOP 15 +# define BDOOR_CMD_GI_SEND_MSG 16 +# define BDOOR_CMD_GI_TEST_READ_MOB 128 +# define BDOOR_CMD_GI_TEST_ADD_EVENT 129 +# define BDOOR_CMD_GI_TEST_MAPPING 130 +# define BDOOR_CMD_GI_TEST_PPN 131 +# define BDOOR_CMD_GI_MAX 131 #define BDOOR_CMD_MKSSTATS_SNAPSHOT 88 /* Devel only. */ # define BDOOR_CMD_MKSSTATS_START 0 # define BDOOR_CMD_MKSSTATS_STOP 1 -#define BDOOR_CMD_MAX 89 +#define BDOOR_CMD_SECUREBOOT 89 +#define BDOOR_CMD_COPY_PHYSMEM 90 /* Devel only. */ +#define BDOOR_CMD_MAX 91 /* @@ -213,10 +238,13 @@ #define BDOOR_NETWORK_BOOT_PROTOCOL_IPV4 0x1 #define BDOOR_NETWORK_BOOT_PROTOCOL_IPV6 0x2 +#define BDOOR_SECUREBOOT_STATUS_DISABLED 0xFFFFFFFFUL +#define BDOOR_SECUREBOOT_STATUS_APPROVED 1 +#define BDOOR_SECUREBOOT_STATUS_DENIED 2 + /* High-bandwidth backdoor port. --hpreg */ #define BDOORHB_PORT 0x5659 - #define BDOORHB_CMD_MESSAGE 0 #define BDOORHB_CMD_VASSERT 1 #define BDOORHB_CMD_MAX 2 @@ -263,4 +291,31 @@ Backdoor_CmdRequiresFullyValidVCPU(unsigned cmd) } #endif +#ifdef VM_ARM_64 + +#define BDOOR_ARM64_LB_PORT (BDOOR_PORT) +#define BDOOR_ARM64_HB_PORT_IN (BDOORHB_PORT) +#define BDOOR_ARM64_HB_PORT_OUT (BDOORHB_PORT +1) + +#define BDOOR_ARG0 REG_X0 +#define BDOOR_ARG1 REG_X1 +#define BDOOR_ARG2 REG_X2 +#define BDOOR_ARG3 REG_X3 +#define BDOOR_ARG4 REG_X4 +#define BDOOR_ARG5 REG_X5 +#define BDOOR_ARG6 REG_X6 + +#else + +#define BDOOR_ARG0 REG_RAX +#define BDOOR_ARG1 REG_RBX +#define BDOOR_ARG2 REG_RCX +#define BDOOR_ARG3 REG_RDX +#define BDOOR_ARG4 REG_RSI +#define BDOOR_ARG5 REG_RDI +#define BDOOR_ARG6 REG_RBP + +#endif + + #endif diff --git a/open-vm-tools/lib/include/backdoor_types.h b/open-vm-tools/lib/include/backdoor_types.h index 3f772dee6..a2daf5313 100644 --- a/open-vm-tools/lib/include/backdoor_types.h +++ b/open-vm-tools/lib/include/backdoor_types.h @@ -64,10 +64,10 @@ } words; \ uint64 quad -#ifndef VM_X86_64 -#define DECLARE_REG_STRUCT DECLARE_REG32_STRUCT -#else +#if defined (VM_X86_64) || defined (VM_ARM_64) #define DECLARE_REG_STRUCT DECLARE_REG64_STRUCT +#else +#define DECLARE_REG_STRUCT DECLARE_REG32_STRUCT #endif #define DECLARE_REG_NAMED_STRUCT(_r) \ diff --git a/open-vm-tools/lib/include/buildNumber.h b/open-vm-tools/lib/include/buildNumber.h index 8febfc28d..e69de29bb 100644 --- a/open-vm-tools/lib/include/buildNumber.h +++ b/open-vm-tools/lib/include/buildNumber.h @@ -1,12 +0,0 @@ -#define BUILD_NUMBER \ - "build-3227872" -#define BUILD_NUMBER_NUMERIC \ - 3227872 -#define BUILD_NUMBER_NUMERIC_STRING \ - "3227872" -#define PRODUCT_BUILD_NUMBER \ - "product-build-52125" -#define PRODUCT_BUILD_NUMBER_NUMERIC \ - 52125 -#define PRODUCT_BUILD_NUMBER_NUMERIC_STRING \ - "52125" diff --git a/open-vm-tools/lib/include/circList.h b/open-vm-tools/lib/include/circList.h index d146dc2e5..da237efb1 100644 --- a/open-vm-tools/lib/include/circList.h +++ b/open-vm-tools/lib/include/circList.h @@ -39,68 +39,114 @@ typedef struct ListItem { struct ListItem *next; } ListItem; -/* A list with no elements is a null pointer. */ -#define LIST_ITEM_DEF(name) \ - ListItem * name = NULL -#define LIST_EMPTY(l) ((l) == NULL) - -/* initialize list item */ -#define INIT_LIST_ITEM(p) \ - do { \ - (p)->prev = (p)->next = (p); \ - } while (0) - -/* check if initialized */ -#define IS_LIST_ITEM_INITIALIZED(li) \ - (((li) == (li)->prev) && ((li) == (li)->next)) +/* + *---------------------------------------------------------------------- + * + * CircList_IsEmpty -- + * + * A NULL list is an empty list. + * + * Result: + * TRUE if list is empty, FALSE otherwise. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ -/* return first element in the list */ -#define LIST_FIRST(l) (l) -#define LIST_FIRST_CHK(l) (l) +static INLINE Bool +CircList_IsEmpty(const ListItem *item) // IN +{ + return item == NULL; +} -/* return last element in the list */ -#define LIST_LAST(l) ((l)->prev) -#define LIST_LAST_CHK(l) (LIST_EMPTY(l) ? NULL : LIST_LAST(l)) /* - * LIST_CONTAINER - get the struct for this entry (like list_entry) - * @ptr: the &struct ListItem pointer. - * @type: the type of the struct this is embedded in. - * @member: the name of the list struct within the struct. + *---------------------------------------------------------------------- + * + * CircList_InitItem -- + * + * Initialize item as a single-element circular list. + * + * Result: + * None. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- */ -#define LIST_CONTAINER(ptr, type, member) \ - VMW_CONTAINER_OF(ptr, type, member) -/* - * delete item from the list - */ -#define LIST_DEL DelListItem +static INLINE void +CircList_InitItem(ListItem *item) // OUT +{ + item->prev = item->next = item; +} -/* - * link two lists together - */ -#define LIST_SPLICE SpliceLists /* - * Split a list into two lists + *---------------------------------------------------------------------- + * + * CircList_First -- + * + * Return first item in the list. + * + * Result: + * First item. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- */ -#define LIST_SPLIT SplitLists -/* - * Add item to front of stack. List pointer points to new head. - */ -#define LIST_PUSH PushListItem +static INLINE ListItem * +CircList_First(ListItem *item) // IN +{ + return item; +} + /* - * Add item at back of queue. List pointer only changes if list was empty. + *---------------------------------------------------------------------- + * + * CircList_Last -- + * + * Return last item in the list. + * + * Result: + * Last item. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- */ -#define LIST_QUEUE QueueListItem + +static INLINE ListItem * +CircList_Last(ListItem *item) +{ + return item->prev; +} + /* - * Get the list size. + * CIRC_LIST_CONTAINER - get the struct for this entry (like list_entry) + * @ptr: the &struct ListItem pointer. + * @type: the type of the struct this is embedded in. + * @member: the name of the list struct within the struct. */ -#define LIST_SIZE GetListSize +#define CIRC_LIST_CONTAINER(ptr, type, member) \ + VMW_CONTAINER_OF(ptr, type, member) +/* + * Historical name, left here to reduce churn. + * TODO: remove, all LIST_CONTAINER uses should be + * VMW_CONTAINER_OF and stop depending on circList.h + * to provide the definition. + */ +#define LIST_CONTAINER(ptr, type, member) VMW_CONTAINER_OF(ptr, type, member) /* * LIST_SCAN_FROM scans the list from "from" up until "until". @@ -109,38 +155,32 @@ typedef struct ListItem { * "until" is the element where search should stop. * member is the field to use for the search - either "next" or "prev". */ -#define LIST_SCAN_FROM(p, from, until, member) \ +#define CIRC_LIST_SCAN_FROM(p, from, until, member) \ for (p = (from); (p) != NULL; \ (p) = (((p)->member == (until)) ? NULL : (p)->member)) /* scan the entire list (non-destructively) */ -#define LIST_SCAN(p, l) \ - LIST_SCAN_FROM(p, LIST_FIRST(l), LIST_FIRST(l), next) +#define CIRC_LIST_SCAN(p, l) \ + CIRC_LIST_SCAN_FROM(p, CircList_First(l), CircList_First(l), next) -/* scan a list backward from last element to first (non-destructively) */ -#define LIST_SCAN_BACK(p, l) \ - LIST_SCAN_FROM(p, LIST_LAST_CHK(l), LIST_LAST(l), prev) - /* scan the entire list where loop element may be destroyed */ -#define LIST_SCAN_SAFE(p, pn, l) \ - if (!LIST_EMPTY(l)) \ - for (p = (l), (pn) = NextListItem(p, l); (p) != NULL; \ - (p) = (pn), (pn) = NextListItem(p, l)) +#define CIRC_LIST_SCAN_SAFE(p, pn, l) \ + if (!CircList_IsEmpty(l)) \ + for (p = (l), (pn) = CircList_Next(p, l); (p) != NULL; \ + (p) = (pn), (pn) = CircList_Next(p, l)) /* scan the entire list backwards where loop element may be destroyed */ -#define LIST_SCAN_BACK_SAFE(p, pn, l) \ - if (!LIST_EMPTY(l)) \ - for (p = LIST_LAST(l), (pn) = PrevListItem(p, l); (p) != NULL; \ - (p) = (pn), (pn) = PrevListItem(p, l)) - +#define CIRC_LIST_SCAN_BACK_SAFE(p, pn, l) \ + if (!CircList_IsEmpty(l)) \ + for (p = CircList_Last(l), (pn) = CircList_Prev(p, l); (p) != NULL; \ + (p) = (pn), (pn) = CircList_Prev(p, l)) -/* function definitions */ /* *---------------------------------------------------------------------- * - * NextListItem -- + * CircList_Next -- * * Returns the next member of a doubly linked list, or NULL if last. * Assumes: p is member of the list headed by head. @@ -156,8 +196,8 @@ typedef struct ListItem { */ static INLINE ListItem * -NextListItem(ListItem *p, // IN - ListItem *head) // IN +CircList_Next(ListItem *p, // IN + ListItem *head) // IN { if (head == NULL || p == NULL) { return NULL; @@ -171,7 +211,7 @@ NextListItem(ListItem *p, // IN /* *---------------------------------------------------------------------- * - * PrevListItem -- + * CircList_Prev -- * * Returns the prev member of a doubly linked list, or NULL if first. * Assumes: p is member of the list headed by head. @@ -187,8 +227,8 @@ NextListItem(ListItem *p, // IN */ static INLINE ListItem * -PrevListItem(ListItem *p, // IN - ListItem *head) // IN +CircList_Prev(ListItem *p, // IN + ListItem *head) // IN { if (head == NULL || p == NULL) { return NULL; @@ -201,7 +241,7 @@ PrevListItem(ListItem *p, // IN /* *---------------------------------------------------------------------- * - * DelListItem -- + * CircList_DeleteItem -- * * Deletes a member of a doubly linked list, possibly modifies the * list header itself. @@ -217,8 +257,8 @@ PrevListItem(ListItem *p, // IN */ static INLINE void -DelListItem(ListItem *p, // IN - ListItem **headp) // IN/OUT +CircList_DeleteItem(ListItem *p, // IN + ListItem **headp) // IN/OUT { ListItem *next; @@ -241,7 +281,7 @@ DelListItem(ListItem *p, // IN /* *---------------------------------------------------------------------- * - * QueueListItem -- + * CircList_Queue -- * * Adds a new member to the back of a doubly linked list (queue) * Assumes neither p nor headp is null and p is not a member of *headp. @@ -256,14 +296,14 @@ DelListItem(ListItem *p, // IN */ static INLINE void -QueueListItem(ListItem *p, // IN - ListItem **headp) // IN/OUT +CircList_Queue(ListItem *p, // IN + ListItem **headp) // IN/OUT { ListItem *head; head = *headp; - if (LIST_EMPTY(head)) { - INIT_LIST_ITEM(p); + if (CircList_IsEmpty(head)) { + CircList_InitItem(p); *headp = p; } else { p->prev = head->prev; @@ -277,7 +317,7 @@ QueueListItem(ListItem *p, // IN /* *---------------------------------------------------------------------- * - * PushListItem -- + * CircList_Push -- * * Adds a new member to the front of a doubly linked list (stack) * Assumes neither p nor headp is null and p is not a member of *headp. @@ -292,10 +332,10 @@ QueueListItem(ListItem *p, // IN */ static INLINE void -PushListItem(ListItem *p, // IN - ListItem **headp) // IN/OUT +CircList_Push(ListItem *p, // IN + ListItem **headp) // IN/OUT { - QueueListItem(p, headp); + CircList_Queue(p, headp); *headp = p; } @@ -303,7 +343,7 @@ PushListItem(ListItem *p, // IN /* *---------------------------------------------------------------------- * - * SpliceLists -- + * CircList_Splice -- * * Make a single list {l1 l2} from {l1} and {l2} and return it. * It is okay for one or both lists to be NULL. @@ -320,16 +360,16 @@ PushListItem(ListItem *p, // IN */ static INLINE ListItem * -SpliceLists(ListItem *l1, // IN - ListItem *l2) // IN +CircList_Splice(ListItem *l1, // IN + ListItem *l2) // IN { ListItem *l1Last, *l2Last; - if (LIST_EMPTY(l1)) { + if (CircList_IsEmpty(l1)) { return l2; } - if (LIST_EMPTY(l2)) { + if (CircList_IsEmpty(l2)) { return l1; } @@ -349,10 +389,11 @@ SpliceLists(ListItem *l1, // IN } +#if 0 /* Presently unused, enable if a use is found */ /* *---------------------------------------------------------------------- * - * SplitLists -- + * CircList_Split -- * * Make a list l = {l1 l2} into two separate lists {l1} and {l2}, where: * l = { ... x -> p -> ... } split into: @@ -372,14 +413,14 @@ SpliceLists(ListItem *l1, // IN */ static INLINE void -SplitLists(ListItem *p, // IN - ListItem *l, // IN - ListItem **l1p, // OUT - ListItem **l2p) // OUT +CircList_Split(ListItem *p, // IN + ListItem *l, // IN + ListItem **l1p, // OUT + ListItem **l2p) // OUT { ListItem *last; - if (p == LIST_FIRST(l)) { /* first element */ + if (p == CircList_First(l)) { /* first element */ *l1p = NULL; *l2p = l; return; @@ -395,12 +436,13 @@ SplitLists(ListItem *p, // IN p->prev = last; last->next = p; } +#endif /* *---------------------------------------------------------------------- * - * GetListSize -- + * CircList_Size -- * * Return the number of items in the list. * @@ -414,12 +456,12 @@ SplitLists(ListItem *p, // IN */ static INLINE int -GetListSize(ListItem *head) // IN +CircList_Size(ListItem *head) // IN { ListItem *li; int ret = 0; - LIST_SCAN(li, head) { + CIRC_LIST_SCAN(li, head) { ret++; } return ret; diff --git a/open-vm-tools/lib/include/clamped.h b/open-vm-tools/lib/include/clamped.h index 8d7e99fc6..1f49518cd 100644 --- a/open-vm-tools/lib/include/clamped.h +++ b/open-vm-tools/lib/include/clamped.h @@ -111,6 +111,39 @@ Clamped_S64To32(int32 *out, // OUT } +/* + *----------------------------------------------------------------------------- + * + * Clamped_S32To16 -- + * + * Convert signed 32-bit to 16-bit, clamping instead of truncating. + * + * Results: + * On success, returns TRUE. If the result would have overflowed + * and we clamped it to MAX_INT16 or MIN_INT16, returns FALSE. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +static INLINE Bool +Clamped_S32To16(int16 *out, // OUT + int32 a) // IN +{ + int16 clamped = (int16)a; + + if (UNLIKELY(a != clamped)) { + *out = a < 0 ? MIN_INT16 : MAX_INT16; + return FALSE; + } + + *out = clamped; + return TRUE; +} + + /* *---------------------------------------------------------------------- * diff --git a/open-vm-tools/lib/include/codeset.h b/open-vm-tools/lib/include/codeset.h index a039d83c1..f2d8d65e0 100644 --- a/open-vm-tools/lib/include/codeset.h +++ b/open-vm-tools/lib/include/codeset.h @@ -383,6 +383,10 @@ int CodeSet_GetUtf8(const char *string, // IN: const char *end, // IN: uint32 *uchar); // OUT/OPT: +Bool CodeSet_IsValidUTF8(const char *bufIn, // IN: + size_t sizeIn); // IN: + +Bool CodeSet_IsStringValidUTF8(const char *string); // IN: /* *----------------------------------------------------------------------------- diff --git a/open-vm-tools/lib/include/config.h b/open-vm-tools/lib/include/config.h index b78767f1b..57c3bb58f 100644 --- a/open-vm-tools/lib/include/config.h +++ b/open-vm-tools/lib/include/config.h @@ -42,14 +42,19 @@ void Config_SetString(const char *value, const char *fmt, ...) PRINTF_DECL(2, 3); void Config_SetStringPlain(const char *value, const char *fmt, ...) PRINTF_DECL(2, 3); +void Config_SetStringSecure(const char *value, + const char *fmt, ...) PRINTF_DECL(2, 3); void Config_SetBool(Bool value, const char *fmt, ...) PRINTF_DECL(2, 3); void Config_SetBoolPlain(Bool value, const char *fmt, ...) PRINTF_DECL(2, 3); +void Config_SetBoolSecure(Bool value, const char *fmt, ...) PRINTF_DECL(2, 3); void Config_SetLong(int32 value, const char *fmt, ...) PRINTF_DECL(2, 3); void Config_SetInt64(int64 value, const char *fmt, ...) PRINTF_DECL(2, 3); void Config_SetLongPlain(int32 value, const char *fmt, ...) PRINTF_DECL(2, 3); +void Config_SetLongSecure(int32 value, + const char *fmt, ...) PRINTF_DECL(2, 3); void Config_SetDouble(double value, const char *fmt, ...) PRINTF_DECL(2, 3); @@ -57,6 +62,8 @@ char *Config_GetString(const char *defaultValue, const char *fmt, ...) PRINTF_DECL(2, 3); char *Config_GetStringPlain(const char *defaultValue, const char *fmt, ...) PRINTF_DECL(2, 3); +char *Config_GetStringSecure(const char *defaultValue, + const char *fmt, ...) PRINTF_DECL(2, 3); char *Config_GetAsString(const char *fmt, ...) PRINTF_DECL(1, 2); char *Config_GetStringEnum(const char *defaultValue, const char **choices, @@ -70,12 +77,16 @@ Bool Config_GetBool(Bool defaultValue, const char *fmt, ...) PRINTF_DECL(2, 3); Bool Config_GetBoolPlain(Bool defaultValue, const char *fmt, ...) PRINTF_DECL(2, 3); +Bool Config_GetBoolSecure(Bool defaultValue, + const char *fmt, ...) PRINTF_DECL(2, 3); int32 Config_GetLong(int32 defaultValue, const char *fmt, ...) PRINTF_DECL(2, 3); int64 Config_GetInt64(int64 defaultValue, const char *fmt, ...) PRINTF_DECL(2, 3); int32 Config_GetLongPlain(int32 defaultValue, const char *fmt, ...) PRINTF_DECL(2, 3); +int32 Config_GetLongSecure(int32 defaultValue, + const char *fmt, ...) PRINTF_DECL(2, 3); int32 Config_GetTriState(int32 defaultValue, const char *fmt, ...) PRINTF_DECL(2, 3); double Config_GetDouble(double defaultValue, diff --git a/open-vm-tools/lib/include/cryptoError.h b/open-vm-tools/lib/include/cryptoError.h index ca643eaa3..57b03c041 100644 --- a/open-vm-tools/lib/include/cryptoError.h +++ b/open-vm-tools/lib/include/cryptoError.h @@ -26,6 +26,7 @@ #define VMWARE_CRYPTOERROR_H 1 #define INCLUDE_ALLOW_USERLEVEL +#define INCLUDE_ALLOW_VMCORE #include "includeCheck.h" #include "vmware.h" diff --git a/open-vm-tools/lib/include/deployPkg/linuxDeployment.h b/open-vm-tools/lib/include/deployPkg/linuxDeployment.h index 06c229401..cfa9a87ae 100644 --- a/open-vm-tools/lib/include/deployPkg/linuxDeployment.h +++ b/open-vm-tools/lib/include/deployPkg/linuxDeployment.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -17,7 +17,9 @@ *********************************************************/ /* - * linuxDeployment.h : C interface to package deployment + * linuxDeployment.h -- + * + * C interface to package deployment. */ #ifndef LINUX_DEPLOYMENT_H @@ -28,33 +30,57 @@ #include "imgcust-common/log.h" #include "imgcust-common/imgcust-api.h" -/** - * Give the deploy package an application specific logger. + +/* + *------------------------------------------------------------------------------ + * + * DeployPkg_SetLogger -- + * + * Give the deploy package an application specific logger. * * @param logger [in] logger to be used for deploy operation + * + *------------------------------------------------------------------------------ */ + IMGCUST_API void DeployPkg_SetLogger(LogFunction log); -/** - * C-style wrapper to decode a package from a file, extract its payload, - * expand the payload into a temporary directory, and then execute - * the command specified in the package. + +/* + *------------------------------------------------------------------------------ + * + * DeployPkg_DeployPackageFromFile -- + * + * C-style wrapper to decode a package from a file, extract its payload, + * expand the payload into a temporary directory, and then execute + * the command specified in the package. * * @param file IN: the package file * @return 0 on success + * + *------------------------------------------------------------------------------ */ + IMGCUST_API int DeployPkg_DeployPackageFromFile(const char* file); -/** - * C-style wrapper to extract a package from a file using libmspack. + +/* + *------------------------------------------------------------------------------ + * + * ExtractCabPackage -- + * + * C-style wrapper to extract a package from a file using libmspack. * * @param[in] cabFileName the Cabinet file's path * @param[in] destDir a destination directory where to uncab * * @return TRUE on success, otherwise - FALSE. + * + *------------------------------------------------------------------------------ */ + IMGCUST_API Bool ExtractCabPackage(const char* cabFileName, const char* destDir); diff --git a/open-vm-tools/lib/include/dynbuf.h b/open-vm-tools/lib/include/dynbuf.h index 9b626d2af..5c3eebf76 100644 --- a/open-vm-tools/lib/include/dynbuf.h +++ b/open-vm-tools/lib/include/dynbuf.h @@ -227,7 +227,7 @@ DynBuf_AppendString(DynBuf *buf, // IN/OUT const char *string) // IN { /* - * Make sure to copy the NULL. + * Make sure to copy the NUL. */ return DynBuf_Append(buf, string, strlen(string) + 1); } diff --git a/open-vm-tools/lib/include/file.h b/open-vm-tools/lib/include/file.h index b7bdf1be4..7ca6c0160 100644 --- a/open-vm-tools/lib/include/file.h +++ b/open-vm-tools/lib/include/file.h @@ -137,6 +137,8 @@ Bool File_SupportsZeroedThick(const char *pathName); Bool File_SupportsMultiWriter(const char *pathName); +Bool File_SupportsOptimisticLock(const char *pathName); + Bool File_SupportsMandatoryLock(const char *pathName); Bool File_Exists(const char *pathName); @@ -188,6 +190,10 @@ int File_ListDirectory(const char *pathName, Bool File_IsOsfsVolumeEmpty(const char *pathName); +#ifndef _WIN32 +char * File_StripFwdSlashes(const char *pathName); +#endif + /* * Simple file-system walk. */ diff --git a/open-vm-tools/lib/include/guestStats.h b/open-vm-tools/lib/include/guestStats.h index 2e6a34334..1db57a49c 100644 --- a/open-vm-tools/lib/include/guestStats.h +++ b/open-vm-tools/lib/include/guestStats.h @@ -49,7 +49,9 @@ #define GUESTMEMINFO_V5 5 /* - * Flags for legacy GuestMemInfo + * Flags for GuestMemInfoLegacy + * + * !!! DON'T ADD/CHANGE FLAGS !!! * * This is deprecated. All new values are returned via a GuestStat list. */ @@ -67,16 +69,19 @@ #define MEMINFO_HUGEPAGESTOTAL (1 << 10) #define MEMINFO_DEPRECATED10 (1 << 11) #define MEMINFO_DEPRECATED11 (1 << 12) +#define MEMINFO_MEMNEEDED (1 << 13) /* * Legacy GuestMemInfo structure. * + * !!! DON'T CHANGE IT !!! + * * It should stay the same to ensure binary compatibility. */ typedef #include "vmware_pack_begin.h" -struct GuestMemInfo { +struct GuestMemInfoLegacy { uint32 version; ///< MemInfo structure version. uint32 flags; ///< Indicates which stats are valid. uint64 memTotal; ///< Total physical memory in Kb. @@ -85,7 +90,7 @@ struct GuestMemInfo { uint64 deprecated2[2]; ///< No longer used. } #include "vmware_pack_end.h" -GuestMemInfo; +GuestMemInfoLegacy; /* * A stat begins with a header. The header has a mask which says what data @@ -239,7 +244,7 @@ typedef enum { /* * Defined stat IDs for guest tools builtin query. - * See vmx/vigorapi/GuestStats.java for documentation + * See vmx/vigorapi/guestStats.java for documentation * * NOTE: These IDs are relative to GUEST_TOOLS_NAMESPACE * NOTE: DO NOT re-order or remove the IDs. IDs can only be added to the end, @@ -247,6 +252,7 @@ typedef enum { * of bumping the namespace version. */ #define GUEST_STAT_TOOLS_IDS \ + /* 2015u1 stats */ \ DEFINE_GUEST_STAT(GuestStatID_Invalid, 0, "__INVALID__") \ DEFINE_GUEST_STAT(GuestStatID_None, 1, "__NONE__") \ DEFINE_GUEST_STAT(GuestStatID_ContextSwapRate, 2, "guest.contextSwapRate") \ @@ -260,7 +266,56 @@ typedef enum { DEFINE_GUEST_STAT(GuestStatID_PhysicalPageSize, 10, "guest.page.size") \ DEFINE_GUEST_STAT(GuestStatID_HugePageSize, 11, "guest.hugePage.size") \ DEFINE_GUEST_STAT(GuestStatID_Linux_HugePagesTotal, 12, "guest.hugePage.total") \ - DEFINE_GUEST_STAT(GuestStatID_Max, 13, "__MAX__") + /* 2016 stats */ \ + DEFINE_GUEST_STAT(GuestStatID_MemNeededReservation, 13, "guest.mem.neededReservation") \ + DEFINE_GUEST_STAT(GuestStatID_PageSwapInRate, 14, "guest.swap.pageInRate") \ + DEFINE_GUEST_STAT(GuestStatID_PageSwapOutRate, 15, "guest.swap.pageOutRate") \ + DEFINE_GUEST_STAT(GuestStatID_ProcessCreationRate, 16, "guest.processCreationRate") \ + DEFINE_GUEST_STAT(GuestStatID_SwapSpaceUsed, 17, "guest.swap.used") \ + DEFINE_GUEST_STAT(GuestStatID_SwapFilesCurrent, 18, "guest.swap.filesCurrent") \ + DEFINE_GUEST_STAT(GuestStatID_SwapFilesMax, 19, "guest.swap.filesMax") \ + DEFINE_GUEST_STAT(GuestStatID_ThreadCreationRate, 20, "guest.threadCreationRate") \ + DEFINE_GUEST_STAT(GuestStatID_Linux_HugePagesFree, 21, "guest.hugePage.free") \ + DEFINE_GUEST_STAT(GuestStatID_Linux_LowWaterMark, 22, "guest.mem.lowWaterMark") \ + DEFINE_GUEST_STAT(GuestStatID_Linux_MemActive, 23, "guest.mem.active") \ + DEFINE_GUEST_STAT(GuestStatID_Linux_MemActiveAnon, 24, "guest.mem.activeAnon") \ + DEFINE_GUEST_STAT(GuestStatID_Linux_MemAvailable, 25, "guest.mem.available") \ + DEFINE_GUEST_STAT(GuestStatID_Linux_MemBuffers, 26, "guest.mem.buffers") \ + DEFINE_GUEST_STAT(GuestStatID_Linux_MemCached, 27, "guest.mem.cached") \ + DEFINE_GUEST_STAT(GuestStatID_Linux_MemCommitted, 28, "guest.mem.committed") \ + DEFINE_GUEST_STAT(GuestStatID_Linux_MemDirty, 29, "guest.mem.dirty") \ + DEFINE_GUEST_STAT(GuestStatID_Linux_MemInactive, 30, "guest.mem.inactive") \ + DEFINE_GUEST_STAT(GuestStatID_Linux_MemInactiveAnon, 31, "guest.mem.inactiveAnon") \ + DEFINE_GUEST_STAT(GuestStatID_Linux_MemInactiveFile, 32, "guest.mem.inactiveFile") \ + DEFINE_GUEST_STAT(GuestStatID_Linux_MemPinned, 33, "guest.mem.pinned") \ + DEFINE_GUEST_STAT(GuestStatID_Linux_MemSlabReclaim, 34, "guest.mem.slabReclaim") \ + DEFINE_GUEST_STAT(GuestStatID_Linux_MemSwapCached, 35, "guest.mem.swap.cached") \ + DEFINE_GUEST_STAT(GuestStatID_Linux_PageDirectScanRate, 36, "guest.page.directScanRate") \ + DEFINE_GUEST_STAT(GuestStatID_Linux_PageFaultRate, 37, "guest.page.faultRate") \ + DEFINE_GUEST_STAT(GuestStatID_Linux_PageFreeRate, 38, "guest.page.freeRate") \ + DEFINE_GUEST_STAT(GuestStatID_Linux_PageMajorFaultRate, 39, "guest.page.majorFaultRate") \ + DEFINE_GUEST_STAT(GuestStatID_Linux_PageStealRate, 40, "guest.page.stealRate") \ + DEFINE_GUEST_STAT(GuestStatID_Linux_PageSwapScanRate, 41, "guest.page.swapScanRate") \ + DEFINE_GUEST_STAT(GuestStatID_Linux_Swappiness, 42, "guest.swappiness") \ + DEFINE_GUEST_STAT(GuestStatID_Windows_MemModifiedPages, 43, "guest.mem.modifiedPages") \ + DEFINE_GUEST_STAT(GuestStatID_Windows_MemAvailableToMm, 44, "guest.mem.availableToMm") \ + DEFINE_GUEST_STAT(GuestStatID_Windows_MemStandbyCore, 45, "guest.mem.standby.core") \ + DEFINE_GUEST_STAT(GuestStatID_Windows_MemStandbyNormal, 46, "guest.mem.standby.normal") \ + DEFINE_GUEST_STAT(GuestStatID_Windows_MemStandbyReserve, 47, "guest.mem.standby.reserve") \ + DEFINE_GUEST_STAT(GuestStatID_Windows_MemPagedPoolResident, 48, "guest.mem.pagedPool.resident") \ + DEFINE_GUEST_STAT(GuestStatID_Windows_MemSystemCodeResident, 49, "guest.system.codeResident") \ + DEFINE_GUEST_STAT(GuestStatID_Windows_MemSystemDriverResident, 50, "guest.system.driverResident") \ + DEFINE_GUEST_STAT(GuestStatID_Windows_MemNonPagedPool, 51, "guest.mem.nonPagedPool.size") \ + DEFINE_GUEST_STAT(GuestStatID_Windows_MemCache, 52, "guest.mem.cache") \ + DEFINE_GUEST_STAT(GuestStatID_Windows_FreeSystemPtes, 53, "guest.system.freePtes") \ + DEFINE_GUEST_STAT(GuestStatID_Windows_MemCommitLimit, 54, "guest.mem.commitLimit") \ + DEFINE_GUEST_STAT(GuestStatID_Windows_MemCommitted, 55, "guest.mem.committed") \ + DEFINE_GUEST_STAT(GuestStatID_Windows_MemPrivateWorkingSet, 56, "guest.mem.privateWorkingSet") \ + DEFINE_GUEST_STAT(GuestStatID_Windows_DiskReadRate, 57, "guest.disk.readRate") \ + DEFINE_GUEST_STAT(GuestStatID_Windows_DiskWriteRate, 58, "guest.disk.writeRate") \ + DEFINE_GUEST_STAT(GuestStatID_Windows_AutomaticSwapFileMax, 59, "guest.swap.automaticFileMax") \ + DEFINE_GUEST_STAT(GuestStatID_Linux_MemTotal, 60, "guest.mem.total") \ + DEFINE_GUEST_STAT(GuestStatID_Max, 61, "__MAX__") /* * Define stats enumeration diff --git a/open-vm-tools/lib/include/guest_os.h b/open-vm-tools/lib/include/guest_os.h index d5d190a8b..d9edf373d 100644 --- a/open-vm-tools/lib/include/guest_os.h +++ b/open-vm-tools/lib/include/guest_os.h @@ -24,6 +24,7 @@ #define INCLUDE_ALLOW_VMCORE #include "includeCheck.h" +#include "vm_basic_types.h" #include "guest_os_tables.h" /* @@ -154,15 +155,23 @@ Bool Gos_InSetArray(uint32 gos, const uint32 *set); BS(SOLARIS9), BS(SOLARIS10), \ BS(SOLARIS10_64) #define ALLSOLARIS10 BS(SOLARIS10), BS(SOLARIS10_64) + #define ALLNETWARE BS(NETWARE4), BS(NETWARE5), BS(NETWARE6) -#define ALL26XLINUX32 BS(OTHER26XLINUX), BS(DEBIAN45), \ - BS(RHEL), BS(UBUNTU) -#define ALL26XLINUX64 BS(OTHER26XLINUX_64), BS(DEBIAN45_64), \ - BS(RHEL_64) -#define ALL3XLINUX32 BS(OTHER3XLINUX) -#define ALL3XLINUX64 BS(OTHER3XLINUX_64), BS(PHOTON_64) -#define ALLVMKERNEL BS(VMKERNEL), BS(VMKERNEL5), BS(VMKERNEL6) +#define ALL26XLINUX32 BS(OTHER26XLINUX), BS(DEBIAN), BS(RHEL), \ + BS(UBUNTU), BS(CENTOS), BS(ORACLE) + +#define ALL26XLINUX64 BS(OTHER26XLINUX_64), BS(DEBIAN_64), \ + BS(RHEL_64), BS(CENTOS_64), BS(ORACLE_64) + +#define ALL3XLINUX32 BS(OTHER3XLINUX), BS(CENTOS6), BS(ORACLE6) + +#define ALL3XLINUX64 BS(OTHER3XLINUX_64), BS(PHOTON_64), \ + BS(CENTOS6_64), BS(CENTOS7_64), \ + BS(ORACLE6_64), BS(ORACLE7_64) + +#define ALLVMKERNEL BS(VMKERNEL), BS(VMKERNEL5), BS(VMKERNEL6), \ + BS(VMKERNEL65) #define ALLLINUX32 BS(OTHER24XLINUX), ALL26XLINUX32, ALL3XLINUX32, \ BS(OTHERLINUX), BS(VMKERNEL) @@ -172,7 +181,8 @@ Bool Gos_InSetArray(uint32 gos, const uint32 *set); #define ALLDARWIN32 BS(DARWIN9), BS(DARWIN10), BS(DARWIN11) #define ALLDARWIN64 BS(DARWIN9_64), BS(DARWIN10_64), \ BS(DARWIN11_64), BS(DARWIN12_64), \ - BS(DARWIN13_64), BS(DARWIN14_64) + BS(DARWIN13_64), BS(DARWIN14_64), \ + BS(DARWIN15_64), BS(DARWIN16_64) #define ALLDARWIN ALLDARWIN32, ALLDARWIN64 #define ALL64 ALLWIN64, ALLLINUX64, BS(SOLARIS10_64), \ BS(FREEBSD_64), ALLDARWIN64, \ @@ -187,9 +197,10 @@ Bool Gos_InSetArray(uint32 gos, const uint32 *set); */ /* vmkernel (ESX) */ -#define STR_OS_ESX_4 "VMware ESX 4" -#define STR_OS_ESX_5 "VMware ESX 5" -#define STR_OS_ESX_6 "VMware ESX 6" +#define STR_OS_ESX_4 "VMware ESX/ESXi 4.x" +#define STR_OS_ESX_5 "VMware ESXi 5.x" +#define STR_OS_ESX_6 "VMware ESXi 6.0" +#define STR_OS_ESX_65 "VMware ESXi 6.5" /* Linux */ #define STR_OS_ANNVIX "Annvix" @@ -198,6 +209,7 @@ Bool Gos_InSetArray(uint32 gos, const uint32 *set); #define STR_OS_ASIANUX_3 "asianux3" #define STR_OS_ASIANUX_4 "asianux4" #define STR_OS_ASIANUX_5 "asianux5" +#define STR_OS_ASIANUX_7 "asianux7" #define STR_OS_AUROX "Aurox" #define STR_OS_ASIANUX "asianux" #define STR_OS_BLACKCAT "BlackCat" @@ -211,6 +223,8 @@ Bool Gos_InSetArray(uint32 gos, const uint32 *set); #define STR_OS_DEBIAN_7 "debian7" #define STR_OS_DEBIAN_7_1 "debian7" #define STR_OS_DEBIAN_8 "debian8" +#define STR_OS_DEBIAN_9 "debian9" +#define STR_OS_DEBIAN_10 "debian10" #define STR_OS_FEDORA "Fedora" #define STR_OS_GENTOO "Gentoo" #define STR_OS_IMMUNIX "Immunix" @@ -226,15 +240,15 @@ Bool Gos_InSetArray(uint32 gos, const uint32 *set); #define STR_OS_NOVELL_FULL "Novell Linux Desktop 9" #define STR_OS_ORACLE "oraclelinux" #define STR_OS_OTHER "otherlinux" +#define STR_OS_OTHER_FULL "Other Linux" #define STR_OS_OTHER_24 "other24xlinux" #define STR_OS_OTHER_24_FULL "Other Linux 2.4.x kernel" #define STR_OS_OTHER_26 "other26xlinux" #define STR_OS_OTHER_26_FULL "Other Linux 2.6.x kernel" #define STR_OS_OTHER_3X "other3xlinux" #define STR_OS_OTHER_3X_FULL "Other Linux 3.x kernel" -#define STR_OS_OTHER_FULL "Other Linux" #define STR_OS_PHOTON "vmware-photon" -#define STR_OS_PHOTON_FULL "VMware Photon" +#define STR_OS_PHOTON_FULL "VMware Photon OS" #define STR_OS_PLD "PLD" #define STR_OS_RED_HAT "redhat" #define STR_OS_RED_HAT_EN "rhel" diff --git a/open-vm-tools/lib/include/guest_os_tables.h b/open-vm-tools/lib/include/guest_os_tables.h index 9449035de..c0c0eef1d 100644 --- a/open-vm-tools/lib/include/guest_os_tables.h +++ b/open-vm-tools/lib/include/guest_os_tables.h @@ -58,15 +58,15 @@ GOT(GUEST_OS_OTHER24XLINUX_64) \ GOT(GUEST_OS_OTHER26XLINUX) \ GOT(GUEST_OS_OTHER26XLINUX_64) \ - GOT(GUEST_OS_OTHER3XLINUX) \ - GOT(GUEST_OS_OTHER3XLINUX_64) \ + GOT(GUEST_OS_OTHER3XLINUX) /* Linux 3.x and later */ \ + GOT(GUEST_OS_OTHER3XLINUX_64) /* Linux 3.x and later X64 */ \ GOT(GUEST_OS_OTHERLINUX) \ GOT(GUEST_OS_OTHERLINUX_64) \ GOT(GUEST_OS_OTHER) \ GOT(GUEST_OS_OTHER_64) \ GOT(GUEST_OS_UBUNTU) \ - GOT(GUEST_OS_DEBIAN45) \ - GOT(GUEST_OS_DEBIAN45_64) \ + GOT(GUEST_OS_DEBIAN) \ + GOT(GUEST_OS_DEBIAN_64) \ GOT(GUEST_OS_RHEL) \ GOT(GUEST_OS_RHEL_64) \ GOT(GUEST_OS_FREEBSD) \ @@ -86,6 +86,8 @@ GOT(GUEST_OS_DARWIN12_64) /* Mac OS 10.8 */ \ GOT(GUEST_OS_DARWIN13_64) /* Mac OS 10.9 */ \ GOT(GUEST_OS_DARWIN14_64) /* Mac OS 10.10 */ \ + GOT(GUEST_OS_DARWIN15_64) /* Mac OS 10.11 */ \ + GOT(GUEST_OS_DARWIN16_64) /* Mac OS 10.12 */ \ GOT(GUEST_OS_OPENSERVER_5_AND_6) \ GOT(GUEST_OS_UNIXWARE7) \ GOT(GUEST_OS_NETWARE4) \ @@ -93,172 +95,197 @@ GOT(GUEST_OS_NETWARE6) \ GOT(GUEST_OS_VMKERNEL) /* ESX 4.x */ \ GOT(GUEST_OS_VMKERNEL5) /* ESX 5.x */ \ - GOT(GUEST_OS_VMKERNEL6) /* ESX 6.x and later */ \ + GOT(GUEST_OS_VMKERNEL6) /* ESX 6 */ \ + GOT(GUEST_OS_VMKERNEL65) /* ESX 6.5 and later */ \ GOT(GUEST_OS_PHOTON_64) /* VMware Photon IA 64-bit */ \ + GOT(GUEST_OS_ORACLE) \ + GOT(GUEST_OS_ORACLE_64) \ + GOT(GUEST_OS_ORACLE6) \ + GOT(GUEST_OS_ORACLE6_64) \ + GOT(GUEST_OS_ORACLE7_64) \ + GOT(GUEST_OS_CENTOS) \ + GOT(GUEST_OS_CENTOS_64) \ + GOT(GUEST_OS_CENTOS6) \ + GOT(GUEST_OS_CENTOS6_64) \ + GOT(GUEST_OS_CENTOS7_64) \ /* This list must be sorted alphabetically (non-case-sensitive) by gos name. */ -#define GUEST_OS_LIST_GEN \ - GOSL(STR_OS_ASIANUX_3, GUEST_OS_OTHER26XLINUX) \ - GOSL(STR_OS_ASIANUX_3 "-64", GUEST_OS_OTHER26XLINUX_64) \ - GOSL(STR_OS_ASIANUX_4, GUEST_OS_OTHER26XLINUX) \ - GOSL(STR_OS_ASIANUX_4 "-64", GUEST_OS_OTHER26XLINUX_64) \ - GOSL(STR_OS_ASIANUX_5 "-64", GUEST_OS_OTHER26XLINUX_64) \ - GOSL(STR_OS_CENTOS, GUEST_OS_OTHER26XLINUX) \ - GOSL(STR_OS_CENTOS "-64", GUEST_OS_OTHER26XLINUX_64) \ - GOSL("coreos-64", GUEST_OS_OTHER3XLINUX_64) \ - GOSL(STR_OS_MACOS, GUEST_OS_DARWIN9) \ - GOSL(STR_OS_MACOS "-64", GUEST_OS_DARWIN9_64) \ - GOSL(STR_OS_MACOS "10", GUEST_OS_DARWIN10) \ - GOSL(STR_OS_MACOS "10-64", GUEST_OS_DARWIN10_64) \ - GOSL(STR_OS_MACOS "11", GUEST_OS_DARWIN11) \ - GOSL(STR_OS_MACOS "11-64", GUEST_OS_DARWIN11_64) \ - GOSL(STR_OS_MACOS "12-64", GUEST_OS_DARWIN12_64) \ - GOSL(STR_OS_MACOS "13-64", GUEST_OS_DARWIN13_64) \ - GOSL(STR_OS_MACOS "14-64", GUEST_OS_DARWIN14_64) \ - GOSL(STR_OS_DEBIAN_4, GUEST_OS_DEBIAN45) \ - GOSL(STR_OS_DEBIAN_4 "-64", GUEST_OS_DEBIAN45_64) \ - GOSL(STR_OS_DEBIAN_5, GUEST_OS_DEBIAN45) \ - GOSL(STR_OS_DEBIAN_5 "-64", GUEST_OS_DEBIAN45_64) \ - GOSL(STR_OS_DEBIAN_6, GUEST_OS_DEBIAN45) \ - GOSL(STR_OS_DEBIAN_6 "-64", GUEST_OS_DEBIAN45_64) \ - GOSL(STR_OS_DEBIAN_7, GUEST_OS_DEBIAN45) \ - GOSL(STR_OS_DEBIAN_7 "-64", GUEST_OS_DEBIAN45_64) \ - GOSL(STR_OS_DEBIAN_8, GUEST_OS_DEBIAN45) \ - GOSL(STR_OS_DEBIAN_8 "-64", GUEST_OS_DEBIAN45_64) \ - GOSL("dos", GUEST_OS_DOS) \ - GOSL(STR_OS_ECOMSTATION, GUEST_OS_ECOMSTATION) \ - GOSL(STR_OS_ECOMSTATION "2", GUEST_OS_ECOMSTATION2) \ - GOSL("fedora", GUEST_OS_OTHER26XLINUX) \ - GOSL("fedora-64", GUEST_OS_OTHER26XLINUX_64) \ - GOSL("freeBSD", GUEST_OS_FREEBSD) \ - GOSL("freeBSD-64", GUEST_OS_FREEBSD_64) \ - GOSL("linux", GUEST_OS_OTHERLINUX) /* old */ \ - GOSL(STR_OS_WIN_LONG, GUEST_OS_LONGHORN) \ - GOSL("longhorn-64", GUEST_OS_LONGHORN_64) \ - GOSL(STR_OS_MANDRAKE, GUEST_OS_OTHER26XLINUX) \ - GOSL(STR_OS_MANDRAKE "-64", GUEST_OS_OTHER26XLINUX_64) \ - GOSL(STR_OS_MANDRIVA, GUEST_OS_OTHER26XLINUX) \ - GOSL(STR_OS_MANDRIVA "-64", GUEST_OS_OTHER26XLINUX_64) \ - GOSL("netware4", GUEST_OS_NETWARE4) \ - GOSL("netware5", GUEST_OS_NETWARE5) \ - GOSL("netware6", GUEST_OS_NETWARE6) \ - GOSL(STR_OS_NOVELL, GUEST_OS_OTHER26XLINUX) \ - GOSL("nt4", GUEST_OS_WINNT) /* old */ \ - GOSL("oes", GUEST_OS_OTHER26XLINUX) \ - GOSL("openserver5", GUEST_OS_OPENSERVER_5_AND_6) \ - GOSL("openserver6", GUEST_OS_OPENSERVER_5_AND_6) \ - GOSL(STR_OS_OPENSUSE, GUEST_OS_OTHER26XLINUX) \ - GOSL(STR_OS_OPENSUSE "-64", GUEST_OS_OTHER26XLINUX_64) \ - GOSL(STR_OS_ORACLE, GUEST_OS_OTHER26XLINUX) \ - GOSL(STR_OS_ORACLE "-64", GUEST_OS_OTHER26XLINUX_64) \ - GOSL("os2", GUEST_OS_OS2) \ - GOSL("os2experimental", GUEST_OS_OS2) \ - GOSL("other", GUEST_OS_OTHER) \ - GOSL("other-64", GUEST_OS_OTHER_64) \ - GOSL(STR_OS_OTHER_24, GUEST_OS_OTHER24XLINUX) \ - GOSL(STR_OS_OTHER_24 "-64", GUEST_OS_OTHER24XLINUX_64) \ - GOSL(STR_OS_OTHER_26, GUEST_OS_OTHER26XLINUX) \ - GOSL(STR_OS_OTHER_26 "-64", GUEST_OS_OTHER26XLINUX_64) \ - GOSL(STR_OS_OTHER_3X, GUEST_OS_OTHER3XLINUX) \ - GOSL(STR_OS_OTHER_3X "-64", GUEST_OS_OTHER3XLINUX_64) \ - GOSL(STR_OS_OTHER, GUEST_OS_OTHERLINUX) \ - GOSL(STR_OS_OTHER "-64", GUEST_OS_OTHERLINUX_64) \ - GOSL(STR_OS_RED_HAT, GUEST_OS_OTHER26XLINUX) \ - GOSL(STR_OS_RED_HAT_EN "2", GUEST_OS_OTHER24XLINUX) \ - GOSL(STR_OS_RED_HAT_EN "3", GUEST_OS_OTHER24XLINUX) \ - GOSL(STR_OS_RED_HAT_EN "3-64", GUEST_OS_OTHER24XLINUX_64) \ - GOSL(STR_OS_RED_HAT_EN "4", GUEST_OS_OTHER26XLINUX) \ - GOSL(STR_OS_RED_HAT_EN "4-64", GUEST_OS_OTHER26XLINUX_64) \ - GOSL(STR_OS_RED_HAT_EN "5", GUEST_OS_OTHER26XLINUX) \ - GOSL(STR_OS_RED_HAT_EN "5-64", GUEST_OS_OTHER26XLINUX_64) \ - GOSL(STR_OS_RED_HAT_EN "6", GUEST_OS_RHEL) \ - GOSL(STR_OS_RED_HAT_EN "6-64", GUEST_OS_RHEL_64) \ - GOSL(STR_OS_RED_HAT_EN "7", GUEST_OS_RHEL) \ - GOSL(STR_OS_RED_HAT_EN "7-64", GUEST_OS_RHEL_64) \ - GOSL(STR_OS_SUN_DESK, GUEST_OS_OTHER24XLINUX) \ - GOSL(STR_OS_SLES, GUEST_OS_OTHER26XLINUX) \ - GOSL(STR_OS_SLES "-64", GUEST_OS_OTHER26XLINUX_64) \ - GOSL(STR_OS_SLES "10", GUEST_OS_OTHER26XLINUX) \ - GOSL(STR_OS_SLES "10-64", GUEST_OS_OTHER26XLINUX_64) \ - GOSL(STR_OS_SLES "11", GUEST_OS_OTHER26XLINUX) \ - GOSL(STR_OS_SLES "11-64", GUEST_OS_OTHER26XLINUX_64) \ - GOSL(STR_OS_SLES "12", GUEST_OS_OTHER26XLINUX) \ - GOSL(STR_OS_SLES "12-64", GUEST_OS_OTHER26XLINUX_64) \ - GOSL(STR_OS_SOLARIS "10", GUEST_OS_SOLARIS10) \ - GOSL(STR_OS_SOLARIS "10-64", GUEST_OS_SOLARIS10_64) \ - GOSL(STR_OS_SOLARIS "11", GUEST_OS_SOLARIS10) \ - GOSL(STR_OS_SOLARIS "11-64", GUEST_OS_SOLARIS10_64) \ - GOSL(STR_OS_SOLARIS "6", GUEST_OS_SOLARIS_6_AND_7) \ - GOSL(STR_OS_SOLARIS "7", GUEST_OS_SOLARIS_6_AND_7) \ - GOSL(STR_OS_SOLARIS "8", GUEST_OS_SOLARIS8) \ - GOSL(STR_OS_SOLARIS "9", GUEST_OS_SOLARIS9) \ - GOSL(STR_OS_SUSE, GUEST_OS_OTHER26XLINUX) \ - GOSL(STR_OS_SUSE "-64", GUEST_OS_OTHER26XLINUX_64) \ - GOSL(STR_OS_TURBO, GUEST_OS_OTHER26XLINUX) \ - GOSL(STR_OS_TURBO "-64", GUEST_OS_OTHER26XLINUX_64) \ - GOSL(STR_OS_UBUNTU, GUEST_OS_UBUNTU) \ - GOSL(STR_OS_UBUNTU "-64", GUEST_OS_OTHER26XLINUX_64) \ - GOSL("unixware7", GUEST_OS_UNIXWARE7) \ - GOSL("vmkernel", GUEST_OS_VMKERNEL) \ - GOSL("vmkernel5", GUEST_OS_VMKERNEL5) \ - GOSL("vmkernel6", GUEST_OS_VMKERNEL6) \ - GOSL(STR_OS_PHOTON "-64", GUEST_OS_PHOTON_64) \ - GOSL("whistler", GUEST_OS_WINXP) /* old */ \ - GOSL("win2000", GUEST_OS_WIN2000) /* old */ \ - GOSL(STR_OS_WIN_2000_ADV_SERV, GUEST_OS_WIN2000) \ - GOSL(STR_OS_WIN_2000_PRO, GUEST_OS_WIN2000) \ - GOSL(STR_OS_WIN_2000_SERV, GUEST_OS_WIN2000) \ - GOSL(STR_OS_WIN_31, GUEST_OS_WIN31) \ - GOSL(STR_OS_WIN_95, GUEST_OS_WIN95) \ - GOSL(STR_OS_WIN_98, GUEST_OS_WIN98) \ - GOSL(STR_OS_WIN_SEVEN, GUEST_OS_WINSEVEN) \ - GOSL(STR_OS_WIN_SEVEN_X64, GUEST_OS_WINSEVEN_64) \ - GOSL("windows7Server64Guest", GUEST_OS_WIN2008R2_64) \ - GOSL(STR_OS_WIN_2008R2_X64, GUEST_OS_WIN2008R2_64) \ - GOSL(STR_OS_WIN_EIGHT, GUEST_OS_WINEIGHT) \ - GOSL(STR_OS_WIN_EIGHT_X64, GUEST_OS_WINEIGHT_64) \ - GOSL(STR_OS_WIN_EIGHTSERVER_X64, GUEST_OS_WINEIGHTSERVER_64) \ - GOSL(STR_OS_WIN_TEN, GUEST_OS_WINTEN) \ - GOSL(STR_OS_WIN_TEN_X64, GUEST_OS_WINTEN_64) \ - GOSL(STR_OS_WIN_TENSERVER_X64, GUEST_OS_WINTENSERVER_64) \ - GOSL(STR_OS_HYPER_V, GUEST_OS_HYPER_V) \ - GOSL("winLonghorn64Guest", GUEST_OS_LONGHORN_64) \ - GOSL("winLonghornGuest", GUEST_OS_LONGHORN) \ - GOSL(STR_OS_WIN_ME, GUEST_OS_WINME ) \ - GOSL(STR_OS_WIN_NET_BUS, GUEST_OS_WINNET) \ - GOSL("winNetDatacenter", GUEST_OS_WINNET) \ - GOSL("winNetDatacenter-64", GUEST_OS_WINNET_64) \ - GOSL(STR_OS_WIN_NET_EN, GUEST_OS_WINNET) \ - GOSL("winNetEnterprise-64", GUEST_OS_WINNET_64) \ - GOSL(STR_OS_WIN_NET_ST, GUEST_OS_WINNET) \ - GOSL("winNetStandard-64", GUEST_OS_WINNET_64) \ - GOSL(STR_OS_WIN_NET_WEB, GUEST_OS_WINNET) \ - GOSL(STR_OS_WIN_NT, GUEST_OS_WINNT) \ - GOSL(STR_OS_WIN_2008_CLUSTER, GUEST_OS_LONGHORN) \ - GOSL(STR_OS_WIN_2008_CLUSTER_X64, GUEST_OS_LONGHORN_64) \ - GOSL(STR_OS_WIN_2008_DATACENTER, GUEST_OS_LONGHORN) \ - GOSL(STR_OS_WIN_2008_DATACENTER_X64, GUEST_OS_LONGHORN_64) \ - GOSL(STR_OS_WIN_2008_DATACENTER_CORE, GUEST_OS_LONGHORN) \ - GOSL(STR_OS_WIN_2008_DATACENTER_CORE_X64, GUEST_OS_LONGHORN_64) \ - GOSL(STR_OS_WIN_2008_ENTERPRISE, GUEST_OS_LONGHORN) \ - GOSL(STR_OS_WIN_2008_ENTERPRISE_X64, GUEST_OS_LONGHORN_64) \ - GOSL(STR_OS_WIN_2008_ENTERPRISE_CORE, GUEST_OS_LONGHORN) \ - GOSL(STR_OS_WIN_2008_ENTERPRISE_CORE_X64, GUEST_OS_LONGHORN_64) \ - GOSL(STR_OS_WIN_2008_SMALL_BUSINESS, GUEST_OS_LONGHORN) \ - GOSL(STR_OS_WIN_2008_SMALL_BUSINESS_X64, GUEST_OS_LONGHORN_64) \ - GOSL(STR_OS_WIN_2008_SMALL_BUSINESS_PREMIUM, GUEST_OS_LONGHORN) \ - GOSL(STR_OS_WIN_2008_SMALL_BUSINESS_PREMIUM_X64, GUEST_OS_LONGHORN_64) \ - GOSL(STR_OS_WIN_2008_STANDARD, GUEST_OS_LONGHORN) \ - GOSL(STR_OS_WIN_2008_STANDARD_X64, GUEST_OS_LONGHORN_64) \ - GOSL(STR_OS_WIN_2008_STANDARD_CORE, GUEST_OS_LONGHORN) \ - GOSL(STR_OS_WIN_2008_STANDARD_CORE_X64, GUEST_OS_LONGHORN_64) \ - GOSL(STR_OS_WIN_2008_WEB_SERVER, GUEST_OS_LONGHORN) \ - GOSL(STR_OS_WIN_2008_WEB_SERVER_X64, GUEST_OS_LONGHORN_64) \ - GOSL(STR_OS_WIN_VISTA, GUEST_OS_WINVISTA) \ - GOSL(STR_OS_WIN_VISTA_X64, GUEST_OS_WINVISTA_64) \ - GOSL(STR_OS_WIN_XP_HOME, GUEST_OS_WINXP) \ - GOSL(STR_OS_WIN_XP_PRO, GUEST_OS_WINXP) \ - GOSL(STR_OS_WIN_XP_PRO_X64, GUEST_OS_WINXPPRO_64) \ +#define GUEST_OS_LIST_GEN \ + GOSL(STR_OS_ASIANUX_3, GUEST_OS_OTHER26XLINUX, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_ASIANUX_3 "-64", GUEST_OS_OTHER26XLINUX_64, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_ASIANUX_4, GUEST_OS_OTHER26XLINUX, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_ASIANUX_4 "-64", GUEST_OS_OTHER26XLINUX_64, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_ASIANUX_5 "-64", GUEST_OS_OTHER3XLINUX_64, "linux.iso") \ + GOSL(STR_OS_ASIANUX_7 "-64", GUEST_OS_OTHER3XLINUX_64, "linux.iso") \ + GOSL(STR_OS_CENTOS, GUEST_OS_CENTOS, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_CENTOS "-64", GUEST_OS_CENTOS_64, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_CENTOS "6", GUEST_OS_CENTOS6, "linux.iso") \ + GOSL(STR_OS_CENTOS "6-64", GUEST_OS_CENTOS6_64, "linux.iso") \ + GOSL(STR_OS_CENTOS "7-64", GUEST_OS_CENTOS7_64, "linux.iso") \ + GOSL("coreos-64", GUEST_OS_OTHER3XLINUX_64, "linux.iso") \ + GOSL(STR_OS_MACOS, GUEST_OS_DARWIN9, "darwin.iso") \ + GOSL(STR_OS_MACOS "-64", GUEST_OS_DARWIN9_64, "darwin.iso") \ + GOSL(STR_OS_MACOS "10", GUEST_OS_DARWIN10, "darwin.iso") \ + GOSL(STR_OS_MACOS "10-64", GUEST_OS_DARWIN10_64, "darwin.iso") \ + GOSL(STR_OS_MACOS "11", GUEST_OS_DARWIN11, "darwin.iso") \ + GOSL(STR_OS_MACOS "11-64", GUEST_OS_DARWIN11_64, "darwin.iso") \ + GOSL(STR_OS_MACOS "12-64", GUEST_OS_DARWIN12_64, "darwin.iso") \ + GOSL(STR_OS_MACOS "13-64", GUEST_OS_DARWIN13_64, "darwin.iso") \ + GOSL(STR_OS_MACOS "14-64", GUEST_OS_DARWIN14_64, "darwin.iso") \ + GOSL(STR_OS_MACOS "15-64", GUEST_OS_DARWIN15_64, "darwin.iso") \ + GOSL(STR_OS_MACOS "16-64", GUEST_OS_DARWIN16_64, "darwin.iso") \ + GOSL(STR_OS_DEBIAN_10, GUEST_OS_DEBIAN, "linux.iso") \ + GOSL(STR_OS_DEBIAN_10 "-64", GUEST_OS_DEBIAN_64, "linux.iso") \ + GOSL(STR_OS_DEBIAN_4, GUEST_OS_DEBIAN, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_DEBIAN_4 "-64", GUEST_OS_DEBIAN_64, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_DEBIAN_5, GUEST_OS_DEBIAN, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_DEBIAN_5 "-64", GUEST_OS_DEBIAN_64, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_DEBIAN_6, GUEST_OS_DEBIAN, "linux.iso") \ + GOSL(STR_OS_DEBIAN_6 "-64", GUEST_OS_DEBIAN_64, "linux.iso") \ + GOSL(STR_OS_DEBIAN_7, GUEST_OS_DEBIAN, "linux.iso") \ + GOSL(STR_OS_DEBIAN_7 "-64", GUEST_OS_DEBIAN_64, "linux.iso") \ + GOSL(STR_OS_DEBIAN_8, GUEST_OS_DEBIAN, "linux.iso") \ + GOSL(STR_OS_DEBIAN_8 "-64", GUEST_OS_DEBIAN_64, "linux.iso") \ + GOSL(STR_OS_DEBIAN_9, GUEST_OS_DEBIAN, "linux.iso") \ + GOSL(STR_OS_DEBIAN_9 "-64", GUEST_OS_DEBIAN_64, "linux.iso") \ + GOSL("dos", GUEST_OS_DOS, NULL) \ + GOSL(STR_OS_ECOMSTATION, GUEST_OS_ECOMSTATION, NULL) \ + GOSL(STR_OS_ECOMSTATION "2", GUEST_OS_ECOMSTATION2, NULL) \ + GOSL("fedora", GUEST_OS_OTHER26XLINUX, "linux.iso") \ + GOSL("fedora-64", GUEST_OS_OTHER26XLINUX_64, "linux.iso") \ + GOSL("freeBSD", GUEST_OS_FREEBSD, "freebsd.iso") \ + GOSL("freeBSD-64", GUEST_OS_FREEBSD_64, "freebsd.iso") \ + GOSL("linux", GUEST_OS_OTHERLINUX, "linuxPreGlibc25.iso") /* old */ \ + GOSL(STR_OS_WIN_LONG, GUEST_OS_LONGHORN, "windows.iso") \ + GOSL("longhorn-64", GUEST_OS_LONGHORN_64, "windows.iso") \ + GOSL(STR_OS_MANDRAKE, GUEST_OS_OTHER26XLINUX, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_MANDRAKE "-64", GUEST_OS_OTHER26XLINUX_64, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_MANDRIVA, GUEST_OS_OTHER26XLINUX, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_MANDRIVA "-64", GUEST_OS_OTHER26XLINUX_64, "linuxPreGlibc25.iso") \ + GOSL("netware4", GUEST_OS_NETWARE4, "netware.iso") \ + GOSL("netware5", GUEST_OS_NETWARE5, "netware.iso") \ + GOSL("netware6", GUEST_OS_NETWARE6, "netware.iso") \ + GOSL(STR_OS_NOVELL, GUEST_OS_OTHER26XLINUX, "linuxPreGlibc25.iso") \ + GOSL("nt4", GUEST_OS_WINNT, "winPre2k.iso") /* old */ \ + GOSL("oes", GUEST_OS_OTHER26XLINUX, "linuxPreGlibc25.iso") \ + GOSL("openserver5", GUEST_OS_OPENSERVER_5_AND_6, NULL) \ + GOSL("openserver6", GUEST_OS_OPENSERVER_5_AND_6, NULL) \ + GOSL(STR_OS_OPENSUSE, GUEST_OS_OTHER26XLINUX, "linux.iso") \ + GOSL(STR_OS_OPENSUSE "-64", GUEST_OS_OTHER26XLINUX_64, "linux.iso") \ + GOSL(STR_OS_ORACLE, GUEST_OS_ORACLE, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_ORACLE "-64", GUEST_OS_ORACLE_64, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_ORACLE "6", GUEST_OS_ORACLE6, "linux.iso") \ + GOSL(STR_OS_ORACLE "6-64", GUEST_OS_ORACLE6_64, "linux.iso") \ + GOSL(STR_OS_ORACLE "7-64", GUEST_OS_ORACLE7_64, "linux.iso") \ + GOSL("os2", GUEST_OS_OS2, NULL) \ + GOSL("os2experimental", GUEST_OS_OS2, NULL) \ + GOSL("other", GUEST_OS_OTHER, NULL) \ + GOSL("other-64", GUEST_OS_OTHER_64, NULL) \ + GOSL(STR_OS_OTHER_24, GUEST_OS_OTHER24XLINUX, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_OTHER_24 "-64", GUEST_OS_OTHER24XLINUX_64, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_OTHER_26, GUEST_OS_OTHER26XLINUX, "linux.iso") \ + GOSL(STR_OS_OTHER_26 "-64", GUEST_OS_OTHER26XLINUX_64, "linux.iso") \ + GOSL(STR_OS_OTHER_3X, GUEST_OS_OTHER3XLINUX, "linux.iso") \ + GOSL(STR_OS_OTHER_3X "-64", GUEST_OS_OTHER3XLINUX_64, "linux.iso") \ + GOSL(STR_OS_OTHER, GUEST_OS_OTHERLINUX, "linux.iso") \ + GOSL(STR_OS_OTHER "-64", GUEST_OS_OTHERLINUX_64, "linux.iso") \ + GOSL(STR_OS_RED_HAT, GUEST_OS_OTHER26XLINUX, "linux.iso") \ + GOSL(STR_OS_RED_HAT_EN "2", GUEST_OS_OTHER24XLINUX, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_RED_HAT_EN "3", GUEST_OS_OTHER24XLINUX, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_RED_HAT_EN "3-64", GUEST_OS_OTHER24XLINUX_64, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_RED_HAT_EN "4", GUEST_OS_OTHER26XLINUX, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_RED_HAT_EN "4-64", GUEST_OS_OTHER26XLINUX_64, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_RED_HAT_EN "5", GUEST_OS_OTHER26XLINUX, "linux.iso") \ + GOSL(STR_OS_RED_HAT_EN "5-64", GUEST_OS_OTHER26XLINUX_64, "linux.iso") \ + GOSL(STR_OS_RED_HAT_EN "6", GUEST_OS_RHEL, "linux.iso") \ + GOSL(STR_OS_RED_HAT_EN "6-64", GUEST_OS_RHEL_64, "linux.iso") \ + GOSL(STR_OS_RED_HAT_EN "7", GUEST_OS_RHEL, "linux.iso") \ + GOSL(STR_OS_RED_HAT_EN "7-64", GUEST_OS_RHEL_64, "linux.iso") \ + GOSL(STR_OS_SUN_DESK, GUEST_OS_OTHER24XLINUX, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_SLES, GUEST_OS_OTHER26XLINUX, "linux.iso") \ + GOSL(STR_OS_SLES "-64", GUEST_OS_OTHER26XLINUX_64, "linux.iso") \ + GOSL(STR_OS_SLES "10", GUEST_OS_OTHER26XLINUX, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_SLES "10-64", GUEST_OS_OTHER26XLINUX_64, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_SLES "11", GUEST_OS_OTHER26XLINUX, "linux.iso") \ + GOSL(STR_OS_SLES "11-64", GUEST_OS_OTHER26XLINUX_64, "linux.iso") \ + GOSL(STR_OS_SLES "12", GUEST_OS_OTHER26XLINUX, "linux.iso") \ + GOSL(STR_OS_SLES "12-64", GUEST_OS_OTHER26XLINUX_64, "linux.iso") \ + GOSL(STR_OS_SOLARIS "10", GUEST_OS_SOLARIS10, "solaris.iso") \ + GOSL(STR_OS_SOLARIS "10-64", GUEST_OS_SOLARIS10_64, "solaris.iso") \ + GOSL(STR_OS_SOLARIS "11", GUEST_OS_SOLARIS10, "solaris.iso") \ + GOSL(STR_OS_SOLARIS "11-64", GUEST_OS_SOLARIS10_64, "solaris.iso") \ + GOSL(STR_OS_SOLARIS "6", GUEST_OS_SOLARIS_6_AND_7, "solaris.iso") \ + GOSL(STR_OS_SOLARIS "7", GUEST_OS_SOLARIS_6_AND_7, "solaris.iso") \ + GOSL(STR_OS_SOLARIS "8", GUEST_OS_SOLARIS8, "solaris.iso") \ + GOSL(STR_OS_SOLARIS "9", GUEST_OS_SOLARIS9, "solaris.iso") \ + GOSL(STR_OS_SUSE, GUEST_OS_OTHER26XLINUX, "linux.iso") \ + GOSL(STR_OS_SUSE "-64", GUEST_OS_OTHER26XLINUX_64, "linux.iso") \ + GOSL(STR_OS_TURBO, GUEST_OS_OTHER26XLINUX, "linux.iso") \ + GOSL(STR_OS_TURBO "-64", GUEST_OS_OTHER26XLINUX_64, "linux.iso") \ + GOSL(STR_OS_UBUNTU, GUEST_OS_UBUNTU, "linux.iso") \ + GOSL(STR_OS_UBUNTU "-64", GUEST_OS_OTHER26XLINUX_64, "linux.iso") \ + GOSL("unixware7", GUEST_OS_UNIXWARE7, NULL) \ + GOSL("vmkernel", GUEST_OS_VMKERNEL, NULL) \ + GOSL("vmkernel5", GUEST_OS_VMKERNEL5, NULL) \ + GOSL("vmkernel6", GUEST_OS_VMKERNEL6, NULL) \ + GOSL("vmkernel65", GUEST_OS_VMKERNEL65, NULL) \ + GOSL(STR_OS_PHOTON "-64", GUEST_OS_PHOTON_64, NULL) \ + GOSL("whistler", GUEST_OS_WINXP, "winPreVista.iso") /* old */ \ + GOSL("win2000", GUEST_OS_WIN2000, "winPreVista.iso") /* old */ \ + GOSL(STR_OS_WIN_2000_ADV_SERV, GUEST_OS_WIN2000, "winPreVista.iso") \ + GOSL(STR_OS_WIN_2000_PRO, GUEST_OS_WIN2000, "winPreVista.iso") \ + GOSL(STR_OS_WIN_2000_SERV, GUEST_OS_WIN2000, "winPreVista.iso") \ + GOSL(STR_OS_WIN_31, GUEST_OS_WIN31, "winPre2k.iso") \ + GOSL(STR_OS_WIN_95, GUEST_OS_WIN95, "winPre2k.iso") \ + GOSL(STR_OS_WIN_98, GUEST_OS_WIN98, "winPre2k.iso") \ + GOSL(STR_OS_WIN_SEVEN, GUEST_OS_WINSEVEN, "windows.iso") \ + GOSL(STR_OS_WIN_SEVEN_X64, GUEST_OS_WINSEVEN_64, "windows.iso") \ + GOSL("windows7Server64Guest", GUEST_OS_WIN2008R2_64, "windows.iso") \ + GOSL(STR_OS_WIN_2008R2_X64, GUEST_OS_WIN2008R2_64, "windows.iso") \ + GOSL(STR_OS_WIN_EIGHT, GUEST_OS_WINEIGHT, "windows.iso") \ + GOSL(STR_OS_WIN_EIGHT_X64, GUEST_OS_WINEIGHT_64, "windows.iso") \ + GOSL(STR_OS_WIN_EIGHTSERVER_X64, GUEST_OS_WINEIGHTSERVER_64, "windows.iso") \ + GOSL(STR_OS_WIN_TEN, GUEST_OS_WINTEN, "windows.iso") \ + GOSL(STR_OS_WIN_TEN_X64, GUEST_OS_WINTEN_64, "windows.iso") \ + GOSL(STR_OS_WIN_TENSERVER_X64, GUEST_OS_WINTENSERVER_64, "windows.iso") \ + GOSL(STR_OS_HYPER_V, GUEST_OS_HYPER_V, NULL) \ + GOSL("winLonghorn64Guest", GUEST_OS_LONGHORN_64, "windows.iso") \ + GOSL("winLonghornGuest", GUEST_OS_LONGHORN, "windows.iso") \ + GOSL(STR_OS_WIN_ME, GUEST_OS_WINME, "winPre2k.iso") \ + GOSL(STR_OS_WIN_NET_BUS, GUEST_OS_WINNET, "winPreVista.iso") \ + GOSL("winNetDatacenter", GUEST_OS_WINNET, "winPreVista.iso") \ + GOSL("winNetDatacenter-64", GUEST_OS_WINNET_64, "winPreVista.iso") \ + GOSL(STR_OS_WIN_NET_EN, GUEST_OS_WINNET, "winPreVista.iso") \ + GOSL("winNetEnterprise-64", GUEST_OS_WINNET_64, "winPreVista.iso") \ + GOSL(STR_OS_WIN_NET_ST, GUEST_OS_WINNET, "winPreVista.iso") \ + GOSL("winNetStandard-64", GUEST_OS_WINNET_64, "winPreVista.iso") \ + GOSL(STR_OS_WIN_NET_WEB, GUEST_OS_WINNET, "winPreVista.iso") \ + GOSL(STR_OS_WIN_NT, GUEST_OS_WINNT, "winPre2k.iso") \ + GOSL(STR_OS_WIN_2008_CLUSTER, GUEST_OS_LONGHORN, "windows.iso") \ + GOSL(STR_OS_WIN_2008_CLUSTER_X64, GUEST_OS_LONGHORN_64, "windows.iso") \ + GOSL(STR_OS_WIN_2008_DATACENTER, GUEST_OS_LONGHORN, "windows.iso") \ + GOSL(STR_OS_WIN_2008_DATACENTER_X64, GUEST_OS_LONGHORN_64, "windows.iso") \ + GOSL(STR_OS_WIN_2008_DATACENTER_CORE, GUEST_OS_LONGHORN, "windows.iso") \ + GOSL(STR_OS_WIN_2008_DATACENTER_CORE_X64, GUEST_OS_LONGHORN_64, "windows.iso") \ + GOSL(STR_OS_WIN_2008_ENTERPRISE, GUEST_OS_LONGHORN, "windows.iso") \ + GOSL(STR_OS_WIN_2008_ENTERPRISE_X64, GUEST_OS_LONGHORN_64, "windows.iso") \ + GOSL(STR_OS_WIN_2008_ENTERPRISE_CORE, GUEST_OS_LONGHORN, "windows.iso") \ + GOSL(STR_OS_WIN_2008_ENTERPRISE_CORE_X64, GUEST_OS_LONGHORN_64, "windows.iso") \ + GOSL(STR_OS_WIN_2008_SMALL_BUSINESS, GUEST_OS_LONGHORN, "windows.iso") \ + GOSL(STR_OS_WIN_2008_SMALL_BUSINESS_X64, GUEST_OS_LONGHORN_64, "windows.iso") \ + GOSL(STR_OS_WIN_2008_SMALL_BUSINESS_PREMIUM, GUEST_OS_LONGHORN, "windows.iso") \ + GOSL(STR_OS_WIN_2008_SMALL_BUSINESS_PREMIUM_X64, GUEST_OS_LONGHORN_64, "windows.iso") \ + GOSL(STR_OS_WIN_2008_STANDARD, GUEST_OS_LONGHORN, "windows.iso") \ + GOSL(STR_OS_WIN_2008_STANDARD_X64, GUEST_OS_LONGHORN_64, "windows.iso") \ + GOSL(STR_OS_WIN_2008_STANDARD_CORE, GUEST_OS_LONGHORN, "windows.iso") \ + GOSL(STR_OS_WIN_2008_STANDARD_CORE_X64, GUEST_OS_LONGHORN_64, "windows.iso") \ + GOSL(STR_OS_WIN_2008_WEB_SERVER, GUEST_OS_LONGHORN, "windows.iso") \ + GOSL(STR_OS_WIN_2008_WEB_SERVER_X64, GUEST_OS_LONGHORN_64, "windows.iso") \ + GOSL(STR_OS_WIN_VISTA, GUEST_OS_WINVISTA, "windows.iso") \ + GOSL(STR_OS_WIN_VISTA_X64, GUEST_OS_WINVISTA_64, "windows.iso") \ + GOSL(STR_OS_WIN_XP_HOME, GUEST_OS_WINXP, "winPreVista.iso") \ + GOSL(STR_OS_WIN_XP_PRO, GUEST_OS_WINXP, "winPreVista.iso") \ + GOSL(STR_OS_WIN_XP_PRO_X64, GUEST_OS_WINXPPRO_64, "winPreVista.iso") \ #endif diff --git a/open-vm-tools/lib/include/hashTable.h b/open-vm-tools/lib/include/hashTable.h index c422931bd..c6cb1823b 100644 --- a/open-vm-tools/lib/include/hashTable.h +++ b/open-vm-tools/lib/include/hashTable.h @@ -80,9 +80,9 @@ HashTable_Insert(HashTable *hashTable, // IN/OUT: void *clientData); // IN/OPT: Bool -HashTable_Lookup(HashTable *hashTable, // IN: - const void *keyStr, // IN: - void **clientData); // OUT/OPT: +HashTable_Lookup(const HashTable *hashTable, // IN: + const void *keyStr, // IN: + void **clientData); // OUT/OPT: void * HashTable_LookupOrInsert(HashTable *hashTable, // IN/OUT: diff --git a/open-vm-tools/lib/include/hgfs.h b/open-vm-tools/lib/include/hgfs.h index 6be15afc3..ea2632412 100644 --- a/open-vm-tools/lib/include/hgfs.h +++ b/open-vm-tools/lib/include/hgfs.h @@ -79,6 +79,27 @@ /* Maximum number of bytes to read or write to a V3 server in a single hgfs packet. */ #define HGFS_LARGE_IO_MAX (HGFS_LARGE_IO_MAX_PAGES * 4096) +/* + * File type + * + * File types, used in HgfsAttr. We support regular files, + * directories, and symlinks. + * + * Changing the order of this enum will break the protocol; new types + * should be added at the end. + * + * + * This definition is used in some places that don't include + * hgfsProto.h, which is why it is here instead of there. + */ +typedef enum { + HGFS_FILE_TYPE_REGULAR, + HGFS_FILE_TYPE_DIRECTORY, + HGFS_FILE_TYPE_SYMLINK, +} HgfsFileType; + + + /* * Open mode * diff --git a/open-vm-tools/lib/include/hgfsProto.h b/open-vm-tools/lib/include/hgfsProto.h index 58d318ca5..3a62b5a80 100644 --- a/open-vm-tools/lib/include/hgfsProto.h +++ b/open-vm-tools/lib/include/hgfsProto.h @@ -175,22 +175,7 @@ MY_ASSERTS(hgfsOpValuesAsserts, #define HGFS_REQ_GET_PAYLOAD_V3(hgfsReq) ((char *)(hgfsReq) + sizeof(HgfsRequest)) #define HGFS_REP_GET_PAYLOAD_V3(hgfsRep) ((char *)(hgfsRep) + sizeof(HgfsReply)) -/* - * File types, used in HgfsAttr. We support regular files, - * directories, and symlinks. - * - * Changing the order of this enum will break the protocol; new types - * should be added at the end. - */ - -typedef enum { - HGFS_FILE_TYPE_REGULAR, - HGFS_FILE_TYPE_DIRECTORY, - HGFS_FILE_TYPE_SYMLINK, -} HgfsFileType; - - -/* + /* * Open flags. * * Changing the order of this enum will break stuff. Do not add any flags to diff --git a/open-vm-tools/lib/include/hgfsServer.h b/open-vm-tools/lib/include/hgfsServer.h index dfc71bdc8..6cc90a157 100644 --- a/open-vm-tools/lib/include/hgfsServer.h +++ b/open-vm-tools/lib/include/hgfsServer.h @@ -199,6 +199,10 @@ Bool HgfsServer_InitState(HgfsServerCallbacks **, HgfsServerMgrCallbacks *); void HgfsServer_ExitState(void); +Bool HgfsServer_ShareAccessCheck(HgfsOpenMode accessMode, + Bool shareWriteable, + Bool shareReadable); + uint32 HgfsServer_GetHandleCounter(void); void HgfsServer_SetHandleCounter(uint32 newHandleCounter); diff --git a/open-vm-tools/lib/include/hgfsServerPolicy.h b/open-vm-tools/lib/include/hgfsServerPolicy.h index bdb399eb7..7aaaf7b8e 100644 --- a/open-vm-tools/lib/include/hgfsServerPolicy.h +++ b/open-vm-tools/lib/include/hgfsServerPolicy.h @@ -112,9 +112,4 @@ HgfsServerPolicy_FreeShareList(HgfsServerPolicy_ShareList *shareList); // IN: li HgfsServerPolicy_ShareList * HgfsServerPolicy_GetSharesWithTag(const char *tag); // IN: tag to search for -Bool -HgfsServerPolicy_CheckMode(HgfsOpenMode mode, // IN: mode to check - Bool writePermissions, // IN: callers write permissions - Bool readPermissions); // IN: callers read permissions - #endif // _HGFS_SERVER_POLICY_H_ diff --git a/open-vm-tools/lib/include/imgcust-common/imgcust-api.h b/open-vm-tools/lib/include/imgcust-common/imgcust-api.h index f0901b8d4..5653617ba 100644 --- a/open-vm-tools/lib/include/imgcust-common/imgcust-api.h +++ b/open-vm-tools/lib/include/imgcust-common/imgcust-api.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -16,28 +16,33 @@ * *********************************************************/ +/* + * imgcust-api.h -- + * + * C interface to package deployment. + */ #ifndef IMGCUST_API_H #define IMGCUST_API_H #ifdef WIN32 - /* - * we get warnings c4251 and c4275 when exporting c++ classes that - * inherit from STL classes or use them as members. We can't - * export these classes or the client will get duplicate symbols, - * so we disable the warning: - */ - #pragma warning( disable : 4251 ) - #pragma warning( disable : 4275 ) +/* + * We get warnings c4251 and c4275 when exporting c++ classes that + * inherit from STL classes or use them as members. We can't + * export these classes or the client will get duplicate symbols, + * so we disable the warning. + */ +#pragma warning( disable : 4251 ) +#pragma warning( disable : 4275 ) - // if _IMGCUST_DLL is defined, we export functions/classes with this prefix - #ifdef _IMGCUST_DLL - #define IMGCUST_API __declspec(dllexport) - #else - #define IMGCUST_API __declspec(dllimport) - #endif +// if _IMGCUST_DLL is defined, we export functions/classes with this prefix +#ifdef _IMGCUST_DLL + #define IMGCUST_API __declspec(dllexport) +#else + #define IMGCUST_API __declspec(dllimport) +#endif #else // linux - #define IMGCUST_API __attribute__ ((visibility ("default"))) +#define IMGCUST_API __attribute__ ((visibility ("default"))) #endif // WIN32 #endif // IMGCUST_API_H diff --git a/open-vm-tools/lib/include/imgcust-common/log.h b/open-vm-tools/lib/include/imgcust-common/log.h index f2fe736e5..7cc86845c 100644 --- a/open-vm-tools/lib/include/imgcust-common/log.h +++ b/open-vm-tools/lib/include/imgcust-common/log.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -15,9 +15,12 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * *********************************************************/ -/** - * Logging method that need to be provided by the client of the - * library to enable logging. + +/* + * log.h -- + * + * Logging method that need to be provided by the client of the + * library to enable logging. */ #ifndef IMGCUST_COMMON_LOG_H diff --git a/open-vm-tools/lib/include/imgcust-common/process.h b/open-vm-tools/lib/include/imgcust-common/process.h index 0837b8f45..3c585713f 100644 --- a/open-vm-tools/lib/include/imgcust-common/process.h +++ b/open-vm-tools/lib/include/imgcust-common/process.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -17,43 +17,117 @@ *********************************************************/ /* - * Functions to launch an external process + * process.h -- + * + * Functions to launch an external process. */ +#ifndef IMGCUST_COMMON_PROCESS_H +#define IMGCUST_COMMON_PROCESS_H + #ifdef __cplusplus extern "C" { #endif -typedef struct ProcessOpaque* ProcessHandle; +typedef struct ProcessOpaque *ProcessHandle; typedef enum _ProcessError { PROCESS_SUCCESS, PROCESS_FAILED } ProcessError; -/** - * Process_Create + +/* + *------------------------------------------------------------------------------ + * + * Process_Create -- + * + * Creates a process and returns result of the operation. * - * since this file can be included in a c++ file that already has the - * namespaced c++ definition of LogFunction defined, we can't use the c - * version of LogFunction as an input. Only choice is to make it a raw - * pointer and cast it in the processXXX.c file which can use the C - * definition of LogFunction. + * Since this file can be included in a c++ file that already has the + * namespaced c++ definition of LogFunction defined, we can't use the c + * version of LogFunction as an input. Only choice is to make it a raw + * pointer and cast it in the processXXX.c file which can use the C + * definition of LogFunction. + * + *------------------------------------------------------------------------------ */ -ProcessError Process_Create(ProcessHandle *h, - char* args[], - void* log); -ProcessError Process_RunToComplete(ProcessHandle h, unsigned long timeout); +ProcessError +Process_Create(ProcessHandle *h, char *args[], void *log); -const char* Process_GetStdout(ProcessHandle h); -const char* Process_GetStderr(ProcessHandle h); +/* + *------------------------------------------------------------------------------ + * + * Process_RunToComplete -- + * + * Runs the process to completion and returns its result. + * + *------------------------------------------------------------------------------ + */ -int Process_GetExitCode(ProcessHandle h); +ProcessError +Process_RunToComplete(ProcessHandle h, unsigned long timeout); + + +/* + *------------------------------------------------------------------------------ + * + * Process_GetStdout -- + * + * Returns process's standard output. + * + *------------------------------------------------------------------------------ + */ + +const char * +Process_GetStdout(ProcessHandle h); + + +/* + *------------------------------------------------------------------------------ + * + * Process_GetStderr -- + * + * Returns process's standard error output. + * + *------------------------------------------------------------------------------ + */ + +const char * +Process_GetStderr(ProcessHandle h); + + +/* + *------------------------------------------------------------------------------ + * + * Process_GetExitCode -- + * + * Returns process's exit code. + * + *------------------------------------------------------------------------------ + */ + +int +Process_GetExitCode(ProcessHandle h); + + +/* + *------------------------------------------------------------------------------ + * + * Process_Destroy -- + * + * Destroys the process and returns result of the operation. + * + *------------------------------------------------------------------------------ + */ + +ProcessError +Process_Destroy(ProcessHandle h); -ProcessError Process_Destroy(ProcessHandle h); - #ifdef __cplusplus } // extern "C" #endif + +#endif // IMGCUST_COMMON_PROCESS_H diff --git a/open-vm-tools/lib/include/imgcust-guest/guestcust-events.h b/open-vm-tools/lib/include/imgcust-guest/guestcust-events.h index c5907278f..4cbd36bf0 100644 --- a/open-vm-tools/lib/include/imgcust-guest/guestcust-events.h +++ b/open-vm-tools/lib/include/imgcust-guest/guestcust-events.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2005 VMware, Inc. All rights reserved. + * Copyright (C) 2005-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -16,15 +16,20 @@ * *********************************************************/ -/*! - * @file guestcust-events.h -- +/* + * guestcust-events.h -- + * + * Definitions related to the GOSC events. */ +#ifndef IMGCUST_COMMON_GOSC_EVENTS_H +#define IMGCUST_COMMON_GOSC_EVENTS_H + /* * Customization-specific events generated in the guest and handled by * hostd. They are sent via the vmx/guestTools/deployPkgState/ vmdb path. * We start these at 100 to avoid conflict with the deployPkg error - * codes listed in vmx/public/toolsDeployPkg.h + * codes listed in vmx/public/toolsDeployPkg.h. */ typedef enum { GUESTCUST_EVENT_CUSTOMIZE_FAILED = 100, @@ -33,3 +38,5 @@ typedef enum { GUESTCUST_EVENT_ENABLE_NICS, GUESTCUST_EVENT_QUERY_NICS } GuestCustEvent; + +#endif // IMGCUST_COMMON_GOSC_EVENTS_H diff --git a/open-vm-tools/lib/include/loglevel_user.h b/open-vm-tools/lib/include/loglevel_user.h index 2ab1e5e85..17b92d762 100644 --- a/open-vm-tools/lib/include/loglevel_user.h +++ b/open-vm-tools/lib/include/loglevel_user.h @@ -74,12 +74,14 @@ LOGLEVEL_VAR(pci_xhci), \ LOGLEVEL_VAR(usb_xhci), \ LOGLEVEL_VAR(usb), \ - LOGLEVEL_VAR(vusbmouse), \ - LOGLEVEL_VAR(vusbkeyboard), \ + LOGLEVEL_VAR(vusbaudio), \ + LOGLEVEL_VAR(vusbccid), \ LOGLEVEL_VAR(vusbhid), \ + LOGLEVEL_VAR(vusbkeyboard), \ + LOGLEVEL_VAR(vusbmouse), \ LOGLEVEL_VAR(vusbtablet), \ - LOGLEVEL_VAR(vusbaudio), \ LOGLEVEL_VAR(vusbvideo),\ + LOGLEVEL_VAR(vusbrng),\ LOGLEVEL_VAR(hidQueue), \ LOGLEVEL_VAR(pci_vlance), \ LOGLEVEL_VAR(pci_svga), \ @@ -134,6 +136,7 @@ LOGLEVEL_VAR(mksCursorPosition), \ LOGLEVEL_VAR(mksBasicOps), \ LOGLEVEL_VAR(mksRenderOps), \ + LOGLEVEL_VAR(mksFrame), \ LOGLEVEL_VAR(mksGLBasic), \ LOGLEVEL_VAR(mksGLManager), \ LOGLEVEL_VAR(mksGLFBO), \ @@ -186,6 +189,7 @@ LOGLEVEL_VAR(lsilogic), \ LOGLEVEL_VAR(pvscsi), \ LOGLEVEL_VAR(ahci), \ + LOGLEVEL_VAR(nvme), \ LOGLEVEL_VAR(diskVmnix), \ LOGLEVEL_VAR(hbaCommon), \ LOGLEVEL_VAR(backdoor), \ @@ -220,6 +224,7 @@ LOGLEVEL_VAR(guest_rpc), \ LOGLEVEL_VAR(guestVars), \ LOGLEVEL_VAR(vmkEvent), \ + LOGLEVEL_VAR(authenticode), \ LOGLEVEL_VAR(battery), \ LOGLEVEL_VAR(fakeDma), \ LOGLEVEL_VAR(shader), \ @@ -251,7 +256,6 @@ LOGLEVEL_VAR(blit), /* lib/blit */ \ LOGLEVEL_VAR(vmnetBridge), \ LOGLEVEL_VAR(wifi), /* macWireless and wpa_supplicant */ \ - LOGLEVEL_VAR(pvfslib), \ LOGLEVEL_VAR(brtalk), \ LOGLEVEL_VAR(button), \ LOGLEVEL_VAR(util), \ @@ -262,12 +266,12 @@ LOGLEVEL_VAR(syncWaitQ), \ LOGLEVEL_VAR(sg), /* lib/sg */ \ LOGLEVEL_VAR(ftcpt), \ - LOGLEVEL_VAR(wrapLib), \ LOGLEVEL_VAR(digestlib), \ LOGLEVEL_VAR(inputdevtap), \ LOGLEVEL_VAR(objlib), \ LOGLEVEL_VAR(vsanobj), \ LOGLEVEL_VAR(vvolbe), \ + LOGLEVEL_VAR(upitbe), \ LOGLEVEL_VAR(svgadevtap), \ LOGLEVEL_VAR(masReceipt), /* lib/masReceipt */ \ LOGLEVEL_VAR(serviceImpl), /* lib/serviceImpl */ \ @@ -293,6 +297,10 @@ LOGLEVEL_VAR(ddecomd), \ LOGLEVEL_VAR(hostctl), \ LOGLEVEL_VAR(pmemobj), \ + LOGLEVEL_VAR(secureBoot), \ + LOGLEVEL_VAR(upitd), \ + LOGLEVEL_VAR(promotedisk), + /* end of list */ LOGLEVEL_EXTENSION_DECLARE(LOGLEVEL_USER); diff --git a/open-vm-tools/lib/include/msgList.h b/open-vm-tools/lib/include/msgList.h index 31187ac6c..f6511a15f 100644 --- a/open-vm-tools/lib/include/msgList.h +++ b/open-vm-tools/lib/include/msgList.h @@ -64,7 +64,7 @@ void MsgList_AppendStr(MsgList **tail, const char *id); void MsgList_AppendMsgList(MsgList **tail, MsgList *messages); void MsgList_Log(const MsgList *messages); -char *MsgList_ToString(const MsgList *messages); +char *MsgList_ToEnglishString(const MsgList *messages); MsgList *MsgList_Copy(const MsgList *src); void MsgList_Free(MsgList *messages); diff --git a/open-vm-tools/lib/include/mutexRankLib.h b/open-vm-tools/lib/include/mutexRankLib.h index 0c392968f..4340b156f 100644 --- a/open-vm-tools/lib/include/mutexRankLib.h +++ b/open-vm-tools/lib/include/mutexRankLib.h @@ -78,6 +78,11 @@ */ #define RANK_filtLibAllocBitmapLock (RANK_filtLibPollLock + 1) +/* + * remoteUSB (must be < workerCmpl) + */ +#define RANK_remoteUSBGlobalLock (RANK_filtLibAllocBitmapLock + 1) + /* * workerLib default completion lock * @@ -95,8 +100,11 @@ * for queued work. * * Must be > RANK_filtLibAllocBitmapLock due to PR1437159. + * + * Must be > RANK_remoteUSBGlobalLock so that virtual CCID can wait for + * queued work. */ -#define RANK_workerLibCmplLock (RANK_filtLibAllocBitmapLock + 1) +#define RANK_workerLibCmplLock (RANK_remoteUSBGlobalLock + 1) /* * NFC lib lock @@ -112,6 +120,7 @@ * disklib and I/O related locks */ #define RANK_diskLibLock (RANK_libLockBase + 0x5001) +#define RANK_digestLibLock (RANK_libLockBase + 0x5004) #define RANK_nasPluginLock (RANK_libLockBase + 0x5007) #define RANK_nasPluginMappingLock (RANK_libLockBase + 0x5008) #define RANK_diskLibPluginLock (RANK_libLockBase + 0x5010) @@ -121,6 +130,7 @@ #define RANK_scsiStateLock (RANK_libLockBase + 0x5060) #define RANK_parInitLock (RANK_libLockBase + 0x5070) #define RANK_namespaceLock (RANK_libLockBase + 0x5080) +#define RANK_objLibInitLock (RANK_libLockBase + 0x5085) #define RANK_vvolLibLock (RANK_libLockBase + 0x5090) /* diff --git a/open-vm-tools/lib/include/productState.h b/open-vm-tools/lib/include/productState.h index ab7ea7de7..c4d3ac2e0 100644 --- a/open-vm-tools/lib/include/productState.h +++ b/open-vm-tools/lib/include/productState.h @@ -96,6 +96,8 @@ unsigned int ProductState_GetBuildNumber(void); ProductCaps ProductState_GetCapabilities(void); const char *ProductState_GetLicenseName(void); const char *ProductState_GetLicenseVersion(void); +void ProductState_SetConfigName(const char *configName); +const char *ProductState_GetConfigName(void); /* etc */ const char *ProductState_GetCompilationOption(void); @@ -107,6 +109,9 @@ const char *ProductState_GetBundleIdentifier(void); void ProductState_GetVersionNumber(unsigned int *major, unsigned int *minor, unsigned int *patchLevel); +void ProductState_SetHelp(Product helpProduct, const char *helpVersion); +void ProductState_GetHelp(Product *helpProduct, const char **helpVersion); + char *ProductState_Serialize(ProductStateSerializationFlags flags); ProductStateSerializationFlags ProductState_Deserialize(const char *state); diff --git a/open-vm-tools/lib/include/random.h b/open-vm-tools/lib/include/random.h index 446381aa7..424b9c3ba 100644 --- a/open-vm-tools/lib/include/random.h +++ b/open-vm-tools/lib/include/random.h @@ -29,13 +29,24 @@ #include "vm_basic_types.h" +/* + * OS-native random number generator based on one-way hashes. + * + * Good enough for any non-cryptographic use, but slower than + * alternative algorithms. Recommended for generating seeds. + * + * Period: infinite + * Speed: slow + */ + Bool Random_Crypto(size_t size, void *buffer); /* * High quality - research grade - random number generator. * - * Despite its apparent complexity this RNG is extremely fast. + * Period: 2^800 + * Speed: ~23 cycles */ typedef struct rqContext rqContext; @@ -44,8 +55,56 @@ rqContext *Random_QuickSeed(uint32 seed); uint32 Random_Quick(rqContext *context); +/* + * Good quality non-deterministic random number generator. + * + * This generator uses &(*state) as the seed to go beyond 64-bits without + * additional storage space; the low-grade entropy makes seeding + * non-deterministic. Multiple generators in the same address space + * with the same seed will produce unique streams, but using the same + * seed will NOT produce the same sequence (due to ASLR). See + * Raondom_FastStream for a deterministic generator. + * + * Initialize by setting *state to any seed (including zero) and calling + * Random_Fast TWICE. (Unless the seed is very good, the first two values + * are not very random). + * + * Period: 2^64 + * Speed: ~10 cycles + */ + +uint32 Random_Fast(uint64 *state); + +static INLINE void +Random_FastSeed(uint64 *state, // OUT: + uint64 seed) // IN: +{ + *state = seed; + (void) Random_Fast(state); + (void) Random_Fast(state); +} + +/* + * Good quality deterministic random number generator. + * + * Period: 2^64 + * Speed: ~10 cycles + */ + +typedef struct { + uint64 state; + uint64 sequence; +} RandomFastContext; + +uint32 Random_FastStream(RandomFastContext *rfc); +void Random_FastStreamSeed(RandomFastContext *rfc, uint64 seed, uint64 seq); + /* * Simple multiplicative congruential RNG. + * + * Deprecated; prefer Random_Fast for better quality. + * Period: 2^31-1 + * Speed: ~9 cycles */ int Random_Simple(int seed); diff --git a/open-vm-tools/lib/include/sha1.h b/open-vm-tools/lib/include/sha1.h index 90df36190..b0df0f7de 100644 --- a/open-vm-tools/lib/include/sha1.h +++ b/open-vm-tools/lib/include/sha1.h @@ -119,6 +119,17 @@ void SHA1Final(unsigned char digest[SHA1_HASH_LEN], SHA1_CTX* context); void SHA1RawBufferHash(const void *data, uint32 size, uint32 result[5]); +void SHA1RawTransformBlocks(uint32 state[5], + const unsigned char *buffer, + uint32 numBlocks); +void SHA1RawInit(uint32 state[5]); + +#define SHA1_MULTI_MAX_BUFFERS 8 + +void SHA1MultiBuffer(uint32 numBuffers, + uint32 len, + const void *data[], + unsigned char *digests[]); #endif // defined __APPLE__ && defined USERLEVEL diff --git a/open-vm-tools/lib/include/sigPosixRegs.h b/open-vm-tools/lib/include/sigPosixRegs.h index 08ee2c6ee..35dbceb69 100644 --- a/open-vm-tools/lib/include/sigPosixRegs.h +++ b/open-vm-tools/lib/include/sigPosixRegs.h @@ -142,6 +142,11 @@ #define SC_SP(uc) ((unsigned long) (uc)->uc_mcontext->__ss.__sp) #define SC_LR(uc) ((unsigned long) (uc)->uc_mcontext->__ss.__lr) #define SC_PC(uc) ((unsigned long) (uc)->uc_mcontext->__ss.__pc) +#elif defined(__aarch64__) +#define SC_X(uc,n) ((unsigned long) (uc)->uc_mcontext->__ss.__x[n]) +#define SC_SP(uc) ((unsigned long) (uc)->uc_mcontext->__ss.__sp) +#define SC_PC(uc) ((unsigned long) (uc)->uc_mcontext->__ss.__pc) +#define SC_PSR(uc) ((unsigned long) (uc)->uc_mcontext->__ss.__cpsr) #else #define SC_EAX(uc) ((unsigned long) (uc)->uc_mcontext->__ss.__eax) #define SC_EBX(uc) ((unsigned long) (uc)->uc_mcontext->__ss.__ebx) @@ -274,6 +279,7 @@ #define SC_X(uc,n) ((unsigned long) (uc)->uc_mcontext.regs[n]) #define SC_SP(uc) ((unsigned long) (uc)->uc_mcontext.sp) #define SC_PC(uc) ((unsigned long) (uc)->uc_mcontext.pc) +#define SC_PSR(uc) ((unsigned long) (uc)->uc_mcontext.pstate) #else #define SC_EAX(uc) ((unsigned long) (uc)->uc_mcontext.gregs[GNU_REG_EAX]) #define SC_EBX(uc) ((unsigned long) (uc)->uc_mcontext.gregs[GNU_REG_EBX]) diff --git a/open-vm-tools/lib/include/sslDirect.h b/open-vm-tools/lib/include/sslDirect.h index a635983ca..85a6976e4 100644 --- a/open-vm-tools/lib/include/sslDirect.h +++ b/open-vm-tools/lib/include/sslDirect.h @@ -59,5 +59,7 @@ int SSL_WantRead(const SSLSock ssl); #define SSLGeneric_close(sock) close(sock) #endif +void *SSL_NewContext(void); + #endif // ifndef _SSLDIRECT_H_ diff --git a/open-vm-tools/lib/include/unicodeBase.h b/open-vm-tools/lib/include/unicodeBase.h index 0cffbe336..daa3701c0 100644 --- a/open-vm-tools/lib/include/unicodeBase.h +++ b/open-vm-tools/lib/include/unicodeBase.h @@ -80,8 +80,8 @@ extern "C" { */ char *Unicode_AllocWithLength(const void *buffer, - ssize_t lengthInBytes, - StringEncoding encoding); + ssize_t lengthInBytes, + StringEncoding encoding); /* @@ -174,9 +174,10 @@ Unicode_AllocWithUTF16(const utf16_t *utf16String) // IN char *Unicode_Duplicate(const char *str); char **Unicode_AllocList(char **srcList, ssize_t length, - StringEncoding encoding); + StringEncoding encoding); -char **Unicode_GetAllocList(char *const srcList[], ssize_t length, +char **Unicode_GetAllocList(char *const srcList[], + ssize_t length, StringEncoding encoding); /* @@ -209,7 +210,8 @@ Unicode_AllocListWithUTF16(utf16_t **utf16list, // IN: /* * Compute the number of bytes in a string. */ -ssize_t Unicode_LengthInBytes(const void *buffer, StringEncoding encoding); +ssize_t Unicode_LengthInBytes(const void *buffer, + StringEncoding encoding); /* * Gets the number of UTF-16 code units in the NUL-terminated UTF-16 array. @@ -228,6 +230,8 @@ Bool Unicode_IsBufferValid(const void *buffer, ssize_t lengthInBytes, StringEncoding encoding); +Bool Unicode_IsStringValidUTF8(const char *str); + /* * Tests if the buffer's unicode contents can be converted to the * specified encoding. diff --git a/open-vm-tools/lib/include/util.h b/open-vm-tools/lib/include/util.h index 2e1d4deed..e958c043c 100644 --- a/open-vm-tools/lib/include/util.h +++ b/open-vm-tools/lib/include/util.h @@ -95,7 +95,6 @@ char *Util_CompatGetLowerCaseCanonicalPath(const char* path); int Util_BumpNoFds(uint32 *cur, uint32 *wanted); Bool Util_CanonicalPathsIdentical(const char *path1, const char *path2); Bool Util_IsAbsolutePath(const char *path); -unsigned Util_GetPrime(unsigned n0); Util_ThreadID Util_GetCurrentThreadId(void); char *Util_DeriveFileName(const char *source, @@ -168,13 +167,9 @@ Bool Util_QueryCStResidency(uint32 *numCpus, uint32 *numCStates, uint64 **transTime, uint64 **residTime); #endif -/* - * In util_shared.h - */ #define UTIL_FASTRAND_SEED_MAX (0x7fffffff) Bool Util_Throttle(uint32 count); uint32 Util_FastRand(uint32 seed); -uint64 Util_CheckSum64(uint32 *data, unsigned numWords); // Not thread safe! void Util_OverrideHomeDir(const char *path); diff --git a/open-vm-tools/lib/include/util_shared.h b/open-vm-tools/lib/include/util_shared.h deleted file mode 100644 index a061f1199..000000000 --- a/open-vm-tools/lib/include/util_shared.h +++ /dev/null @@ -1,198 +0,0 @@ -/********************************************************* - * Copyright (C) 2002-2015 VMware, Inc. All rights reserved. - * - * This program 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 version 2.1 and no 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 Lesser GNU General Public - * License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - *********************************************************/ - -#define INCLUDE_ALLOW_USERLEVEL - -#define INCLUDE_ALLOW_VMCORE -#define INCLUDE_ALLOW_VMKERNEL -#include "includeCheck.h" - -#include "vm_assert.h" -#include "vm_basic_types.h" - -/* - * Defines util functions shared between the userlevel code and the monitor. - */ - -/* - *---------------------------------------------------------------------- - * - * Util_Throttle -- - * - * Use for throttling of warnings. - * - * Results: - * Will return TRUE for an increasingly sparse set of counter values: - * 1, 2, ..., 100, 200, 300, ..., 10000, 20000, 30000, ..., . - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -Bool -Util_Throttle(uint32 count) // IN: -{ - return count < 100 || - (count < 10000 && count % 100 == 0) || - (count < 1000000 && count % 10000 == 0) || - count % 1000000 == 0; -} - - -/* - *---------------------------------------------------------------------- - * - * Util_FastRand -- - * - * Generates the next random number in the pseudo-random sequence - * defined by the multiplicative linear congruential generator - * S' = 16807 * S mod (2^31 - 1). - * This is the ACM "minimal standard random number generator". - * Based on method described by D.G. Carta in CACM, January 1990. - * Usage: provide previous random number as the seed for next one. - * - * Precondition: - * 0 < seed && seed < UTIL_FASTRAND_SEED_MAX - * - * Results: - * A random number. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -uint32 -Util_FastRand(uint32 seed) -{ - uint64 product = 33614 * (uint64)seed; - uint32 product_lo = (uint32)(product & 0xffffffff) >> 1; - uint32 product_hi = product >> 32; - int32 test = product_lo + product_hi; - - ASSERT(0 < seed && seed < UTIL_FASTRAND_SEED_MAX); - - return (test > 0) ? test : (test & UTIL_FASTRAND_SEED_MAX) + 1; -} - - -/* - *---------------------------------------------------------------------- - * Util_Checksum64 -- - * 64-bit implementation of Fletcher's checksum. Fast and simple. - * Guarantees a non-zero checksum (so 0 can mean "uninitialized"). - * One known weakness is that the 32-bit value of 0 is - * indistinguishable from ~0. The magic number 92680 was computed - * to be the most iterations before sum2 could overflow 64 bits. - *---------------------------------------------------------------------- - */ -uint64 -Util_CheckSum64(uint32 *data, unsigned numWords) -{ - uint64 sum1 = 0xffffffff, sum2 = 0xffffffff; - - while (numWords > 0) { - unsigned tlen = numWords > 92680 ? 92680 : numWords; - numWords -= tlen; - do { - sum1 += *data++; - sum2 += sum1; - } while (--tlen > 0); - sum1 = (sum1 & 0xffffffff) + (sum1 >> 32); - sum2 = (sum2 & 0xffffffff) + (sum2 >> 32); - } - /* Second reduction step to reduce sums to 32 bits */ - sum1 = (sum1 & 0xffffffff) + (sum1 >> 32); - sum2 = (sum2 & 0xffffffff) + (sum2 >> 32); - return (sum2 << 32) | sum1; -} - - -#if defined(USERLEVEL) || defined(VMX86_DEBUG) -static uint32 crcTable[256]; - -static void -UtilCRCMakeTable(void) -{ - uint32 c; - int n, k; - - for (n = 0; n < 256; n++) { - c = (uint32) n; - for (k = 0; k < 8; k++) { - if (c & 1) { - c = 0xedb88320L ^ (c >> 1); - } else { - c = c >> 1; - } - } - crcTable[n] = c; - } -} - -static INLINE_SINGLE_CALLER uint32 -UtilCRCUpdate(uint32 crc, - const uint8 *buf, - int len) -{ - uint32 c = crc; - int n; - static int crcTableComputed = 0; - - if (!crcTableComputed) { - UtilCRCMakeTable(); - - crcTableComputed = 1; - } - - for (n = 0; n < len; n++) { - c = crcTable[(c ^ buf[n]) & 0xff] ^ (c >> 8); - } - - return c; -} - - -/* - *---------------------------------------------------------------------- - * - * CRC_Compute -- - * - * computes the CRC of a block of data - * - * Results: - * - * CRC code - * - * Side effects: - * Sets up the crc table if it hasn't already been computed. - * - *---------------------------------------------------------------------- - */ - -uint32 -CRC_Compute(const uint8 *buf, - int len) -{ - return UtilCRCUpdate(0xffffffffL, buf, len) ^ 0xffffffffL; -} - -#endif /* defined (USERLEVEL) || defined(VMX86_DEBUG) */ diff --git a/open-vm-tools/lib/include/uuid.h b/open-vm-tools/lib/include/uuid.h index cad5de3e1..56cd8c27e 100644 --- a/open-vm-tools/lib/include/uuid.h +++ b/open-vm-tools/lib/include/uuid.h @@ -35,7 +35,17 @@ extern "C"{ #define UUID_SIZE 16 #define UUID_STRSIZE (2*UUID_SIZE + 1) -#define UUID_MAXLEN 48 +#define UUID_MAXLEN 48 + +/* + * ISO 11578 (now X.667 section 6.4) defines the canonical text format of a + * UUID, which looks like this example: + * + * "f81d4fae-7dec-11d0-a765-00a0c91e6bf6" + * + * It is always precisely 36 characters long (excluding terminating NUL). + */ +#define UUID_ISO_11578_LEN 36 typedef enum { UUID_WITH_PATH = 0, @@ -135,7 +145,7 @@ EFIGUID; Bool UUID_ConvertToBin(uint8 dest_id[UUID_SIZE], const char *text); char *UUID_ConvertToText(const uint8 id[UUID_SIZE]); - +void UUID_ConvertToTextBuf(const uint8 id[UUID_SIZE], char *buffer, size_t len); char *UUID_Create(const char *configFileFullPath, int schemeControl); char *UUID_CreateRandom(void); void UUID_CreateRandomRFC4122V4(UUIDRFC4122 *id); diff --git a/open-vm-tools/lib/include/vmGuestLib.h b/open-vm-tools/lib/include/vmGuestLib.h index 825cd1752..59339019b 100644 --- a/open-vm-tools/lib/include/vmGuestLib.h +++ b/open-vm-tools/lib/include/vmGuestLib.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2003-2008 VMware, Inc. All rights reserved. + * Copyright (C) 2003-2015 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/vm_atomic.h b/open-vm-tools/lib/include/vm_atomic.h index 187a0d148..df5efe89c 100644 --- a/open-vm-tools/lib/include/vm_atomic.h +++ b/open-vm-tools/lib/include/vm_atomic.h @@ -526,7 +526,63 @@ typedef struct Atomic_Bool { } Atomic_Bool; /* The ARM team can come along and add the code real soon now */ +#if defined(VM_ARM_32) || defined(VM_ARM_64) extern Bool AtomicUndefinedOnARM(void); +MY_ASSERTS(ARM64_BOOL_SIZE, + ASSERT_ON_COMPILE(sizeof(Atomic_Bool) == sizeof(uint8)); + ) +#endif + +#if defined VMKERNEL || defined VMM || defined VM_ARM_64 +/* + *----------------------------------------------------------------------------- + * + * CMPXCHG1B -- + * + * Compare and exchange a single byte. + * + * Results: + * The value read from ptr. + * + * Side effects: + * None + * + *----------------------------------------------------------------------------- + */ +static INLINE uint8 +CMPXCHG1B(volatile uint8 *ptr, // IN/OUT + uint8 oldVal, // IN + uint8 newVal) // IN +{ + uint8 val; + +#if defined(VM_ARM_64) + register uint32 failed; + + __asm__ __volatile__ ( + " dmb sy \n\t" + "1: ldxrb %w0, [%2] \n\t" + " cmp %w0, %w3, UXTB \n\t" + " b.ne 2f \n\t" + " stxrb %w1, %w4, [%2] \n\t" + " cbnz %w1, 1b \n\t" + "2: clrex \n\t" + " dmb sy \n\t" + : "=&r" (val), "=&r" (failed) + : "r" (ptr), "r" (oldVal), "r" (newVal) + : "cc", "memory"); +#else + __asm__ __volatile__("lock; cmpxchgb %b2, %1" + : "=a" (val), + "+m" (*ptr) + : "r" (newVal), + "0" (oldVal) + : "cc"); + +#endif /* defined(VM_ARM_64) */ + return val; +} +#endif /* *----------------------------------------------------------------------------- @@ -549,8 +605,15 @@ Atomic_ReadBool(Atomic_Bool const *var) // IN: { Bool val; -#if defined(__GNUC__) && (defined(VM_ARM_32) || defined(VM_ARM_64)) +#if defined(__GNUC__) && defined(VM_ARM_32) val = AtomicUndefinedOnARM(); +#elif defined(__GNUC__) && defined(VM_ARM_64) + __asm__ __volatile__ ( + "ldrb %w0, [%1]" + : "=r" (val) + : "r" (&var->value) + ); + #elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) __asm__ __volatile__( "movb %1, %0" @@ -587,8 +650,25 @@ static INLINE Bool Atomic_ReadWriteBool(Atomic_Bool *var, // IN/OUT: Bool val) // IN: { -#if defined(__GNUC__) && (defined(VM_ARM_32) || defined(VM_ARM_64)) +#if defined(__GNUC__) && defined(VM_ARM_32) return AtomicUndefinedOnARM(); +#elif defined(__GNUC__) && defined(VM_ARM_64) + register Bool retVal; + register uint32 failed; + + __asm__ __volatile__( + " dmb sy \n\t" + "1: ldxrb %w0, [%2] \n\t" + " stxrb %w1, %w3, [%2] \n\t" + " cbnz %w1, 1b \n\t" + " dmb sy \n\t" + : "=&r" (retVal), "=&r" (failed) + : "r" (&var->value), "r" (val) + : "memory" + ); + + return retVal; + #elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) __asm__ __volatile__( "xchgb %0, %1" @@ -637,8 +717,10 @@ static INLINE void Atomic_WriteBool(Atomic_Bool *var, // IN/OUT: Bool val) // IN: { -#if defined(__GNUC__) && (defined(VM_ARM_32) || defined(VM_ARM_64)) +#if defined(__GNUC__) && defined(VM_ARM_32) AtomicUndefinedOnARM(); +#elif defined(__GNUC__) && defined(VM_ARM_64) + Atomic_ReadWriteBool(var, val); #elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) __asm__ __volatile__( "movb %1, %0" @@ -674,8 +756,10 @@ Atomic_ReadIfEqualWriteBool(Atomic_Bool *var, // IN/OUT: Bool oldVal, // IN: Bool newVal) // IN: { -#if defined(__GNUC__) && (defined(VM_ARM_32) || defined(VM_ARM_64)) +#if defined(__GNUC__) && defined(VM_ARM_32) return AtomicUndefinedOnARM(); +#elif defined(__GNUC__) && defined(VM_ARM_64) + return (Bool)CMPXCHG1B((volatile uint8 *)&var->value, oldVal, newVal); #elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) Bool val; @@ -1871,41 +1955,6 @@ Atomic_ReadDec32(Atomic_uint32 *var) // IN/OUT } -#if defined VMKERNEL || defined VMM -#if !defined(VM_ARM_64) -/* - *----------------------------------------------------------------------------- - * - * CMPXCHG1B -- - * - * Compare and exchange a single byte. - * - * Results: - * The value read from ptr. - * - * Side effects: - * None - * - *----------------------------------------------------------------------------- - */ -static INLINE uint8 -CMPXCHG1B(volatile uint8 *ptr, // IN/OUT - uint8 oldVal, // IN - uint8 newVal) // IN -{ - uint8 val; - __asm__ __volatile__("lock; cmpxchgb %b2, %1" - : "=a" (val), - "+m" (*ptr) - : "r" (newVal), - "0" (oldVal) - : "cc"); - return val; -} -#endif /* !defined(VM_ARM_64) */ -#endif - - /* * Usage of this helper struct is strictly reserved to the following * function. --hpreg diff --git a/open-vm-tools/lib/include/vm_basic_asm.h b/open-vm-tools/lib/include/vm_basic_asm.h index e00109b09..219c2dfbb 100644 --- a/open-vm-tools/lib/include/vm_basic_asm.h +++ b/open-vm-tools/lib/include/vm_basic_asm.h @@ -687,7 +687,7 @@ static INLINE uint16 Bswap16(uint16 v) { #if defined(VM_ARM_64) - __asm__("rev16 %0, %0" : "+r"(v)); + __asm__("rev16 %w0, %w0" : "+r"(v)); return v; #else return ((v >> 8) & 0x00ff) | ((v << 8) & 0xff00); @@ -720,7 +720,7 @@ Bswap32(uint32 v) // IN __asm__("rev %0, %0" : "+r"(v)); return v; #elif defined(VM_ARM_64) - __asm__("rev32 %0, %0" : "+r"(v)); + __asm__("rev32 %x0, %x0" : "+r"(v)); return v; #else return (v >> 24) diff --git a/open-vm-tools/lib/include/vm_basic_defs.h b/open-vm-tools/lib/include/vm_basic_defs.h index 81c5e218d..945aa8bfb 100644 --- a/open-vm-tools/lib/include/vm_basic_defs.h +++ b/open-vm-tools/lib/include/vm_basic_defs.h @@ -338,6 +338,22 @@ Max(int a, int b) #define VM_PAE_LARGE_2_SMALL_PAGES (BYTES_2_PAGES(VM_PAE_LARGE_PAGE_SIZE)) #endif +#ifndef VM_1GB_PAGE_SHIFT +#define VM_1GB_PAGE_SHIFT 30 +#endif + +#ifndef VM_1GB_PAGE_SIZE +#define VM_1GB_PAGE_SIZE (1 << VM_1GB_PAGE_SHIFT) +#endif + +#ifndef VM_1GB_2_PAGES +#define VM_1GB_2_PAGES (BYTES_2_PAGES(VM_1GB_PAGE_SIZE)) +#endif + +#ifndef VM_1GB_2_PDIRS +#define VM_1GB_2_PDIRS (VM_1GB_PAGE_SIZE / VM_PAE_LARGE_PAGE_SIZE) +#endif + /* * Word operations */ @@ -820,6 +836,7 @@ typedef int pid_t; #define SIZE_80BIT 10 #define SIZE_128BIT 16 #define SIZE_256BIT 32 +#define SIZE_512BIT 64 #endif // ifndef _VM_BASIC_DEFS_H_ diff --git a/open-vm-tools/lib/include/vm_basic_types.h b/open-vm-tools/lib/include/vm_basic_types.h index f5e639f65..32588f718 100644 --- a/open-vm-tools/lib/include/vm_basic_types.h +++ b/open-vm-tools/lib/include/vm_basic_types.h @@ -351,6 +351,19 @@ typedef uint32 uintptr_t; #endif +#if defined(__GNUC__) && defined(__SIZEOF_INT128__) + +typedef unsigned __int128 uint128; +typedef __int128 int128; + +#define MIN_INT128 ((int128)1 << 127) +#define MAX_INT128 (~MIN_INT128) +#define MIN_UINT128 ((uint128)0) +#define MAX_UINT128 (~MIN_UINT128) + +#endif + + /* * Time * XXX These should be cleaned up. -- edward diff --git a/open-vm-tools/lib/include/vm_device_version.h b/open-vm-tools/lib/include/vm_device_version.h index d9d0dacdc..c032b30cb 100644 --- a/open-vm-tools/lib/include/vm_device_version.h +++ b/open-vm-tools/lib/include/vm_device_version.h @@ -74,6 +74,7 @@ #define PCI_DEVICE_ID_VMWARE_PVSCSI 0x07C0 #define PCI_DEVICE_ID_VMWARE_82574 0x07D0 #define PCI_DEVICE_ID_VMWARE_AHCI 0x07E0 +#define PCI_DEVICE_ID_VMWARE_NVME 0x07F0 #define PCI_DEVICE_ID_VMWARE_HDAUDIO_CODEC 0x1975 #define PCI_DEVICE_ID_VMWARE_HDAUDIO_CONTROLLER 0x1977 @@ -118,7 +119,7 @@ * Intel 82545EM (e1000, server adapter, single port) * Intel 82546EB (e1000, server adapter, dual port) * Intel HECI (as embedded in ich9m) - * Intel XHCI (as embedded in PANTHERPOINT) + * Intel XHCI (Panther Point / Intel 7 Series) */ #define PCI_VENDOR_ID_INTEL 0x8086 #define PCI_DEVICE_ID_INTEL_82439TX 0x7100 @@ -136,6 +137,11 @@ #define PCI_DEVICE_ID_INTEL_HECI 0x2a74 #define PCI_DEVICE_ID_INTEL_PANTHERPOINT_XHCI 0x1e31 +/* From drivers/usb/host/xhci-pci.c: + * Intel XHCI (Lynx Point / Intel 8 Series) + */ +#define PCI_DEVICE_ID_INTEL_LYNXPOINT_XHCI 0x8c31 + #define E1000E_PCI_DEVICE_ID_CONFIG_STR "e1000e.pci.deviceID" #define E1000E_PCI_SUB_VENDOR_ID_CONFIG_STR "e1000e.pci.subVendorID" #define E1000E_PCI_SUB_DEVICE_ID_CONFIG_STR "e1000e.pci.subDeviceID" @@ -193,6 +199,13 @@ #define SCSI_CDROM_VENDOR_NAME COMPANY_NAME #define SCSI_CDROM_REV_LEVEL "1.0" +/************* NVME implementation limits ********************************/ +#define NVME_MAX_CONTROLLERS 4 +#define NVME_MIN_NAMESPACES 1 +#define NVME_MAX_NAMESPACES 15 /* We support only 15 namespaces same + * as SCSI devices. + */ + /************* SCSI implementation limits ********************************/ #define SCSI_MAX_CONTROLLERS 4 // Need more than 1 for MSCS clustering #define SCSI_MAX_DEVICES 16 // BT-958 emulates only 16 @@ -213,6 +226,7 @@ #define MAX_NUM_DISKS \ ((SATA_MAX_CONTROLLERS * SATA_MAX_DEVICES) + \ (SCSI_MAX_CONTROLLERS * SCSI_MAX_DEVICES) + \ + (NVME_MAX_CONTROLLERS * NVME_MAX_NAMESPACES) + \ (IDE_NUM_INTERFACES * IDE_DRIVES_PER_IF)) /* @@ -223,7 +237,17 @@ #define SCSI_IDE_CHANNEL SCSI_MAX_CONTROLLERS #define SCSI_IDE_HOSTED_CHANNEL (SCSI_MAX_CONTROLLERS + 1) #define SCSI_SATA_CHANNEL_FIRST (SCSI_IDE_HOSTED_CHANNEL + 1) -#define SCSI_MAX_CHANNELS (SCSI_SATA_CHANNEL_FIRST + SATA_MAX_CONTROLLERS) +#define SCSI_NVME_CHANNEL_FIRST (SCSI_SATA_CHANNEL_FIRST + \ + SATA_MAX_CONTROLLERS) +#define SCSI_MAX_CHANNELS (SCSI_NVME_CHANNEL_FIRST + \ + NVME_MAX_CONTROLLERS) + +/************* SCSI-NVME channel IDs *******************************/ +#define NVME_ID_TO_SCSI_ID(nvmeId) \ + (SCSI_NVME_CHANNEL_FIRST + (nvmeId)) + +#define SCSI_ID_TO_NVME_ID(scsiId) \ + ((scsiId) - SCSI_NVME_CHANNEL_FIRST) /************* SCSI-SATA channel IDs********************************/ #define SATA_ID_TO_SCSI_ID(sataId) \ @@ -259,6 +283,7 @@ #define MAX_USB_DEVICES_PER_HOST_CONTROLLER 127 /************* NVDIMM implementation limits ********************************/ +#define NVDIMM_MAX_CONTROLLERS 1 #define MAX_NVDIMM 64 /************* vRDMA implementation limits ******************************/ diff --git a/open-vm-tools/lib/include/vm_product.h b/open-vm-tools/lib/include/vm_product.h index a18227588..792a18024 100644 --- a/open-vm-tools/lib/include/vm_product.h +++ b/open-vm-tools/lib/include/vm_product.h @@ -69,7 +69,7 @@ #define PRODUCT_MAC_DESKTOP_BRIEF_NAME "Fusion" #define PRODUCT_ACE_MANAGEMENT_SERVER_BRIEF_NAME "ACE Management Server" #define PRODUCT_VMRC_BRIEF_NAME "Remote Console" -#define PRODUCT_GANTRY_BRIEF_NAME "Gantry" +#define PRODUCT_GANTRY_BRIEF_NAME "AppCatalyst" /* @@ -151,8 +151,6 @@ #define PRODUCT_XVP_NAME MAKE_NAME("vCenter XVP Manager") #define PRODUCT_RMKSCONTAINER_NAME MAKE_NAME("Remote MKS Container") -#define PRODUCT_BOOMERANG_NAME MAKE_NAME("Boomerang") - #define PRODUCT_HBR_SERVER_NAME MAKE_NAME("vSphere Replication Server") #define PRODUCT_VIEW_SHORT_NAME "Horizon View" @@ -221,7 +219,6 @@ || defined(VMX86_DDK) \ || defined(VMX86_VDDK) \ || defined(VMX86_NETDUMP) \ - || defined(VMX86_BOOMERANG) \ || defined(VMX86_HBR_SERVER) \ || defined(VMX86_VMCF) \ || defined(VMX86_GANTRY) \ @@ -300,8 +297,6 @@ # define PRODUCT_SHORT_NAME PRODUCT_VDDK_NAME #elif defined(VMX86_NETDUMP) # define PRODUCT_SHORT_NAME PRODUCT_NETDUMP_NAME -#elif defined(VMX86_BOOMERANG) -# define PRODUCT_SHORT_NAME PRODUCT_BOOMERANG_NAME #elif defined(VMX86_HBR_SERVER) # define PRODUCT_SHORT_NAME PRODUCT_HBR_SERVER_NAME #elif defined(VMX86_HORIZON_VIEW) @@ -402,7 +397,10 @@ * product. */ # if defined(__APPLE__) -# if defined VMX86_DESKTOP +# if defined VMX86_GANTRY +# define VMWARE_HOST_DIRECTORY_PREFIX \ + "/Library/Preferences/" PRODUCT_SHORT_NAME +# elif defined VMX86_DESKTOP # define VMWARE_HOST_DIRECTORY_PREFIX \ "/Library/Preferences/" PRODUCT_SHORT_NAME # else @@ -466,6 +464,9 @@ # if defined(VMX86_VMRC) /* check VMX86_VMRC before VMX86_DESKTOP */ # define PRODUCT_NAME_FOR_LICENSE PRODUCT_VMRC_NAME # define PRODUCT_SMP_NAME_FOR_LICENSE "" // None +# elif defined(VMX86_FLEX) /* check VMX86_FLEX before VMX86_DESKTOP */ +# define PRODUCT_NAME_FOR_LICENSE PRODUCT_FLEX_NAME +# define PRODUCT_SMP_NAME_FOR_LICENSE "" // None # elif defined(VMX86_DESKTOP) # if defined(__APPLE__) # define PRODUCT_NAME_FOR_LICENSE PRODUCT_MAC_DESKTOP_NAME_FOR_LICENSE diff --git a/open-vm-tools/lib/include/vm_product_versions.h b/open-vm-tools/lib/include/vm_product_versions.h index 9793bbe8c..a1f8f7fdc 100644 --- a/open-vm-tools/lib/include/vm_product_versions.h +++ b/open-vm-tools/lib/include/vm_product_versions.h @@ -39,7 +39,9 @@ #if defined(VMX86_VIEWCLIENT) #define PRODUCT_VERSION 3,0,0,PRODUCT_BUILD_NUMBER_NUMERIC #elif defined(VMX86_VMRC) /* check VMX86_VMRC before VMX86_DESKTOP */ - #define PRODUCT_VERSION 7,0,1,PRODUCT_BUILD_NUMBER_NUMERIC /* VMRC_VERSION_NUMBER below has to match this */ + #define PRODUCT_VERSION 8,0,0,PRODUCT_BUILD_NUMBER_NUMERIC /* VMRC_VERSION_NUMBER below has to match this */ +#elif defined(VMX86_FLEX) /* check VMX86_FLEX before VMX86_DESKTOP */ + #define PRODUCT_VERSION 8,0,0,PRODUCT_BUILD_NUMBER_NUMERIC /* FLEX_VERSION_NUMBER below has to match this */ #elif defined(VMX86_DESKTOP) #define PRODUCT_VERSION 12,0,0,PRODUCT_BUILD_NUMBER_NUMERIC /* WORKSTATION_VERSION_NUMBER below has to match this */ #elif defined(VMX86_TOOLS) @@ -50,13 +52,12 @@ #define PRODUCT_VERSION 1,1,5,PRODUCT_BUILD_NUMBER_NUMERIC #elif defined(VMX86_VPX) /* this should be kept in sync with the corresponding vpx branch. */ - #define PRODUCT_VERSION 6,0,0,PRODUCT_BUILD_NUMBER_NUMERIC -#elif defined(VMX86_BOOMERANG) - #define PRODUCT_VERSION 1,0,0,PRODUCT_BUILD_NUMBER_NUMERIC + #define PRODUCT_VERSION 6,1,0,PRODUCT_BUILD_NUMBER_NUMERIC #elif defined(VMX86_HORIZON_VIEW) #define PRODUCT_VERSION 0,0,0,PRODUCT_BUILD_NUMBER_NUMERIC #else - #define PRODUCT_VERSION 8,0,0,PRODUCT_BUILD_NUMBER_NUMERIC /* PLAYER_VERSION_NUMBER below has to match this */ + /* Generic catch-all. */ + #define PRODUCT_VERSION 0,0,0,PRODUCT_BUILD_NUMBER_NUMERIC #endif /* @@ -83,7 +84,7 @@ * VMI 2.0 : 3.1.0 * P2VA 3.0 : 3.?.? */ -#define VIE_FILEVERSION 6,0,0,PRODUCT_BUILD_NUMBER_NUMERIC +#define VIE_FILEVERSION 6,1,0,PRODUCT_BUILD_NUMBER_NUMERIC /* * This string can be a little more "free form". The license @@ -106,12 +107,6 @@ */ /* - * When updating the ESX_VERSION* and ESX_RELEASE* macros, you will also - * need to update: - * - * > bora/support/gobuild/targets/server.py - * > console-os26/SOURCES/kernel-2.6.spec - * * Rules for updating the ESX_RELEASE_* macros: * * Set UPDATE to 0 for all experimental/prerelease/and initial major and minor @@ -133,7 +128,7 @@ * 4.0.0-1.8: patch 3 */ #define ESX_VERSION_MAJOR "6" -#define ESX_VERSION_MINOR "0" +#define ESX_VERSION_MINOR "1" #define ESX_VERSION_MAINT "0" #define ESX_VERSION ESX_VERSION_MAJOR "." ESX_VERSION_MINOR "." \ ESX_VERSION_MAINT @@ -161,13 +156,16 @@ * necessary VIX changes also need to be done. See bug 939456. * * ALSO, leave FOO_VERSION at e.x.p on all EXCEPT release branches. + * lmclient.h has a FLEX_VERSION struct so the versionPrefix can't be FLEX */ #define WORKSTATION_VERSION_NUMBER "12.0.0" /* this version number should always match real WS version number */ #define WORKSTATION_VERSION "e.x.p" -#define PLAYER_VERSION_NUMBER "8.0.0" /* this version number should always match real Player version number */ +#define PLAYER_VERSION_NUMBER "12.0.0" /* this version number should always match real Player version number */ #define PLAYER_VERSION "e.x.p" -#define VMRC_VERSION_NUMBER "7.0.1" /* this version number should always match real VMRC version number */ -#define VMRC_VERSION "7.0.1" +#define VMRC_VERSION_NUMBER "8.0.0" /* this version number should always match real VMRC version number */ +#define VMRC_VERSION "8.0.0" +#define FLEX_CLIENT_VERSION_NUMBER "8.0.0" +#define FLEX_CLIENT_VERSION "e.x.p" #define GANTRY_VERSION "e.x.p" @@ -180,27 +178,33 @@ */ #define FUSION_VERSION "e.x.p" -#define BOOMERANG_VERSION "e.x.p" - // These must match VIE_FILEVERSION above -#define SYSIMAGE_VERSION "6.0.0" +#define SYSIMAGE_VERSION "6.1.0" #define SYSIMAGE_FILE_VERSION VIE_FILEVERSION #define VCB_VERSION "4.0.0" #define VCB_FILE_VERSION 4,0,0,0 -#define VIM_VERSION "6.0.0" +#define VIM_VERSION "6.1.0" // Put VPX_VERSION first, because vpx/make/defs.mk doesn't check for suffix. -#define VPX_VERSION "6.0.0" +#define VPX_VERSION "6.1.0" #define VPX_VERSION_MAJOR "6" -#define VPX_VERSION_MINOR "0" +#define VPX_VERSION_MINOR "1" #define VPX_VERSION_MAINT "0" #define VPX_VERSION_THIRD_PARTY VPX_VERSION_MAJOR VPX_VERSION_MINOR \ VPX_VERSION_MAINT + +#define MAX_SUPPORTED_VI_VERSION "6.1" //from ovfTool/src/supportedVersions.h +#define VCDB_CURRENT_SCHEMA_VERSION 610 // from PitCADatabase.h + #define VPX_RELEASE_UPDATE "0" /* 0 = Pre-release/GA, 1 = Update 1 */ #define VPX_RELEASE_PATCH "0" /* 0 = experimental */ #define VPX_RELEASE VPX_RELEASE_UPDATE "." VPX_RELEASE_PATCH +/* expected database version for current release */ +#define VPXD_VDB_DB_VERSION_ID 610 +#define VPXD_VDB_DB_VERSION_VALUE "VirtualCenter Database 6.1" + #define SVA_VERSION "1.0.0" #define SSO_VERSION "1.0.0" #define WBC_VERSION "5.1.0" @@ -226,15 +230,15 @@ #define VIEWY_VERSION "e.x.p" #define VMCFSDK_VERSION "e.x.p" #define PCOIP_VERSION "e.x.p" -#define VIEW_VERSION "6.1.1" +#define VIEW_VERSION "6.2.0" #define HOSTD_VERSION "e.x.p" #define RECOVERYLIBS_VERSION "2.0.0" #define PRECHECK_VERSION "e.x.p" #define VIEW_FEATUREPACK_VERSION "5.2.0" -#define VIEW_CLIENT_VERSION_NUMBER "2.3.0" -#define VIEW_CLIENT_VERSION "e.x.p" +#define VIEW_CLIENT_VERSION_NUMBER "3.5.0" +#define VIEW_CLIENT_VERSION "3.5.0" #define VHSESDK_VERSION "1.0.0" -#define RDE_RFT_ALL_VERSION "2.3.0" +#define RDE_RFT_ALL_VERSION "3.5.0" #define RDESDK_VERSION "2.0.0" #define RDESDKREL_VERSION "2.0.0" #define MKSVCHANDEV_VERSION "1.0.0" @@ -267,6 +271,8 @@ # define PRODUCT_VERSION_NUMBER VDM_CLIENT_VERSION #elif defined(VMX86_VMRC) /* check VMX86_VMRC before VMX86_DESKTOP */ # define PRODUCT_VERSION_NUMBER VMRC_VERSION +#elif defined(VMX86_FLEX) /* check VMX86_FLEX before VMX86_DESKTOP */ +# define PRODUCT_VERSION_NUMBER FLEX_VERSION #elif defined(VMX86_GANTRY) # define PRODUCT_VERSION_NUMBER GANTRY_VERSION #elif defined(VMX86_SERVER) @@ -311,8 +317,6 @@ # define PRODUCT_VERSION_NUMBER TOOLS_VERSION #elif defined(VMX86_VDDK) # define PRODUCT_VERSION_NUMBER VDDK_VERSION -#elif defined(VMX86_BOOMERANG) -# define PRODUCT_VERSION_NUMBER BOOMERANG_VERSION #elif defined(VMX86_HBR_SERVER) # define PRODUCT_VERSION_NUMBER ESX_VERSION #elif defined(VMX86_HORIZON_VIEW) @@ -341,9 +345,10 @@ * a parameter that no longer match the content of the dormant license * file. */ -#define PRODUCT_MAC_DESKTOP_VERSION_STRING_FOR_LICENSE "7.0" -#define PRODUCT_PLAYER_VERSION_STRING_FOR_LICENSE "7.0" -#define PRODUCT_VMRC_VERSION_STRING_FOR_LICENSE "7.0" +#define PRODUCT_MAC_DESKTOP_VERSION_STRING_FOR_LICENSE "8.0" +#define PRODUCT_PLAYER_VERSION_STRING_FOR_LICENSE "12.0" +#define PRODUCT_VMRC_VERSION_STRING_FOR_LICENSE "8.0" +#define PRODUCT_FLEX_VERSION_STRING_FOR_LICENSE "8.0" #if defined(VMX86_TOOLS) /* This product doesn't use a license */ @@ -354,6 +359,8 @@ # define PRODUCT_LICENSE_VERSION "6.0" # elif defined(VMX86_VMRC) /* check VMX86_VMRC before VMX86_DESKTOP */ # define PRODUCT_LICENSE_VERSION PRODUCT_VMRC_VERSION_STRING_FOR_LICENSE +# elif defined(VMX86_FLEX) /* check VMX86_FLEX before VMX86_DESKTOP */ +# define PRODUCT_LICENSE_VERSION PRODUCT_FLEX_VERSION_STRING_FOR_LICENSE # elif defined(VMX86_GANTRY) # define PRODUCT_LICENSE_VERSION "1.0" # elif defined(VMX86_WGS_MIGRATION) @@ -366,11 +373,11 @@ # if defined(__APPLE__) # define PRODUCT_LICENSE_VERSION PRODUCT_MAC_DESKTOP_VERSION_STRING_FOR_LICENSE # else -# define PRODUCT_LICENSE_VERSION "11.0" +# define PRODUCT_LICENSE_VERSION "12.0" # endif # elif defined(VMX86_VPX) # define PRODUCT_LICENSE_VERSION "6.0" -# define PRODUCT_LICENSE_FILE_VERSION "6.0.0.3" +# define PRODUCT_LICENSE_FILE_VERSION "6.1.0.1" # elif defined(VMX86_WBC) # define PRODUCT_LICENSE_VERSION "1.0" # elif defined(VMX86_SDK) @@ -382,6 +389,10 @@ # endif # define PRODUCT_VERSION_STRING_FOR_LICENSE PRODUCT_LICENSE_VERSION #endif +#define PRODUCT_ESX_LICENSE_VERSION "6.0" +#define PRODUCT_ESX_LICENSE_FILE_VERSION "6.1.0.4" +#define PRODUCT_VSAN_LICENSE_VERSION "5.0" +#define PRODUCT_VSAN_LICENSE_FILE_VERSION "5.9.2.0" /* * This is for ACE Management Server @@ -446,6 +457,8 @@ #define PRODUCT_VERSION_SCALABLE_SERVER_40 PRODUCT_ESXI_BRIEF_NAME " 4.x" #define PRODUCT_VERSION_SCALABLE_SERVER_50 PRODUCT_ESXI_BRIEF_NAME " 5.0" #define PRODUCT_VERSION_SCALABLE_SERVER_51 PRODUCT_ESXI_BRIEF_NAME " 5.1" +#define PRODUCT_VERSION_SCALABLE_SERVER_55 PRODUCT_ESXI_BRIEF_NAME " 5.5" +#define PRODUCT_VERSION_SCALABLE_SERVER_60 PRODUCT_ESXI_BRIEF_NAME " 6.0" #define PRODUCT_VERSION_WGS_1 "Server 1.x" #define PRODUCT_VERSION_WGS_2 "Server 2.x" #define PRODUCT_VERSION_GSX_3 "GSX Server 3.x" @@ -454,10 +467,10 @@ #define PRODUCT_VERSION_WORKSTATION_6 PRODUCT_WORKSTATION_BRIEF_NAME " 6.0" #define PRODUCT_VERSION_WORKSTATION_65 PRODUCT_WORKSTATION_BRIEF_NAME " 6.5" #define PRODUCT_VERSION_WORKSTATION_7 PRODUCT_WORKSTATION_BRIEF_NAME " 7.x" -#define PRODUCT_VERSION_WORKSTATION_80 PRODUCT_WORKSTATION_BRIEF_NAME " 8.0" -#define PRODUCT_VERSION_WORKSTATION_90 PRODUCT_WORKSTATION_BRIEF_NAME " 9.0" -#define PRODUCT_VERSION_WORKSTATION_100 PRODUCT_WORKSTATION_BRIEF_NAME " 10.0" -#define PRODUCT_VERSION_WORKSTATION_110 PRODUCT_WORKSTATION_BRIEF_NAME " 11.0" +#define PRODUCT_VERSION_WORKSTATION_80 PRODUCT_WORKSTATION_BRIEF_NAME " 8.x" +#define PRODUCT_VERSION_WORKSTATION_90 PRODUCT_WORKSTATION_BRIEF_NAME " 9.x" +#define PRODUCT_VERSION_WORKSTATION_100 PRODUCT_WORKSTATION_BRIEF_NAME " 10.x" +#define PRODUCT_VERSION_WORKSTATION_110 PRODUCT_WORKSTATION_BRIEF_NAME " 11.x" #define PRODUCT_VERSION_WORKSTATION_120 PRODUCT_WORKSTATION_BRIEF_NAME " 12.0" #define PRODUCT_VERSION_WORKSTATION_ENTERPRISE_1 "ACE 1.x" #define PRODUCT_VERSION_WORKSTATION_ENTERPRISE_2 "ACE 2.0" @@ -466,10 +479,9 @@ #define PRODUCT_VERSION_MAC_DESKTOP_1 PRODUCT_MAC_DESKTOP_BRIEF_NAME " 1.1" #define PRODUCT_VERSION_MAC_DESKTOP_2 PRODUCT_MAC_DESKTOP_BRIEF_NAME " 2.x" #define PRODUCT_VERSION_MAC_DESKTOP_3 PRODUCT_MAC_DESKTOP_BRIEF_NAME " 3.x" -#define PRODUCT_VERSION_MAC_DESKTOP_40 PRODUCT_MAC_DESKTOP_BRIEF_NAME " 4.0" -#define PRODUCT_VERSION_MAC_DESKTOP_50 PRODUCT_MAC_DESKTOP_BRIEF_NAME " 5.0" -#define PRODUCT_VERSION_MAC_DESKTOP_60 PRODUCT_MAC_DESKTOP_BRIEF_NAME " 6.0" -#define PRODUCT_VERSION_MAC_DESKTOP_70 PRODUCT_MAC_DESKTOP_BRIEF_NAME " 7.0" -#define PRODUCT_VERSION_MAC_DESKTOP_80 PRODUCT_MAC_DESKTOP_BRIEF_NAME " 8.0" -#define PRODUCT_VERSION_VMRC_70 PRODUCT_VMRC_BRIEF_NAME " 7.0" +#define PRODUCT_VERSION_MAC_DESKTOP_40 PRODUCT_MAC_DESKTOP_BRIEF_NAME " 4.x" +#define PRODUCT_VERSION_MAC_DESKTOP_50 PRODUCT_MAC_DESKTOP_BRIEF_NAME " 5.x" +#define PRODUCT_VERSION_MAC_DESKTOP_60 PRODUCT_MAC_DESKTOP_BRIEF_NAME " 6.x" +#define PRODUCT_VERSION_MAC_DESKTOP_70 PRODUCT_MAC_DESKTOP_BRIEF_NAME " 7.x" +#define PRODUCT_VERSION_MAC_DESKTOP_80 PRODUCT_MAC_DESKTOP_BRIEF_NAME " 8.x" #endif diff --git a/open-vm-tools/lib/include/vm_tools_version.h b/open-vm-tools/lib/include/vm_tools_version.h index d1781df2b..9640c0bc4 100644 --- a/open-vm-tools/lib/include/vm_tools_version.h +++ b/open-vm-tools/lib/include/vm_tools_version.h @@ -1339,6 +1339,13 @@ TOOLS_VERSION_UINT_TO_COMPONENTS(const ToolsVersion toolsVersion, // IN #define TOOLS_VERSION_TORQUE_WRENCH_RELEASE_V_MNR 0 #define TOOLS_VERSION_TORQUE_WRENCH_RELEASE_V_BASE 0 +#ifndef RC_INVOKED +#define TOOLS_VERSION_TORQUE_WRENCH_PATCH1 TOOLS_VERSION_TO_UINT(TOOLS_VERSION_TORQUE_WRENCH_PATCH1_V) +#endif /* RC_INVOKED */ +#define TOOLS_VERSION_TORQUE_WRENCH_PATCH1_V_MJR 10 +#define TOOLS_VERSION_TORQUE_WRENCH_PATCH1_V_MNR 0 +#define TOOLS_VERSION_TORQUE_WRENCH_PATCH1_V_BASE 1 + #ifndef RC_INVOKED #define TOOLS_VERSION_TORQUE_WRENCH_UPDATE1 TOOLS_VERSION_TO_UINT(TOOLS_VERSION_TORQUE_WRENCH_UPDATE1_V) #endif /* RC_INVOKED */ @@ -1346,9 +1353,16 @@ TOOLS_VERSION_UINT_TO_COMPONENTS(const ToolsVersion toolsVersion, // IN #define TOOLS_VERSION_TORQUE_WRENCH_UPDATE1_V_MNR 0 #define TOOLS_VERSION_TORQUE_WRENCH_UPDATE1_V_BASE 5 -#define TOOLS_VERSION_CURRENT TOOLS_VERSION_TORQUE_WRENCH_UPDATE1 -#define TOOLS_VERSION_CURRENT_STR TOOLS_VERSION_TO_STR(TOOLS_VERSION_TORQUE_WRENCH_UPDATE1) -#define TOOLS_VERSION_CURRENT_CSV TOOLS_VERSION_TO_CSV(TOOLS_VERSION_TORQUE_WRENCH_UPDATE1) +#ifndef RC_INVOKED +#define TOOLS_VERSION_NEXT TOOLS_VERSION_TO_UINT(TOOLS_VERSION_NEXT_V) +#endif /* RC_INVOKED */ +#define TOOLS_VERSION_NEXT_V_MJR 10 +#define TOOLS_VERSION_NEXT_V_MNR 1 +#define TOOLS_VERSION_NEXT_V_BASE 0 + +#define TOOLS_VERSION_CURRENT TOOLS_VERSION_NEXT +#define TOOLS_VERSION_CURRENT_STR TOOLS_VERSION_TO_STR(TOOLS_VERSION_NEXT) +#define TOOLS_VERSION_CURRENT_CSV TOOLS_VERSION_TO_CSV(TOOLS_VERSION_NEXT) /* * The extended Tools version is the current Tools version with the diff --git a/open-vm-tools/lib/include/vmblock.h b/open-vm-tools/lib/include/vmblock.h index 8dbb0ce62..0d283ec06 100644 --- a/open-vm-tools/lib/include/vmblock.h +++ b/open-vm-tools/lib/include/vmblock.h @@ -145,7 +145,7 @@ # define VMBLOCK_DEVICE_MODE VMBLOCK_FUSE_DEVICE_MODE # define VMBLOCK_MOUNT_POINT VMBLOCK_FUSE_MOUNT_POINT -#elif defined(linux) +#elif defined __linux__ # define VMBLOCK_ADD_FILEBLOCK 98 # define VMBLOCK_DEL_FILEBLOCK 99 # ifdef VMX86_DEVEL diff --git a/open-vm-tools/lib/include/vmci_defs.h b/open-vm-tools/lib/include/vmci_defs.h index d8ba8b49f..54de093aa 100644 --- a/open-vm-tools/lib/include/vmci_defs.h +++ b/open-vm-tools/lib/include/vmci_defs.h @@ -96,17 +96,6 @@ typedef enum VMCIIntrType { */ #define VMCI_MAX_GUEST_QP_MEMORY (128 * 1024 * 1024) -/* - * Queues with pre-mapped data pages must be small, so that we don't pin - * too much kernel memory (especially on vmkernel). We limit a queuepair to - * 32 KB, or 16 KB per queue for symmetrical pairs. - * - * XXX, we are raising this limit to 4MB to support high-throughput workloads - * with vioi-filter. Once we switch to rings instead of queuepairs for the - * page channel, we will drop this limit again. See PR 852983. - */ -#define VMCI_MAX_PINNED_QP_MEMORY (4 * 1024 * 1024) - /* * We have a fixed set of resource IDs available in the VMX. * This allows us to have a very simple implementation since we statically @@ -275,6 +264,7 @@ static const VMCIHandle VMCI_INVALID_HANDLE = {VMCI_INVALID_ID, * Context ID used by host endpoints. */ #define VMCI_HOST_CONTEXT_ID 2 +#define VMCI_HOST_CONTEXT_INVALID_EVENT ((uintptr_t)~0) #define VMCI_CONTEXT_IS_VM(_cid) (VMCI_INVALID_ID != _cid && \ _cid > VMCI_HOST_CONTEXT_ID) diff --git a/open-vm-tools/lib/include/x86_basic_defs.h b/open-vm-tools/lib/include/x86_basic_defs.h index b39cbe37b..bf1329475 100644 --- a/open-vm-tools/lib/include/x86_basic_defs.h +++ b/open-vm-tools/lib/include/x86_basic_defs.h @@ -83,8 +83,8 @@ #define CR4_OSXSAVE 0x00040000 #define CR4_SMEP 0x00100000 #define CR4_SMAP 0x00200000 -/* Removing a bit from CR4_RESERVED causes Task_Switch to leave the bit set. */ -#define CR4_RESERVED CONST64U(0xffffffffffc89800) +#define CR4_PKE 0x00400000 +#define CR4_RESERVED CONST64U(0xffffffffff889800) #define CR8_RESERVED CONST64U(0xfffffffffffffff0) /* @@ -238,5 +238,12 @@ typedef enum x86_FLAGS { EFLAGS__4 = 0x7fffffff /* ensure 4 byte encoding */ } x86_FLAGS; +/* + * MPX bound configuration registers + */ +#define BNDCFG_EN 0x00000001 +#define BNDCFG_BNDPRSV 0x00000002 +#define BNDCFG_RSVD 0x00000ffc +#define BNDCFG_BDBASE CONST64U(0xfffffffffffff000) #endif // ifndef _VM_BASIC_DEFS_H_ diff --git a/open-vm-tools/lib/include/x86cpuid.h b/open-vm-tools/lib/include/x86cpuid.h index 161a8acdc..79ddd986a 100644 --- a/open-vm-tools/lib/include/x86cpuid.h +++ b/open-vm-tools/lib/include/x86cpuid.h @@ -123,7 +123,7 @@ CPUIDQuery; CPUIDLEVEL(TRUE, 7, 7, 1) \ CPUIDLEVEL(FALSE, A, 0xA, 0) \ CPUIDLEVEL(FALSE, B, 0xB, 2) \ - CPUIDLEVEL(TRUE, D, 0xD, 4) \ + CPUIDLEVEL(TRUE, D, 0xD, 10) \ CPUIDLEVEL(FALSE, 12, 0x12, 4) \ CPUIDLEVEL(FALSE, 400, 0x40000000, 0) \ CPUIDLEVEL(FALSE, 401, 0x40000001, 0) \ @@ -449,12 +449,27 @@ FLAG( 7, 0, EBX, 10, 1, INVPCID, YES, FALSE) \ FLAG( 7, 0, EBX, 11, 1, RTM, YES, TRUE) \ FLAG( 7, 0, EBX, 12, 1, PQM, NO, FALSE) \ FLAG( 7, 0, EBX, 13, 1, FP_SEGMENT_ZERO, ANY, TRUE) \ +FLAG( 7, 0, EBX, 14, 1, MPX, YES, TRUE) \ FLAG( 7, 0, EBX, 15, 1, PQE, NO, FALSE) \ +FLAG( 7, 0, EBX, 16, 1, AVX512F, YES, TRUE) \ +FLAG( 7, 0, EBX, 17, 1, AVX512DQ, YES, TRUE) \ FLAG( 7, 0, EBX, 18, 1, RDSEED, YES, TRUE) \ FLAG( 7, 0, EBX, 19, 1, ADX, YES, TRUE) \ FLAG( 7, 0, EBX, 20, 1, SMAP, YES, FALSE) \ +FLAG( 7, 0, EBX, 21, 1, AVX512IFMA, YES, TRUE) \ +FLAG( 7, 0, EBX, 22, 1, PCOMMIT, YES, TRUE) \ +FLAG( 7, 0, EBX, 23, 1, CLFLUSHOPT, YES, TRUE) \ +FLAG( 7, 0, EBX, 24, 1, CLWB, YES, TRUE) \ FLAG( 7, 0, EBX, 25, 1, PT, NO, FALSE) \ -FLAG( 7, 0, ECX, 0, 1, PREFETCHWT1, NO, TRUE) +FLAG( 7, 0, EBX, 26, 1, AVX512PF, YES, TRUE) \ +FLAG( 7, 0, EBX, 27, 1, AVX512ER, YES, TRUE) \ +FLAG( 7, 0, EBX, 28, 1, AVX512CD, YES, TRUE) \ +FLAG( 7, 0, EBX, 30, 1, AVX512BW, YES, TRUE) \ +FLAG( 7, 0, EBX, 31, 1, AVX512VL, YES, TRUE) \ +FLAG( 7, 0, ECX, 0, 1, PREFETCHWT1, YES, TRUE) \ +FLAG( 7, 0, ECX, 1, 1, AVX512VBMI, YES, TRUE) \ +FLAG( 7, 0, ECX, 3, 1, PKU, YES, TRUE) \ +FLAG( 7, 0, ECX, 4, 1, OSPKE, ANY, TRUE) \ /* LEVEL, SUB-LEVEL, REG, POS, SIZE, NAME, MON SUPP, CPL3 */ @@ -486,23 +501,77 @@ FIELD( B, 0, EDX, 0, 32, TOPOLOGY_X2APIC_ID, NA, FALSE) FLAG( D, 0, EAX, 0, 1, XCR0_MASTER_LEGACY_FP, YES, FALSE) \ FLAG( D, 0, EAX, 1, 1, XCR0_MASTER_SSE, YES, FALSE) \ FLAG( D, 0, EAX, 2, 1, XCR0_MASTER_YMM_H, YES, FALSE) \ -FIELD( D, 0, EAX, 3, 29, XCR0_MASTER_LOWER, NO, FALSE) \ +FLAG( D, 0, EAX, 3, 1, XCR0_MASTER_BNDREGS, YES, FALSE) \ +FLAG( D, 0, EAX, 4, 1, XCR0_MASTER_BNDCSR, YES, FALSE) \ +FLAG( D, 0, EAX, 5, 1, XCR0_MASTER_OPMASK, YES, FALSE) \ +FLAG( D, 0, EAX, 6, 1, XCR0_MASTER_ZMM_H, YES, FALSE) \ +FLAG( D, 0, EAX, 7, 1, XCR0_MASTER_HI16_ZMM, YES, FALSE) \ +FLAG( D, 0, EAX, 8, 1, XCR0_MASTER_XSS, NO, FALSE) \ +FLAG( D, 0, EAX, 9, 1, XCR0_MASTER_PKRU, YES, FALSE) \ +FIELD( D, 0, EAX, 10,22, XCR0_MASTER_LOWER, NO, FALSE) \ FIELD( D, 0, EBX, 0, 32, XSAVE_ENABLED_SIZE, ANY, FALSE) \ FIELD( D, 0, ECX, 0, 32, XSAVE_MAX_SIZE, YES, FALSE) \ FIELD( D, 0, EDX, 0, 29, XCR0_MASTER_UPPER, NO, FALSE) \ FLAG( D, 0, EDX, 30, 1, XCR0_MASTER_LWP, NO, FALSE) \ FLAG( D, 0, EDX, 31, 1, XCR0_MASTER_EXTENDED_XSAVE, NO, FALSE) \ FLAG( D, 1, EAX, 0, 1, XSAVEOPT, YES, FALSE) \ -FLAG( D, 1, EAX, 1, 1, XSAVEC, NO, FALSE) \ +FLAG( D, 1, EAX, 1, 1, XSAVEC, YES, FALSE) \ FLAG( D, 1, EAX, 2, 1, XGETBV_ECX1, NO, FALSE) \ -FLAG( D, 1, EAX, 3, 1, XSAVES, NO, FALSE) \ -FIELD( D, 1, EBX, 0, 32, XSAVE_XSS_SIZE, NO, FALSE) \ -FIELD( D, 1, ECX, 0, 32, XSS_LOWER, NO, FALSE) \ -FIELD( D, 1, EDX, 0, 32, XSS_UPPER, NO, FALSE) \ +FLAG( D, 1, EAX, 3, 1, XSAVES, YES, FALSE) \ +FIELD( D, 1, EBX, 0, 32, XSAVES_ENABLED_SIZE, ANY, FALSE) \ +FIELD( D, 1, ECX, 0, 7, XSS_XCR0_USED0, NO, FALSE) \ +FLAG( D, 1, ECX, 8, 1, XSS_PT, NO, FALSE) \ +FIELD( D, 1, ECX, 9, 1, XSS_XCR0_USED1, NO, FALSE) \ +FIELD( D, 1, ECX, 10,22, XSS_RSVD0, NO, FALSE) \ +FIELD( D, 1, EDX, 0, 32, XSS_RSVD1, NO, FALSE) \ FIELD( D, 2, EAX, 0, 32, XSAVE_YMM_SIZE, YES, FALSE) \ FIELD( D, 2, EBX, 0, 32, XSAVE_YMM_OFFSET, YES, FALSE) \ -FIELD( D, 2, ECX, 0, 32, XSAVE_YMM_RSVD1, YES, FALSE) \ -FIELD( D, 2, EDX, 0, 32, XSAVE_YMM_RSVD2, YES, FALSE) \ +FLAG( D, 2, ECX, 0, 1, XSAVE_YMM_SUP_BY_XSS, NO, FALSE) \ +FLAG( D, 2, ECX, 1, 1, XSAVE_YMM_ALIGN, YES, FALSE) \ +FIELD( D, 2, ECX, 2, 30, XSAVE_YMM_RSVD1, NO, FALSE) \ +FIELD( D, 2, EDX, 0, 32, XSAVE_YMM_RSVD2, NO, FALSE) \ +FIELD( D, 3, EAX, 0, 32, XSAVE_BNDREGS_SIZE, YES, FALSE) \ +FIELD( D, 3, EBX, 0, 32, XSAVE_BNDREGS_OFFSET, YES, FALSE) \ +FLAG( D, 3, ECX, 0, 1, XSAVE_BNDREGS_SUP_BY_XSS, NO, FALSE) \ +FLAG( D, 3, ECX, 1, 1, XSAVE_BNDREGS_ALIGN, YES, FALSE) \ +FIELD( D, 3, ECX, 2, 30, XSAVE_BNDREGS_RSVD1, NO, FALSE) \ +FIELD( D, 3, EDX, 0, 32, XSAVE_BNDREGS_RSVD2, NO, FALSE) \ +FIELD( D, 4, EAX, 0, 32, XSAVE_BNDCSR_SIZE, YES, FALSE) \ +FIELD( D, 4, EBX, 0, 32, XSAVE_BNDCSR_OFFSET, YES, FALSE) \ +FLAG( D, 4, ECX, 0, 1, XSAVE_BNDCSR_SUP_BY_XSS, NO, FALSE) \ +FLAG( D, 4, ECX, 1, 1, XSAVE_BNDCSR_ALIGN, YES, FALSE) \ +FIELD( D, 4, ECX, 2, 30, XSAVE_BNDCSR_RSVD1, NO, FALSE) \ +FIELD( D, 4, EDX, 0, 32, XSAVE_BNDCSR_RSVD2, NO, FALSE) \ +FIELD( D, 5, EAX, 0, 32, XSAVE_OPMASK_SIZE, YES, FALSE) \ +FIELD( D, 5, EBX, 0, 32, XSAVE_OPMASK_OFFSET, YES, FALSE) \ +FLAG( D, 5, ECX, 0, 1, XSAVE_OPMASK_SUP_BY_XSS, NO, FALSE) \ +FLAG( D, 5, ECX, 1, 1, XSAVE_OPMASK_ALIGN, YES, FALSE) \ +FIELD( D, 5, ECX, 2, 30, XSAVE_OPMASK_RSVD1, NO, FALSE) \ +FIELD( D, 5, EDX, 0, 32, XSAVE_OPMASK_RSVD2, NO, FALSE) \ +FIELD( D, 6, EAX, 0, 32, XSAVE_ZMM_H_SIZE, YES, FALSE) \ +FIELD( D, 6, EBX, 0, 32, XSAVE_ZMM_H_OFFSET, YES, FALSE) \ +FLAG( D, 6, ECX, 0, 1, XSAVE_ZMM_H_SUP_BY_XSS, NO, FALSE) \ +FLAG( D, 6, ECX, 1, 1, XSAVE_ZMM_H_ALIGN, YES, FALSE) \ +FIELD( D, 6, ECX, 2, 30, XSAVE_ZMM_H_RSVD1, NO, FALSE) \ +FIELD( D, 6, EDX, 0, 32, XSAVE_ZMM_H_RSVD2, NO, FALSE) \ +FIELD( D, 7, EAX, 0, 32, XSAVE_HI16_ZMM_SIZE, YES, FALSE) \ +FIELD( D, 7, EBX, 0, 32, XSAVE_HI16_ZMM_OFFSET, YES, FALSE) \ +FLAG( D, 7, ECX, 0, 1, XSAVE_HI16_ZMM_SUP_BY_XSS, NO, FALSE) \ +FLAG( D, 7, ECX, 1, 1, XSAVE_HI16_ZMM_ALIGN, YES, FALSE) \ +FIELD( D, 7, ECX, 2, 30, XSAVE_HI16_ZMM_RSVD1, NO, FALSE) \ +FIELD( D, 7, EDX, 0, 32, XSAVE_HI16_ZMM_RSVD2, NO, FALSE) \ +FIELD( D, 8, EAX, 0, 32, XSAVE_PT_STATE_SIZE, NO, FALSE) \ +FIELD( D, 8, EBX, 0, 32, XSAVE_PT_STATE_OFFSET, NO, FALSE) \ +FLAG( D, 8, ECX, 0, 1, XSAVE_PT_STATE_SUP_BY_XSS, NO, FALSE) \ +FLAG( D, 8, ECX, 1, 1, XSAVE_PT_STATE_ALIGN, NO, FALSE) \ +FIELD( D, 8, ECX, 2, 30, XSAVE_PT_STATE_RSVD1, NO, FALSE) \ +FIELD( D, 8, EDX, 0, 32, XSAVE_PT_STATE_RSVD2, NO, FALSE) \ +FIELD( D, 9, EAX, 0, 32, XSAVE_PKRU_SIZE, YES, FALSE) \ +FIELD( D, 9, EBX, 0, 32, XSAVE_PKRU_OFFSET, YES, FALSE) \ +FLAG( D, 9, ECX, 0, 1, XSAVE_PKRU_SUP_BY_XSS, NO, FALSE) \ +FLAG( D, 9, ECX, 1, 1, XSAVE_PKRU_ALIGN, YES, FALSE) \ +FIELD( D, 9, ECX, 2, 30, XSAVE_PKRU_RSVD1, NO, FALSE) \ +FIELD( D, 9, EDX, 0, 32, XSAVE_PKRU_RSVD2, NO, FALSE) \ FIELD( D, 62, EAX, 0, 32, XSAVE_LWP_SIZE, NO, FALSE) \ FIELD( D, 62, EBX, 0, 32, XSAVE_LWP_OFFSET, NO, FALSE) \ FIELD( D, 62, ECX, 0, 32, XSAVE_LWP_RSVD1, NO, FALSE) \ @@ -1128,7 +1197,7 @@ CPUIDCheck(int32 eaxIn, int32 eaxInCheck, #define CPUID_FAMILY_K8MOBILE 0x11 #define CPUID_FAMILY_LLANO 0x12 #define CPUID_FAMILY_BOBCAT 0x14 -#define CPUID_FAMILY_BULLDOZER 0x15 // Bulldozer Piledriver Steamroller +#define CPUID_FAMILY_BULLDOZER 0x15 // BD PD SR EX #define CPUID_FAMILY_KYOTO 0x16 // Note: Jaguar microarch /* Effective VIA CPU Families */ @@ -1195,6 +1264,10 @@ CPUIDCheck(int32 eaxIn, int32 eaxInCheck, #define CPUID_MODEL_PILEDRIVER_02 0x02 // family == CPUID_FAMILY_BULLDOZER #define CPUID_MODEL_OPTERON_REVF_41 0x41 // family == CPUID_FAMILY_K8 #define CPUID_MODEL_KYOTO_00 0x00 // family == CPUID_FAMILY_KYOTO +#define CPUID_MODEL_STEAMROLLER_3F 0x3F // Max Steamroller model defined in BKDG +#define CPUID_MODEL_STEAMROLLER_30 0x30 // family == CPUID_FAMILY_BULLDOZER +#define CPUID_MODEL_EXCAVATOR_60 0x60 // family == CPUID_FAMILY_BULLDOZER +#define CPUID_MODEL_EXCAVATOR_6F 0x6f // Max Excavator model defined in BKDG /* VIA model information */ #define CPUID_MODEL_NANO 15 // Isaiah @@ -1460,6 +1533,8 @@ CPUID_MODEL_IS_IVYBRIDGE(uint32 v) // IN: %eax from CPUID with %eax=1. } + + static INLINE Bool CPUID_FAMILY_IS_K7(uint32 eax) { @@ -1597,6 +1672,24 @@ CPUID_MODEL_IS_PILEDRIVER(uint32 eax) } +static INLINE Bool +CPUID_MODEL_IS_STEAMROLLER(uint32 eax) +{ + /* Steamroller is model 0x30 of family 0x15 (so far). */ + return CPUID_EFFECTIVE_FAMILY(eax) == CPUID_FAMILY_BULLDOZER && + (CPUID_EFFECTIVE_MODEL(eax) >= CPUID_MODEL_STEAMROLLER_30 && + CPUID_EFFECTIVE_MODEL(eax) <= CPUID_MODEL_STEAMROLLER_3F); +} + + +static INLINE Bool +CPUID_MODEL_IS_EXCAVATOR(uint32 eax) +{ + /* Excavator is model 0x60 of family 0x15 (so far). */ + return CPUID_EFFECTIVE_FAMILY(eax) == CPUID_FAMILY_BULLDOZER && + (CPUID_EFFECTIVE_MODEL(eax) >= CPUID_MODEL_EXCAVATOR_60 && + CPUID_EFFECTIVE_MODEL(eax) <= CPUID_MODEL_EXCAVATOR_6F); +} static INLINE Bool diff --git a/open-vm-tools/lib/include/x86cpuid_asm.h b/open-vm-tools/lib/include/x86cpuid_asm.h index 02a351cbe..2b8aa8d94 100644 --- a/open-vm-tools/lib/include/x86cpuid_asm.h +++ b/open-vm-tools/lib/include/x86cpuid_asm.h @@ -455,5 +455,13 @@ __GET_EAX_FROM_CPUID4(int inputEcx) _dx = regs.edx; \ } +#define GET_CPUID2(_ax, _bx, _cx, _dx) {\ + CPUIDRegs regs; \ + __GET_CPUID2(_ax, _cx, ®s); \ + _ax = regs.eax; \ + _bx = regs.ebx; \ + _cx = regs.ecx; \ + _dx = regs.edx; \ +} #endif diff --git a/open-vm-tools/lib/lock/Makefile.in b/open-vm-tools/lib/lock/Makefile.in deleted file mode 100644 index bc2f3f02a..000000000 --- a/open-vm-tools/lib/lock/Makefile.in +++ /dev/null @@ -1,542 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2010-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/lock -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libLock_la_LIBADD = -am_libLock_la_OBJECTS = ul.lo ulCondVar.lo ulExcl.lo ulRec.lo ulRW.lo \ - ulSema.lo ulBarrier.lo ulStats.lo -libLock_la_OBJECTS = $(am_libLock_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libLock_la_SOURCES) -DIST_SOURCES = $(libLock_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libLock.la -libLock_la_SOURCES = ul.c ulCondVar.c ulExcl.c ulRec.c ulRW.c ulSema.c \ - ulBarrier.c ulStats.c -AM_CFLAGS = @LIB_USER_CPPFLAGS@ -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/lock/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/lock/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libLock.la: $(libLock_la_OBJECTS) $(libLock_la_DEPENDENCIES) - $(LINK) $(libLock_la_OBJECTS) $(libLock_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ul.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ulBarrier.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ulCondVar.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ulExcl.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ulRW.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ulRec.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ulSema.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ulStats.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/lock/ulBarrier.c b/open-vm-tools/lib/lock/ulBarrier.c index 2c4405960..ba521637a 100644 --- a/open-vm-tools/lib/lock/ulBarrier.c +++ b/open-vm-tools/lib/lock/ulBarrier.c @@ -127,30 +127,9 @@ MXUser_CreateBarrier(const char *userName, // IN: shall be known as } barrier->lock = MXUser_CreateExclLock(properName, rank); - - if (barrier->lock == NULL) { - free(properName); - free(barrier); - - return NULL; - } - - barrier->contexts[0].condVar = MXUser_CreateCondVarExclLock(barrier->lock); barrier->contexts[1].condVar = MXUser_CreateCondVarExclLock(barrier->lock); - if ((barrier->contexts[0].condVar == NULL) || - (barrier->contexts[1].condVar == NULL)) { - MXUser_DestroyCondVar(barrier->contexts[0].condVar); - MXUser_DestroyCondVar(barrier->contexts[1].condVar); - MXUser_DestroyExclLock(barrier->lock); - - free(properName); - free(barrier); - - return NULL; - } - barrier->configCount = count; barrier->curContext = 0; diff --git a/open-vm-tools/lib/lock/ulCondVar.c b/open-vm-tools/lib/lock/ulCondVar.c index b29544866..0f19a31b1 100644 --- a/open-vm-tools/lib/lock/ulCondVar.c +++ b/open-vm-tools/lib/lock/ulCondVar.c @@ -588,15 +588,14 @@ MXUserCreateCondVar(MXUserHeader *header, // IN: { MXUserCondVar *condVar = Util_SafeCalloc(1, sizeof *condVar); - if (MXUserCreateInternal(condVar)) { - condVar->signature = MXUserGetSignature(MXUSER_TYPE_CONDVAR); - condVar->header = header; - condVar->ownerLock = lock; - } else { - free(condVar); - condVar = NULL; + if (UNLIKELY(!MXUserCreateInternal(condVar))) { + Panic("%s: native lock initialization routine failed\n", __FUNCTION__); } + condVar->signature = MXUserGetSignature(MXUSER_TYPE_CONDVAR); + condVar->header = header; + condVar->ownerLock = lock; + return condVar; } diff --git a/open-vm-tools/lib/lock/ulExcl.c b/open-vm-tools/lib/lock/ulExcl.c index f6031febb..945a09e75 100644 --- a/open-vm-tools/lib/lock/ulExcl.c +++ b/open-vm-tools/lib/lock/ulExcl.c @@ -321,8 +321,7 @@ MXUserDumpExclLock(MXUserHeader *header) // IN: * Create an exclusive lock. * * Results: - * NULL Creation failed - * !NULL Creation succeeded + * A pointer to an exclusive lock. * * Side effects: * None @@ -344,11 +343,8 @@ MXUser_CreateExclLock(const char *userName, // IN: properName = Util_SafeStrdup(userName); } - if (!MXRecLockInit(&lock->recursiveLock)) { - free(properName); - free(lock); - - return NULL; + if (UNLIKELY(!MXRecLockInit(&lock->recursiveLock))) { + Panic("%s: native lock initialization routine failed\n", __FUNCTION__); } lock->header.signature = MXUserGetSignature(MXUSER_TYPE_EXCL); diff --git a/open-vm-tools/lib/lock/ulRW.c b/open-vm-tools/lib/lock/ulRW.c index 1f9d60d8d..246e0fee8 100644 --- a/open-vm-tools/lib/lock/ulRW.c +++ b/open-vm-tools/lib/lock/ulRW.c @@ -457,13 +457,7 @@ MXUser_CreateRWLock(const char *userName, // IN: MXUserAddToList(&lock->header); } else { - if (lock->useNative) { - MXUserNativeRWDestroy(&lock->nativeLock); - } - - free(properName); - free(lock); - lock = NULL; + Panic("%s: native lock initialization routine failed\n", __FUNCTION__); } return lock; diff --git a/open-vm-tools/lib/lock/ulRec.c b/open-vm-tools/lib/lock/ulRec.c index 7067a0579..b94e1abac 100644 --- a/open-vm-tools/lib/lock/ulRec.c +++ b/open-vm-tools/lib/lock/ulRec.c @@ -343,8 +343,7 @@ MXUserDumpRecLock(MXUserHeader *header) // IN: * Only the owner (thread) of a recursive lock may recurse on it. * * Results: - * NULL Creation failed - * !NULL Creation succeeded + * A pointer to an recursive lock. * * Side effects: * None @@ -366,11 +365,8 @@ MXUser_CreateRecLock(const char *userName, // IN: properName = Util_SafeStrdup(userName); } - if (!MXRecLockInit(&lock->recursiveLock)) { - free(properName); - free(lock); - - return NULL; + if (UNLIKELY(!MXRecLockInit(&lock->recursiveLock))) { + Panic("%s: native lock initialization routine failed\n", __FUNCTION__); } lock->vmmLock = NULL; diff --git a/open-vm-tools/lib/lock/ulSema.c b/open-vm-tools/lib/lock/ulSema.c index af6a51327..70112a220 100644 --- a/open-vm-tools/lib/lock/ulSema.c +++ b/open-vm-tools/lib/lock/ulSema.c @@ -487,9 +487,7 @@ MXUser_CreateSemaphore(const char *userName, // IN: MXUserAddToList(&sema->header); } else { - free(properName); - free(sema); - sema = NULL; + Panic("%s: native lock initialization routine failed\n", __FUNCTION__); } return sema; diff --git a/open-vm-tools/lib/lock/ulStats.c b/open-vm-tools/lib/lock/ulStats.c index 474aedc77..e41185c20 100644 --- a/open-vm-tools/lib/lock/ulStats.c +++ b/open-vm-tools/lib/lock/ulStats.c @@ -91,7 +91,7 @@ MXUserAddToList(MXUserHeader *header) // IN/OUT: if (listLock) { MXRecLockAcquire(listLock, NULL); // non-stats - LIST_QUEUE(&header->item, &mxUserLockList); + CircList_Queue(&header->item, &mxUserLockList); MXRecLockRelease(listLock); } } @@ -122,7 +122,7 @@ MXUserRemoveFromList(MXUserHeader *header) // IN/OUT: if (listLock) { MXRecLockAcquire(listLock, NULL); // non-stats - LIST_DEL(&header->item, &mxUserLockList); + CircList_DeleteItem(&header->item, &mxUserLockList); MXRecLockRelease(listLock); } } @@ -1083,8 +1083,8 @@ MXUser_PerLockData(void) highestSerialNumber = lastReportedSerialNumber; - LIST_SCAN(entry, mxUserLockList) { - MXUserHeader *header = LIST_CONTAINER(entry, MXUserHeader, item); + CIRC_LIST_SCAN(entry, mxUserLockList) { + MXUserHeader *header = CIRC_LIST_CONTAINER(entry, MXUserHeader, item); /* Log the ID information for a lock that did exist previously */ if (header->bits.serialNumber > lastReportedSerialNumber) { diff --git a/open-vm-tools/lib/message/Makefile.in b/open-vm-tools/lib/message/Makefile.in deleted file mode 100644 index 907feaedd..000000000 --- a/open-vm-tools/lib/message/Makefile.in +++ /dev/null @@ -1,532 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/message -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libMessage_la_LIBADD = -am_libMessage_la_OBJECTS = message.lo -libMessage_la_OBJECTS = $(am_libMessage_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libMessage_la_SOURCES) -DIST_SOURCES = $(libMessage_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libMessage.la -libMessage_la_SOURCES = message.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/message/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/message/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libMessage.la: $(libMessage_la_OBJECTS) $(libMessage_la_DEPENDENCIES) - $(LINK) $(libMessage_la_OBJECTS) $(libMessage_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/message.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/misc/Makefile.am b/open-vm-tools/lib/misc/Makefile.am index 8373864fc..eed228411 100644 --- a/open-vm-tools/lib/misc/Makefile.am +++ b/open-vm-tools/lib/misc/Makefile.am @@ -23,6 +23,7 @@ libMisc_la_SOURCES += base64.c libMisc_la_SOURCES += codeset.c libMisc_la_SOURCES += codesetBase.c libMisc_la_SOURCES += codesetOld.c +libMisc_la_SOURCES += codesetUTF8.c libMisc_la_SOURCES += dynarray.c libMisc_la_SOURCES += dynbuf.c libMisc_la_SOURCES += escape.c @@ -42,6 +43,7 @@ libMisc_la_SOURCES += msgList.c libMisc_la_SOURCES += posixDlopen.c libMisc_la_SOURCES += posixPosix.c libMisc_la_SOURCES += posixPwd.c +libMisc_la_SOURCES += prng.c libMisc_la_SOURCES += random.c libMisc_la_SOURCES += sleep.c libMisc_la_SOURCES += timeutil.c diff --git a/open-vm-tools/lib/misc/Makefile.in b/open-vm-tools/lib/misc/Makefile.in deleted file mode 100644 index 41f117a40..000000000 --- a/open-vm-tools/lib/misc/Makefile.in +++ /dev/null @@ -1,575 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/misc -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libMisc_la_LIBADD = -am_libMisc_la_OBJECTS = atomic.lo base64.lo codeset.lo codesetBase.lo \ - codesetOld.lo dynarray.lo dynbuf.lo escape.lo hashTable.lo \ - hostinfo.lo hostinfoHV.lo hostinfoPosix.lo hostname.lo \ - hostType.lo idLinux.lo iovector.lo logFixed.lo machineID.lo \ - miscSolaris.lo msgfmt.lo msgList.lo posixDlopen.lo \ - posixPosix.lo posixPwd.lo random.lo sleep.lo timeutil.lo \ - util_misc.lo utilMem.lo vmstdio.lo strutil.lo vthreadBase.lo -libMisc_la_OBJECTS = $(am_libMisc_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libMisc_la_SOURCES) -DIST_SOURCES = $(libMisc_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libMisc.la -libMisc_la_SOURCES = atomic.c base64.c codeset.c codesetBase.c \ - codesetOld.c dynarray.c dynbuf.c escape.c hashTable.c \ - hostinfo.c hostinfoHV.c hostinfoPosix.c hostname.c hostType.c \ - idLinux.c iovector.c logFixed.c machineID.c miscSolaris.c \ - msgfmt.c msgList.c posixDlopen.c posixPosix.c posixPwd.c \ - random.c sleep.c timeutil.c util_misc.c utilMem.c vmstdio.c \ - strutil.c vthreadBase.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/misc/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/misc/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libMisc.la: $(libMisc_la_OBJECTS) $(libMisc_la_DEPENDENCIES) - $(LINK) $(libMisc_la_OBJECTS) $(libMisc_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atomic.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/base64.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/codeset.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/codesetBase.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/codesetOld.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dynarray.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dynbuf.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/escape.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hashTable.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hostType.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hostinfo.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hostinfoHV.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hostinfoPosix.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hostname.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idLinux.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iovector.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logFixed.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/machineID.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/miscSolaris.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msgList.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msgfmt.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/posixDlopen.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/posixPosix.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/posixPwd.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/random.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sleep.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strutil.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timeutil.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utilMem.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util_misc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmstdio.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vthreadBase.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/misc/base64.c b/open-vm-tools/lib/misc/base64.c index 08795f8e2..b66cee96a 100644 --- a/open-vm-tools/lib/misc/base64.c +++ b/open-vm-tools/lib/misc/base64.c @@ -60,10 +60,12 @@ enum { }; /* - * Reverse byte map used for decoding. Except for specials (negative values), contains the index - * into Base64[] where given value is found, ie: base64Reverse[Base64[n]] = n, for 0 <= n < 64 + * Reverse byte map used for decoding. Except for specials (negative values), + * contains the index into Base64[] where given value is found, ie: + * base64Reverse[Base64[n]] = n, for 0 <= n < 64 * - * This static initialization replaces, and should have identical result to, this runtime init: + * This static initialization replaces, and should have identical result to, + * this runtime init: * * for (i = 0; i < 256; ++i) { * base64Reverse[i] = isspace(i) ? WS : ILLEGAL; diff --git a/open-vm-tools/lib/misc/codeset.c b/open-vm-tools/lib/misc/codeset.c index b420abc73..b131f4d5a 100644 --- a/open-vm-tools/lib/misc/codeset.c +++ b/open-vm-tools/lib/misc/codeset.c @@ -200,7 +200,7 @@ CodeSetGetModulePath(HANDLE hModule) // IN } -#elif vmx86_devel && !defined(TEST_CUSTOM_ICU_DATA_FILE) // _WIN32 +#elif vmx86_devel && !vmx86_server && !defined(TEST_CUSTOM_ICU_DATA_FILE) // _WIN32 /* *----------------------------------------------------------------------------- @@ -550,7 +550,7 @@ CodeSet_Init(const char *icuDataDir) // IN: ICU data file location in Current co #else // } _WIN32 { -#if vmx86_devel && !defined(TEST_CUSTOM_ICU_DATA_FILE) +#if vmx86_devel && !vmx86_server && !defined(TEST_CUSTOM_ICU_DATA_FILE) { char *modPath; char *lastSlash; @@ -641,7 +641,7 @@ CodeSet_Init(const char *icuDataDir) // IN: ICU data file location in Current co #endif // } _WIN32 -#if vmx86_devel && !defined(TEST_CUSTOM_ICU_DATA_FILE) +#if vmx86_devel && !vmx86_server && !defined(TEST_CUSTOM_ICU_DATA_FILE) found: #endif diff --git a/open-vm-tools/lib/misc/codesetUTF8.c b/open-vm-tools/lib/misc/codesetUTF8.c new file mode 100644 index 000000000..5de2c4d67 --- /dev/null +++ b/open-vm-tools/lib/misc/codesetUTF8.c @@ -0,0 +1,89 @@ +/* ********************************************************** + * Copyright (C) 2015 VMware, Inc. All rights reserved. + * **********************************************************/ + +/* + * Copyright (c) 2008-2009 Bjoern Hoehrmann + * See http://bjoern.hoehrmann.de/utf-8/decoder/dfa/ for details. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + + +#include "vmware.h" +#include "codeset.h" + +#define UTF8_ACCEPT 0 +#define UTF8_REJECT 1 + +static const unsigned char utf8d[] = { + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 00..1f + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 20..3f + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 40..5f + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 60..7f + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, // 80..9f + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, // a0..bf + 8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, // c0..df + 0xa,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x4,0x3,0x3, // e0..ef + 0xb,0x6,0x6,0x6,0x5,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x8, // f0..ff + 0x0,0x1,0x2,0x3,0x5,0x8,0x7,0x1,0x1,0x1,0x4,0x6,0x1,0x1,0x1,0x1, // s0..s0 + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,0,1,0,1,1,1,1,1,1, // s1..s2 + 1,2,1,1,1,1,1,2,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1, // s3..s4 + 1,2,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,3,1,3,1,1,1,1,1,1, // s5..s6 + 1,3,1,1,1,1,1,3,1,3,1,1,1,1,1,1,1,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1, // s7..s8 +}; + +static INLINE uint32 +CodeSetDecode(uint32 *state, // IN: + uint32 byte) // IN: +{ + uint32 type = utf8d[byte]; + + *state = utf8d[256 + *state*16 + type]; + + return *state; +} + + +Bool +CodeSet_IsStringValidUTF8(const char *bufIn) // IN: +{ + uint32 state = UTF8_ACCEPT; + + while (*bufIn) { + CodeSetDecode(&state, (unsigned char) *bufIn++); + } + + return state == UTF8_ACCEPT; +} + + +Bool +CodeSet_IsValidUTF8(const char *bufIn, // IN: + size_t sizeIn) // IN: +{ + size_t i; + uint32 state = UTF8_ACCEPT; + + for (i = 0; i < sizeIn; i++) { + CodeSetDecode(&state, (unsigned char) *bufIn++); + } + + return state == UTF8_ACCEPT; +} diff --git a/open-vm-tools/lib/misc/hashTable.c b/open-vm-tools/lib/misc/hashTable.c index 7a18bb990..44d003ab7 100644 --- a/open-vm-tools/lib/misc/hashTable.c +++ b/open-vm-tools/lib/misc/hashTable.c @@ -115,9 +115,9 @@ HashTableEntry *HashTableLookupOrInsert(HashTable *ht, *----------------------------------------------------------------------------- */ -static INLINE uint32 -HashTableComputeHash(HashTable *ht, // IN: hash table - const void *s) // IN: string to hash +static uint32 +HashTableComputeHash(const HashTable *ht, // IN: hash table + const void *s) // IN: string to hash { uint32 h = 0; @@ -186,10 +186,10 @@ HashTableComputeHash(HashTable *ht, // IN: hash table *----------------------------------------------------------------------------- */ -static INLINE Bool -HashTableEqualKeys(HashTable *ht, // IN: hash table - const void *key1, // IN: key - const void *key2) // IN: key +static Bool +HashTableEqualKeys(const HashTable *ht, // IN: hash table + const void *key1, // IN: key + const void *key2) // IN: key { switch (ht->keyType) { case HASH_STRING_KEY: @@ -432,9 +432,9 @@ HashTable_FreeUnsafe(HashTable *ht) // IN/OUT: */ static HashTableEntry * -HashTableLookup(HashTable *ht, // IN: - const void *keyStr, // IN: - uint32 hash) // IN: +HashTableLookup(const HashTable *ht, // IN: + const void *keyStr, // IN: + uint32 hash) // IN: { HashTableEntry *entry; @@ -468,9 +468,9 @@ HashTableLookup(HashTable *ht, // IN: */ Bool -HashTable_Lookup(HashTable *ht, // IN: - const void *keyStr, // IN: - void **clientData) // OUT/OPT: +HashTable_Lookup(const HashTable *ht, // IN: + const void *keyStr, // IN: + void **clientData) // OUT/OPT: { uint32 hash = HashTableComputeHash(ht, keyStr); HashTableEntry *entry = HashTableLookup(ht, keyStr, hash); diff --git a/open-vm-tools/lib/misc/hostinfoPosix.c b/open-vm-tools/lib/misc/hostinfoPosix.c index a9e7d6cb3..f0dd3cd81 100644 --- a/open-vm-tools/lib/misc/hostinfoPosix.c +++ b/open-vm-tools/lib/misc/hostinfoPosix.c @@ -75,7 +75,7 @@ #include #endif #if !defined(sun) && !defined __ANDROID__ && (!defined(USING_AUTOCONF) || (defined(HAVE_SYS_IO_H) && defined(HAVE_SYS_SYSINFO_H))) -#if defined(__i386__) || defined(__x86_64__) +#if defined(__i386__) || defined(__x86_64__) || defined(__arm__) #include #else #define NO_IOPL @@ -572,7 +572,10 @@ HostinfoGetOSShortName(char *distro, // IN: full distro name Str_Strcpy(distroShort, STR_OS_ASIANUX_4, distroShortSize); } else if (strstr(distroLower, "asianux server 5") || strstr(distroLower, "asianux client 5")) { - Str_Strcpy(distroShort, STR_OS_ASIANUX_5, distroShortSize); + Str_Strcpy(distroShort, STR_OS_ASIANUX_7, distroShortSize); + } else if (strstr(distroLower, "asianux server 7") || + strstr(distroLower, "asianux client 7")) { + Str_Strcpy(distroShort, STR_OS_ASIANUX_7, distroShortSize); } else if (strstr(distroLower, "aurox")) { Str_Strcpy(distroShort, STR_OS_AUROX, distroShortSize); } else if (strstr(distroLower, "black cat")) { @@ -594,6 +597,10 @@ HostinfoGetOSShortName(char *distro, // IN: full distro name Str_Strcpy(distroShort, STR_OS_DEBIAN_7, distroShortSize); } else if (strstr(distroLower, "8.")) { Str_Strcpy(distroShort, STR_OS_DEBIAN_8, distroShortSize); + } else if (strstr(distroLower, "9.")) { + Str_Strcpy(distroShort, STR_OS_DEBIAN_9, distroShortSize); + } else if (strstr(distroLower, "10.")) { + Str_Strcpy(distroShort, STR_OS_DEBIAN_10, distroShortSize); } } else if (StrUtil_StartsWith(distroLower, "enterprise linux") || StrUtil_StartsWith(distroLower, "oracle")) { @@ -723,11 +730,11 @@ HostinfoReadDistroFile(char *filename, // IN: distro version file name if (tmpDistroPos) { sscanf(tmpDistroPos, lsbFields[i].scanstring, distroPart); if (distroPart[0] == '"') { - char *tmpMakeNull = NULL; + char *tmpMakeNull; tmpDistroPos += strlen(lsbFields[i].name) + 1; tmpMakeNull = strchr(tmpDistroPos + 1 , '"'); - if (tmpMakeNull) { + if (tmpMakeNull != NULL) { *tmpMakeNull = '\0'; Str_Strcat(distro, tmpDistroPos, distroSize); *tmpMakeNull = '"' ; @@ -879,7 +886,6 @@ HostinfoOSData(void) return FALSE; } - if (strlen(buf.sysname) + strlen(buf.release) + 3 > sizeof osNameFull) { Warning("%s: Error: buffer too small\n", __FUNCTION__); @@ -891,13 +897,21 @@ HostinfoOSData(void) buf.release); #if defined USERWORLD - if (buf.release[0] <= '4') { + /* The most recent osName always goes here. */ + Str_Strcpy(osName, "vmkernel65", sizeof osName); + + /* Handle any special cases */ + if ((buf.release[0] <= '4') && (buf.release[1] == '.')) { Str_Strcpy(osName, "vmkernel", sizeof osName); - } else { + } else if ((buf.release[0] == '5') && (buf.release[1] == '.')) { Str_Strcpy(osName, "vmkernel5", sizeof osName); + } else if ((buf.release[0] >= '6') && (buf.release[1] == '.')) { + if (buf.release[2] < '5') { + Str_Strcpy(osName, "vmkernel6", sizeof osName); + } } - Str_Snprintf(osNameFull, sizeof osNameFull, "VMware ESXi %c.x", - buf.release[0]); + + Str_Snprintf(osNameFull, sizeof osNameFull, "VMware ESXi %s", buf.release); #elif defined __APPLE__ { /* @@ -962,18 +976,33 @@ HostinfoOSData(void) */ majorVersion = Hostinfo_OSVersion(0); - if (majorVersion < 2 || (majorVersion == 2 && Hostinfo_OSVersion(1) < 4)) { + if (majorVersion < 2) { Str_Strcpy(distro, STR_OS_OTHER_FULL, distroSize); Str_Strcpy(distroShort, STR_OS_OTHER, distroSize); - } else if (majorVersion == 2 && Hostinfo_OSVersion(1) < 6) { - Str_Strcpy(distro, STR_OS_OTHER_24_FULL, distroSize); - Str_Strcpy(distroShort, STR_OS_OTHER_24, distroSize); } else if (majorVersion == 2) { - Str_Strcpy(distro, STR_OS_OTHER_26_FULL, distroSize); - Str_Strcpy(distroShort, STR_OS_OTHER_26, distroSize); - } else { + if (Hostinfo_OSVersion(1) < 4) { + Str_Strcpy(distro, STR_OS_OTHER_FULL, distroSize); + Str_Strcpy(distroShort, STR_OS_OTHER, distroSize); + } else if (Hostinfo_OSVersion(1) < 6) { + Str_Strcpy(distro, STR_OS_OTHER_24_FULL, distroSize); + Str_Strcpy(distroShort, STR_OS_OTHER_24, distroSize); + } else { + Str_Strcpy(distro, STR_OS_OTHER_26_FULL, distroSize); + Str_Strcpy(distroShort, STR_OS_OTHER_26, distroSize); + } + } else if (majorVersion == 3) { Str_Strcpy(distro, STR_OS_OTHER_3X_FULL, distroSize); Str_Strcpy(distroShort, STR_OS_OTHER_3X, distroSize); + } else { + /* + * Anything newer than this code explicitly handles returns the + * "highest" known short description and a dynamically created, + * appropriate long description. + */ + + Str_Sprintf(distro, sizeof distro, "Other Linux %d.%d kernel", + majorVersion, Hostinfo_OSVersion(1)); + Str_Strcpy(distroShort, STR_OS_OTHER_3X, distroSize); } /* @@ -981,7 +1010,7 @@ HostinfoOSData(void) */ lsbOutput = HostinfoGetCmdOutput("/usr/bin/lsb_release -sd 2>/dev/null"); - if (!lsbOutput) { + if (lsbOutput == NULL) { int i; /* @@ -1777,7 +1806,7 @@ HostinfoSystemTimerPosix(VmTimeType *result) // OUT } return FALSE; #else -#if vmx86_server && defined(GLIBC_VERSION_23) +#if vmx86_server # error Posix clock_gettime support required on ESX #endif # define vmx86_posix 0 diff --git a/open-vm-tools/lib/misc/msgList.c b/open-vm-tools/lib/misc/msgList.c index 0b6d01eab..a20273bab 100644 --- a/open-vm-tools/lib/misc/msgList.c +++ b/open-vm-tools/lib/misc/msgList.c @@ -491,10 +491,10 @@ MsgList_GetMsgID(const MsgList *messages) // IN: /* *---------------------------------------------------------------------- * - * MsgList_ToString -- + * MsgList_ToEnglishString -- * * Returns the English representation of a MsgList chain. Does NOT - * localize. + * localize. (Use Msg_LocalizeList to localize instead.) * * Results: * Allocated memory containing message. Successive messages @@ -507,7 +507,7 @@ MsgList_GetMsgID(const MsgList *messages) // IN: */ char * -MsgList_ToString(const MsgList *messages) // IN: +MsgList_ToEnglishString(const MsgList *messages) // IN: { char *result = NULL; @@ -520,7 +520,7 @@ MsgList_ToString(const MsgList *messages) // IN: char *tail; if (messages->next != NULL) { - tail = MsgList_ToString(messages->next); + tail = MsgList_ToEnglishString(messages->next); } else { tail = Util_SafeStrdup(""); } diff --git a/open-vm-tools/lib/misc/posixPosix.c b/open-vm-tools/lib/misc/posixPosix.c index c0546e631..4f1daa125 100644 --- a/open-vm-tools/lib/misc/posixPosix.c +++ b/open-vm-tools/lib/misc/posixPosix.c @@ -494,7 +494,7 @@ int Posix_EuidAccess(const char *pathName, // IN: int mode) // IN: { -#if defined(GLIBC_VERSION_24) +#ifdef __linux__ char *path; int ret; diff --git a/open-vm-tools/lib/misc/prng.c b/open-vm-tools/lib/misc/prng.c new file mode 100644 index 000000000..d7c3d9fda --- /dev/null +++ b/open-vm-tools/lib/misc/prng.c @@ -0,0 +1,217 @@ +/********************************************************* + * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * + * This program 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 version 2.1 and no 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 Lesser GNU General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + *********************************************************/ + +/* + * prng.c -- + * + * Pseudo-random bits generation. --hpreg + * (freestanding / no library dependencies) + */ + +#ifdef VMKERNEL +#include "vmk_exports.h" +#endif +#include "vmware.h" +#include "random.h" + + +/* + *----------------------------------------------------------------------------- + * + * RandomFastImpl -- + * + * Return uniformly distributed pseudo-random numbers in the range of 0 + * and 2^32-1 using the algorithm PCG-XSH-RR by M. O'Neill. + * See http://www.pcg-random.org/ + * + * *** NOTE: THIS ALGORITHM IS SUBMITTED BUT NOT (YET) PUBLISHED + * *** IN A PEER-REVIEWED JOURNAL. It looks quite good (certainly better + * *** than Random_Simple), but is subject to change until standardized. + * *** If accepted, will likely replace Random_Quick and Random_Simple. + * + * PCG-XSH-RR is an LCG: + * S' = (N * S + C) mod M + * with N = 6364136223846793005, M = 2^64, and C any odd number + * (thus making M and C relatively prime, as required for LCGs). + * PCG applies an output permutation "xorshift high, random rotate" + * output = rotate32((state ^ (state >> 18)) >> 27, state >> 59) + * The xorshift improves the quality of lower-order bits, and the + * random rotate uses highest-quality bits to further randomize + * lower-order bits; these permutations produce much higher quality + * random numbers than the underlying LCG. + * + * The period of this RNG is 2^64, and takes 3.5-7 cycles depending + * on optimization. + * + * Generated x86_64 assembly (for Random_Fast): + * mov (%rdi),%rcx + * movabs $0x5851f42d4c957f2d,%rax + * mov %rdi,%rdx + * or $0x1,%rdx + * imul %rcx,%rax \ + * add %rdx,%rax } LCG + * mov %rax,(%rdi) / + * mov %rcx,%rax + * shr $0x12,%rax \ + * xor %rcx,%rax \ + * shr $0x3b,%rcx } rotate32 + * shr $0x1b,%rax / + * ror %cl,%eax / + * retq + * + * Results: + * A random number in the specified range is returned. + * + * Side Effects: + * The RNG context is modified for later use by Random_Fast. + * + *----------------------------------------------------------------------------- + */ + +static INLINE uint32 +RandomRor(uint32 val, // IN: + unsigned rot) // IN: rotation +{ +#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) + // Processor has barrel roll right instruction + __asm__("rorl %%cl, %0": "=rm"(val): "0"(val), "c"(rot)); + return val; +#else + // Emulate barrel roll right with two shifts + return (val >> rot) | (val << ((-rot) & 31)); +#endif +} + +static INLINE uint32 +RandomFastImpl(uint64 *rs, // IN/OUT: + uint64 inc) // IN: +{ + uint64 state = *rs; + uint32 xorshift, rot; + + *rs = state * CONST64U(6364136223846793005) + inc; + xorshift = ((state >> 18) ^ state) >> 27; + rot = state >> 59; + return RandomRor(xorshift, rot); +} + +/* + *----------------------------------------------------------------------------- + * + * Random_Fast -- + * Random_FastStream -- + * Random_FastStreamSeed -- + * + * Wrappers around RandomFastImpl to generate specific behaviors. + * Random_Fast: non-deterministic self-seeding based on address + * Random_FastStream: deterministic seeding + * + * The self-seeding generator has two quirks worth mentioning. + * (1) PCG generates the random value and manipulates the state for + * the next use in parallel. (See the disassembly for details). + * The downside of doing so is that the first generated value is + * a mere permutation of the seed, so proper seeding requires running + * the generator once to distribute the seed across all bits. + * (2) PCG discards the 27 least significant state bits as low-quality. + * A naive seed which does not populate the upper bits (including the + * very common choices of 0, getpid(), or time()) effectively starts + * the 2^64 period at 0x00000000. This is statisically valid (we + * would expect 2^32 sequences to generate zero as their first value), + * but unexpected. To work around weak seeds, always run the generator + * once to bypass a potential 0x00000000. This DOES have the + * statistical flaw that 0x00000000 will be slightly less likely. + * Thus, when using Random_Fast, be sure to discard the first TWO values + * to ensure good seeding. If the statistical imbalance in doing so is + * of concern, use Random_FastStream with good (e.g. Random_Crypto) + * seeding, or use Random_Quick which has a stronger seed algorithm. + * + * Results: + * A random number in the specified range is returned. + * + * Side Effects: + * The RNG context is modified for later use by Random_Fast[Stream]. + * + *----------------------------------------------------------------------------- + */ + +uint32 +Random_Fast(uint64 *rs) // IN/OUT: +{ + uint64 inc = (uintptr_t)(void *)rs | 0x1; // stream selector, must be odd + return RandomFastImpl(rs, inc); +} + +uint32 +Random_FastStream(RandomFastContext *rfc) // IN/OUT: +{ + return RandomFastImpl(&rfc->state, rfc->sequence); +} + +void +Random_FastStreamSeed(RandomFastContext *rfc, // OUT: + uint64 seed, // IN: + uint64 seq) // IN: +{ + rfc->state = 0; + rfc->sequence = (seq << 1) | 0x1; // stream selector, must be odd + Random_FastStream(rfc); + rfc->state += seed; + Random_FastStream(rfc); +} + + +/* + *---------------------------------------------------------------------- + * + * Random_Simple -- + * + * Generates the next random number in the pseudo-random sequence + * defined by the multiplicative linear congruential generator + * S' = 16807 * S mod (2^31 - 1). This is the ACM "minimal standard + * random number generator". Based on method described by D.G. Carta + * in CACM, January 1990, optimization to avoid modulo from + * Carl Waldspurger (OSDI 1994). + * + * Usage: provide previous random number as the seed for next one. + * + * Results: + * A random integer number is returned. + * + * Side Effects: + * None. + * + *---------------------------------------------------------------------- + */ + +int +Random_Simple(int seed) // IN: +{ + uint64 product = 33614 * (uint64) seed; + uint32 product_lo = (uint32) (product & 0xFFFFFFFF) >> 1; + uint32 product_hi = product >> 32; + int32 test = product_lo + product_hi; + + return test > 0 ? test : (test & 0x7FFFFFFF) + 1; +} + +#ifdef VMKERNEL +VMK_KERNEL_EXPORT(Random_Fast); +VMK_KERNEL_EXPORT(Random_FastStream); +VMK_KERNEL_EXPORT(Random_FastStreamSeed); +VMK_KERNEL_EXPORT(Random_Simple); +#endif diff --git a/open-vm-tools/lib/misc/random.c b/open-vm-tools/lib/misc/random.c index da06f2132..988691633 100644 --- a/open-vm-tools/lib/misc/random.c +++ b/open-vm-tools/lib/misc/random.c @@ -20,6 +20,7 @@ * random.c -- * * Random bits generation. --hpreg + * (Also see prng.c for freestanding generators) */ #include @@ -38,6 +39,7 @@ #endif #include "vmware.h" +#include "vm_basic_asm.h" // RDTSC() #include "log.h" #include "random.h" #include "util.h" @@ -320,21 +322,17 @@ Random_Quick(rqContext *rs) // IN/OUT: } +#if 0 /* *---------------------------------------------------------------------- * - * Random_Simple -- + * Random_SpeedTest -- * - * Generates the next random number in the pseudo-random sequence - * defined by the multiplicative linear congruential generator - * S' = 33614 * S mod (2^31 - 1). This is the ACM "minimal standard - * random number generator". Based on method described by D.G. Carta - * in CACM, January 1990. - * - * Usage: provide previous random number as the seed for next one. + * Benchmarks the speed of various random number generators. + * (Intended for debugging). * * Results: - * A random integer number is returned. + * Populates *out with cycle counts. * * Side Effects: * None. @@ -342,13 +340,58 @@ Random_Quick(rqContext *rs) // IN/OUT: *---------------------------------------------------------------------- */ -int -Random_Simple(int seed) // IN: +typedef struct { + uint64 nop; + uint64 simple; + uint64 fast; + uint64 quick; +} RandomSpeedTestResults; +void Random_SpeedTest(uint64 iters, RandomSpeedTestResults *out); + +static int ABSOLUTELY_NOINLINE +RandomNop(int *seed) { - uint64 product = 33614 * (uint64) seed; - uint32 product_lo = (uint32) (product & 0xFFFFFFFF) >> 1; - uint32 product_hi = product >> 32; - int32 test = product_lo + product_hi; + return *(volatile int *)seed; +} - return test > 0 ? test : (test & 0x7FFFFFFF) + 1; +void +Random_SpeedTest(uint64 iters, // IN: + RandomSpeedTestResults *out) // OUT: +{ + int i; + uint64 start; + int nop, simple; + uint64 fast; + rqContext *rq; + + simple = nop = getpid(); + Random_FastSeed(&fast, simple); + rq = Random_QuickSeed(nop); + + start = RDTSC(); + for (i = 0; i < iters; i++) { + RandomNop(&nop); + } + out->nop = RDTSC() - start; + + start = RDTSC(); + for (i = 0; i < iters; i++) { + simple = Random_Simple(simple); + } + out->simple = RDTSC() - start; + + start = RDTSC(); + for (i = 0; i < iters; i++) { + Random_Fast(&fast); + } + out->fast = RDTSC() - start; + + start = RDTSC(); + for (i = 0; i < iters; i++) { + Random_Quick(rq); + } + out->quick = RDTSC() - start; + + free(rq); } +#endif diff --git a/open-vm-tools/lib/misc/sha1.c b/open-vm-tools/lib/misc/sha1.c index 42e16a072..856c911d0 100644 --- a/open-vm-tools/lib/misc/sha1.c +++ b/open-vm-tools/lib/misc/sha1.c @@ -49,9 +49,11 @@ * * 10/14: rberinde: Added SSE3 code and test, cleaned up a bit. * + * 10/15: rberinde: Added multibuffer AVX2 code. + * * If any changes are made to this file, please run: * test-esx -n misc/sha1.sh -*/ + */ #if defined(USERLEVEL) || defined(_WIN32) # include @@ -89,6 +91,12 @@ #include "vm_basic_asm.h" #include "vmk_exports.h" +/* Initialization vectors. */ +static const uint32 sha1InitVec[5] = { 0x67452301, + 0xEFCDAB89, + 0x98BADCFE, + 0x10325476, + 0xC3D2E1F0 }; /* * The SSSE3 implementation is only 64-bit and it is excluded from monitor, @@ -112,10 +120,23 @@ void SHA1_Transform_SSSE3_ASM(uint32 *hash, const uint8 *input, uint64 numBlocks); + /* - * Returns TRUE if we were able to use SSSE3 to apply the transform. See - * SHA1Transform for the function semantics. + *----------------------------------------------------------------------------- + * + * SHA1TransformSSSE3 -- + * + * Speed up transformation with SSSE3 if possible. + * + * Results: + * TRUE if we were able to use SSSE3 to apply the transform. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- */ + static INLINE Bool SHA1TransformSSSE3(uint32 state[5], // IN/OUT const unsigned char *buffer, // IN @@ -152,7 +173,7 @@ SHA1TransformSSSE3(uint32 state[5], // IN/OUT while (numBlocks > 0) { uint32 blocksInIter = MIN(numBlocks, SHA1_SSE_BLOCKS_PER_ITERATION); - X86SSE_Prologue(&save); + X86SSE_Prologue(&save, FALSE /* no AVX2 */); SHA1_Transform_SSSE3_ASM(state, buffer, blocksInIter); X86SSE_Epilogue(&save); @@ -165,6 +186,7 @@ SHA1TransformSSSE3(uint32 state[5], // IN/OUT #else +/* SSSE3 stub for unsupported targets. */ static INLINE Bool SHA1TransformSSSE3(uint32 state[5], const unsigned char *buffer, @@ -176,6 +198,154 @@ SHA1TransformSSSE3(uint32 state[5], #endif +/* + * The AVX2 multi-buffer implementation is 64-bit only and requires GCC 4.7 or + * newer. For now it is only included in the vmkernel. + */ +#if defined(VMKERNEL) + +void SHA1_Transform_AVX2_X8_ASM(uint32 transposedDigests[5][8], + const uint8 *input[8], + uint64 numBlocks); + +/* + *----------------------------------------------------------------------------- + * + * SHA1MultiBufferAVX2 -- + * + * Uses AVX2 code to compute the SHA1 of at most SHA1_MULTI_MAX_BUFFERS + * buffers (if possible). + * + * Note: size must be a multiple of 64! + * + * Results: + * TRUE if we were able to use AVX2 to compute the hashes. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +static INLINE Bool +SHA1MultiBufferAVX2(uint32 numBuffers, // IN + uint32 len, // IN + const void *data[], // IN + unsigned char **digests) // OUT +{ + static int useAVX2 = -1; + + uint32 i, j; + uint32 numBlocks = len / 64; + + uint32 state[5][SHA1_MULTI_MAX_BUFFERS]; + const uint8 *ptrs[SHA1_MULTI_MAX_BUFFERS]; + + /* Last block. */ + uint8 lastBlock[64] = {0x80}; + + X86SSE_SaveState save; + + ASSERT(numBuffers <= SHA1_MULTI_MAX_BUFFERS); + ASSERT(len % 64 == 0); + + /* + * In debug mode, don't use AVX2 some of the time to make + * sure the non-SSE version is tested as well. + */ + if (vmx86_debug && RDTSC() % 101 < 20) { + return FALSE; + } + + ASSERT(useAVX2 == -1 || useAVX2 == 0 || useAVX2 == 1); + + /* This is safe even if multiple threads race here. */ + if (useAVX2 == -1) { + useAVX2 = X86SSE_IsAVX2Supported(); + } + + if (useAVX2 == 0) { + return FALSE; + } + + if (numBuffers < 3) { + /* + * This routine is about 2x slower than the regular routine; it is + * not worth using with less than 3 buffers. + */ + return FALSE; + } + + /* Encode the length (in bits, big endian). */ + for (i = 0; i < 4; i++) { + lastBlock[63 - i] = ((len * 8) >> (i * 8)) & 0xFF; + } + + for (i = 0; i < 5; i++) { + for (j = 0; j < SHA1_MULTI_MAX_BUFFERS; j++) { + state[i][j] = sha1InitVec[i]; + } + } + + for (i = 0; i < 8; i++) { + if (i < numBuffers) { + ptrs[i] = data[i]; + } else { + /* + * We don't care about these buffers but the pointers + * need to be valid. + */ + ptrs[i] = data[0]; + } + } + + while (numBlocks > 0) { + uint32 blocksInIter = MIN(numBlocks, SHA1_SSE_BLOCKS_PER_ITERATION); + + X86SSE_Prologue(&save, TRUE /* AVX2 */); + SHA1_Transform_AVX2_X8_ASM(state, ptrs, blocksInIter); + + numBlocks -= blocksInIter; + for (i = 0; i < 8; i++) { + ptrs[i] += 64 * blocksInIter; + } + + if (numBlocks == 0) { + /* Do the last block. */ + for (i = 0; i < 8; i++) { + ptrs[i] = lastBlock; + } + SHA1_Transform_AVX2_X8_ASM(state, ptrs, 1); + } + X86SSE_Epilogue(&save); + } + + for (i = 0; i < numBuffers; i++) { + for (j = 0; j < SHA1_HASH_LEN; j++) { + digests[i][j] = (state[j / 4][i] >> ((3 - j % 4) * 8)) & 0xFF; + } + } + + return TRUE; +} + +#else + +/* AVX2 stub for unsupported targets. */ +static INLINE Bool +SHA1MultiBufferAVX2(uint32 numBuffers, + uint32 len, + const void *data[], + unsigned char **digests) +{ + ASSERT(numBuffers <= SHA1_MULTI_MAX_BUFFERS); + ASSERT(len % 64 == 0); + return FALSE; +} + +#endif + + /* If the endianess is not defined (it is done in string.h of glibc 2.1.1), we default to LE --hpreg */ #ifndef LITTLE_ENDIAN @@ -189,20 +359,32 @@ SHA1TransformSSSE3(uint32 state[5], #define F2(w,x,y) (((w|x)&y)|(w&x)) #define F3(w,x,y) (w^x^y) -/* Initialization vectors. */ -static const uint32 sha1InitVec[5] = { 0x67452301, - 0xEFCDAB89, - 0x98BADCFE, - 0x10325476, - 0xC3D2E1F0 }; - typedef union { unsigned char c[64]; uint32 l[16]; } CHAR64LONG16; + +/* + *----------------------------------------------------------------------------- + * + * R -- + * + * SHA-1 core function. + * + * Results: + * Product in 'f'. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + static void -R(CHAR64LONG16 *block, uint32 *f, int i) +R(CHAR64LONG16 *block, // IN/OUT + uint32 *f, // IN/OUT + int i) // IN { uint32 a, b, c, d, e, round, blk; a = f[0]; @@ -237,10 +419,26 @@ R(CHAR64LONG16 *block, uint32 *f, int i) f[0] = e + round + blk + rol(a, 5); } -/* Hash a single 512-bit block. This is the core of the algorithm. */ + +/* + *----------------------------------------------------------------------------- + * + * SHA1TransformNoSSE -- + * + * Apply SHA-1 transformation on a single 512-bit block. + * + * Results: + * 'state' is updated. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ static void -SHA1TransformNoSSE(uint32 state[5], unsigned char buffer[64]) +SHA1TransformNoSSE(uint32 state[5], // IN/OUT + unsigned char buffer[64]) // IN { int i; uint32 f[5]; @@ -267,10 +465,10 @@ SHA1TransformNoSSE(uint32 state[5], unsigned char buffer[64]) * * SHA1Transform -- * - * Applies the SHA-1 transform on one or more 64-byte block buffers. + * Apply SHA-1 transformation on one or more 512-bit block buffers. * * Results: - * state is updated. + * 'state' is updated. * * Side effects: * None. @@ -303,9 +501,25 @@ SHA1Transform(uint32 state[5], // IN/OUT } } -/* SHA1Init - Initialize new context */ -void SHA1Init(SHA1_CTX* context) +/* + *----------------------------------------------------------------------------- + * + * SHA1Init -- + * + * Fill context with initial SHA1 state. + * + * Results: + * Initialized context. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +void +SHA1Init(SHA1_CTX* context) // OUT { uint32 i; for (i = 0; i < 5; i++) { @@ -316,11 +530,26 @@ void SHA1Init(SHA1_CTX* context) VMK_KERNEL_EXPORT(SHA1Init); -/* Run your data through this. */ +/* + *----------------------------------------------------------------------------- + * + * SHA1Update -- + * + * Hash data into context. + * + * Results: + * Updated context. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ -void SHA1Update(SHA1_CTX* context, - const unsigned char *data, - size_t len) +void +SHA1Update(SHA1_CTX* context, // IN/OUT + const unsigned char *data, // IN + size_t len) // IN { size_t curOfs, numRemaining; @@ -357,9 +586,25 @@ void SHA1Update(SHA1_CTX* context, VMK_KERNEL_EXPORT(SHA1Update); -/* Add padding and return the message digest. */ +/* + *----------------------------------------------------------------------------- + * + * SHA1Final -- + * + * Add padding and return the message digest. + * + * Results: + * 160 bit SHA1 value in digest. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ -void SHA1Final(unsigned char digest[SHA1_HASH_LEN], SHA1_CTX* context) +void +SHA1Final(unsigned char digest[SHA1_HASH_LEN], // OUT + SHA1_CTX* context) // IN { size_t i, j; unsigned char finalcount[8]; @@ -405,7 +650,7 @@ VMK_KERNEL_EXPORT(SHA1Final); * will NOT compute the "usual" digest of the given buffer. * * Results: - * result contains the 120-bit SHA-1 value. + * 'result' contains the 160-bit SHA-1 value. * * Side effects: * None. @@ -413,9 +658,10 @@ VMK_KERNEL_EXPORT(SHA1Final); *----------------------------------------------------------------------------- */ -void SHA1RawBufferHash(const void *data, // IN - uint32 size, // IN - uint32 result[5]) // OUT +void +SHA1RawBufferHash(const void *data, // IN + uint32 size, // IN + uint32 result[5]) // OUT { uint32 i; @@ -427,3 +673,124 @@ void SHA1RawBufferHash(const void *data, // IN SHA1Transform(result, (const uint8 *) data, size / 64); } VMK_KERNEL_EXPORT(SHA1RawBufferHash); + + +/* + *----------------------------------------------------------------------------- + * + * SHA1RawTransformBlocks -- + * + * !! WARNING !! Do not use unless you know what you are doing! This + * will NOT compute the "usual" digest of the given buffer. + * Meaning the function does _not_ do padding or handle variable buffer + * length. The buffer size must be a multiple of 64 and the caller should to + * take care of the initial state. + * + * Finds the SHA-1 of a "raw" buffer, without doing any preprocessing (does + * NOT add the 0x80 byte, 0x00 padding, and length encoding required for + * the result to be a proper message digest). + * + * This function is the alternative to SHA1RawBufferHash to control the + * initial state. Used by the native random driver. + * + * Results: + * 'state' contains the 160-bit SHA-1 value. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +void +SHA1RawTransformBlocks(uint32 state[5], // IN/OUT + const unsigned char *buffer, // IN + uint32 numBlocks) // IN +{ + ASSERT(buffer != NULL); + SHA1Transform(state, buffer, numBlocks); +} +VMK_KERNEL_EXPORT(SHA1RawTransformBlocks); + + +/* + *----------------------------------------------------------------------------- + * + * SHA1RawInit -- + * + * Set the initial state for a RAW SHA1 transformations. + * + * You probably want to use SHA1Init. + * + * Results: + * Fill 'state' with initial SHA1 values. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +void +SHA1RawInit(uint32 state[5]) // OUT +{ + state[0] = sha1InitVec[0]; + state[1] = sha1InitVec[1]; + state[2] = sha1InitVec[2]; + state[3] = sha1InitVec[3]; + state[4] = sha1InitVec[4]; +} +VMK_KERNEL_EXPORT(SHA1RawInit); + + +/* + *----------------------------------------------------------------------------- + * + * SHA1MultiBuffer -- + * + * Computes the digests for multiple buffers of the same length. Supports + * at most SHA1_MULTI_MAX_BUFFERS buffers. + * + * On recent processors (with AVX2) this function yields significantly more + * aggregate throughput compared to hashing each buffer separately. Maximum + * throughput is obtained for SHA1_MULTI_MAX_BUFFERS. + * + * Note: currently, the better throughput is only obtained if the length is + * a multiple of 64. + * + * Results: + * The computed digests in digest[i][j], with 0 <= i < numBuffers and + * 0 <= j < SHA1_HASH_LEN. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +void +SHA1MultiBuffer(uint32 numBuffers, // IN + uint32 len, // IN + const void *data[], // IN + unsigned char *digests[]) // OUT +{ + uint32 i; + + ASSERT(numBuffers > 0); + ASSERT(numBuffers <= SHA1_MULTI_MAX_BUFFERS); + + if (len % 64 == 0 && + SHA1MultiBufferAVX2(numBuffers, len, data, digests)) { + return; + } + + /* Use the regular routine. */ + for (i = 0; i < numBuffers; i++) { + SHA1_CTX ctx; + + SHA1Init(&ctx); + SHA1Update(&ctx, data[i], len); + SHA1Final(digests[i], &ctx); + } +} +VMK_KERNEL_EXPORT(SHA1MultiBuffer); diff --git a/open-vm-tools/lib/misc/strutil.c b/open-vm-tools/lib/misc/strutil.c index 1ba231273..ea4ca69f6 100644 --- a/open-vm-tools/lib/misc/strutil.c +++ b/open-vm-tools/lib/misc/strutil.c @@ -302,11 +302,11 @@ StrUtil_StrToInt(int32 *out, // OUT *out = (int32)val; /* - * Input must be complete, no overflow, and value read must fit into - * 32 bits - both signed and unsigned values are accepted. + * Input must be non-empty, complete, no overflow, and value read must fit + * into 32 bits - both signed and unsigned values are accepted. */ - return *ptr == '\0' && errno != ERANGE && + return ptr != str && *ptr == '\0' && errno != ERANGE && (val == (int32)val || val == (uint32)val); } @@ -344,11 +344,11 @@ StrUtil_StrToUint(uint32 *out, // OUT *out = (uint32)val; /* - * Input must be complete, no overflow, and value read must fit into 32 - * bits - both signed and unsigned values are accepted. + * Input must be non-empty, complete, no overflow, and value read must fit + * into 32 bits - both signed and unsigned values are accepted. */ - return *ptr == '\0' && errno != ERANGE && + return ptr != str && *ptr == '\0' && errno != ERANGE && (val == (uint32)val || val == (int32)val); } @@ -389,7 +389,7 @@ StrUtil_StrToInt64(int64 *out, // OUT: The output value *out = strtoll(str, &ptr, 0); #endif - return ptr[0] == '\0' && errno != ERANGE; + return ptr != str && ptr[0] == '\0' && errno != ERANGE; } @@ -429,7 +429,7 @@ StrUtil_StrToUint64(uint64 *out, // OUT: The output value *out = strtoull(str, &ptr, 0); #endif - return ptr[0] == '\0' && errno != ERANGE && errno != EINVAL; + return ptr != str && ptr[0] == '\0' && errno != ERANGE && errno != EINVAL; } @@ -475,7 +475,7 @@ StrUtil_StrToSizet(size_t *out, // OUT: The output value *out = strtoul(str, &ptr, 0); #endif - return *ptr == '\0' && errno != ERANGE; + return ptr != str && *ptr == '\0' && errno != ERANGE; } @@ -514,7 +514,7 @@ StrUtil_StrToDouble(double *out, // OUT: The output value * Input must be complete and no overflow. */ - return *ptr == '\0' && errno != ERANGE; + return ptr != str && *ptr == '\0' && errno != ERANGE; } @@ -657,7 +657,7 @@ StrUtil_CapacityToSectorType(SectorType *out, // OUT: The output value /* *----------------------------------------------------------------------------- * - * StrUtil_FormatSizeInBytes -- + * StrUtil_FormatSizeInBytesUnlocalized -- * * Format a size (in bytes) to a string in a user-friendly way. * @@ -1065,7 +1065,7 @@ StrUtil_DynBufPrintf(DynBuf *b, // IN/OUT * * StrUtil_SafeDynBufPrintf -- * - * A 'safe' variant of StrUtil_SafeDynBufPrintf(), which catches + * A 'safe' variant of StrUtil_DynBufPrintf(), which catches * memory allocation failures and panics. * * Results: diff --git a/open-vm-tools/lib/misc/util_misc.c b/open-vm-tools/lib/misc/util_misc.c index 473cc8b8d..bbe830a1b 100644 --- a/open-vm-tools/lib/misc/util_misc.c +++ b/open-vm-tools/lib/misc/util_misc.c @@ -361,61 +361,6 @@ Util_IsAbsolutePath(const char *path) // IN: path to check } -/* - *----------------------------------------------------------------------------- - * - * Util_GetPrime -- - * - * Find next prime. - * - * Results: - * The smallest prime number greater than or equal to n0. - * - * Side effects: - * None. - * - *----------------------------------------------------------------------------- - */ - -unsigned -Util_GetPrime(unsigned n0) // IN: -{ - unsigned i, ii, n, nn; - - /* - * Keep the main algorithm clean by catching edge cases here. - * There is no 32-bit prime larger than 4294967291. - */ - - VERIFY(n0 <= 4294967291U); - if (n0 <= 2) { - return 2; - } - - for (n = n0 | 1;; n += 2) { - /* - * Run through the numbers 3,5, ..., sqrt(n) and check that none divides - * n. We exploit the identity (i + 2)^2 = i^2 + 4i + 4 to incrementially - * maintain the square of i (and thus save a multiplication each - * iteration). - * - * 65521 is the largest prime below 0xffff, which is where - * we can stop. Using it instead of 0xffff avoids overflowing ii. - */ - - nn = MIN(n, 65521U * 65521U); - for (i = 3, ii = 9;; ii += 4*i+4, i += 2) { - if (ii > nn) { - return n; - } - if (n % i == 0) { - break; - } - } - } -} - - /* *----------------------------------------------------------------------------- * @@ -444,21 +389,12 @@ Util_GetCurrentThreadId(void) * Linux does not declare gettid, but the raw syscall * works fine. We must supply our own TLS caching. */ -#if defined(GLIBC_VERSION_23) static __thread pid_t tid; if (UNLIKELY(tid == 0)) { tid = (pid_t)syscall(SYS_gettid); ASSERT(tid != -1); // All kernels that support TLS also implement gettid } return tid; -#else - /* - * Always a syscall, but glibc-2.2 doesn't have __thread TLS so we couldn't - * cache anyway. We don't support kernels from before 2.4.11 when SYS_gettid - * was introduced, so no need to check the return value. - */ - return (pid_t)syscall(SYS_gettid); -#endif #elif defined(__ANDROID__) /* diff --git a/open-vm-tools/lib/misc/vthreadBase.c b/open-vm-tools/lib/misc/vthreadBase.c index 9b5959e59..eaf799f8d 100644 --- a/open-vm-tools/lib/misc/vthreadBase.c +++ b/open-vm-tools/lib/misc/vthreadBase.c @@ -61,7 +61,8 @@ * threads. If lib/thread is used on top of this library, the lib/thread * NoID function may introduce a smaller limit. * - * On Linux we make use of a combination of __thread and pthread support. + * On Linux we make use of a combination of __thread and pthread support + * (pthread being used to get a cleanup destructor). * On Mac our only option is to use pthreads. * On Windows we could use the compiler supported thread locals but * that has issues when dynamically loaded from a library, so instead @@ -69,12 +70,7 @@ */ #if defined __linux__ -# include /* for __GLIBC_PREREQ */ -# if defined __GLIBC_PREREQ -# if __GLIBC_PREREQ(2, 3) -# define HAVE_TLS -# endif -# endif +# define HAVE_TLS #endif #if defined _WIN32 diff --git a/open-vm-tools/lib/netUtil/Makefile.in b/open-vm-tools/lib/netUtil/Makefile.in deleted file mode 100644 index ce8b37f0a..000000000 --- a/open-vm-tools/lib/netUtil/Makefile.in +++ /dev/null @@ -1,532 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/netUtil -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libNetUtil_la_LIBADD = -am_libNetUtil_la_OBJECTS = netUtilLinux.lo -libNetUtil_la_OBJECTS = $(am_libNetUtil_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libNetUtil_la_SOURCES) -DIST_SOURCES = $(libNetUtil_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libNetUtil.la -libNetUtil_la_SOURCES = netUtilLinux.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/netUtil/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/netUtil/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libNetUtil.la: $(libNetUtil_la_OBJECTS) $(libNetUtil_la_DEPENDENCIES) - $(LINK) $(libNetUtil_la_OBJECTS) $(libNetUtil_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netUtilLinux.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/nicInfo/Makefile.in b/open-vm-tools/lib/nicInfo/Makefile.in deleted file mode 100644 index a7b02aa0d..000000000 --- a/open-vm-tools/lib/nicInfo/Makefile.in +++ /dev/null @@ -1,572 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2014-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@USE_SLASH_PROC_TRUE@am__append_1 = -DUSE_SLASH_PROC -@HAVE_DNET_TRUE@am__append_2 = @DNET_LIBS@ -subdir = lib/nicInfo -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -am__DEPENDENCIES_1 = -libNicInfo_la_DEPENDENCIES = $(am__DEPENDENCIES_1) -am_libNicInfo_la_OBJECTS = libNicInfo_la-compareNicInfo.lo \ - libNicInfo_la-util.lo libNicInfo_la-nicInfo.lo \ - libNicInfo_la-nicInfoPosix.lo -libNicInfo_la_OBJECTS = $(am_libNicInfo_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libNicInfo_la_SOURCES) -DIST_SOURCES = $(libNicInfo_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libNicInfo.la -libNicInfo_la_SOURCES = compareNicInfo.c util.c nicInfo.c \ - nicInfoPosix.c -libNicInfo_la_CPPFLAGS = @GLIB2_CPPFLAGS@ -AM_CFLAGS = $(DNET_CPPFLAGS) $(am__append_1) -libNicInfo_la_LIBADD = $(am__append_2) -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/nicInfo/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/nicInfo/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libNicInfo.la: $(libNicInfo_la_OBJECTS) $(libNicInfo_la_DEPENDENCIES) - $(LINK) $(libNicInfo_la_OBJECTS) $(libNicInfo_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libNicInfo_la-compareNicInfo.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libNicInfo_la-nicInfo.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libNicInfo_la-nicInfoPosix.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libNicInfo_la-util.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libNicInfo_la-compareNicInfo.lo: compareNicInfo.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libNicInfo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libNicInfo_la-compareNicInfo.lo -MD -MP -MF $(DEPDIR)/libNicInfo_la-compareNicInfo.Tpo -c -o libNicInfo_la-compareNicInfo.lo `test -f 'compareNicInfo.c' || echo '$(srcdir)/'`compareNicInfo.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libNicInfo_la-compareNicInfo.Tpo $(DEPDIR)/libNicInfo_la-compareNicInfo.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='compareNicInfo.c' object='libNicInfo_la-compareNicInfo.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libNicInfo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libNicInfo_la-compareNicInfo.lo `test -f 'compareNicInfo.c' || echo '$(srcdir)/'`compareNicInfo.c - -libNicInfo_la-util.lo: util.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libNicInfo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libNicInfo_la-util.lo -MD -MP -MF $(DEPDIR)/libNicInfo_la-util.Tpo -c -o libNicInfo_la-util.lo `test -f 'util.c' || echo '$(srcdir)/'`util.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libNicInfo_la-util.Tpo $(DEPDIR)/libNicInfo_la-util.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='util.c' object='libNicInfo_la-util.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libNicInfo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libNicInfo_la-util.lo `test -f 'util.c' || echo '$(srcdir)/'`util.c - -libNicInfo_la-nicInfo.lo: nicInfo.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libNicInfo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libNicInfo_la-nicInfo.lo -MD -MP -MF $(DEPDIR)/libNicInfo_la-nicInfo.Tpo -c -o libNicInfo_la-nicInfo.lo `test -f 'nicInfo.c' || echo '$(srcdir)/'`nicInfo.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libNicInfo_la-nicInfo.Tpo $(DEPDIR)/libNicInfo_la-nicInfo.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nicInfo.c' object='libNicInfo_la-nicInfo.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libNicInfo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libNicInfo_la-nicInfo.lo `test -f 'nicInfo.c' || echo '$(srcdir)/'`nicInfo.c - -libNicInfo_la-nicInfoPosix.lo: nicInfoPosix.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libNicInfo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libNicInfo_la-nicInfoPosix.lo -MD -MP -MF $(DEPDIR)/libNicInfo_la-nicInfoPosix.Tpo -c -o libNicInfo_la-nicInfoPosix.lo `test -f 'nicInfoPosix.c' || echo '$(srcdir)/'`nicInfoPosix.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libNicInfo_la-nicInfoPosix.Tpo $(DEPDIR)/libNicInfo_la-nicInfoPosix.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nicInfoPosix.c' object='libNicInfo_la-nicInfoPosix.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libNicInfo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libNicInfo_la-nicInfoPosix.lo `test -f 'nicInfoPosix.c' || echo '$(srcdir)/'`nicInfoPosix.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/nicInfo/nicInfoPosix.c b/open-vm-tools/lib/nicInfo/nicInfoPosix.c index 432463768..ebd8443b4 100644 --- a/open-vm-tools/lib/nicInfo/nicInfoPosix.c +++ b/open-vm-tools/lib/nicInfo/nicInfoPosix.c @@ -45,6 +45,7 @@ # else # include # endif +#define USE_RESOLVE 1 #endif #ifdef USERWORLD @@ -52,6 +53,8 @@ #include #include #include + +#define USE_RESOLVE 1 #endif #include @@ -71,10 +74,6 @@ * the GNU C Library forked resolv.h and made modifications of their own, also * without changing __RES. * - * glibc 2.1.92 included a patch which provides IPv6 name server support by - * embedding in6_addr pointers in _res._u._ext. Since I only care about major - * and minor numbers, though, I'm going to condition this impl. on glibc 2.2. - * * ISC, OTOH, provided accessing IPv6 servers via a res_getservers API. * TTBOMK, this went public with BIND 8.3.0. Unfortunately __RES wasn't * bumped for this release, so instead I'm going to assume that appearance with @@ -93,13 +92,11 @@ * version. */ -#if defined __GLIBC__ -# if __GLIBC_PREREQ(2,2) -# define RESOLVER_IPV6_EXT -# endif // __GLIBC_PREREQ(2,2) +#if defined __linux__ +# define RESOLVER_IPV6_EXT #elif (__RES > 19991006 || (__RES == 19991006 && defined RES_F_EDNS0ERR)) # define RESOLVER_IPV6_GETSERVERS -#endif // if defined __GLIBC__ +#endif // if defined __linux__ #include "util.h" @@ -134,16 +131,23 @@ #ifndef NO_DNET static void RecordNetworkAddress(GuestNicV3 *nic, const struct addr *addr); static int ReadInterfaceDetails(const struct intf_entry *entry, void *arg); -static Bool RecordResolverInfo(NicInfoV3 *nicInfo); -static void RecordResolverNS(DnsConfigInfo *dnsConfigInfo); static Bool RecordRoutingInfo(NicInfoV3 *nicInfo); + #if !defined(__FreeBSD__) && !defined(__APPLE__) && !defined(USERWORLD) static int GuestInfoGetIntf(const struct intf_entry *entry, void *arg); #endif + #endif + static char *ValidateConvertAddress(const struct sockaddr *addr); +#ifdef USE_RESOLVE +static Bool RecordResolverInfo(NicInfoV3 *nicInfo); +static void RecordResolverNS(DnsConfigInfo *dnsConfigInfo); +#endif + + /* ****************************************************************************** * GuestInfoGetFqdn -- */ /** @@ -167,6 +171,54 @@ GuestInfoGetFqdn(int outBufLen, // IN: length of output buffer } +#ifdef USERWORLD +/* + ****************************************************************************** + * CountNetmaskBits -- */ /** + * CountNetmaskBitsV4 -- */ /** + * CountNetmaskBitsV6 -- */ /** + * + * @brief Count the number of bits set in a IPV4 or IPV6 netmask + * + * @retval the number of bits set + * + ****************************************************************************** + */ + +static unsigned +CountNetmaskBits(uint64_t x) +{ + /* SWAR reduction, much faster than using the loop/shift */ + const uint64_t m1 = 0x5555555555555555; /* binary: 0101... */ + const uint64_t m2 = 0x3333333333333333; /* binary: 00110011 */ + const uint64_t m4 = 0x0f0f0f0f0f0f0f0f; /* binary: 4 zeros, 4 ones */ + + x -= (x >> 1) & m1; /* each 2 bits into those 2 bits */ + x = (x & m2) + ((x >> 2) & m2); /* each 4 bits into those 4 bits */ + x = (x + (x >> 4)) & m4; /* and so on ... */ + x += x >> 8; + x += x >> 16; + x += x >> 32; + return x & 0x7f; +} + +static unsigned +CountNetmaskBitsV4(struct sockaddr *netmask) +{ + uint64_t value = ((struct sockaddr_in *)netmask)->sin_addr.s_addr; + return CountNetmaskBits(value); +} + +static unsigned +CountNetmaskBitsV6(struct sockaddr *netmask) +{ + uint64_t *value = (uint64_t *)&((struct sockaddr_in6 *)netmask)->sin6_addr; + + return CountNetmaskBits(value[0]) + CountNetmaskBits(value[1]); +} +#endif + + /* ****************************************************************************** * GuestInfoGetNicInfo -- */ /** @@ -196,9 +248,11 @@ GuestInfoGetNicInfo(NicInfoV3 *nicInfo) // OUT intf_close(intf); +#ifdef USE_RESOLVE if (!RecordResolverInfo(nicInfo)) { return FALSE; } +#endif if (!RecordRoutingInfo(nicInfo)) { return FALSE; @@ -207,6 +261,7 @@ GuestInfoGetNicInfo(NicInfoV3 *nicInfo) // OUT return TRUE; #elif defined(USERWORLD) struct ifaddrs *ifaddrs = NULL; + if (getifaddrs(&ifaddrs) == 0 && ifaddrs != NULL) { struct ifaddrs *pkt; /* @@ -241,6 +296,7 @@ GuestInfoGetNicInfo(NicInfoV3 *nicInfo) // OUT strncmp(ip->ifa_name, pkt->ifa_name, IFNAMSIZ) == 0) { int family = sa->sa_family; Bool goodAddress = FALSE; + unsigned nBits = 0; /* * Ignore any loopback addresses. */ @@ -248,16 +304,19 @@ GuestInfoGetNicInfo(NicInfoV3 *nicInfo) // OUT struct sockaddr_in *sin = (struct sockaddr_in *)sa; if ((ntohl(sin->sin_addr.s_addr) >> IN_CLASSA_NSHIFT) != IN_LOOPBACKNET) { + nBits = CountNetmaskBitsV4(ip->ifa_netmask); goodAddress = TRUE; } } else if (family == AF_INET6) { struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sa; if (!IN6_IS_ADDR_LOOPBACK(&sin6->sin6_addr)) { + nBits = CountNetmaskBitsV6(ip->ifa_netmask); goodAddress = TRUE; } } if (goodAddress) { - GuestInfoAddIpAddress(nic, ip->ifa_addr, 0, NULL, NULL); + GuestInfoAddIpAddress(nic, ip->ifa_addr, nBits, NULL, + NULL); } } } @@ -265,6 +324,15 @@ GuestInfoGetNicInfo(NicInfoV3 *nicInfo) // OUT } freeifaddrs(ifaddrs); } + +#ifdef USE_RESOLVE + if (!RecordResolverInfo(nicInfo)) { + return FALSE; + } +#endif + + // XXX - TODO -- fill in routing info + return TRUE; #else return FALSE; @@ -449,6 +517,10 @@ ReadInterfaceDetails(const struct intf_entry *entry, // IN: current interface e return 0; } +#endif // !NO_DNET + + +#ifdef USE_RESOLVE /* ****************************************************************************** @@ -621,6 +693,10 @@ RecordResolverNS(DnsConfigInfo *dnsConfigInfo) // IN #endif // if !defined RESOLVER_IPV6_GETSERVERS } +#endif // USE_RESOLVE + + +#ifndef NO_DNET #ifdef USE_SLASH_PROC /* diff --git a/open-vm-tools/lib/panic/Makefile.in b/open-vm-tools/lib/panic/Makefile.in deleted file mode 100644 index ab3a7a100..000000000 --- a/open-vm-tools/lib/panic/Makefile.in +++ /dev/null @@ -1,532 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/panic -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libPanic_la_LIBADD = -am_libPanic_la_OBJECTS = panic.lo -libPanic_la_OBJECTS = $(am_libPanic_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libPanic_la_SOURCES) -DIST_SOURCES = $(libPanic_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libPanic.la -libPanic_la_SOURCES = panic.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/panic/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/panic/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libPanic.la: $(libPanic_la_OBJECTS) $(libPanic_la_DEPENDENCIES) - $(LINK) $(libPanic_la_OBJECTS) $(libPanic_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/panic.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/panicDefault/Makefile.in b/open-vm-tools/lib/panicDefault/Makefile.in deleted file mode 100644 index d9239b054..000000000 --- a/open-vm-tools/lib/panicDefault/Makefile.in +++ /dev/null @@ -1,532 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/panicDefault -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libPanicDefault_la_LIBADD = -am_libPanicDefault_la_OBJECTS = panicDefault.lo -libPanicDefault_la_OBJECTS = $(am_libPanicDefault_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libPanicDefault_la_SOURCES) -DIST_SOURCES = $(libPanicDefault_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libPanicDefault.la -libPanicDefault_la_SOURCES = panicDefault.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/panicDefault/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/panicDefault/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libPanicDefault.la: $(libPanicDefault_la_OBJECTS) $(libPanicDefault_la_DEPENDENCIES) - $(LINK) $(libPanicDefault_la_OBJECTS) $(libPanicDefault_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/panicDefault.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/panicDefault/panicDefault.c b/open-vm-tools/lib/panicDefault/panicDefault.c index 9a412705a..a887d5986 100644 --- a/open-vm-tools/lib/panicDefault/panicDefault.c +++ b/open-vm-tools/lib/panicDefault/panicDefault.c @@ -19,7 +19,7 @@ /* * panic.c -- * - * Basic Panic() + * Basic Panic() */ @@ -48,8 +48,8 @@ */ void -Panic(const char *fmt, // IN: message format - ...) // IN: message format arguments +Panic(const char *fmt, // IN: message format + ...) // IN: message format arguments { va_list ap; diff --git a/open-vm-tools/lib/poll/Makefile.in b/open-vm-tools/lib/poll/Makefile.in deleted file mode 100644 index d1a898191..000000000 --- a/open-vm-tools/lib/poll/Makefile.in +++ /dev/null @@ -1,532 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2013-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/poll -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libPoll_la_LIBADD = -am_libPoll_la_OBJECTS = poll.lo -libPoll_la_OBJECTS = $(am_libPoll_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libPoll_la_SOURCES) -DIST_SOURCES = $(libPoll_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libPoll.la -libPoll_la_SOURCES = poll.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/poll/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/poll/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libPoll.la: $(libPoll_la_OBJECTS) $(libPoll_la_DEPENDENCIES) - $(LINK) $(libPoll_la_OBJECTS) $(libPoll_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poll.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/poll/poll.c b/open-vm-tools/lib/poll/poll.c index c3b5bfdd2..f9814cfaa 100644 --- a/open-vm-tools/lib/poll/poll.c +++ b/open-vm-tools/lib/poll/poll.c @@ -1067,7 +1067,6 @@ PollAddRemoveCBThread(void *clientData) // IN: unused /* Add and remove real time and main loop callbacks */ cbLock = MXUser_CreateRecLock("pollUnitTestLock", RANK_pollUnitTestLock); - VERIFY(cbLock); rtDeleted = FALSE; Poll_Callback(POLL_CS_MAIN, periodicFlag[oddIter], @@ -1119,7 +1118,6 @@ PollAddRemoveCBThread(void *clientData) // IN: unused /* Add and remove device callbacks */ cbLock = MXUser_CreateRecLock("pollUnitTestLock", RANK_pollUnitTestLock); - VERIFY(cbLock); drDeleted = FALSE; Poll_Callback(POLL_CS_MAIN, POLL_FLAG_SOCKET | POLL_FLAG_READ | periodicFlag[oddIter], @@ -1942,7 +1940,6 @@ PollUnitTest_StateMachine(void *clientData) // IN: Unused useLocking = TRUE; cbLock = MXUser_CreateRecLock("pollUnitTestLock", RANK_pollUnitTestLock); - VERIFY(cbLock); #ifdef _WIN32 /* Discard sockets used in connect test and re-create them. */ @@ -2063,7 +2060,6 @@ PollUnitTest_StateMachine(void *clientData) // IN: Unused /* The previous test may have destroyed the lock. */ cbLock = MXUser_CreateRecLock("pollUnitTestLock", RANK_pollUnitTestLock); - VERIFY(cbLock); } deviceEv0Count = 0; deviceEv1Count = 0; diff --git a/open-vm-tools/lib/pollGtk/Makefile.in b/open-vm-tools/lib/pollGtk/Makefile.in deleted file mode 100644 index d32f56f0c..000000000 --- a/open-vm-tools/lib/pollGtk/Makefile.in +++ /dev/null @@ -1,533 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2013-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/pollGtk -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libPollGtk_la_LIBADD = -am_libPollGtk_la_OBJECTS = pollGtk.lo -libPollGtk_la_OBJECTS = $(am_libPollGtk_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libPollGtk_la_SOURCES) -DIST_SOURCES = $(libPollGtk_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libPollGtk.la -libPollGtk_la_SOURCES = pollGtk.c -AM_CFLAGS = @GLIB2_CPPFLAGS@ -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/pollGtk/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/pollGtk/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libPollGtk.la: $(libPollGtk_la_OBJECTS) $(libPollGtk_la_DEPENDENCIES) - $(LINK) $(libPollGtk_la_OBJECTS) $(libPollGtk_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pollGtk.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/pollGtk/pollGtk.c b/open-vm-tools/lib/pollGtk/pollGtk.c index e09fe15f2..520b74c66 100644 --- a/open-vm-tools/lib/pollGtk/pollGtk.c +++ b/open-vm-tools/lib/pollGtk/pollGtk.c @@ -232,7 +232,6 @@ PollGtkInit(void) pollState->lock = MXUser_CreateExclLock("pollGtkLock", RANK_pollDefaultLock); - VERIFY(pollState->lock); pollState->deviceTable = g_hash_table_new_full(g_direct_hash, g_direct_equal, diff --git a/open-vm-tools/lib/procMgr/Makefile.in b/open-vm-tools/lib/procMgr/Makefile.in deleted file mode 100644 index 43bbc7fbc..000000000 --- a/open-vm-tools/lib/procMgr/Makefile.in +++ /dev/null @@ -1,536 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@SOLARIS_TRUE@am__append_1 = procMgrSolaris.c -subdir = lib/procMgr -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libProcMgr_la_LIBADD = -am__libProcMgr_la_SOURCES_DIST = procMgrPosix.c procMgrSolaris.c -@SOLARIS_TRUE@am__objects_1 = procMgrSolaris.lo -am_libProcMgr_la_OBJECTS = procMgrPosix.lo $(am__objects_1) -libProcMgr_la_OBJECTS = $(am_libProcMgr_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libProcMgr_la_SOURCES) -DIST_SOURCES = $(am__libProcMgr_la_SOURCES_DIST) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libProcMgr.la -libProcMgr_la_SOURCES = procMgrPosix.c $(am__append_1) -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/procMgr/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/procMgr/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libProcMgr.la: $(libProcMgr_la_OBJECTS) $(libProcMgr_la_DEPENDENCIES) - $(LINK) $(libProcMgr_la_OBJECTS) $(libProcMgr_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/procMgrPosix.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/procMgrSolaris.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/procMgr/procMgrPosix.c b/open-vm-tools/lib/procMgr/procMgrPosix.c index d0e78a4f7..2a603e263 100644 --- a/open-vm-tools/lib/procMgr/procMgrPosix.c +++ b/open-vm-tools/lib/procMgr/procMgrPosix.c @@ -129,6 +129,8 @@ static Bool ProcMgrKill(pid_t pid, static int ProcMgrGetCommandLineArgs(long pid, DynBuf *argsBuf, char **procCmdName); + +Bool ProcMgr_PromoteEffectiveToReal(void); #endif #ifdef sun @@ -137,34 +139,6 @@ static int ProcMgrGetCommandLineArgs(long pid, #define BASH_PATH "/bin/bash" #endif -#if defined(linux) && !defined(GLIBC_VERSION_23) && !defined(__UCLIBC__) -/* - * Implements the system calls (they are not wrapped by glibc til 2.3.2). - * - * The _syscall3 macro from the Linux kernel headers is not PIC-safe. - * See: http://bugzilla.kernel.org/show_bug.cgi?id=7302 - * - * (In fact, newer Linux kernels don't even define _syscall macros anymore.) - */ - -static INLINE int -setresuid(uid_t ruid, - uid_t euid, - uid_t suid) -{ - return syscall(__NR_setresuid, ruid, euid, suid); -} - - -static INLINE int -setresgid(gid_t ruid, - gid_t euid, - gid_t suid) -{ - return syscall(__NR_setresgid, ruid, euid, suid); -} -#endif - /* *---------------------------------------------------------------------- @@ -1375,6 +1349,21 @@ ProcMgrStartProcess(char const *cmd, // IN: UTF-8 encoded cmd * Child */ +#ifdef __APPLE__ + /* + * On OS X with security fixes, we cannot revert the real uid if + * its changed, so only the effective uid is changed. But for + * running programs we need both. See comments for + * ProcMgr_ImpersonateUserStart() for details. + * + * If it fails, bail since its a security issue if real uid is still + * root. + */ + if (!ProcMgr_PromoteEffectiveToReal()) { + Panic("%s: Could not set real uid to effective\n", __FUNCTION__); + } +#endif + if (NULL != workDir) { if (chdir(workDir) != 0) { Warning("%s: Could not chdir(%s) %s\n", __FUNCTION__, workDir, @@ -2046,6 +2035,15 @@ ProcMgr_Free(ProcMgr_AsyncProc *asyncProc) // IN * The user name should be UTF-8 encoded, although we do not enforce * it right now. * + * Note that for OS X, we cannot set real uid. Until a security + * patch for 10.10.3 (https://support.apple.com/en-us/HT204659) + * it worked, but since the patch once the real user has been + * changed, it cannot be restored. So for OS X we set just + * the effective uid. This requires additional tweaks in + * ProcMgr_ExecAsync() to call ProcMgr_PromoteEffectiveToReal(), + * and preventing kill(2) from being called since it looks at + * the real uid. + * * Assumes it will be called as root. * * Results: @@ -2107,7 +2105,7 @@ ProcMgr_ImpersonateUserStart(const char *user, // IN: UTF-8 encoded user name #if defined(USERWORLD) ret = Id_SetREGid(ppw->pw_gid, ppw->pw_gid); #elif defined(__APPLE__) - ret = setregid(ppw->pw_gid, ppw->pw_gid); + ret = setegid(ppw->pw_gid); #else ret = setresgid(ppw->pw_gid, ppw->pw_gid, root_gid); #endif @@ -2126,7 +2124,7 @@ ProcMgr_ImpersonateUserStart(const char *user, // IN: UTF-8 encoded user name #if defined(USERWORLD) ret = Id_SetREUid(ppw->pw_uid, ppw->pw_uid); #elif defined(__APPLE__) - ret = setreuid(ppw->pw_uid, ppw->pw_uid); + ret = seteuid(ppw->pw_uid); #else ret = setresuid(ppw->pw_uid, ppw->pw_uid, 0); #endif @@ -2188,7 +2186,7 @@ ProcMgr_ImpersonateUserStop(void) #if defined(USERWORLD) ret = Id_SetREUid(ppw->pw_uid, ppw->pw_uid); #elif defined(__APPLE__) - ret = setreuid(ppw->pw_uid, ppw->pw_uid); + ret = seteuid(ppw->pw_uid); #else ret = setresuid(ppw->pw_uid, ppw->pw_uid, 0); #endif @@ -2201,7 +2199,7 @@ ProcMgr_ImpersonateUserStop(void) #if defined(USERWORLD) ret = Id_SetREGid(ppw->pw_gid, ppw->pw_gid); #elif defined(__APPLE__) - ret = setregid(ppw->pw_gid, ppw->pw_gid); + ret = setegid(ppw->pw_gid); #else ret = setresgid(ppw->pw_gid, ppw->pw_gid, ppw->pw_gid); #endif @@ -2225,6 +2223,51 @@ ProcMgr_ImpersonateUserStop(void) return TRUE; } + +#ifdef __APPLE__ +/* + *---------------------------------------------------------------------- + * + * ProcMgr_PromoteEffectiveToReal -- + * + * Sets the processes real uid and gid to match the effective. + * Once done, it cannot be undone. + * + * See the commentary in ProcMgr_ImpersonateUserStart() for + * why this is needed. + * + * Results: + * TRUE on success + * + * Side effects: + * Real uid is now effective. + * + *---------------------------------------------------------------------- + */ + +Bool +ProcMgr_PromoteEffectiveToReal(void) +{ + int ret; + uid_t uid = geteuid(); + gid_t gid = getegid(); + + ret = setregid(gid, gid); + if (ret < 0) { + Warning("Failed to setregid(%d) %d\n", gid, errno); + return FALSE; + } + ret = setreuid(uid, uid); + if (ret < 0) { + Warning("Failed to setreuid(%d) %d\n", uid, errno); + return FALSE; + } + + return TRUE; +} +#endif // __APPLE__ + + /* *---------------------------------------------------------------------- * diff --git a/open-vm-tools/lib/rpcChannel/Makefile.in b/open-vm-tools/lib/rpcChannel/Makefile.in deleted file mode 100644 index 5178f81ea..000000000 --- a/open-vm-tools/lib/rpcChannel/Makefile.in +++ /dev/null @@ -1,570 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@HAVE_VSOCK_TRUE@am__append_1 = vsockChannel.c simpleSocket.c -subdir = lib/rpcChannel -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libRpcChannel_la_LIBADD = -am__libRpcChannel_la_SOURCES_DIST = bdoorChannel.c rpcChannel.c \ - vsockChannel.c simpleSocket.c -@HAVE_VSOCK_TRUE@am__objects_1 = libRpcChannel_la-vsockChannel.lo \ -@HAVE_VSOCK_TRUE@ libRpcChannel_la-simpleSocket.lo -am_libRpcChannel_la_OBJECTS = libRpcChannel_la-bdoorChannel.lo \ - libRpcChannel_la-rpcChannel.lo $(am__objects_1) -libRpcChannel_la_OBJECTS = $(am_libRpcChannel_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libRpcChannel_la_SOURCES) -DIST_SOURCES = $(am__libRpcChannel_la_SOURCES_DIST) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libRpcChannel.la -libRpcChannel_la_SOURCES = bdoorChannel.c rpcChannel.c $(am__append_1) -libRpcChannel_la_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/rpcChannel/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/rpcChannel/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libRpcChannel.la: $(libRpcChannel_la_OBJECTS) $(libRpcChannel_la_DEPENDENCIES) - $(LINK) $(libRpcChannel_la_OBJECTS) $(libRpcChannel_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRpcChannel_la-bdoorChannel.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRpcChannel_la-rpcChannel.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRpcChannel_la-simpleSocket.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRpcChannel_la-vsockChannel.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libRpcChannel_la-bdoorChannel.lo: bdoorChannel.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRpcChannel_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libRpcChannel_la-bdoorChannel.lo -MD -MP -MF $(DEPDIR)/libRpcChannel_la-bdoorChannel.Tpo -c -o libRpcChannel_la-bdoorChannel.lo `test -f 'bdoorChannel.c' || echo '$(srcdir)/'`bdoorChannel.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libRpcChannel_la-bdoorChannel.Tpo $(DEPDIR)/libRpcChannel_la-bdoorChannel.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bdoorChannel.c' object='libRpcChannel_la-bdoorChannel.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRpcChannel_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libRpcChannel_la-bdoorChannel.lo `test -f 'bdoorChannel.c' || echo '$(srcdir)/'`bdoorChannel.c - -libRpcChannel_la-rpcChannel.lo: rpcChannel.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRpcChannel_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libRpcChannel_la-rpcChannel.lo -MD -MP -MF $(DEPDIR)/libRpcChannel_la-rpcChannel.Tpo -c -o libRpcChannel_la-rpcChannel.lo `test -f 'rpcChannel.c' || echo '$(srcdir)/'`rpcChannel.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libRpcChannel_la-rpcChannel.Tpo $(DEPDIR)/libRpcChannel_la-rpcChannel.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rpcChannel.c' object='libRpcChannel_la-rpcChannel.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRpcChannel_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libRpcChannel_la-rpcChannel.lo `test -f 'rpcChannel.c' || echo '$(srcdir)/'`rpcChannel.c - -libRpcChannel_la-vsockChannel.lo: vsockChannel.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRpcChannel_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libRpcChannel_la-vsockChannel.lo -MD -MP -MF $(DEPDIR)/libRpcChannel_la-vsockChannel.Tpo -c -o libRpcChannel_la-vsockChannel.lo `test -f 'vsockChannel.c' || echo '$(srcdir)/'`vsockChannel.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libRpcChannel_la-vsockChannel.Tpo $(DEPDIR)/libRpcChannel_la-vsockChannel.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='vsockChannel.c' object='libRpcChannel_la-vsockChannel.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRpcChannel_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libRpcChannel_la-vsockChannel.lo `test -f 'vsockChannel.c' || echo '$(srcdir)/'`vsockChannel.c - -libRpcChannel_la-simpleSocket.lo: simpleSocket.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRpcChannel_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libRpcChannel_la-simpleSocket.lo -MD -MP -MF $(DEPDIR)/libRpcChannel_la-simpleSocket.Tpo -c -o libRpcChannel_la-simpleSocket.lo `test -f 'simpleSocket.c' || echo '$(srcdir)/'`simpleSocket.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libRpcChannel_la-simpleSocket.Tpo $(DEPDIR)/libRpcChannel_la-simpleSocket.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='simpleSocket.c' object='libRpcChannel_la-simpleSocket.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRpcChannel_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libRpcChannel_la-simpleSocket.lo `test -f 'simpleSocket.c' || echo '$(srcdir)/'`simpleSocket.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/rpcIn/Makefile.in b/open-vm-tools/lib/rpcIn/Makefile.in deleted file mode 100644 index 800339734..000000000 --- a/open-vm-tools/lib/rpcIn/Makefile.in +++ /dev/null @@ -1,540 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/rpcIn -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libRpcIn_la_LIBADD = -am_libRpcIn_la_OBJECTS = libRpcIn_la-rpcin.lo -libRpcIn_la_OBJECTS = $(am_libRpcIn_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libRpcIn_la_SOURCES) -DIST_SOURCES = $(libRpcIn_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libRpcIn.la -libRpcIn_la_SOURCES = rpcin.c -libRpcIn_la_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/rpcIn/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/rpcIn/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libRpcIn.la: $(libRpcIn_la_OBJECTS) $(libRpcIn_la_DEPENDENCIES) - $(LINK) $(libRpcIn_la_OBJECTS) $(libRpcIn_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRpcIn_la-rpcin.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libRpcIn_la-rpcin.lo: rpcin.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRpcIn_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libRpcIn_la-rpcin.lo -MD -MP -MF $(DEPDIR)/libRpcIn_la-rpcin.Tpo -c -o libRpcIn_la-rpcin.lo `test -f 'rpcin.c' || echo '$(srcdir)/'`rpcin.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libRpcIn_la-rpcin.Tpo $(DEPDIR)/libRpcIn_la-rpcin.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rpcin.c' object='libRpcIn_la-rpcin.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRpcIn_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libRpcIn_la-rpcin.lo `test -f 'rpcin.c' || echo '$(srcdir)/'`rpcin.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/rpcOut/Makefile.in b/open-vm-tools/lib/rpcOut/Makefile.in deleted file mode 100644 index 5eab8bba3..000000000 --- a/open-vm-tools/lib/rpcOut/Makefile.in +++ /dev/null @@ -1,532 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/rpcOut -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libRpcOut_la_LIBADD = -am_libRpcOut_la_OBJECTS = rpcout.lo -libRpcOut_la_OBJECTS = $(am_libRpcOut_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libRpcOut_la_SOURCES) -DIST_SOURCES = $(libRpcOut_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libRpcOut.la -libRpcOut_la_SOURCES = rpcout.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/rpcOut/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/rpcOut/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libRpcOut.la: $(libRpcOut_la_OBJECTS) $(libRpcOut_la_DEPENDENCIES) - $(LINK) $(libRpcOut_la_OBJECTS) $(libRpcOut_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rpcout.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/rpcVmx/Makefile.in b/open-vm-tools/lib/rpcVmx/Makefile.in deleted file mode 100644 index 6caa18de4..000000000 --- a/open-vm-tools/lib/rpcVmx/Makefile.in +++ /dev/null @@ -1,532 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/rpcVmx -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libRpcVmx_la_LIBADD = -am_libRpcVmx_la_OBJECTS = rpcvmx.lo -libRpcVmx_la_OBJECTS = $(am_libRpcVmx_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libRpcVmx_la_SOURCES) -DIST_SOURCES = $(libRpcVmx_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libRpcVmx.la -libRpcVmx_la_SOURCES = rpcvmx.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/rpcVmx/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/rpcVmx/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libRpcVmx.la: $(libRpcVmx_la_OBJECTS) $(libRpcVmx_la_DEPENDENCIES) - $(LINK) $(libRpcVmx_la_OBJECTS) $(libRpcVmx_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rpcvmx.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/slashProc/Makefile.in b/open-vm-tools/lib/slashProc/Makefile.in deleted file mode 100644 index d3a676900..000000000 --- a/open-vm-tools/lib/slashProc/Makefile.in +++ /dev/null @@ -1,541 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/slashProc -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libSlashProc_la_LIBADD = -am_libSlashProc_la_OBJECTS = libSlashProc_la-net.lo -libSlashProc_la_OBJECTS = $(am_libSlashProc_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libSlashProc_la_SOURCES) -DIST_SOURCES = $(libSlashProc_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libSlashProc.la -libSlashProc_la_SOURCES = net.c -libSlashProc_la_CPPFLAGS = @GLIB2_CPPFLAGS@ -AM_CFLAGS = $(DNET_CPPFLAGS) -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/slashProc/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/slashProc/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libSlashProc.la: $(libSlashProc_la_OBJECTS) $(libSlashProc_la_DEPENDENCIES) - $(LINK) $(libSlashProc_la_OBJECTS) $(libSlashProc_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSlashProc_la-net.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libSlashProc_la-net.lo: net.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libSlashProc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libSlashProc_la-net.lo -MD -MP -MF $(DEPDIR)/libSlashProc_la-net.Tpo -c -o libSlashProc_la-net.lo `test -f 'net.c' || echo '$(srcdir)/'`net.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libSlashProc_la-net.Tpo $(DEPDIR)/libSlashProc_la-net.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='net.c' object='libSlashProc_la-net.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libSlashProc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libSlashProc_la-net.lo `test -f 'net.c' || echo '$(srcdir)/'`net.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/sslDirect/Makefile.in b/open-vm-tools/lib/sslDirect/Makefile.in deleted file mode 100644 index 564b0ae73..000000000 --- a/open-vm-tools/lib/sslDirect/Makefile.in +++ /dev/null @@ -1,556 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2013-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@ENABLE_GRABBITMQPROXY_TRUE@am__append_1 = @SSL_CPPFLAGS@ -@ENABLE_GRABBITMQPROXY_TRUE@am__append_2 = sslDirect.c -@ENABLE_GRABBITMQPROXY_FALSE@am__append_3 = sslStubs.c -subdir = lib/sslDirect -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libSslDirect_la_LIBADD = -am__libSslDirect_la_SOURCES_DIST = sslDirect.c sslStubs.c -@ENABLE_GRABBITMQPROXY_TRUE@am__objects_1 = \ -@ENABLE_GRABBITMQPROXY_TRUE@ libSslDirect_la-sslDirect.lo -@ENABLE_GRABBITMQPROXY_FALSE@am__objects_2 = \ -@ENABLE_GRABBITMQPROXY_FALSE@ libSslDirect_la-sslStubs.lo -am_libSslDirect_la_OBJECTS = $(am__objects_1) $(am__objects_2) -libSslDirect_la_OBJECTS = $(am_libSslDirect_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libSslDirect_la_SOURCES) -DIST_SOURCES = $(am__libSslDirect_la_SOURCES_DIST) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libSslDirect.la -libSslDirect_la_CPPFLAGS = $(am__append_1) -libSslDirect_la_SOURCES = $(am__append_2) $(am__append_3) -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/sslDirect/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/sslDirect/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libSslDirect.la: $(libSslDirect_la_OBJECTS) $(libSslDirect_la_DEPENDENCIES) - $(LINK) $(libSslDirect_la_OBJECTS) $(libSslDirect_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSslDirect_la-sslDirect.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSslDirect_la-sslStubs.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libSslDirect_la-sslDirect.lo: sslDirect.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libSslDirect_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libSslDirect_la-sslDirect.lo -MD -MP -MF $(DEPDIR)/libSslDirect_la-sslDirect.Tpo -c -o libSslDirect_la-sslDirect.lo `test -f 'sslDirect.c' || echo '$(srcdir)/'`sslDirect.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libSslDirect_la-sslDirect.Tpo $(DEPDIR)/libSslDirect_la-sslDirect.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sslDirect.c' object='libSslDirect_la-sslDirect.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libSslDirect_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libSslDirect_la-sslDirect.lo `test -f 'sslDirect.c' || echo '$(srcdir)/'`sslDirect.c - -libSslDirect_la-sslStubs.lo: sslStubs.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libSslDirect_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libSslDirect_la-sslStubs.lo -MD -MP -MF $(DEPDIR)/libSslDirect_la-sslStubs.Tpo -c -o libSslDirect_la-sslStubs.lo `test -f 'sslStubs.c' || echo '$(srcdir)/'`sslStubs.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libSslDirect_la-sslStubs.Tpo $(DEPDIR)/libSslDirect_la-sslStubs.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sslStubs.c' object='libSslDirect_la-sslStubs.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libSslDirect_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libSslDirect_la-sslStubs.lo `test -f 'sslStubs.c' || echo '$(srcdir)/'`sslStubs.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/sslDirect/sslDirect.c b/open-vm-tools/lib/sslDirect/sslDirect.c index a86722f86..6b0573a8b 100644 --- a/open-vm-tools/lib/sslDirect/sslDirect.c +++ b/open-vm-tools/lib/sslDirect/sslDirect.c @@ -789,3 +789,92 @@ SSL_TryCompleteAccept(SSLSock ssl) // IN } } + +/* + * OpenSSL cipher lists are colon, comma, or space delimited lists. + * To get a full list of ciphers: + * openssl ciphers | sed 's#:#\n#g' + * + * For the VMware Product Security Policy approved ciphers, see + * https://wiki.eng.vmware.com/VSECR/vSDL/PSP/PSPRequirements#.C2.A0.C2.A0.5B3.3.E2.80.93M.5D_TLS_Cipher-Suites + */ +#define SSL_CIPHER_LIST \ + "!aNULL:kECDH+AES:ECDH+AES:RSA+AES:@STRENGTH" + + +/* + *---------------------------------------------------------------------- + * + * SSL_NewContext -- + * + * Return an SSL context initialized with reasonable defaults. + * + *---------------------------------------------------------------------- + */ + +void * +SSL_NewContext(void) +{ + SSL_CTX *ctx; + long ctxOptions; + + ctx = SSL_CTX_new(SSLv23_method()); + + if (!ctx) { + SSLPrintErrors(VMW_LOG_WARNING); + Panic("Error Starting Up Default SSL context\n"); + NOT_REACHED(); + } + + /* + * Disable SSLv2/SSLv3 and enable all known bug workarounds. + */ + ctxOptions = SSL_OP_ALL | SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 | + SSL_OP_SINGLE_DH_USE | + SSL_OP_CIPHER_SERVER_PREFERENCE; + + /* + * Also turn off support for TLS ticket-based session resumption (RFC 4507) + * since this will cause connections to older versions of OpenSSL to fail. + * This was enabled by default starting with OpenSSL 0.9.8j. + */ + ctxOptions |= SSL_OP_NO_TICKET; + + /* SSL compression can be disabled per-context starting in OpenSSL 1.0.0 */ +#ifdef SSL_OP_NO_COMPRESSION + ctxOptions |= SSL_OP_NO_COMPRESSION; +#endif + + SSL_CTX_set_options(ctx, ctxOptions); + + /* + * Automatically retry an operation that failed with + * SSL_WANT_{READ|WRITE} if blocking sockets are being used + * + * This flag is ineffective for non-blocking sockets and the + * application must retry the SSL IO operation that needs to be retried + * until it succeeds, before it can perform any other IO on the + * SSL. + */ + SSL_CTX_ctrl(ctx, SSL_CTRL_MODE, SSL_MODE_AUTO_RETRY, NULL); + + /* Don't cache sessions (client not smart enough to use them */ + SSL_CTX_ctrl(ctx, SSL_CTRL_SET_SESS_CACHE_MODE, + SSL_SESS_CACHE_OFF, NULL); + /* + * disable the bidirectional shutdown sequence. This is really + * only useful when we want to use SSL session caching. + * (a session will only be cached if it was shutdown properly, + * using the full bidirectional method). + * */ + SSL_CTX_set_quiet_shutdown(ctx, 1); + + /* + * Set the cipher for the context. All sessions initiated from this + * context will use the same cipher. Use the SSL_set_cipher_list to + * change the cipher on a per session basis. + */ + SSL_CTX_set_cipher_list(ctx, SSL_CIPHER_LIST); + + return ctx; +} diff --git a/open-vm-tools/lib/string/Makefile.in b/open-vm-tools/lib/string/Makefile.in deleted file mode 100644 index 5c978af08..000000000 --- a/open-vm-tools/lib/string/Makefile.in +++ /dev/null @@ -1,542 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@USE_PRINTF_WRAPPERS_TRUE@am__append_1 = bsd_output_shared.c \ -@USE_PRINTF_WRAPPERS_TRUE@ bsd_vsnprintf.c bsd_vsnwprintf.c -subdir = lib/string -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libString_la_LIBADD = -am__libString_la_SOURCES_DIST = bsd_output_shared.c bsd_vsnprintf.c \ - bsd_vsnwprintf.c convertutf.c str.c -@USE_PRINTF_WRAPPERS_TRUE@am__objects_1 = bsd_output_shared.lo \ -@USE_PRINTF_WRAPPERS_TRUE@ bsd_vsnprintf.lo bsd_vsnwprintf.lo -am_libString_la_OBJECTS = $(am__objects_1) convertutf.lo str.lo -libString_la_OBJECTS = $(am_libString_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libString_la_SOURCES) -DIST_SOURCES = $(am__libString_la_SOURCES_DIST) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libString.la -libString_la_SOURCES = $(am__append_1) convertutf.c str.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/string/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/string/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libString.la: $(libString_la_OBJECTS) $(libString_la_DEPENDENCIES) - $(LINK) $(libString_la_OBJECTS) $(libString_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsd_output_shared.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsd_vsnprintf.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsd_vsnwprintf.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/convertutf.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/str.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/string/bsd_vsnwprintf.c b/open-vm-tools/lib/string/bsd_vsnwprintf.c index b1a078c16..b78f95a66 100644 --- a/open-vm-tools/lib/string/bsd_vsnwprintf.c +++ b/open-vm-tools/lib/string/bsd_vsnwprintf.c @@ -62,6 +62,14 @@ #include "msgfmt.h" #include "convertutf.h" +#if defined(__ANDROID__) +/* + * Android doesn't support dtoa() or ldtoa(). + */ +#define NO_DTOA +#define NO_LDTOA +#endif + typedef struct StrBuf { Bool alloc; Bool error; @@ -738,8 +746,12 @@ bsd_vsnwprintf(wchar_t **outBuf, size_t bufSize, const wchar_t *fmt0, goto rflag; case '\'': flags |= GROUPING; +#if defined(__ANDROID__) + thousands_sep = ','; +#else thousands_sep = (wchar_t) *(localeconv()->thousands_sep); grouping = localeconv()->grouping; +#endif /* * Grouping should not begin with 0, but it nevertheless @@ -836,10 +848,14 @@ bsd_vsnwprintf(wchar_t **outBuf, size_t bufSize, const wchar_t *fmt0, flags |= LONGINT; /*FALLTHROUGH*/ case 'c': +#if defined(__ANDROID__) + *(cp = buf) = (wchar_t)GETARG(wint_t); +#else if (flags & LONGINT) *(cp = buf) = (wchar_t)GETARG(wint_t); else *(cp = buf) = (wchar_t)bsd_btowc(GETARG(int)); +#endif size = 1; sign = '\0'; break; @@ -888,14 +904,34 @@ bsd_vsnwprintf(wchar_t **outBuf, size_t bufSize, const wchar_t *fmt0, free(convbuf); if (flags & LLONGINT) { fparg.ldbl = GETARG(long double); +#if defined NO_DTOA + dtoaresult = NULL; + /* + * Below is to keep compiler happy + */ + signflag = -1; + expt = 0; + dtoaend = NULL; +#else dtoaresult = ldtoa(&fparg.ldbl, expchar ? 2 : 3, prec, &expt, &signflag, &dtoaend); +#endif } else { fparg.dbl = GETARG(double); +#if defined NO_DTOA + dtoaresult = NULL; + /* + * Below is to keep compiler happy + */ + signflag = -1; + expt = 0; + dtoaend = NULL; +#else dtoaresult = dtoa(fparg.dbl, expchar ? 2 : 3, prec, &expt, &signflag, &dtoaend); +#endif if (expt == 9999) expt = INT_MAX; } @@ -1025,7 +1061,7 @@ bsd_vsnwprintf(wchar_t **outBuf, size_t bufSize, const wchar_t *fmt0, if (flags & LONGINT) { /* Argument is wchar_t * */ if ((cp = GETARG(wchar_t *)) == NULL) - cp = L"(null)"; + cp = (wchar_t *)L"(null)"; } else { char *mbp; /* Argument is char * */ @@ -1033,7 +1069,7 @@ bsd_vsnwprintf(wchar_t **outBuf, size_t bufSize, const wchar_t *fmt0, if (convbuf!= NULL) free(convbuf); if ((mbp = GETARG(char *)) == NULL) - cp = L"(null)"; + cp = (wchar_t *)L"(null)"; else { convbuf = BSDFmt_UTF8ToWChar(mbp, prec); if (convbuf == NULL) { diff --git a/open-vm-tools/lib/stubs/Makefile.in b/open-vm-tools/lib/stubs/Makefile.in deleted file mode 100644 index 8b13c1885..000000000 --- a/open-vm-tools/lib/stubs/Makefile.in +++ /dev/null @@ -1,557 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2008-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@LINUX_FALSE@am__append_1 = stub-msgfmt-fbsd.c -subdir = lib/stubs -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libStubs_la_LIBADD = -am_libStubs_la_OBJECTS = stub-config.lo stub-log.lo stub-debug.lo \ - stub-warning.lo stub-panic.lo stub-user-msg.lo \ - stub-user-panic.lo stub-user-util.lo -libStubs_la_OBJECTS = $(am_libStubs_la_OBJECTS) -libStubsCS_la_LIBADD = -am__libStubsCS_la_SOURCES_DIST = stub-config.c stub-user-msg.c \ - stub-user-panic.c stub-msgfmt-fbsd.c -@LINUX_FALSE@am__objects_1 = stub-msgfmt-fbsd.lo -am_libStubsCS_la_OBJECTS = stub-config.lo stub-user-msg.lo \ - stub-user-panic.lo $(am__objects_1) -libStubsCS_la_OBJECTS = $(am_libStubsCS_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libStubs_la_SOURCES) $(libStubsCS_la_SOURCES) -DIST_SOURCES = $(libStubs_la_SOURCES) \ - $(am__libStubsCS_la_SOURCES_DIST) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libStubs.la libStubsCS.la -libStubs_la_SOURCES = stub-config.c stub-log.c stub-debug.c \ - stub-warning.c stub-panic.c stub-user-msg.c stub-user-panic.c \ - stub-user-util.c -libStubsCS_la_SOURCES = stub-config.c stub-user-msg.c \ - stub-user-panic.c $(am__append_1) -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/stubs/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/stubs/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libStubs.la: $(libStubs_la_OBJECTS) $(libStubs_la_DEPENDENCIES) - $(LINK) $(libStubs_la_OBJECTS) $(libStubs_la_LIBADD) $(LIBS) -libStubsCS.la: $(libStubsCS_la_OBJECTS) $(libStubsCS_la_DEPENDENCIES) - $(LINK) $(libStubsCS_la_OBJECTS) $(libStubsCS_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stub-config.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stub-debug.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stub-log.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stub-msgfmt-fbsd.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stub-panic.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stub-user-msg.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stub-user-panic.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stub-user-util.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stub-warning.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/syncDriver/Makefile.in b/open-vm-tools/lib/syncDriver/Makefile.in deleted file mode 100644 index 6ea4574db..000000000 --- a/open-vm-tools/lib/syncDriver/Makefile.in +++ /dev/null @@ -1,541 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@LINUX_TRUE@am__append_1 = nullDriver.c syncDriverLinux.c \ -@LINUX_TRUE@ vmSyncDriver.c -subdir = lib/syncDriver -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libSyncDriver_la_LIBADD = -am__libSyncDriver_la_SOURCES_DIST = syncDriverPosix.c nullDriver.c \ - syncDriverLinux.c vmSyncDriver.c -@LINUX_TRUE@am__objects_1 = nullDriver.lo syncDriverLinux.lo \ -@LINUX_TRUE@ vmSyncDriver.lo -am_libSyncDriver_la_OBJECTS = syncDriverPosix.lo $(am__objects_1) -libSyncDriver_la_OBJECTS = $(am_libSyncDriver_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libSyncDriver_la_SOURCES) -DIST_SOURCES = $(am__libSyncDriver_la_SOURCES_DIST) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libSyncDriver.la -libSyncDriver_la_SOURCES = syncDriverPosix.c $(am__append_1) -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/syncDriver/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/syncDriver/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libSyncDriver.la: $(libSyncDriver_la_OBJECTS) $(libSyncDriver_la_DEPENDENCIES) - $(LINK) $(libSyncDriver_la_OBJECTS) $(libSyncDriver_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nullDriver.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/syncDriverLinux.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/syncDriverPosix.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmSyncDriver.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/system/Makefile.in b/open-vm-tools/lib/system/Makefile.in deleted file mode 100644 index 2e283e9dd..000000000 --- a/open-vm-tools/lib/system/Makefile.in +++ /dev/null @@ -1,532 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/system -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libSystem_la_LIBADD = -am_libSystem_la_OBJECTS = systemLinux.lo -libSystem_la_OBJECTS = $(am_libSystem_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libSystem_la_SOURCES) -DIST_SOURCES = $(libSystem_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libSystem.la -libSystem_la_SOURCES = systemLinux.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/system/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/system/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libSystem.la: $(libSystem_la_OBJECTS) $(libSystem_la_DEPENDENCIES) - $(LINK) $(libSystem_la_OBJECTS) $(libSystem_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/systemLinux.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/unicode/Makefile.in b/open-vm-tools/lib/unicode/Makefile.in deleted file mode 100644 index d9e5cc0f1..000000000 --- a/open-vm-tools/lib/unicode/Makefile.in +++ /dev/null @@ -1,551 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@HAVE_ICU_TRUE@am__append_1 = unicodeICU.c -subdir = lib/unicode -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libUnicode_la_LIBADD = -am__libUnicode_la_SOURCES_DIST = unicodeCommon.c unicodeSimpleBase.c \ - unicodeSimpleCaseFolding.c unicodeSimpleTypes.c \ - unicodeSimpleOperations.c unicodeSimpleTransforms.c \ - unicodeStatic.c unicodeICU.c -@HAVE_ICU_TRUE@am__objects_1 = unicodeICU.lo -am_libUnicode_la_OBJECTS = unicodeCommon.lo unicodeSimpleBase.lo \ - unicodeSimpleCaseFolding.lo unicodeSimpleTypes.lo \ - unicodeSimpleOperations.lo unicodeSimpleTransforms.lo \ - unicodeStatic.lo $(am__objects_1) -libUnicode_la_OBJECTS = $(am_libUnicode_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libUnicode_la_SOURCES) -DIST_SOURCES = $(am__libUnicode_la_SOURCES_DIST) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libUnicode.la -libUnicode_la_SOURCES = unicodeCommon.c unicodeSimpleBase.c \ - unicodeSimpleCaseFolding.c unicodeSimpleTypes.c \ - unicodeSimpleOperations.c unicodeSimpleTransforms.c \ - unicodeStatic.c $(am__append_1) -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/unicode/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/unicode/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libUnicode.la: $(libUnicode_la_OBJECTS) $(libUnicode_la_DEPENDENCIES) - $(LINK) $(libUnicode_la_OBJECTS) $(libUnicode_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unicodeCommon.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unicodeICU.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unicodeSimpleBase.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unicodeSimpleCaseFolding.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unicodeSimpleOperations.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unicodeSimpleTransforms.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unicodeSimpleTypes.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unicodeStatic.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/unicode/unicodeSimpleBase.c b/open-vm-tools/lib/unicode/unicodeSimpleBase.c index 5f99c00e4..8a33cd231 100644 --- a/open-vm-tools/lib/unicode/unicodeSimpleBase.c +++ b/open-vm-tools/lib/unicode/unicodeSimpleBase.c @@ -70,10 +70,10 @@ static const size_t UNICODE_UTF16_CODE_UNITS_PADDING = 10; * Return NULL if strict is true and the buffer contains an invalid * sequence in the specified encoding. * - * If strict is false, then an invalid sequence is replaced by + * If strict is false, then an invalid sequence is replaced by * a substitution character, which is either the Unicode - * substitution character (U+FFFD or \xef\xbf\xbd in UTF-8) - * or subchar1 (ASCII SUB or control-z, value 0x1a). + * substitution character (U+FFFD or \xef\xbf\xbd in UTF-8) + * or subchar1 (ASCII SUB or control-z, value 0x1a). * * Results: * An allocated Unicode string containing the decoded characters @@ -90,7 +90,7 @@ char * UnicodeAllocInternal(const void *buffer, // IN ssize_t lengthInBytes, // IN StringEncoding encoding, // IN - Bool strict) // IN + Bool strict) // IN { char *utf8Result = NULL; @@ -101,7 +101,7 @@ UnicodeAllocInternal(const void *buffer, // IN if (!strict) { CodeSet_GenericToGeneric(Unicode_EncodingEnumToName(encoding), buffer, lengthInBytes, - "UTF-8", CSGTG_TRANSLIT, &utf8Result, NULL); + "UTF-8", CSGTG_TRANSLIT, &utf8Result, NULL); return utf8Result; } @@ -109,7 +109,7 @@ UnicodeAllocInternal(const void *buffer, // IN case STRING_ENCODING_US_ASCII: case STRING_ENCODING_UTF8: if (Unicode_IsBufferValid(buffer, lengthInBytes, encoding)) { - utf8Result = Util_SafeStrndup(buffer, lengthInBytes); + utf8Result = Util_SafeStrndup(buffer, lengthInBytes); } break; case STRING_ENCODING_UTF16_LE: @@ -122,7 +122,7 @@ UnicodeAllocInternal(const void *buffer, // IN default: CodeSet_GenericToGeneric(Unicode_EncodingEnumToName(encoding), buffer, lengthInBytes, - "UTF-8", 0, &utf8Result, NULL); + "UTF-8", 0, &utf8Result, NULL); break; } @@ -130,6 +130,30 @@ UnicodeAllocInternal(const void *buffer, // IN } +/* + *----------------------------------------------------------------------------- + * + * Unicode_IsStringValidUTF8 -- + * + * Tests if the specified string (NUL terminated) is valid UTF8. + * + * Results: + * TRUE The string is valid UTF8. + * FALSE The string is not valid UTF8. + * + * Side effects: + * None + * + *----------------------------------------------------------------------------- + */ + +Bool +Unicode_IsStringValidUTF8(const char *str) // IN: +{ + return CodeSet_IsStringValidUTF8(str); +} + + /* *----------------------------------------------------------------------------- * @@ -170,16 +194,25 @@ Unicode_IsBufferValid(const void *buffer, // IN encoding = Unicode_ResolveEncoding(encoding); - if (encoding == STRING_ENCODING_US_ASCII) { + switch (encoding) { + case STRING_ENCODING_US_ASCII: return UnicodeSanityCheck(buffer, lengthInBytes, encoding); - } - if (lengthInBytes == -1) { - lengthInBytes = Unicode_LengthInBytes(buffer, encoding); - } + case STRING_ENCODING_UTF8: + if (lengthInBytes == -1) { + return CodeSet_IsStringValidUTF8(buffer); + } else { + return CodeSet_IsValidUTF8(buffer, lengthInBytes); + } + + default: + if (lengthInBytes == -1) { + lengthInBytes = Unicode_LengthInBytes(buffer, encoding); + } - return CodeSet_Validate(buffer, lengthInBytes, - Unicode_EncodingEnumToName(encoding)); + return CodeSet_Validate(buffer, lengthInBytes, + Unicode_EncodingEnumToName(encoding)); + } } @@ -311,11 +344,11 @@ Unicode_GetAllocList(char *const srcList[], // IN: list of strings for (i = 0; i < length; i++) { dstList[i] = Unicode_GetAllocBytes(srcList[i], encoding); if (dstList[i] == NULL && srcList[i] != NULL) { - while (--i >= 0) { - free(dstList[i]); - } - free(dstList); - return NULL; + while (--i >= 0) { + free(dstList[i]); + } + free(dstList); + return NULL; } } @@ -467,7 +500,7 @@ Unicode_BytesRequired(const char *str, // IN * maxLengthInBytes bytes in total to the buffer. * * Results: - * FALSE on conversion failure or if the Unicode string requires + * FALSE on conversion failure or if the Unicode string requires * more than maxLengthInBytes bytes to be encoded in the specified * encoding, including NUL termination. (Call * Unicode_BytesRequired(str, encoding) to get the correct @@ -497,7 +530,7 @@ Unicode_CopyBytes(void *destBuffer, // OUT switch (encoding) { case STRING_ENCODING_US_ASCII: if (!UnicodeSanityCheck(utf8Str, -1, encoding)) { - break; + break; } // fall through case STRING_ENCODING_UTF8: @@ -511,8 +544,8 @@ Unicode_CopyBytes(void *destBuffer, // OUT * manner. */ if (copyBytes >= len) { - success = TRUE; - } else { + success = TRUE; + } else { if (encoding == STRING_ENCODING_UTF8) { copyBytes = CodeSet_Utf8FindCodePointBoundary(destBuffer, copyBytes); @@ -531,8 +564,8 @@ Unicode_CopyBytes(void *destBuffer, // OUT strlen(utf8Str), &utf16Buf, &utf16BufLen)) { - // input should be valid UTF-8, no conversion error possible - NOT_IMPLEMENTED(); + /* input should be valid UTF-8, no conversion error possible */ + NOT_IMPLEMENTED(); break; } copyBytes = MIN(utf16BufLen, maxLengthInBytes - 2); @@ -552,13 +585,13 @@ Unicode_CopyBytes(void *destBuffer, // OUT char *currentBuf; size_t currentBufSize; - if (!CodeSet_GenericToGeneric("UTF-8", utf8Str, strlen(utf8Str), - Unicode_EncodingEnumToName(encoding), - CSGTG_NORMAL, - ¤tBuf, ¤tBufSize)) { - // XXX can't distinguish error cause - break; - } + if (!CodeSet_GenericToGeneric("UTF-8", utf8Str, strlen(utf8Str), + Unicode_EncodingEnumToName(encoding), + CSGTG_NORMAL, + ¤tBuf, ¤tBufSize)) { + /* XXX can't distinguish error cause */ + break; + } copyBytes = MIN(currentBufSize, maxLengthInBytes - 1); memcpy(destBuffer, currentBuf, copyBytes); free(currentBuf); @@ -677,8 +710,7 @@ Unicode_GetAllocBytesWithLength(const char *str, // IN: * The converted string in an allocated buffer, * or NULL on conversion failure. * - * The length of the result (in bytes, without termination) - * in retLength. + * The length of the result (in bytes, without termination) in retLength. * * Side effects: * Panic on memory allocation failure. @@ -706,31 +738,31 @@ UnicodeGetAllocBytesInternal(const char *ustr, // IN switch (encoding) { case STRING_ENCODING_US_ASCII: if (!UnicodeSanityCheck(utf8Str, lengthInBytes, encoding)) { - break; + break; } // fall through case STRING_ENCODING_UTF8: result = Util_SafeMalloc(lengthInBytes + 1); memcpy(result, utf8Str, lengthInBytes + 1); if (retLength != NULL) { - *retLength = lengthInBytes; + *retLength = lengthInBytes; } break; case STRING_ENCODING_UTF16_LE: if (!CodeSet_Utf8ToUtf16le(utf8Str, lengthInBytes, &result, retLength)) { - // input should be valid UTF-8, no conversion error possible + /* input should be valid UTF-8, no conversion error possible */ NOT_IMPLEMENTED(); } break; default: if (!CodeSet_GenericToGeneric("UTF-8", utf8Str, lengthInBytes, - Unicode_EncodingEnumToName(encoding), - CSGTG_NORMAL, - &result, retLength)) { - // XXX can't distinguish error cause - ASSERT(result == NULL); + Unicode_EncodingEnumToName(encoding), + CSGTG_NORMAL, + &result, retLength)) { + /* XXX can't distinguish error cause */ + ASSERT(result == NULL); } } diff --git a/open-vm-tools/lib/user/Makefile.in b/open-vm-tools/lib/user/Makefile.in deleted file mode 100644 index 8c2c6103a..000000000 --- a/open-vm-tools/lib/user/Makefile.in +++ /dev/null @@ -1,534 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/user -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libUser_la_LIBADD = -am_libUser_la_OBJECTS = util.lo utilBacktrace.lo -libUser_la_OBJECTS = $(am_libUser_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libUser_la_SOURCES) -DIST_SOURCES = $(libUser_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libUser.la -libUser_la_SOURCES = util.c utilBacktrace.c -AM_CFLAGS = @LIB_USER_CPPFLAGS@ -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/user/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/user/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libUser.la: $(libUser_la_OBJECTS) $(libUser_la_DEPENDENCIES) - $(LINK) $(libUser_la_OBJECTS) $(libUser_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utilBacktrace.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/user/util.c b/open-vm-tools/lib/user/util.c index f320635e3..252d83c57 100644 --- a/open-vm-tools/lib/user/util.c +++ b/open-vm-tools/lib/user/util.c @@ -66,11 +66,11 @@ #include "su.h" #include "posix.h" #include "file.h" -#include "util_shared.h" #include "escape.h" #include "base64.h" #include "unicode.h" #include "posix.h" +#include "random.h" #ifndef O_BINARY #define O_BINARY 0 @@ -254,6 +254,124 @@ Util_HashString(const char *str) // IN: } +/* + *---------------------------------------------------------------------- + * + * CRC_Compute -- + * + * computes the CRC of a block of data + * + * Results: + * + * CRC code + * + * Side effects: + * Sets up the crc table if it hasn't already been computed. + * + *---------------------------------------------------------------------- + */ + +static void +UtilCRCMakeTable(uint32 crcTable[]) +{ + uint32 c; + int n, k; + + for (n = 0; n < 256; n++) { + c = (uint32) n; + for (k = 0; k < 8; k++) { + if (c & 1) { + c = 0xedb88320L ^ (c >> 1); + } else { + c = c >> 1; + } + } + crcTable[n] = c; + } +} + +static INLINE_SINGLE_CALLER uint32 +UtilCRCUpdate(uint32 crc, + const uint8 *buf, + int len) +{ + uint32 c = crc; + int n; + static uint32 crcTable[256]; + static int crcTableComputed = 0; + + if (!crcTableComputed) { + UtilCRCMakeTable(crcTable); + + crcTableComputed = 1; + } + + for (n = 0; n < len; n++) { + c = crcTable[(c ^ buf[n]) & 0xff] ^ (c >> 8); + } + + return c; +} + +uint32 +CRC_Compute(const uint8 *buf, + int len) +{ + return UtilCRCUpdate(0xffffffffL, buf, len) ^ 0xffffffffL; +} + + +/* + *---------------------------------------------------------------------- + * + * Util_FastRand -- + * + * Historical-name wrapper around Random_Simple. + * Deprecated: use Random_Fast, or Random_Simple directly. + * + * Results: + * A random number. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +uint32 +Util_FastRand(uint32 seed) +{ + return Random_Simple(seed); +} + + +/* + *---------------------------------------------------------------------- + * + * Util_Throttle -- + * + * Use for throttling of warnings. + * + * Results: + * Will return TRUE for an increasingly sparse set of counter values: + * 1, 2, ..., 100, 200, 300, ..., 10000, 20000, 30000, ..., . + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +Bool +Util_Throttle(uint32 count) // IN: +{ + return count < 100 || + (count < 10000 && count % 100 == 0) || + (count < 1000000 && count % 10000 == 0) || + count % 1000000 == 0; +} + + /* *---------------------------------------------------------------------- * diff --git a/open-vm-tools/lib/vmCheck/Makefile.in b/open-vm-tools/lib/vmCheck/Makefile.in deleted file mode 100644 index 407aa2d07..000000000 --- a/open-vm-tools/lib/vmCheck/Makefile.in +++ /dev/null @@ -1,532 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/vmCheck -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libVmCheck_la_LIBADD = -am_libVmCheck_la_OBJECTS = vmcheck.lo -libVmCheck_la_OBJECTS = $(am_libVmCheck_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libVmCheck_la_SOURCES) -DIST_SOURCES = $(libVmCheck_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libVmCheck.la -libVmCheck_la_SOURCES = vmcheck.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/vmCheck/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/vmCheck/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libVmCheck.la: $(libVmCheck_la_OBJECTS) $(libVmCheck_la_DEPENDENCIES) - $(LINK) $(libVmCheck_la_OBJECTS) $(libVmCheck_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmcheck.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/vmSignal/Makefile.in b/open-vm-tools/lib/vmSignal/Makefile.in deleted file mode 100644 index 4dc970bbc..000000000 --- a/open-vm-tools/lib/vmSignal/Makefile.in +++ /dev/null @@ -1,532 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/vmSignal -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libVmSignal_la_LIBADD = -am_libVmSignal_la_OBJECTS = vmsignal.lo -libVmSignal_la_OBJECTS = $(am_libVmSignal_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libVmSignal_la_SOURCES) -DIST_SOURCES = $(libVmSignal_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libVmSignal.la -libVmSignal_la_SOURCES = vmsignal.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/vmSignal/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/vmSignal/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libVmSignal.la: $(libVmSignal_la_OBJECTS) $(libVmSignal_la_DEPENDENCIES) - $(LINK) $(libVmSignal_la_OBJECTS) $(libVmSignal_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmsignal.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/wiper/Makefile.in b/open-vm-tools/lib/wiper/Makefile.in deleted file mode 100644 index 8c82aba62..000000000 --- a/open-vm-tools/lib/wiper/Makefile.in +++ /dev/null @@ -1,533 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/wiper -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libWiper_la_LIBADD = -am_libWiper_la_OBJECTS = wiperCommon.lo wiperPosix.lo -libWiper_la_OBJECTS = $(am_libWiper_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libWiper_la_SOURCES) -DIST_SOURCES = $(libWiper_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libWiper.la -libWiper_la_SOURCES = wiperCommon.c wiperPosix.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/wiper/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/wiper/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libWiper.la: $(libWiper_la_OBJECTS) $(libWiper_la_DEPENDENCIES) - $(LINK) $(libWiper_la_OBJECTS) $(libWiper_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wiperCommon.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wiperPosix.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/xdg/Makefile.in b/open-vm-tools/lib/xdg/Makefile.in deleted file mode 100644 index a12837298..000000000 --- a/open-vm-tools/lib/xdg/Makefile.in +++ /dev/null @@ -1,540 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2010-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/xdg -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libXdg_la_LIBADD = -am_libXdg_la_OBJECTS = libXdg_la-xdg.lo -libXdg_la_OBJECTS = $(am_libXdg_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libXdg_la_SOURCES) -DIST_SOURCES = $(libXdg_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libXdg.la -libXdg_la_CPPFLAGS = @GLIB2_CPPFLAGS@ -libXdg_la_SOURCES = xdg.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/xdg/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/xdg/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libXdg.la: $(libXdg_la_OBJECTS) $(libXdg_la_DEPENDENCIES) - $(LINK) $(libXdg_la_OBJECTS) $(libXdg_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libXdg_la-xdg.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libXdg_la-xdg.lo: xdg.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libXdg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libXdg_la-xdg.lo -MD -MP -MF $(DEPDIR)/libXdg_la-xdg.Tpo -c -o libXdg_la-xdg.lo `test -f 'xdg.c' || echo '$(srcdir)/'`xdg.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libXdg_la-xdg.Tpo $(DEPDIR)/libXdg_la-xdg.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xdg.c' object='libXdg_la-xdg.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libXdg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libXdg_la-xdg.lo `test -f 'xdg.c' || echo '$(srcdir)/'`xdg.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/libDeployPkg/Makefile.am b/open-vm-tools/libDeployPkg/Makefile.am index 0af5a8b58..698816ca9 100644 --- a/open-vm-tools/libDeployPkg/Makefile.am +++ b/open-vm-tools/libDeployPkg/Makefile.am @@ -18,7 +18,7 @@ lib_LTLIBRARIES = libDeployPkg.la AM_CFLAGS = -AM_CFLAGS += -I$(top_builddir)/include +AM_CFLAGS += -I$(top_srcdir)/include AM_CFLAGS += $(MSPACK_CPPFLAGS) libDeployPkg_la_LIBADD = diff --git a/open-vm-tools/libDeployPkg/Makefile.in b/open-vm-tools/libDeployPkg/Makefile.in deleted file mode 100644 index 29674048f..000000000 --- a/open-vm-tools/libDeployPkg/Makefile.in +++ /dev/null @@ -1,639 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2014-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = libDeployPkg -DIST_COMMON = $(libDeployPkg_include_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/libDeployPkg.pc.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = libDeployPkg.pc -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" \ - "$(DESTDIR)$(libDeployPkg_includedir)" -libLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(lib_LTLIBRARIES) -libDeployPkg_la_DEPENDENCIES = -am_libDeployPkg_la_OBJECTS = linuxDeployment.lo mspackWrapper.lo \ - processPosix.lo -libDeployPkg_la_OBJECTS = $(am_libDeployPkg_la_OBJECTS) -libDeployPkg_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libDeployPkg_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libDeployPkg_la_SOURCES) -DIST_SOURCES = $(libDeployPkg_la_SOURCES) -pkgconfigDATA_INSTALL = $(INSTALL_DATA) -DATA = $(pkgconfig_DATA) -libDeployPkg_includeHEADERS_INSTALL = $(INSTALL_HEADER) -HEADERS = $(libDeployPkg_include_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -lib_LTLIBRARIES = libDeployPkg.la -AM_CFLAGS = -I$(top_builddir)/include $(MSPACK_CPPFLAGS) -libDeployPkg_la_LIBADD = @MSPACK_LIBS@ -libDeployPkg_la_SOURCES = deployPkgFormat.h linuxDeployment.c \ - mspackConfig.h mspackWrapper.c mspackWrapper.h processPosix.c \ - toolsDeployPkg.h -# We require GCC, so we're fine passing compiler-specific flags. -# Needed for OS's that don't link shared libraries against libc by default, e.g. FreeBSD -libDeployPkg_la_LDFLAGS = -Wl,-lc -libDeployPkg_includedir = $(includedir)/libDeployPkg -libDeployPkg_include_HEADERS = \ - $(top_srcdir)/lib/include/includeCheck.h \ - $(top_srcdir)/lib/include/imgcust-common/imgcust-api.h \ - $(top_srcdir)/lib/include/imgcust-common/log.h \ - $(top_srcdir)/lib/include/imgcust-common/process.h \ - $(top_srcdir)/lib/include/imgcust-guest/guestcust-events.h \ - $(top_srcdir)/lib/include/vm_basic_types.h \ - $(top_srcdir)/lib/include/rpcout.h \ - $(top_srcdir)/lib/include/deployPkg/linuxDeployment.h -EXTRA_DIST = libDeployPkg.pc.in -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = libDeployPkg.pc -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libDeployPkg/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu libDeployPkg/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -libDeployPkg.pc: $(top_builddir)/config.status $(srcdir)/libDeployPkg.pc.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ - else :; fi; \ - done - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libDeployPkg.la: $(libDeployPkg_la_OBJECTS) $(libDeployPkg_la_DEPENDENCIES) - $(libDeployPkg_la_LINK) -rpath $(libdir) $(libDeployPkg_la_OBJECTS) $(libDeployPkg_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linuxDeployment.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mspackWrapper.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/processPosix.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-pkgconfigDATA: $(pkgconfig_DATA) - @$(NORMAL_INSTALL) - test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" - @list='$(pkgconfig_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ - $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \ - done - -uninstall-pkgconfigDATA: - @$(NORMAL_UNINSTALL) - @list='$(pkgconfig_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ - rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \ - done -install-libDeployPkg_includeHEADERS: $(libDeployPkg_include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(libDeployPkg_includedir)" || $(MKDIR_P) "$(DESTDIR)$(libDeployPkg_includedir)" - @list='$(libDeployPkg_include_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(libDeployPkg_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(libDeployPkg_includedir)/$$f'"; \ - $(libDeployPkg_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(libDeployPkg_includedir)/$$f"; \ - done - -uninstall-libDeployPkg_includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(libDeployPkg_include_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(libDeployPkg_includedir)/$$f'"; \ - rm -f "$(DESTDIR)$(libDeployPkg_includedir)/$$f"; \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) -installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(libDeployPkg_includedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-libDeployPkg_includeHEADERS \ - install-pkgconfigDATA - -install-dvi: install-dvi-am - -install-exec-am: install-libLTLIBRARIES - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-libDeployPkg_includeHEADERS \ - uninstall-libLTLIBRARIES uninstall-pkgconfigDATA - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am \ - install-libDeployPkg_includeHEADERS install-libLTLIBRARIES \ - install-man install-pdf install-pdf-am install-pkgconfigDATA \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am \ - uninstall-libDeployPkg_includeHEADERS uninstall-libLTLIBRARIES \ - uninstall-pkgconfigDATA - - -$(pkgconfig_DATA): $(top_builddir)/config.status -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/libDeployPkg/deployPkgFormat.h b/open-vm-tools/libDeployPkg/deployPkgFormat.h index e1f281473..755c76135 100644 --- a/open-vm-tools/libDeployPkg/deployPkgFormat.h +++ b/open-vm-tools/libDeployPkg/deployPkgFormat.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -16,14 +16,14 @@ * *********************************************************/ -/** - * @file deployPkgFormat.h +/* + * deployPkgFormat.h -- * - * @brief A deployment package format used primarily to - * upload and install software in a guest OS. + * A deployment package format used primarily to + * upload and install software in a guest OS. * - * The package can be a file, or a section embedded inside - * of another file or raw block device. + * The package can be a file, or a section embedded inside + * of another file or raw block device. */ #ifndef _DEPLOY_PKG_FORMAT_H_ @@ -46,19 +46,19 @@ typedef enum { GzippedTar // tar.gz } VMwareDeployPkgPayloadType; -// Current versions #define VMWAREDEPLOYPKG_CURRENT_MAJOR_VERSION 1 #define VMWAREDEPLOYPKG_CURRENT_MINOR_VERSION 0 - #include "vm_basic_types.h" -// 4 byte alignment assumed +#define VMWAREDEPLOYPKG_HEADER_FLAGS_NONE 0 +#define VMWAREDEPLOYPKG_HEADER_FLAGS_SKIP_REBOOT 1 + #ifdef _WIN32 -#include "pshpack4.h" +#include "pshpack4.h" // 4 byte alignment assumed. #endif -/** +/* * VMware deployment package header. 4 byte alignment assumed. * The header size is exactly 512 bytes to make it easier to * embed in a disk device, such as a partition. @@ -108,43 +108,43 @@ typedef enum { typedef struct { - char signature[VMWAREDEPLOYPKG_SIGNATURE_LENGTH]; // Not null terminated + char signature[VMWAREDEPLOYPKG_SIGNATURE_LENGTH]; // Not null terminated. uint8 majorVersion; uint8 minorVersion; uint8 payloadType; uint8 reserved; - /* + /* * Structs are aligned to word length. For 32 bit architecture it is 4 bytes * aligned and for 64 bit it is 8 bytes aligned. To make sure 64 bit field - * "pkgLength" starts at the same place in both 32 bit and 64 bit architecture, - * we need to add a 4 byte padding. If the padding is not present then a package + * "pkgLength" starts at the same place in both 32 and 64 bit architecture, + * we need to add a 4 byte padding. If the padding is not present, package * created in 32 bit architecture will not be read correctly in 64 bit * architecture and vice-versa. - * + * * NOTE: Positioning and size of the pad will change if fields are - * added/removed. - */ + * added/removed. + */ uint32 archPadding; - uint64 pkgLength; // total length of package including header -- offset 20 - uint64 payloadOffset; // offset of payload relative to beginning of header -- offset 28 - uint64 payloadLength; // length of payload -- offset 36 - + uint64 pkgLength; // Total length of package including header, offset 20. + uint64 payloadOffset; // Relative to beginning of header, offset 28. + uint64 payloadLength; // Length of payload, offset 36. + /* - * Command string and padding, null terminated -- offset 44 + * Command string and padding, null terminated, offset 44. * This padding makes the header sector-aligned, making it easier * to embed in disks and disk partitions. - * This string may contain OS-specific environment variables, e.g. %SYSTEMDRIVE% + * This string may contain OS-specific env variables, e.g. %SYSTEMDRIVE%. */ char seed[VMWAREDEPLOYPKG_SEED_LENGTH]; - char command[VMWAREDEPLOYPKG_CMD_LENGTH]; - + char command[VMWAREDEPLOYPKG_CMD_LENGTH]; + } VMwareDeployPkgHdr; #ifdef _WIN32 #include "poppack.h" #endif -#endif +#endif // _DEPLOY_PKG_FORMAT_H_ diff --git a/open-vm-tools/libDeployPkg/linuxDeployment.c b/open-vm-tools/libDeployPkg/linuxDeployment.c index 951258e3a..c6fd2fd3b 100644 --- a/open-vm-tools/libDeployPkg/linuxDeployment.c +++ b/open-vm-tools/libDeployPkg/linuxDeployment.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2014 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -16,6 +16,12 @@ * *********************************************************/ +/* + * linuxDeployment.c -- + * + * Implementation of libDeployPkg.so. + */ + #include #include #include @@ -33,9 +39,12 @@ #include "deployPkg/linuxDeployment.h" #include "imgcust-common/process.h" #include "imgcust-guest/guestcust-events.h" +#include "linuxDeploymentUtilities.h" #include "mspackWrapper.h" #include "rpcout.h" #include "toolsDeployPkg.h" +#include +#include /* * These are covered by #ifndef to give the ability to change these @@ -45,12 +54,17 @@ #define CLEANUPCMD "/bin/rm -r -f " -#ifndef EXTRACTPATH -#define EXTRACTPATH "/tmp/.vmware/linux/deploy" +#ifndef TMP_PATH_VAR +#define TMP_PATH_VAR "/tmp/.vmware/linux/deploy" #endif -#ifndef CLEANUPPATH -#define CLEANUPPATH "/tmp/.vmware" +#ifndef IMC_TMP_PATH_VAR +#define IMC_TMP_PATH_VAR "@@IMC_TMP_PATH_VAR@@" +#endif + +// '/tmp' below will be addressed by PR 1601405. +#ifndef TMP_DIR_PATH_PATTERN +#define TMP_DIR_PATH_PATTERN "/tmp/.vmware-imgcust-dXXXXXX" #endif #ifndef BASEFILENAME @@ -106,9 +120,8 @@ struct List { */ // Private functions -static Bool GetPackageInfo(const char* pkgName, char** cmd, uint8* type); +static Bool GetPackageInfo(const char* pkgName, char** cmd, uint8* type, uint8* flags); static Bool ExtractZipPackage(const char* pkg, const char* dest); -static Bool CreateDir(const char* path); static void Init(void); static struct List* AddToList(struct List* head, const char* token); static int ListSize(struct List* head); @@ -141,12 +154,21 @@ static LogFunction sLog = NoLogging; * @param args [in] Argument list. * **/ -void -Panic(const char *fmtstr, - va_list args) +NORETURN void +Panic(const char *fmtstr, ...) { - /* Ignored */ - sLog(log_warning, "Panic call back invoked. \n"); + va_list args; + + char *tmp = Util_SafeMalloc(MAXSTRING); + + va_start(args, fmtstr); + vsprintf(tmp, fmtstr, args); + + sLog(log_error, "Panic callback invoked: %s\n", tmp); + + free(tmp); + + exit(1); } // ..................................................................................... @@ -162,12 +184,19 @@ Panic(const char *fmtstr, * **/ void -Debug(const char *fmtstr, - va_list args) +Debug(const char *fmtstr, ...) { - /* Ignored */ #ifdef VMX86_DEBUG - sLog(log_debug, "Debug callback invoked. \n"); + va_list args; + + char *tmp = Util_SafeMalloc(MAXSTRING); + + va_start(args, fmtstr); + vsprintf(tmp, fmtstr, args); + + sLog(log_debug, "Debug callback invoked: %s\n", tmp); + + free(tmp); #endif } @@ -517,13 +546,15 @@ Init(void) * @param [IN] packageName package file name * @param [OUT] command command line from header * @param [OUT] archiveType package archive format + * @param [OUT] flags package header flags * @return TRUE is success * **/ Bool GetPackageInfo(const char* packageName, char** command, - uint8* archiveType) + uint8* archiveType, + uint8* flags) { unsigned int sz; VMwareDeployPkgHdr hdr; @@ -557,6 +588,9 @@ GetPackageInfo(const char* packageName, memcpy(*command, hdr.command, VMWAREDEPLOYPKG_CMD_LENGTH); *archiveType = hdr.payloadType; + *flags = hdr.reserved; + + //TODO hdr->command[VMWAREDEPLOYPKG_CMD_LENGTH - 1] = '\0'; return TRUE; } @@ -697,7 +731,6 @@ TransitionState(const char* stateFrom, const char* stateTo) * *----------------------------------------------------------------------------- */ - static char* GetNicsToEnable(const char* dir) { @@ -745,7 +778,7 @@ GetNicsToEnable(const char* dir) } /** - *----------------------------------------------------------------------------- + *------------------------------------------------------------------------------ * * TryToEnableNics -- * @@ -760,9 +793,8 @@ GetNicsToEnable(const char* dir) * * @param nics List of nics that need to be activated. * - *----------------------------------------------------------------------------- + *------------------------------------------------------------------------------ */ - static void TryToEnableNics(const char *nics) { @@ -845,6 +877,113 @@ _DeployPkg_SkipReboot(bool skip) sSkipReboot = skip; } +/** + *---------------------------------------------------------------------------- + * + * CloudInitSetup -- + * + * Function which does the setup for cloud-init if it is enabled. + * Essentially it copies + * - nics.tx + * - cust.cfg to a predefined location. + * + * @param [IN] tmpDirPath Path where nics.txt and cust.cfg exist + * @returns DEPLOY_SUCCESS on success and DEPLOY_ERROR on error + * + *---------------------------------------------------------------------------- + * */ +static int +CloudInitSetup(const char *tmpDirPath) +{ + int deployStatus = DEPLOY_ERROR; + const char *cloudInitTmpDirPath = "/var/run/vmware-imc"; + int forkExecResult; + char command[1024]; + Bool cloudInitTmpDirCreated = FALSE; + + snprintf(command, sizeof(command), + "/bin/mkdir -p %s", cloudInitTmpDirPath); + command[sizeof(command) - 1] = '\0'; + + forkExecResult = ForkExecAndWaitCommand(command); + if (forkExecResult != 0) { + SetDeployError("Error creating %s dir: %s", + cloudInitTmpDirPath, + strerror(errno)); + goto done; + } + + cloudInitTmpDirCreated = TRUE; + + snprintf(command, sizeof(command), + "/bin/rm -f %s/cust.cfg %s/nics.txt", + cloudInitTmpDirPath, cloudInitTmpDirPath); + command[sizeof(command) - 1] = '\0'; + + forkExecResult = ForkExecAndWaitCommand(command); + + snprintf(command, sizeof(command), + "/bin/cp %s/cust.cfg %s/cust.cfg", + tmpDirPath, cloudInitTmpDirPath); + command[sizeof(command) - 1] = '\0'; + + forkExecResult = ForkExecAndWaitCommand(command); + + if (forkExecResult != 0) { + SetDeployError("Error copying cust.cfg file: %s", + strerror(errno)); + goto done; + } + + snprintf(command, sizeof(command), + "/usr/bin/test -f %s/nics.txt", tmpDirPath); + command[sizeof(command) - 1] = '\0'; + + forkExecResult = ForkExecAndWaitCommand(command); + + /* + * /usr/bin/test -f returns 0 if the file exists + * non zero is returned if the file does not exist. + * We need to copy the nics.txt only if it exists. + */ + if (forkExecResult == 0) { + snprintf(command, sizeof(command), + "/bin/cp %s/nics.txt %s/nics.txt", + tmpDirPath, cloudInitTmpDirPath); + command[sizeof(command) - 1] = '\0'; + + forkExecResult = ForkExecAndWaitCommand(command); + if (forkExecResult != 0) { + SetDeployError("Error copying nics.txt file: %s", + strerror(errno)); + goto done; + } + } + + deployStatus = DEPLOY_SUCCESS; + +done: + if (DEPLOY_SUCCESS == deployStatus) { + TransitionState(INPROGRESS, DONE); + } else { + if (cloudInitTmpDirCreated) { + snprintf(command, sizeof(command), + "/bin/rm -rf %s", + cloudInitTmpDirPath); + command[sizeof(command) - 1] = '\0'; + ForkExecAndWaitCommand(command); + } + sLog(log_error, "Setting generic error status in vmx. \n"); + SetCustomizationStatusInVmx(TOOLSDEPLOYPKG_RUNNING, + GUESTCUST_EVENT_CUSTOMIZE_FAILED, + NULL); + TransitionState(INPROGRESS, ERRORED); + } + + return deployStatus; +} + + //...................................................................................... /** @@ -862,13 +1001,20 @@ static int Deploy(const char* packageName) { int deployStatus = DEPLOY_SUCCESS; + char* pkgCommand = NULL; char* command = NULL; - int deploymentResult; + int deploymentResult = 0; char *nics; char* cleanupCommand; uint8 archiveType; + uint8 flags; + bool forceSkipReboot = false; + char *tmpDirPath; + Bool cloudInitEnabled = FALSE; + const char *cloudInitConfigFilePath = "/etc/cloud/cloud.cfg"; + char cloudCommand[1024]; + int forkExecResult; - // Move to IN PROGRESS state TransitionState(NULL, INPROGRESS); // Notify the vpx of customization in-progress state @@ -876,122 +1022,147 @@ Deploy(const char* packageName) TOOLSDEPLOYPKG_ERROR_SUCCESS, NULL); + tmpDirPath = mkdtemp((char *)Util_SafeStrdup(TMP_DIR_PATH_PATTERN)); + if (tmpDirPath == NULL) { + SetDeployError("Error creating tmp dir: %s", strerror(errno)); + return DEPLOY_ERROR; + } + sLog(log_info, "Reading cabinet file %s. \n", packageName); // Get the command to execute - if (!GetPackageInfo(packageName, &command, &archiveType)) { + if (!GetPackageInfo(packageName, &pkgCommand, &archiveType, &flags)) { SetDeployError("Error extracting package header information. (%s)", GetDeployError()); + free(tmpDirPath); return DEPLOY_ERROR; } - // Print the header command -#ifdef VMX86_DEBUG - sLog(log_debug, "Header command: %s \n ", command); -#endif - - // create the destination directory - if (!CreateDir(EXTRACTPATH "/")) { - free(command); - return DEPLOY_ERROR; + sLog(log_info, "Original deployment command: %s\n", pkgCommand); + if (strstr(pkgCommand, IMC_TMP_PATH_VAR) != NULL) { + command = StrUtil_ReplaceAll(pkgCommand, IMC_TMP_PATH_VAR, tmpDirPath); + } else { + command = StrUtil_ReplaceAll(pkgCommand, TMP_PATH_VAR, tmpDirPath); } + free(pkgCommand); + + sLog(log_info, "Actual deployment command: %s\n", command); if (archiveType == VMWAREDEPLOYPKG_PAYLOAD_TYPE_CAB) { - if (!ExtractCabPackage(packageName, EXTRACTPATH)) { + if (!ExtractCabPackage(packageName, tmpDirPath)) { + free(tmpDirPath); free(command); return DEPLOY_ERROR; } } else if (archiveType == VMWAREDEPLOYPKG_PAYLOAD_TYPE_ZIP) { - if (!ExtractZipPackage(packageName, EXTRACTPATH)) { + if (!ExtractZipPackage(packageName, tmpDirPath)) { + free(tmpDirPath); free(command); return DEPLOY_ERROR; } } - // Run the deployment command - sLog(log_info, "Launching deployment %s. \n", command); - deploymentResult = ForkExecAndWaitCommand(command); - free (command); + // check if cloud-init installed + snprintf(cloudCommand, sizeof(cloudCommand), + "/usr/bin/cloud-init -h"); + cloudCommand[sizeof(cloudCommand) - 1] = '\0'; + forkExecResult = ForkExecAndWaitCommand(cloudCommand); + // if cloud-init is installed, check if it is enabled + if (forkExecResult == 0 && IsCloudInitEnabled(cloudInitConfigFilePath)) { + cloudInitEnabled = TRUE; + sSkipReboot = TRUE; + free(command); + deployStatus = CloudInitSetup(tmpDirPath); + } else { + deploymentResult = ForkExecAndWaitCommand(command); + free(command); - if (deploymentResult != 0) { - sLog(log_error, "Customization process returned with error. \n"); - sLog(log_debug, "Deployment result = %d \n", deploymentResult); + if (deploymentResult != 0) { + sLog(log_error, "Customization process returned with error. \n"); + sLog(log_debug, "Deployment result = %d \n", deploymentResult); + + if (deploymentResult == CUST_NETWORK_ERROR || + deploymentResult == CUST_NIC_ERROR) { + sLog(log_info, "Setting network error status in vmx. \n"); + SetCustomizationStatusInVmx(TOOLSDEPLOYPKG_RUNNING, + GUESTCUST_EVENT_NETWORK_SETUP_FAILED, + NULL); + } else { + sLog(log_info, "Setting generic error status in vmx. \n"); + SetCustomizationStatusInVmx(TOOLSDEPLOYPKG_RUNNING, + GUESTCUST_EVENT_CUSTOMIZE_FAILED, + NULL); + } - if (deploymentResult == CUST_NETWORK_ERROR || deploymentResult == CUST_NIC_ERROR) { - // Network specific error in the guest - sLog(log_info, "Setting network error status in vmx. \n"); - SetCustomizationStatusInVmx(TOOLSDEPLOYPKG_RUNNING, - GUESTCUST_EVENT_NETWORK_SETUP_FAILED, - NULL); + TransitionState(INPROGRESS, ERRORED); + + deployStatus = DEPLOY_ERROR; + SetDeployError("Deployment failed. " + "The forked off process returned error code."); + sLog(log_error, "Deployment failed. " + "The forked off process returned error code. \n"); } else { - // Generic error in the guest - sLog(log_info, "Setting generic error status in vmx. \n"); - SetCustomizationStatusInVmx(TOOLSDEPLOYPKG_RUNNING, - GUESTCUST_EVENT_CUSTOMIZE_FAILED, + SetCustomizationStatusInVmx(TOOLSDEPLOYPKG_DONE, + TOOLSDEPLOYPKG_ERROR_SUCCESS, NULL); - } - - // Move to ERROR state - TransitionState(INPROGRESS, ERRORED); - // Set deploy status to be returned - deployStatus = DEPLOY_ERROR; - SetDeployError("Deployment failed. The forked off process returned error code."); - sLog(log_error, "Deployment failed. " - "The forked off process returned error code. \n"); - } else { - // Set vmx status - customization success - SetCustomizationStatusInVmx(TOOLSDEPLOYPKG_DONE, - TOOLSDEPLOYPKG_ERROR_SUCCESS, - NULL); - - // Move to DONE state - TransitionState(INPROGRESS, DONE); + TransitionState(INPROGRESS, DONE); - deployStatus = DEPLOY_SUCCESS; - sLog(log_info, "Deployment succeded. \n"); + deployStatus = DEPLOY_SUCCESS; + sLog(log_info, "Deployment succeded. \n"); + } } - /* - * Read in nics to enable from the nics.txt file. We do it irrespective of the - * sucess/failure of the customization so that at the end of it we always - * have nics enabled. - */ - nics = GetNicsToEnable(EXTRACTPATH); - if (nics) { - // XXX: Sleep before the last SetCustomizationStatusInVmx - // This is a temporary-hack for PR 422790 - sleep(5); - sLog(log_info, "Wait before set enable-nics stats in vmx.\n"); + if (!cloudInitEnabled || DEPLOY_SUCCESS != deployStatus) { + /* + * Read in nics to enable from the nics.txt file. We do it irrespective + * of the sucess/failure of the customization so that at the end of it we + * always have nics enabled. + */ + nics = GetNicsToEnable(tmpDirPath); + if (nics) { + // XXX: Sleep before the last SetCustomizationStatusInVmx + // This is a temporary-hack for PR 422790 + sleep(5); + sLog(log_info, "Wait before set enable-nics stats in vmx.\n"); - TryToEnableNics(nics); + TryToEnableNics(nics); - free(nics); - } else { - sLog(log_info, "No nics to enable.\n"); + free(nics); + } else { + sLog(log_info, "No nics to enable.\n"); + } } - // Clean up command - cleanupCommand = malloc(strlen(CLEANUPCMD) + strlen(CLEANUPPATH) + 1); + cleanupCommand = malloc(strlen(CLEANUPCMD) + strlen(tmpDirPath) + 1); if (!cleanupCommand) { SetDeployError("Error allocating memory."); + free(tmpDirPath); return DEPLOY_ERROR; } strcpy(cleanupCommand, CLEANUPCMD); - strcat(cleanupCommand, CLEANUPPATH); + strcat(cleanupCommand, tmpDirPath); sLog(log_info, "Launching cleanup. \n"); if (ForkExecAndWaitCommand(cleanupCommand) != 0) { - sLog(log_warning, "Error while clean up. Error removing directory %s. (%s)", - EXTRACTPATH, strerror (errno)); - //TODO: What should be done if cleanup fails ?? + sLog(log_warning, "Error while clean up tmp directory %s: (%s)", + tmpDirPath, strerror (errno)); } free (cleanupCommand); + free(tmpDirPath); + + if (flags & VMWAREDEPLOYPKG_HEADER_FLAGS_SKIP_REBOOT) { + forceSkipReboot = true; + } + sLog(log_info, + "sSkipReboot: %s, forceSkipReboot %s\n", + sSkipReboot ? "true" : "false", + forceSkipReboot ? "true" : "false"); + sSkipReboot |= forceSkipReboot; //Reset the guest OS if (!sSkipReboot && !deploymentResult) { - // Reboot the Vm pid_t pid = fork(); if (pid == -1) { sLog(log_error, "Failed to fork: %s", strerror(errno)); @@ -1015,8 +1186,8 @@ Deploy(const char* packageName) return deployStatus; } -/* - * Extract all files into the destination folder +/** + * Extract all files into the destination folder. */ Bool ExtractCabPackage(const char* cabFileName, @@ -1049,8 +1220,8 @@ ExtractCabPackage(const char* cabFileName, return TRUE; } -/* - * Extract all files into the destination folder +/** + * Extract all files into the destination folder. */ static Bool ExtractZipPackage(const char* pkgName, @@ -1248,61 +1419,6 @@ ForkExecAndWaitCommand(const char* command) return retval; } -/** - * Sets up the path for exracting file. For e.g. if the file is /a/b/c/d.abc - * then it creates /a/b/c (skips if any of the directories along the path - * exists). If the the path ends in '/', then the the entire input is assumed - * to be a directory and is created as such. - * - * @param path IN: Complete path of the file - * @return TRUE on success - */ - -Bool -CreateDir(const char* path) -{ - struct stat stats; - char* token; - char* copy; - - // make a copy we can modify - copy = strdup(path); - - // walk through the path (it employs in string replacement) - for (token = copy + 1; *token; ++token) { - - // find - if (*token != '/') { - continue; - } - - /* - * cut it off here for e.g. on first iteration /a/b/c/d.abc will have - * token /a, on second /a/b etc - */ - *token = 0; - - sLog(log_debug, "Creating directory %s", copy); - - // ignore if the directory exists - if (!((stat(copy, &stats) == 0) && S_ISDIR(stats.st_mode))) { - // make directory and check error (accessible only by owner) - if (mkdir(copy, 0700) == -1) { - sLog(log_error, "Unable to create directory %s (%s)", copy, - strerror(errno)); - free(copy); - return FALSE; - } - } - - // restore the token - *token = '/'; - } - - free(copy); - return TRUE; -} - //...................................................................................... /** diff --git a/open-vm-tools/libDeployPkg/mspackConfig.h b/open-vm-tools/libDeployPkg/mspackConfig.h index c7b354a11..ab9003dbb 100644 --- a/open-vm-tools/libDeployPkg/mspackConfig.h +++ b/open-vm-tools/libDeployPkg/mspackConfig.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -16,14 +16,20 @@ * *********************************************************/ +/* + * mspackConfig.h -- + * + * Definitions of mspack constants. + */ + /* * This file is a version of the auto generated code. This has a bunch of * #definitions which are required to make the mspack library compatible with * the client scenario. An alternative is to use define HAVE_CONFIG_H and use - * the auto generated file. + * the auto generated file. * * The ownership has been taken into our codebase in order to be able to compile - * for different flavours of linux/unix using -target in gcc + * for different flavors of linux/unix using -target in gcc. */ // Define to 1 if you have the `alarm' function. @@ -35,114 +41,114 @@ // Define to 1 if you have and it should be used (not on Ultrix). #define HAVE_ALLOCA_H 1 -// Define to 1 if you have the header file. +// Define to 1 if you have the header file. #define HAVE_CTYPE_H 1 // Define to 1 if you have the header file, and it defines `DIR'. #define HAVE_DIRENT_H 1 -// Define to 1 if you have the header file. +// Define to 1 if you have the header file. #define HAVE_ERRNO_H 1 -// Define to 1 if your system has a working POSIX `fnmatch' function. +// Define to 1 if your system has a working POSIX `fnmatch' function. #define HAVE_FNMATCH 1 -// Define to 1 if you have the header file. +// Define to 1 if you have the header file. #define HAVE_FNMATCH_H 1 -// Define to 1 if fseeko (and presumably ftello) exists and is declared. +// Define to 1 if fseeko (and presumably ftello) exists and is declared. #define HAVE_FSEEKO 1 -// Define to 1 if you have the header file. +// Define to 1 if you have the header file. #define HAVE_GETOPT_H 1 -// Define to 1 if you have the `getopt_long' function. +// Define to 1 if you have the `getopt_long' function. #define HAVE_GETOPT_LONG 1 -// Define to 1 if you have the header file. +// Define to 1 if you have the header file. #define HAVE_INTTYPES_H 1 // Define to 1 if you have the header file. #define HAVE_LIBINTL_H 1 -// Define to 1 if you have the header file. +// Define to 1 if you have the header file. #define HAVE_LIMITS_H 1 -// Define to 1 if declares mbstate_t. +// Define to 1 if declares mbstate_t. #define HAVE_MBSTATE_T 1 -// Define to 1 if you have the `memcpy' function. +// Define to 1 if you have the `memcpy' function. #define HAVE_MEMCPY 1 -// Define to 1 if you have the header file. +// Define to 1 if you have the header file. #define HAVE_MEMORY_H 1 -// Define to 1 if you have the `mempcpy' function. +// Define to 1 if you have the `mempcpy' function. #define HAVE_MEMPCPY 1 -// Define to 1 if you have the header file. +// Define to 1 if you have the header file. #define HAVE_STDARG_H 1 -// Define to 1 if you have the header file. +// Define to 1 if you have the header file. #define HAVE_STDINT_H 1 -// Define to 1 if you have the header file. +// Define to 1 if you have the header file. #define HAVE_STDLIB_H 1 -// Define to 1 if you have the `strcasecmp' function. +// Define to 1 if you have the `strcasecmp' function. #define HAVE_STRCASECMP 1 -// Define to 1 if you have the `strchr' function. +// Define to 1 if you have the `strchr' function. #define HAVE_STRCHR 1 -// Define to 1 if you have the header file. +// Define to 1 if you have the header file. #define HAVE_STRINGS_H 1 -// Define to 1 if you have the header file. +// Define to 1 if you have the header file. #define HAVE_STRING_H 1 -// Define to 1 if you have the header file. +// 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 to 1 if you have the header file. #define HAVE_SYS_TIME_H 1 -// Define to 1 if you have the header file. +// Define to 1 if you have the header file. #define HAVE_SYS_TYPES_H 1 -// Define to 1 if you have the header file. +// Define to 1 if you have the header file. #define HAVE_UNISTD_H 1 -// Define to 1 if you have the `utime' function. +// Define to 1 if you have the `utime' function. #define HAVE_UTIME 1 -// Define to 1 if you have the `utimes' function. +// Define to 1 if you have the `utimes' function. #define HAVE_UTIMES 1 -// Define to 1 if you have the header file. +// Define to 1 if you have the header file. #define HAVE_UTIME_H 1 -// Define to 1 if you have the header file. +// Define to 1 if you have the header file. #define HAVE_WCHAR_H 1 -// Define to 1 if you have the header file. +// Define to 1 if you have the header file. #define HAVE_WCTYPE_H 1 /* * PACKAGE, PACKAGE_BUGREPORT, PACKAGE_NAME, PACKAGE_STRING, PACKAGE_TARNAME, - * PACKAGE_VERSION and VERSION should not be defined here, since they will be in conflict - * with open-vm-tools definitions. + * PACKAGE_VERSION and VERSION should not be defined here, since they will be in + * conflict with open-vm-tools definitions. */ -// Define to 1 if you have the ANSI C header files. +// Define to 1 if you have the ANSI C header files. #define STDC_HEADERS 1 -// Define to 1 if you can safely include both and . +// Define to 1 if you can safely include both and . #define TIME_WITH_SYS_TIME 1 -// Number of bits in a file offset, on hosts where this is settable. +// Number of bits in a file offset, on hosts where this is settable. #define _FILE_OFFSET_BITS 64 -// Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). +// Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). #define _LARGEFILE_SOURCE 1 diff --git a/open-vm-tools/libDeployPkg/mspackWrapper.c b/open-vm-tools/libDeployPkg/mspackWrapper.c index b415d936a..da20d6845 100644 --- a/open-vm-tools/libDeployPkg/mspackWrapper.c +++ b/open-vm-tools/libDeployPkg/mspackWrapper.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -16,6 +16,12 @@ * *********************************************************/ +/* + * mspackWrapper.c -- + * + * Implementation of the mspack wrapper. + */ + #include "mspackWrapper.h" #include #include diff --git a/open-vm-tools/libDeployPkg/mspackWrapper.h b/open-vm-tools/libDeployPkg/mspackWrapper.h index 214e4249e..cf064e40e 100644 --- a/open-vm-tools/libDeployPkg/mspackWrapper.h +++ b/open-vm-tools/libDeployPkg/mspackWrapper.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -16,6 +16,12 @@ * *********************************************************/ +/* + * mspackWrapper.h -- + * + * Definitions of the mspack wrapper. + */ + #ifndef _MSPACKWRAPPER_H_ #define _MSPACKWRAPPER_H_ diff --git a/open-vm-tools/libDeployPkg/processPosix.c b/open-vm-tools/libDeployPkg/processPosix.c index bfea9e4fd..b81ec80ed 100644 --- a/open-vm-tools/libDeployPkg/processPosix.c +++ b/open-vm-tools/libDeployPkg/processPosix.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -16,6 +16,12 @@ * *********************************************************/ +/* + * processPosix.c -- + * + * Implementation of the POSIX process wrapper. + */ + #include "imgcust-common/log.h" #include "imgcust-common/process.h" #include @@ -23,7 +29,6 @@ #include #include -// vmware headers #include "util.h" typedef struct _ProcessInternal { @@ -44,19 +49,25 @@ typedef enum _ReadStatus { READSTATUS_ERROR } ReadStatus; -static void ProcessRead(ProcessInternal* p, ReadStatus* status, Bool stdout, Bool readToEof); +static void +ProcessRead(ProcessInternal *p, ReadStatus *status, Bool out, Bool readToEof); + -/** - * Create and initialize a process object +/* + *------------------------------------------------------------------------------ + * + * Process_Create -- + * + * Create and initialize a process object. + * + *------------------------------------------------------------------------------ */ -ProcessError -Process_Create(ProcessHandle *h, - char* args[], - void* logPtr) +ProcessError +Process_Create(ProcessHandle *h, char *args[], void *logPtr) { int i, numArgs; - ProcessInternal* p; + ProcessInternal *p; LogFunction log = (LogFunction)logPtr; log(log_info, "sizeof ProcessInternal is %d\n", sizeof(ProcessInternal)); p = Util_SafeMalloc(sizeof(ProcessInternal)); @@ -83,23 +94,30 @@ Process_Create(ProcessHandle *h, return PROCESS_SUCCESS; } -/** - * Run a process until complete, collecting stdout and stderr - * into the process object. + +/* + *------------------------------------------------------------------------------ + * + * Process_RunToComplete -- + * + * Runs a process until complete, collecting stdout and stderr into the + * process object. + * + *------------------------------------------------------------------------------ */ -ProcessError -Process_RunToComplete(ProcessHandle h, - unsigned long timeoutSec) +ProcessError +Process_RunToComplete(ProcessHandle h, unsigned long timeoutSec) { int stdout[2]; int stderr[2]; int flags; ProcessInternal* p; // poll for the process to complete and read the output - const unsigned int OneSecondMicrosec = 1000000; - const unsigned int LoopSleepMicrosec = OneSecondMicrosec / 10; - const unsigned long timeoutLoopSleeps = timeoutSec * (OneSecondMicrosec / LoopSleepMicrosec); + const unsigned int OneSecMicroSec = 1000000; + const unsigned int LoopSleepMicrosec = OneSecMicroSec / 10; + const unsigned long timeoutLoopSleeps = + timeoutSec * (OneSecMicroSec / LoopSleepMicrosec); unsigned long elapsedTimeLoopSleeps; ReadStatus res_stdout = READSTATUS_UNDEFINED; @@ -109,13 +127,13 @@ Process_RunToComplete(ProcessHandle h, stdout[0] = stdout[1] = 0; if (pipe(stdout) < 0) { - p->log(log_error, "Failed to create pipe for stdout: %s", strerror(errno)); + p->log(log_error, "Failed to create pipe for stdout:%s", strerror(errno)); return PROCESS_FAILED; } - + stderr[0] = stderr[1] = 0; if (pipe(stderr) < 0) { - p->log(log_error, "Failed to create pipe for stderr, %s", strerror(errno)); + p->log(log_error, "Failed to create pipe for stderr,%s", strerror(errno)); close(stdout[0]); close(stdout[1]); return PROCESS_FAILED; @@ -157,20 +175,20 @@ Process_RunToComplete(ProcessHandle h, while (1) { int processStatus; - const int processFinished = (waitpid(p->pid, &processStatus, WNOHANG) > 0); + int processFinished = (waitpid(p->pid, &processStatus, WNOHANG) > 0); if (processFinished) { if (WIFEXITED(processStatus)) { p->exitCode = WEXITSTATUS(processStatus); - p->log(log_info, + p->log(log_info, "Process exited normally after %d seconds, returned %d", - elapsedTimeLoopSleeps * LoopSleepMicrosec / OneSecondMicrosec, + elapsedTimeLoopSleeps * LoopSleepMicrosec / OneSecMicroSec, p->exitCode); } else if (WIFSIGNALED(processStatus)) { p->exitCode = 127; p->log(log_error, - "Process exited abnormally after %d seconds, uncaught signal %d", - elapsedTimeLoopSleeps * LoopSleepMicrosec / OneSecondMicrosec, + "Process exited abnormally after %d sec, uncaught signal %d", + elapsedTimeLoopSleeps * LoopSleepMicrosec / OneSecMicroSec, WTERMSIG(processStatus)); } @@ -181,16 +199,16 @@ Process_RunToComplete(ProcessHandle h, kill(p->pid, SIGKILL); } - // empty the pipes + // Empty the pipes. ProcessRead(p, &res_stdout, TRUE, FALSE); if (res_stdout == READSTATUS_ERROR) { - p->log(log_error, "Error occured while reading process output, killing..."); + p->log(log_error, "Error while reading process output, killing..."); kill(p->pid, SIGKILL); } ProcessRead(p, &res_stderr, FALSE, FALSE); if (res_stderr == READSTATUS_ERROR) { - p->log(log_error, "Error occured while reading process output, killing..."); + p->log(log_error, "Error while reading process output, killing..."); kill(p->pid, SIGKILL); } @@ -199,15 +217,15 @@ Process_RunToComplete(ProcessHandle h, } } - // Process completed. Now read all the output to EOF + // Process completed. Now read all the output to EOF. ProcessRead(p, &res_stdout, TRUE, TRUE); if (res_stdout == READSTATUS_ERROR) { - p->log(log_error, "Error occured while reading process output, killing..."); + p->log(log_error, "Error while reading process output, killing..."); } ProcessRead(p, &res_stderr, FALSE, TRUE); if (res_stderr == READSTATUS_ERROR) { - p->log(log_error, "Error occured while reading process output, killing..."); + p->log(log_error, "Error while reading process output, killing..."); } close(stdout[1]); @@ -215,9 +233,13 @@ Process_RunToComplete(ProcessHandle h, return PROCESS_SUCCESS; } -/** + +/* + *------------------------------------------------------------------------------ + * + * ProcessRead -- * - * Read redirected stdout or stderr. + * Read redirected stdout or stderr. * * status - as IN - holds the result from previous read operation. * as OUT - returns the status from the read operation. @@ -228,12 +250,12 @@ Process_RunToComplete(ProcessHandle h, * readToEof = FALSE- Just empty the pipe. This will return even if we get * EAGAIN back from the read. Use this in the midst of the poll * loop so the pipe doesn't fill up and block the process. + * + *------------------------------------------------------------------------------ */ + static void -ProcessRead(ProcessInternal* p, - ReadStatus* status, /* IN/OUT */ - Bool stdout, - Bool readToEof) +ProcessRead(ProcessInternal *p, ReadStatus *status, Bool stdout, Bool readToEof) { char buf[1024]; size_t currSize, newSize; @@ -292,42 +314,75 @@ ProcessRead(ProcessInternal* p, } } } while (1); -} +} + + +/* + *------------------------------------------------------------------------------ + * + * Process_GetStdout -- + * + * Returns process's standard output. + * + *------------------------------------------------------------------------------ + */ -/** - * Get the readonly stdout buffer from the object - */ -const char* +const char * Process_GetStdout(ProcessHandle h) { - ProcessInternal* p = (ProcessInternal*)h; + ProcessInternal *p = (ProcessInternal *)h; return p->stdoutStr; } -/** - * Get the readonly stderr buffer from the object - */ -const char* + +/* + *------------------------------------------------------------------------------ + * + * Process_GetStderr -- + * + * Returns process's standard error output. + * + *------------------------------------------------------------------------------ + */ + +const char * Process_GetStderr(ProcessHandle h) { - ProcessInternal* p = (ProcessInternal*)h; + ProcessInternal *p = (ProcessInternal *)h; return p->stderrStr; } -/** - * Get the process return code - */ -int + +/* + *------------------------------------------------------------------------------ + * + * Process_GetExitCode -- + * + * Returns process's exit code. + * + *------------------------------------------------------------------------------ + */ + +int Process_GetExitCode(ProcessHandle h) { - ProcessInternal* p = (ProcessInternal*)h; + ProcessInternal *p = (ProcessInternal *)h; return p->exitCode; } -/** - * clean up + +/* + *------------------------------------------------------------------------------ + * + * Process_Destroy -- + * + * Destroys the process and returns result of the operation. + * + *------------------------------------------------------------------------------ */ -ProcessError Process_Destroy(ProcessHandle h) + +ProcessError +Process_Destroy(ProcessHandle h) { ProcessInternal* p; int i; diff --git a/open-vm-tools/libDeployPkg/toolsDeployPkg.h b/open-vm-tools/libDeployPkg/toolsDeployPkg.h index 724421cd8..8e8eab183 100644 --- a/open-vm-tools/libDeployPkg/toolsDeployPkg.h +++ b/open-vm-tools/libDeployPkg/toolsDeployPkg.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -16,19 +16,18 @@ * *********************************************************/ +/* + * toolsDeployPkg.h -- + * + * Define constants & exported methods related to tools package deployment. + */ + #ifndef __TOOLS_DEPLOYPKG_H_ #define __TOOLS_DEPLOYPKG_H_ #define INCLUDE_ALLOW_USERLEVEL #include "includeCheck.h" - -/* - * toolsDeployPkg.h - * - * -- Define constants & exported methods related to tools package deployment. - */ - typedef enum { TOOLSDEPLOYPKG_IDLE = 0, TOOLSDEPLOYPKG_PENDING, @@ -40,15 +39,40 @@ typedef enum { typedef enum { TOOLSDEPLOYPKG_ERROR_SUCCESS = 0, - TOOLSDEPLOYPKG_ERROR_NOT_SUPPORT, // Old tools do not support opetion - TOOLSDEPLOYPKG_ERROR_PKG_NOT_FOUND, // Specified pkg is not found + TOOLSDEPLOYPKG_ERROR_NOT_SUPPORT, // Old tools do not support option. + TOOLSDEPLOYPKG_ERROR_PKG_NOT_FOUND, // Specified pkg is not found. TOOLSDEPLOYPKG_ERROR_RPC_INVALID, TOOLSDEPLOYPKG_ERROR_COPY_FAILED, TOOLSDEPLOYPKG_ERROR_DEPLOY_FAILED, } ToolsDeployPkgError; -Bool ToolsDeployPkg_PowerOn(void); -void ToolsDeployPkg_Begin(void); + +/* + *------------------------------------------------------------------------------ + * + * ToolsDeployPkg_PowerOn -- + * + * Tools callback for PowerOn. + * + *------------------------------------------------------------------------------ + */ + +Bool +ToolsDeployPkg_PowerOn(void); + + +/* + *------------------------------------------------------------------------------ + * + * ToolsDeployPkg_PowerOn -- + * + * Tools callback for Begin. + * + *------------------------------------------------------------------------------ + */ + +void +ToolsDeployPkg_Begin(void); #define QUERY_NICS_SUPPORTED "queryNicsSupported" #define NICS_STATUS_CONNECTED "connected" diff --git a/open-vm-tools/libguestlib/Makefile.am b/open-vm-tools/libguestlib/Makefile.am index b05d43a1c..2518bdaf2 100644 --- a/open-vm-tools/libguestlib/Makefile.am +++ b/open-vm-tools/libguestlib/Makefile.am @@ -18,7 +18,7 @@ lib_LTLIBRARIES = libguestlib.la AM_CFLAGS = -AM_CFLAGS += -I$(top_builddir)/include +AM_CFLAGS += -I$(top_srcdir)/include libguestlib_la_LIBADD = libguestlib_la_LIBADD += @VMTOOLS_LIBS@ diff --git a/open-vm-tools/libguestlib/Makefile.in b/open-vm-tools/libguestlib/Makefile.in deleted file mode 100644 index f80d23b76..000000000 --- a/open-vm-tools/libguestlib/Makefile.in +++ /dev/null @@ -1,678 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = libguestlib -DIST_COMMON = $(libguestlib_include_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/vmguestlib.pc.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = vmguestlib.pc -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" \ - "$(DESTDIR)$(libguestlib_includedir)" -libLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(lib_LTLIBRARIES) -libguestlib_la_DEPENDENCIES = -am_libguestlib_la_OBJECTS = libguestlib_la-guestlibV3_xdr.lo \ - libguestlib_la-guestlibIoctl_xdr.lo \ - libguestlib_la-vmGuestLib.lo -libguestlib_la_OBJECTS = $(am_libguestlib_la_OBJECTS) -libguestlib_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libguestlib_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libguestlib_la_SOURCES) -DIST_SOURCES = $(libguestlib_la_SOURCES) -pkgconfigDATA_INSTALL = $(INSTALL_DATA) -DATA = $(pkgconfig_DATA) -libguestlib_includeHEADERS_INSTALL = $(INSTALL_HEADER) -HEADERS = $(libguestlib_include_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ - -# XXX: see explanation in lib/guestRpc/Makefile.am -CFLAGS = @CFLAGS@ -Wno-unused -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -lib_LTLIBRARIES = libguestlib.la -AM_CFLAGS = -I$(top_builddir)/include -libguestlib_la_LIBADD = @VMTOOLS_LIBS@ -libguestlib_la_SOURCES = guestlibV3_xdr.c guestlibIoctl_xdr.c \ - vmGuestLib.c -# We require GCC, so we're fine passing compiler-specific flags. -# Needed for OS's that don't link shared libraries against libc by default, e.g. FreeBSD -libguestlib_la_LDFLAGS = -Wl,-lc -libguestlib_includedir = $(includedir)/vmGuestLib -libguestlib_include_HEADERS = \ - $(top_srcdir)/lib/include/includeCheck.h \ - $(top_srcdir)/lib/include/vmGuestLib.h \ - $(top_srcdir)/lib/include/vmSessionId.h \ - $(top_srcdir)/lib/include/vm_basic_types.h -BUILT_SOURCES = guestlibV3.h guestlibV3_xdr.c guestlibIoctl.h \ - guestlibIoctl_xdr.c -CLEANFILES = $(BUILT_SOURCES) -libguestlib_la_CPPFLAGS = -DVMTOOLS_USE_GLIB @GLIB2_CPPFLAGS@ -EXTRA_DIST = vmguestlib.pc.in -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = vmguestlib.pc -all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libguestlib/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu libguestlib/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -vmguestlib.pc: $(top_builddir)/config.status $(srcdir)/vmguestlib.pc.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ - else :; fi; \ - done - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libguestlib.la: $(libguestlib_la_OBJECTS) $(libguestlib_la_DEPENDENCIES) - $(libguestlib_la_LINK) -rpath $(libdir) $(libguestlib_la_OBJECTS) $(libguestlib_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libguestlib_la-guestlibIoctl_xdr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libguestlib_la-guestlibV3_xdr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libguestlib_la-vmGuestLib.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libguestlib_la-guestlibV3_xdr.lo: guestlibV3_xdr.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libguestlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libguestlib_la-guestlibV3_xdr.lo -MD -MP -MF $(DEPDIR)/libguestlib_la-guestlibV3_xdr.Tpo -c -o libguestlib_la-guestlibV3_xdr.lo `test -f 'guestlibV3_xdr.c' || echo '$(srcdir)/'`guestlibV3_xdr.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libguestlib_la-guestlibV3_xdr.Tpo $(DEPDIR)/libguestlib_la-guestlibV3_xdr.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='guestlibV3_xdr.c' object='libguestlib_la-guestlibV3_xdr.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libguestlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libguestlib_la-guestlibV3_xdr.lo `test -f 'guestlibV3_xdr.c' || echo '$(srcdir)/'`guestlibV3_xdr.c - -libguestlib_la-guestlibIoctl_xdr.lo: guestlibIoctl_xdr.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libguestlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libguestlib_la-guestlibIoctl_xdr.lo -MD -MP -MF $(DEPDIR)/libguestlib_la-guestlibIoctl_xdr.Tpo -c -o libguestlib_la-guestlibIoctl_xdr.lo `test -f 'guestlibIoctl_xdr.c' || echo '$(srcdir)/'`guestlibIoctl_xdr.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libguestlib_la-guestlibIoctl_xdr.Tpo $(DEPDIR)/libguestlib_la-guestlibIoctl_xdr.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='guestlibIoctl_xdr.c' object='libguestlib_la-guestlibIoctl_xdr.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libguestlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libguestlib_la-guestlibIoctl_xdr.lo `test -f 'guestlibIoctl_xdr.c' || echo '$(srcdir)/'`guestlibIoctl_xdr.c - -libguestlib_la-vmGuestLib.lo: vmGuestLib.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libguestlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libguestlib_la-vmGuestLib.lo -MD -MP -MF $(DEPDIR)/libguestlib_la-vmGuestLib.Tpo -c -o libguestlib_la-vmGuestLib.lo `test -f 'vmGuestLib.c' || echo '$(srcdir)/'`vmGuestLib.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libguestlib_la-vmGuestLib.Tpo $(DEPDIR)/libguestlib_la-vmGuestLib.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='vmGuestLib.c' object='libguestlib_la-vmGuestLib.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libguestlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libguestlib_la-vmGuestLib.lo `test -f 'vmGuestLib.c' || echo '$(srcdir)/'`vmGuestLib.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-pkgconfigDATA: $(pkgconfig_DATA) - @$(NORMAL_INSTALL) - test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" - @list='$(pkgconfig_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ - $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \ - done - -uninstall-pkgconfigDATA: - @$(NORMAL_UNINSTALL) - @list='$(pkgconfig_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ - rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \ - done -install-libguestlib_includeHEADERS: $(libguestlib_include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(libguestlib_includedir)" || $(MKDIR_P) "$(DESTDIR)$(libguestlib_includedir)" - @list='$(libguestlib_include_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(libguestlib_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(libguestlib_includedir)/$$f'"; \ - $(libguestlib_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(libguestlib_includedir)/$$f"; \ - done - -uninstall-libguestlib_includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(libguestlib_include_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(libguestlib_includedir)/$$f'"; \ - rm -f "$(DESTDIR)$(libguestlib_includedir)/$$f"; \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) -installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(libguestlib_includedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -clean: clean-am - -clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-libguestlib_includeHEADERS \ - install-pkgconfigDATA - -install-dvi: install-dvi-am - -install-exec-am: install-libLTLIBRARIES - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-libLTLIBRARIES \ - uninstall-libguestlib_includeHEADERS uninstall-pkgconfigDATA - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am \ - install-libLTLIBRARIES install-libguestlib_includeHEADERS \ - install-man install-pdf install-pdf-am install-pkgconfigDATA \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-libLTLIBRARIES \ - uninstall-libguestlib_includeHEADERS uninstall-pkgconfigDATA - - -$(pkgconfig_DATA): $(top_builddir)/config.status - -guestlibIoctl.h: guestlibIoctl.x - @RPCGEN_WRAPPER@ libguestlib/guestlibIoctl.x $@ - -guestlibIoctl_xdr.c: guestlibIoctl.x guestlibIoctl.h - @RPCGEN_WRAPPER@ libguestlib/guestlibIoctl.x $@ - -guestlibV3.h: guestlibV3.x - @RPCGEN_WRAPPER@ libguestlib/guestlibV3.x $@ - -guestlibV3_xdr.c: guestlibV3.x guestlibV3.h - @RPCGEN_WRAPPER@ libguestlib/guestlibV3.x $@ -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/libhgfs/Makefile.in b/open-vm-tools/libhgfs/Makefile.in deleted file mode 100644 index bb1d60f67..000000000 --- a/open-vm-tools/libhgfs/Makefile.in +++ /dev/null @@ -1,588 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2010-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@HAVE_GTKMM_TRUE@am__append_1 = ../lib/hgfsUri/libHgfsUri.la -subdir = libhgfs -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(libdir)" -libLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(lib_LTLIBRARIES) -libhgfs_la_DEPENDENCIES = ../lib/hgfs/libHgfs.la \ - ../lib/hgfsHelper/libHgfsHelper.la \ - ../lib/hgfsServer/libHgfsServer.la $(am__append_1) \ - ../lib/hgfsServerManagerGuest/libHgfsServerManagerGuest.la \ - ../lib/hgfsServerPolicyGuest/libHgfsServerPolicyGuest.la -am_libhgfs_la_OBJECTS = libhgfs_la-hgfslib.lo -libhgfs_la_OBJECTS = $(am_libhgfs_la_OBJECTS) -libhgfs_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libhgfs_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libhgfs_la_SOURCES) -DIST_SOURCES = $(libhgfs_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -lib_LTLIBRARIES = libhgfs.la -libhgfs_la_LIBADD = ../lib/hgfs/libHgfs.la \ - ../lib/hgfsHelper/libHgfsHelper.la \ - ../lib/hgfsServer/libHgfsServer.la $(am__append_1) \ - ../lib/hgfsServerManagerGuest/libHgfsServerManagerGuest.la \ - ../lib/hgfsServerPolicyGuest/libHgfsServerPolicyGuest.la \ - @GLIB2_LIBS@ @GTHREAD_LIBS@ @VMTOOLS_LIBS@ $(am__empty) -libhgfs_la_SOURCES = hgfslib.c -libhgfs_la_CPPFLAGS = -I$(top_srcdir)/libvmtools -# We require GCC, so we're fine passing compiler-specific flags. -# Needed for OS's that don't link shared libraries against libc by -#default, e.g. FreeBSD -libhgfs_la_LDFLAGS = -Wl,-z,defs -Wl,-lc -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libhgfs/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu libhgfs/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ - else :; fi; \ - done - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libhgfs.la: $(libhgfs_la_OBJECTS) $(libhgfs_la_DEPENDENCIES) - $(libhgfs_la_LINK) -rpath $(libdir) $(libhgfs_la_OBJECTS) $(libhgfs_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhgfs_la-hgfslib.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libhgfs_la-hgfslib.lo: hgfslib.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhgfs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libhgfs_la-hgfslib.lo -MD -MP -MF $(DEPDIR)/libhgfs_la-hgfslib.Tpo -c -o libhgfs_la-hgfslib.lo `test -f 'hgfslib.c' || echo '$(srcdir)/'`hgfslib.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libhgfs_la-hgfslib.Tpo $(DEPDIR)/libhgfs_la-hgfslib.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hgfslib.c' object='libhgfs_la-hgfslib.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhgfs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libhgfs_la-hgfslib.lo `test -f 'hgfslib.c' || echo '$(srcdir)/'`hgfslib.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: - for dir in "$(DESTDIR)$(libdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: install-libLTLIBRARIES - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-libLTLIBRARIES - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am \ - install-libLTLIBRARIES install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-libLTLIBRARIES - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/libvmtools/Makefile.in b/open-vm-tools/libvmtools/Makefile.in deleted file mode 100644 index 80527a684..000000000 --- a/open-vm-tools/libvmtools/Makefile.in +++ /dev/null @@ -1,693 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2008-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@HAVE_VSOCK_TRUE@am__append_1 = ../lib/asyncsocket/libAsyncSocket.la -@ENABLE_GRABBITMQPROXY_TRUE@am__append_2 = @SSL_LIBS@ -lcrypto -@USE_SLASH_PROC_TRUE@am__append_3 = ../lib/slashProc/libSlashProc.la -subdir = libvmtools -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(libdir)" -libLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(lib_LTLIBRARIES) -am__DEPENDENCIES_1 = -libvmtools_la_DEPENDENCIES = ../lib/lock/libLock.la \ - ../lib/backdoor/libBackdoor.la $(am__append_1) \ - ../lib/sslDirect/libSslDirect.la ../lib/pollGtk/libPollGtk.la \ - ../lib/poll/libPoll.la ../lib/dataMap/libDataMap.la \ - ../lib/hashMap/libHashMap.la ../lib/dict/libDict.la \ - ../lib/dynxdr/libDynxdr.la ../lib/err/libErr.la \ - ../lib/file/libFile.la ../lib/glibUtils/libGlibUtils.la \ - ../lib/guestApp/libGuestApp.la ../lib/guestRpc/libGuestRpc.la \ - ../lib/message/libMessage.la ../lib/netUtil/libNetUtil.la \ - ../lib/nicInfo/libNicInfo.la ../lib/panic/libPanic.la \ - ../lib/procMgr/libProcMgr.la \ - ../lib/rpcChannel/libRpcChannel.la ../lib/rpcIn/libRpcIn.la \ - ../lib/rpcOut/libRpcOut.la ../lib/rpcVmx/libRpcVmx.la \ - ../lib/string/libString.la ../lib/syncDriver/libSyncDriver.la \ - ../lib/system/libSystem.la ../lib/stubs/libStubsCS.la \ - ../lib/unicode/libUnicode.la ../lib/user/libUser.la \ - ../lib/vmCheck/libVmCheck.la ../lib/vmSignal/libVmSignal.la \ - ../lib/wiper/libWiper.la ../lib/misc/libMisc.la \ - $(am__DEPENDENCIES_1) $(am__append_3) -am_libvmtools_la_OBJECTS = libvmtools_la-i18n.lo \ - libvmtools_la-monotonicTimer.lo libvmtools_la-signalSource.lo \ - libvmtools_la-vmtools.lo libvmtools_la-vmtoolsConfig.lo \ - libvmtools_la-vmtoolsLog.lo libvmtools_la-vmxLogger.lo \ - libvmtools_la-guestSDKLog.lo libvmtools_la-stub-log.lo -libvmtools_la_OBJECTS = $(am_libvmtools_la_OBJECTS) -libvmtools_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libvmtools_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libvmtools_la_SOURCES) -DIST_SOURCES = $(libvmtools_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -lib_LTLIBRARIES = libvmtools.la -libvmtools_la_LIBADD = ../lib/lock/libLock.la \ - ../lib/backdoor/libBackdoor.la $(am__append_1) \ - ../lib/sslDirect/libSslDirect.la ../lib/pollGtk/libPollGtk.la \ - ../lib/poll/libPoll.la ../lib/dataMap/libDataMap.la \ - ../lib/hashMap/libHashMap.la ../lib/dict/libDict.la \ - ../lib/dynxdr/libDynxdr.la ../lib/err/libErr.la \ - ../lib/file/libFile.la ../lib/glibUtils/libGlibUtils.la \ - ../lib/guestApp/libGuestApp.la ../lib/guestRpc/libGuestRpc.la \ - ../lib/message/libMessage.la ../lib/netUtil/libNetUtil.la \ - ../lib/nicInfo/libNicInfo.la ../lib/panic/libPanic.la \ - ../lib/procMgr/libProcMgr.la \ - ../lib/rpcChannel/libRpcChannel.la ../lib/rpcIn/libRpcIn.la \ - ../lib/rpcOut/libRpcOut.la ../lib/rpcVmx/libRpcVmx.la \ - ../lib/string/libString.la ../lib/syncDriver/libSyncDriver.la \ - ../lib/system/libSystem.la ../lib/stubs/libStubsCS.la \ - ../lib/unicode/libUnicode.la ../lib/user/libUser.la \ - ../lib/vmCheck/libVmCheck.la ../lib/vmSignal/libVmSignal.la \ - ../lib/wiper/libWiper.la ../lib/misc/libMisc.la \ - @LIBVMTOOLS_LIBADD@ @GLIB2_LIBS@ @ICU_LIBS@ $(am__append_2) \ - $(am__append_3) - -# Recompile the stub for Log_* functions, but not Log() itself (see -DNO_LOG_STUB). -libvmtools_la_SOURCES = i18n.c monotonicTimer.c signalSource.c \ - vmtools.c vmtoolsConfig.c vmtoolsLog.c vmxLogger.c \ - guestSDKLog.c $(top_srcdir)/lib/stubs/stub-log.c -libvmtools_la_CPPFLAGS = -DVMTOOLS_USE_GLIB -DNO_LOG_STUB \ - -DVMTOOLS_DATA_DIR=\"$(datadir)/open-vm-tools\" \ - @GLIB2_CPPFLAGS@ $(am__empty) -# We require GCC, so we're fine passing compiler-specific flags. -# Needed for OS's that don't link shared libraries against libc by -#default, e.g. FreeBSD -libvmtools_la_LDFLAGS = -Wl,-z,defs -Wl,-lc -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libvmtools/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu libvmtools/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ - else :; fi; \ - done - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libvmtools.la: $(libvmtools_la_OBJECTS) $(libvmtools_la_DEPENDENCIES) - $(libvmtools_la_LINK) -rpath $(libdir) $(libvmtools_la_OBJECTS) $(libvmtools_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvmtools_la-guestSDKLog.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvmtools_la-i18n.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvmtools_la-monotonicTimer.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvmtools_la-signalSource.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvmtools_la-stub-log.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvmtools_la-vmtools.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvmtools_la-vmtoolsConfig.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvmtools_la-vmtoolsLog.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvmtools_la-vmxLogger.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libvmtools_la-i18n.lo: i18n.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmtools_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvmtools_la-i18n.lo -MD -MP -MF $(DEPDIR)/libvmtools_la-i18n.Tpo -c -o libvmtools_la-i18n.lo `test -f 'i18n.c' || echo '$(srcdir)/'`i18n.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvmtools_la-i18n.Tpo $(DEPDIR)/libvmtools_la-i18n.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='i18n.c' object='libvmtools_la-i18n.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmtools_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvmtools_la-i18n.lo `test -f 'i18n.c' || echo '$(srcdir)/'`i18n.c - -libvmtools_la-monotonicTimer.lo: monotonicTimer.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmtools_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvmtools_la-monotonicTimer.lo -MD -MP -MF $(DEPDIR)/libvmtools_la-monotonicTimer.Tpo -c -o libvmtools_la-monotonicTimer.lo `test -f 'monotonicTimer.c' || echo '$(srcdir)/'`monotonicTimer.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvmtools_la-monotonicTimer.Tpo $(DEPDIR)/libvmtools_la-monotonicTimer.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='monotonicTimer.c' object='libvmtools_la-monotonicTimer.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmtools_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvmtools_la-monotonicTimer.lo `test -f 'monotonicTimer.c' || echo '$(srcdir)/'`monotonicTimer.c - -libvmtools_la-signalSource.lo: signalSource.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmtools_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvmtools_la-signalSource.lo -MD -MP -MF $(DEPDIR)/libvmtools_la-signalSource.Tpo -c -o libvmtools_la-signalSource.lo `test -f 'signalSource.c' || echo '$(srcdir)/'`signalSource.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvmtools_la-signalSource.Tpo $(DEPDIR)/libvmtools_la-signalSource.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='signalSource.c' object='libvmtools_la-signalSource.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmtools_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvmtools_la-signalSource.lo `test -f 'signalSource.c' || echo '$(srcdir)/'`signalSource.c - -libvmtools_la-vmtools.lo: vmtools.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmtools_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvmtools_la-vmtools.lo -MD -MP -MF $(DEPDIR)/libvmtools_la-vmtools.Tpo -c -o libvmtools_la-vmtools.lo `test -f 'vmtools.c' || echo '$(srcdir)/'`vmtools.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvmtools_la-vmtools.Tpo $(DEPDIR)/libvmtools_la-vmtools.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='vmtools.c' object='libvmtools_la-vmtools.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmtools_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvmtools_la-vmtools.lo `test -f 'vmtools.c' || echo '$(srcdir)/'`vmtools.c - -libvmtools_la-vmtoolsConfig.lo: vmtoolsConfig.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmtools_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvmtools_la-vmtoolsConfig.lo -MD -MP -MF $(DEPDIR)/libvmtools_la-vmtoolsConfig.Tpo -c -o libvmtools_la-vmtoolsConfig.lo `test -f 'vmtoolsConfig.c' || echo '$(srcdir)/'`vmtoolsConfig.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvmtools_la-vmtoolsConfig.Tpo $(DEPDIR)/libvmtools_la-vmtoolsConfig.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='vmtoolsConfig.c' object='libvmtools_la-vmtoolsConfig.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmtools_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvmtools_la-vmtoolsConfig.lo `test -f 'vmtoolsConfig.c' || echo '$(srcdir)/'`vmtoolsConfig.c - -libvmtools_la-vmtoolsLog.lo: vmtoolsLog.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmtools_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvmtools_la-vmtoolsLog.lo -MD -MP -MF $(DEPDIR)/libvmtools_la-vmtoolsLog.Tpo -c -o libvmtools_la-vmtoolsLog.lo `test -f 'vmtoolsLog.c' || echo '$(srcdir)/'`vmtoolsLog.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvmtools_la-vmtoolsLog.Tpo $(DEPDIR)/libvmtools_la-vmtoolsLog.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='vmtoolsLog.c' object='libvmtools_la-vmtoolsLog.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmtools_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvmtools_la-vmtoolsLog.lo `test -f 'vmtoolsLog.c' || echo '$(srcdir)/'`vmtoolsLog.c - -libvmtools_la-vmxLogger.lo: vmxLogger.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmtools_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvmtools_la-vmxLogger.lo -MD -MP -MF $(DEPDIR)/libvmtools_la-vmxLogger.Tpo -c -o libvmtools_la-vmxLogger.lo `test -f 'vmxLogger.c' || echo '$(srcdir)/'`vmxLogger.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvmtools_la-vmxLogger.Tpo $(DEPDIR)/libvmtools_la-vmxLogger.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='vmxLogger.c' object='libvmtools_la-vmxLogger.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmtools_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvmtools_la-vmxLogger.lo `test -f 'vmxLogger.c' || echo '$(srcdir)/'`vmxLogger.c - -libvmtools_la-guestSDKLog.lo: guestSDKLog.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmtools_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvmtools_la-guestSDKLog.lo -MD -MP -MF $(DEPDIR)/libvmtools_la-guestSDKLog.Tpo -c -o libvmtools_la-guestSDKLog.lo `test -f 'guestSDKLog.c' || echo '$(srcdir)/'`guestSDKLog.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvmtools_la-guestSDKLog.Tpo $(DEPDIR)/libvmtools_la-guestSDKLog.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='guestSDKLog.c' object='libvmtools_la-guestSDKLog.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmtools_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvmtools_la-guestSDKLog.lo `test -f 'guestSDKLog.c' || echo '$(srcdir)/'`guestSDKLog.c - -libvmtools_la-stub-log.lo: $(top_srcdir)/lib/stubs/stub-log.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmtools_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvmtools_la-stub-log.lo -MD -MP -MF $(DEPDIR)/libvmtools_la-stub-log.Tpo -c -o libvmtools_la-stub-log.lo `test -f '$(top_srcdir)/lib/stubs/stub-log.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/stubs/stub-log.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvmtools_la-stub-log.Tpo $(DEPDIR)/libvmtools_la-stub-log.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/stubs/stub-log.c' object='libvmtools_la-stub-log.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmtools_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvmtools_la-stub-log.lo `test -f '$(top_srcdir)/lib/stubs/stub-log.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/stubs/stub-log.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: - for dir in "$(DESTDIR)$(libdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: install-libLTLIBRARIES - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-libLTLIBRARIES - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am \ - install-libLTLIBRARIES install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-libLTLIBRARIES - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/m4/libtool.m4 b/open-vm-tools/m4/libtool.m4 deleted file mode 100644 index ff86a5848..000000000 --- a/open-vm-tools/m4/libtool.m4 +++ /dev/null @@ -1,7252 +0,0 @@ -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -m4_define([_LT_COPYING], [dnl -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool 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 (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -]) - -# serial 54 LT_INIT - - -# LT_PREREQ(VERSION) -# ------------------ -# Complain and exit if this libtool version is less that VERSION. -m4_defun([LT_PREREQ], -[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, - [m4_default([$3], - [m4_fatal([Libtool version $1 or higher is required], - 63)])], - [$2])]) - - -# _LT_CHECK_BUILDDIR -# ------------------ -# Complain if the absolute build directory name contains unusual characters -m4_defun([_LT_CHECK_BUILDDIR], -[case `pwd` in - *\ * | *\ *) - AC_MSG_WARN([Libtool does not cope well with whitespace in \`pwd\`]) ;; -esac -]) - - -# LT_INIT([OPTIONS]) -# ------------------ -AC_DEFUN([LT_INIT], -[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT -AC_BEFORE([$0], [LT_LANG])dnl -AC_BEFORE([$0], [LT_OUTPUT])dnl -AC_BEFORE([$0], [LTDL_INIT])dnl -m4_require([_LT_CHECK_BUILDDIR])dnl - -dnl Autoconf doesn't catch unexpanded LT_ macros by default: -m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl -m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl -dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 -dnl unless we require an AC_DEFUNed macro: -AC_REQUIRE([LTOPTIONS_VERSION])dnl -AC_REQUIRE([LTSUGAR_VERSION])dnl -AC_REQUIRE([LTVERSION_VERSION])dnl -AC_REQUIRE([LTOBSOLETE_VERSION])dnl -m4_require([_LT_PROG_LTMAIN])dnl - -dnl Parse OPTIONS -_LT_SET_OPTIONS([$0], [$1]) - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -_LT_SETUP - -# Only expand once: -m4_define([LT_INIT]) -])# LT_INIT - -# Old names: -AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) -AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PROG_LIBTOOL], []) -dnl AC_DEFUN([AM_PROG_LIBTOOL], []) - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -m4_defun([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` -]) - - -# _LT_FILEUTILS_DEFAULTS -# ---------------------- -# It is okay to use these file commands and assume they have been set -# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. -m4_defun([_LT_FILEUTILS_DEFAULTS], -[: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} -])# _LT_FILEUTILS_DEFAULTS - - -# _LT_SETUP -# --------- -m4_defun([_LT_SETUP], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -_LT_DECL([], [host_alias], [0], [The host system])dnl -_LT_DECL([], [host], [0])dnl -_LT_DECL([], [host_os], [0])dnl -dnl -_LT_DECL([], [build_alias], [0], [The build system])dnl -_LT_DECL([], [build], [0])dnl -_LT_DECL([], [build_os], [0])dnl -dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -test -z "$LN_S" && LN_S="ln -s" -_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl -dnl -AC_REQUIRE([LT_CMD_MAX_LEN])dnl -AC_REQUIRE([AC_OBJEXT])dnl -_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl -AC_REQUIRE([AC_EXEEXT])dnl -_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl -dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -m4_require([_LT_CMD_RELOAD])dnl -m4_require([_LT_CHECK_MAGIC_METHOD])dnl -m4_require([_LT_CMD_OLD_ARCHIVE])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl - -_LT_CONFIG_LIBTOOL_INIT([ -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi -]) -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -_LT_CHECK_OBJDIR - -m4_require([_LT_TAG_COMPILER])dnl -_LT_PROG_ECHO_BACKSLASH - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([["`\\]]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -_LT_CC_BASENAME([$compiler]) - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - _LT_PATH_MAGIC - fi - ;; -esac - -# Use C for the default configuration in the libtool script -LT_SUPPORTED_TAG([CC]) -_LT_LANG_C_CONFIG -_LT_LANG_DEFAULT_CONFIG -_LT_CONFIG_COMMANDS -])# _LT_SETUP - - -# _LT_PROG_LTMAIN -# --------------- -# Note that this code is called both from `configure', and `config.status' -# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, -# `config.status' has no value for ac_aux_dir unless we are using Automake, -# so we pass a copy along to make sure it has a sensible value anyway. -m4_defun([_LT_PROG_LTMAIN], -[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl -_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) -ltmain="$ac_aux_dir/ltmain.sh" -])# _LT_PROG_LTMAIN - - -## ------------------------------------- ## -## Accumulate code for creating libtool. ## -## ------------------------------------- ## - -# So that we can recreate a full libtool script including additional -# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS -# in macros and then make a single call at the end using the `libtool' -# label. - - -# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) -# ---------------------------------------- -# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL_INIT], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_INIT], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_INIT]) - - -# _LT_CONFIG_LIBTOOL([COMMANDS]) -# ------------------------------ -# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) - - -# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) -# ----------------------------------------------------- -m4_defun([_LT_CONFIG_SAVE_COMMANDS], -[_LT_CONFIG_LIBTOOL([$1]) -_LT_CONFIG_LIBTOOL_INIT([$2]) -]) - - -# _LT_FORMAT_COMMENT([COMMENT]) -# ----------------------------- -# Add leading comment marks to the start of each line, and a trailing -# full-stop to the whole comment if one is not present already. -m4_define([_LT_FORMAT_COMMENT], -[m4_ifval([$1], [ -m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], - [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) -)]) - - - -## ------------------------ ## -## FIXME: Eliminate VARNAME ## -## ------------------------ ## - - -# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) -# ------------------------------------------------------------------- -# CONFIGNAME is the name given to the value in the libtool script. -# VARNAME is the (base) name used in the configure script. -# VALUE may be 0, 1 or 2 for a computed quote escaped value based on -# VARNAME. Any other value will be used directly. -m4_define([_LT_DECL], -[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], - [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], - [m4_ifval([$1], [$1], [$2])]) - lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) - m4_ifval([$4], - [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) - lt_dict_add_subkey([lt_decl_dict], [$2], - [tagged?], [m4_ifval([$5], [yes], [no])])]) -]) - - -# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) -# -------------------------------------------------------- -m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) - - -# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_tag_varnames], -[_lt_decl_filter([tagged?], [yes], $@)]) - - -# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) -# --------------------------------------------------------- -m4_define([_lt_decl_filter], -[m4_case([$#], - [0], [m4_fatal([$0: too few arguments: $#])], - [1], [m4_fatal([$0: too few arguments: $#: $1])], - [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], - [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], - [lt_dict_filter([lt_decl_dict], $@)])[]dnl -]) - - -# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) -# -------------------------------------------------- -m4_define([lt_decl_quote_varnames], -[_lt_decl_filter([value], [1], $@)]) - - -# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_dquote_varnames], -[_lt_decl_filter([value], [2], $@)]) - - -# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_varnames_tagged], -[_$0(m4_quote(m4_default([$1], [[, ]])), - m4_quote(m4_if([$2], [], - m4_quote(lt_decl_tag_varnames), - m4_quote(m4_shift($@)))), - m4_split(m4_normalize(m4_quote(_LT_TAGS))))]) -m4_define([_lt_decl_varnames_tagged], [lt_combine([$1], [$2], [_], $3)]) - - -# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_all_varnames], -[_$0(m4_quote(m4_default([$1], [[, ]])), - m4_if([$2], [], - m4_quote(lt_decl_varnames), - m4_quote(m4_shift($@))))[]dnl -]) -m4_define([_lt_decl_all_varnames], -[lt_join($@, lt_decl_varnames_tagged([$1], - lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl -]) - - -# _LT_CONFIG_STATUS_DECLARE([VARNAME]) -# ------------------------------------ -# Quote a variable value, and forward it to `config.status' so that its -# declaration there will have the same value as in `configure'. VARNAME -# must have a single quote delimited value for this to work. -m4_define([_LT_CONFIG_STATUS_DECLARE], -[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) - - -# _LT_CONFIG_STATUS_DECLARATIONS -# ------------------------------ -# We delimit libtool config variables with single quotes, so when -# we write them to config.status, we have to be sure to quote all -# embedded single quotes properly. In configure, this macro expands -# each variable declared with _LT_DECL (and _LT_TAGDECL) into: -# -# ='`$ECHO "X$" | $Xsed -e "$delay_single_quote_subst"`' -m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], -[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), - [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAGS -# ---------------- -# Output comment and list of tags supported by the script -m4_defun([_LT_LIBTOOL_TAGS], -[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl -available_tags="_LT_TAGS"dnl -]) - - -# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) -# ----------------------------------- -# Extract the dictionary values for VARNAME (optionally with TAG) and -# expand to a commented shell variable setting: -# -# # Some comment about what VAR is for. -# visible_name=$lt_internal_name -m4_define([_LT_LIBTOOL_DECLARE], -[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], - [description])))[]dnl -m4_pushdef([_libtool_name], - m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl -m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), - [0], [_libtool_name=[$]$1], - [1], [_libtool_name=$lt_[]$1], - [2], [_libtool_name=$lt_[]$1], - [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl -m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl -]) - - -# _LT_LIBTOOL_CONFIG_VARS -# ----------------------- -# Produce commented declarations of non-tagged libtool config variables -# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' -# script. Tagged libtool config variables (even for the LIBTOOL CONFIG -# section) are produced by _LT_LIBTOOL_TAG_VARS. -m4_defun([_LT_LIBTOOL_CONFIG_VARS], -[m4_foreach([_lt_var], - m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAG_VARS(TAG) -# ------------------------- -m4_define([_LT_LIBTOOL_TAG_VARS], -[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) - - -# _LT_TAGVAR(VARNAME, [TAGNAME]) -# ------------------------------ -m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) - - -# _LT_CONFIG_COMMANDS -# ------------------- -# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of -# variables for single and double quote escaping we saved from calls -# to _LT_DECL, we can put quote escaped variables declarations -# into `config.status', and then the shell code to quote escape them in -# for loops in `config.status'. Finally, any additional code accumulated -# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. -m4_defun([_LT_CONFIG_COMMANDS], -[AC_PROVIDE_IFELSE([LT_OUTPUT], - dnl If the libtool generation code has been placed in $CONFIG_LT, - dnl instead of duplicating it all over again into config.status, - dnl then we will have config.status run $CONFIG_LT later, so it - dnl needs to know what name is stored there: - [AC_CONFIG_COMMANDS([libtool], - [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], - dnl If the libtool generation code is destined for config.status, - dnl expand the accumulated commands and init code now: - [AC_CONFIG_COMMANDS([libtool], - [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) -])#_LT_CONFIG_COMMANDS - - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], -[ - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -_LT_CONFIG_STATUS_DECLARATIONS -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# Quote evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_quote_varnames); do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_dquote_varnames); do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Fix-up fallback echo if it was mangled by the above quoting rules. -case \$lt_ECHO in -*'\\\[$]0 --fallback-echo"')dnl " - lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` - ;; -esac - -_LT_OUTPUT_LIBTOOL_INIT -]) - - -# LT_OUTPUT -# --------- -# This macro allows early generation of the libtool script (before -# AC_OUTPUT is called), incase it is used in configure for compilation -# tests. -AC_DEFUN([LT_OUTPUT], -[: ${CONFIG_LT=./config.lt} -AC_MSG_NOTICE([creating $CONFIG_LT]) -cat >"$CONFIG_LT" <<_LTEOF -#! $SHELL -# Generated by $as_me. -# Run this file to recreate a libtool stub with the current configuration. - -lt_cl_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AS_SHELL_SANITIZE -_AS_PREPARE - -exec AS_MESSAGE_FD>&1 -exec AS_MESSAGE_LOG_FD>>config.log -{ - echo - AS_BOX([Running $as_me.]) -} >&AS_MESSAGE_LOG_FD - -lt_cl_help="\ -\`$as_me' creates a local libtool stub from the current configuration, -for use in further configure time tests before the real libtool is -generated. - -Usage: $[0] [[OPTIONS]] - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - -Report bugs to ." - -lt_cl_version="\ -m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl -m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) -configured by $[0], generated by m4_PACKAGE_STRING. - -Copyright (C) 2008 Free Software Foundation, Inc. -This config.lt script is free software; the Free Software Foundation -gives unlimited permision to copy, distribute and modify it." - -while test $[#] != 0 -do - case $[1] in - --version | --v* | -V ) - echo "$lt_cl_version"; exit 0 ;; - --help | --h* | -h ) - echo "$lt_cl_help"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --quiet | --q* | --silent | --s* | -q ) - lt_cl_silent=: ;; - - -*) AC_MSG_ERROR([unrecognized option: $[1] -Try \`$[0] --help' for more information.]) ;; - - *) AC_MSG_ERROR([unrecognized argument: $[1] -Try \`$[0] --help' for more information.]) ;; - esac - shift -done - -if $lt_cl_silent; then - exec AS_MESSAGE_FD>/dev/null -fi -_LTEOF - -cat >>"$CONFIG_LT" <<_LTEOF -_LT_OUTPUT_LIBTOOL_COMMANDS_INIT -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AC_MSG_NOTICE([creating $ofile]) -_LT_OUTPUT_LIBTOOL_COMMANDS -AS_EXIT(0) -_LTEOF -chmod +x "$CONFIG_LT" - -# configure is writing to config.log, but config.lt does its own redirection, -# appending to config.log, which fails on DOS, as config.log is still kept -# open by configure. Here we exec the FD to /dev/null, effectively closing -# config.log, so it can be properly (re)opened and appended to by config.lt. -if test "$no_create" != yes; then - lt_cl_success=: - test "$silent" = yes && - lt_config_lt_args="$lt_config_lt_args --quiet" - exec AS_MESSAGE_LOG_FD>/dev/null - $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false - exec AS_MESSAGE_LOG_FD>>config.log - $lt_cl_success || AS_EXIT(1) -fi -])# LT_OUTPUT - - -# _LT_CONFIG(TAG) -# --------------- -# If TAG is the built-in tag, create an initial libtool script with a -# default configuration from the untagged config vars. Otherwise add code -# to config.status for appending the configuration named by TAG from the -# matching tagged config vars. -m4_defun([_LT_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_CONFIG_SAVE_COMMANDS([ - m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl - m4_if(_LT_TAG, [C], [ - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me (GNU $PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -_LT_COPYING -_LT_LIBTOOL_TAGS - -# ### BEGIN LIBTOOL CONFIG -_LT_LIBTOOL_CONFIG_VARS -_LT_LIBTOOL_TAG_VARS -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - _LT_PROG_LTMAIN - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - _LT_PROG_XSI_SHELLFNS - - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" -], -[cat <<_LT_EOF >> "$ofile" - -dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded -dnl in a comment (ie after a #). -# ### BEGIN LIBTOOL TAG CONFIG: $1 -_LT_LIBTOOL_TAG_VARS(_LT_TAG) -# ### END LIBTOOL TAG CONFIG: $1 -_LT_EOF -])dnl /m4_if -], -[m4_if([$1], [], [ - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile'], []) -])dnl /_LT_CONFIG_SAVE_COMMANDS -])# _LT_CONFIG - - -# LT_SUPPORTED_TAG(TAG) -# --------------------- -# Trace this macro to discover what tags are supported by the libtool -# --tag option, using: -# autoconf --trace 'LT_SUPPORTED_TAG:$1' -AC_DEFUN([LT_SUPPORTED_TAG], []) - - -# C support is built-in for now -m4_define([_LT_LANG_C_enabled], []) -m4_define([_LT_TAGS], []) - - -# LT_LANG(LANG) -# ------------- -# Enable libtool support for the given language if not already enabled. -AC_DEFUN([LT_LANG], -[AC_BEFORE([$0], [LT_OUTPUT])dnl -m4_case([$1], - [C], [_LT_LANG(C)], - [C++], [_LT_LANG(CXX)], - [Java], [_LT_LANG(GCJ)], - [Fortran 77], [_LT_LANG(F77)], - [Fortran], [_LT_LANG(FC)], - [Windows Resource], [_LT_LANG(RC)], - [m4_ifdef([_LT_LANG_]$1[_CONFIG], - [_LT_LANG($1)], - [m4_fatal([$0: unsupported language: "$1"])])])dnl -])# LT_LANG - - -# _LT_LANG(LANGNAME) -# ------------------ -m4_defun([_LT_LANG], -[m4_ifdef([_LT_LANG_]$1[_enabled], [], - [LT_SUPPORTED_TAG([$1])dnl - m4_append([_LT_TAGS], [$1 ])dnl - m4_define([_LT_LANG_]$1[_enabled], [])dnl - _LT_LANG_$1_CONFIG($1)])dnl -])# _LT_LANG - - -# _LT_LANG_DEFAULT_CONFIG -# ----------------------- -m4_defun([_LT_LANG_DEFAULT_CONFIG], -[AC_PROVIDE_IFELSE([AC_PROG_CXX], - [LT_LANG(CXX)], - [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) - -AC_PROVIDE_IFELSE([AC_PROG_F77], - [LT_LANG(F77)], - [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) - -AC_PROVIDE_IFELSE([AC_PROG_FC], - [LT_LANG(FC)], - [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) - -dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal -dnl pulling things in needlessly. -AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([LT_PROG_GCJ], - [LT_LANG(GCJ)], - [m4_ifdef([AC_PROG_GCJ], - [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([A][M_PROG_GCJ], - [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([LT_PROG_GCJ], - [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) - -AC_PROVIDE_IFELSE([LT_PROG_RC], - [LT_LANG(RC)], - [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) -])# _LT_LANG_DEFAULT_CONFIG - -# Obsolete macros: -AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) -AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) -AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) -AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_CXX], []) -dnl AC_DEFUN([AC_LIBTOOL_F77], []) -dnl AC_DEFUN([AC_LIBTOOL_FC], []) -dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) - - -# _LT_TAG_COMPILER -# ---------------- -m4_defun([_LT_TAG_COMPILER], -[AC_REQUIRE([AC_PROG_CC])dnl - -_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl -_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl -_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl -_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC -])# _LT_TAG_COMPILER - - -# _LT_COMPILER_BOILERPLATE -# ------------------------ -# Check for compiler boilerplate output or warnings with -# the simple compiler test code. -m4_defun([_LT_COMPILER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* -])# _LT_COMPILER_BOILERPLATE - - -# _LT_LINKER_BOILERPLATE -# ---------------------- -# Check for linker boilerplate output or warnings with -# the simple link test code. -m4_defun([_LT_LINKER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* -])# _LT_LINKER_BOILERPLATE - -# _LT_REQUIRED_DARWIN_CHECKS -# ------------------------- -m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ - case $host_os in - rhapsody* | darwin*) - AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) - AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) - _LT_DECL([], [DSYMUTIL], [1], - [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) - _LT_DECL([], [NMEDIT], [1], - [Tool to change global to local symbols on Mac OS X]) - - AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], - [lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - echo "int foo(void){return 1;}" > conftest.c - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib ${wl}-single_module conftest.c - if test -f libconftest.dylib; then - lt_cv_apple_cc_single_mod=yes - rm -rf libconftest.dylib* - fi - rm conftest.c - fi]) - AC_CACHE_CHECK([for -exported_symbols_list linker flag], - [lt_cv_ld_exported_symbols_list], - [lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [lt_cv_ld_exported_symbols_list=yes], - [lt_cv_ld_exported_symbols_list=no]) - LDFLAGS="$save_LDFLAGS" - ]) - case $host_os in - rhapsody* | darwin1.[[012]]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[[012]]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac -]) - - -# _LT_DARWIN_LINKER_FEATURES -# -------------------------- -# Checks for linker and compiler features on darwin -m4_defun([_LT_DARWIN_LINKER_FEATURES], -[ - m4_require([_LT_REQUIRED_DARWIN_CHECKS]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_automatic, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(whole_archive_flag_spec, $1)='' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" - if test "$GCC" = "yes"; then - output_verbose_link_cmd=echo - _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - m4_if([$1], [CXX], -[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then - _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" - fi -],[]) - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi -]) - -# _LT_SYS_MODULE_PATH_AIX -# ----------------------- -# Links a minimal program and checks the executable -# for the system default hardcoded library path. In most cases, -# this is /usr/lib:/lib, but when the MPI compilers are used -# the location of the communication and MPI libs are included too. -# If we don't find anything, use the default library path according -# to the aix ld manual. -m4_defun([_LT_SYS_MODULE_PATH_AIX], -[m4_require([_LT_DECL_SED])dnl -AC_LINK_IFELSE(AC_LANG_PROGRAM,[ -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi],[]) -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -])# _LT_SYS_MODULE_PATH_AIX - - -# _LT_SHELL_INIT(ARG) -# ------------------- -m4_define([_LT_SHELL_INIT], -[ifdef([AC_DIVERSION_NOTICE], - [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], - [AC_DIVERT_PUSH(NOTICE)]) -$1 -AC_DIVERT_POP -])# _LT_SHELL_INIT - - -# _LT_PROG_ECHO_BACKSLASH -# ----------------------- -# Add some code to the start of the generated configure script which -# will find an echo command which doesn't interpret backslashes. -m4_defun([_LT_PROG_ECHO_BACKSLASH], -[_LT_SHELL_INIT([ -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$lt_ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` - ;; -esac - -ECHO=${lt_ECHO-echo} -if test "X[$]1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X[$]1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell. - exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} -fi - -if test "X[$]1" = X--fallback-echo; then - # used as fallback echo - shift - cat <<_LT_EOF -[$]* -_LT_EOF - exit 0 -fi - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test -z "$lt_ECHO"; then - if test "X${echo_test_string+set}" != Xset; then - # find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if { echo_test_string=`eval $cmd`; } 2>/dev/null && - { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null - then - break - fi - done - fi - - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : - else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$ECHO" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - ECHO='print -r' - elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} - else - # Try using printf. - ECHO='printf %s\n' - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - ECHO="$CONFIG_SHELL [$]0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$CONFIG_SHELL [$]0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do - if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "[$]0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} - else - # Oops. We lost completely, so just stick with echo. - ECHO=echo - fi - fi - fi - fi - fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -lt_ECHO=$ECHO -if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then - lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" -fi - -AC_SUBST(lt_ECHO) -]) -_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) -_LT_DECL([], [ECHO], [1], - [An echo program that does not interpret backslashes]) -])# _LT_PROG_ECHO_BACKSLASH - - -# _LT_ENABLE_LOCK -# --------------- -m4_defun([_LT_ENABLE_LOCK], -[AC_REQUIRE([AC_OBJEXT])dnl -AC_ARG_ENABLE([libtool-lock], - [AS_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '[#]line __oline__ "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_LANG_PUSH(C) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_POP]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" -])# _LT_ENABLE_LOCK - - -# _LT_CMD_OLD_ARCHIVE -# ------------------- -m4_defun([_LT_CMD_OLD_ARCHIVE], -[AC_CHECK_TOOL(AR, ar, false) -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -_LT_DECL([], [AR], [1], [The archiver]) -_LT_DECL([], [AR_FLAGS], [1]) - -AC_CHECK_TOOL(STRIP, strip, :) -test -z "$STRIP" && STRIP=: -_LT_DECL([], [STRIP], [1], [A symbol stripping program]) - -AC_CHECK_TOOL(RANLIB, ranlib, :) -test -z "$RANLIB" && RANLIB=: -_LT_DECL([], [RANLIB], [1], - [Commands used to install an old-style archive]) - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi -_LT_DECL([], [old_postinstall_cmds], [2]) -_LT_DECL([], [old_postuninstall_cmds], [2]) -_LT_TAGDECL([], [old_archive_cmds], [2], - [Commands used to build an old-style archive]) -])# _LT_CMD_OLD_ARCHIVE - - -# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------------------- -# Check whether the given compiler option works -AC_DEFUN([_LT_COMPILER_OPTION], -[AC_REQUIRE([AC_OBJEXT])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - fi - $RM conftest* -]) - -if test x"[$]$2" = xyes; then - m4_if([$5], , :, [$5]) -else - m4_if([$6], , :, [$6]) -fi -])# _LT_COMPILER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) - - -# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------- -# Check whether the given linker option works -AC_DEFUN([_LT_LINKER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $3" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&AS_MESSAGE_LOG_FD - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - else - $2=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" -]) - -if test x"[$]$2" = xyes; then - m4_if([$4], , :, [$4]) -else - m4_if([$5], , :, [$5]) -fi -])# _LT_LINKER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) - - -# LT_CMD_MAX_LEN -#--------------- -AC_DEFUN([LT_CMD_MAX_LEN], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -# find the maximum length of command line arguments -AC_MSG_CHECKING([the maximum length of command line arguments]) -AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ - = "XX$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac -]) -if test -n $lt_cv_sys_max_cmd_len ; then - AC_MSG_RESULT($lt_cv_sys_max_cmd_len) -else - AC_MSG_RESULT(none) -fi -max_cmd_len=$lt_cv_sys_max_cmd_len -_LT_DECL([], [max_cmd_len], [0], - [What is the maximum length of a command?]) -])# LT_CMD_MAX_LEN - -# Old name: -AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) - - -# _LT_HEADER_DLFCN -# ---------------- -m4_defun([_LT_HEADER_DLFCN], -[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl -])# _LT_HEADER_DLFCN - - -# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# ---------------------------------------------------------------- -m4_defun([_LT_TRY_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "$cross_compiling" = yes; then : - [$4] -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -[#line __oline__ "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -#ifdef __cplusplus -extern "C" void exit (int); -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - exit (status); -}] -_LT_EOF - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) $1 ;; - x$lt_dlneed_uscore) $2 ;; - x$lt_dlunknown|x*) $3 ;; - esac - else : - # compilation failed - $3 - fi -fi -rm -fr conftest* -])# _LT_TRY_DLOPEN_SELF - - -# LT_SYS_DLOPEN_SELF -# ------------------ -AC_DEFUN([LT_SYS_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ]) - ;; - - *) - AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen="shl_load"], - [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], - [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen="dlopen"], - [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], - [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], - [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) - ]) - ]) - ]) - ]) - ]) - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - AC_CACHE_CHECK([whether a program can dlopen itself], - lt_cv_dlopen_self, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, - lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) - ]) - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - AC_CACHE_CHECK([whether a statically linked program can dlopen itself], - lt_cv_dlopen_self_static, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, - lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) - ]) - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi -_LT_DECL([dlopen_support], [enable_dlopen], [0], - [Whether dlopen is supported]) -_LT_DECL([dlopen_self], [enable_dlopen_self], [0], - [Whether dlopen of programs is supported]) -_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], - [Whether dlopen of statically linked programs is supported]) -])# LT_SYS_DLOPEN_SELF - -# Old name: -AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) - - -# _LT_COMPILER_C_O([TAGNAME]) -# --------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler. -# This macro does not hard code the compiler like AC_PROG_CC_C_O. -m4_defun([_LT_COMPILER_C_O], -[AC_REQUIRE([AC_OBJEXT])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - fi - fi - chmod u+w . 2>&AS_MESSAGE_LOG_FD - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* -]) -_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], - [Does compiler simultaneously support -c and -o options?]) -])# _LT_COMPILER_C_O - - -# _LT_COMPILER_FILE_LOCKS([TAGNAME]) -# ---------------------------------- -# Check to see if we can do hard links to lock some files if needed -m4_defun([_LT_COMPILER_FILE_LOCKS], -[m4_require([_LT_ENABLE_LOCK])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_COMPILER_C_O([$1]) - -hard_links="nottested" -if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - AC_MSG_CHECKING([if we can lock with hard links]) - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - AC_MSG_RESULT([$hard_links]) - if test "$hard_links" = no; then - AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) - need_locks=warn - fi -else - need_locks=no -fi -_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) -])# _LT_COMPILER_FILE_LOCKS - - -# _LT_CHECK_OBJDIR -# ---------------- -m4_defun([_LT_CHECK_OBJDIR], -[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], -[rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null]) -objdir=$lt_cv_objdir -_LT_DECL([], [objdir], [0], - [The name of the directory that contains temporary libtool files])dnl -m4_pattern_allow([LT_OBJDIR])dnl -AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", - [Define to the sub-directory in which libtool stores uninstalled libraries.]) -])# _LT_CHECK_OBJDIR - - -# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) -# -------------------------------------- -# Check hardcoding attributes. -m4_defun([_LT_LINKER_HARDCODE_LIBPATH], -[AC_MSG_CHECKING([how to hardcode library paths into programs]) -_LT_TAGVAR(hardcode_action, $1)= -if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || - test -n "$_LT_TAGVAR(runpath_var, $1)" || - test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && - test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then - # Linking always hardcodes the temporary library directory. - _LT_TAGVAR(hardcode_action, $1)=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_TAGVAR(hardcode_action, $1)=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - _LT_TAGVAR(hardcode_action, $1)=unsupported -fi -AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) - -if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || - test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi -_LT_TAGDECL([], [hardcode_action], [0], - [How to hardcode a shared library path into an executable]) -])# _LT_LINKER_HARDCODE_LIBPATH - - -# _LT_CMD_STRIPLIB -# ---------------- -m4_defun([_LT_CMD_STRIPLIB], -[m4_require([_LT_DECL_EGREP]) -striplib= -old_striplib= -AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac -fi -_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) -_LT_DECL([], [striplib], [1]) -])# _LT_CMD_STRIPLIB - - -# _LT_SYS_DYNAMIC_LINKER([TAG]) -# ----------------------------- -# PORTME Fill in your ld.so characteristics -m4_defun([_LT_SYS_DYNAMIC_LINKER], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_MSG_CHECKING([dynamic linker characteristics]) -m4_if([$1], - [], [ -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[[lt_foo]]++; } - if (lt_freq[[lt_foo]] == 1) { print lt_foo; } -}'` - sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi]) -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[[4-9]]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[[01]] | aix4.[[01]].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - if test "$host_cpu" = m68k; then - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - else - dynamic_linker=no - fi - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[[45]]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[[123]]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[[01]]* | freebsdelf3.[[01]]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ - freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[[3-9]]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ - LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], - [shlibpath_overrides_runpath=yes])]) - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[[89]] | openbsd2.[[89]].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux - need_lib_prefix=no - need_version=no - library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -AC_MSG_RESULT([$dynamic_linker]) -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - -_LT_DECL([], [variables_saved_for_relink], [1], - [Variables whose values should be saved in libtool wrapper scripts and - restored at link time]) -_LT_DECL([], [need_lib_prefix], [0], - [Do we need the "lib" prefix for modules?]) -_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) -_LT_DECL([], [version_type], [0], [Library versioning type]) -_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) -_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) -_LT_DECL([], [shlibpath_overrides_runpath], [0], - [Is shlibpath searched before the hard-coded library search path?]) -_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) -_LT_DECL([], [library_names_spec], [1], - [[List of archive names. First name is the real one, the rest are links. - The last name is the one that the linker finds with -lNAME]]) -_LT_DECL([], [soname_spec], [1], - [[The coded name of the library, if different from the real name]]) -_LT_DECL([], [postinstall_cmds], [2], - [Command to use after installation of a shared archive]) -_LT_DECL([], [postuninstall_cmds], [2], - [Command to use after uninstallation of a shared archive]) -_LT_DECL([], [finish_cmds], [2], - [Commands used to finish a libtool library installation in a directory]) -_LT_DECL([], [finish_eval], [1], - [[As "finish_cmds", except a single script fragment to be evaled but - not shown]]) -_LT_DECL([], [hardcode_into_libs], [0], - [Whether we should hardcode library paths into libraries]) -_LT_DECL([], [sys_lib_search_path_spec], [2], - [Compile-time system search path for libraries]) -_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], - [Run-time system search path for libraries]) -])# _LT_SYS_DYNAMIC_LINKER - - -# _LT_PATH_TOOL_PREFIX(TOOL) -# -------------------------- -# find a file program which can recognize shared library -AC_DEFUN([_LT_PATH_TOOL_PREFIX], -[m4_require([_LT_DECL_EGREP])dnl -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, -[case $MAGIC_CMD in -[[\\/*] | ?:[\\/]*]) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="m4_if([$2], , $PATH, [$2])" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$1; then - lt_cv_path_MAGIC_CMD="$ac_dir/$1" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac]) -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - AC_MSG_RESULT($MAGIC_CMD) -else - AC_MSG_RESULT(no) -fi -_LT_DECL([], [MAGIC_CMD], [0], - [Used to examine libraries when file_magic_cmd begins with "file"])dnl -])# _LT_PATH_TOOL_PREFIX - -# Old name: -AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) - - -# _LT_PATH_MAGIC -# -------------- -# find a file program which can recognize a shared library -m4_defun([_LT_PATH_MAGIC], -[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) - else - MAGIC_CMD=: - fi -fi -])# _LT_PATH_MAGIC - - -# LT_PATH_LD -# ---------- -# find the pathname to the GNU or non-GNU linker -AC_DEFUN([LT_PATH_LD], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl - -AC_ARG_WITH([gnu-ld], - [AS_HELP_STRING([--with-gnu-ld], - [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test "$withval" = no || with_gnu_ld=yes], - [with_gnu_ld=no])dnl - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by $CC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]]* | ?:[[\\/]]*) - re_direlt='/[[^/]][[^/]]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(lt_cv_path_LD, -[if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[[3-9]]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac -]) -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - -_LT_DECL([], [deplibs_check_method], [1], - [Method to check whether dependent libraries are shared objects]) -_LT_DECL([], [file_magic_cmd], [1], - [Command to use when deplibs_check_method == "file_magic"]) -])# _LT_CHECK_MAGIC_METHOD - - -# LT_PATH_NM -# ---------- -# find the pathname to a BSD- or MS-compatible name lister -AC_DEFUN([LT_PATH_NM], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_OBJEXT])dnl -AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi]) -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) - AC_SUBST([DUMPBIN]) - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm -AC_SUBST([NM]) -_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl - -AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], - [lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) - cat conftest.out >&AS_MESSAGE_LOG_FD - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest*]) -])# LT_PATH_NM - -# Old names: -AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) -AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_PROG_NM], []) -dnl AC_DEFUN([AC_PROG_NM], []) - - -# LT_LIB_M -# -------- -# check for math library -AC_DEFUN([LT_LIB_M], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case $host in -*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) - # These system don't have libm, or don't need it - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") - AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, cos, LIBM="-lm") - ;; -esac -AC_SUBST([LIBM]) -])# LT_LIB_M - -# Old name: -AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_CHECK_LIBM], []) - - -# _LT_COMPILER_NO_RTTI([TAGNAME]) -# ------------------------------- -m4_defun([_LT_COMPILER_NO_RTTI], -[m4_require([_LT_TAG_COMPILER])dnl - -_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - -if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - - _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], - lt_cv_prog_compiler_rtti_exceptions, - [-fno-rtti -fno-exceptions], [], - [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) -fi -_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], - [Compiler flag to turn off builtin functions]) -])# _LT_COMPILER_NO_RTTI - - -# _LT_CMD_GLOBAL_SYMBOLS -# ---------------------- -m4_defun([_LT_CMD_GLOBAL_SYMBOLS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_OBJEXT])dnl -AC_REQUIRE([LT_PATH_NM])dnl -AC_REQUIRE([LT_PATH_LD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_TAG_COMPILER])dnl - -# Check for command to grab the raw symbol name followed by C symbol from nm. -AC_MSG_CHECKING([command to parse $NM output from $compiler object]) -AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], -[ -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[[BCDEGRST]]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[[BCDT]]' - ;; -cygwin* | mingw* | pw32*) - symcode='[[ABCDGISTW]]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[[ABCDEGRST]]' - fi - ;; -irix* | nonstopux*) - symcode='[[BCDEGRST]]' - ;; -osf*) - symcode='[[BCDEGQRST]]' - ;; -solaris*) - symcode='[[BDRT]]' - ;; -sco3.2v5*) - symcode='[[DT]]' - ;; -sysv4.2uw2*) - symcode='[[DT]]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[[ABDT]]' - ;; -sysv4) - symcode='[[DFNSTU]]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[[ABCDGIRSTW]]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK ['"\ -" {last_section=section; section=\$ 3};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx]" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if AC_TRY_EVAL(ac_compile); then - # Now try to grab the symbols. - nlist=conftest.nm - if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[[]] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" - else - echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD - fi - else - echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done -]) -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - AC_MSG_RESULT(failed) -else - AC_MSG_RESULT(ok) -fi - -_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], - [Take the output of nm and produce a listing of raw symbols and C names]) -_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], - [Transform the output of nm in a proper C declaration]) -_LT_DECL([global_symbol_to_c_name_address], - [lt_cv_sys_global_symbol_to_c_name_address], [1], - [Transform the output of nm in a C name address pair]) -_LT_DECL([global_symbol_to_c_name_address_lib_prefix], - [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], - [Transform the output of nm in a C name address pair when lib prefix is needed]) -]) # _LT_CMD_GLOBAL_SYMBOLS - - -# _LT_COMPILER_PIC([TAGNAME]) -# --------------------------- -m4_defun([_LT_COMPILER_PIC], -[m4_require([_LT_TAG_COMPILER])dnl -_LT_TAGVAR(lt_prog_compiler_wl, $1)= -_LT_TAGVAR(lt_prog_compiler_pic, $1)= -_LT_TAGVAR(lt_prog_compiler_static, $1)= - -AC_MSG_CHECKING([for $compiler option to produce PIC]) -m4_if([$1], [CXX], [ - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - amigaos*) - if test "$host_cpu" = m68k; then - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - fi - ;; - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - case $host_os in - aix[[4-9]]*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - fi - ;; - aCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - icpc* | ecpc* ) - # Intel C++ - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xlc* | xlC*) - # IBM XL 8.0 on PPC - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd*) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - cxx*) - # Digital/Compaq C++ - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - lcc*) - # Lucid - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -], -[ - if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - if test "$host_cpu" = m68k; then - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - fi - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - hpux9* | hpux10* | hpux11*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC (with -KPIC) is the default. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - icc* | ecc* | ifort*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - ccc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All Alpha code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xl*) - # IBM XL C 8.0/Fortran 10.1 on PPC - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='' - ;; - esac - ;; - esac - ;; - - newsos6) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All OSF/1 code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - rdos*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - solaris*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; - esac - ;; - - sunos4*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - unicos*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - - uts4*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -]) -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" - ;; -esac -AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) -_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], - [How to pass a linker flag through the compiler]) - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then - _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], - [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], - [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], - [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in - "" | " "*) ;; - *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; - esac], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) -fi -_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], - [Additional compiler flags for building library objects]) - -# -# Check to make sure the static flag actually works. -# -wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" -_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), - $lt_tmp_static_flag, - [], - [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) -_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], - [Compiler flag to prevent dynamic linking]) -])# _LT_COMPILER_PIC - - -# _LT_LINKER_SHLIBS([TAGNAME]) -# ---------------------------- -# See if the linker supports building shared libraries. -m4_defun([_LT_LINKER_SHLIBS], -[AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -m4_if([$1], [CXX], [ - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - case $host_os in - aix[[4-9]]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" - ;; - cygwin* | mingw*) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' - ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] -], [ - runpath_var= - _LT_TAGVAR(allow_undefined_flag, $1)= - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(archive_cmds, $1)= - _LT_TAGVAR(archive_expsym_cmds, $1)= - _LT_TAGVAR(compiler_needs_object, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(hardcode_automatic, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= - _LT_TAGVAR(hardcode_libdir_separator, $1)= - _LT_TAGVAR(hardcode_minus_L, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(inherit_rpath, $1)=no - _LT_TAGVAR(link_all_deplibs, $1)=unknown - _LT_TAGVAR(module_cmds, $1)= - _LT_TAGVAR(module_expsym_cmds, $1)= - _LT_TAGVAR(old_archive_from_new_cmds, $1)= - _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= - _LT_TAGVAR(thread_safe_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - _LT_TAGVAR(include_expsyms, $1)= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. -dnl Note also adjust exclude_expsyms for C++ above. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - _LT_TAGVAR(ld_shlibs, $1)=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[[3-9]]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -_LT_EOF - fi - ;; - - amigaos*) - if test "$host_cpu" = m68k; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - fi - - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - cygwin* | mingw* | pw32*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag= - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - xlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' - _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - sunos4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - - if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then - runpath_var= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - _LT_TAGVAR(hardcode_direct, $1)=unsupported - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - if test "$host_cpu" = m68k; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - fi - # see comment about different semantics on the GNU ld section - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - bsdi[[45]]*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic - ;; - - cygwin* | mingw* | pw32*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' - _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - freebsd1*) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - hpux9*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - AC_LINK_IFELSE(int foo(void) {}, - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - ) - LDFLAGS="$save_LDFLAGS" - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - newsos6) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac - fi - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - os2*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - solaris*) - _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - fi - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4) - case $host_vendor in - sni) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' - _LT_TAGVAR(hardcode_direct, $1)=no - ;; - motorola) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4.3*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - _LT_TAGVAR(ld_shlibs, $1)=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' - ;; - esac - fi - fi -]) -AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) -test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - -_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld - -_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl -_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl -_LT_DECL([], [extract_expsyms_cmds], [2], - [The commands to extract the exported symbol list from a shared archive]) - -# -# Do we need to explicitly link libc? -# -case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in -x|xyes) - # Assume -lc should be added - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $_LT_TAGVAR(archive_cmds, $1) in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - AC_MSG_CHECKING([whether -lc should be explicitly linked in]) - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) - pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) - _LT_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) - then - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - else - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) - ;; - esac - fi - ;; -esac - -_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], - [Whether or not to add -lc for building shared libraries]) -_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], - [enable_shared_with_static_runtimes], [0], - [Whether or not to disallow shared libs when runtime libs are static]) -_LT_TAGDECL([], [export_dynamic_flag_spec], [1], - [Compiler flag to allow reflexive dlopens]) -_LT_TAGDECL([], [whole_archive_flag_spec], [1], - [Compiler flag to generate shared objects directly from archives]) -_LT_TAGDECL([], [compiler_needs_object], [1], - [Whether the compiler copes with passing no objects directly]) -_LT_TAGDECL([], [old_archive_from_new_cmds], [2], - [Create an old-style archive from a shared archive]) -_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], - [Create a temporary old-style archive to link instead of a shared archive]) -_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) -_LT_TAGDECL([], [archive_expsym_cmds], [2]) -_LT_TAGDECL([], [module_cmds], [2], - [Commands used to build a loadable module if different from building - a shared archive.]) -_LT_TAGDECL([], [module_expsym_cmds], [2]) -_LT_TAGDECL([], [with_gnu_ld], [1], - [Whether we are building with GNU ld or not]) -_LT_TAGDECL([], [allow_undefined_flag], [1], - [Flag that allows shared libraries with undefined symbols to be built]) -_LT_TAGDECL([], [no_undefined_flag], [1], - [Flag that enforces no undefined symbols]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], - [Flag to hardcode $libdir into a binary during linking. - This must work even if $libdir does not exist]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], - [[If ld is used when linking, flag to hardcode $libdir into a binary - during linking. This must work even if $libdir does not exist]]) -_LT_TAGDECL([], [hardcode_libdir_separator], [1], - [Whether we need a single "-rpath" flag with a separated argument]) -_LT_TAGDECL([], [hardcode_direct], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary]) -_LT_TAGDECL([], [hardcode_direct_absolute], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary and the resulting library dependency is - "absolute", i.e impossible to change by setting ${shlibpath_var} if the - library is relocated]) -_LT_TAGDECL([], [hardcode_minus_L], [0], - [Set to "yes" if using the -LDIR flag during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_shlibpath_var], [0], - [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_automatic], [0], - [Set to "yes" if building a shared library automatically hardcodes DIR - into the library and all subsequent libraries and executables linked - against it]) -_LT_TAGDECL([], [inherit_rpath], [0], - [Set to yes if linker adds runtime paths of dependent libraries - to runtime path list]) -_LT_TAGDECL([], [link_all_deplibs], [0], - [Whether libtool must link a program against all its dependency libraries]) -_LT_TAGDECL([], [fix_srcfile_path], [1], - [Fix the shell variable $srcfile for the compiler]) -_LT_TAGDECL([], [always_export_symbols], [0], - [Set to "yes" if exported symbols are required]) -_LT_TAGDECL([], [export_symbols_cmds], [2], - [The commands to list exported symbols]) -_LT_TAGDECL([], [exclude_expsyms], [1], - [Symbols that should not be listed in the preloaded symbols]) -_LT_TAGDECL([], [include_expsyms], [1], - [Symbols that must always be exported]) -_LT_TAGDECL([], [prelink_cmds], [2], - [Commands necessary for linking programs (against libraries) with templates]) -_LT_TAGDECL([], [file_list_spec], [1], - [Specify filename containing input files]) -dnl FIXME: Not yet implemented -dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], -dnl [Compiler flag to generate thread safe objects]) -])# _LT_LINKER_SHLIBS - - -# _LT_LANG_C_CONFIG([TAG]) -# ------------------------ -# Ensure that the configuration variables for a C compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_C_CONFIG], -[m4_require([_LT_DECL_EGREP])dnl -lt_save_CC="$CC" -AC_LANG_PUSH(C) - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - -_LT_TAG_COMPILER -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - LT_SYS_DLOPEN_SELF - _LT_CMD_STRIPLIB - - # Report which library types will actually be built - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_CONFIG($1) -fi -AC_LANG_POP -CC="$lt_save_CC" -])# _LT_LANG_C_CONFIG - - -# _LT_PROG_CXX -# ------------ -# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ -# compiler, we have our own version here. -m4_defun([_LT_PROG_CXX], -[ -pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) -AC_PROG_CXX -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - AC_PROG_CXXCPP -else - _lt_caught_CXX_error=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_CXX - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_CXX], []) - - -# _LT_LANG_CXX_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a C++ compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_CXX_CONFIG], -[AC_REQUIRE([_LT_PROG_CXX])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl - -AC_LANG_PUSH(C++) -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(compiler_needs_object, $1)=no -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_caught_CXX_error" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - $as_unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - else - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - fi - - if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - LT_PATH_LD - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - - else - GXX=no - with_gnu_ld=no - wlarc= - fi - - # PORTME: fill in a description of your system's C++ link characteristics - AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) - _LT_TAGVAR(ld_shlibs, $1)=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GXX" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty - # executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared - # libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - cygwin* | mingw* | pw32*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - freebsd[[12]]*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - freebsd-elf*) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - gnu*) - ;; - - hpux9*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' - fi - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) - _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' - _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ - $RANLIB $oldlib' - _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - *) # Version 6 will use weak symbols - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - xl*) - # IBM XL 8.0 on PPC, with GNU ld - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - - lynxos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - m88k*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - - *nto* | *qnx*) - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - openbsd2*) - # C++ shared libraries are fairly broken - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd=echo - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - case $host in - osf3*) - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - ;; - *) - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ - $RM $lib.exp' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - case $host in - osf3*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - psos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - fi - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - vxworks*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) - test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - - _LT_TAGVAR(GCC, $1)="$GXX" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - CC=$lt_save_CC - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test "$_lt_caught_CXX_error" != yes - -AC_LANG_POP -])# _LT_LANG_CXX_CONFIG - - -# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) -# --------------------------------- -# Figure out "hidden" library dependencies from verbose -# compiler output when linking a shared library. -# Parse the compiler output and extract the necessary -# objects, libraries and library flags. -m4_defun([_LT_SYS_HIDDEN_LIBDEPS], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -# Dependencies to place before and after the object being linked: -_LT_TAGVAR(predep_objects, $1)= -_LT_TAGVAR(postdep_objects, $1)= -_LT_TAGVAR(predeps, $1)= -_LT_TAGVAR(postdeps, $1)= -_LT_TAGVAR(compiler_lib_search_path, $1)= - -dnl we can't use the lt_simple_compile_test_code here, -dnl because it contains code intended for an executable, -dnl not a library. It's possible we should let each -dnl tag define a new lt_????_link_test_code variable, -dnl but it's only used here... -m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF -int a; -void foo (void) { a = 0; } -_LT_EOF -], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_LT_EOF -], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer*4 a - a=0 - return - end -_LT_EOF -], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer a - a=0 - return - end -_LT_EOF -], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF -public class foo { - private int a; - public void bar (void) { - a = 0; - } -}; -_LT_EOF -]) -dnl Parse the compiler output and extract the necessary -dnl objects, libraries and library flags. -if AC_TRY_EVAL(ac_compile); then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case $p in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" || - test $p = "-R"; then - prev=$p - continue - else - prev= - fi - - if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then - _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" - else - _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$_LT_TAGVAR(postdeps, $1)"; then - _LT_TAGVAR(postdeps, $1)="${prev}${p}" - else - _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" - fi - fi - ;; - - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test "$pre_test_object_deps_done" = no; then - if test -z "$_LT_TAGVAR(predep_objects, $1)"; then - _LT_TAGVAR(predep_objects, $1)="$p" - else - _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" - fi - else - if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then - _LT_TAGVAR(postdep_objects, $1)="$p" - else - _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling $1 test program" -fi - -$RM -f confest.$objext - -# PORTME: override above test on systems where it is broken -m4_if([$1], [CXX], -[case $host_os in -interix[[3-9]]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - _LT_TAGVAR(predep_objects,$1)= - _LT_TAGVAR(postdep_objects,$1)= - _LT_TAGVAR(postdeps,$1)= - ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac -]) - -case " $_LT_TAGVAR(postdeps, $1) " in -*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; -esac - _LT_TAGVAR(compiler_lib_search_dirs, $1)= -if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then - _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` -fi -_LT_TAGDECL([], [compiler_lib_search_dirs], [1], - [The directories searched by this compiler when creating a shared library]) -_LT_TAGDECL([], [predep_objects], [1], - [Dependencies to place before and after the objects being linked to - create a shared library]) -_LT_TAGDECL([], [postdep_objects], [1]) -_LT_TAGDECL([], [predeps], [1]) -_LT_TAGDECL([], [postdeps], [1]) -_LT_TAGDECL([], [compiler_lib_search_path], [1], - [The library search path used internally by the compiler when linking - a shared library]) -])# _LT_SYS_HIDDEN_LIBDEPS - - -# _LT_PROG_F77 -# ------------ -# Since AC_PROG_F77 is broken, in that it returns the empty string -# if there is no fortran compiler, we have our own version here. -m4_defun([_LT_PROG_F77], -[ -pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) -AC_PROG_F77 -if test -z "$F77" || test "X$F77" = "Xno"; then - _lt_disable_F77=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_F77 - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_F77], []) - - -# _LT_LANG_F77_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a Fortran 77 compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_F77_CONFIG], -[AC_REQUIRE([_LT_PROG_F77])dnl -AC_LANG_PUSH(Fortran 77) - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the F77 compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_F77" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - CC=${F77-"f77"} - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - GCC=$G77 - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$G77" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC="$lt_save_CC" -fi # test "$_lt_disable_F77" != yes - -AC_LANG_POP -])# _LT_LANG_F77_CONFIG - - -# _LT_PROG_FC -# ----------- -# Since AC_PROG_FC is broken, in that it returns the empty string -# if there is no fortran compiler, we have our own version here. -m4_defun([_LT_PROG_FC], -[ -pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) -AC_PROG_FC -if test -z "$FC" || test "X$FC" = "Xno"; then - _lt_disable_FC=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_FC - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_FC], []) - - -# _LT_LANG_FC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for a Fortran compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_FC_CONFIG], -[AC_REQUIRE([_LT_PROG_FC])dnl -AC_LANG_PUSH(Fortran) - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for fc test sources. -ac_ext=${ac_fc_srcext-f} - -# Object file extension for compiled fc test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the FC compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_FC" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - CC=${FC-"f95"} - compiler=$CC - GCC=$ac_cv_fc_compiler_gnu - - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC="$lt_save_CC" -fi # test "$_lt_disable_FC" != yes - -AC_LANG_POP -])# _LT_LANG_FC_CONFIG - - -# _LT_LANG_GCJ_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for the GNU Java Compiler compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_GCJ_CONFIG], -[AC_REQUIRE([LT_PROG_GCJ])dnl -AC_LANG_SAVE - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" - -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -lt_save_GCC=$GCC -GCC=yes -CC=${GCJ-"gcj"} -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -_LT_TAGVAR(archive_cmds_need_lc, $1)=no - -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) -fi - -AC_LANG_RESTORE - -GCC=$lt_save_GCC -CC="$lt_save_CC" -])# _LT_LANG_GCJ_CONFIG - - -# _LT_LANG_RC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for the Windows resource compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_RC_CONFIG], -[AC_REQUIRE([LT_PROG_RC])dnl -AC_LANG_SAVE - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' - -# Code to be used in simple link tests -lt_simple_link_test_code="$lt_simple_compile_test_code" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -lt_save_GCC=$GCC -GCC= -CC=${RC-"windres"} -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) -_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - -if test -n "$compiler"; then - : - _LT_CONFIG($1) -fi - -GCC=$lt_save_GCC -AC_LANG_RESTORE -CC="$lt_save_CC" -])# _LT_LANG_RC_CONFIG - - -# LT_PROG_GCJ -# ----------- -AC_DEFUN([LT_PROG_GCJ], -[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], - [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], - [AC_CHECK_TOOL(GCJ, gcj,) - test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS)])])[]dnl -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_GCJ], []) - - -# LT_PROG_RC -# ---------- -AC_DEFUN([LT_PROG_RC], -[AC_CHECK_TOOL(RC, windres,) -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_RC], []) - - -# _LT_DECL_EGREP -# -------------- -# If we don't have a new enough Autoconf to choose the best grep -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_EGREP], -[AC_REQUIRE([AC_PROG_EGREP])dnl -AC_REQUIRE([AC_PROG_FGREP])dnl -test -z "$GREP" && GREP=grep -_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) -_LT_DECL([], [EGREP], [1], [An ERE matcher]) -_LT_DECL([], [FGREP], [1], [A literal string matcher]) -dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too -AC_SUBST([GREP]) -]) - - -# _LT_DECL_SED -# ------------ -# Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. -m4_defun([_LT_DECL_SED], -[AC_PROG_SED -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" -_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) -_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], - [Sed that helps us avoid accidentally triggering echo(1) options like -n]) -])# _LT_DECL_SED - -m4_ifndef([AC_PROG_SED], [ -############################################################ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_SED. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # -############################################################ - -m4_defun([AC_PROG_SED], -[AC_MSG_CHECKING([for a sed that does not truncate output]) -AC_CACHE_VAL(lt_cv_path_SED, -[# Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -IFS=$as_save_IFS -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break - fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done -]) -SED=$lt_cv_path_SED -AC_SUBST([SED]) -AC_MSG_RESULT([$SED]) -])#AC_PROG_SED -])#m4_ifndef - -# Old name: -AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_SED], []) - - -# _LT_CHECK_SHELL_FEATURES -# ------------------------ -# Find out whether the shell is Bourne or XSI compatible, -# or has some other useful features. -m4_defun([_LT_CHECK_SHELL_FEATURES], -[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, ) >/dev/null 2>&1 \ - && xsi_shell=yes -AC_MSG_RESULT([$xsi_shell]) -_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) - -AC_MSG_CHECKING([whether the shell understands "+="]) -lt_shell_append=no -( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -AC_MSG_RESULT([$lt_shell_append]) -_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi -_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac -_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl -_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl -])# _LT_CHECK_SHELL_FEATURES - - -# _LT_PROG_XSI_SHELLFNS -# --------------------- -# Bourne and XSI compatible variants of some useful shell functions. -m4_defun([_LT_PROG_XSI_SHELLFNS], -[case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[[^=]]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` -} -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$[1]+=\$[2]" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$[1]=\$$[1]\$[2]" -} -_LT_EOF - ;; - esac -]) diff --git a/open-vm-tools/m4/ltoptions.m4 b/open-vm-tools/m4/ltoptions.m4 deleted file mode 100644 index 11a76ae03..000000000 --- a/open-vm-tools/m4/ltoptions.m4 +++ /dev/null @@ -1,367 +0,0 @@ -# Helper functions for option handling. -*- Autoconf -*- -# -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 4 ltoptions.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) - - -# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) -# ------------------------------------------ -m4_define([_LT_MANGLE_OPTION], -[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) - - -# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) -# --------------------------------------- -# Set option OPTION-NAME for macro MACRO-NAME, and if there is a -# matching handler defined, dispatch to it. Other OPTION-NAMEs are -# saved as a flag. -m4_define([_LT_SET_OPTION], -[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl -m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), - _LT_MANGLE_DEFUN([$1], [$2]), - [m4_warning([Unknown $1 option `$2'])])[]dnl -]) - - -# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) -# ------------------------------------------------------------ -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -m4_define([_LT_IF_OPTION], -[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) - - -# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) -# ------------------------------------------------------- -# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME -# are set. -m4_define([_LT_UNLESS_OPTIONS], -[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), - [m4_define([$0_found])])])[]dnl -m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 -])[]dnl -]) - - -# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) -# ---------------------------------------- -# OPTION-LIST is a space-separated list of Libtool options associated -# with MACRO-NAME. If any OPTION has a matching handler declared with -# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about -# the unknown option and exit. -m4_defun([_LT_SET_OPTIONS], -[# Set options -m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [_LT_SET_OPTION([$1], _LT_Option)]) - -m4_if([$1],[LT_INIT],[ - dnl - dnl Simply set some default values (i.e off) if boolean options were not - dnl specified: - _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no - ]) - _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no - ]) - dnl - dnl If no reference was made to various pairs of opposing options, then - dnl we run the default mode handler for the pair. For example, if neither - dnl `shared' nor `disable-shared' was passed, we enable building of shared - dnl archives by default: - _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) - _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], - [_LT_ENABLE_FAST_INSTALL]) - ]) -])# _LT_SET_OPTIONS - - -## --------------------------------- ## -## Macros to handle LT_INIT options. ## -## --------------------------------- ## - -# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) -# ----------------------------------------- -m4_define([_LT_MANGLE_DEFUN], -[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) - - -# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) -# ----------------------------------------------- -m4_define([LT_OPTION_DEFINE], -[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl -])# LT_OPTION_DEFINE - - -# dlopen -# ------ -LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes -]) - -AU_DEFUN([AC_LIBTOOL_DLOPEN], -[_LT_SET_OPTION([LT_INIT], [dlopen]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `dlopen' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) - - -# win32-dll -# --------- -# Declare package support for building win32 dll's. -LT_OPTION_DEFINE([LT_INIT], [win32-dll], -[enable_win32_dll=yes - -case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32*) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; -esac - -test -z "$AS" && AS=as -_LT_DECL([], [AS], [0], [Assembler program])dnl - -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl - -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl -])# win32-dll - -AU_DEFUN([AC_LIBTOOL_WIN32_DLL], -[_LT_SET_OPTION([LT_INIT], [win32-dll]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `win32-dll' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) - - -# _LT_ENABLE_SHARED([DEFAULT]) -# ---------------------------- -# implement the --enable-shared flag, and supports the `shared' and -# `disable-shared' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_SHARED], -[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([shared], - [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], - [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) - - _LT_DECL([build_libtool_libs], [enable_shared], [0], - [Whether or not to build shared libraries]) -])# _LT_ENABLE_SHARED - -LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], [shared]) -]) - -AC_DEFUN([AC_DISABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], [disable-shared]) -]) - -AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_SHARED], []) -dnl AC_DEFUN([AM_DISABLE_SHARED], []) - - - -# _LT_ENABLE_STATIC([DEFAULT]) -# ---------------------------- -# implement the --enable-static flag, and support the `static' and -# `disable-static' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_STATIC], -[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([static], - [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], - [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_static=]_LT_ENABLE_STATIC_DEFAULT) - - _LT_DECL([build_old_libs], [enable_static], [0], - [Whether or not to build static libraries]) -])# _LT_ENABLE_STATIC - -LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], [static]) -]) - -AC_DEFUN([AC_DISABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], [disable-static]) -]) - -AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_STATIC], []) -dnl AC_DEFUN([AM_DISABLE_STATIC], []) - - - -# _LT_ENABLE_FAST_INSTALL([DEFAULT]) -# ---------------------------------- -# implement the --enable-fast-install flag, and support the `fast-install' -# and `disable-fast-install' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_FAST_INSTALL], -[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([fast-install], - [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], - [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) - -_LT_DECL([fast_install], [enable_fast_install], [0], - [Whether or not to optimize for fast installation])dnl -])# _LT_ENABLE_FAST_INSTALL - -LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) - -# Old names: -AU_DEFUN([AC_ENABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], [fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `fast-install' option into LT_INIT's first parameter.]) -]) - -AU_DEFUN([AC_DISABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `disable-fast-install' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) -dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) - - -# _LT_WITH_PIC([MODE]) -# -------------------- -# implement the --with-pic flag, and support the `pic-only' and `no-pic' -# LT_INIT options. -# MODE is either `yes' or `no'. If omitted, it defaults to `both'. -m4_define([_LT_WITH_PIC], -[AC_ARG_WITH([pic], - [AS_HELP_STRING([--with-pic], - [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [pic_mode="$withval"], - [pic_mode=default]) - -test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) - -_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl -])# _LT_WITH_PIC - -LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) - -# Old name: -AU_DEFUN([AC_LIBTOOL_PICMODE], -[_LT_SET_OPTION([LT_INIT], [pic-only]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `pic-only' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) - -## ----------------- ## -## LTDL_INIT Options ## -## ----------------- ## - -m4_define([_LTDL_MODE], []) -LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], - [m4_define([_LTDL_MODE], [nonrecursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [recursive], - [m4_define([_LTDL_MODE], [recursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [subproject], - [m4_define([_LTDL_MODE], [subproject])]) - -m4_define([_LTDL_TYPE], []) -LT_OPTION_DEFINE([LTDL_INIT], [installable], - [m4_define([_LTDL_TYPE], [installable])]) -LT_OPTION_DEFINE([LTDL_INIT], [convenience], - [m4_define([_LTDL_TYPE], [convenience])]) diff --git a/open-vm-tools/m4/ltsugar.m4 b/open-vm-tools/m4/ltsugar.m4 deleted file mode 100644 index 0d258e070..000000000 --- a/open-vm-tools/m4/ltsugar.m4 +++ /dev/null @@ -1,123 +0,0 @@ -# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 5 ltsugar.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) - - -# lt_join(SEP, ARG1, [ARG2...]) -# ----------------------------- -# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their -# associated separator. -# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier -# versions in m4sugar had bugs. -m4_define([lt_join], -[m4_if([$#], [1], [], - [$#], [2], [[$2]], - [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) -m4_define([_lt_join], -[m4_if([$#$2], [2], [], - [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) - - -# lt_car(LIST) -# lt_cdr(LIST) -# ------------ -# Manipulate m4 lists. -# These macros are necessary as long as will still need to support -# Autoconf-2.59 which quotes differently. -m4_define([lt_car], [[$1]]) -m4_define([lt_cdr], -[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], - [$#], 1, [], - [m4_dquote(m4_shift($@))])]) -m4_define([lt_unquote], $1) - - -# lt_append(MACRO-NAME, STRING, [SEPARATOR]) -# ------------------------------------------ -# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. -# Note that neither SEPARATOR nor STRING are expanded; they are appended -# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). -# No SEPARATOR is output if MACRO-NAME was previously undefined (different -# than defined and empty). -# -# This macro is needed until we can rely on Autoconf 2.62, since earlier -# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. -m4_define([lt_append], -[m4_define([$1], - m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) - - - -# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) -# ---------------------------------------------------------- -# Produce a SEP delimited list of all paired combinations of elements of -# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list -# has the form PREFIXmINFIXSUFFIXn. -m4_define([lt_combine], -[m4_if([$2], [], [], - [m4_if([$4], [], [], - [lt_join(m4_quote(m4_default([$1], [[, ]])), - lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_prefix, [$2], - [m4_foreach(_Lt_suffix, lt_car([m4_shiftn(3, $@)]), - [_Lt_prefix[]$3[]_Lt_suffix ])])))))])])dnl -]) - - -# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) -# ----------------------------------------------------------------------- -# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited -# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. -m4_define([lt_if_append_uniq], -[m4_ifdef([$1], - [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], - [lt_append([$1], [$2], [$3])$4], - [$5])], - [lt_append([$1], [$2], [$3])$4])]) - - -# lt_dict_add(DICT, KEY, VALUE) -# ----------------------------- -m4_define([lt_dict_add], -[m4_define([$1($2)], [$3])]) - - -# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) -# -------------------------------------------- -m4_define([lt_dict_add_subkey], -[m4_define([$1($2:$3)], [$4])]) - - -# lt_dict_fetch(DICT, KEY, [SUBKEY]) -# ---------------------------------- -m4_define([lt_dict_fetch], -[m4_ifval([$3], - m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), - m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) - - -# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) -# ----------------------------------------------------------------- -m4_define([lt_if_dict_fetch], -[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], - [$5], - [$6])]) - - -# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) -# -------------------------------------------------------------- -m4_define([lt_dict_filter], -[m4_if([$5], [], [], - [lt_join(m4_quote(m4_default([$4], [[, ]])), - lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), - [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl -]) diff --git a/open-vm-tools/m4/ltversion.m4 b/open-vm-tools/m4/ltversion.m4 deleted file mode 100644 index 9e46eb8bb..000000000 --- a/open-vm-tools/m4/ltversion.m4 +++ /dev/null @@ -1,23 +0,0 @@ -# ltversion.m4 -- version numbers -*- Autoconf -*- -# -# Copyright (C) 2004 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# Generated from ltversion.in. - -# serial 2599 ltversion.m4 -# This file is part of GNU Libtool - -m4_define([LT_PACKAGE_VERSION], [2.2]) -m4_define([LT_PACKAGE_REVISION], [1.2599]) - -AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.2' -macro_revision='1.2599' -_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) -_LT_DECL(, macro_revision, 0) -]) diff --git a/open-vm-tools/m4/lt~obsolete.m4 b/open-vm-tools/m4/lt~obsolete.m4 deleted file mode 100644 index 5a4333267..000000000 --- a/open-vm-tools/m4/lt~obsolete.m4 +++ /dev/null @@ -1,92 +0,0 @@ -# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004. -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 3 - -# These exist entirely to fool aclocal when bootstrapping libtool. -# -# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) -# which have later been changed to m4_define as they aren't part of the -# exported API, or moved to Autoconf or Automake where they belong. -# -# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN -# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us -# using a macro with the same name in our local m4/libtool.m4 it'll -# pull the old libtool.m4 in (it doesn't see our shiny new m4_define -# and doesn't know about Autoconf macros at all.) -# -# So we provide this file, which has a silly filename so it's always -# included after everything else. This provides aclocal with the -# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything -# because those macros already exist, or will be overwritten later. -# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. -# -# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. -# Yes, that means every name once taken will need to remain here until -# we give up compatibility with versions before 1.7, at which point -# we need to keep only those names which we still refer to. - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) - -m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) -m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) -m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) -m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) -m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) -m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) -m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) -m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) -m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) -m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) -m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) -m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) -m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) -m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) -m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) -m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) -m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) -m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) -m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) -m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) -m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) -m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) -m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) -m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) -m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) -m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) -m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) -m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) -m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) -m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) -m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) -m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) -m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) -m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) -m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) -m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) -m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) -m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) -m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) -m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) -m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) -m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) -m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) -m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) -m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) diff --git a/open-vm-tools/modules/Makefile.in b/open-vm-tools/modules/Makefile.in deleted file mode 100644 index 9c594ec28..000000000 --- a/open-vm-tools/modules/Makefile.in +++ /dev/null @@ -1,550 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = modules -DIST_COMMON = $(am__include_HEADERS_DIST) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -am__include_HEADERS_DIST = $(top_srcdir)/lib/include/vmci_sockets.h -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(includedir)" -includeHEADERS_INSTALL = $(INSTALL_HEADER) -HEADERS = $(include_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -modulesrc = $(abs_top_srcdir)/modules -@FREEBSD_CUSTOM_SYSDIR_TRUE@EXTRA_ARGS = "SYSDIR=@SYSDIR@" -# Solaris does not have Kbuild-like system so we need to supply -# compiler and linker and other items discovered by configure -# script. -@SOLARIS_TRUE@EXTRA_ARGS = "CC=$(CC)" "CC_WARNINGS=$(CC_WARNINGS)" \ -@SOLARIS_TRUE@ "GLOBAL_DEFS=$(GLOBAL_DEFS)" "LD=$(LD)" \ -@SOLARIS_TRUE@ "HAVE_GNU_LD=$(HAVE_GNU_LD)" -@LINUX_TRUE@include_HEADERS = $(top_srcdir)/lib/include/vmci_sockets.h -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu modules/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu modules/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-includeHEADERS: $(include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" - @list='$(include_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ - $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ - done - -uninstall-includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(include_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ - rm -f "$(DESTDIR)$(includedir)/$$f"; \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(HEADERS) -installdirs: - for dir in "$(DESTDIR)$(includedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-local mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-includeHEADERS - -install-dvi: install-dvi-am - -install-exec-am: - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-includeHEADERS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook - -.MAKE: install-am install-exec-am install-strip uninstall-am - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-local ctags distclean distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-exec-hook install-html install-html-am \ - install-includeHEADERS install-info install-info-am \ - install-man install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am tags uninstall uninstall-am uninstall-hook \ - uninstall-includeHEADERS - -all: modules - -.PHONY: modules $(MODULES) -modules: $(MODULES) - -$(MODULES): - $(MAKE) VM_UNAME=$(KERNEL_RELEASE) MV=mv RM=rm \ - OVT_SOURCE_DIR=$(abs_top_srcdir) \ - MODULEBUILDDIR=$(modulesrc)/$(MODULES_OS) \ - $(EXTRA_ARGS) -C "$(modulesrc)/$(MODULES_OS)/$@" - -@LINUX_TRUE@export LINUXINCLUDE := @LINUXINCLUDE@ -@LINUX_TRUE@export vmblockdir := $(MODULES_DIR)/fs/vmblock -@LINUX_TRUE@export vmcidir := $(MODULES_DIR)/drivers/misc -@LINUX_TRUE@export vmhgfsdir := $(MODULES_DIR)/fs/vmhgfs -@LINUX_TRUE@export vmsyncdir := $(MODULES_DIR)/drivers/misc -@LINUX_TRUE@export vmxnetdir := $(MODULES_DIR)/drivers/net -@LINUX_TRUE@export vsockdir := $(MODULES_DIR)/net/vsock -@LINUX_TRUE@@WITH_ROOT_PRIVILEGES_TRUE@export DEPMOD := depmod -a $(KERNEL_RELEASE) - -@SOLARIS_TRUE@export vmhgfsdir := $(MODULES_DIR) - -clean-local: - for MOD in $(MODULES); do \ - if [ -d "$(modulesrc)/$(MODULES_OS)/$$MOD" ]; then \ - $(MAKE) VM_UNAME=$(KERNEL_RELEASE) MV=mv RM=rm \ - -C "$(modulesrc)/$(MODULES_OS)/$$MOD" clean || exit 1; \ - fi \ - done - rm -f $(modulesrc)/$(MODULES_OS)/*.o $(modulesrc)/$(MODULES_OS)/*.ko - rm -f $(modulesrc)/$(MODULES_OS)/VMwareVMCIModule.symvers - -install-exec-hook: -@SOLARIS_TRUE@ for MOD in $(MODULES); do \ -@SOLARIS_TRUE@ $(MAKE) VM_UNAME=$(KERNEL_RELEASE) MV=mv RM=rm \ -@SOLARIS_TRUE@ -C "$(modulesrc)/$(MODULES_OS)/$$MOD" install || exit 1; \ -@SOLARIS_TRUE@ done -@FREEBSD_TRUE@ for MOD in $(MODULES); do \ -@FREEBSD_TRUE@ $(INSTALL) -d $(DESTDIR)$(MODULES_DIR); \ -@FREEBSD_TRUE@ $(INSTALL) -m644 $(modulesrc)/$(MODULES_OS)/$$MOD.ko \ -@FREEBSD_TRUE@ $(DESTDIR)$(MODULES_DIR); \ -@FREEBSD_TRUE@ done -@LINUX_TRUE@ for MOD in $(MODULES); do \ -@LINUX_TRUE@ $(INSTALL) -d $(DESTDIR)`eval echo '$$'$${MOD}dir`; \ -@LINUX_TRUE@ $(INSTALL) -m644 $(modulesrc)/$(MODULES_OS)/$$MOD/$$MOD.ko \ -@LINUX_TRUE@ $(DESTDIR)`eval echo '$$'$${MOD}dir`; \ -@LINUX_TRUE@ done -@LINUX_TRUE@ eval "$$DEPMOD" - -uninstall-hook: - for MOD in $(MODULES); do \ - rm -f $(DESTDIR)`eval echo '$$'$${MOD}dir`/$$MOD.ko &> /dev/null;\ - done - eval "$$DEPMOD" -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/modules/linux/dkms.conf b/open-vm-tools/modules/linux/dkms.conf index b7144fb84..4c75c0f6b 100644 --- a/open-vm-tools/modules/linux/dkms.conf +++ b/open-vm-tools/modules/linux/dkms.conf @@ -1,5 +1,5 @@ PACKAGE_NAME=open-vm-tools -PACKAGE_VERSION=10.0.5 +PACKAGE_VERSION=10.0.0 MAKE_CMD_TMPL="make VM_UNAME=\$kernelver \ MODULEBUILDDIR=$dkms_tree/$PACKAGE_NAME/$PACKAGE_VERSION/build" diff --git a/open-vm-tools/modules/linux/dkms.sh b/open-vm-tools/modules/linux/dkms.sh index 7696edb2a..ae9e748c0 100644 --- a/open-vm-tools/modules/linux/dkms.sh +++ b/open-vm-tools/modules/linux/dkms.sh @@ -28,12 +28,12 @@ then echo " src: root of unpacked open-vm-tools package" echo " dst: where to create the dkms tree" echo - echo "The script will create an 'open-vm-tools' module with version 10.0.5." + echo "The script will create an 'open-vm-tools' module with version 10.0.0." exit 1 fi src=$1 -dst=$2/open-vm-tools-10.0.5 +dst=$2/open-vm-tools-10.0.0 SHARED_HEADERS="backdoor_def.h" SHARED_HEADERS="$SHARED_HEADERS backdoor_types.h" diff --git a/open-vm-tools/modules/linux/shared/kernelStubs.h b/open-vm-tools/modules/linux/shared/kernelStubs.h index c242fccde..f89600067 100644 --- a/open-vm-tools/modules/linux/shared/kernelStubs.h +++ b/open-vm-tools/modules/linux/shared/kernelStubs.h @@ -61,6 +61,8 @@ # include "vm_assert.h" # elif KRNL_STUBS_DRIVER_TYPE == KRNL_STUBS_DRIVER_TYPE_NDIS # include "vm_basic_types.h" +# include +# include "kernelStubsFloorFixes.h" # include # elif KRNL_STUBS_DRIVER_TYPE == KRNL_STUBS_DRIVER_TYPE_WDM # include "vm_basic_types.h" @@ -74,6 +76,7 @@ # include /* for min macro. */ # include "vm_basic_defs.h" # include "vm_assert.h" /* Our assert macros */ +# include "kernelStubsFloorFixes.h" # else # error Type KRNL_STUBS_DRIVER_TYPE must be defined. # endif diff --git a/open-vm-tools/modules/linux/shared/kernelStubsSal.h b/open-vm-tools/modules/linux/shared/kernelStubsSal.h index 36c9d0deb..56f036abe 100644 --- a/open-vm-tools/modules/linux/shared/kernelStubsSal.h +++ b/open-vm-tools/modules/linux/shared/kernelStubsSal.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2014 VMware, Inc. All rights reserved. + * Copyright (C) 2015 VMware, Inc. All rights reserved. * * 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 @@ -23,8 +23,7 @@ * This solves two issues: * 1. Microsoft changed their annotation language from SAL 1.0 (original one * widely distributed by the Windows team) to their more final SAL 2.0 - * langauge (championed by the VS team). We target multiple versions of - * Driver Kits, so we have to map 2.0 to 1.0. + * langauge (championed by the VS team). * 2. We want these annotations to do nothing during non-Win32 compiles. * * A longer term goal is to rationalize this into Bora. @@ -39,15 +38,25 @@ # endif #endif -#if !defined(_SAL_VERSION) +#if !defined(_SAL_VERSION) || (defined(_SAL_VERSION) && _SAL_VERSION == 10) #define _In_ -#define _In_z_ #define _In_opt_ +#define _In_reads_bytes_(count) +#define _In_reads_bytes_opt_(count) +#define _In_z_ #define _In_opt_z_ #define _Out_ #define _Out_opt_ +#define _Out_writes_bytes_(capcount) +#define _Out_writes_bytes_opt_(capcount) +#define _Out_writes_bytes_to_opt_(cap, count) +#define _Out_bytecap_post_bytecount_(cap, count) +#define _Out_writes_z_(cap) +#define _Out_writes_opt_z_(cap) #define _Out_z_cap_(e) +#define _COM_Outptr_ #define _Inout_ +#define _Inout_updates_bytes_(e) #define _Inout_z_cap_(e) #define _Post_z_count_(e) #define _Ret_writes_z_(e) @@ -58,49 +67,17 @@ #define _Must_inspect_result_ #define _Group_(annos) #define _When_(expr, annos) +#define _Always_(annos) #define _Printf_format_string_ #define _Use_decl_annotations_ -#elif defined(_SAL_VERSION) && _SAL_VERSION == 10 -// Microsoft didn't create a header mapping SAL 2.0 to 1.0. We do that here. -#define _In_ __in -#define _In_z_ __in_z -#define _In_opt_ __in_opt -#define _In_opt_z_ __in_z_opt -#define _Out_ __out -#define _Out_opt_ __out_opt -#define _Out_z_cap_(expr) __out_ecount_z(expr) -#define _Inout_ __inout -#define _Inout_z_cap_(expr) __inout_ecount_z(expr) -#define _Post_z_count_(expr) -#define _Ret_writes_z_(expr) __out_ecount_z(expr) -#define _Ret_writes_maybenull_z_(expr) __out_ecount_z_opt(expr) -#define _Ret_maybenull_z_ __out_z -#define _Check_return_ __checkReturn -#define _Must_inspect_result_ __checkReturn -#define _Success_(annos) __success(annos) -#define _Printf_format_string_ __format_string -#define _Use_decl_annotations_ - -// DriverSpecs.h was pretty much empty until the DDK that defined -// NTDDK_WIN6SP1 appeared. -#if defined(NTDDI_WIN6SP1) -#define _Group_(annos) __$drv_group(annos) -#define _When_(expr, annos) __drv_when(expr, annos) -#define _IRQL_requires_max_(irql) __drv_maxIRQL(irql) -#else -#define _Group_(annos) -#define _When_(expr, annos) -#define _IRQL_requires_max_(irql) -#define __drv_allocatesMem(kind) -#define __drv_freesMem(kind) -#endif +#define _Dispatch_type_(mj) #else // Sal 2.0 path - everything is already defined. #endif // _SAL_VERSION // Now define our own annotations -#if !defined(_SAL_VERSION) +#if !defined(_SAL_VERSION) || (defined(_SAL_VERSION) && _SAL_VERSION == 10) #define _When_windrv_(annos) #define _Ret_allocates_malloc_mem_opt_bytecap_(_Size) #define _Ret_allocates_malloc_mem_opt_bytecount_(_Size) @@ -108,14 +85,6 @@ #define _Ret_allocates_malloc_mem_opt_z_bytecount_(_Size) #define _Ret_allocates_malloc_mem_opt_z_ #define _In_frees_malloc_mem_opt_ -#elif defined(_SAL_VERSION) && _SAL_VERSION == 10 -#define _When_windrv_(annos) annos -#define _Ret_allocates_malloc_mem_opt_bytecap_(_Cap) __drv_allocatesMem("Memory") __checkReturn __post __byte_writableTo(_Cap) __exceptthat __maybenull -#define _Ret_allocates_malloc_mem_opt_bytecount_(_Count) __drv_allocatesMem("Memory") __checkReturn __post __byte_readableTo(_Count) __exceptthat __maybenull -#define _Ret_allocates_malloc_mem_opt_bytecap_post_bytecount_(_Cap,_Count) __drv_allocatesMem("Memory") __checkReturn __post __byte_writableTo(_Cap) __byte_readableTo(_Count) __exceptthat __maybenull -#define _Ret_allocates_malloc_mem_opt_z_bytecount_(_Count) __drv_allocatesMem("Memory") __checkReturn __post __byte_readableTo(_Count) __valid __nullterminated __exceptthat __maybenull -#define _Ret_allocates_malloc_mem_opt_z_ __drv_allocatesMem("Memory") __checkReturn __post __valid __nullterminated __exceptthat __maybenull -#define _In_frees_malloc_mem_opt_ __drv_freesMem("Memory") __in_opt __post __notvalid #else #define _When_windrv_(annos) annos #define _Ret_allocates_malloc_mem_opt_bytecap_(_Cap) __drv_allocatesMem("Memory") _Must_inspect_result_ _Ret_opt_bytecap_(_Cap) diff --git a/open-vm-tools/modules/linux/shared/vmci_call_defs.h b/open-vm-tools/modules/linux/shared/vmci_call_defs.h index ecfcbde78..590489e1a 100644 --- a/open-vm-tools/modules/linux/shared/vmci_call_defs.h +++ b/open-vm-tools/modules/linux/shared/vmci_call_defs.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2014 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. * * 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 @@ -75,7 +75,7 @@ typedef struct VMCIDatagram { #define VMCI_DG_PAYLOAD(_dg) (void *)((char *)(_dg) + sizeof(VMCIDatagram)) #define VMCI_DG_HEADERSIZE sizeof(VMCIDatagram) #define VMCI_DG_SIZE(_dg) (VMCI_DG_HEADERSIZE + (size_t)(_dg)->payloadSize) -#define VMCI_DG_SIZE_ALIGNED(_dg) ((VMCI_DG_SIZE(_dg) + 7) & (size_t)CONST64U(0xfffffffffffffff8)) +#define VMCI_DG_SIZE_ALIGNED(_dg) ((VMCI_DG_SIZE(_dg) + 7) & (size_t)~7) #define VMCI_MAX_DATAGRAM_QUEUE_SIZE (VMCI_MAX_DG_SIZE * 2) /* @@ -281,14 +281,12 @@ VMCIEventMsgPayload(VMCIEventMsg *eMsg) // IN: #define VMCI_QPFLAG_ATTACH_ONLY 0x1 /* Fail alloc if QP not created by peer. */ #define VMCI_QPFLAG_LOCAL 0x2 /* Only allow attaches from local context. */ #define VMCI_QPFLAG_NONBLOCK 0x4 /* Host won't block when guest is quiesced. */ -#define VMCI_QPFLAG_PINNED 0x8 /* Keep all data pages pinned. This flag */ - /* must be combined with NONBLOCK. */ /* For asymmetric queuepairs, update as new flags are added. */ -#define VMCI_QP_ASYMM (VMCI_QPFLAG_NONBLOCK | VMCI_QPFLAG_PINNED) +#define VMCI_QP_ASYMM VMCI_QPFLAG_NONBLOCK #define VMCI_QP_ASYMM_PEER (VMCI_QPFLAG_ATTACH_ONLY | VMCI_QP_ASYMM) /* Update the following (bitwise OR flags) while adding new flags. */ #define VMCI_QP_ALL_FLAGS (VMCI_QPFLAG_ATTACH_ONLY | VMCI_QPFLAG_LOCAL | \ - VMCI_QPFLAG_NONBLOCK | VMCI_QPFLAG_PINNED) + VMCI_QPFLAG_NONBLOCK) /* * Structs used for QueuePair alloc and detach messages. We align fields of diff --git a/open-vm-tools/modules/linux/shared/vmci_defs.h b/open-vm-tools/modules/linux/shared/vmci_defs.h index da28b7f84..00af7d37a 100644 --- a/open-vm-tools/modules/linux/shared/vmci_defs.h +++ b/open-vm-tools/modules/linux/shared/vmci_defs.h @@ -96,17 +96,6 @@ typedef enum VMCIIntrType { */ #define VMCI_MAX_GUEST_QP_MEMORY (128 * 1024 * 1024) -/* - * Queues with pre-mapped data pages must be small, so that we don't pin - * too much kernel memory (especially on vmkernel). We limit a queuepair to - * 32 KB, or 16 KB per queue for symmetrical pairs. - * - * XXX, we are raising this limit to 4MB to support high-throughput workloads - * with vioi-filter. Once we switch to rings instead of queuepairs for the - * page channel, we will drop this limit again. See PR 852983. - */ -#define VMCI_MAX_PINNED_QP_MEMORY (4 * 1024 * 1024) - /* * We have a fixed set of resource IDs available in the VMX. * This allows us to have a very simple implementation since we statically @@ -275,6 +264,7 @@ static const VMCIHandle VMCI_INVALID_HANDLE = {VMCI_INVALID_ID, * Context ID used by host endpoints. */ #define VMCI_HOST_CONTEXT_ID 2 +#define VMCI_HOST_CONTEXT_INVALID_EVENT ((uintptr_t)~0) #define VMCI_CONTEXT_IS_VM(_cid) (VMCI_INVALID_ID != _cid && \ _cid > VMCI_HOST_CONTEXT_ID) diff --git a/open-vm-tools/modules/linux/shared/vmci_kernel_if.h b/open-vm-tools/modules/linux/shared/vmci_kernel_if.h index 9def671a4..f1b2eef54 100644 --- a/open-vm-tools/modules/linux/shared/vmci_kernel_if.h +++ b/open-vm-tools/modules/linux/shared/vmci_kernel_if.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2014 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. * * 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 @@ -34,6 +34,8 @@ #if defined(_WIN32) # include +#else +#define UNREFERENCED_PARAMETER(P) #endif #if defined(linux) && !defined(VMKERNEL) @@ -375,6 +377,8 @@ typedef uint32 VMCIGuestMemID; struct VMCIQueue *consumeQ); void VMCIHost_MarkQueuesUnavailable(struct VMCIQueue *produceQ, struct VMCIQueue *consumeQ); + int VMCIHost_RevalidateQueues(struct VMCIQueue *produceQ, + struct VMCIQueue *consumeQ); #else # define VMCIHost_MarkQueuesAvailable(_q, _p) do { } while (0) # define VMCIHost_MarkQueuesUnavailable(_q, _p) do { } while(0) @@ -388,6 +392,12 @@ typedef uint32 VMCIGuestMemID; # define VMCI_UnlockQueueHeader(_q) NOT_IMPLEMENTED() #endif +#if defined(VMKERNEL) + void VMCI_QueueHeaderUpdated(struct VMCIQueue *produceQ); +#else +# define VMCI_QueueHeaderUpdated(_q) do { } while (0) +#endif + #if (!defined(VMKERNEL) && defined(__linux__)) || defined(_WIN32) || \ defined(__APPLE__) int VMCIHost_GetUserMemory(VA64 produceUVA, VA64 consumeUVA, diff --git a/open-vm-tools/modules/linux/vmci/common/vmciContext.c b/open-vm-tools/modules/linux/vmci/common/vmciContext.c index d2d03622c..19839f0c6 100644 --- a/open-vm-tools/modules/linux/vmci/common/vmciContext.c +++ b/open-vm-tools/modules/linux/vmci/common/vmciContext.c @@ -1621,6 +1621,8 @@ VMCIContextDgHypervisorSaveStateSize(VMCIContext *context, // IN uint32 total; VMCIListItem *iter; + UNREFERENCED_PARAMETER(cptBufPtr); + *bufSize = total = 0; VMCIList_Scan(iter, &context->datagramQueue) { @@ -1678,7 +1680,7 @@ VMCIContextDgHypervisorSaveState(VMCIContext *context, // IN return VMCI_ERROR_NO_MEM; } - *cptBufPtr = p; + *cptBufPtr = (char *)p; /* Leave space for the datagram count at the start. */ total = sizeof(uint32); @@ -2420,6 +2422,9 @@ vmci_cid_2_host_vm_id(VMCIId contextID, // IN return result; #else // !defined(VMKERNEL) + UNREFERENCED_PARAMETER(contextID); + UNREFERENCED_PARAMETER(hostVmID); + UNREFERENCED_PARAMETER(hostVmIDLen); return VMCI_ERROR_UNAVAILABLE; #endif } @@ -2723,6 +2728,9 @@ VMCIContext_RegisterGuestMem(VMCIContext *context, // IN: Context structure out: VMCIMutex_Release(&context->guestMemMutex); +#else + UNREFERENCED_PARAMETER(context); + UNREFERENCED_PARAMETER(gid); #endif } @@ -2824,10 +2832,65 @@ VMCIContext_ReleaseGuestMem(VMCIContext *context, // IN: Context structure } VMCIMutex_Release(&context->guestMemMutex); +#else + UNREFERENCED_PARAMETER(context); + UNREFERENCED_PARAMETER(gid); + UNREFERENCED_PARAMETER(powerOff); #endif } #if defined(VMKERNEL) +/* + *---------------------------------------------------------------------- + * + * VMCIContext_RevalidateMappings -- + * + * Updates the mappings for all QPs. Should only be called with the VMCI + * device lock held. + * + * Results: + * None. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +Bool +VMCIContext_RevalidateMappings(VMCIContext *context) // IN: Context structure +{ + uint32 numQueuePairs; + uint32 cur; + + numQueuePairs = VMCIHandleArray_GetSize(context->queuePairArray); + for (cur = 0; cur < numQueuePairs; cur++) { + VMCIHandle handle; + + handle = VMCIHandleArray_GetEntry(context->queuePairArray, cur); + if (!VMCI_HANDLE_EQUAL(handle, VMCI_INVALID_HANDLE)) { + int res = VMCIQPBroker_Revalidate(handle, context); + + if (res < VMCI_SUCCESS) { + VMCI_WARNING(("Failed to revalidate guest mappings for queue " + " pair (handle=0x%x:0x%x, res=%d).\n", + handle.context, handle.resource, res)); + /* + * I have not seen these errors but I do not think they should be + * considered fatal. + */ + if (res != VMCI_ERROR_NOT_FOUND && + res != VMCI_ERROR_QUEUEPAIR_NOTATTACHED) { + return FALSE; + } + } + } + } + + return TRUE; +} + + /* *---------------------------------------------------------------------- * diff --git a/open-vm-tools/modules/linux/vmci/common/vmciContext.h b/open-vm-tools/modules/linux/vmci/common/vmciContext.h index 6ec9c30ef..2149193bc 100644 --- a/open-vm-tools/modules/linux/vmci/common/vmciContext.h +++ b/open-vm-tools/modules/linux/vmci/common/vmciContext.h @@ -67,6 +67,7 @@ void VMCIContext_ClearDatagrams(VMCIContext *context); void VMCIContext_SetId(VMCIContext *context, VMCIId cid); void VMCIContext_NotifyGuestPaused(VMCIId cid, Bool paused); void VMCIContext_NotifyMemoryAccess(VMCIId cid, Bool on); +Bool VMCIContext_RevalidateMappings(VMCIContext *context); #endif Bool VMCIContext_SupportsHostQP(VMCIContext *context); void VMCIContext_ReleaseContext(VMCIContext *context); diff --git a/open-vm-tools/modules/linux/vmci/common/vmciDoorbell.c b/open-vm-tools/modules/linux/vmci/common/vmciDoorbell.c index 5a3fbfd5e..ed1c74fb2 100644 --- a/open-vm-tools/modules/linux/vmci/common/vmciDoorbell.c +++ b/open-vm-tools/modules/linux/vmci/common/vmciDoorbell.c @@ -782,6 +782,8 @@ VMCIDoorbellNotifyAsGuest(VMCIHandle handle, // IN #else // VMKERNEL VMCIDoorbellNotifyMsg notifyMsg; + UNREFERENCED_PARAMETER(privFlags); + ASSERT(VMCI_GuestPersonalityActive()); notifyMsg.hdr.dst = VMCI_MAKE_HANDLE(VMCI_HYPERVISOR_CONTEXT_ID, @@ -898,6 +900,8 @@ VMCIDoorbellHostContextNotify(VMCIId srcCID, // IN VMCIResource *resource; int result; + UNREFERENCED_PARAMETER(srcCID); + ASSERT(VMCI_HostPersonalityActive()); if (VMCI_HANDLE_INVALID(handle)) { diff --git a/open-vm-tools/modules/linux/vmci/common/vmciDriver.c b/open-vm-tools/modules/linux/vmci/common/vmciDriver.c index 4a3795857..5de7e83f5 100644 --- a/open-vm-tools/modules/linux/vmci/common/vmciDriver.c +++ b/open-vm-tools/modules/linux/vmci/common/vmciDriver.c @@ -78,7 +78,8 @@ VMCI_HostInit(void) */ result = VMCIContext_InitContext(VMCI_HOST_CONTEXT_ID, VMCI_DEFAULT_PROC_PRIVILEGE_FLAGS, - -1, VMCI_VERSION, NULL, &hostContext); + VMCI_HOST_CONTEXT_INVALID_EVENT, + VMCI_VERSION, NULL, &hostContext); if (result < VMCI_SUCCESS) { VMCI_WARNING((LGPFX"Failed to initialize VMCIContext (result=%d).\n", result)); @@ -215,6 +216,8 @@ VMCIUtilCidUpdate(VMCIId subID, // IN: { VMCIEventPayload_Context *evPayload = VMCIEventDataPayload(eventData); + UNREFERENCED_PARAMETER(clientData); + if (subID != ctxUpdateSubID) { VMCI_DEBUG_LOG(4, (LGPFX"Invalid subscriber (ID=0x%x).\n", subID)); return; @@ -421,7 +424,7 @@ VMCI_ReadDatagramsFromPort(VMCIIoHandle ioHandle, // IN remainingBytes = currentDgInBufferSize; while (dg->dst.resource != VMCI_INVALID_ID || remainingBytes > PAGE_SIZE) { - unsigned dgInSize; + size_t dgInSize; /* * When the input buffer spans multiple pages, a datagram can @@ -493,7 +496,7 @@ VMCI_ReadDatagramsFromPort(VMCIIoHandle ioHandle, // IN * Datagram doesn't fit in datagram buffer of maximal size. We drop it. */ - VMCI_DEBUG_LOG(4, (LGPFX"Failed to receive datagram (size=%u bytes).\n", + VMCI_DEBUG_LOG(4, (LGPFX"Failed to receive datagram (size=%"FMTSZ"u bytes).\n", dgInSize)); bytesToSkip = dgInSize - remainingBytes; diff --git a/open-vm-tools/modules/linux/vmci/common/vmciQPair.c b/open-vm-tools/modules/linux/vmci/common/vmciQPair.c index 7a0212788..246e59732 100644 --- a/open-vm-tools/modules/linux/vmci/common/vmciQPair.c +++ b/open-vm-tools/modules/linux/vmci/common/vmciQPair.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2012 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. * * 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 @@ -122,10 +122,6 @@ static INLINE int VMCIQPairLock(const VMCIQPair *qpair) // IN { #if !defined VMX86_VMX - if (qpair->flags & VMCI_QPFLAG_PINNED) { - VMCI_LockQueueHeader(qpair->produceQ); - return VMCI_SUCCESS; - } return VMCI_AcquireQueueMutex(qpair->produceQ, !(qpair->flags & VMCI_QPFLAG_NONBLOCK)); #else @@ -154,11 +150,7 @@ static INLINE void VMCIQPairUnlock(const VMCIQPair *qpair) // IN { #if !defined VMX86_VMX - if (qpair->flags & VMCI_QPFLAG_PINNED) { - VMCI_UnlockQueueHeader(qpair->produceQ); - } else { - VMCI_ReleaseQueueMutex(qpair->produceQ); - } + VMCI_ReleaseQueueMutex(qpair->produceQ); #endif } @@ -225,6 +217,58 @@ VMCIQPairUnlockHeader(const VMCIQPair *qpair) // IN } +/* + *----------------------------------------------------------------------------- + * + * VMCIQueueAddProducerTail() -- + * + * Helper routine to increment the Producer Tail. + * + * Results: + * None. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +static INLINE void +VMCIQueueAddProducerTail(VMCIQueue *queue, // IN/OUT + size_t add, // IN + uint64 queueSize) // IN +{ + VMCIQueueHeader_AddProducerTail(queue->qHeader, add, queueSize); + VMCI_QueueHeaderUpdated(queue); +} + + +/* + *----------------------------------------------------------------------------- + * + * VMCIQueueAddConsumerHead() -- + * + * Helper routine to increment the Consumer Head. + * + * Results: + * None. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +static INLINE void +VMCIQueueAddConsumerHead(VMCIQueue *queue, // IN/OUT + size_t add, // IN + uint64 queueSize) // IN +{ + VMCIQueueHeader_AddConsumerHead(queue->qHeader, add, queueSize); + VMCI_QueueHeaderUpdated(queue); +} + + /* *----------------------------------------------------------------------------- * @@ -477,29 +521,10 @@ vmci_qpair_alloc(VMCIQPair **qpair, // OUT } } - if ((flags & (VMCI_QPFLAG_NONBLOCK | VMCI_QPFLAG_PINNED)) && !vmkernel) { + if (flags & VMCI_QPFLAG_NONBLOCK && !vmkernel) { return VMCI_ERROR_INVALID_ARGS; } - if (flags & VMCI_QPFLAG_PINNED) { - /* - * Pinned pages implies non-blocking mode. Technically it doesn't - * have to, but there doesn't seem much point in pinning the pages if you - * can block since the queues will be small, so there's no performance - * gain to be had. - */ - - if (!(flags & VMCI_QPFLAG_NONBLOCK)) { - return VMCI_ERROR_INVALID_ARGS; - } - - /* Limit the amount of memory that can be pinned. */ - - if (produceQSize + consumeQSize > VMCI_MAX_PINNED_QP_MEMORY) { - return VMCI_ERROR_NO_RESOURCES; - } - } - myQPair = VMCI_AllocKernelMem(sizeof *myQPair, VMCI_MEMORY_NONPAGED); if (!myQPair) { return VMCI_ERROR_NO_MEM; @@ -511,7 +536,8 @@ vmci_qpair_alloc(VMCIQPair **qpair, // OUT myQPair->flags = flags; myQPair->privFlags = privFlags; - wakeupCB = clientData = NULL; + clientData = NULL; + wakeupCB = NULL; if (VMCI_ROUTE_AS_HOST == route) { myQPair->guestEndpoint = FALSE; if (!(flags & VMCI_QPFLAG_LOCAL)) { @@ -971,7 +997,7 @@ EnqueueLocked(VMCIQueue *produceQ, // IN return result; } - VMCIQueueHeader_AddProducerTail(produceQ->qHeader, written, produceQSize); + VMCIQueueAddProducerTail(produceQ, written, produceQSize); return written; } @@ -1053,9 +1079,7 @@ DequeueLocked(VMCIQueue *produceQ, // IN } if (updateConsumer) { - VMCIQueueHeader_AddConsumerHead(produceQ->qHeader, - read, - consumeQSize); + VMCIQueueAddConsumerHead(produceQ, read, consumeQSize); } return read; diff --git a/open-vm-tools/modules/linux/vmci/common/vmciQueuePair.c b/open-vm-tools/modules/linux/vmci/common/vmciQueuePair.c index e7a805fcb..1203d51e0 100644 --- a/open-vm-tools/modules/linux/vmci/common/vmciQueuePair.c +++ b/open-vm-tools/modules/linux/vmci/common/vmciQueuePair.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2014 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. * * 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 @@ -557,6 +557,7 @@ static void QueuePairList_RemoveEntry(QueuePairList *qpList, // IN QueuePairEntry *entry) // IN { + UNREFERENCED_PARAMETER(qpList); if (entry) { VMCIList_Remove(&entry->listItem); } @@ -640,7 +641,7 @@ VMCIQPBroker_Exit(void) VMCIQPBrokerLock(); - while ((entry = (QPBrokerEntry *)QueuePairList_GetHead(&qpBrokerList))) { + while ((entry = (QPBrokerEntry *)QueuePairList_GetHead(&qpBrokerList)) != NULL) { QueuePairList_RemoveEntry(&qpBrokerList, &entry->qp); VMCI_FreeKernelMem(entry, sizeof *entry); } @@ -1219,6 +1220,8 @@ VMCIQPBrokerAttach(QPBrokerEntry *entry, // IN Bool isLocal = flags & VMCI_QPFLAG_LOCAL; int result; + UNREFERENCED_PARAMETER(peer); + if (entry->state != VMCIQPB_CREATED_NO_MEM && entry->state != VMCIQPB_CREATED_MEM) { VMCI_DEBUG_LOG(5, ("QP Attach - state is %x\n", entry->state)); @@ -1400,7 +1403,7 @@ VMCIQPBrokerAttach(QPBrokerEntry *entry, // IN VMCI_DEBUG_LOG(5, ("QP Attach - cannot map queues for host\n")); return result; } - entry->qp.flags |= flags & (VMCI_QPFLAG_NONBLOCK | VMCI_QPFLAG_PINNED); + entry->qp.flags |= flags & VMCI_QPFLAG_NONBLOCK; } /* @@ -2029,6 +2032,75 @@ out: return result; } +#if defined(VMKERNEL) +/* + *----------------------------------------------------------------------------- + * + * VMCIQPBroker_Revalidate -- + * + * Revalidates the guest memory mappings of a given queue pair. + * + * Results: + * VMCI_SUCCESS on success, appropriate error code otherwise. + * + * Side effects: + * Nond. + * + *----------------------------------------------------------------------------- + */ + +int +VMCIQPBroker_Revalidate(VMCIHandle handle, // IN + VMCIContext *context) // IN +{ + QPBrokerEntry *entry; + const VMCIId contextId = VMCIContext_GetId(context); + int result = VMCI_SUCCESS; + + ASSERT(!VMCI_HANDLE_INVALID(handle) && contextId != VMCI_INVALID_ID); + + VMCIQPBrokerLock(); + if (!VMCIContext_QueuePairExists(context, handle)) { + VMCI_DEBUG_LOG(4, (LGPFX"Context (ID=0x%x) not attached to queue pair " + "(handle=0x%x:0x%x).\n", + contextId, handle.context, handle.resource)); + result = VMCI_ERROR_NOT_FOUND; + goto out; + } + + entry = (QPBrokerEntry *)QueuePairList_FindEntry(&qpBrokerList, handle); + if (entry == NULL) { + VMCI_DEBUG_LOG(4, (LGPFX"Context (ID=0x%x) reports being attached to " + "queue pair (handle=0x%x:0x%x) that isn't present in " + "broker.\n", + contextId, handle.context, handle.resource)); + result = VMCI_ERROR_NOT_FOUND; + goto out; + } + + if (contextId != entry->createId && contextId != entry->attachId) { + result = VMCI_ERROR_QUEUEPAIR_NOTATTACHED; + goto out; + } + + if (contextId != VMCI_HOST_CONTEXT_ID) { + ASSERT(entry->state != VMCIQPB_CREATED_NO_MEM && + entry->state != VMCIQPB_SHUTDOWN_NO_MEM && + entry->state != VMCIQPB_ATTACHED_NO_MEM); + ASSERT((entry->qp.flags & VMCI_QPFLAG_LOCAL) == 0); + + VMCI_AcquireQueueMutex(entry->produceQ, TRUE); + result = VMCIHost_RevalidateQueues(entry->produceQ, entry->consumeQ); + VMCI_ReleaseQueueMutex(entry->produceQ); + } + +out: + VMCIQPBrokerUnlock(); + return result; +} +#endif + + #if !defined(VMKERNEL) /* @@ -2108,7 +2180,7 @@ VMCIQPGuestEndpoints_Exit(void) VMCIMutex_Acquire(&qpGuestEndpoints.mutex); - while ((entry = (QPGuestEndpoint *)QueuePairList_GetHead(&qpGuestEndpoints))) { + while ((entry = (QPGuestEndpoint *)QueuePairList_GetHead(&qpGuestEndpoints)) != NULL) { /* * Don't make a hypercall for local QueuePairs. */ @@ -2399,7 +2471,7 @@ VMCIQueuePairAllocGuestWork(VMCIHandle *handle, // IN/OUT } if ((queuePairEntry = (QPGuestEndpoint *) - QueuePairList_FindEntry(&qpGuestEndpoints, *handle))) { + QueuePairList_FindEntry(&qpGuestEndpoints, *handle)) != NULL) { if (queuePairEntry->qp.flags & VMCI_QPFLAG_LOCAL) { /* Local attach case. */ if (queuePairEntry->qp.refCount > 1) { diff --git a/open-vm-tools/modules/linux/vmci/common/vmciQueuePair.h b/open-vm-tools/modules/linux/vmci/common/vmciQueuePair.h index 9c0be1412..90be2b7ce 100644 --- a/open-vm-tools/modules/linux/vmci/common/vmciQueuePair.h +++ b/open-vm-tools/modules/linux/vmci/common/vmciQueuePair.h @@ -98,7 +98,9 @@ int VMCIQueuePair_Alloc(VMCIHandle *handle, VMCIQueue **produceQ, int VMCIQueuePair_Detach(VMCIHandle handle, Bool guestEndpoint); int VMCIQPBroker_Map(VMCIHandle handle, VMCIContext *context, VMCIQPGuestMem guestMem); int VMCIQPBroker_Unmap(VMCIHandle handle, VMCIContext *context, VMCIGuestMemID gid); - +#ifdef VMKERNEL +int VMCIQPBroker_Revalidate(VMCIHandle handle, VMCIContext *context); +#endif #endif /* !_VMCI_QUEUE_PAIR_H_ */ diff --git a/open-vm-tools/modules/linux/vmhgfs/filesystem.c b/open-vm-tools/modules/linux/vmhgfs/filesystem.c index 6d7a64b2e..2eca81acc 100644 --- a/open-vm-tools/modules/linux/vmhgfs/filesystem.c +++ b/open-vm-tools/modules/linux/vmhgfs/filesystem.c @@ -218,16 +218,16 @@ HgfsValidateMountInfo(void *rawData, // IN: Fs-specific mount data /* Sanity check the incoming user data. */ if (rawData == NULL) { - LOG(4, (KERN_CRIT LGPFX "%s: error: no user supplied mount data\n", - __func__)); + printk(KERN_WARNING LGPFX "%s: error: no user supplied mount data\n", + __func__); goto exit; } /* Magic number is always first 4 bytes of the header. */ magicNumber = rawData; if (*magicNumber != HGFS_SUPER_MAGIC) { - LOG(4, (KERN_CRIT LGPFX "%s: error: user supplied mount data is not valid!\n", - __func__)); + printk(KERN_WARNING LGPFX "%s: error: user supplied mount data is not valid!\n", + __func__); goto exit; } @@ -265,8 +265,8 @@ HgfsValidateMountInfo(void *rawData, // IN: Fs-specific mount data * The version and info size fields could not be validated * for the known structure. It is probably a newer version. */ - LOG(4, (KERN_DEBUG LGPFX "%s: error: user supplied mount data version %d\n", - __func__, infoV1->version)); + printk(KERN_WARNING LGPFX "%s: error: user supplied mount data version %d\n", + __func__, infoV1->version); } exit: diff --git a/open-vm-tools/modules/linux/vmhgfs/module.h b/open-vm-tools/modules/linux/vmhgfs/module.h index d30184ec0..7751162f5 100644 --- a/open-vm-tools/modules/linux/vmhgfs/module.h +++ b/open-vm-tools/modules/linux/vmhgfs/module.h @@ -45,9 +45,10 @@ #endif /* Logging stuff. */ +#define LGPFX "VMware hgfs: " + #ifdef VMX86_DEVEL extern int LOGLEVEL_THRESHOLD; -#define LGPFX "VMware hgfs: " #define LOG(level, args) ((void) (LOGLEVEL_THRESHOLD >= (level) ? (printk args) : 0)) #else #define LOG(level, args) diff --git a/open-vm-tools/modules/linux/vmhgfs/vmhgfs_version.h b/open-vm-tools/modules/linux/vmhgfs/vmhgfs_version.h index b8569b51e..162f6be4d 100644 --- a/open-vm-tools/modules/linux/vmhgfs/vmhgfs_version.h +++ b/open-vm-tools/modules/linux/vmhgfs/vmhgfs_version.h @@ -25,8 +25,8 @@ #ifndef _VMHGFS_VERSION_H_ #define _VMHGFS_VERSION_H_ -#define VMHGFS_DRIVER_VERSION 2.0.17.1 -#define VMHGFS_DRIVER_VERSION_COMMAS 2,0,17,1 -#define VMHGFS_DRIVER_VERSION_STRING "2.0.17.1" +#define VMHGFS_DRIVER_VERSION 2.0.19.0 +#define VMHGFS_DRIVER_VERSION_COMMAS 2,0,19,0 +#define VMHGFS_DRIVER_VERSION_STRING "2.0.19.0" #endif /* _VMHGFS_VERSION_H_ */ diff --git a/open-vm-tools/modules/shared/vmmemctl/balloonInt.h b/open-vm-tools/modules/shared/vmmemctl/balloonInt.h index bada6ce4c..d9fdcb74f 100644 --- a/open-vm-tools/modules/shared/vmmemctl/balloonInt.h +++ b/open-vm-tools/modules/shared/vmmemctl/balloonInt.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2012,2014 VMware, Inc. All rights reserved. + * Copyright (C) 2012,2014-2015 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -57,6 +57,8 @@ #ifndef BALLOONINT_H_ # define BALLOONINT_H_ +#include "balloon_def.h" + /* * Compile-Time Options */ @@ -64,10 +66,11 @@ #define BALLOON_NAME "vmmemctl" #define BALLOON_NAME_VERBOSE "VMware memory control driver" +// Capabilities for Windows are defined at run-tine (see nt/vmballoon.c) #if defined __linux__ || (defined __APPLE__ && defined __LP64__) #define BALLOON_CAPABILITIES (BALLOON_BASIC_CMDS|BALLOON_BATCHED_CMDS|\ BALLOON_BATCHED_2M_CMDS) -#elif defined __FreeBSD__ || defined _WIN32 || (defined __APPLE__ && !defined __LP64__) +#elif defined __FreeBSD__ || (defined __APPLE__ && !defined __LP64__) #define BALLOON_CAPABILITIES (BALLOON_BASIC_CMDS|BALLOON_BATCHED_CMDS) #else #define BALLOON_CAPABILITIES BALLOON_BASIC_CMDS diff --git a/open-vm-tools/modules/shared/vmmemctl/kernelStubs.h b/open-vm-tools/modules/shared/vmmemctl/kernelStubs.h index d0a53ad79..9ccc680e9 100644 --- a/open-vm-tools/modules/shared/vmmemctl/kernelStubs.h +++ b/open-vm-tools/modules/shared/vmmemctl/kernelStubs.h @@ -100,6 +100,8 @@ # include "vm_assert.h" # elif KRNL_STUBS_DRIVER_TYPE == KRNL_STUBS_DRIVER_TYPE_NDIS # include "vm_basic_types.h" +# include +# include "kernelStubsFloorFixes.h" # include # elif KRNL_STUBS_DRIVER_TYPE == KRNL_STUBS_DRIVER_TYPE_WDM # include "vm_basic_types.h" @@ -113,6 +115,7 @@ # include /* for min macro. */ # include "vm_basic_defs.h" # include "vm_assert.h" /* Our assert macros */ +# include "kernelStubsFloorFixes.h" # else # error Type KRNL_STUBS_DRIVER_TYPE must be defined. # endif diff --git a/open-vm-tools/modules/shared/vmmemctl/kernelStubsSal.h b/open-vm-tools/modules/shared/vmmemctl/kernelStubsSal.h index d88b04971..d8aa35629 100644 --- a/open-vm-tools/modules/shared/vmmemctl/kernelStubsSal.h +++ b/open-vm-tools/modules/shared/vmmemctl/kernelStubsSal.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2014 VMware, Inc. All rights reserved. + * Copyright (C) 2015 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -62,8 +62,7 @@ * This solves two issues: * 1. Microsoft changed their annotation language from SAL 1.0 (original one * widely distributed by the Windows team) to their more final SAL 2.0 - * langauge (championed by the VS team). We target multiple versions of - * Driver Kits, so we have to map 2.0 to 1.0. + * langauge (championed by the VS team). * 2. We want these annotations to do nothing during non-Win32 compiles. * * A longer term goal is to rationalize this into Bora. @@ -78,15 +77,25 @@ # endif #endif -#if !defined(_SAL_VERSION) +#if !defined(_SAL_VERSION) || (defined(_SAL_VERSION) && _SAL_VERSION == 10) #define _In_ -#define _In_z_ #define _In_opt_ +#define _In_reads_bytes_(count) +#define _In_reads_bytes_opt_(count) +#define _In_z_ #define _In_opt_z_ #define _Out_ #define _Out_opt_ +#define _Out_writes_bytes_(capcount) +#define _Out_writes_bytes_opt_(capcount) +#define _Out_writes_bytes_to_opt_(cap, count) +#define _Out_bytecap_post_bytecount_(cap, count) +#define _Out_writes_z_(cap) +#define _Out_writes_opt_z_(cap) #define _Out_z_cap_(e) +#define _COM_Outptr_ #define _Inout_ +#define _Inout_updates_bytes_(e) #define _Inout_z_cap_(e) #define _Post_z_count_(e) #define _Ret_writes_z_(e) @@ -97,49 +106,17 @@ #define _Must_inspect_result_ #define _Group_(annos) #define _When_(expr, annos) +#define _Always_(annos) #define _Printf_format_string_ #define _Use_decl_annotations_ -#elif defined(_SAL_VERSION) && _SAL_VERSION == 10 -// Microsoft didn't create a header mapping SAL 2.0 to 1.0. We do that here. -#define _In_ __in -#define _In_z_ __in_z -#define _In_opt_ __in_opt -#define _In_opt_z_ __in_z_opt -#define _Out_ __out -#define _Out_opt_ __out_opt -#define _Out_z_cap_(expr) __out_ecount_z(expr) -#define _Inout_ __inout -#define _Inout_z_cap_(expr) __inout_ecount_z(expr) -#define _Post_z_count_(expr) -#define _Ret_writes_z_(expr) __out_ecount_z(expr) -#define _Ret_writes_maybenull_z_(expr) __out_ecount_z_opt(expr) -#define _Ret_maybenull_z_ __out_z -#define _Check_return_ __checkReturn -#define _Must_inspect_result_ __checkReturn -#define _Success_(annos) __success(annos) -#define _Printf_format_string_ __format_string -#define _Use_decl_annotations_ - -// DriverSpecs.h was pretty much empty until the DDK that defined -// NTDDK_WIN6SP1 appeared. -#if defined(NTDDI_WIN6SP1) -#define _Group_(annos) __$drv_group(annos) -#define _When_(expr, annos) __drv_when(expr, annos) -#define _IRQL_requires_max_(irql) __drv_maxIRQL(irql) -#else -#define _Group_(annos) -#define _When_(expr, annos) -#define _IRQL_requires_max_(irql) -#define __drv_allocatesMem(kind) -#define __drv_freesMem(kind) -#endif +#define _Dispatch_type_(mj) #else // Sal 2.0 path - everything is already defined. #endif // _SAL_VERSION // Now define our own annotations -#if !defined(_SAL_VERSION) +#if !defined(_SAL_VERSION) || (defined(_SAL_VERSION) && _SAL_VERSION == 10) #define _When_windrv_(annos) #define _Ret_allocates_malloc_mem_opt_bytecap_(_Size) #define _Ret_allocates_malloc_mem_opt_bytecount_(_Size) @@ -147,14 +124,6 @@ #define _Ret_allocates_malloc_mem_opt_z_bytecount_(_Size) #define _Ret_allocates_malloc_mem_opt_z_ #define _In_frees_malloc_mem_opt_ -#elif defined(_SAL_VERSION) && _SAL_VERSION == 10 -#define _When_windrv_(annos) annos -#define _Ret_allocates_malloc_mem_opt_bytecap_(_Cap) __drv_allocatesMem("Memory") __checkReturn __post __byte_writableTo(_Cap) __exceptthat __maybenull -#define _Ret_allocates_malloc_mem_opt_bytecount_(_Count) __drv_allocatesMem("Memory") __checkReturn __post __byte_readableTo(_Count) __exceptthat __maybenull -#define _Ret_allocates_malloc_mem_opt_bytecap_post_bytecount_(_Cap,_Count) __drv_allocatesMem("Memory") __checkReturn __post __byte_writableTo(_Cap) __byte_readableTo(_Count) __exceptthat __maybenull -#define _Ret_allocates_malloc_mem_opt_z_bytecount_(_Count) __drv_allocatesMem("Memory") __checkReturn __post __byte_readableTo(_Count) __valid __nullterminated __exceptthat __maybenull -#define _Ret_allocates_malloc_mem_opt_z_ __drv_allocatesMem("Memory") __checkReturn __post __valid __nullterminated __exceptthat __maybenull -#define _In_frees_malloc_mem_opt_ __drv_freesMem("Memory") __in_opt __post __notvalid #else #define _When_windrv_(annos) annos #define _Ret_allocates_malloc_mem_opt_bytecap_(_Cap) __drv_allocatesMem("Memory") _Must_inspect_result_ _Ret_opt_bytecap_(_Cap) diff --git a/open-vm-tools/modules/shared/vmxnet/vmnet_def.h b/open-vm-tools/modules/shared/vmxnet/vmnet_def.h index 999c1bcb9..112480f3a 100644 --- a/open-vm-tools/modules/shared/vmxnet/vmnet_def.h +++ b/open-vm-tools/modules/shared/vmxnet/vmnet_def.h @@ -113,6 +113,7 @@ #define VMNET_CAP_TRANSCEIVER_TYPE CONST64U(0x10000000000000) /* Uplink supports getting and setting transceiver type. */ #define VMNET_CAP_MESSAGE_LEVEL CONST64U(0x20000000000000) /* Uplink supports getting and setting message level. */ #define VMNET_CAP_RING_PARAMS CONST64U(0x40000000000000) /* Support getting/setting RX/TX ring size parameters */ +#define VMNET_CAP_ADVERTISE_MODES CONST64U(0x80000000000000) /* Support getting/setting interconnect modes */ #define VMNET_CAP_LEGACY CONST64U(0x8000000000000000) /* Uplink is compatible with vmklinux drivers */ #endif // _VMNET_DEF_H_ diff --git a/open-vm-tools/modules/shared/vmxnet/vmxnet3_defs.h b/open-vm-tools/modules/shared/vmxnet/vmxnet3_defs.h index dfc4657d7..d593265c8 100644 --- a/open-vm-tools/modules/shared/vmxnet/vmxnet3_defs.h +++ b/open-vm-tools/modules/shared/vmxnet/vmxnet3_defs.h @@ -121,6 +121,7 @@ typedef enum { VMXNET3_CMD_STOP_EMULATION, VMXNET3_CMD_LOAD_PLUGIN, VMXNET3_CMD_ACTIVATE_VF, + VMXNET3_CMD_SET_POLLING, VMXNET3_CMD_FIRST_GET = 0xF00D0000, VMXNET3_CMD_GET_QUEUE_STATUS = VMXNET3_CMD_FIRST_GET, @@ -133,6 +134,7 @@ typedef enum { VMXNET3_CMD_GET_DEV_EXTRA_INFO, VMXNET3_CMD_GET_CONF_INTR, VMXNET3_CMD_GET_ADAPTIVE_RING_INFO + } Vmxnet3_Cmd; /* Adaptive Ring Info Flags */ @@ -733,6 +735,29 @@ struct Vmxnet3_RxQueueDesc { #include "vmware_pack_end.h" Vmxnet3_RxQueueDesc; +typedef +#include "vmware_pack_begin.h" +struct Vmxnet3_SetPolling { + uint8 enablePolling; +} +#include "vmware_pack_end.h" +Vmxnet3_SetPolling; + +/* + * If a command data does not exceed 16 bytes, it can use + * the shared memory directly. Otherwise use variable length + * configuration descriptor to pass the data. + */ +typedef +#include "vmware_pack_begin.h" +union Vmxnet3_CmdInfo { + Vmxnet3_VariableLenConfDesc varConf; + Vmxnet3_SetPolling setPolling; + __le64 data[2]; +} +#include "vmware_pack_end.h" +Vmxnet3_CmdInfo; + typedef #include "vmware_pack_begin.h" struct Vmxnet3_DriverShared { @@ -740,7 +765,13 @@ struct Vmxnet3_DriverShared { __le32 pad; /* make devRead start at 64-bit boundaries */ Vmxnet3_DSDevRead devRead; __le32 ecr; - __le32 reserved[5]; + __le32 reserved; + union { + __le32 reserved1[4]; + Vmxnet3_CmdInfo cmdInfo; /* only valid in the context of executing the relevant + * command. + */ + } cu; } #include "vmware_pack_end.h" Vmxnet3_DriverShared; diff --git a/open-vm-tools/modules/solaris/vmhgfs/kernelStubs.h b/open-vm-tools/modules/solaris/vmhgfs/kernelStubs.h index 1f8fef073..0f38b206d 100644 --- a/open-vm-tools/modules/solaris/vmhgfs/kernelStubs.h +++ b/open-vm-tools/modules/solaris/vmhgfs/kernelStubs.h @@ -59,6 +59,8 @@ # include "vm_assert.h" # elif KRNL_STUBS_DRIVER_TYPE == KRNL_STUBS_DRIVER_TYPE_NDIS # include "vm_basic_types.h" +# include +# include "kernelStubsFloorFixes.h" # include # elif KRNL_STUBS_DRIVER_TYPE == KRNL_STUBS_DRIVER_TYPE_WDM # include "vm_basic_types.h" @@ -72,6 +74,7 @@ # include /* for min macro. */ # include "vm_basic_defs.h" # include "vm_assert.h" /* Our assert macros */ +# include "kernelStubsFloorFixes.h" # else # error Type KRNL_STUBS_DRIVER_TYPE must be defined. # endif diff --git a/open-vm-tools/namespacetool/COPYING b/open-vm-tools/namespacetool/COPYING new file mode 100644 index 000000000..09f465ab7 --- /dev/null +++ b/open-vm-tools/namespacetool/COPYING @@ -0,0 +1,502 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This 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. + + This 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 this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! diff --git a/open-vm-tools/namespacetool/Makefile.am b/open-vm-tools/namespacetool/Makefile.am new file mode 100644 index 000000000..883c7f1db --- /dev/null +++ b/open-vm-tools/namespacetool/Makefile.am @@ -0,0 +1,40 @@ +################################################################################ +### Copyright (C) 2016 VMware, Inc. All rights reserved. +### +### This program is free software; you can redistribute it and/or modify +### it under the terms of version 2 of the GNU General Public License as +### published by the Free Software Foundation. +### +### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +################################################################################ + +bin_PROGRAMS = vmware-namespace-cmd + +vmware_namespace_cmd_SOURCES = +vmware_namespace_cmd_SOURCES += namespacetool.c + +vmware_namespace_cmd_CPPFLAGS = +vmware_namespace_cmd_CPPFLAGS += -DVMTOOLS_USE_GLIB +vmware_namespace_cmd_CPPFLAGS += @GLIB2_CPPFLAGS@ +vmware_namespace_cmd_CPPFLAGS += -I$(top_srcdir)/libvmtools + +vmware_namespace_cmd_LDADD = +vmware_namespace_cmd_LDADD += @VMTOOLS_LIBS@ +vmware_namespace_cmd_LDADD += @GLIB2_LIBS@ + +if HAVE_ICU + vmware_namespace_cmd_LDADD += @ICU_LIBS@ + vmware_namespace_cmd_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXX) \ + $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +else + vmware_namespace_cmd_LINK = $(LINK) +endif \ No newline at end of file diff --git a/open-vm-tools/namespacetool/namespacetool.c b/open-vm-tools/namespacetool/namespacetool.c new file mode 100644 index 000000000..6e7f55400 --- /dev/null +++ b/open-vm-tools/namespacetool/namespacetool.c @@ -0,0 +1,774 @@ +/********************************************************* + * Copyright (C) 2015 VMware, Inc. All rights reserved. + * + * This program 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 version 2.1 and no 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 Lesser GNU General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + *********************************************************/ + +/* + * namespacetool.c -- + * + * Command line tool to communicate namespace DB. + */ + +#include +#include +#include "vmware.h" +#include "str.h" +#include "util.h" +#include "dynbuf.h" +#include "vmware/tools/guestrpc.h" + +// Core Namespace commands +#define NSDB_PRIV_GET_VALUES_CMD "namespace-priv-get-values" +#define NSDB_PRIV_SET_KEYS_CMD "namespace-priv-set-keys" + +// namespace commands for end user +#define NSDB_GET_VALUE_USER_CMD "get-value" +#define NSDB_SET_KEY_USER_CMD "set-key" +#define NSDB_DEL_KEY_USER_CMD "delete-key" + +#define SUPPORTED_FILE_SIZE_IN_BYTES (16 * 1024) // Refer to namespaceDb.h + +/* + * Aggregation of command options. + */ + +typedef struct NamespaceOptionsState { + gchar *cmdName; + gchar *nsName; + gchar *keyName; //for command set-key or delete-key or get-value + gchar *valueToSet; + gchar *oldValueToSet; + gchar *getValueFromFile; + gboolean verboseLogFlag; + gboolean standardInput; +} NamespaceOptionsState; + +static gchar *gAppName = NULL; + + +/* + ****************************************************************************** + * PrintUsage -- + * + * Prints the usage mesage. + * + ****************************************************************************** + */ + +static void +PrintUsage(GOptionContext *optCtx) +{ + gchar *usage; + + usage = g_option_context_get_help(optCtx, TRUE, NULL); + g_printerr("%s", usage); + g_free(usage); +} + + +/* + ****************************************************************************** + * GetInternalNamespaceCommand -- + * + * Namespacetool should allow only privilege namespaceDB. + * + * @param[in] cmd namespace command name. + * + * @return internal namespace command + * + ****************************************************************************** + */ + +static char* +GetInternalNamespaceCommand(const gchar *cmd) +{ + if (g_strcmp0(cmd, NSDB_GET_VALUE_USER_CMD) == 0) { + return NSDB_PRIV_GET_VALUES_CMD; + } else if (g_strcmp0(cmd, NSDB_SET_KEY_USER_CMD) == 0) { + return NSDB_PRIV_SET_KEYS_CMD; + } else if (g_strcmp0(cmd, NSDB_DEL_KEY_USER_CMD) == 0) { + return NSDB_PRIV_SET_KEYS_CMD; + } else { + return NULL; + } +} + + +/* + ****************************************************************************** + * ValidateNSCommands -- + * + * Namespacetool should allow only privilege and non privilege commands of + * namespaceDB. + * @param[in] cmdName namespace command name. + * + * @return TRUE if successful, FALSE otherwise. + * + ****************************************************************************** + */ + +static gboolean +ValidateNSCommands(const gchar *cmdName) +{ + if ((g_strcmp0(cmdName, NSDB_GET_VALUE_USER_CMD) == 0) || + (g_strcmp0(cmdName, NSDB_SET_KEY_USER_CMD) == 0) || + (g_strcmp0(cmdName, NSDB_DEL_KEY_USER_CMD) == 0)) { + return TRUE; + } else { + fprintf(stderr, "Invalid command \"%s\"\n", cmdName); + return FALSE; + } +} + + +/* + ******************************************************************************* + * PrintInternalCommand -- + * + * Prints internal command in verbose mode + * + * @param[in] data set of strings which has '\0' as a delimiter. + * @param[in] dataSize size of data. + * + ******************************************************************************* + */ + +static void +PrintInternalCommand(const char *data, size_t dataSize) +{ + int readCounter = 0; + char *tmp = NULL; + char *printBuf = NULL; + if (dataSize > 0) { + printBuf = (char *) calloc((int)dataSize, sizeof(char)); + if (printBuf == NULL) { + fprintf(stderr, "Out of memory error"); + return; + } + tmp = printBuf; + while (dataSize > readCounter) { + if (*data != '\0') { + *printBuf++ = *data; + } else if (readCounter < dataSize - 1) { + *printBuf++ = ','; + } + ++data; + ++readCounter; + } + fprintf(stdout, "Internal command is %s\n", tmp); + } + free(tmp); +} + + +/* + ****************************************************************************** + * GetValueFromStdin -- + * + * Get standard input as a value + * + * @param[Out] data return standard input strings. This data is terminated + * by an extra nul character, but there may be other + * nuls in the intervening data. + * @param[Out] length return length of standard input strings. + * + * @return TRUE on success or FALSE if stdin data is empty or more than Max + * limit + * + ****************************************************************************** + */ + +static Bool +GetValueFromStdin(gchar **data, gsize *length) +{ + GError *gErr = NULL; + GIOStatus status; + GIOChannel* iochannel; + Bool retVal = TRUE; +#if defined(_WIN32) + iochannel = g_io_channel_win32_new_fd(0); +#else + iochannel = g_io_channel_unix_new(0); +#endif + /** + * This function never returns EOF + */ + status = g_io_channel_read_to_end(iochannel, data, length, &gErr); + + if (status != G_IO_STATUS_NORMAL) { + fprintf(stderr, "%s: Read failed from stdin with status code %d. %s\n", + gAppName, status, (gErr != NULL ? gErr->message : "")); + retVal = FALSE; + } else { + if (*length > SUPPORTED_FILE_SIZE_IN_BYTES) { + retVal = FALSE; + fprintf(stderr, "%s: stdin data must not exceed %d bytes\n", + gAppName, SUPPORTED_FILE_SIZE_IN_BYTES); + } else if (*length == 0) { + retVal = FALSE; + fprintf(stderr, "%s: stdin data must not be empty\n", gAppName); + } + } + if (retVal == FALSE) { + g_free(*data); + *data = NULL; + *length = 0; + } + g_free(gErr); + return retVal; +} + + +/* + ****************************************************************************** + * GetValueFromFile -- + * + * Read file contents as a string. + * + * @param[in] filePath file path + * @param[out] fileContents file contents + * @param[out] length length of file + * + * @return TRUE on success or FALSE if file is empty or more than Max limit + * + ****************************************************************************** + */ + +static Bool +GetValueFromFile(const char *filePath, char **fileContents, gsize *length) +{ + GError *gErr = NULL; + Bool retVal = FALSE; + retVal = g_file_get_contents(filePath, fileContents, length, &gErr); + if (retVal == FALSE) { + fprintf(stderr, "%s: %s: %s\n", gAppName, + (gErr != NULL ? gErr->message : "Failed while reading file"), + filePath); + } else { + if (*length > SUPPORTED_FILE_SIZE_IN_BYTES) { + retVal = FALSE; + fprintf(stderr, "%s: File size must not exceed %d bytes\n", + gAppName, SUPPORTED_FILE_SIZE_IN_BYTES); + } else if (*length == 0) { + retVal = FALSE; + fprintf(stderr, "%s: File must not be empty\n", gAppName); + } + } + if (retVal == FALSE) { + g_free(*fileContents); + *fileContents = NULL; + *length = 0; + } + g_free(gErr); + return retVal; +} + + +/* + ****************************************************************************** + * RunNamespaceCommand -- + * + * Processes the namespace command for get/set/delete key. + * @param[in] nsOptions Parsed namespace command line options will + * be placed in this struct. + * + * @return TRUE if successful, FALSE otherwise. + * + ****************************************************************************** + */ + +static Bool +RunNamespaceCommand(NamespaceOptionsState *nsOptions) +{ + char *result = NULL; + size_t resultLen = 0; + Bool status = FALSE; + gchar *opCode = NULL; + gchar *keyValueData = NULL; + gsize keyValueLength = 0; + + const char *nscmd = GetInternalNamespaceCommand(nsOptions->cmdName); + + DynBuf buf; + ASSERT(nscmd); + DynBuf_Init(&buf); + if (!DynBuf_Append(&buf, nscmd, strlen(nscmd)) || + !DynBuf_Append(&buf, " ", 1) || + !DynBuf_AppendString(&buf, nsOptions->nsName)) { + fprintf(stderr, "Could not construct request buffer\n"); + goto exit; + } + if (strlen(nsOptions->oldValueToSet) == 0) { + opCode = g_strdup("0"); + } else { + opCode = g_strdup("1"); + } + if (g_strcmp0(nsOptions->cmdName, NSDB_GET_VALUE_USER_CMD) == 0) { + ASSERT(nsOptions->keyName); + if (!DynBuf_AppendString(&buf, nsOptions->keyName)) { + fprintf(stderr, "Could not construct request buffer\n"); + goto exit; + } + } else if (g_strcmp0(nsOptions->cmdName, NSDB_SET_KEY_USER_CMD) == 0) { + ASSERT(nsOptions->keyName); + if (!DynBuf_AppendString(&buf, "1") || // numOps + !DynBuf_AppendString(&buf, opCode)|| + !DynBuf_AppendString(&buf, nsOptions->keyName)) { + fprintf(stderr, "Could not construct request buffer\n"); + goto exit; + } + if (nsOptions->getValueFromFile == NULL) { + if (nsOptions->valueToSet != NULL) { + if (strlen(nsOptions->valueToSet) == 0) { + fprintf(stderr, "%s: Key value must not be empty\n", gAppName); + goto exit; + } + if (!DynBuf_AppendString(&buf, nsOptions->valueToSet) || + !DynBuf_AppendString(&buf, nsOptions->oldValueToSet)) { + fprintf(stderr, "Could not construct request buffer\n"); + goto exit; + } + } else { + if (GetValueFromStdin(&keyValueData, &keyValueLength) == FALSE) { + goto exit; + } + if (!DynBuf_Append(&buf, keyValueData, keyValueLength + 1) || + !DynBuf_AppendString(&buf, nsOptions->oldValueToSet)) { + fprintf(stderr, "Could not construct request buffer\n"); + goto exit; + } + } + } else { + if (GetValueFromFile(nsOptions->getValueFromFile, + &keyValueData, &keyValueLength) == FALSE) { + goto exit; + } + if (!DynBuf_Append(&buf, keyValueData, keyValueLength + 1) || + !DynBuf_AppendString(&buf, nsOptions->oldValueToSet)) { + fprintf(stderr, "Could not construct request buffer\n"); + goto exit; + } + } + } else if (g_strcmp0(nsOptions->cmdName, NSDB_DEL_KEY_USER_CMD) == 0) { + ASSERT(nsOptions->keyName); + if (!DynBuf_AppendString(&buf, "1") || + !DynBuf_AppendString(&buf, opCode) || + !DynBuf_AppendString(&buf, nsOptions->keyName) || + !DynBuf_AppendString(&buf, "") || // zero length for value to delete + !DynBuf_AppendString(&buf, nsOptions->oldValueToSet)) { + fprintf(stderr, "Could not construct request buffer\n"); + goto exit; + } + } + + if (nsOptions->verboseLogFlag) { + PrintInternalCommand(DynBuf_Get(&buf), DynBuf_GetSize(&buf)); + } + + status = RpcChannel_SendOneRaw(DynBuf_Get(&buf), + DynBuf_GetSize(&buf), &result, &resultLen); + if (!status) { + fprintf(stderr, "failure: %s\n", + result && *result ? result : "unknown"); + } else { + char *p = result; + if (resultLen == 0) { + if (nsOptions->verboseLogFlag) { + printf("success\n"); + } + } else { + if (nsOptions->verboseLogFlag) { + printf("success - result:"); + } + while (p < result + resultLen) { + printf("%s", p); + p += strlen(p) + 1; + } + } + fflush(stdout); + } + free( result); + + exit: + DynBuf_Destroy(&buf); + fflush(stderr); + g_free(keyValueData); + g_free(opCode); + return status; +} + + +/* + ****************************************************************************** + * PostVerifyGetValueOptions -- + * + * Post parse hook to verify namespace command get-value + * + * @param[in] context Unused. + * @param[in] group Unused. + * @param[in] data Unused. + * @param[out] error Setting error message to display in case of invalid + * command line options. + * + * @return TRUE if successful, FALSE if option is invalid. + * + ****************************************************************************** + */ + +static gboolean +PostVerifyGetValueOptions(GOptionContext *context, GOptionGroup *group, + gpointer data, GError **error) +{ + NamespaceOptionsState *nsOptions; + ASSERT(data); + nsOptions = (NamespaceOptionsState *) data; + if (nsOptions->cmdName == NULL) { + g_set_error(error, G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE, + "Namespace command must be specified"); + return FALSE; + } + if (nsOptions->nsName == NULL) { + g_set_error(error, G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE, + "Namespace name must be specified"); + return FALSE; + } + if (g_strcmp0(nsOptions->cmdName, NSDB_GET_VALUE_USER_CMD) == 0) { + if (nsOptions->keyName == NULL) { + g_set_error(error, G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE, + "Key name must be specified"); + return FALSE; + } + } + return TRUE; +} + + +/* + ****************************************************************************** + * PostVerifyDeleteKeyOptions -- + * + * Post parse hook to verify namespace command delete-key + * + * @param[in] context Unused. + * @param[in] group Unused. + * @param[in] data Unused. + * @param[out] error Setting error message to display in case of invalid + * command line options. + * + * @return TRUE if successful, FALSE if option is invalid. + * + ****************************************************************************** + */ + +static gboolean +PostVerifyDeleteKeyOptions(GOptionContext *context, GOptionGroup *group, + gpointer data, GError **error) +{ + NamespaceOptionsState *nsOptions; + ASSERT(data); + nsOptions = (NamespaceOptionsState *) data; + + if (nsOptions->cmdName == NULL) { + g_set_error(error, G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE, + "Namespace command must be specified"); + return FALSE; + } + if (nsOptions->nsName == NULL) { + g_set_error(error, G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE, + "Namespace name must be specified"); + return FALSE; + } + if (g_strcmp0(nsOptions->cmdName, NSDB_DEL_KEY_USER_CMD) == 0) { + if (nsOptions->keyName == NULL) { + g_set_error(error, G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE, + "Key name must be specified"); + return FALSE; + } + } + return TRUE; +} + + +/* + ****************************************************************************** + * PostVerifySetKeyOptions -- + * + * Post parse hook to verify namespace command set-key + * + * @param[in] context Unused. + * @param[in] group Unused. + * @param[in] data Unused. + * @param[out] error Setting error message to display in case of invalid + * command line options. + * + * @return TRUE if successful, FALSE if option is invalid. + * + ****************************************************************************** + */ + +static gboolean +PostVerifySetKeyOptions(GOptionContext *context, GOptionGroup *group, + gpointer data, GError **error) +{ + int usedOptions = 0; + NamespaceOptionsState *nsOptions; + ASSERT(data); + nsOptions = (NamespaceOptionsState *) data; + + if (nsOptions->cmdName == NULL) { + g_set_error(error, G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE, + "Namespace command must be specified"); + return FALSE; + } + if (nsOptions->nsName == NULL) { + g_set_error(error, G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE, + "Namespace name must be specified"); + return FALSE; + } + if (g_strcmp0(nsOptions->cmdName, NSDB_SET_KEY_USER_CMD) == 0) { + if (nsOptions->keyName == NULL) { + g_set_error(error, G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE, + "Key name must be specified"); + return FALSE; + } + if (nsOptions->valueToSet != NULL) { + ++usedOptions; + } + if (nsOptions->getValueFromFile != NULL) { + ++usedOptions; + } + if (nsOptions->standardInput == 1) { + ++usedOptions; + } + if ((usedOptions > 1) || (usedOptions == 0)) { + g_set_error(error, G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE, + "Key value must be specified with either -f or -v or -s"); + return FALSE; + } + } + return TRUE; +} + + +/* + ****************************************************************************** + * Panic -- + * + * Panic hook for backdoor code. + * + * @param[in] fmt Message format + * + ****************************************************************************** + */ + +void +Panic(const char *fmt, ...) +{ + va_list args; + static char buf[1024]; + + va_start(args, fmt); + Str_Vsnprintf(buf, sizeof buf, fmt, args); + va_end(args); + + fputs(buf, stderr); + abort(); +} + + +/* + ****************************************************************************** + * Debug -- + * + * Debug hook for backdoor code. + * + * @param[in] fmt Message format + * + ****************************************************************************** + */ + +void +Debug(char *fmt, ...) +{ +#if defined(VMX86_DEBUG) || defined(VMX86_DEVEL) + va_list args; + char *buf; + + va_start(args, fmt); + buf = Str_Vasprintf(NULL, fmt, args); + va_end(args); + + fprintf(stderr, "%s: %s\n", gAppName, buf); + fflush(stderr); +#else + /* No output in non-debug/non-developer builds */ +#endif +} + + +/* + ****************************************************************************** + * main -- + * + * Main entry point. + * + * @param[in] argc Number of args. + * @param[in] argv The args. + * + ****************************************************************************** + */ + +int +main(int argc, char *argv[]) +{ + int success = -1; + GError *gErr = NULL; + gchar *descriptionBuf; + gchar *helpBuf; + GOptionContext *optCtx; + GOptionGroup *gr; + gchar *summary; + NamespaceOptionsState nsOptions = { NULL, NULL, NULL, NULL, "", + NULL, FALSE, FALSE}; + + //Options for namespacetool commands + + GOptionEntry mainEntry[] = { + { "verbose", 'V', 0, G_OPTION_ARG_NONE, &nsOptions.verboseLogFlag, + "Verbose logging mode", NULL }, + { NULL } + }; + GOptionEntry getValuesEntry[] = { + { "key", 'k', G_OPTION_FLAG_NOALIAS, G_OPTION_ARG_STRING, &nsOptions.keyName, + "Key value to return", "" }, + { NULL } + }; + GOptionEntry setKeysEntry[] = { + { "key", 'k', G_OPTION_FLAG_NOALIAS, G_OPTION_ARG_STRING, + &nsOptions.keyName, "Key name to use", "" }, + { "value", 'v', 0, G_OPTION_ARG_STRING, &nsOptions.valueToSet, + "Value to set", ""}, + { "oldValue", 'o', 0, G_OPTION_ARG_STRING, &nsOptions.oldValueToSet, + "Value must match with current key value in the " + "namespace for update operation to proceed", ""}, + { "fromFile", 'f', 0, G_OPTION_ARG_STRING, &nsOptions.getValueFromFile, + "Value to use from file path", ""}, + { "stdin", 's', 0, G_OPTION_ARG_NONE, &nsOptions.standardInput, + "Value to use from standard input", NULL}, + { NULL } + }; + GOptionEntry deleteKeyEntry[] = { + { "key", 'k', G_OPTION_FLAG_NOALIAS, G_OPTION_ARG_STRING, + &nsOptions.keyName, "Key name to use", ""}, + { "oldValue", 'o', G_OPTION_FLAG_NOALIAS, G_OPTION_ARG_STRING, + &nsOptions.oldValueToSet, + "Value must match with current key value in " + "the namespace for delete operation to proceed", ""}, + { NULL } + }; + + gAppName = g_path_get_basename(argv[0]); + g_set_prgname(gAppName); + + optCtx = g_option_context_new("[get-value | set-key | delete-key] " + "[]"); + + gr = g_option_group_new("namespace commands", "", "", optCtx, NULL); + g_option_group_add_entries(gr, mainEntry); + g_option_context_set_main_group(optCtx, gr); + + summary = g_strdup_printf("Example:\n %s set-key " + "-k -v \n %s set-key " + " -k -f " + "\n echo \"\" | %s set-key " + " -k -s\n %s " + "delete-key -k " + "\n %s get-value " + "-k \n", gAppName, + gAppName, gAppName, gAppName, gAppName); + g_option_context_set_summary(optCtx, summary); + + if (argc > 1) { + nsOptions.cmdName = g_strdup(argv[1]); + } + if (argc > 2) { + nsOptions.nsName = g_strdup(argv[2]); + } + //Namespacetool command - namespace-get-values + descriptionBuf = g_strdup_printf("%s command %s:", gAppName, + NSDB_GET_VALUE_USER_CMD); + helpBuf = g_strdup_printf("Show help for command \"%s\"", + NSDB_GET_VALUE_USER_CMD); + gr = g_option_group_new(NSDB_GET_VALUE_USER_CMD, descriptionBuf, + helpBuf, &nsOptions, NULL); + g_free(descriptionBuf); + g_free(helpBuf); + g_option_group_add_entries(gr, getValuesEntry); + g_option_context_add_group(optCtx, gr); + g_option_group_set_parse_hooks(gr, NULL, PostVerifyGetValueOptions); + + //Namespacetool command - namespace-set-keys + descriptionBuf = g_strdup_printf("%s command %s: - " + "Create or update key value pair\n", + gAppName, NSDB_SET_KEY_USER_CMD); + helpBuf = g_strdup_printf ("Show help for command \"%s\"", + NSDB_SET_KEY_USER_CMD); + + gr = g_option_group_new(NSDB_SET_KEY_USER_CMD, descriptionBuf, helpBuf, + &nsOptions, NULL); + g_free(descriptionBuf); + g_free(helpBuf); + g_option_group_add_entries(gr, setKeysEntry); + g_option_context_add_group(optCtx, gr); + g_option_group_set_parse_hooks(gr, NULL, PostVerifySetKeyOptions); + + //Namespacetool command - namespace-set-key for deleting key + descriptionBuf = g_strdup_printf("%s command %s:- Delete key value pair\n", + gAppName, NSDB_DEL_KEY_USER_CMD); + helpBuf = g_strdup_printf("Show help for command \"%s\"", + NSDB_DEL_KEY_USER_CMD); + + gr = g_option_group_new(NSDB_DEL_KEY_USER_CMD, descriptionBuf, helpBuf, + &nsOptions, NULL); + g_free(descriptionBuf); + g_free(helpBuf); + g_option_group_add_entries(gr, deleteKeyEntry); + g_option_context_add_group(optCtx, gr); + g_option_group_set_parse_hooks(gr, NULL, PostVerifyDeleteKeyOptions); + + if (!g_option_context_parse(optCtx, &argc, &argv, &gErr)) { + PrintUsage(optCtx); + fprintf(stderr, "%s: %s\n", gAppName, (gErr != NULL ? gErr->message : "")); + g_error_free(gErr); + goto exit; + } + + /* + * Validating namespace command name after g_context_parser + * because argv[1] can have string "--help" + */ + if (argc > 1 && ValidateNSCommands(argv[1]) == FALSE) { + goto exit; + } + + success = RunNamespaceCommand(&nsOptions) ? 0 : 1; + + exit: + g_option_context_free(optCtx); + g_free(summary); + g_free(gAppName); + return success; +} diff --git a/open-vm-tools/rpctool/Makefile.in b/open-vm-tools/rpctool/Makefile.in deleted file mode 100644 index a6a320e53..000000000 --- a/open-vm-tools/rpctool/Makefile.in +++ /dev/null @@ -1,562 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -bin_PROGRAMS = vmware-rpctool$(EXEEXT) -subdir = rpctool -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) -PROGRAMS = $(bin_PROGRAMS) -am_vmware_rpctool_OBJECTS = rpctool.$(OBJEXT) -vmware_rpctool_OBJECTS = $(am_vmware_rpctool_OBJECTS) -vmware_rpctool_DEPENDENCIES = ../lib/rpcOut/libRpcOut.la \ - ../lib/message/libMessage.la ../lib/backdoor/libBackdoor.la \ - ../lib/string/libString.la -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(vmware_rpctool_SOURCES) -DIST_SOURCES = $(vmware_rpctool_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -vmware_rpctool_SOURCES = rpctool.c -vmware_rpctool_LDADD = ../lib/rpcOut/libRpcOut.la \ - ../lib/message/libMessage.la ../lib/backdoor/libBackdoor.la \ - ../lib/string/libString.la -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu rpctool/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu rpctool/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ - else :; fi; \ - done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -vmware-rpctool$(EXEEXT): $(vmware_rpctool_OBJECTS) $(vmware_rpctool_DEPENDENCIES) - @rm -f vmware-rpctool$(EXEEXT) - $(LINK) $(vmware_rpctool_OBJECTS) $(vmware_rpctool_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rpctool.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: - for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: install-binPROGRAMS - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-binPROGRAMS - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/scripts/Makefile.in b/open-vm-tools/scripts/Makefile.in deleted file mode 100644 index 2e813d777..000000000 --- a/open-vm-tools/scripts/Makefile.in +++ /dev/null @@ -1,463 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@ENABLE_GRABBITMQPROXY_TRUE@am__append_1 = ./common/guestproxy-ssl.conf -subdir = scripts -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__installdirs = "$(DESTDIR)$(confdir)" "$(DESTDIR)$(vmwsrcdir)" -confSCRIPT_INSTALL = $(INSTALL_SCRIPT) -vmwsrcSCRIPT_INSTALL = $(INSTALL_SCRIPT) -SCRIPTS = $(conf_SCRIPTS) $(vmwsrc_SCRIPTS) -SOURCES = -DIST_SOURCES = -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -defaultscripts = poweron-vm-default poweroff-vm-default \ - suspend-vm-default resume-vm-default -confdir = /etc/vmware-tools -conf_SCRIPTS = ./common/vm-support ./common/statechange.subr \ - $(am__append_1) $(defaultscripts) -vmwsrcdir = $(confdir)/scripts/vmware -vmwsrc_SCRIPTS = $(MODULES_OS)/network -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu scripts/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu scripts/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-confSCRIPTS: $(conf_SCRIPTS) - @$(NORMAL_INSTALL) - test -z "$(confdir)" || $(MKDIR_P) "$(DESTDIR)$(confdir)" - @list='$(conf_SCRIPTS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - if test -f $$d$$p; then \ - f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " $(confSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(confdir)/$$f'"; \ - $(confSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(confdir)/$$f"; \ - else :; fi; \ - done - -uninstall-confSCRIPTS: - @$(NORMAL_UNINSTALL) - @list='$(conf_SCRIPTS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " rm -f '$(DESTDIR)$(confdir)/$$f'"; \ - rm -f "$(DESTDIR)$(confdir)/$$f"; \ - done -install-vmwsrcSCRIPTS: $(vmwsrc_SCRIPTS) - @$(NORMAL_INSTALL) - test -z "$(vmwsrcdir)" || $(MKDIR_P) "$(DESTDIR)$(vmwsrcdir)" - @list='$(vmwsrc_SCRIPTS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - if test -f $$d$$p; then \ - f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " $(vmwsrcSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(vmwsrcdir)/$$f'"; \ - $(vmwsrcSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(vmwsrcdir)/$$f"; \ - else :; fi; \ - done - -uninstall-vmwsrcSCRIPTS: - @$(NORMAL_UNINSTALL) - @list='$(vmwsrc_SCRIPTS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " rm -f '$(DESTDIR)$(vmwsrcdir)/$$f'"; \ - rm -f "$(DESTDIR)$(vmwsrcdir)/$$f"; \ - done - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(SCRIPTS) -installdirs: - for dir in "$(DESTDIR)$(confdir)" "$(DESTDIR)$(vmwsrcdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-confSCRIPTS install-vmwsrcSCRIPTS - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-confSCRIPTS uninstall-vmwsrcSCRIPTS - -.MAKE: install-am install-strip - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-confSCRIPTS install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip install-vmwsrcSCRIPTS installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-confSCRIPTS uninstall-vmwsrcSCRIPTS - - -$(defaultscripts): $(top_srcdir)/scripts/common/statechange.sh - cp $(top_srcdir)/scripts/common/statechange.sh $@ -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/scripts/linux/pam.d/vmtoolsd b/open-vm-tools/scripts/linux/pam.d/vmtoolsd index eb0599db0..380b2cb31 100644 --- a/open-vm-tools/scripts/linux/pam.d/vmtoolsd +++ b/open-vm-tools/scripts/linux/pam.d/vmtoolsd @@ -1,7 +1,5 @@ #%PAM-1.0 -auth sufficient pam_unix2.so auth sufficient pam_unix.so shadow auth required pam_unix_auth.so shadow -account sufficient pam_unix2.so account sufficient pam_unix.so account required pam_unix_acct.so diff --git a/open-vm-tools/services/Makefile.in b/open-vm-tools/services/Makefile.in deleted file mode 100644 index 282d9e086..000000000 --- a/open-vm-tools/services/Makefile.in +++ /dev/null @@ -1,581 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = services -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUBDIRS = vmtoolsd plugins -all: all-recursive - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu services/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu services/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-exec-am: - -install-html: install-html-recursive - -install-info: install-info-recursive - -install-man: - -install-pdf: install-pdf-recursive - -install-ps: install-ps-recursive - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ - install-strip - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - ctags ctags-recursive distclean distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/services/plugins/Makefile.in b/open-vm-tools/services/plugins/Makefile.in deleted file mode 100644 index d394536fa..000000000 --- a/open-vm-tools/services/plugins/Makefile.in +++ /dev/null @@ -1,601 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@HAVE_X11_TRUE@am__append_1 = desktopEvents -@HAVE_GTKMM_TRUE@am__append_2 = dndcp -@ENABLE_GRABBITMQPROXY_TRUE@am__append_3 = grabbitmqProxy -@ENABLE_DEPLOYPKG_TRUE@am__append_4 = deployPkg -@HAVE_X11_TRUE@am__append_5 = resolutionSet -subdir = services/plugins -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = desktopEvents dndcp grabbitmqProxy guestInfo hgfsServer \ - powerOps deployPkg resolutionSet timeSync vix vmbackup -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUBDIRS = $(am__append_1) $(am__append_2) $(am__append_3) guestInfo \ - hgfsServer powerOps $(am__append_4) $(am__append_5) timeSync \ - vix vmbackup -all: all-recursive - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu services/plugins/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu services/plugins/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-exec-am: install-exec-local - -install-html: install-html-recursive - -install-info: install-info-recursive - -install-man: - -install-pdf: install-pdf-recursive - -install-ps: install-ps-recursive - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ - install-strip - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - ctags ctags-recursive distclean distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-exec-local install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am tags tags-recursive uninstall uninstall-am - - -# -# plugin_LTLIBRARIES causes both .la and .so files to be installed to the -# plugin directories. Clean up the .la files and keep just the shared -# libraries around. Sometimes, even though we're passing "-shared" to -# libtool, .a files are also generated, so clean up those too. -# -install-exec-local: - rm -f $(DESTDIR)$(VMSVC_PLUGIN_INSTALLDIR)/*.a - rm -f $(DESTDIR)$(VMSVC_PLUGIN_INSTALLDIR)/*.la - rm -f $(DESTDIR)$(VMUSR_PLUGIN_INSTALLDIR)/*.a - rm -f $(DESTDIR)$(VMUSR_PLUGIN_INSTALLDIR)/*.la -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/services/plugins/deployPkg/Makefile.in b/open-vm-tools/services/plugins/deployPkg/Makefile.in deleted file mode 100644 index f0042f9e7..000000000 --- a/open-vm-tools/services/plugins/deployPkg/Makefile.in +++ /dev/null @@ -1,712 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2014-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = services/plugins/deployPkg -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(plugindir)" -pluginLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(plugin_LTLIBRARIES) -libdeployPkgPlugin_la_DEPENDENCIES = \ - $(top_builddir)/libDeployPkg/libDeployPkg.la -am_libdeployPkgPlugin_la_OBJECTS = libdeployPkgPlugin_la-deployPkg.lo \ - libdeployPkgPlugin_la-deployPkgLog.lo \ - libdeployPkgPlugin_la-deployPkgPlugin.lo -libdeployPkgPlugin_la_OBJECTS = $(am_libdeployPkgPlugin_la_OBJECTS) -libdeployPkgPlugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libdeployPkgPlugin_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libdeployPkgPlugin_la_SOURCES) -DIST_SOURCES = $(libdeployPkgPlugin_la_SOURCES) -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUBDIRS = -plugindir = @VMSVC_PLUGIN_INSTALLDIR@ -plugin_LTLIBRARIES = libdeployPkgPlugin.la -libdeployPkgPlugin_la_CPPFLAGS = @PLUGIN_CPPFLAGS@ -libdeployPkgPlugin_la_LDFLAGS = @PLUGIN_LDFLAGS@ -libdeployPkgPlugin_la_LIBADD = @VMTOOLS_LIBS@ \ - $(top_builddir)/libDeployPkg/libDeployPkg.la -libdeployPkgPlugin_la_SOURCES = deployPkg.c deployPkgInt.h \ - deployPkgLog.c deployPkgPlugin.c -all: all-recursive - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu services/plugins/deployPkg/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu services/plugins/deployPkg/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(plugindir)" || $(MKDIR_P) "$(DESTDIR)$(plugindir)" - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(plugindir)/$$f'"; \ - $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(plugindir)/$$f"; \ - else :; fi; \ - done - -uninstall-pluginLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$p"; \ - done - -clean-pluginLTLIBRARIES: - -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libdeployPkgPlugin.la: $(libdeployPkgPlugin_la_OBJECTS) $(libdeployPkgPlugin_la_DEPENDENCIES) - $(libdeployPkgPlugin_la_LINK) -rpath $(plugindir) $(libdeployPkgPlugin_la_OBJECTS) $(libdeployPkgPlugin_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdeployPkgPlugin_la-deployPkg.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdeployPkgPlugin_la-deployPkgLog.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdeployPkgPlugin_la-deployPkgPlugin.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libdeployPkgPlugin_la-deployPkg.lo: deployPkg.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdeployPkgPlugin_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdeployPkgPlugin_la-deployPkg.lo -MD -MP -MF $(DEPDIR)/libdeployPkgPlugin_la-deployPkg.Tpo -c -o libdeployPkgPlugin_la-deployPkg.lo `test -f 'deployPkg.c' || echo '$(srcdir)/'`deployPkg.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libdeployPkgPlugin_la-deployPkg.Tpo $(DEPDIR)/libdeployPkgPlugin_la-deployPkg.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='deployPkg.c' object='libdeployPkgPlugin_la-deployPkg.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdeployPkgPlugin_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdeployPkgPlugin_la-deployPkg.lo `test -f 'deployPkg.c' || echo '$(srcdir)/'`deployPkg.c - -libdeployPkgPlugin_la-deployPkgLog.lo: deployPkgLog.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdeployPkgPlugin_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdeployPkgPlugin_la-deployPkgLog.lo -MD -MP -MF $(DEPDIR)/libdeployPkgPlugin_la-deployPkgLog.Tpo -c -o libdeployPkgPlugin_la-deployPkgLog.lo `test -f 'deployPkgLog.c' || echo '$(srcdir)/'`deployPkgLog.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libdeployPkgPlugin_la-deployPkgLog.Tpo $(DEPDIR)/libdeployPkgPlugin_la-deployPkgLog.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='deployPkgLog.c' object='libdeployPkgPlugin_la-deployPkgLog.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdeployPkgPlugin_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdeployPkgPlugin_la-deployPkgLog.lo `test -f 'deployPkgLog.c' || echo '$(srcdir)/'`deployPkgLog.c - -libdeployPkgPlugin_la-deployPkgPlugin.lo: deployPkgPlugin.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdeployPkgPlugin_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdeployPkgPlugin_la-deployPkgPlugin.lo -MD -MP -MF $(DEPDIR)/libdeployPkgPlugin_la-deployPkgPlugin.Tpo -c -o libdeployPkgPlugin_la-deployPkgPlugin.lo `test -f 'deployPkgPlugin.c' || echo '$(srcdir)/'`deployPkgPlugin.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libdeployPkgPlugin_la-deployPkgPlugin.Tpo $(DEPDIR)/libdeployPkgPlugin_la-deployPkgPlugin.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='deployPkgPlugin.c' object='libdeployPkgPlugin_la-deployPkgPlugin.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdeployPkgPlugin_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdeployPkgPlugin_la-deployPkgPlugin.lo `test -f 'deployPkgPlugin.c' || echo '$(srcdir)/'`deployPkgPlugin.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile $(LTLIBRARIES) -installdirs: installdirs-recursive -installdirs-am: - for dir in "$(DESTDIR)$(plugindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -info: info-recursive - -info-am: - -install-data-am: install-pluginLTLIBRARIES - -install-dvi: install-dvi-recursive - -install-exec-am: - -install-html: install-html-recursive - -install-info: install-info-recursive - -install-man: - -install-pdf: install-pdf-recursive - -install-ps: install-ps-recursive - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: uninstall-pluginLTLIBRARIES - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ - install-strip - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - clean-pluginLTLIBRARIES ctags ctags-recursive distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-pluginLTLIBRARIES \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-recursive uninstall uninstall-am \ - uninstall-pluginLTLIBRARIES - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/services/plugins/desktopEvents/Makefile.in b/open-vm-tools/services/plugins/desktopEvents/Makefile.in deleted file mode 100644 index ede911520..000000000 --- a/open-vm-tools/services/plugins/desktopEvents/Makefile.in +++ /dev/null @@ -1,643 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2010-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@HAVE_XSM_TRUE@am__append_1 = @XSM_LIBS@ -@HAVE_XSM_TRUE@am__append_2 = sessionMgr.c sessionMgrSignals.c -subdir = services/plugins/desktopEvents -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(plugindir)" -pluginLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(plugin_LTLIBRARIES) -am__DEPENDENCIES_1 = -libdesktopEvents_la_DEPENDENCIES = $(am__DEPENDENCIES_1) -am__libdesktopEvents_la_SOURCES_DIST = desktopEvents.c reload.c \ - x11Lock.c xioError.c sessionMgr.c sessionMgrSignals.c -@HAVE_XSM_TRUE@am__objects_1 = libdesktopEvents_la-sessionMgr.lo \ -@HAVE_XSM_TRUE@ libdesktopEvents_la-sessionMgrSignals.lo -am_libdesktopEvents_la_OBJECTS = libdesktopEvents_la-desktopEvents.lo \ - libdesktopEvents_la-reload.lo libdesktopEvents_la-x11Lock.lo \ - libdesktopEvents_la-xioError.lo $(am__objects_1) -libdesktopEvents_la_OBJECTS = $(am_libdesktopEvents_la_OBJECTS) -libdesktopEvents_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libdesktopEvents_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libdesktopEvents_la_SOURCES) -DIST_SOURCES = $(am__libdesktopEvents_la_SOURCES_DIST) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -plugindir = @VMUSR_PLUGIN_INSTALLDIR@ -plugin_LTLIBRARIES = libdesktopEvents.la -libdesktopEvents_la_CPPFLAGS = @GTK_CPPFLAGS@ @PLUGIN_CPPFLAGS@ -libdesktopEvents_la_LDFLAGS = @PLUGIN_LDFLAGS@ -libdesktopEvents_la_LIBADD = @COMMON_XLIBS@ @GTK_LIBS@ @VMTOOLS_LIBS@ \ - $(am__append_1) -libdesktopEvents_la_SOURCES = desktopEvents.c reload.c x11Lock.c \ - xioError.c $(am__append_2) -@HAVE_XSM_TRUE@BUILT_SOURCES = sessionMgrSignals.c sessionMgrSignals.h -@HAVE_XSM_TRUE@CLEANFILES = sessionMgrSignals.c sessionMgrSignals.h -@HAVE_XSM_TRUE@EXTRA_DIST = sessionMgrSignals.gm -all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu services/plugins/desktopEvents/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu services/plugins/desktopEvents/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(plugindir)" || $(MKDIR_P) "$(DESTDIR)$(plugindir)" - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(plugindir)/$$f'"; \ - $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(plugindir)/$$f"; \ - else :; fi; \ - done - -uninstall-pluginLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$p"; \ - done - -clean-pluginLTLIBRARIES: - -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libdesktopEvents.la: $(libdesktopEvents_la_OBJECTS) $(libdesktopEvents_la_DEPENDENCIES) - $(libdesktopEvents_la_LINK) -rpath $(plugindir) $(libdesktopEvents_la_OBJECTS) $(libdesktopEvents_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdesktopEvents_la-desktopEvents.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdesktopEvents_la-reload.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdesktopEvents_la-sessionMgr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdesktopEvents_la-sessionMgrSignals.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdesktopEvents_la-x11Lock.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdesktopEvents_la-xioError.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libdesktopEvents_la-desktopEvents.lo: desktopEvents.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdesktopEvents_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdesktopEvents_la-desktopEvents.lo -MD -MP -MF $(DEPDIR)/libdesktopEvents_la-desktopEvents.Tpo -c -o libdesktopEvents_la-desktopEvents.lo `test -f 'desktopEvents.c' || echo '$(srcdir)/'`desktopEvents.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libdesktopEvents_la-desktopEvents.Tpo $(DEPDIR)/libdesktopEvents_la-desktopEvents.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='desktopEvents.c' object='libdesktopEvents_la-desktopEvents.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdesktopEvents_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdesktopEvents_la-desktopEvents.lo `test -f 'desktopEvents.c' || echo '$(srcdir)/'`desktopEvents.c - -libdesktopEvents_la-reload.lo: reload.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdesktopEvents_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdesktopEvents_la-reload.lo -MD -MP -MF $(DEPDIR)/libdesktopEvents_la-reload.Tpo -c -o libdesktopEvents_la-reload.lo `test -f 'reload.c' || echo '$(srcdir)/'`reload.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libdesktopEvents_la-reload.Tpo $(DEPDIR)/libdesktopEvents_la-reload.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='reload.c' object='libdesktopEvents_la-reload.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdesktopEvents_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdesktopEvents_la-reload.lo `test -f 'reload.c' || echo '$(srcdir)/'`reload.c - -libdesktopEvents_la-x11Lock.lo: x11Lock.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdesktopEvents_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdesktopEvents_la-x11Lock.lo -MD -MP -MF $(DEPDIR)/libdesktopEvents_la-x11Lock.Tpo -c -o libdesktopEvents_la-x11Lock.lo `test -f 'x11Lock.c' || echo '$(srcdir)/'`x11Lock.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libdesktopEvents_la-x11Lock.Tpo $(DEPDIR)/libdesktopEvents_la-x11Lock.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='x11Lock.c' object='libdesktopEvents_la-x11Lock.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdesktopEvents_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdesktopEvents_la-x11Lock.lo `test -f 'x11Lock.c' || echo '$(srcdir)/'`x11Lock.c - -libdesktopEvents_la-xioError.lo: xioError.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdesktopEvents_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdesktopEvents_la-xioError.lo -MD -MP -MF $(DEPDIR)/libdesktopEvents_la-xioError.Tpo -c -o libdesktopEvents_la-xioError.lo `test -f 'xioError.c' || echo '$(srcdir)/'`xioError.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libdesktopEvents_la-xioError.Tpo $(DEPDIR)/libdesktopEvents_la-xioError.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xioError.c' object='libdesktopEvents_la-xioError.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdesktopEvents_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdesktopEvents_la-xioError.lo `test -f 'xioError.c' || echo '$(srcdir)/'`xioError.c - -libdesktopEvents_la-sessionMgr.lo: sessionMgr.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdesktopEvents_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdesktopEvents_la-sessionMgr.lo -MD -MP -MF $(DEPDIR)/libdesktopEvents_la-sessionMgr.Tpo -c -o libdesktopEvents_la-sessionMgr.lo `test -f 'sessionMgr.c' || echo '$(srcdir)/'`sessionMgr.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libdesktopEvents_la-sessionMgr.Tpo $(DEPDIR)/libdesktopEvents_la-sessionMgr.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sessionMgr.c' object='libdesktopEvents_la-sessionMgr.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdesktopEvents_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdesktopEvents_la-sessionMgr.lo `test -f 'sessionMgr.c' || echo '$(srcdir)/'`sessionMgr.c - -libdesktopEvents_la-sessionMgrSignals.lo: sessionMgrSignals.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdesktopEvents_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdesktopEvents_la-sessionMgrSignals.lo -MD -MP -MF $(DEPDIR)/libdesktopEvents_la-sessionMgrSignals.Tpo -c -o libdesktopEvents_la-sessionMgrSignals.lo `test -f 'sessionMgrSignals.c' || echo '$(srcdir)/'`sessionMgrSignals.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libdesktopEvents_la-sessionMgrSignals.Tpo $(DEPDIR)/libdesktopEvents_la-sessionMgrSignals.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sessionMgrSignals.c' object='libdesktopEvents_la-sessionMgrSignals.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdesktopEvents_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdesktopEvents_la-sessionMgrSignals.lo `test -f 'sessionMgrSignals.c' || echo '$(srcdir)/'`sessionMgrSignals.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: - for dir in "$(DESTDIR)$(plugindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -clean: clean-am - -clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-pluginLTLIBRARIES - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-pluginLTLIBRARIES - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-pluginLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-pluginLTLIBRARIES \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-pluginLTLIBRARIES - - -@HAVE_XSM_TRUE@sessionMgrSignals.c: $(top_srcdir)/services/plugins/desktopEvents/sessionMgrSignals.gm -@HAVE_XSM_TRUE@ glib-genmarshal --body $(top_srcdir)/services/plugins/desktopEvents/sessionMgrSignals.gm > \ -@HAVE_XSM_TRUE@ $@ || (rm -f $@ && exit 1) - -@HAVE_XSM_TRUE@sessionMgrSignals.h: $(top_srcdir)/services/plugins/desktopEvents/sessionMgrSignals.gm -@HAVE_XSM_TRUE@ glib-genmarshal --header $(top_srcdir)/services/plugins/desktopEvents/sessionMgrSignals.gm > \ -@HAVE_XSM_TRUE@ $@ || (rm -f $@ && exit 1) -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/services/plugins/dndcp/Makefile.am b/open-vm-tools/services/plugins/dndcp/Makefile.am index 37e23c8ae..7dfdb76ba 100644 --- a/open-vm-tools/services/plugins/dndcp/Makefile.am +++ b/open-vm-tools/services/plugins/dndcp/Makefile.am @@ -15,6 +15,8 @@ ### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ################################################################################ +AUTOMAKE_OPTIONS = subdir-objects + plugindir = @VMUSR_PLUGIN_INSTALLDIR@ plugin_LTLIBRARIES = libdndcp.la @@ -26,7 +28,12 @@ libdndcp_la_CPPFLAGS += -I$(top_srcdir)/services/plugins/dndcp/dnd libdndcp_la_CPPFLAGS += -I$(top_srcdir)/services/plugins/dndcp/dndGuest libdndcp_la_CPPFLAGS += -I$(top_srcdir)/services/plugins/dndcp/stringxx libdndcp_la_CPPFLAGS += -I$(top_srcdir)/services/plugins/dndcp/xutils -libdndcp_la_CPPFLAGS += -I$(top_builddir)/include +libdndcp_la_CPPFLAGS += -I$(top_srcdir)/include + +# Passing C++ related flags to CPPFLAGS generates error. +# So, we need to pass these to C++ compilation only. +libdndcp_la_CXXFLAGS = +libdndcp_la_CXXFLAGS += @SIGCXX_CPPFLAGS@ libdndcp_la_LDFLAGS = libdndcp_la_LDFLAGS += @PLUGIN_LDFLAGS@ @@ -37,6 +44,7 @@ libdndcp_la_LIBADD += @GTK_LIBS@ libdndcp_la_LIBADD += @GTKMM_LIBS@ libdndcp_la_LIBADD += @VMTOOLS_LIBS@ libdndcp_la_LIBADD += @HGFS_LIBS@ +libdndcp_la_LIBADD += $(top_builddir)/lib/hgfsUri/hgfsUriPosix.lo libdndcp_la_SOURCES = @@ -77,6 +85,11 @@ libdndcp_la_SOURCES += dndcp.cpp libdndcp_la_SOURCES += dragDetWndX11.cpp libdndcp_la_SOURCES += pointer.cpp +if HAVE_MKDTEMP +libdndcp_la_CPPFLAGS += -DDND_IS_XDG +libdndcp_la_SOURCES += dnd/dndXdg.c +endif + BUILT_SOURCES = BUILT_SOURCES += cpFileContents.h BUILT_SOURCES += cpFileContents_xdr.c @@ -91,5 +104,3 @@ cpFileContents.h: cpFileContents.x cpFileContents_xdr.c: cpFileContents.x cpFileContents.h @RPCGEN_WRAPPER@ services/plugins/dndcp/cpFileContents.x $@ - - diff --git a/open-vm-tools/services/plugins/dndcp/Makefile.in b/open-vm-tools/services/plugins/dndcp/Makefile.in deleted file mode 100644 index 344d537cc..000000000 --- a/open-vm-tools/services/plugins/dndcp/Makefile.in +++ /dev/null @@ -1,943 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = services/plugins/dndcp -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(plugindir)" -pluginLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(plugin_LTLIBRARIES) -libdndcp_la_DEPENDENCIES = -am_libdndcp_la_OBJECTS = libdndcp_la-dndClipboard.lo \ - libdndcp_la-dndCommon.lo libdndcp_la-dndCPMsgV4.lo \ - libdndcp_la-dndLinux.lo libdndcp_la-dndMsg.lo \ - libdndcp_la-copyPasteRpcV3.lo libdndcp_la-dndFileList.lo \ - libdndcp_la-dndRpcV3.lo libdndcp_la-guestCopyPasteDest.lo \ - libdndcp_la-guestCopyPasteMgr.lo \ - libdndcp_la-guestCopyPasteSrc.lo libdndcp_la-guestDnDCPMgr.lo \ - libdndcp_la-guestDnDDest.lo libdndcp_la-guestDnDMgr.lo \ - libdndcp_la-guestDnDSrc.lo libdndcp_la-guestFileTransfer.lo \ - libdndcp_la-copyPasteRpcV4.lo libdndcp_la-dndRpcV4.lo \ - libdndcp_la-fileTransferRpcV4.lo libdndcp_la-rpcV3Util.lo \ - libdndcp_la-rpcV4Util.lo libdndcp_la-dndCPTransportGuestRpc.lo \ - libdndcp_la-string.lo libdndcp_la-xutils.lo \ - libdndcp_la-copyPasteCompat.lo \ - libdndcp_la-copyPasteCompatX11.lo \ - libdndcp_la-copyPasteDnDWrapper.lo \ - libdndcp_la-copyPasteDnDX11.lo libdndcp_la-copyPasteUIX11.lo \ - libdndcp_la-dndUIX11.lo libdndcp_la-dndcp.lo \ - libdndcp_la-dragDetWndX11.lo libdndcp_la-pointer.lo \ - libdndcp_la-cpFileContents_xdr.lo -libdndcp_la_OBJECTS = $(am_libdndcp_la_OBJECTS) -libdndcp_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(libdndcp_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libdndcp_la_SOURCES) -DIST_SOURCES = $(libdndcp_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -plugindir = @VMUSR_PLUGIN_INSTALLDIR@ -plugin_LTLIBRARIES = libdndcp.la -libdndcp_la_CPPFLAGS = @GTK_CPPFLAGS@ @GTKMM_CPPFLAGS@ \ - @PLUGIN_CPPFLAGS@ -I$(top_srcdir)/services/plugins/dndcp/dnd \ - -I$(top_srcdir)/services/plugins/dndcp/dndGuest \ - -I$(top_srcdir)/services/plugins/dndcp/stringxx \ - -I$(top_srcdir)/services/plugins/dndcp/xutils \ - -I$(top_builddir)/include -libdndcp_la_LDFLAGS = @PLUGIN_LDFLAGS@ -libdndcp_la_LIBADD = @COMMON_XLIBS@ @GTK_LIBS@ @GTKMM_LIBS@ \ - @VMTOOLS_LIBS@ @HGFS_LIBS@ $(am__empty) -libdndcp_la_SOURCES = dnd/dndClipboard.c dnd/dndCommon.c \ - dnd/dndCPMsgV4.c dnd/dndLinux.c dnd/dndMsg.c \ - dndGuest/copyPasteRpcV3.cc dndGuest/dndFileList.cc \ - dndGuest/dndRpcV3.cc dndGuest/guestCopyPasteDest.cc \ - dndGuest/guestCopyPasteMgr.cc dndGuest/guestCopyPasteSrc.cc \ - dndGuest/guestDnDCPMgr.cc dndGuest/guestDnDDest.cc \ - dndGuest/guestDnDMgr.cc dndGuest/guestDnDSrc.cc \ - dndGuest/guestFileTransfer.cc dndGuest/copyPasteRpcV4.cc \ - dndGuest/dndRpcV4.cc dndGuest/fileTransferRpcV4.cc \ - dndGuest/rpcV3Util.cpp dndGuest/rpcV4Util.cpp \ - dndGuest/dndCPTransportGuestRpc.cpp stringxx/string.cc \ - xutils/xutils.cc copyPasteCompat.c copyPasteCompatX11.c \ - copyPasteDnDWrapper.cpp copyPasteDnDX11.cpp copyPasteUIX11.cpp \ - dndUIX11.cpp dndcp.cpp dragDetWndX11.cpp pointer.cpp \ - cpFileContents_xdr.c -BUILT_SOURCES = cpFileContents.h cpFileContents_xdr.c -CLEANFILES = $(BUILT_SOURCES) -all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-am - -.SUFFIXES: -.SUFFIXES: .c .cc .cpp .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu services/plugins/dndcp/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu services/plugins/dndcp/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(plugindir)" || $(MKDIR_P) "$(DESTDIR)$(plugindir)" - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(plugindir)/$$f'"; \ - $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(plugindir)/$$f"; \ - else :; fi; \ - done - -uninstall-pluginLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$p"; \ - done - -clean-pluginLTLIBRARIES: - -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libdndcp.la: $(libdndcp_la_OBJECTS) $(libdndcp_la_DEPENDENCIES) - $(libdndcp_la_LINK) -rpath $(plugindir) $(libdndcp_la_OBJECTS) $(libdndcp_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-copyPasteCompat.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-copyPasteCompatX11.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-copyPasteDnDWrapper.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-copyPasteDnDX11.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-copyPasteRpcV3.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-copyPasteRpcV4.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-copyPasteUIX11.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-cpFileContents_xdr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-dndCPMsgV4.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-dndCPTransportGuestRpc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-dndClipboard.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-dndCommon.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-dndFileList.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-dndLinux.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-dndMsg.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-dndRpcV3.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-dndRpcV4.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-dndUIX11.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-dndcp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-dragDetWndX11.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-fileTransferRpcV4.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-guestCopyPasteDest.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-guestCopyPasteMgr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-guestCopyPasteSrc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-guestDnDCPMgr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-guestDnDDest.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-guestDnDMgr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-guestDnDSrc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-guestFileTransfer.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-pointer.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-rpcV3Util.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-rpcV4Util.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-string.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-xutils.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libdndcp_la-dndClipboard.lo: dnd/dndClipboard.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdndcp_la-dndClipboard.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-dndClipboard.Tpo -c -o libdndcp_la-dndClipboard.lo `test -f 'dnd/dndClipboard.c' || echo '$(srcdir)/'`dnd/dndClipboard.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libdndcp_la-dndClipboard.Tpo $(DEPDIR)/libdndcp_la-dndClipboard.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dnd/dndClipboard.c' object='libdndcp_la-dndClipboard.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdndcp_la-dndClipboard.lo `test -f 'dnd/dndClipboard.c' || echo '$(srcdir)/'`dnd/dndClipboard.c - -libdndcp_la-dndCommon.lo: dnd/dndCommon.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdndcp_la-dndCommon.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-dndCommon.Tpo -c -o libdndcp_la-dndCommon.lo `test -f 'dnd/dndCommon.c' || echo '$(srcdir)/'`dnd/dndCommon.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libdndcp_la-dndCommon.Tpo $(DEPDIR)/libdndcp_la-dndCommon.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dnd/dndCommon.c' object='libdndcp_la-dndCommon.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdndcp_la-dndCommon.lo `test -f 'dnd/dndCommon.c' || echo '$(srcdir)/'`dnd/dndCommon.c - -libdndcp_la-dndCPMsgV4.lo: dnd/dndCPMsgV4.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdndcp_la-dndCPMsgV4.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-dndCPMsgV4.Tpo -c -o libdndcp_la-dndCPMsgV4.lo `test -f 'dnd/dndCPMsgV4.c' || echo '$(srcdir)/'`dnd/dndCPMsgV4.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libdndcp_la-dndCPMsgV4.Tpo $(DEPDIR)/libdndcp_la-dndCPMsgV4.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dnd/dndCPMsgV4.c' object='libdndcp_la-dndCPMsgV4.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdndcp_la-dndCPMsgV4.lo `test -f 'dnd/dndCPMsgV4.c' || echo '$(srcdir)/'`dnd/dndCPMsgV4.c - -libdndcp_la-dndLinux.lo: dnd/dndLinux.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdndcp_la-dndLinux.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-dndLinux.Tpo -c -o libdndcp_la-dndLinux.lo `test -f 'dnd/dndLinux.c' || echo '$(srcdir)/'`dnd/dndLinux.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libdndcp_la-dndLinux.Tpo $(DEPDIR)/libdndcp_la-dndLinux.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dnd/dndLinux.c' object='libdndcp_la-dndLinux.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdndcp_la-dndLinux.lo `test -f 'dnd/dndLinux.c' || echo '$(srcdir)/'`dnd/dndLinux.c - -libdndcp_la-dndMsg.lo: dnd/dndMsg.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdndcp_la-dndMsg.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-dndMsg.Tpo -c -o libdndcp_la-dndMsg.lo `test -f 'dnd/dndMsg.c' || echo '$(srcdir)/'`dnd/dndMsg.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libdndcp_la-dndMsg.Tpo $(DEPDIR)/libdndcp_la-dndMsg.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dnd/dndMsg.c' object='libdndcp_la-dndMsg.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdndcp_la-dndMsg.lo `test -f 'dnd/dndMsg.c' || echo '$(srcdir)/'`dnd/dndMsg.c - -libdndcp_la-copyPasteCompat.lo: copyPasteCompat.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdndcp_la-copyPasteCompat.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-copyPasteCompat.Tpo -c -o libdndcp_la-copyPasteCompat.lo `test -f 'copyPasteCompat.c' || echo '$(srcdir)/'`copyPasteCompat.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libdndcp_la-copyPasteCompat.Tpo $(DEPDIR)/libdndcp_la-copyPasteCompat.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='copyPasteCompat.c' object='libdndcp_la-copyPasteCompat.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdndcp_la-copyPasteCompat.lo `test -f 'copyPasteCompat.c' || echo '$(srcdir)/'`copyPasteCompat.c - -libdndcp_la-copyPasteCompatX11.lo: copyPasteCompatX11.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdndcp_la-copyPasteCompatX11.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-copyPasteCompatX11.Tpo -c -o libdndcp_la-copyPasteCompatX11.lo `test -f 'copyPasteCompatX11.c' || echo '$(srcdir)/'`copyPasteCompatX11.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libdndcp_la-copyPasteCompatX11.Tpo $(DEPDIR)/libdndcp_la-copyPasteCompatX11.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='copyPasteCompatX11.c' object='libdndcp_la-copyPasteCompatX11.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdndcp_la-copyPasteCompatX11.lo `test -f 'copyPasteCompatX11.c' || echo '$(srcdir)/'`copyPasteCompatX11.c - -libdndcp_la-cpFileContents_xdr.lo: cpFileContents_xdr.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdndcp_la-cpFileContents_xdr.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-cpFileContents_xdr.Tpo -c -o libdndcp_la-cpFileContents_xdr.lo `test -f 'cpFileContents_xdr.c' || echo '$(srcdir)/'`cpFileContents_xdr.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libdndcp_la-cpFileContents_xdr.Tpo $(DEPDIR)/libdndcp_la-cpFileContents_xdr.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cpFileContents_xdr.c' object='libdndcp_la-cpFileContents_xdr.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdndcp_la-cpFileContents_xdr.lo `test -f 'cpFileContents_xdr.c' || echo '$(srcdir)/'`cpFileContents_xdr.c - -.cc.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< - -.cc.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.cc.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< - -libdndcp_la-copyPasteRpcV3.lo: dndGuest/copyPasteRpcV3.cc -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-copyPasteRpcV3.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-copyPasteRpcV3.Tpo -c -o libdndcp_la-copyPasteRpcV3.lo `test -f 'dndGuest/copyPasteRpcV3.cc' || echo '$(srcdir)/'`dndGuest/copyPasteRpcV3.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-copyPasteRpcV3.Tpo $(DEPDIR)/libdndcp_la-copyPasteRpcV3.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dndGuest/copyPasteRpcV3.cc' object='libdndcp_la-copyPasteRpcV3.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-copyPasteRpcV3.lo `test -f 'dndGuest/copyPasteRpcV3.cc' || echo '$(srcdir)/'`dndGuest/copyPasteRpcV3.cc - -libdndcp_la-dndFileList.lo: dndGuest/dndFileList.cc -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-dndFileList.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-dndFileList.Tpo -c -o libdndcp_la-dndFileList.lo `test -f 'dndGuest/dndFileList.cc' || echo '$(srcdir)/'`dndGuest/dndFileList.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-dndFileList.Tpo $(DEPDIR)/libdndcp_la-dndFileList.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dndGuest/dndFileList.cc' object='libdndcp_la-dndFileList.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-dndFileList.lo `test -f 'dndGuest/dndFileList.cc' || echo '$(srcdir)/'`dndGuest/dndFileList.cc - -libdndcp_la-dndRpcV3.lo: dndGuest/dndRpcV3.cc -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-dndRpcV3.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-dndRpcV3.Tpo -c -o libdndcp_la-dndRpcV3.lo `test -f 'dndGuest/dndRpcV3.cc' || echo '$(srcdir)/'`dndGuest/dndRpcV3.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-dndRpcV3.Tpo $(DEPDIR)/libdndcp_la-dndRpcV3.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dndGuest/dndRpcV3.cc' object='libdndcp_la-dndRpcV3.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-dndRpcV3.lo `test -f 'dndGuest/dndRpcV3.cc' || echo '$(srcdir)/'`dndGuest/dndRpcV3.cc - -libdndcp_la-guestCopyPasteDest.lo: dndGuest/guestCopyPasteDest.cc -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-guestCopyPasteDest.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-guestCopyPasteDest.Tpo -c -o libdndcp_la-guestCopyPasteDest.lo `test -f 'dndGuest/guestCopyPasteDest.cc' || echo '$(srcdir)/'`dndGuest/guestCopyPasteDest.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-guestCopyPasteDest.Tpo $(DEPDIR)/libdndcp_la-guestCopyPasteDest.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dndGuest/guestCopyPasteDest.cc' object='libdndcp_la-guestCopyPasteDest.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-guestCopyPasteDest.lo `test -f 'dndGuest/guestCopyPasteDest.cc' || echo '$(srcdir)/'`dndGuest/guestCopyPasteDest.cc - -libdndcp_la-guestCopyPasteMgr.lo: dndGuest/guestCopyPasteMgr.cc -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-guestCopyPasteMgr.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-guestCopyPasteMgr.Tpo -c -o libdndcp_la-guestCopyPasteMgr.lo `test -f 'dndGuest/guestCopyPasteMgr.cc' || echo '$(srcdir)/'`dndGuest/guestCopyPasteMgr.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-guestCopyPasteMgr.Tpo $(DEPDIR)/libdndcp_la-guestCopyPasteMgr.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dndGuest/guestCopyPasteMgr.cc' object='libdndcp_la-guestCopyPasteMgr.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-guestCopyPasteMgr.lo `test -f 'dndGuest/guestCopyPasteMgr.cc' || echo '$(srcdir)/'`dndGuest/guestCopyPasteMgr.cc - -libdndcp_la-guestCopyPasteSrc.lo: dndGuest/guestCopyPasteSrc.cc -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-guestCopyPasteSrc.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-guestCopyPasteSrc.Tpo -c -o libdndcp_la-guestCopyPasteSrc.lo `test -f 'dndGuest/guestCopyPasteSrc.cc' || echo '$(srcdir)/'`dndGuest/guestCopyPasteSrc.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-guestCopyPasteSrc.Tpo $(DEPDIR)/libdndcp_la-guestCopyPasteSrc.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dndGuest/guestCopyPasteSrc.cc' object='libdndcp_la-guestCopyPasteSrc.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-guestCopyPasteSrc.lo `test -f 'dndGuest/guestCopyPasteSrc.cc' || echo '$(srcdir)/'`dndGuest/guestCopyPasteSrc.cc - -libdndcp_la-guestDnDCPMgr.lo: dndGuest/guestDnDCPMgr.cc -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-guestDnDCPMgr.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-guestDnDCPMgr.Tpo -c -o libdndcp_la-guestDnDCPMgr.lo `test -f 'dndGuest/guestDnDCPMgr.cc' || echo '$(srcdir)/'`dndGuest/guestDnDCPMgr.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-guestDnDCPMgr.Tpo $(DEPDIR)/libdndcp_la-guestDnDCPMgr.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dndGuest/guestDnDCPMgr.cc' object='libdndcp_la-guestDnDCPMgr.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-guestDnDCPMgr.lo `test -f 'dndGuest/guestDnDCPMgr.cc' || echo '$(srcdir)/'`dndGuest/guestDnDCPMgr.cc - -libdndcp_la-guestDnDDest.lo: dndGuest/guestDnDDest.cc -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-guestDnDDest.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-guestDnDDest.Tpo -c -o libdndcp_la-guestDnDDest.lo `test -f 'dndGuest/guestDnDDest.cc' || echo '$(srcdir)/'`dndGuest/guestDnDDest.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-guestDnDDest.Tpo $(DEPDIR)/libdndcp_la-guestDnDDest.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dndGuest/guestDnDDest.cc' object='libdndcp_la-guestDnDDest.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-guestDnDDest.lo `test -f 'dndGuest/guestDnDDest.cc' || echo '$(srcdir)/'`dndGuest/guestDnDDest.cc - -libdndcp_la-guestDnDMgr.lo: dndGuest/guestDnDMgr.cc -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-guestDnDMgr.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-guestDnDMgr.Tpo -c -o libdndcp_la-guestDnDMgr.lo `test -f 'dndGuest/guestDnDMgr.cc' || echo '$(srcdir)/'`dndGuest/guestDnDMgr.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-guestDnDMgr.Tpo $(DEPDIR)/libdndcp_la-guestDnDMgr.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dndGuest/guestDnDMgr.cc' object='libdndcp_la-guestDnDMgr.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-guestDnDMgr.lo `test -f 'dndGuest/guestDnDMgr.cc' || echo '$(srcdir)/'`dndGuest/guestDnDMgr.cc - -libdndcp_la-guestDnDSrc.lo: dndGuest/guestDnDSrc.cc -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-guestDnDSrc.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-guestDnDSrc.Tpo -c -o libdndcp_la-guestDnDSrc.lo `test -f 'dndGuest/guestDnDSrc.cc' || echo '$(srcdir)/'`dndGuest/guestDnDSrc.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-guestDnDSrc.Tpo $(DEPDIR)/libdndcp_la-guestDnDSrc.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dndGuest/guestDnDSrc.cc' object='libdndcp_la-guestDnDSrc.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-guestDnDSrc.lo `test -f 'dndGuest/guestDnDSrc.cc' || echo '$(srcdir)/'`dndGuest/guestDnDSrc.cc - -libdndcp_la-guestFileTransfer.lo: dndGuest/guestFileTransfer.cc -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-guestFileTransfer.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-guestFileTransfer.Tpo -c -o libdndcp_la-guestFileTransfer.lo `test -f 'dndGuest/guestFileTransfer.cc' || echo '$(srcdir)/'`dndGuest/guestFileTransfer.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-guestFileTransfer.Tpo $(DEPDIR)/libdndcp_la-guestFileTransfer.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dndGuest/guestFileTransfer.cc' object='libdndcp_la-guestFileTransfer.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-guestFileTransfer.lo `test -f 'dndGuest/guestFileTransfer.cc' || echo '$(srcdir)/'`dndGuest/guestFileTransfer.cc - -libdndcp_la-copyPasteRpcV4.lo: dndGuest/copyPasteRpcV4.cc -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-copyPasteRpcV4.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-copyPasteRpcV4.Tpo -c -o libdndcp_la-copyPasteRpcV4.lo `test -f 'dndGuest/copyPasteRpcV4.cc' || echo '$(srcdir)/'`dndGuest/copyPasteRpcV4.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-copyPasteRpcV4.Tpo $(DEPDIR)/libdndcp_la-copyPasteRpcV4.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dndGuest/copyPasteRpcV4.cc' object='libdndcp_la-copyPasteRpcV4.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-copyPasteRpcV4.lo `test -f 'dndGuest/copyPasteRpcV4.cc' || echo '$(srcdir)/'`dndGuest/copyPasteRpcV4.cc - -libdndcp_la-dndRpcV4.lo: dndGuest/dndRpcV4.cc -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-dndRpcV4.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-dndRpcV4.Tpo -c -o libdndcp_la-dndRpcV4.lo `test -f 'dndGuest/dndRpcV4.cc' || echo '$(srcdir)/'`dndGuest/dndRpcV4.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-dndRpcV4.Tpo $(DEPDIR)/libdndcp_la-dndRpcV4.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dndGuest/dndRpcV4.cc' object='libdndcp_la-dndRpcV4.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-dndRpcV4.lo `test -f 'dndGuest/dndRpcV4.cc' || echo '$(srcdir)/'`dndGuest/dndRpcV4.cc - -libdndcp_la-fileTransferRpcV4.lo: dndGuest/fileTransferRpcV4.cc -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-fileTransferRpcV4.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-fileTransferRpcV4.Tpo -c -o libdndcp_la-fileTransferRpcV4.lo `test -f 'dndGuest/fileTransferRpcV4.cc' || echo '$(srcdir)/'`dndGuest/fileTransferRpcV4.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-fileTransferRpcV4.Tpo $(DEPDIR)/libdndcp_la-fileTransferRpcV4.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dndGuest/fileTransferRpcV4.cc' object='libdndcp_la-fileTransferRpcV4.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-fileTransferRpcV4.lo `test -f 'dndGuest/fileTransferRpcV4.cc' || echo '$(srcdir)/'`dndGuest/fileTransferRpcV4.cc - -libdndcp_la-rpcV3Util.lo: dndGuest/rpcV3Util.cpp -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-rpcV3Util.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-rpcV3Util.Tpo -c -o libdndcp_la-rpcV3Util.lo `test -f 'dndGuest/rpcV3Util.cpp' || echo '$(srcdir)/'`dndGuest/rpcV3Util.cpp -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-rpcV3Util.Tpo $(DEPDIR)/libdndcp_la-rpcV3Util.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dndGuest/rpcV3Util.cpp' object='libdndcp_la-rpcV3Util.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-rpcV3Util.lo `test -f 'dndGuest/rpcV3Util.cpp' || echo '$(srcdir)/'`dndGuest/rpcV3Util.cpp - -libdndcp_la-rpcV4Util.lo: dndGuest/rpcV4Util.cpp -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-rpcV4Util.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-rpcV4Util.Tpo -c -o libdndcp_la-rpcV4Util.lo `test -f 'dndGuest/rpcV4Util.cpp' || echo '$(srcdir)/'`dndGuest/rpcV4Util.cpp -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-rpcV4Util.Tpo $(DEPDIR)/libdndcp_la-rpcV4Util.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dndGuest/rpcV4Util.cpp' object='libdndcp_la-rpcV4Util.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-rpcV4Util.lo `test -f 'dndGuest/rpcV4Util.cpp' || echo '$(srcdir)/'`dndGuest/rpcV4Util.cpp - -libdndcp_la-dndCPTransportGuestRpc.lo: dndGuest/dndCPTransportGuestRpc.cpp -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-dndCPTransportGuestRpc.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-dndCPTransportGuestRpc.Tpo -c -o libdndcp_la-dndCPTransportGuestRpc.lo `test -f 'dndGuest/dndCPTransportGuestRpc.cpp' || echo '$(srcdir)/'`dndGuest/dndCPTransportGuestRpc.cpp -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-dndCPTransportGuestRpc.Tpo $(DEPDIR)/libdndcp_la-dndCPTransportGuestRpc.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dndGuest/dndCPTransportGuestRpc.cpp' object='libdndcp_la-dndCPTransportGuestRpc.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-dndCPTransportGuestRpc.lo `test -f 'dndGuest/dndCPTransportGuestRpc.cpp' || echo '$(srcdir)/'`dndGuest/dndCPTransportGuestRpc.cpp - -libdndcp_la-string.lo: stringxx/string.cc -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-string.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-string.Tpo -c -o libdndcp_la-string.lo `test -f 'stringxx/string.cc' || echo '$(srcdir)/'`stringxx/string.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-string.Tpo $(DEPDIR)/libdndcp_la-string.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='stringxx/string.cc' object='libdndcp_la-string.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-string.lo `test -f 'stringxx/string.cc' || echo '$(srcdir)/'`stringxx/string.cc - -libdndcp_la-xutils.lo: xutils/xutils.cc -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-xutils.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-xutils.Tpo -c -o libdndcp_la-xutils.lo `test -f 'xutils/xutils.cc' || echo '$(srcdir)/'`xutils/xutils.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-xutils.Tpo $(DEPDIR)/libdndcp_la-xutils.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='xutils/xutils.cc' object='libdndcp_la-xutils.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-xutils.lo `test -f 'xutils/xutils.cc' || echo '$(srcdir)/'`xutils/xutils.cc - -libdndcp_la-copyPasteDnDWrapper.lo: copyPasteDnDWrapper.cpp -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-copyPasteDnDWrapper.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-copyPasteDnDWrapper.Tpo -c -o libdndcp_la-copyPasteDnDWrapper.lo `test -f 'copyPasteDnDWrapper.cpp' || echo '$(srcdir)/'`copyPasteDnDWrapper.cpp -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-copyPasteDnDWrapper.Tpo $(DEPDIR)/libdndcp_la-copyPasteDnDWrapper.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='copyPasteDnDWrapper.cpp' object='libdndcp_la-copyPasteDnDWrapper.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-copyPasteDnDWrapper.lo `test -f 'copyPasteDnDWrapper.cpp' || echo '$(srcdir)/'`copyPasteDnDWrapper.cpp - -libdndcp_la-copyPasteDnDX11.lo: copyPasteDnDX11.cpp -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-copyPasteDnDX11.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-copyPasteDnDX11.Tpo -c -o libdndcp_la-copyPasteDnDX11.lo `test -f 'copyPasteDnDX11.cpp' || echo '$(srcdir)/'`copyPasteDnDX11.cpp -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-copyPasteDnDX11.Tpo $(DEPDIR)/libdndcp_la-copyPasteDnDX11.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='copyPasteDnDX11.cpp' object='libdndcp_la-copyPasteDnDX11.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-copyPasteDnDX11.lo `test -f 'copyPasteDnDX11.cpp' || echo '$(srcdir)/'`copyPasteDnDX11.cpp - -libdndcp_la-copyPasteUIX11.lo: copyPasteUIX11.cpp -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-copyPasteUIX11.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-copyPasteUIX11.Tpo -c -o libdndcp_la-copyPasteUIX11.lo `test -f 'copyPasteUIX11.cpp' || echo '$(srcdir)/'`copyPasteUIX11.cpp -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-copyPasteUIX11.Tpo $(DEPDIR)/libdndcp_la-copyPasteUIX11.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='copyPasteUIX11.cpp' object='libdndcp_la-copyPasteUIX11.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-copyPasteUIX11.lo `test -f 'copyPasteUIX11.cpp' || echo '$(srcdir)/'`copyPasteUIX11.cpp - -libdndcp_la-dndUIX11.lo: dndUIX11.cpp -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-dndUIX11.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-dndUIX11.Tpo -c -o libdndcp_la-dndUIX11.lo `test -f 'dndUIX11.cpp' || echo '$(srcdir)/'`dndUIX11.cpp -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-dndUIX11.Tpo $(DEPDIR)/libdndcp_la-dndUIX11.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dndUIX11.cpp' object='libdndcp_la-dndUIX11.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-dndUIX11.lo `test -f 'dndUIX11.cpp' || echo '$(srcdir)/'`dndUIX11.cpp - -libdndcp_la-dndcp.lo: dndcp.cpp -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-dndcp.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-dndcp.Tpo -c -o libdndcp_la-dndcp.lo `test -f 'dndcp.cpp' || echo '$(srcdir)/'`dndcp.cpp -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-dndcp.Tpo $(DEPDIR)/libdndcp_la-dndcp.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dndcp.cpp' object='libdndcp_la-dndcp.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-dndcp.lo `test -f 'dndcp.cpp' || echo '$(srcdir)/'`dndcp.cpp - -libdndcp_la-dragDetWndX11.lo: dragDetWndX11.cpp -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-dragDetWndX11.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-dragDetWndX11.Tpo -c -o libdndcp_la-dragDetWndX11.lo `test -f 'dragDetWndX11.cpp' || echo '$(srcdir)/'`dragDetWndX11.cpp -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-dragDetWndX11.Tpo $(DEPDIR)/libdndcp_la-dragDetWndX11.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dragDetWndX11.cpp' object='libdndcp_la-dragDetWndX11.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-dragDetWndX11.lo `test -f 'dragDetWndX11.cpp' || echo '$(srcdir)/'`dragDetWndX11.cpp - -libdndcp_la-pointer.lo: pointer.cpp -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-pointer.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-pointer.Tpo -c -o libdndcp_la-pointer.lo `test -f 'pointer.cpp' || echo '$(srcdir)/'`pointer.cpp -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-pointer.Tpo $(DEPDIR)/libdndcp_la-pointer.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='pointer.cpp' object='libdndcp_la-pointer.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-pointer.lo `test -f 'pointer.cpp' || echo '$(srcdir)/'`pointer.cpp - -.cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< - -.cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: - for dir in "$(DESTDIR)$(plugindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -clean: clean-am - -clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-pluginLTLIBRARIES - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-pluginLTLIBRARIES - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-pluginLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-pluginLTLIBRARIES \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-pluginLTLIBRARIES - - -cpFileContents.h: cpFileContents.x - @RPCGEN_WRAPPER@ services/plugins/dndcp/cpFileContents.x $@ - -cpFileContents_xdr.c: cpFileContents.x cpFileContents.h - @RPCGEN_WRAPPER@ services/plugins/dndcp/cpFileContents.x $@ -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/services/plugins/dndcp/copyPasteUIX11.cpp b/open-vm-tools/services/plugins/dndcp/copyPasteUIX11.cpp index 1762ac68d..f7cedc883 100644 --- a/open-vm-tools/services/plugins/dndcp/copyPasteUIX11.cpp +++ b/open-vm-tools/services/plugins/dndcp/copyPasteUIX11.cpp @@ -214,7 +214,7 @@ CopyPasteUIX11::~CopyPasteUIX11() !mHGStagingDir.empty()) { uint64 totalSize = File_GetSizeEx(mHGStagingDir.c_str()); if (mTotalFileSize != totalSize) { - g_debug("%s: deleting %s, expecting %"FMT64"d, finished %"FMT64"d\n", + g_debug("%s: deleting %s, expecting %" FMT64 "u, finished %" FMT64 "u\n", __FUNCTION__, mHGStagingDir.c_str(), mTotalFileSize, totalSize); DnD_DeleteStagingFiles(mHGStagingDir.c_str(), FALSE); @@ -552,7 +552,7 @@ CopyPasteUIX11::LocalGetTextOrRTFRequestCB(Gtk::SelectionData& sd, // IN/OUT return; } - g_debug("%s: providing RTF data, size %"FMTSZ"u\n", + g_debug("%s: providing RTF data, size %" FMTSZ "u\n", __FUNCTION__, mHGRTFData.size()); sd.set(target.c_str(), mHGRTFData.c_str()); @@ -566,7 +566,7 @@ CopyPasteUIX11::LocalGetTextOrRTFRequestCB(Gtk::SelectionData& sd, // IN/OUT g_debug("%s: Can not get valid text data\n", __FUNCTION__); return; } - g_debug("%s: providing plain text, size %"FMTSZ"u\n", + g_debug("%s: providing plain text, size %" FMTSZ "u\n", __FUNCTION__, mHGTextData.bytes()); sd.set(target.c_str(), mHGTextData.c_str()); @@ -743,7 +743,7 @@ again: CPClipboard_SetItem(&mClipboard, CPFORMAT_IMG_PNG, buf, bufSize)) { validDataInClip = true; - g_debug("%s: Got PNG: %"FMTSZ"u\n", __FUNCTION__, bufSize); + g_debug("%s: Got PNG: %" FMTSZ "u\n", __FUNCTION__, bufSize); } else { g_debug("%s: Failed to get PNG\n", __FUNCTION__); } @@ -796,7 +796,7 @@ again: CPClipboard_SetItem(&mClipboard, CPFORMAT_TEXT, (const void *)str.data(), bufSize + 1)) { validDataInClip = true; - g_debug("%s: Got TEXT: %"FMTSZ"u\n", __FUNCTION__, bufSize); + g_debug("%s: Got TEXT: %" FMTSZ "u\n", __FUNCTION__, bufSize); } else { g_debug("%s: Failed to get TEXT\n", __FUNCTION__); } @@ -1031,7 +1031,7 @@ CopyPasteUIX11::LocalGetSelectionFileList(const Gtk::SelectionData& sd) // DynBuf_Init(&buf); fileList.SetFileSize(totalSize); - g_debug("%s: totalSize is %"FMT64"u\n", __FUNCTION__, totalSize); + g_debug("%s: totalSize is %" FMT64 "u\n", __FUNCTION__, totalSize); fileList.ToCPClipboard(&buf, false); CPClipboard_SetItem(&mClipboard, CPFORMAT_FILELIST, DynBuf_Get(&buf), DynBuf_GetSize(&buf)); @@ -1198,7 +1198,7 @@ CopyPasteUIX11::GetRemoteClipboardCB(const CPClipboard *clip) // IN * accept paste. */ if (CPClipboard_GetItem(clip, CPFORMAT_RTF, &buf, &sz)) { - g_debug("%s: RTF data, size %"FMTSZ"u.\n", __FUNCTION__, sz); + g_debug("%s: RTF data, size %" FMTSZ "u.\n", __FUNCTION__, sz); Gtk::TargetEntry appRtf(TARGET_NAME_APPLICATION_RTF); Gtk::TargetEntry textRtf(TARGET_NAME_TEXT_RICHTEXT); @@ -1214,7 +1214,7 @@ CopyPasteUIX11::GetRemoteClipboardCB(const CPClipboard *clip) // IN Gtk::TargetEntry utf8Text(TARGET_NAME_UTF8_STRING); Gtk::TargetEntry compountText(TARGET_NAME_COMPOUND_TEXT); - g_debug("%s: Text data, size %"FMTSZ"u.\n", __FUNCTION__, sz); + g_debug("%s: Text data, size %" FMTSZ "u.\n", __FUNCTION__, sz); targets.push_back(stringText); targets.push_back(plainText); targets.push_back(utf8Text); @@ -1234,7 +1234,7 @@ CopyPasteUIX11::GetRemoteClipboardCB(const CPClipboard *clip) // IN } if (CPClipboard_GetItem(clip, CPFORMAT_IMG_PNG, &buf, &sz)) { - g_debug("%s: PNG data, size %"FMTSZ"u.\n", __FUNCTION__, sz); + g_debug("%s: PNG data, size %" FMTSZ "u.\n", __FUNCTION__, sz); /* Try to load buf into pixbuf, and write to local clipboard. */ try { Glib::RefPtr loader = Gdk::PixbufLoader::create(); @@ -1388,7 +1388,7 @@ CopyPasteUIX11::LocalPrepareFileContents(const CPClipboard *clip) // IN if (!fileItem[i].cpName.cpName_val || 0 == fileItem[i].cpName.cpName_len) { - g_debug("%s: invalid fileItem[%"FMTSZ"u].cpName.\n", __FUNCTION__, i); + g_debug("%s: invalid fileItem[%" FMTSZ "u].cpName.\n", __FUNCTION__, i); goto exit; } diff --git a/open-vm-tools/services/plugins/dndcp/dnd/dndXdg.c b/open-vm-tools/services/plugins/dndcp/dnd/dndXdg.c new file mode 100644 index 000000000..4cf158f05 --- /dev/null +++ b/open-vm-tools/services/plugins/dndcp/dnd/dndXdg.c @@ -0,0 +1,454 @@ +/********************************************************* + * Copyright (C) 2014-2015 VMware, Inc. All rights reserved. + * + * This program 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 version 2.1 and no 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 Lesser GNU General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + *********************************************************/ + +/* + * dndXdg.c -- + * + * Drag and drop routines for X Desktop Group (XDG) / freedesktop.org + * platforms. + */ + + +#include +#include +#include +#include + +#if defined __FreeBSD__ +#include +#endif + +#include "dndInt.h" +#include "dnd.h" + +#include "err.h" +#include "file.h" +#include "log.h" +#include "posix.h" +#include "str.h" +#include "strutil.h" +#include "su.h" +#include "unicode.h" +#include "vm_atomic.h" + + +static const char *CreateRealRootDirectory(void); +static const char *CreateApparentRootDirectory(void); +static char *FindSuitableExistingDirectory(const char *realRoot, + const char *apparentRoot); +static char *CreateStagingDirectory(const char *realRoot, + const char *apparentRoot); + + +/* + *----------------------------------------------------------------------------- + * + * Xdg_GetCacheHome -- + * + * Determine path appropriate for "user-specific non-essential (cached) + * data"[1]. + * + * 1. + * + * Results: + * Returns a pointer to a valid path on success or NULL on failure. + * + * Side effects: + * First call may allocate memory which remains allocated for the life + * of the program. + * + * NOT thread-safe. + * + * TODO: + * Move bora-vmsoft/lib/xdg to bora/lib, then move this to bora/lib/xdg. + * Unit tests. (There is no good home for these at the moment.) + * + *----------------------------------------------------------------------------- + */ + +const char * +Xdg_GetCacheHome(void) +{ + static char *result = NULL; + struct passwd *pw; + + if (result == NULL) { + do { + if (!Id_IsSetUGid()) { + const char *base = NULL; + + /* + * Paranoia: Avoid environment variables if running in a sensitive + * context. sudo or other loader should've sanitized the + * environment, but, well, we're paranoid, remember? + */ + + // 1. $XDG_CACHE_HOME + base = Posix_Getenv("XDG_CACHE_HOME"); + if (Util_IsAbsolutePath(base)) { + result = Util_SafeStrdup(base); + break; + } + + // 2. $HOME/.cache + base = Posix_Getenv("HOME"); + if (Util_IsAbsolutePath(base)) { + result = Util_SafeStrdup(base); + StrUtil_SafeStrcat(&result, "/.cache"); + break; + } + } + + // 3. /.cache + pw = Posix_Getpwuid(geteuid()); + + if (pw != NULL && Util_IsAbsolutePath(pw->pw_dir)) { + result = Str_Asprintf(NULL, "%s/.cache", pw->pw_dir); + } + } while(0); + } + + VERIFY(result == NULL || result[0] == '/'); + return result; +} + + +/* + *----------------------------------------------------------------------------- + * + * DnD_CreateStagingDirectory -- + * + * See dndCommon.c. + * + * Results: + * A string containing the newly created name, or NULL on failure. + * + * Side effects: + * A directory is created + * + * Caller is responsible for freeing returned pointer. + * + * NOT thread-safe. + * + *----------------------------------------------------------------------------- + */ + +char * +DnD_CreateStagingDirectory(void) +{ + const char *realRoot; + const char *apparentRoot; + char *existingDir; + + /* + * On XDG platforms, there are two roots: + * + * 1. Per-user real root ($HOME/.cache/vmware/drag_and_drop) + * + * Files are stored here, leaving cleanup to discretion of users and + * adminisitrators, and may count against users' storage quotas. Most + * importantly, however, is that it means avoiding tmpfs-backed /tmp + * which may be too small for large files. + * + * 2. Apparent root - /tmp/VMwareDnD + * + * Path known to vmblock implementations. Contains only symlinks to + * users' real root. + * + * Therefore DnD targets may access paths via + * /var/run/vmblock (vmblock file system) -> + * /tmp/VMwareDnD (apparent root) -> + * $HOME/.cache/vmware/drag_and_drop (real root). + */ + + + /* + * Lookup or create real root. + * + * We don't worry about cleaning up or removing this directory in case + * of failure later in this function. + */ + + realRoot = CreateRealRootDirectory(); + if (realRoot == NULL) { + return NULL; + } + + + /* + * Lookup or create apparent root. + */ + + apparentRoot = CreateApparentRootDirectory(); + if (apparentRoot == NULL) { + return NULL; + } + + + /* + * Search real root for empty directory. If found, (re)use it. + */ + + existingDir = FindSuitableExistingDirectory(realRoot, apparentRoot); + if (existingDir != NULL) { + return existingDir; + } + + + /* + * Generate new temporary directory. + * - Attempt to symlink $apparent/XXXXXX to $real/XXXXXX. + * - mkdir -p $real/XXXXXX. + */ + + return CreateStagingDirectory(realRoot, apparentRoot); +} + + +/* + *----------------------------------------------------------------------------- + * + * DetermineRealRootDirectory -- + * CreateRealRootDirectory -- + * + * Produces the path of the real staging directory root (e.g. + * $HOME/.cache/vmware/drag_and_drop). + * + * Results: + * !NULL Success. Points to real staging root path. + * NULL Failure. + * + * Side effects: + * May create the .cache/vmware/drag_and_drop hierarchy. + * + *----------------------------------------------------------------------------- + */ + +static const char * +DetermineRealRootDirectory(void) +{ + static char *completePath; + const char *cachePath; + + if (completePath != NULL) { + return completePath; + } + + cachePath = Xdg_GetCacheHome(); + if (cachePath != NULL) { + const char dndSuffix[] = "/vmware/drag_and_drop/"; + + completePath = Unicode_Duplicate(cachePath); + StrUtil_SafeStrcat(&completePath, dndSuffix); + VERIFY(strlen(completePath) < PATH_MAX); + + Log_Trivia("dnd: will stage to %s\n", completePath); + return completePath; + } + + Log_Trivia("dnd: failed to determine path\n"); + return NULL; +} + +static const char * +CreateRealRootDirectory(void) +{ + const char *realRoot = DetermineRealRootDirectory(); + + if ( realRoot != NULL + && ( File_IsDirectory(realRoot) + || File_CreateDirectoryHierarchyEx(realRoot, 0700, NULL))) { + return realRoot; + } + + return NULL; +} + + +/* + *---------------------------------------------------------------------------- + * + * CreateApparentRootDirectory -- + * + * Checks if the root staging directory exists with the correct permissions, + * or creates it if necessary. + * + * Results: + * !NULL Success. String containing apparent root directory path. + * NULL failure. + * + * Side effects: + * May create apparent root (/tmp/VMwareDnD) and/or change its permissions. + * + *---------------------------------------------------------------------------- + */ + +static const char * +CreateApparentRootDirectory(void) +{ + const char *root; + + /* + * DnD_GetFileRoot() gives us a pointer to a static string, so there's no + * need to free anything. + * + * XXX On XDG platforms this path ("/tmp/VMwareDnD") is created by an + * init script, so we could remove some of the code below and just bail + * if the user deletes it. + */ + + root = DnD_GetFileRoot(); + if (!root) { + return NULL; + } + + if (File_Exists(root)) { + if ( !DnDRootDirUsable(root) + && !DnDSetPermissionsOnRootDir(root)) { + /* + * The directory already exists and its permissions are wrong and + * cannot be set, so there's not much we can do. + */ + return NULL; + } + } else { + if ( !File_CreateDirectory(root) + || !DnDSetPermissionsOnRootDir(root)) { + /* We couldn't create the directory or set the permissions. */ + return NULL; + } + } + + return root; +} + + +/* + *----------------------------------------------------------------------------- + * + * FindSuitableExistingDirectory -- + * + * Given the pair of , search for an existing + * directory within `realRoot` satisfying the following conditions: + * + * 1. it's empty; + * 2. it's pointed to by a symlink of the same name from apparentRoot. + * + * Results: + * !NULL Success. Caller must free result. + * NULL Failure. + * + * Side effects: + * May create a symlink. + * + *----------------------------------------------------------------------------- + */ + +static char * +FindSuitableExistingDirectory( + const char *realRoot, // IN: e.g. $HOME/.cache/vmware/drag_and_drop/ + const char *apparentRoot) // IN: e.g. /tmp/VMwareDnD/ +{ + char *result = NULL; + + char **stagingDirList; + int numStagingDirs = File_ListDirectory(realRoot, &stagingDirList); + int i; + + for (i = 0; i < numStagingDirs && result == NULL; i++) { + char *stagingDir = Unicode_Append(realRoot, stagingDirList[i]); + char *apparentStagingDir = Unicode_Append(apparentRoot, stagingDirList[i]); + char *temp = NULL; + struct stat sb; + + if ( File_IsEmptyDirectory(stagingDir) + && ( Posix_Symlink(stagingDir, apparentStagingDir) == 0 + || ( Posix_Lstat(apparentStagingDir, &sb) == 0 + && sb.st_uid == getuid() + && (temp = Posix_ReadLink(apparentStagingDir)) != NULL + && strcmp(stagingDir, temp) == 0))) { + result = apparentStagingDir; + apparentStagingDir = NULL; + } + + free(stagingDir); + free(apparentStagingDir); + free(temp); + } + + Util_FreeStringList(stagingDirList, numStagingDirs); + return result; +} + + +/* + *----------------------------------------------------------------------------- + * + * CreateStagingDirectory -- + * + * Creates a fresh staging directory within `realRoot` and creates a + * symlink to it within `apparentRoot`. + * + * Results: + * !NULL Success. Caller must free result. + * NULL Failure. + * + * Side effects: + * Creates directories and stuff. + * + *----------------------------------------------------------------------------- + */ + +static char * +CreateStagingDirectory( + const char *realRoot, // IN: e.g. $HOME/.cache/vmware/drag_and_drop/ + const char *apparentRoot) // IN: e.g. /tmp/VMwareDnD/ +{ + char *result = NULL; + int i; + + for (i = 0; i < 10 && result == NULL; i++) { + char *realStagingDir = NULL; + char *apparentStagingDir = NULL; + + // Reminder: mkdtemp updates its arg in-place. + realStagingDir = Str_SafeAsprintf(NULL, "%sXXXXXX", realRoot); + if (mkdtemp(realStagingDir) != NULL) { + char *randomPart = strrchr(realStagingDir, '/') + 1; + VERIFY(*randomPart != '\0'); + + apparentStagingDir = Unicode_Append(apparentRoot, randomPart); + + if (Posix_Symlink(realStagingDir, apparentStagingDir) == 0) { + // Transfer ownership to caller. + result = apparentStagingDir; + apparentStagingDir = NULL; + } else { + Warning("dnd: symlink(%s): %s", apparentStagingDir, Err_ErrString()); + Posix_Rmdir(realStagingDir); + } + } else { + Warning("dnd: mkdtemp(%s): %s", realStagingDir, Err_ErrString()); + } + + free(realStagingDir); + free(apparentStagingDir); + } + + return result; +} diff --git a/open-vm-tools/services/plugins/dndcp/dndUIX11.cpp b/open-vm-tools/services/plugins/dndcp/dndUIX11.cpp index 97980828c..dcd03074d 100644 --- a/open-vm-tools/services/plugins/dndcp/dndUIX11.cpp +++ b/open-vm-tools/services/plugins/dndcp/dndUIX11.cpp @@ -128,7 +128,7 @@ DnDUIX11::~DnDUIX11() && !mHGStagingDir.empty()) { uint64 totalSize = File_GetSizeEx(mHGStagingDir.c_str()); if (mTotalFileSize != totalSize) { - g_debug("%s: deleting %s, expecting %"FMT64"d, finished %"FMT64"d\n", + g_debug("%s: deleting %s, expecting %" FMT64 "u, finished %" FMT64 "u\n", __FUNCTION__, mHGStagingDir.c_str(), mTotalFileSize, totalSize); DnD_DeleteStagingFiles(mHGStagingDir.c_str(), FALSE); @@ -1125,14 +1125,14 @@ DnDUIX11::OnGtkDragDataGet( if ( TargetIsPlainText(target) && CPClipboard_GetItem(&mClipboard, CPFORMAT_TEXT, &buf, &sz)) { - g_debug("%s: providing plain text, size %"FMTSZ"u\n", __FUNCTION__, sz); + g_debug("%s: providing plain text, size %" FMTSZ "u\n", __FUNCTION__, sz); selection_data.set(target.c_str(), (const char *)buf); return; } if ( TargetIsRichText(target) && CPClipboard_GetItem(&mClipboard, CPFORMAT_RTF, &buf, &sz)) { - g_debug("%s: providing rtf text, size %"FMTSZ"u\n", __FUNCTION__, sz); + g_debug("%s: providing rtf text, size %" FMTSZ "u\n", __FUNCTION__, sz); selection_data.set(target.c_str(), (const char *)buf); return; } @@ -1457,7 +1457,7 @@ DnDUIX11::SetCPClipboardFromGtk(const Gtk::SelectionData& sd) // IN && source.size() < DNDMSG_MAX_ARGSZ && CPClipboard_SetItem(&mClipboard, CPFORMAT_TEXT, source.c_str(), source.size() + 1)) { - g_debug("%s: Got text, size %"FMTSZ"u\n", __FUNCTION__, source.size()); + g_debug("%s: Got text, size %" FMTSZ "u\n", __FUNCTION__, source.size()); } else { g_debug("%s: Failed to get text\n", __FUNCTION__); return false; @@ -1473,7 +1473,7 @@ DnDUIX11::SetCPClipboardFromGtk(const Gtk::SelectionData& sd) // IN && source.size() < DNDMSG_MAX_ARGSZ && CPClipboard_SetItem(&mClipboard, CPFORMAT_RTF, source.c_str(), source.size() + 1)) { - g_debug("%s: Got RTF, size %"FMTSZ"u\n", __FUNCTION__, source.size()); + g_debug("%s: Got RTF, size %" FMTSZ "u\n", __FUNCTION__, source.size()); return true; } else { g_debug("%s: Failed to get text\n", __FUNCTION__ ); @@ -2229,7 +2229,7 @@ DnDUIX11::WriteFileContentsToStagingDir() if (!fileItem[i].cpName.cpName_val || 0 == fileItem[i].cpName.cpName_len) { - g_debug("%s: invalid fileItem[%"FMTSZ"u].cpName.\n", __FUNCTION__, i); + g_debug("%s: invalid fileItem[%" FMTSZ "u].cpName.\n", __FUNCTION__, i); goto exit; } diff --git a/open-vm-tools/services/plugins/dndcp/stringxx/string.cc b/open-vm-tools/services/plugins/dndcp/stringxx/string.cc index c4e0ba353..7743fe160 100644 --- a/open-vm-tools/services/plugins/dndcp/stringxx/string.cc +++ b/open-vm-tools/services/plugins/dndcp/stringxx/string.cc @@ -91,7 +91,11 @@ string::string(const char *s) // IN mUtf16Cache(NULL), mUtf16Length(npos) { - ASSERT(s); + // If the input is NULL, then there's nothing to do. + if (UNLIKELY(s == NULL)) { + return; + } + mUstr = s; ASSERT(Validate(mUstr)); } @@ -225,7 +229,10 @@ string::string(const utf16_t *s) // IN mUtf16Cache(NULL), mUtf16Length(npos) { - ASSERT(s != NULL); + // If the input is NULL, then there's nothing to do. + if (UNLIKELY(s == NULL)) { + return; + } /* * Since we already have a UTF-16 representation of the string, copy it @@ -261,7 +268,10 @@ string::string(const char *s, // IN mUtf16Cache(NULL), mUtf16Length(npos) { - ASSERT(s != NULL); + // If the input is NULL, then there's nothing to do. + if (UNLIKELY(s == NULL)) { + return; + } mUstr = AutoCPtr(Unicode_Alloc(s, encoding), free).get(); diff --git a/open-vm-tools/services/plugins/grabbitmqProxy/Makefile.in b/open-vm-tools/services/plugins/grabbitmqProxy/Makefile.in deleted file mode 100644 index 8ca0e87d0..000000000 --- a/open-vm-tools/services/plugins/grabbitmqProxy/Makefile.in +++ /dev/null @@ -1,577 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2014-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = services/plugins/grabbitmqProxy -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(plugindir)" -pluginLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(plugin_LTLIBRARIES) -libgrabbitmqProxy_la_DEPENDENCIES = -am_libgrabbitmqProxy_la_OBJECTS = \ - libgrabbitmqProxy_la-grabbitmqProxyPlugin.lo -libgrabbitmqProxy_la_OBJECTS = $(am_libgrabbitmqProxy_la_OBJECTS) -libgrabbitmqProxy_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libgrabbitmqProxy_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libgrabbitmqProxy_la_SOURCES) -DIST_SOURCES = $(libgrabbitmqProxy_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -plugindir = @VMSVC_PLUGIN_INSTALLDIR@ -plugin_LTLIBRARIES = libgrabbitmqProxy.la -libgrabbitmqProxy_la_CPPFLAGS = @PLUGIN_CPPFLAGS@ @SSL_CPPFLAGS@ -libgrabbitmqProxy_la_LDFLAGS = @PLUGIN_LDFLAGS@ -libgrabbitmqProxy_la_LIBADD = @VMTOOLS_LIBS@ @SSL_LIBS@ -libgrabbitmqProxy_la_SOURCES = grabbitmqProxyPlugin.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu services/plugins/grabbitmqProxy/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu services/plugins/grabbitmqProxy/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(plugindir)" || $(MKDIR_P) "$(DESTDIR)$(plugindir)" - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(plugindir)/$$f'"; \ - $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(plugindir)/$$f"; \ - else :; fi; \ - done - -uninstall-pluginLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$p"; \ - done - -clean-pluginLTLIBRARIES: - -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libgrabbitmqProxy.la: $(libgrabbitmqProxy_la_OBJECTS) $(libgrabbitmqProxy_la_DEPENDENCIES) - $(libgrabbitmqProxy_la_LINK) -rpath $(plugindir) $(libgrabbitmqProxy_la_OBJECTS) $(libgrabbitmqProxy_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgrabbitmqProxy_la-grabbitmqProxyPlugin.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libgrabbitmqProxy_la-grabbitmqProxyPlugin.lo: grabbitmqProxyPlugin.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgrabbitmqProxy_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgrabbitmqProxy_la-grabbitmqProxyPlugin.lo -MD -MP -MF $(DEPDIR)/libgrabbitmqProxy_la-grabbitmqProxyPlugin.Tpo -c -o libgrabbitmqProxy_la-grabbitmqProxyPlugin.lo `test -f 'grabbitmqProxyPlugin.c' || echo '$(srcdir)/'`grabbitmqProxyPlugin.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libgrabbitmqProxy_la-grabbitmqProxyPlugin.Tpo $(DEPDIR)/libgrabbitmqProxy_la-grabbitmqProxyPlugin.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='grabbitmqProxyPlugin.c' object='libgrabbitmqProxy_la-grabbitmqProxyPlugin.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgrabbitmqProxy_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgrabbitmqProxy_la-grabbitmqProxyPlugin.lo `test -f 'grabbitmqProxyPlugin.c' || echo '$(srcdir)/'`grabbitmqProxyPlugin.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: - for dir in "$(DESTDIR)$(plugindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-pluginLTLIBRARIES - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-pluginLTLIBRARIES - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-pluginLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-pluginLTLIBRARIES \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-pluginLTLIBRARIES - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/services/plugins/grabbitmqProxy/grabbitmqProxyPlugin.c b/open-vm-tools/services/plugins/grabbitmqProxy/grabbitmqProxyPlugin.c index 9451dccb9..139263a56 100644 --- a/open-vm-tools/services/plugins/grabbitmqProxy/grabbitmqProxyPlugin.c +++ b/open-vm-tools/services/plugins/grabbitmqProxy/grabbitmqProxyPlugin.c @@ -1299,17 +1299,35 @@ TheSslContext(void) const char *certFile; const char *keyFile; const char *trustDir; + long sslCtxOptions; if (sslCtx) { goto done; } - workingCtx = SSL_CTX_new(SSLv23_server_method()); + workingCtx = SSL_NewContext(); if (!workingCtx) { g_warning("Cannot create the SSL context.\n"); goto done; } + /* + * The bora/lib/ssl code not yet ready to disable TLS1, and TLS1_1, + * we shall remove the code below once it is able to. + */ + sslCtxOptions = SSL_CTX_get_options(workingCtx); + /* Allow only TLSv1_2 */ + +#ifdef SSL_OP_NO_TLSv1 + sslCtxOptions |= SSL_OP_NO_TLSv1; +#endif + +#ifdef SSL_OP_NO_TLSv1_1 + sslCtxOptions |= SSL_OP_NO_TLSv1_1; +#endif + + SSL_CTX_set_options(workingCtx, sslCtxOptions); + certFile = GetSslCertFile(); if (!certFile) { g_warning("Cannot find the certificate file\n"); diff --git a/open-vm-tools/services/plugins/guestInfo/Makefile.in b/open-vm-tools/services/plugins/guestInfo/Makefile.in deleted file mode 100644 index 65062a5b1..000000000 --- a/open-vm-tools/services/plugins/guestInfo/Makefile.in +++ /dev/null @@ -1,721 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@HAVE_DNET_TRUE@am__append_1 = @DNET_LIBS@ -subdir = services/plugins/guestInfo -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(plugindir)" -pluginLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(plugin_LTLIBRARIES) -am__DEPENDENCIES_1 = -libguestInfo_la_DEPENDENCIES = $(am__DEPENDENCIES_1) -am_libguestInfo_la_OBJECTS = libguestInfo_la-guestInfoServer.lo \ - libguestInfo_la-perfMonLinux.lo libguestInfo_la-diskInfo.lo \ - libguestInfo_la-diskInfoPosix.lo -libguestInfo_la_OBJECTS = $(am_libguestInfo_la_OBJECTS) -libguestInfo_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libguestInfo_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libguestInfo_la_SOURCES) -DIST_SOURCES = $(libguestInfo_la_SOURCES) -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUBDIRS = -plugindir = @VMSVC_PLUGIN_INSTALLDIR@ -plugin_LTLIBRARIES = libguestInfo.la -libguestInfo_la_CPPFLAGS = @PLUGIN_CPPFLAGS@ -libguestInfo_la_LDFLAGS = @PLUGIN_LDFLAGS@ -libguestInfo_la_LIBADD = @VMTOOLS_LIBS@ @PROCPS_LIBS@ @XDR_LIBS@ \ - $(am__append_1) -libguestInfo_la_SOURCES = guestInfoServer.c perfMonLinux.c diskInfo.c \ - diskInfoPosix.c -all: all-recursive - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu services/plugins/guestInfo/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu services/plugins/guestInfo/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(plugindir)" || $(MKDIR_P) "$(DESTDIR)$(plugindir)" - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(plugindir)/$$f'"; \ - $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(plugindir)/$$f"; \ - else :; fi; \ - done - -uninstall-pluginLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$p"; \ - done - -clean-pluginLTLIBRARIES: - -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libguestInfo.la: $(libguestInfo_la_OBJECTS) $(libguestInfo_la_DEPENDENCIES) - $(libguestInfo_la_LINK) -rpath $(plugindir) $(libguestInfo_la_OBJECTS) $(libguestInfo_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libguestInfo_la-diskInfo.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libguestInfo_la-diskInfoPosix.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libguestInfo_la-guestInfoServer.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libguestInfo_la-perfMonLinux.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libguestInfo_la-guestInfoServer.lo: guestInfoServer.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libguestInfo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libguestInfo_la-guestInfoServer.lo -MD -MP -MF $(DEPDIR)/libguestInfo_la-guestInfoServer.Tpo -c -o libguestInfo_la-guestInfoServer.lo `test -f 'guestInfoServer.c' || echo '$(srcdir)/'`guestInfoServer.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libguestInfo_la-guestInfoServer.Tpo $(DEPDIR)/libguestInfo_la-guestInfoServer.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='guestInfoServer.c' object='libguestInfo_la-guestInfoServer.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libguestInfo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libguestInfo_la-guestInfoServer.lo `test -f 'guestInfoServer.c' || echo '$(srcdir)/'`guestInfoServer.c - -libguestInfo_la-perfMonLinux.lo: perfMonLinux.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libguestInfo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libguestInfo_la-perfMonLinux.lo -MD -MP -MF $(DEPDIR)/libguestInfo_la-perfMonLinux.Tpo -c -o libguestInfo_la-perfMonLinux.lo `test -f 'perfMonLinux.c' || echo '$(srcdir)/'`perfMonLinux.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libguestInfo_la-perfMonLinux.Tpo $(DEPDIR)/libguestInfo_la-perfMonLinux.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='perfMonLinux.c' object='libguestInfo_la-perfMonLinux.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libguestInfo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libguestInfo_la-perfMonLinux.lo `test -f 'perfMonLinux.c' || echo '$(srcdir)/'`perfMonLinux.c - -libguestInfo_la-diskInfo.lo: diskInfo.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libguestInfo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libguestInfo_la-diskInfo.lo -MD -MP -MF $(DEPDIR)/libguestInfo_la-diskInfo.Tpo -c -o libguestInfo_la-diskInfo.lo `test -f 'diskInfo.c' || echo '$(srcdir)/'`diskInfo.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libguestInfo_la-diskInfo.Tpo $(DEPDIR)/libguestInfo_la-diskInfo.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='diskInfo.c' object='libguestInfo_la-diskInfo.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libguestInfo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libguestInfo_la-diskInfo.lo `test -f 'diskInfo.c' || echo '$(srcdir)/'`diskInfo.c - -libguestInfo_la-diskInfoPosix.lo: diskInfoPosix.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libguestInfo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libguestInfo_la-diskInfoPosix.lo -MD -MP -MF $(DEPDIR)/libguestInfo_la-diskInfoPosix.Tpo -c -o libguestInfo_la-diskInfoPosix.lo `test -f 'diskInfoPosix.c' || echo '$(srcdir)/'`diskInfoPosix.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libguestInfo_la-diskInfoPosix.Tpo $(DEPDIR)/libguestInfo_la-diskInfoPosix.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='diskInfoPosix.c' object='libguestInfo_la-diskInfoPosix.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libguestInfo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libguestInfo_la-diskInfoPosix.lo `test -f 'diskInfoPosix.c' || echo '$(srcdir)/'`diskInfoPosix.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile $(LTLIBRARIES) -installdirs: installdirs-recursive -installdirs-am: - for dir in "$(DESTDIR)$(plugindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -info: info-recursive - -info-am: - -install-data-am: install-pluginLTLIBRARIES - -install-dvi: install-dvi-recursive - -install-exec-am: - -install-html: install-html-recursive - -install-info: install-info-recursive - -install-man: - -install-pdf: install-pdf-recursive - -install-ps: install-ps-recursive - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: uninstall-pluginLTLIBRARIES - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ - install-strip - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - clean-pluginLTLIBRARIES ctags ctags-recursive distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-pluginLTLIBRARIES \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-recursive uninstall uninstall-am \ - uninstall-pluginLTLIBRARIES - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/services/plugins/guestInfo/guestInfoInt.h b/open-vm-tools/services/plugins/guestInfo/guestInfoInt.h index f55f04866..abb00ca10 100644 --- a/open-vm-tools/services/plugins/guestInfo/guestInfoInt.h +++ b/open-vm-tools/services/plugins/guestInfo/guestInfoInt.h @@ -27,38 +27,19 @@ #define G_LOG_DOMAIN "guestinfo" #include "vmware/tools/log.h" +#include "vmware/tools/plugin.h" #include "nicInfo.h" #include "dynbuf.h" -/* - * Internal stat IDs used by intermediate stats collected - * for computing derived stats. - * - * NOTE: These IDs should not be published to the host as - * these may change. - */ -#define GuestStatID_SwapSpaceUsed ((GuestStatToolsID) (GuestStatID_Max + 0)) -#define GuestStatID_SwapFilesCurrent ((GuestStatToolsID) (GuestStatID_Max + 1)) -#define GuestStatID_SwapFilesMax ((GuestStatToolsID) (GuestStatID_Max + 2)) -#define GuestStatID_Linux_LowWaterMark ((GuestStatToolsID) (GuestStatID_Max + 3)) -#define GuestStatID_Linux_MemAvailable ((GuestStatToolsID) (GuestStatID_Max + 4)) -#define GuestStatID_Linux_MemBuffers ((GuestStatToolsID) (GuestStatID_Max + 5)) -#define GuestStatID_Linux_MemCached ((GuestStatToolsID) (GuestStatID_Max + 6)) -#define GuestStatID_Linux_MemInactiveFile ((GuestStatToolsID) (GuestStatID_Max + 7)) -#define GuestStatID_Linux_MemSlabReclaim ((GuestStatToolsID) (GuestStatID_Max + 8)) -#define GuestStatID_Linux_MemTotal ((GuestStatToolsID) (GuestStatID_Max + 9)) -#define GuestStatID_Linux_Internal_Max ((GuestStatToolsID) (GuestStatID_Max + 10)) - extern int guestInfoPollInterval; Bool -GuestInfo_PerfMon(DynBuf *stats); +GuestInfo_ServerReportStats(ToolsAppCtx *ctx, // IN + DynBuf *stats); // IN -#if defined(_WIN32) -void -GuestInfo_SetStatLogging(Bool isEnabled); -#endif +gboolean +GuestInfo_StatProviderPoll(gpointer data); GuestDiskInfo * GuestInfoGetDiskInfoWiper(void); diff --git a/open-vm-tools/services/plugins/guestInfo/guestInfoServer.c b/open-vm-tools/services/plugins/guestInfo/guestInfoServer.c index 3cb5e39ae..b25a47ea5 100644 --- a/open-vm-tools/services/plugins/guestInfo/guestInfoServer.c +++ b/open-vm-tools/services/plugins/guestInfo/guestInfoServer.c @@ -366,61 +366,6 @@ GuestInfoGather(gpointer data) } -/* - ****************************************************************************** - * GuestInfoStatsGather -- */ /** - * - * Collects all the desired guest stats and updates the VMX. - * - * @param[in] data The application context. - * - * @return TRUE to indicate that the timer should be rescheduled. - * - ****************************************************************************** - */ - -static gboolean -GuestInfoStatsGather(gpointer data) -{ -#if (defined(__linux__) && !defined(USERWORLD)) || defined(_WIN32) - ToolsAppCtx *ctx = data; - DynBuf stats; -#endif -#if defined(_WIN32) - gboolean perfmonLogStats; -#endif - - g_debug("Entered guest info stats gather.\n"); - -#if defined(_WIN32) - perfmonLogStats = g_key_file_get_boolean(ctx->config, - CONFGROUPNAME_GUESTINFO, - CONFNAME_GUESTINFO_ENABLESTATLOGGING, - NULL); - - GuestInfo_SetStatLogging(perfmonLogStats); -#endif - -#if (defined(__linux__) && !defined(USERWORLD)) || defined(_WIN32) - /* Send the vmstats to the VMX. */ - DynBuf_Init(&stats); - - if (GuestInfo_PerfMon(&stats)) { - if (!GuestInfoUpdateVmdb(ctx, INFO_MEMORY, DynBuf_Get(&stats), - DynBuf_GetSize(&stats))) { - g_warning("Failed to send vmstats.\n"); - } - } else { - g_warning("Failed to get vmstats.\n"); - } - - DynBuf_Destroy(&stats); -#endif - - return TRUE; -} - - /* ****************************************************************************** * GuestInfoConvertNicInfoToNicInfoV1 -- */ /** @@ -1307,25 +1252,27 @@ TweakGatherLoop(ToolsAppCtx *ctx, } } - /* - * If the interval hasn't changed, let's not interfere with the existing - * timeout source. - */ - if (pollInterval == *currInterval) { - ASSERT(pollInterval || *timeoutSource == NULL); - return; - } + if (*timeoutSource != NULL) { + /* + * If the interval hasn't changed, let's not interfere with the existing + * timeout source. + */ + if (pollInterval == *currInterval) { + ASSERT(pollInterval); + return; + } - /* - * All checks have passed. Destroy the existing timeout source, if it - * exists, then create and attach a new one. - */ + /* + * Destroy the existing timeout source since the interval has changed. + */ - if (*timeoutSource != NULL) { g_source_destroy(*timeoutSource); *timeoutSource = NULL; } + /* + * All checks have passed. Create a new timeout source and attach it. + */ *currInterval = pollInterval; if (*currInterval) { @@ -1362,6 +1309,7 @@ static void TweakGatherLoops(ToolsAppCtx *ctx, gboolean enable) { +#if (defined(__linux__) && !defined(USERWORLD)) || defined(_WIN32) gboolean perfmonEnabled; perfmonEnabled = !g_key_file_get_boolean(ctx->config, @@ -1376,7 +1324,7 @@ TweakGatherLoops(ToolsAppCtx *ctx, TweakGatherLoop(ctx, enable, CONFNAME_GUESTINFO_STATSINTERVAL, GUESTINFO_STATS_INTERVAL, - GuestInfoStatsGather, + GuestInfo_StatProviderPoll, &guestInfoStatsInterval, &gatherStatsTimeoutSource); } else { @@ -1390,6 +1338,7 @@ TweakGatherLoops(ToolsAppCtx *ctx, g_info("PerfMon gather loop disabled.\n"); } } +#endif /* * Tweak GuestInfo gather loop @@ -1403,6 +1352,34 @@ TweakGatherLoops(ToolsAppCtx *ctx, } +/* + ****************************************************************************** + * + * GuestInfo_ServerReportStats -- + * + * Report gathered stats. + * + * Results: + * Stats reported to VMX/VMDB. Returns FALSE on failure. + * + * Side effects: + * None. + * + ****************************************************************************** + */ + +Bool +GuestInfo_ServerReportStats( + ToolsAppCtx *ctx, // IN + DynBuf *stats) // IN +{ + return GuestInfoUpdateVmdb(ctx, + INFO_MEMORY, + DynBuf_Get(stats), + DynBuf_GetSize(stats)); +} + + /* ****************************************************************************** * BEGIN Tools Core Services goodies. diff --git a/open-vm-tools/services/plugins/guestInfo/perfMonLinux.c b/open-vm-tools/services/plugins/guestInfo/perfMonLinux.c index 9946d4208..fc624ad98 100644 --- a/open-vm-tools/services/plugins/guestInfo/perfMonLinux.c +++ b/open-vm-tools/services/plugins/guestInfo/perfMonLinux.c @@ -42,6 +42,9 @@ #define ZONEINFO_FILE "/proc/zoneinfo" #define SWAPPINESS_FILE "/proc/sys/vm/swappiness" +#define PUBLISH_P1_2015_STATS 1 +#define PUBLISH_P1_2016_STATS 1 +#define PUBLISH_P2_STATS 1 /* * For now, all data collection is of uint64 values. Rates are always returned @@ -50,8 +53,9 @@ * TODO: Deal with collected and reported data types being different. */ +#define STAT_FLAG(x) PUBLISH_##x##_STATS #define DECLARE_STAT(collect, publish, file, isRegExp, locatorString, reportID, units, dataType) \ - { file, collect, publish, isRegExp, locatorString, reportID, units, dataType } + { file, STAT_FLAG(collect), STAT_FLAG(publish), isRegExp, locatorString, reportID, units, dataType } typedef struct { const char *sourceFile; @@ -65,28 +69,54 @@ typedef struct { } GuestInfoQuery; GuestInfoQuery guestInfoQuerySpecTable[] = { - DECLARE_STAT(TRUE, TRUE, MEMINFO_FILE, FALSE, "Hugepagesize", GuestStatID_HugePageSize, GuestUnitsKiB, GuestTypeUint64), - DECLARE_STAT(TRUE, TRUE, ZONEINFO_FILE,TRUE, "present", GuestStatID_MemPhysUsable, GuestUnitsKiB, GuestTypeUint64), - DECLARE_STAT(TRUE, TRUE, MEMINFO_FILE, FALSE, "MemFree", GuestStatID_MemFree, GuestUnitsKiB, GuestTypeUint64), - DECLARE_STAT(TRUE, TRUE, MEMINFO_FILE, FALSE, "Active(file)", GuestStatID_MemActiveFileCache, GuestUnitsKiB, GuestTypeUint64), - DECLARE_STAT(TRUE, TRUE, MEMINFO_FILE, FALSE, "SwapFree", GuestStatID_SwapSpaceRemaining, GuestUnitsKiB, GuestTypeUint64), - DECLARE_STAT(TRUE, TRUE, MEMINFO_FILE, FALSE, "HugePages_Total", GuestStatID_Linux_HugePagesTotal, GuestUnitsHugePages, GuestTypeUint64), - DECLARE_STAT(TRUE, TRUE, VMSTAT_FILE, FALSE, "pgpgin", GuestStatID_PageInRate, GuestUnitsPagesPerSecond, GuestTypeDouble), - DECLARE_STAT(TRUE, TRUE, VMSTAT_FILE, FALSE, "pgpgout", GuestStatID_PageOutRate, GuestUnitsPagesPerSecond, GuestTypeDouble), - DECLARE_STAT(TRUE, TRUE, STAT_FILE, FALSE, "ctxt", GuestStatID_ContextSwapRate, GuestUnitsNumberPerSecond, GuestTypeDouble), - DECLARE_STAT(TRUE, TRUE, NULL, FALSE, NULL, GuestStatID_PhysicalPageSize, GuestUnitsBytes, GuestTypeUint64), - - DECLARE_STAT(TRUE, FALSE, MEMINFO_FILE, FALSE, "MemAvailable", GuestStatID_Linux_MemAvailable, GuestUnitsKiB, GuestTypeUint64), - DECLARE_STAT(TRUE, FALSE, MEMINFO_FILE, FALSE, "Inactive(file)", GuestStatID_Linux_MemInactiveFile, GuestUnitsKiB, GuestTypeUint64), - DECLARE_STAT(TRUE, FALSE, MEMINFO_FILE, FALSE, "SReclaimable", GuestStatID_Linux_MemSlabReclaim, GuestUnitsKiB, GuestTypeUint64), - DECLARE_STAT(TRUE, FALSE, MEMINFO_FILE, FALSE, "Buffers", GuestStatID_Linux_MemBuffers, GuestUnitsKiB, GuestTypeUint64), - DECLARE_STAT(TRUE, FALSE, MEMINFO_FILE, FALSE, "Cached", GuestStatID_Linux_MemCached, GuestUnitsKiB, GuestTypeUint64), - DECLARE_STAT(TRUE, FALSE, NULL, FALSE, NULL, GuestStatID_SwapSpaceUsed, GuestUnitsKiB, GuestTypeUint64), - - DECLARE_STAT(TRUE, FALSE, MEMINFO_FILE, FALSE, "MemTotal", GuestStatID_Linux_MemTotal, GuestUnitsKiB, GuestTypeUint64), - DECLARE_STAT(TRUE, FALSE, MEMINFO_FILE, FALSE, "SwapTotal", GuestStatID_SwapFilesCurrent, GuestUnitsKiB, GuestTypeUint64), - DECLARE_STAT(TRUE, FALSE, NULL, FALSE, NULL, GuestStatID_SwapFilesMax, GuestUnitsKiB, GuestTypeUint64), - DECLARE_STAT(TRUE, FALSE, ZONEINFO_FILE, TRUE, "low", GuestStatID_Linux_LowWaterMark, GuestUnitsPages, GuestTypeUint64), + DECLARE_STAT(P1_2015, P1_2015, MEMINFO_FILE, FALSE, "Hugepagesize", GuestStatID_HugePageSize, GuestUnitsKiB, GuestTypeUint64), + DECLARE_STAT(P1_2015, P1_2015, ZONEINFO_FILE,TRUE, "present", GuestStatID_MemPhysUsable, GuestUnitsKiB, GuestTypeUint64), + DECLARE_STAT(P1_2015, P1_2015, MEMINFO_FILE, FALSE, "MemFree", GuestStatID_MemFree, GuestUnitsKiB, GuestTypeUint64), + DECLARE_STAT(P1_2015, P1_2015, MEMINFO_FILE, FALSE, "Active(file)", GuestStatID_MemActiveFileCache, GuestUnitsKiB, GuestTypeUint64), + DECLARE_STAT(P1_2015, P1_2015, MEMINFO_FILE, FALSE, "SwapFree", GuestStatID_SwapSpaceRemaining, GuestUnitsKiB, GuestTypeUint64), + DECLARE_STAT(P1_2015, P1_2015, MEMINFO_FILE, FALSE, "HugePages_Total", GuestStatID_Linux_HugePagesTotal, GuestUnitsHugePages, GuestTypeUint64), + DECLARE_STAT(P1_2015, P1_2015, VMSTAT_FILE, FALSE, "pgpgin", GuestStatID_PageInRate, GuestUnitsPagesPerSecond, GuestTypeDouble), + DECLARE_STAT(P1_2015, P1_2015, VMSTAT_FILE, FALSE, "pgpgout", GuestStatID_PageOutRate, GuestUnitsPagesPerSecond, GuestTypeDouble), + DECLARE_STAT(P1_2015, P1_2015, STAT_FILE, FALSE, "ctxt", GuestStatID_ContextSwapRate, GuestUnitsNumberPerSecond, GuestTypeDouble), + DECLARE_STAT(P1_2015, P1_2015, NULL, FALSE, NULL, GuestStatID_PhysicalPageSize, GuestUnitsBytes, GuestTypeUint64), + + DECLARE_STAT(P1_2015, P1_2016, MEMINFO_FILE, FALSE, "MemAvailable", GuestStatID_Linux_MemAvailable, GuestUnitsKiB, GuestTypeUint64), + DECLARE_STAT(P1_2015, P1_2016, MEMINFO_FILE, FALSE, "Inactive(file)", GuestStatID_Linux_MemInactiveFile, GuestUnitsKiB, GuestTypeUint64), + DECLARE_STAT(P1_2015, P1_2016, MEMINFO_FILE, FALSE, "SReclaimable", GuestStatID_Linux_MemSlabReclaim, GuestUnitsKiB, GuestTypeUint64), + DECLARE_STAT(P1_2015, P1_2016, MEMINFO_FILE, FALSE, "Buffers", GuestStatID_Linux_MemBuffers, GuestUnitsKiB, GuestTypeUint64), + DECLARE_STAT(P1_2015, P1_2016, MEMINFO_FILE, FALSE, "Cached", GuestStatID_Linux_MemCached, GuestUnitsKiB, GuestTypeUint64), + DECLARE_STAT(P1_2015, P1_2016, NULL, FALSE, NULL, GuestStatID_SwapSpaceUsed, GuestUnitsKiB, GuestTypeUint64), + + DECLARE_STAT(P1_2015, P2, MEMINFO_FILE, FALSE, "MemTotal", GuestStatID_Linux_MemTotal, GuestUnitsKiB, GuestTypeUint64), + DECLARE_STAT(P1_2015, P2, MEMINFO_FILE, FALSE, "SwapTotal", GuestStatID_SwapFilesCurrent, GuestUnitsKiB, GuestTypeUint64), + DECLARE_STAT(P1_2015, P2, NULL, FALSE, NULL, GuestStatID_SwapFilesMax, GuestUnitsKiB, GuestTypeUint64), + DECLARE_STAT(P1_2015, P2, ZONEINFO_FILE, TRUE, "low", GuestStatID_Linux_LowWaterMark, GuestUnitsPages, GuestTypeUint64), + +#if PUBLISH_P1_2016_STATS + DECLARE_STAT(P1_2016, P1_2016, MEMINFO_FILE, FALSE, "Active(anon)", GuestStatID_Linux_MemActiveAnon, GuestUnitsKiB, GuestTypeUint64), + DECLARE_STAT(P1_2016, P1_2016, MEMINFO_FILE, FALSE, "Inactive(anon)", GuestStatID_Linux_MemInactiveAnon, GuestUnitsKiB, GuestTypeUint64), + DECLARE_STAT(P1_2016, P1_2016, MEMINFO_FILE, FALSE, "Inactive", GuestStatID_Linux_MemInactive, GuestUnitsKiB, GuestTypeUint64), + DECLARE_STAT(P1_2016, P1_2016, MEMINFO_FILE, FALSE, "Active", GuestStatID_Linux_MemActive, GuestUnitsKiB, GuestTypeUint64), + DECLARE_STAT(P1_2016, P1_2016, MEMINFO_FILE, FALSE, "Unevictable", GuestStatID_Linux_MemPinned, GuestUnitsKiB, GuestTypeUint64), + DECLARE_STAT(P1_2016, P1_2016, MEMINFO_FILE, FALSE, "Dirty", GuestStatID_Linux_MemDirty, GuestUnitsKiB, GuestTypeUint64), + DECLARE_STAT(P1_2016, P1_2016, VMSTAT_FILE, FALSE, "pswpin", GuestStatID_PageSwapInRate, GuestUnitsPagesPerSecond, GuestTypeDouble), + DECLARE_STAT(P1_2016, P1_2016, VMSTAT_FILE, FALSE, "pswpout", GuestStatID_PageSwapOutRate, GuestUnitsPagesPerSecond, GuestTypeDouble), + DECLARE_STAT(P1_2016, P1_2016, NULL, FALSE, NULL, GuestStatID_ThreadCreationRate, GuestUnitsNumberPerSecond, GuestTypeDouble), + DECLARE_STAT(P1_2016, P1_2016, SWAPPINESS_FILE, FALSE, NULL, GuestStatID_Linux_Swappiness, GuestUnitsPercent, GuestTypeUint64), +#endif + +#if PUBLISH_P2_STATS + DECLARE_STAT(P2, P2, MEMINFO_FILE, FALSE, "SwapCached", GuestStatID_Linux_MemSwapCached, GuestUnitsKiB, GuestTypeUint64), + DECLARE_STAT(P2, P2, MEMINFO_FILE, FALSE, "Committed_AS", GuestStatID_Linux_MemCommitted, GuestUnitsKiB, GuestTypeUint64), + DECLARE_STAT(P2, P2, MEMINFO_FILE, FALSE, "HugePages_Free", GuestStatID_Linux_HugePagesFree, GuestUnitsHugePages, GuestTypeUint64), + DECLARE_STAT(P2, P2, VMSTAT_FILE, FALSE, "pgfault", GuestStatID_Linux_PageFaultRate, GuestUnitsPagesPerSecond, GuestTypeDouble), + DECLARE_STAT(P2, P2, VMSTAT_FILE, FALSE, "pgmajfault", GuestStatID_Linux_PageMajorFaultRate, GuestUnitsPagesPerSecond, GuestTypeDouble), + DECLARE_STAT(P2, P2, VMSTAT_FILE, FALSE, "pgfree", GuestStatID_Linux_PageFreeRate, GuestUnitsPagesPerSecond, GuestTypeDouble), + DECLARE_STAT(P2, P2, VMSTAT_FILE, TRUE, "pgsteal_", GuestStatID_Linux_PageStealRate, GuestUnitsPagesPerSecond, GuestTypeDouble), + DECLARE_STAT(P2, P2, VMSTAT_FILE, TRUE, "pgscan_kswapd_", GuestStatID_Linux_PageSwapScanRate, GuestUnitsPagesPerSecond, GuestTypeDouble), + DECLARE_STAT(P2, P2, VMSTAT_FILE, TRUE, "pgscan_direct_", GuestStatID_Linux_PageDirectScanRate, GuestUnitsPagesPerSecond, GuestTypeDouble), + DECLARE_STAT(P2, P2, STAT_FILE, FALSE, "processes", GuestStatID_ProcessCreationRate, GuestUnitsNumberPerSecond, GuestTypeDouble), +#endif }; #define N_QUERIES (sizeof guestInfoQuerySpecTable / sizeof(GuestInfoQuery)) @@ -367,6 +397,64 @@ GuestInfoProcData(const char *pathName, // IN: path name } +/* + *---------------------------------------------------------------------- + * + * GuestInfoProcSimpleValue -- + * + * Reads the specified /proc file, extracts a single, simple value and + * adds it to the collection. + * + * Results: + * TRUE Success! + * FALSE Failure! + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ +#if PUBLISH_P1_2016_STATS + +static Bool +GuestInfoProcSimpleValue(const char *pathName, // IN: + GuestStatToolsID reportID, // IN: + GuestInfoCollector *collector) // IN/OUT: +{ + char line[4096]; + uint64 value = 0; + FILE *fp = Posix_Fopen(pathName, "r"); + Bool success = FALSE; + + if (fp == NULL) { + g_warning("%s: Error opening %s.\n", __FUNCTION__, pathName); + return success; + } + + if (fgets(line, sizeof line, fp) != NULL) { + if (sscanf(line, "%"FMT64"u", &value) == 1) { + success = TRUE; + } + } + + fclose(fp); + + if (success) { + GuestInfoStat *stat = NULL; + + HashTable_Lookup(collector->reportMap, INT_AS_HASHKEY(reportID), + (void **) &stat); + + if (stat != NULL) { + GuestInfoStoreStat(pathName, stat, value); + } + } + + return success; +} +#endif + + /* *---------------------------------------------------------------------- * @@ -481,6 +569,10 @@ GuestInfoCollect(GuestInfoCollector *collector) // IN: GuestInfoProcData(VMSTAT_FILE, collector); GuestInfoProcData(STAT_FILE, collector); GuestInfoProcData(ZONEINFO_FILE, collector); +#if PUBLISH_P1_2016_STATS + GuestInfoProcSimpleValue(SWAPPINESS_FILE, GuestStatID_Linux_Swappiness, + collector); +#endif GuestInfoDeriveSwapData(collector); collector->timeData = GuestInfoGetUpTime(&collector->timeStamp); @@ -547,7 +639,7 @@ GuestInfoCollect(GuestInfoCollector *collector) // IN: static void GuestInfoLegacy(GuestInfoCollector *current, // IN: current collection - GuestMemInfo *legacy) // OUT: data filled out + GuestMemInfoLegacy *legacy) // OUT: data filled out { GuestInfoStat *stat; @@ -891,6 +983,7 @@ GuestInfoAppendMemNeeded(GuestInfoCollector *current, // IN: current collection memNeededReservation = 0; } +#if PUBLISH_P1_2015_STATS GuestInfoAppendStat(0, emitNameSpace, GuestStatID_MemNeeded, @@ -900,6 +993,17 @@ GuestInfoAppendMemNeeded(GuestInfoCollector *current, // IN: current collection statBuf); emitNameSpace = FALSE; +#endif + +#if PUBLISH_P2_STATS + GuestInfoAppendStat(0, + emitNameSpace, + GuestStatID_MemNeededReservation, + GuestUnitsKiB, GuestTypeUint64, + &memNeededReservation, + GuestInfoBytesNeededUIntDatum(memNeededReservation), + statBuf); +#endif } @@ -949,7 +1053,7 @@ GuestInfoEncodeStats(GuestInfoCollector *current, // IN: current collection DynBuf *statBuf) // IN/OUT: stats data { uint32 i; - GuestMemInfo legacy; + GuestMemInfoLegacy legacy; Bool emitNameSpace = TRUE; /* Provide legacy data for backwards compatibility */ @@ -1108,7 +1212,7 @@ GuestInfoConstructCollector(GuestInfoQuery *queries, // IN: /* *---------------------------------------------------------------------- * - * GuestInfo_PerfMon -- + * GuestInfoTakeSample -- * * Gather performance stats. * @@ -1123,7 +1227,7 @@ GuestInfoConstructCollector(GuestInfoQuery *queries, // IN: */ Bool -GuestInfo_PerfMon(DynBuf *statBuf) // IN/OUT: inited, ready to fill +GuestInfoTakeSample(DynBuf *statBuf) // IN/OUT: inited, ready to fill { GuestInfoCollector *temp; static GuestInfoCollector *current = NULL; @@ -1168,3 +1272,40 @@ GuestInfo_PerfMon(DynBuf *statBuf) // IN/OUT: inited, ready to fill return TRUE; } + +/* + *---------------------------------------------------------------------- + * + * GuestInfo_StatProviderPoll -- + * + * Called when a new stat sample is requested. GuestInfo_ReportStats + * should be called once the sample is available. If gathering is taking + * longer than sampling frequency, the request may be ignored. + * + * @param[in] data The application context. + * + * @return TRUE to indicate that the timer should be rescheduled. + * + *---------------------------------------------------------------------- + */ + +gboolean +GuestInfo_StatProviderPoll(gpointer data) +{ + ToolsAppCtx *ctx = data; + DynBuf stats; + + g_debug("Entered guest info stats gather.\n"); + + /* Send the vmstats to the VMX. */ + DynBuf_Init(&stats); + + if (!GuestInfoTakeSample(&stats)) { + g_warning("Failed to get vmstats.\n"); + } else if (!GuestInfo_ServerReportStats(ctx, &stats)) { + g_warning("Failed to send vmstats.\n"); + } + + DynBuf_Destroy(&stats); + return TRUE; +} diff --git a/open-vm-tools/services/plugins/hgfsServer/Makefile.in b/open-vm-tools/services/plugins/hgfsServer/Makefile.in deleted file mode 100644 index 43969caba..000000000 --- a/open-vm-tools/services/plugins/hgfsServer/Makefile.in +++ /dev/null @@ -1,576 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = services/plugins/hgfsServer -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(plugindir)" -pluginLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(plugin_LTLIBRARIES) -libhgfsServer_la_DEPENDENCIES = -am_libhgfsServer_la_OBJECTS = libhgfsServer_la-hgfsPlugin.lo -libhgfsServer_la_OBJECTS = $(am_libhgfsServer_la_OBJECTS) -libhgfsServer_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libhgfsServer_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libhgfsServer_la_SOURCES) -DIST_SOURCES = $(libhgfsServer_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -plugindir = @COMMON_PLUGIN_INSTALLDIR@ -plugin_LTLIBRARIES = libhgfsServer.la -libhgfsServer_la_CPPFLAGS = @PLUGIN_CPPFLAGS@ -libhgfsServer_la_LDFLAGS = @PLUGIN_LDFLAGS@ -libhgfsServer_la_LIBADD = @VMTOOLS_LIBS@ @HGFS_LIBS@ -libhgfsServer_la_SOURCES = hgfsPlugin.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu services/plugins/hgfsServer/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu services/plugins/hgfsServer/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(plugindir)" || $(MKDIR_P) "$(DESTDIR)$(plugindir)" - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(plugindir)/$$f'"; \ - $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(plugindir)/$$f"; \ - else :; fi; \ - done - -uninstall-pluginLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$p"; \ - done - -clean-pluginLTLIBRARIES: - -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libhgfsServer.la: $(libhgfsServer_la_OBJECTS) $(libhgfsServer_la_DEPENDENCIES) - $(libhgfsServer_la_LINK) -rpath $(plugindir) $(libhgfsServer_la_OBJECTS) $(libhgfsServer_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhgfsServer_la-hgfsPlugin.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libhgfsServer_la-hgfsPlugin.lo: hgfsPlugin.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhgfsServer_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libhgfsServer_la-hgfsPlugin.lo -MD -MP -MF $(DEPDIR)/libhgfsServer_la-hgfsPlugin.Tpo -c -o libhgfsServer_la-hgfsPlugin.lo `test -f 'hgfsPlugin.c' || echo '$(srcdir)/'`hgfsPlugin.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libhgfsServer_la-hgfsPlugin.Tpo $(DEPDIR)/libhgfsServer_la-hgfsPlugin.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hgfsPlugin.c' object='libhgfsServer_la-hgfsPlugin.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhgfsServer_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libhgfsServer_la-hgfsPlugin.lo `test -f 'hgfsPlugin.c' || echo '$(srcdir)/'`hgfsPlugin.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: - for dir in "$(DESTDIR)$(plugindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-pluginLTLIBRARIES - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-pluginLTLIBRARIES - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-pluginLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-pluginLTLIBRARIES \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-pluginLTLIBRARIES - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/services/plugins/powerOps/Makefile.in b/open-vm-tools/services/plugins/powerOps/Makefile.in deleted file mode 100644 index 9eeffc67e..000000000 --- a/open-vm-tools/services/plugins/powerOps/Makefile.in +++ /dev/null @@ -1,576 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = services/plugins/powerOps -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(plugindir)" -pluginLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(plugin_LTLIBRARIES) -libpowerOps_la_DEPENDENCIES = -am_libpowerOps_la_OBJECTS = libpowerOps_la-powerOps.lo -libpowerOps_la_OBJECTS = $(am_libpowerOps_la_OBJECTS) -libpowerOps_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libpowerOps_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libpowerOps_la_SOURCES) -DIST_SOURCES = $(libpowerOps_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -plugindir = @VMSVC_PLUGIN_INSTALLDIR@ -plugin_LTLIBRARIES = libpowerOps.la -libpowerOps_la_CPPFLAGS = @PLUGIN_CPPFLAGS@ -libpowerOps_la_LDFLAGS = @PLUGIN_LDFLAGS@ -libpowerOps_la_LIBADD = @VMTOOLS_LIBS@ -libpowerOps_la_SOURCES = powerOps.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu services/plugins/powerOps/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu services/plugins/powerOps/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(plugindir)" || $(MKDIR_P) "$(DESTDIR)$(plugindir)" - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(plugindir)/$$f'"; \ - $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(plugindir)/$$f"; \ - else :; fi; \ - done - -uninstall-pluginLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$p"; \ - done - -clean-pluginLTLIBRARIES: - -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libpowerOps.la: $(libpowerOps_la_OBJECTS) $(libpowerOps_la_DEPENDENCIES) - $(libpowerOps_la_LINK) -rpath $(plugindir) $(libpowerOps_la_OBJECTS) $(libpowerOps_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpowerOps_la-powerOps.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libpowerOps_la-powerOps.lo: powerOps.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpowerOps_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpowerOps_la-powerOps.lo -MD -MP -MF $(DEPDIR)/libpowerOps_la-powerOps.Tpo -c -o libpowerOps_la-powerOps.lo `test -f 'powerOps.c' || echo '$(srcdir)/'`powerOps.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpowerOps_la-powerOps.Tpo $(DEPDIR)/libpowerOps_la-powerOps.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='powerOps.c' object='libpowerOps_la-powerOps.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpowerOps_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpowerOps_la-powerOps.lo `test -f 'powerOps.c' || echo '$(srcdir)/'`powerOps.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: - for dir in "$(DESTDIR)$(plugindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-pluginLTLIBRARIES - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-pluginLTLIBRARIES - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-pluginLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-pluginLTLIBRARIES \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-pluginLTLIBRARIES - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/services/plugins/resolutionSet/Makefile.in b/open-vm-tools/services/plugins/resolutionSet/Makefile.in deleted file mode 100644 index b33790c2b..000000000 --- a/open-vm-tools/services/plugins/resolutionSet/Makefile.in +++ /dev/null @@ -1,605 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = services/plugins/resolutionSet -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(plugindir)" -pluginLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(plugin_LTLIBRARIES) -libresolutionSet_la_DEPENDENCIES = -am_libresolutionSet_la_OBJECTS = libresolutionSet_la-libvmwarectrl.lo \ - libresolutionSet_la-resolutionSet.lo \ - libresolutionSet_la-resolutionX11.lo \ - libresolutionSet_la-resolutionRandR12.lo -libresolutionSet_la_OBJECTS = $(am_libresolutionSet_la_OBJECTS) -libresolutionSet_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libresolutionSet_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libresolutionSet_la_SOURCES) -DIST_SOURCES = $(libresolutionSet_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -plugindir = @VMUSR_PLUGIN_INSTALLDIR@ -plugin_LTLIBRARIES = libresolutionSet.la -libresolutionSet_la_CPPFLAGS = @GTK_CPPFLAGS@ @PLUGIN_CPPFLAGS@ \ - -DRESOLUTION_X11 -libresolutionSet_la_LDFLAGS = @PLUGIN_LDFLAGS@ -libresolutionSet_la_LIBADD = @COMMON_XLIBS@ @GTK_LIBS@ @VMTOOLS_LIBS@ -libresolutionSet_la_SOURCES = libvmwarectrl.c resolutionSet.c \ - resolutionX11.c resolutionRandR12.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu services/plugins/resolutionSet/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu services/plugins/resolutionSet/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(plugindir)" || $(MKDIR_P) "$(DESTDIR)$(plugindir)" - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(plugindir)/$$f'"; \ - $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(plugindir)/$$f"; \ - else :; fi; \ - done - -uninstall-pluginLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$p"; \ - done - -clean-pluginLTLIBRARIES: - -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libresolutionSet.la: $(libresolutionSet_la_OBJECTS) $(libresolutionSet_la_DEPENDENCIES) - $(libresolutionSet_la_LINK) -rpath $(plugindir) $(libresolutionSet_la_OBJECTS) $(libresolutionSet_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libresolutionSet_la-libvmwarectrl.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libresolutionSet_la-resolutionRandR12.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libresolutionSet_la-resolutionSet.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libresolutionSet_la-resolutionX11.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libresolutionSet_la-libvmwarectrl.lo: libvmwarectrl.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libresolutionSet_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libresolutionSet_la-libvmwarectrl.lo -MD -MP -MF $(DEPDIR)/libresolutionSet_la-libvmwarectrl.Tpo -c -o libresolutionSet_la-libvmwarectrl.lo `test -f 'libvmwarectrl.c' || echo '$(srcdir)/'`libvmwarectrl.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libresolutionSet_la-libvmwarectrl.Tpo $(DEPDIR)/libresolutionSet_la-libvmwarectrl.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libvmwarectrl.c' object='libresolutionSet_la-libvmwarectrl.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libresolutionSet_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libresolutionSet_la-libvmwarectrl.lo `test -f 'libvmwarectrl.c' || echo '$(srcdir)/'`libvmwarectrl.c - -libresolutionSet_la-resolutionSet.lo: resolutionSet.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libresolutionSet_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libresolutionSet_la-resolutionSet.lo -MD -MP -MF $(DEPDIR)/libresolutionSet_la-resolutionSet.Tpo -c -o libresolutionSet_la-resolutionSet.lo `test -f 'resolutionSet.c' || echo '$(srcdir)/'`resolutionSet.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libresolutionSet_la-resolutionSet.Tpo $(DEPDIR)/libresolutionSet_la-resolutionSet.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='resolutionSet.c' object='libresolutionSet_la-resolutionSet.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libresolutionSet_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libresolutionSet_la-resolutionSet.lo `test -f 'resolutionSet.c' || echo '$(srcdir)/'`resolutionSet.c - -libresolutionSet_la-resolutionX11.lo: resolutionX11.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libresolutionSet_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libresolutionSet_la-resolutionX11.lo -MD -MP -MF $(DEPDIR)/libresolutionSet_la-resolutionX11.Tpo -c -o libresolutionSet_la-resolutionX11.lo `test -f 'resolutionX11.c' || echo '$(srcdir)/'`resolutionX11.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libresolutionSet_la-resolutionX11.Tpo $(DEPDIR)/libresolutionSet_la-resolutionX11.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='resolutionX11.c' object='libresolutionSet_la-resolutionX11.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libresolutionSet_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libresolutionSet_la-resolutionX11.lo `test -f 'resolutionX11.c' || echo '$(srcdir)/'`resolutionX11.c - -libresolutionSet_la-resolutionRandR12.lo: resolutionRandR12.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libresolutionSet_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libresolutionSet_la-resolutionRandR12.lo -MD -MP -MF $(DEPDIR)/libresolutionSet_la-resolutionRandR12.Tpo -c -o libresolutionSet_la-resolutionRandR12.lo `test -f 'resolutionRandR12.c' || echo '$(srcdir)/'`resolutionRandR12.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libresolutionSet_la-resolutionRandR12.Tpo $(DEPDIR)/libresolutionSet_la-resolutionRandR12.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='resolutionRandR12.c' object='libresolutionSet_la-resolutionRandR12.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libresolutionSet_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libresolutionSet_la-resolutionRandR12.lo `test -f 'resolutionRandR12.c' || echo '$(srcdir)/'`resolutionRandR12.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: - for dir in "$(DESTDIR)$(plugindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-pluginLTLIBRARIES - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-pluginLTLIBRARIES - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-pluginLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-pluginLTLIBRARIES \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-pluginLTLIBRARIES - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/services/plugins/timeSync/Makefile.in b/open-vm-tools/services/plugins/timeSync/Makefile.in deleted file mode 100644 index f955bffc0..000000000 --- a/open-vm-tools/services/plugins/timeSync/Makefile.in +++ /dev/null @@ -1,630 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@SOLARIS_TRUE@am__append_1 = slewAdjtime.c pllNone.c -@FREEBSD_TRUE@am__append_2 = slewAdjtime.c pllNone.c -@LINUX_TRUE@am__append_3 = slewLinux.c pllLinux.c -subdir = services/plugins/timeSync -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(plugindir)" -pluginLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(plugin_LTLIBRARIES) -libtimeSync_la_DEPENDENCIES = -am__libtimeSync_la_SOURCES_DIST = timeSync.c timeSyncPosix.c \ - slewAdjtime.c pllNone.c slewLinux.c pllLinux.c -@SOLARIS_TRUE@am__objects_1 = libtimeSync_la-slewAdjtime.lo \ -@SOLARIS_TRUE@ libtimeSync_la-pllNone.lo -@FREEBSD_TRUE@am__objects_2 = libtimeSync_la-slewAdjtime.lo \ -@FREEBSD_TRUE@ libtimeSync_la-pllNone.lo -@LINUX_TRUE@am__objects_3 = libtimeSync_la-slewLinux.lo \ -@LINUX_TRUE@ libtimeSync_la-pllLinux.lo -am_libtimeSync_la_OBJECTS = libtimeSync_la-timeSync.lo \ - libtimeSync_la-timeSyncPosix.lo $(am__objects_1) \ - $(am__objects_2) $(am__objects_3) -libtimeSync_la_OBJECTS = $(am_libtimeSync_la_OBJECTS) -libtimeSync_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libtimeSync_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libtimeSync_la_SOURCES) -DIST_SOURCES = $(am__libtimeSync_la_SOURCES_DIST) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -plugindir = @VMSVC_PLUGIN_INSTALLDIR@ -plugin_LTLIBRARIES = libtimeSync.la -libtimeSync_la_CPPFLAGS = @PLUGIN_CPPFLAGS@ -libtimeSync_la_LDFLAGS = @PLUGIN_LDFLAGS@ -libtimeSync_la_LIBADD = @VMTOOLS_LIBS@ -libtimeSync_la_SOURCES = timeSync.c timeSyncPosix.c $(am__append_1) \ - $(am__append_2) $(am__append_3) -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu services/plugins/timeSync/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu services/plugins/timeSync/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(plugindir)" || $(MKDIR_P) "$(DESTDIR)$(plugindir)" - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(plugindir)/$$f'"; \ - $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(plugindir)/$$f"; \ - else :; fi; \ - done - -uninstall-pluginLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$p"; \ - done - -clean-pluginLTLIBRARIES: - -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libtimeSync.la: $(libtimeSync_la_OBJECTS) $(libtimeSync_la_DEPENDENCIES) - $(libtimeSync_la_LINK) -rpath $(plugindir) $(libtimeSync_la_OBJECTS) $(libtimeSync_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtimeSync_la-pllLinux.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtimeSync_la-pllNone.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtimeSync_la-slewAdjtime.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtimeSync_la-slewLinux.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtimeSync_la-timeSync.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtimeSync_la-timeSyncPosix.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libtimeSync_la-timeSync.lo: timeSync.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtimeSync_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtimeSync_la-timeSync.lo -MD -MP -MF $(DEPDIR)/libtimeSync_la-timeSync.Tpo -c -o libtimeSync_la-timeSync.lo `test -f 'timeSync.c' || echo '$(srcdir)/'`timeSync.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libtimeSync_la-timeSync.Tpo $(DEPDIR)/libtimeSync_la-timeSync.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='timeSync.c' object='libtimeSync_la-timeSync.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtimeSync_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtimeSync_la-timeSync.lo `test -f 'timeSync.c' || echo '$(srcdir)/'`timeSync.c - -libtimeSync_la-timeSyncPosix.lo: timeSyncPosix.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtimeSync_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtimeSync_la-timeSyncPosix.lo -MD -MP -MF $(DEPDIR)/libtimeSync_la-timeSyncPosix.Tpo -c -o libtimeSync_la-timeSyncPosix.lo `test -f 'timeSyncPosix.c' || echo '$(srcdir)/'`timeSyncPosix.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libtimeSync_la-timeSyncPosix.Tpo $(DEPDIR)/libtimeSync_la-timeSyncPosix.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='timeSyncPosix.c' object='libtimeSync_la-timeSyncPosix.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtimeSync_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtimeSync_la-timeSyncPosix.lo `test -f 'timeSyncPosix.c' || echo '$(srcdir)/'`timeSyncPosix.c - -libtimeSync_la-slewAdjtime.lo: slewAdjtime.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtimeSync_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtimeSync_la-slewAdjtime.lo -MD -MP -MF $(DEPDIR)/libtimeSync_la-slewAdjtime.Tpo -c -o libtimeSync_la-slewAdjtime.lo `test -f 'slewAdjtime.c' || echo '$(srcdir)/'`slewAdjtime.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libtimeSync_la-slewAdjtime.Tpo $(DEPDIR)/libtimeSync_la-slewAdjtime.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='slewAdjtime.c' object='libtimeSync_la-slewAdjtime.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtimeSync_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtimeSync_la-slewAdjtime.lo `test -f 'slewAdjtime.c' || echo '$(srcdir)/'`slewAdjtime.c - -libtimeSync_la-pllNone.lo: pllNone.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtimeSync_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtimeSync_la-pllNone.lo -MD -MP -MF $(DEPDIR)/libtimeSync_la-pllNone.Tpo -c -o libtimeSync_la-pllNone.lo `test -f 'pllNone.c' || echo '$(srcdir)/'`pllNone.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libtimeSync_la-pllNone.Tpo $(DEPDIR)/libtimeSync_la-pllNone.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pllNone.c' object='libtimeSync_la-pllNone.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtimeSync_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtimeSync_la-pllNone.lo `test -f 'pllNone.c' || echo '$(srcdir)/'`pllNone.c - -libtimeSync_la-slewLinux.lo: slewLinux.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtimeSync_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtimeSync_la-slewLinux.lo -MD -MP -MF $(DEPDIR)/libtimeSync_la-slewLinux.Tpo -c -o libtimeSync_la-slewLinux.lo `test -f 'slewLinux.c' || echo '$(srcdir)/'`slewLinux.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libtimeSync_la-slewLinux.Tpo $(DEPDIR)/libtimeSync_la-slewLinux.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='slewLinux.c' object='libtimeSync_la-slewLinux.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtimeSync_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtimeSync_la-slewLinux.lo `test -f 'slewLinux.c' || echo '$(srcdir)/'`slewLinux.c - -libtimeSync_la-pllLinux.lo: pllLinux.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtimeSync_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtimeSync_la-pllLinux.lo -MD -MP -MF $(DEPDIR)/libtimeSync_la-pllLinux.Tpo -c -o libtimeSync_la-pllLinux.lo `test -f 'pllLinux.c' || echo '$(srcdir)/'`pllLinux.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libtimeSync_la-pllLinux.Tpo $(DEPDIR)/libtimeSync_la-pllLinux.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pllLinux.c' object='libtimeSync_la-pllLinux.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtimeSync_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtimeSync_la-pllLinux.lo `test -f 'pllLinux.c' || echo '$(srcdir)/'`pllLinux.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: - for dir in "$(DESTDIR)$(plugindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-pluginLTLIBRARIES - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-pluginLTLIBRARIES - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-pluginLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-pluginLTLIBRARIES \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-pluginLTLIBRARIES - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/services/plugins/vix/Makefile.in b/open-vm-tools/services/plugins/vix/Makefile.in deleted file mode 100644 index 82f5e7f3e..000000000 --- a/open-vm-tools/services/plugins/vix/Makefile.in +++ /dev/null @@ -1,611 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@ENABLE_VGAUTH_TRUE@am__append_1 = $(top_builddir)/vgauth/lib/libvgauth.la -subdir = services/plugins/vix -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(plugindir)" -pluginLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(plugin_LTLIBRARIES) -libvix_la_DEPENDENCIES = $(top_builddir)/lib/auth/libAuth.la \ - $(top_builddir)/lib/foundryMsg/libFoundryMsg.la \ - $(top_builddir)/lib/impersonate/libImpersonate.la \ - $(am__append_1) -am_libvix_la_OBJECTS = libvix_la-foundryToolsDaemon.lo \ - libvix_la-vixPlugin.lo libvix_la-vixTools.lo \ - libvix_la-vixToolsEnvVars.lo -libvix_la_OBJECTS = $(am_libvix_la_OBJECTS) -libvix_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libvix_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libvix_la_SOURCES) -DIST_SOURCES = $(libvix_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -plugindir = @COMMON_PLUGIN_INSTALLDIR@ -plugin_LTLIBRARIES = libvix.la -libvix_la_CPPFLAGS = @PLUGIN_CPPFLAGS@ -I$(top_srcdir)/vgauth/public -libvix_la_LDFLAGS = @PLUGIN_LDFLAGS@ -libvix_la_LIBADD = @VIX_LIBADD@ @VMTOOLS_LIBS@ @HGFS_LIBS@ \ - $(top_builddir)/lib/auth/libAuth.la \ - $(top_builddir)/lib/foundryMsg/libFoundryMsg.la \ - $(top_builddir)/lib/impersonate/libImpersonate.la \ - $(am__append_1) -libvix_la_SOURCES = foundryToolsDaemon.c vixPlugin.c vixTools.c \ - vixToolsEnvVars.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu services/plugins/vix/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu services/plugins/vix/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(plugindir)" || $(MKDIR_P) "$(DESTDIR)$(plugindir)" - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(plugindir)/$$f'"; \ - $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(plugindir)/$$f"; \ - else :; fi; \ - done - -uninstall-pluginLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$p"; \ - done - -clean-pluginLTLIBRARIES: - -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libvix.la: $(libvix_la_OBJECTS) $(libvix_la_DEPENDENCIES) - $(libvix_la_LINK) -rpath $(plugindir) $(libvix_la_OBJECTS) $(libvix_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvix_la-foundryToolsDaemon.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvix_la-vixPlugin.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvix_la-vixTools.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvix_la-vixToolsEnvVars.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libvix_la-foundryToolsDaemon.lo: foundryToolsDaemon.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvix_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvix_la-foundryToolsDaemon.lo -MD -MP -MF $(DEPDIR)/libvix_la-foundryToolsDaemon.Tpo -c -o libvix_la-foundryToolsDaemon.lo `test -f 'foundryToolsDaemon.c' || echo '$(srcdir)/'`foundryToolsDaemon.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvix_la-foundryToolsDaemon.Tpo $(DEPDIR)/libvix_la-foundryToolsDaemon.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='foundryToolsDaemon.c' object='libvix_la-foundryToolsDaemon.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvix_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvix_la-foundryToolsDaemon.lo `test -f 'foundryToolsDaemon.c' || echo '$(srcdir)/'`foundryToolsDaemon.c - -libvix_la-vixPlugin.lo: vixPlugin.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvix_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvix_la-vixPlugin.lo -MD -MP -MF $(DEPDIR)/libvix_la-vixPlugin.Tpo -c -o libvix_la-vixPlugin.lo `test -f 'vixPlugin.c' || echo '$(srcdir)/'`vixPlugin.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvix_la-vixPlugin.Tpo $(DEPDIR)/libvix_la-vixPlugin.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='vixPlugin.c' object='libvix_la-vixPlugin.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvix_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvix_la-vixPlugin.lo `test -f 'vixPlugin.c' || echo '$(srcdir)/'`vixPlugin.c - -libvix_la-vixTools.lo: vixTools.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvix_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvix_la-vixTools.lo -MD -MP -MF $(DEPDIR)/libvix_la-vixTools.Tpo -c -o libvix_la-vixTools.lo `test -f 'vixTools.c' || echo '$(srcdir)/'`vixTools.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvix_la-vixTools.Tpo $(DEPDIR)/libvix_la-vixTools.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='vixTools.c' object='libvix_la-vixTools.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvix_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvix_la-vixTools.lo `test -f 'vixTools.c' || echo '$(srcdir)/'`vixTools.c - -libvix_la-vixToolsEnvVars.lo: vixToolsEnvVars.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvix_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvix_la-vixToolsEnvVars.lo -MD -MP -MF $(DEPDIR)/libvix_la-vixToolsEnvVars.Tpo -c -o libvix_la-vixToolsEnvVars.lo `test -f 'vixToolsEnvVars.c' || echo '$(srcdir)/'`vixToolsEnvVars.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvix_la-vixToolsEnvVars.Tpo $(DEPDIR)/libvix_la-vixToolsEnvVars.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='vixToolsEnvVars.c' object='libvix_la-vixToolsEnvVars.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvix_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvix_la-vixToolsEnvVars.lo `test -f 'vixToolsEnvVars.c' || echo '$(srcdir)/'`vixToolsEnvVars.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: - for dir in "$(DESTDIR)$(plugindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-pluginLTLIBRARIES - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-pluginLTLIBRARIES - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-pluginLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-pluginLTLIBRARIES \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-pluginLTLIBRARIES - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/services/plugins/vix/vixTools.c b/open-vm-tools/services/plugins/vix/vixTools.c index 3b195540d..b2c925c6f 100644 --- a/open-vm-tools/services/plugins/vix/vixTools.c +++ b/open-vm-tools/services/plugins/vix/vixTools.c @@ -5759,6 +5759,27 @@ VixToolsKillProcess(VixCommandRequestHeader *requestMsg) // IN goto abort; } +#if defined(__APPLE__) + /* + * On OS X, we can only impersonate the effective UID, not real. + * But the kill(2) syscall looks at real UID. This means its working + * as root, and therefore its a massive security hole to leave it + * as-is. + * + * Its unclear if anyone actually cares, so for now, just turn + * it off. Its trivial to workaround (RunProgram of 'kill '.) + * + * Two possible fixes if necessary: + * + * - sleaze things and rewrite as a RunProgram("kill "). This + * will lose probably error info. + * - do the kill inside fork(), sending back any error code + * on a pipe. + */ + err = VIX_E_NOT_SUPPORTED; + goto abort; +#endif + if (!ProcMgr_KillByPid(killProcessRequest->pid)) { /* * Save off the error code so any debug statements added later diff --git a/open-vm-tools/services/plugins/vmbackup/Makefile.in b/open-vm-tools/services/plugins/vmbackup/Makefile.in deleted file mode 100644 index 3512124e1..000000000 --- a/open-vm-tools/services/plugins/vmbackup/Makefile.in +++ /dev/null @@ -1,646 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = services/plugins/vmbackup -DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(plugindir)" -pluginLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(plugin_LTLIBRARIES) -libvmbackup_la_DEPENDENCIES = -am_libvmbackup_la_OBJECTS = libvmbackup_la-nullProvider.lo \ - libvmbackup_la-scriptOps.lo libvmbackup_la-stateMachine.lo \ - libvmbackup_la-syncDriverOps.lo \ - libvmbackup_la-vmBackupSignals.lo \ - libvmbackup_la-guestQuiesce_xdr.lo -libvmbackup_la_OBJECTS = $(am_libvmbackup_la_OBJECTS) -libvmbackup_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libvmbackup_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libvmbackup_la_SOURCES) -DIST_SOURCES = $(libvmbackup_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -plugindir = @VMSVC_PLUGIN_INSTALLDIR@ -plugin_LTLIBRARIES = libvmbackup.la -libvmbackup_la_CPPFLAGS = @PLUGIN_CPPFLAGS@ -libvmbackup_la_LDFLAGS = @PLUGIN_LDFLAGS@ -libvmbackup_la_LIBADD = @GOBJECT_LIBS@ @VMTOOLS_LIBS@ -libvmbackup_la_SOURCES = nullProvider.c scriptOps.c stateMachine.c \ - syncDriverOps.c vmBackupSignals.c guestQuiesce_xdr.c -BUILT_SOURCES = vmBackupSignals.c vmBackupSignals.h guestQuiesce.h \ - guestQuiesce_xdr.c -CLEANFILES = vmBackupSignals.c vmBackupSignals.h guestQuiesce.h \ - guestQuiesce_xdr.c -EXTRA_DIST = vmBackupSignals.gm -all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu services/plugins/vmbackup/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu services/plugins/vmbackup/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(plugindir)" || $(MKDIR_P) "$(DESTDIR)$(plugindir)" - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(plugindir)/$$f'"; \ - $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(plugindir)/$$f"; \ - else :; fi; \ - done - -uninstall-pluginLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$p"; \ - done - -clean-pluginLTLIBRARIES: - -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libvmbackup.la: $(libvmbackup_la_OBJECTS) $(libvmbackup_la_DEPENDENCIES) - $(libvmbackup_la_LINK) -rpath $(plugindir) $(libvmbackup_la_OBJECTS) $(libvmbackup_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvmbackup_la-guestQuiesce_xdr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvmbackup_la-nullProvider.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvmbackup_la-scriptOps.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvmbackup_la-stateMachine.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvmbackup_la-syncDriverOps.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvmbackup_la-vmBackupSignals.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libvmbackup_la-nullProvider.lo: nullProvider.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmbackup_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvmbackup_la-nullProvider.lo -MD -MP -MF $(DEPDIR)/libvmbackup_la-nullProvider.Tpo -c -o libvmbackup_la-nullProvider.lo `test -f 'nullProvider.c' || echo '$(srcdir)/'`nullProvider.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvmbackup_la-nullProvider.Tpo $(DEPDIR)/libvmbackup_la-nullProvider.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nullProvider.c' object='libvmbackup_la-nullProvider.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmbackup_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvmbackup_la-nullProvider.lo `test -f 'nullProvider.c' || echo '$(srcdir)/'`nullProvider.c - -libvmbackup_la-scriptOps.lo: scriptOps.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmbackup_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvmbackup_la-scriptOps.lo -MD -MP -MF $(DEPDIR)/libvmbackup_la-scriptOps.Tpo -c -o libvmbackup_la-scriptOps.lo `test -f 'scriptOps.c' || echo '$(srcdir)/'`scriptOps.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvmbackup_la-scriptOps.Tpo $(DEPDIR)/libvmbackup_la-scriptOps.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scriptOps.c' object='libvmbackup_la-scriptOps.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmbackup_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvmbackup_la-scriptOps.lo `test -f 'scriptOps.c' || echo '$(srcdir)/'`scriptOps.c - -libvmbackup_la-stateMachine.lo: stateMachine.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmbackup_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvmbackup_la-stateMachine.lo -MD -MP -MF $(DEPDIR)/libvmbackup_la-stateMachine.Tpo -c -o libvmbackup_la-stateMachine.lo `test -f 'stateMachine.c' || echo '$(srcdir)/'`stateMachine.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvmbackup_la-stateMachine.Tpo $(DEPDIR)/libvmbackup_la-stateMachine.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='stateMachine.c' object='libvmbackup_la-stateMachine.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmbackup_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvmbackup_la-stateMachine.lo `test -f 'stateMachine.c' || echo '$(srcdir)/'`stateMachine.c - -libvmbackup_la-syncDriverOps.lo: syncDriverOps.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmbackup_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvmbackup_la-syncDriverOps.lo -MD -MP -MF $(DEPDIR)/libvmbackup_la-syncDriverOps.Tpo -c -o libvmbackup_la-syncDriverOps.lo `test -f 'syncDriverOps.c' || echo '$(srcdir)/'`syncDriverOps.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvmbackup_la-syncDriverOps.Tpo $(DEPDIR)/libvmbackup_la-syncDriverOps.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='syncDriverOps.c' object='libvmbackup_la-syncDriverOps.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmbackup_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvmbackup_la-syncDriverOps.lo `test -f 'syncDriverOps.c' || echo '$(srcdir)/'`syncDriverOps.c - -libvmbackup_la-vmBackupSignals.lo: vmBackupSignals.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmbackup_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvmbackup_la-vmBackupSignals.lo -MD -MP -MF $(DEPDIR)/libvmbackup_la-vmBackupSignals.Tpo -c -o libvmbackup_la-vmBackupSignals.lo `test -f 'vmBackupSignals.c' || echo '$(srcdir)/'`vmBackupSignals.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvmbackup_la-vmBackupSignals.Tpo $(DEPDIR)/libvmbackup_la-vmBackupSignals.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='vmBackupSignals.c' object='libvmbackup_la-vmBackupSignals.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmbackup_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvmbackup_la-vmBackupSignals.lo `test -f 'vmBackupSignals.c' || echo '$(srcdir)/'`vmBackupSignals.c - -libvmbackup_la-guestQuiesce_xdr.lo: guestQuiesce_xdr.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmbackup_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvmbackup_la-guestQuiesce_xdr.lo -MD -MP -MF $(DEPDIR)/libvmbackup_la-guestQuiesce_xdr.Tpo -c -o libvmbackup_la-guestQuiesce_xdr.lo `test -f 'guestQuiesce_xdr.c' || echo '$(srcdir)/'`guestQuiesce_xdr.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvmbackup_la-guestQuiesce_xdr.Tpo $(DEPDIR)/libvmbackup_la-guestQuiesce_xdr.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='guestQuiesce_xdr.c' object='libvmbackup_la-guestQuiesce_xdr.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmbackup_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvmbackup_la-guestQuiesce_xdr.lo `test -f 'guestQuiesce_xdr.c' || echo '$(srcdir)/'`guestQuiesce_xdr.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: - for dir in "$(DESTDIR)$(plugindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -clean: clean-am - -clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-pluginLTLIBRARIES - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-pluginLTLIBRARIES - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-pluginLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-pluginLTLIBRARIES \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-pluginLTLIBRARIES - - -guestQuiesce.h: guestQuiesce.x - @RPCGEN_WRAPPER@ services/plugins/vmbackup/guestQuiesce.x $@ - -guestQuiesce_xdr.c: guestQuiesce.x guestQuiesce.h - @RPCGEN_WRAPPER@ services/plugins/vmbackup/guestQuiesce.x $@ - -vmBackupSignals.c: $(top_srcdir)/services/plugins/vmbackup/vmBackupSignals.gm - glib-genmarshal --body $(top_srcdir)/services/plugins/vmbackup/vmBackupSignals.gm > \ - $@ || (rm -f $@ && exit 1) - -vmBackupSignals.h: $(top_srcdir)/services/plugins/vmbackup/vmBackupSignals.gm - glib-genmarshal --header $(top_srcdir)/services/plugins/vmbackup/vmBackupSignals.gm > \ - $@ || (rm -f $@ && exit 1) -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/services/plugins/vmbackup/guestQuiesce.x b/open-vm-tools/services/plugins/vmbackup/guestQuiesce.x index 7e8731f87..5e2d8f66e 100644 --- a/open-vm-tools/services/plugins/vmbackup/guestQuiesce.x +++ b/open-vm-tools/services/plugins/vmbackup/guestQuiesce.x @@ -24,12 +24,14 @@ */ enum GuestQuiesceParamsVersion { - GUESTQUIESCEPARAMS_V1 = 1 + GUESTQUIESCEPARAMS_V1 = 1, + GUESTQUIESCEPARAMS_V2 = 2 }; const GUESTQUIESCE_SCRIPTARG_MAX_LEN = 256; const GUESTQUIESCE_DISKUUID_MAX_LEN = 3200; /* (UUID_MAXLEN + 1) * 64 disks */ + /* Guest Quiescing parameters. */ struct GuestQuiesceParamsV1 { Bool createManifest; /* Create manifest describing the operations */ @@ -42,7 +44,19 @@ struct GuestQuiesceParamsV1 { string diskUuids; /* disk Uuids */ }; +/* Guest Quiescing parameters V2. */ +struct GuestQuiesceParamsV2 { + struct GuestQuiesceParamsV1 paramsV1; + uint32 vssBackupContext; + uint32 vssBackupType; + Bool vssBootableSystemState; + Bool vssPartialFileSupport; +}; + + union GuestQuiesceParams switch (GuestQuiesceParamsVersion ver) { case GUESTQUIESCEPARAMS_V1: struct GuestQuiesceParamsV1 *guestQuiesceParamsV1; +case GUESTQUIESCEPARAMS_V2: + struct GuestQuiesceParamsV2 *guestQuiesceParamsV2; }; diff --git a/open-vm-tools/services/plugins/vmbackup/stateMachine.c b/open-vm-tools/services/plugins/vmbackup/stateMachine.c index 071648ccb..0f03a2651 100644 --- a/open-vm-tools/services/plugins/vmbackup/stateMachine.c +++ b/open-vm-tools/services/plugins/vmbackup/stateMachine.c @@ -871,7 +871,7 @@ VmBackupStartCommon(RpcInData *data, &err); if (err != NULL) { g_clear_error(&err); - gBackupState->timeout = 15 * 60; + gBackupState->timeout = GUEST_QUIESCE_DEFAULT_TIMEOUT_IN_SEC; } } @@ -942,6 +942,7 @@ VmBackupStart(RpcInData *data) gBackupState->execScripts = TRUE; gBackupState->scriptArg = NULL; gBackupState->timeout = 0; + gBackupState->vssUseDefault = TRUE; /* get volume uuids if provided */ if (data->args[index] != '\0') { @@ -988,7 +989,8 @@ static gboolean VmBackupStartWithOpts(RpcInData *data) { GuestQuiesceParams *params; - GuestQuiesceParamsV1 *paramsV1; + GuestQuiesceParamsV1 *paramsV1 = NULL; + GuestQuiesceParamsV2 *paramsV2; gboolean retval; g_debug("*** %s\n", __FUNCTION__); @@ -997,23 +999,50 @@ VmBackupStartWithOpts(RpcInData *data) FALSE); } params = (GuestQuiesceParams *)data->args; + +#if defined(_WIN32) + if (params->ver != GUESTQUIESCEPARAMS_V1 && + params->ver != GUESTQUIESCEPARAMS_V2) { + g_warning("%s: Incompatible quiesce parameter version. \n", __FUNCTION__); + return RPCIN_SETRETVALS(data, "Incompatible quiesce parameter version", + FALSE); + } +#else if (params->ver != GUESTQUIESCEPARAMS_V1) { g_warning("%s: Incompatible quiesce parameter version. \n", __FUNCTION__); return RPCIN_SETRETVALS(data, "Incompatible quiesce parameter version", FALSE); } +#endif + gBackupState = g_new0(VmBackupState, 1); - paramsV1 = params->GuestQuiesceParams_u.guestQuiesceParamsV1; - gBackupState->generateManifests = paramsV1->createManifest; - gBackupState->quiesceApps = paramsV1->quiesceApps; - gBackupState->quiesceFS = paramsV1->quiesceFS; - gBackupState->allowHWProvider = paramsV1->writableSnapshot; - gBackupState->execScripts = paramsV1->execScripts; - gBackupState->scriptArg = g_strndup(paramsV1->scriptArg, - strlen(paramsV1->scriptArg)); - gBackupState->timeout = paramsV1->timeout; - gBackupState->volumes = g_strndup(paramsV1->diskUuids, - strlen(paramsV1->diskUuids)); + + if (params->ver == GUESTQUIESCEPARAMS_V1) { + paramsV1 = params->GuestQuiesceParams_u.guestQuiesceParamsV1; + gBackupState->vssUseDefault = TRUE; + } else if (params->ver == GUESTQUIESCEPARAMS_V2) { + paramsV2 = params->GuestQuiesceParams_u.guestQuiesceParamsV2; + paramsV1 = ¶msV2->paramsV1; + gBackupState->vssBackupContext = paramsV2->vssBackupContext; + gBackupState->vssBackupType = paramsV2->vssBackupType; + gBackupState->vssBootableSystemState = paramsV2->vssBootableSystemState; + gBackupState->vssPartialFileSupport = paramsV2->vssPartialFileSupport; + gBackupState->vssUseDefault = FALSE; + } + + if (paramsV1 != NULL) { + gBackupState->generateManifests = paramsV1->createManifest; + gBackupState->quiesceApps = paramsV1->quiesceApps; + gBackupState->quiesceFS = paramsV1->quiesceFS; + gBackupState->allowHWProvider = paramsV1->writableSnapshot; + gBackupState->execScripts = paramsV1->execScripts; + gBackupState->scriptArg = g_strndup(paramsV1->scriptArg, + strlen(paramsV1->scriptArg)); + gBackupState->timeout = paramsV1->timeout; + gBackupState->volumes = g_strndup(paramsV1->diskUuids, + strlen(paramsV1->diskUuids)); + } + retval = VmBackupStartCommon(data, TRUE); return retval; } diff --git a/open-vm-tools/services/plugins/vmbackup/vmBackupInt.h b/open-vm-tools/services/plugins/vmbackup/vmBackupInt.h index 04e866ca7..343d9d035 100644 --- a/open-vm-tools/services/plugins/vmbackup/vmBackupInt.h +++ b/open-vm-tools/services/plugins/vmbackup/vmBackupInt.h @@ -35,6 +35,11 @@ #include "vmware/tools/threadPool.h" #endif +/* + * The default timeout in seconds for guest OS quiescing process + */ +#define GUEST_QUIESCE_DEFAULT_TIMEOUT_IN_SEC (15 * 60) + typedef enum { VMBACKUP_STATUS_PENDING, VMBACKUP_STATUS_FINISHED, @@ -124,6 +129,11 @@ typedef struct VmBackupState { VmBackupMState machineState; VmBackupFreezeStatus freezeStatus; struct VmBackupSyncProvider *provider; + gint vssBackupContext; + gint vssBackupType; + Bool vssBootableSystemState; + Bool vssPartialFileSupport; + Bool vssUseDefault; } VmBackupState; typedef Bool (*VmBackupCallback)(VmBackupState *); diff --git a/open-vm-tools/services/vmtoolsd/Makefile.in b/open-vm-tools/services/vmtoolsd/Makefile.in deleted file mode 100644 index 1631b1cca..000000000 --- a/open-vm-tools/services/vmtoolsd/Makefile.in +++ /dev/null @@ -1,755 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -bin_PROGRAMS = vmtoolsd$(EXEEXT) -@HAVE_ICU_TRUE@am__append_1 = @ICU_LIBS@ -subdir = services/vmtoolsd -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pamdir)" -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) -PROGRAMS = $(bin_PROGRAMS) -am_vmtoolsd_OBJECTS = vmtoolsd-cmdLine.$(OBJEXT) \ - vmtoolsd-mainLoop.$(OBJEXT) vmtoolsd-mainPosix.$(OBJEXT) \ - vmtoolsd-pluginMgr.$(OBJEXT) vmtoolsd-serviceObj.$(OBJEXT) \ - vmtoolsd-threadPool.$(OBJEXT) vmtoolsd-toolsRpc.$(OBJEXT) \ - vmtoolsd-svcSignals.$(OBJEXT) -vmtoolsd_OBJECTS = $(am_vmtoolsd_OBJECTS) -am__DEPENDENCIES_1 = -vmtoolsd_DEPENDENCIES = $(am__DEPENDENCIES_1) -pamSCRIPT_INSTALL = $(INSTALL_SCRIPT) -SCRIPTS = $(pam_SCRIPTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(vmtoolsd_SOURCES) -DIST_SOURCES = $(vmtoolsd_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -pamdir = $(PAM_PREFIX)/pam.d -vmtoolsd_CPPFLAGS = @VMTOOLS_CPPFLAGS@ @GMODULE_CPPFLAGS@ \ - @GOBJECT_CPPFLAGS@ @GTHREAD_CPPFLAGS@ -I$(builddir) \ - -DVMTOOLSD_PLUGIN_ROOT=\"$(pkglibdir)/plugins\" -vmtoolsd_LDADD = @VMTOOLS_LIBS@ @GMODULE_LIBS@ @GOBJECT_LIBS@ \ - @GTHREAD_LIBS@ $(am__append_1) -vmtoolsd_SOURCES = cmdLine.c mainLoop.c mainPosix.c pluginMgr.c \ - serviceObj.c threadPool.c toolsRpc.c svcSignals.c -BUILT_SOURCES = svcSignals.c svcSignals.h -CLEANFILES = svcSignals.c svcSignals.h -EXTRA_DIST = svcSignals.gm -@HAVE_ICU_FALSE@vmtoolsd_LINK = $(LINK) -@HAVE_ICU_TRUE@vmtoolsd_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ -@HAVE_ICU_TRUE@ $(LIBTOOLFLAGS) --mode=link $(CXX) \ -@HAVE_ICU_TRUE@ $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ -@HAVE_ICU_TRUE@ $(LDFLAGS) -o $@ - - -# PAM support is currently only available for Linux, so HAVE_PAM is only -# defined for that OS. -@HAVE_PAM_TRUE@pam_SCRIPTS = $(top_srcdir)/scripts/linux/pam.d/vmtoolsd -all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu services/vmtoolsd/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu services/vmtoolsd/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ - else :; fi; \ - done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -vmtoolsd$(EXEEXT): $(vmtoolsd_OBJECTS) $(vmtoolsd_DEPENDENCIES) - @rm -f vmtoolsd$(EXEEXT) - $(vmtoolsd_LINK) $(vmtoolsd_OBJECTS) $(vmtoolsd_LDADD) $(LIBS) -install-pamSCRIPTS: $(pam_SCRIPTS) - @$(NORMAL_INSTALL) - test -z "$(pamdir)" || $(MKDIR_P) "$(DESTDIR)$(pamdir)" - @list='$(pam_SCRIPTS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - if test -f $$d$$p; then \ - f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " $(pamSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(pamdir)/$$f'"; \ - $(pamSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(pamdir)/$$f"; \ - else :; fi; \ - done - -uninstall-pamSCRIPTS: - @$(NORMAL_UNINSTALL) - @list='$(pam_SCRIPTS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " rm -f '$(DESTDIR)$(pamdir)/$$f'"; \ - rm -f "$(DESTDIR)$(pamdir)/$$f"; \ - done - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmtoolsd-cmdLine.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmtoolsd-mainLoop.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmtoolsd-mainPosix.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmtoolsd-pluginMgr.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmtoolsd-serviceObj.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmtoolsd-svcSignals.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmtoolsd-threadPool.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmtoolsd-toolsRpc.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -vmtoolsd-cmdLine.o: cmdLine.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmtoolsd-cmdLine.o -MD -MP -MF $(DEPDIR)/vmtoolsd-cmdLine.Tpo -c -o vmtoolsd-cmdLine.o `test -f 'cmdLine.c' || echo '$(srcdir)/'`cmdLine.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmtoolsd-cmdLine.Tpo $(DEPDIR)/vmtoolsd-cmdLine.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmdLine.c' object='vmtoolsd-cmdLine.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmtoolsd-cmdLine.o `test -f 'cmdLine.c' || echo '$(srcdir)/'`cmdLine.c - -vmtoolsd-cmdLine.obj: cmdLine.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmtoolsd-cmdLine.obj -MD -MP -MF $(DEPDIR)/vmtoolsd-cmdLine.Tpo -c -o vmtoolsd-cmdLine.obj `if test -f 'cmdLine.c'; then $(CYGPATH_W) 'cmdLine.c'; else $(CYGPATH_W) '$(srcdir)/cmdLine.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmtoolsd-cmdLine.Tpo $(DEPDIR)/vmtoolsd-cmdLine.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmdLine.c' object='vmtoolsd-cmdLine.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmtoolsd-cmdLine.obj `if test -f 'cmdLine.c'; then $(CYGPATH_W) 'cmdLine.c'; else $(CYGPATH_W) '$(srcdir)/cmdLine.c'; fi` - -vmtoolsd-mainLoop.o: mainLoop.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmtoolsd-mainLoop.o -MD -MP -MF $(DEPDIR)/vmtoolsd-mainLoop.Tpo -c -o vmtoolsd-mainLoop.o `test -f 'mainLoop.c' || echo '$(srcdir)/'`mainLoop.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmtoolsd-mainLoop.Tpo $(DEPDIR)/vmtoolsd-mainLoop.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mainLoop.c' object='vmtoolsd-mainLoop.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmtoolsd-mainLoop.o `test -f 'mainLoop.c' || echo '$(srcdir)/'`mainLoop.c - -vmtoolsd-mainLoop.obj: mainLoop.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmtoolsd-mainLoop.obj -MD -MP -MF $(DEPDIR)/vmtoolsd-mainLoop.Tpo -c -o vmtoolsd-mainLoop.obj `if test -f 'mainLoop.c'; then $(CYGPATH_W) 'mainLoop.c'; else $(CYGPATH_W) '$(srcdir)/mainLoop.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmtoolsd-mainLoop.Tpo $(DEPDIR)/vmtoolsd-mainLoop.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mainLoop.c' object='vmtoolsd-mainLoop.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmtoolsd-mainLoop.obj `if test -f 'mainLoop.c'; then $(CYGPATH_W) 'mainLoop.c'; else $(CYGPATH_W) '$(srcdir)/mainLoop.c'; fi` - -vmtoolsd-mainPosix.o: mainPosix.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmtoolsd-mainPosix.o -MD -MP -MF $(DEPDIR)/vmtoolsd-mainPosix.Tpo -c -o vmtoolsd-mainPosix.o `test -f 'mainPosix.c' || echo '$(srcdir)/'`mainPosix.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmtoolsd-mainPosix.Tpo $(DEPDIR)/vmtoolsd-mainPosix.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mainPosix.c' object='vmtoolsd-mainPosix.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmtoolsd-mainPosix.o `test -f 'mainPosix.c' || echo '$(srcdir)/'`mainPosix.c - -vmtoolsd-mainPosix.obj: mainPosix.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmtoolsd-mainPosix.obj -MD -MP -MF $(DEPDIR)/vmtoolsd-mainPosix.Tpo -c -o vmtoolsd-mainPosix.obj `if test -f 'mainPosix.c'; then $(CYGPATH_W) 'mainPosix.c'; else $(CYGPATH_W) '$(srcdir)/mainPosix.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmtoolsd-mainPosix.Tpo $(DEPDIR)/vmtoolsd-mainPosix.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mainPosix.c' object='vmtoolsd-mainPosix.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmtoolsd-mainPosix.obj `if test -f 'mainPosix.c'; then $(CYGPATH_W) 'mainPosix.c'; else $(CYGPATH_W) '$(srcdir)/mainPosix.c'; fi` - -vmtoolsd-pluginMgr.o: pluginMgr.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmtoolsd-pluginMgr.o -MD -MP -MF $(DEPDIR)/vmtoolsd-pluginMgr.Tpo -c -o vmtoolsd-pluginMgr.o `test -f 'pluginMgr.c' || echo '$(srcdir)/'`pluginMgr.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmtoolsd-pluginMgr.Tpo $(DEPDIR)/vmtoolsd-pluginMgr.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pluginMgr.c' object='vmtoolsd-pluginMgr.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmtoolsd-pluginMgr.o `test -f 'pluginMgr.c' || echo '$(srcdir)/'`pluginMgr.c - -vmtoolsd-pluginMgr.obj: pluginMgr.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmtoolsd-pluginMgr.obj -MD -MP -MF $(DEPDIR)/vmtoolsd-pluginMgr.Tpo -c -o vmtoolsd-pluginMgr.obj `if test -f 'pluginMgr.c'; then $(CYGPATH_W) 'pluginMgr.c'; else $(CYGPATH_W) '$(srcdir)/pluginMgr.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmtoolsd-pluginMgr.Tpo $(DEPDIR)/vmtoolsd-pluginMgr.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pluginMgr.c' object='vmtoolsd-pluginMgr.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmtoolsd-pluginMgr.obj `if test -f 'pluginMgr.c'; then $(CYGPATH_W) 'pluginMgr.c'; else $(CYGPATH_W) '$(srcdir)/pluginMgr.c'; fi` - -vmtoolsd-serviceObj.o: serviceObj.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmtoolsd-serviceObj.o -MD -MP -MF $(DEPDIR)/vmtoolsd-serviceObj.Tpo -c -o vmtoolsd-serviceObj.o `test -f 'serviceObj.c' || echo '$(srcdir)/'`serviceObj.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmtoolsd-serviceObj.Tpo $(DEPDIR)/vmtoolsd-serviceObj.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='serviceObj.c' object='vmtoolsd-serviceObj.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmtoolsd-serviceObj.o `test -f 'serviceObj.c' || echo '$(srcdir)/'`serviceObj.c - -vmtoolsd-serviceObj.obj: serviceObj.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmtoolsd-serviceObj.obj -MD -MP -MF $(DEPDIR)/vmtoolsd-serviceObj.Tpo -c -o vmtoolsd-serviceObj.obj `if test -f 'serviceObj.c'; then $(CYGPATH_W) 'serviceObj.c'; else $(CYGPATH_W) '$(srcdir)/serviceObj.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmtoolsd-serviceObj.Tpo $(DEPDIR)/vmtoolsd-serviceObj.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='serviceObj.c' object='vmtoolsd-serviceObj.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmtoolsd-serviceObj.obj `if test -f 'serviceObj.c'; then $(CYGPATH_W) 'serviceObj.c'; else $(CYGPATH_W) '$(srcdir)/serviceObj.c'; fi` - -vmtoolsd-threadPool.o: threadPool.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmtoolsd-threadPool.o -MD -MP -MF $(DEPDIR)/vmtoolsd-threadPool.Tpo -c -o vmtoolsd-threadPool.o `test -f 'threadPool.c' || echo '$(srcdir)/'`threadPool.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmtoolsd-threadPool.Tpo $(DEPDIR)/vmtoolsd-threadPool.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='threadPool.c' object='vmtoolsd-threadPool.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmtoolsd-threadPool.o `test -f 'threadPool.c' || echo '$(srcdir)/'`threadPool.c - -vmtoolsd-threadPool.obj: threadPool.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmtoolsd-threadPool.obj -MD -MP -MF $(DEPDIR)/vmtoolsd-threadPool.Tpo -c -o vmtoolsd-threadPool.obj `if test -f 'threadPool.c'; then $(CYGPATH_W) 'threadPool.c'; else $(CYGPATH_W) '$(srcdir)/threadPool.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmtoolsd-threadPool.Tpo $(DEPDIR)/vmtoolsd-threadPool.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='threadPool.c' object='vmtoolsd-threadPool.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmtoolsd-threadPool.obj `if test -f 'threadPool.c'; then $(CYGPATH_W) 'threadPool.c'; else $(CYGPATH_W) '$(srcdir)/threadPool.c'; fi` - -vmtoolsd-toolsRpc.o: toolsRpc.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmtoolsd-toolsRpc.o -MD -MP -MF $(DEPDIR)/vmtoolsd-toolsRpc.Tpo -c -o vmtoolsd-toolsRpc.o `test -f 'toolsRpc.c' || echo '$(srcdir)/'`toolsRpc.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmtoolsd-toolsRpc.Tpo $(DEPDIR)/vmtoolsd-toolsRpc.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='toolsRpc.c' object='vmtoolsd-toolsRpc.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmtoolsd-toolsRpc.o `test -f 'toolsRpc.c' || echo '$(srcdir)/'`toolsRpc.c - -vmtoolsd-toolsRpc.obj: toolsRpc.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmtoolsd-toolsRpc.obj -MD -MP -MF $(DEPDIR)/vmtoolsd-toolsRpc.Tpo -c -o vmtoolsd-toolsRpc.obj `if test -f 'toolsRpc.c'; then $(CYGPATH_W) 'toolsRpc.c'; else $(CYGPATH_W) '$(srcdir)/toolsRpc.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmtoolsd-toolsRpc.Tpo $(DEPDIR)/vmtoolsd-toolsRpc.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='toolsRpc.c' object='vmtoolsd-toolsRpc.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmtoolsd-toolsRpc.obj `if test -f 'toolsRpc.c'; then $(CYGPATH_W) 'toolsRpc.c'; else $(CYGPATH_W) '$(srcdir)/toolsRpc.c'; fi` - -vmtoolsd-svcSignals.o: svcSignals.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmtoolsd-svcSignals.o -MD -MP -MF $(DEPDIR)/vmtoolsd-svcSignals.Tpo -c -o vmtoolsd-svcSignals.o `test -f 'svcSignals.c' || echo '$(srcdir)/'`svcSignals.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmtoolsd-svcSignals.Tpo $(DEPDIR)/vmtoolsd-svcSignals.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='svcSignals.c' object='vmtoolsd-svcSignals.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmtoolsd-svcSignals.o `test -f 'svcSignals.c' || echo '$(srcdir)/'`svcSignals.c - -vmtoolsd-svcSignals.obj: svcSignals.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmtoolsd-svcSignals.obj -MD -MP -MF $(DEPDIR)/vmtoolsd-svcSignals.Tpo -c -o vmtoolsd-svcSignals.obj `if test -f 'svcSignals.c'; then $(CYGPATH_W) 'svcSignals.c'; else $(CYGPATH_W) '$(srcdir)/svcSignals.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmtoolsd-svcSignals.Tpo $(DEPDIR)/vmtoolsd-svcSignals.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='svcSignals.c' object='vmtoolsd-svcSignals.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmtoolsd-svcSignals.obj `if test -f 'svcSignals.c'; then $(CYGPATH_W) 'svcSignals.c'; else $(CYGPATH_W) '$(srcdir)/svcSignals.c'; fi` - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile $(PROGRAMS) $(SCRIPTS) -installdirs: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pamdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-pamSCRIPTS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook - -install-dvi: install-dvi-am - -install-exec-am: install-binPROGRAMS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS uninstall-pamSCRIPTS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook - -.MAKE: install-am install-data-am install-exec-am install-strip \ - uninstall-am - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am \ - install-data-hook install-dvi install-dvi-am install-exec \ - install-exec-am install-exec-hook install-html install-html-am \ - install-info install-info-am install-man install-pamSCRIPTS \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-binPROGRAMS uninstall-hook uninstall-pamSCRIPTS - - -svcSignals.c: $(top_srcdir)/services/vmtoolsd/svcSignals.gm - glib-genmarshal --body $(top_srcdir)/services/vmtoolsd/svcSignals.gm > \ - $@ || (rm -f $@ && exit 1) - -svcSignals.h: $(top_srcdir)/services/vmtoolsd/svcSignals.gm - glib-genmarshal --header $(top_srcdir)/services/vmtoolsd/svcSignals.gm > \ - $@ || (rm -f $@ && exit 1) - -# Message catalogs. -install-data-hook: - @INSTVMSG@ vmtoolsd $(srcdir)/l10n $(DESTDIR)$(datadir) - -install-exec-hook: - $(INSTALL) -d $(DESTDIR)/etc/vmware-tools - -uninstall-hook: - rm -rf $(DESTDIR)/etc/vmware-tools -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/services/vmtoolsd/pluginMgr.c b/open-vm-tools/services/vmtoolsd/pluginMgr.c index 700f23fe3..1db722ed3 100644 --- a/open-vm-tools/services/vmtoolsd/pluginMgr.c +++ b/open-vm-tools/services/vmtoolsd/pluginMgr.c @@ -557,6 +557,8 @@ ToolsCoreLoadDirectory(ToolsAppCtx *ctx, module = g_module_open(path, G_MODULE_BIND_LOCAL); #ifdef USE_APPLOADER if (module == NULL) { + g_info("Opening plugin '%s' with system libraries failed: %s\n", + entry, g_module_error()); /* Falling back to the shipped libraries */ if (!LoadDependencies(path, TRUE)) { g_warning("Loading of shipped library dependencies for %s failed.\n", diff --git a/open-vm-tools/tests/Makefile.in b/open-vm-tools/tests/Makefile.in deleted file mode 100644 index f102fd387..000000000 --- a/open-vm-tools/tests/Makefile.in +++ /dev/null @@ -1,585 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = tests -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUBDIRS = vmrpcdbg testDebug testPlugin testVmblock -all: all-recursive - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu tests/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-exec-am: install-exec-local - -install-html: install-html-recursive - -install-info: install-info-recursive - -install-man: - -install-pdf: install-pdf-recursive - -install-ps: install-ps-recursive - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ - install-strip - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - ctags ctags-recursive distclean distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-exec-local install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am tags tags-recursive uninstall uninstall-am - - -install-exec-local: - rm -f $(DESTDIR)$(TEST_PLUGIN_INSTALLDIR)/*.a - rm -f $(DESTDIR)$(TEST_PLUGIN_INSTALLDIR)/*.la -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/tests/testDebug/Makefile.in b/open-vm-tools/tests/testDebug/Makefile.in deleted file mode 100644 index 24670670f..000000000 --- a/open-vm-tools/tests/testDebug/Makefile.in +++ /dev/null @@ -1,602 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = tests/testDebug -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(plugindir)" -pluginLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(plugin_LTLIBRARIES) -libtestDebug_la_DEPENDENCIES = ../vmrpcdbg/libvmrpcdbg.la -am_libtestDebug_la_OBJECTS = libtestDebug_la-testDebug.lo \ - libtestDebug_la-testData_xdr.lo -libtestDebug_la_OBJECTS = $(am_libtestDebug_la_OBJECTS) -libtestDebug_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libtestDebug_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libtestDebug_la_SOURCES) -DIST_SOURCES = $(libtestDebug_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ - -# XXX: see explanation in lib/guestRpc/Makefile.am -CFLAGS = @CFLAGS@ -Wno-unused -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -plugindir = @TEST_PLUGIN_INSTALLDIR@ -plugin_LTLIBRARIES = libtestDebug.la -libtestDebug_la_CPPFLAGS = @CUNIT_CPPFLAGS@ @GOBJECT_CPPFLAGS@ \ - @PLUGIN_CPPFLAGS@ $(am__empty) -libtestDebug_la_LDFLAGS = @PLUGIN_LDFLAGS@ -libtestDebug_la_LIBADD = @CUNIT_LIBS@ @GOBJECT_LIBS@ @VMTOOLS_LIBS@ \ - ../vmrpcdbg/libvmrpcdbg.la -libtestDebug_la_SOURCES = testDebug.c testData_xdr.c -BUILT_SOURCES = testData_xdr.c testData.h -CLEANFILES = testData_xdr.c testData.h -all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/testDebug/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu tests/testDebug/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(plugindir)" || $(MKDIR_P) "$(DESTDIR)$(plugindir)" - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(plugindir)/$$f'"; \ - $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(plugindir)/$$f"; \ - else :; fi; \ - done - -uninstall-pluginLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$p"; \ - done - -clean-pluginLTLIBRARIES: - -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libtestDebug.la: $(libtestDebug_la_OBJECTS) $(libtestDebug_la_DEPENDENCIES) - $(libtestDebug_la_LINK) -rpath $(plugindir) $(libtestDebug_la_OBJECTS) $(libtestDebug_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtestDebug_la-testData_xdr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtestDebug_la-testDebug.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libtestDebug_la-testDebug.lo: testDebug.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtestDebug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtestDebug_la-testDebug.lo -MD -MP -MF $(DEPDIR)/libtestDebug_la-testDebug.Tpo -c -o libtestDebug_la-testDebug.lo `test -f 'testDebug.c' || echo '$(srcdir)/'`testDebug.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libtestDebug_la-testDebug.Tpo $(DEPDIR)/libtestDebug_la-testDebug.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDebug.c' object='libtestDebug_la-testDebug.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtestDebug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtestDebug_la-testDebug.lo `test -f 'testDebug.c' || echo '$(srcdir)/'`testDebug.c - -libtestDebug_la-testData_xdr.lo: testData_xdr.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtestDebug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtestDebug_la-testData_xdr.lo -MD -MP -MF $(DEPDIR)/libtestDebug_la-testData_xdr.Tpo -c -o libtestDebug_la-testData_xdr.lo `test -f 'testData_xdr.c' || echo '$(srcdir)/'`testData_xdr.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libtestDebug_la-testData_xdr.Tpo $(DEPDIR)/libtestDebug_la-testData_xdr.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testData_xdr.c' object='libtestDebug_la-testData_xdr.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtestDebug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtestDebug_la-testData_xdr.lo `test -f 'testData_xdr.c' || echo '$(srcdir)/'`testData_xdr.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: - for dir in "$(DESTDIR)$(plugindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -clean: clean-am - -clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-pluginLTLIBRARIES - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-pluginLTLIBRARIES - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-pluginLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-pluginLTLIBRARIES \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-pluginLTLIBRARIES - - -testData.h: $(top_srcdir)/tests/testPlugin/testData.x - @RPCGEN_WRAPPER@ tests/testPlugin/testData.x $@ - -testData_xdr.c: testData.h - @RPCGEN_WRAPPER@ tests/testPlugin/testData.x $@ -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/tests/testPlugin/Makefile.in b/open-vm-tools/tests/testPlugin/Makefile.in deleted file mode 100644 index fea090e51..000000000 --- a/open-vm-tools/tests/testPlugin/Makefile.in +++ /dev/null @@ -1,603 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = tests/testPlugin -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(plugindir)" -pluginLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(plugin_LTLIBRARIES) -libtestPlugin_la_DEPENDENCIES = -am_libtestPlugin_la_OBJECTS = libtestPlugin_la-testData_xdr.lo \ - libtestPlugin_la-testPlugin.lo -libtestPlugin_la_OBJECTS = $(am_libtestPlugin_la_OBJECTS) -libtestPlugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libtestPlugin_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libtestPlugin_la_SOURCES) -DIST_SOURCES = $(libtestPlugin_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ - -# XXX: see explanation in lib/guestRpc/Makefile.am -CFLAGS = @CFLAGS@ -Wno-unused -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -plugindir = @TEST_PLUGIN_INSTALLDIR@ -plugin_LTLIBRARIES = libtestPlugin.la -libtestPlugin_la_CPPFLAGS = @CUNIT_CPPFLAGS@ @GOBJECT_CPPFLAGS@ \ - @PLUGIN_CPPFLAGS@ $(am__empty) -libtestPlugin_la_LDFLAGS = @PLUGIN_LDFLAGS@ -libtestPlugin_la_LIBADD = @CUNIT_LIBS@ @GOBJECT_LIBS@ @VMTOOLS_LIBS@ \ - @XDR_LIBS@ $(am__empty) -libtestPlugin_la_SOURCES = testData_xdr.c testPlugin.c -BUILT_SOURCES = testData_xdr.c testData.h -CLEANFILES = testData_xdr.c testData.h -EXTRA_DIST = testData.x -all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/testPlugin/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu tests/testPlugin/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(plugindir)" || $(MKDIR_P) "$(DESTDIR)$(plugindir)" - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(plugindir)/$$f'"; \ - $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(plugindir)/$$f"; \ - else :; fi; \ - done - -uninstall-pluginLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$p"; \ - done - -clean-pluginLTLIBRARIES: - -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libtestPlugin.la: $(libtestPlugin_la_OBJECTS) $(libtestPlugin_la_DEPENDENCIES) - $(libtestPlugin_la_LINK) -rpath $(plugindir) $(libtestPlugin_la_OBJECTS) $(libtestPlugin_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtestPlugin_la-testData_xdr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtestPlugin_la-testPlugin.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libtestPlugin_la-testData_xdr.lo: testData_xdr.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtestPlugin_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtestPlugin_la-testData_xdr.lo -MD -MP -MF $(DEPDIR)/libtestPlugin_la-testData_xdr.Tpo -c -o libtestPlugin_la-testData_xdr.lo `test -f 'testData_xdr.c' || echo '$(srcdir)/'`testData_xdr.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libtestPlugin_la-testData_xdr.Tpo $(DEPDIR)/libtestPlugin_la-testData_xdr.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testData_xdr.c' object='libtestPlugin_la-testData_xdr.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtestPlugin_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtestPlugin_la-testData_xdr.lo `test -f 'testData_xdr.c' || echo '$(srcdir)/'`testData_xdr.c - -libtestPlugin_la-testPlugin.lo: testPlugin.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtestPlugin_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtestPlugin_la-testPlugin.lo -MD -MP -MF $(DEPDIR)/libtestPlugin_la-testPlugin.Tpo -c -o libtestPlugin_la-testPlugin.lo `test -f 'testPlugin.c' || echo '$(srcdir)/'`testPlugin.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libtestPlugin_la-testPlugin.Tpo $(DEPDIR)/libtestPlugin_la-testPlugin.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testPlugin.c' object='libtestPlugin_la-testPlugin.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtestPlugin_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtestPlugin_la-testPlugin.lo `test -f 'testPlugin.c' || echo '$(srcdir)/'`testPlugin.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: - for dir in "$(DESTDIR)$(plugindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -clean: clean-am - -clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-pluginLTLIBRARIES - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-pluginLTLIBRARIES - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-pluginLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-pluginLTLIBRARIES \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-pluginLTLIBRARIES - - -testData.h: testData.x - @RPCGEN_WRAPPER@ tests/testPlugin/testData.x $@ - -testData_xdr.c: testData.x testData.h - @RPCGEN_WRAPPER@ tests/testPlugin/testData.x $@ -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/tests/testVmblock/Makefile.in b/open-vm-tools/tests/testVmblock/Makefile.in deleted file mode 100644 index 0a717345c..000000000 --- a/open-vm-tools/tests/testVmblock/Makefile.in +++ /dev/null @@ -1,613 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -noinst_PROGRAMS = vmware-testvmblock-legacy$(EXEEXT) \ - vmware-testvmblock-manual-legacy$(EXEEXT) $(am__EXEEXT_1) -@HAVE_FUSE_TRUE@am__append_1 = vmware-testvmblock-fuse \ -@HAVE_FUSE_TRUE@ vmware-testvmblock-manual-fuse -subdir = tests/testVmblock -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -@HAVE_FUSE_TRUE@am__EXEEXT_1 = vmware-testvmblock-fuse$(EXEEXT) \ -@HAVE_FUSE_TRUE@ vmware-testvmblock-manual-fuse$(EXEEXT) -PROGRAMS = $(noinst_PROGRAMS) -am_vmware_testvmblock_fuse_OBJECTS = \ - vmware_testvmblock_fuse-vmblocktest.$(OBJEXT) -vmware_testvmblock_fuse_OBJECTS = \ - $(am_vmware_testvmblock_fuse_OBJECTS) -vmware_testvmblock_fuse_LDADD = $(LDADD) -vmware_testvmblock_fuse_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(vmware_testvmblock_fuse_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -am_vmware_testvmblock_legacy_OBJECTS = vmblocktest.$(OBJEXT) -vmware_testvmblock_legacy_OBJECTS = \ - $(am_vmware_testvmblock_legacy_OBJECTS) -vmware_testvmblock_legacy_LDADD = $(LDADD) -am_vmware_testvmblock_manual_fuse_OBJECTS = \ - vmware_testvmblock_manual_fuse-manual-blocker.$(OBJEXT) -vmware_testvmblock_manual_fuse_OBJECTS = \ - $(am_vmware_testvmblock_manual_fuse_OBJECTS) -vmware_testvmblock_manual_fuse_LDADD = $(LDADD) -vmware_testvmblock_manual_fuse_LINK = $(LIBTOOL) --tag=CC \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(vmware_testvmblock_manual_fuse_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -am_vmware_testvmblock_manual_legacy_OBJECTS = \ - manual-blocker.$(OBJEXT) -vmware_testvmblock_manual_legacy_OBJECTS = \ - $(am_vmware_testvmblock_manual_legacy_OBJECTS) -vmware_testvmblock_manual_legacy_LDADD = $(LDADD) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(vmware_testvmblock_fuse_SOURCES) \ - $(vmware_testvmblock_legacy_SOURCES) \ - $(vmware_testvmblock_manual_fuse_SOURCES) \ - $(vmware_testvmblock_manual_legacy_SOURCES) -DIST_SOURCES = $(vmware_testvmblock_fuse_SOURCES) \ - $(vmware_testvmblock_legacy_SOURCES) \ - $(vmware_testvmblock_manual_fuse_SOURCES) \ - $(vmware_testvmblock_manual_legacy_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -AM_CFLAGS = -DVMX86_DEVEL -DVMX86_DEBUG -AM_LDFLAGS = -lpthread -vmware_testvmblock_legacy_SOURCES = vmblocktest.c -vmware_testvmblock_manual_legacy_SOURCES = manual-blocker.c -vmware_testvmblock_fuse_CFLAGS = $(AM_CFLAGS) -Dvmblock_fuse -vmware_testvmblock_fuse_SOURCES = vmblocktest.c -vmware_testvmblock_manual_fuse_CFLAGS = $(AM_CFLAGS) -Dvmblock_fuse -vmware_testvmblock_manual_fuse_SOURCES = manual-blocker.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/testVmblock/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu tests/testVmblock/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstPROGRAMS: - @list='$(noinst_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -vmware-testvmblock-fuse$(EXEEXT): $(vmware_testvmblock_fuse_OBJECTS) $(vmware_testvmblock_fuse_DEPENDENCIES) - @rm -f vmware-testvmblock-fuse$(EXEEXT) - $(vmware_testvmblock_fuse_LINK) $(vmware_testvmblock_fuse_OBJECTS) $(vmware_testvmblock_fuse_LDADD) $(LIBS) -vmware-testvmblock-legacy$(EXEEXT): $(vmware_testvmblock_legacy_OBJECTS) $(vmware_testvmblock_legacy_DEPENDENCIES) - @rm -f vmware-testvmblock-legacy$(EXEEXT) - $(LINK) $(vmware_testvmblock_legacy_OBJECTS) $(vmware_testvmblock_legacy_LDADD) $(LIBS) -vmware-testvmblock-manual-fuse$(EXEEXT): $(vmware_testvmblock_manual_fuse_OBJECTS) $(vmware_testvmblock_manual_fuse_DEPENDENCIES) - @rm -f vmware-testvmblock-manual-fuse$(EXEEXT) - $(vmware_testvmblock_manual_fuse_LINK) $(vmware_testvmblock_manual_fuse_OBJECTS) $(vmware_testvmblock_manual_fuse_LDADD) $(LIBS) -vmware-testvmblock-manual-legacy$(EXEEXT): $(vmware_testvmblock_manual_legacy_OBJECTS) $(vmware_testvmblock_manual_legacy_DEPENDENCIES) - @rm -f vmware-testvmblock-manual-legacy$(EXEEXT) - $(LINK) $(vmware_testvmblock_manual_legacy_OBJECTS) $(vmware_testvmblock_manual_legacy_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/manual-blocker.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmblocktest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmware_testvmblock_fuse-vmblocktest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmware_testvmblock_manual_fuse-manual-blocker.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -vmware_testvmblock_fuse-vmblocktest.o: vmblocktest.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vmware_testvmblock_fuse_CFLAGS) $(CFLAGS) -MT vmware_testvmblock_fuse-vmblocktest.o -MD -MP -MF $(DEPDIR)/vmware_testvmblock_fuse-vmblocktest.Tpo -c -o vmware_testvmblock_fuse-vmblocktest.o `test -f 'vmblocktest.c' || echo '$(srcdir)/'`vmblocktest.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_testvmblock_fuse-vmblocktest.Tpo $(DEPDIR)/vmware_testvmblock_fuse-vmblocktest.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='vmblocktest.c' object='vmware_testvmblock_fuse-vmblocktest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vmware_testvmblock_fuse_CFLAGS) $(CFLAGS) -c -o vmware_testvmblock_fuse-vmblocktest.o `test -f 'vmblocktest.c' || echo '$(srcdir)/'`vmblocktest.c - -vmware_testvmblock_fuse-vmblocktest.obj: vmblocktest.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vmware_testvmblock_fuse_CFLAGS) $(CFLAGS) -MT vmware_testvmblock_fuse-vmblocktest.obj -MD -MP -MF $(DEPDIR)/vmware_testvmblock_fuse-vmblocktest.Tpo -c -o vmware_testvmblock_fuse-vmblocktest.obj `if test -f 'vmblocktest.c'; then $(CYGPATH_W) 'vmblocktest.c'; else $(CYGPATH_W) '$(srcdir)/vmblocktest.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_testvmblock_fuse-vmblocktest.Tpo $(DEPDIR)/vmware_testvmblock_fuse-vmblocktest.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='vmblocktest.c' object='vmware_testvmblock_fuse-vmblocktest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vmware_testvmblock_fuse_CFLAGS) $(CFLAGS) -c -o vmware_testvmblock_fuse-vmblocktest.obj `if test -f 'vmblocktest.c'; then $(CYGPATH_W) 'vmblocktest.c'; else $(CYGPATH_W) '$(srcdir)/vmblocktest.c'; fi` - -vmware_testvmblock_manual_fuse-manual-blocker.o: manual-blocker.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vmware_testvmblock_manual_fuse_CFLAGS) $(CFLAGS) -MT vmware_testvmblock_manual_fuse-manual-blocker.o -MD -MP -MF $(DEPDIR)/vmware_testvmblock_manual_fuse-manual-blocker.Tpo -c -o vmware_testvmblock_manual_fuse-manual-blocker.o `test -f 'manual-blocker.c' || echo '$(srcdir)/'`manual-blocker.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_testvmblock_manual_fuse-manual-blocker.Tpo $(DEPDIR)/vmware_testvmblock_manual_fuse-manual-blocker.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='manual-blocker.c' object='vmware_testvmblock_manual_fuse-manual-blocker.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vmware_testvmblock_manual_fuse_CFLAGS) $(CFLAGS) -c -o vmware_testvmblock_manual_fuse-manual-blocker.o `test -f 'manual-blocker.c' || echo '$(srcdir)/'`manual-blocker.c - -vmware_testvmblock_manual_fuse-manual-blocker.obj: manual-blocker.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vmware_testvmblock_manual_fuse_CFLAGS) $(CFLAGS) -MT vmware_testvmblock_manual_fuse-manual-blocker.obj -MD -MP -MF $(DEPDIR)/vmware_testvmblock_manual_fuse-manual-blocker.Tpo -c -o vmware_testvmblock_manual_fuse-manual-blocker.obj `if test -f 'manual-blocker.c'; then $(CYGPATH_W) 'manual-blocker.c'; else $(CYGPATH_W) '$(srcdir)/manual-blocker.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_testvmblock_manual_fuse-manual-blocker.Tpo $(DEPDIR)/vmware_testvmblock_manual_fuse-manual-blocker.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='manual-blocker.c' object='vmware_testvmblock_manual_fuse-manual-blocker.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vmware_testvmblock_manual_fuse_CFLAGS) $(CFLAGS) -c -o vmware_testvmblock_manual_fuse-manual-blocker.obj `if test -f 'manual-blocker.c'; then $(CYGPATH_W) 'manual-blocker.c'; else $(CYGPATH_W) '$(srcdir)/manual-blocker.c'; fi` - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstPROGRAMS ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/tests/vmrpcdbg/Makefile.am b/open-vm-tools/tests/vmrpcdbg/Makefile.am index cfdd1566c..745e32f58 100644 --- a/open-vm-tools/tests/vmrpcdbg/Makefile.am +++ b/open-vm-tools/tests/vmrpcdbg/Makefile.am @@ -21,7 +21,7 @@ libvmrpcdbg_la_CPPFLAGS = libvmrpcdbg_la_CPPFLAGS += @CUNIT_CPPFLAGS@ libvmrpcdbg_la_CPPFLAGS += @GMODULE_CPPFLAGS@ libvmrpcdbg_la_CPPFLAGS += @VMTOOLS_CPPFLAGS@ -libvmrpcdbg_la_CPPFLAGS += -I$(top_builddir)/lib/rpcChannel +libvmrpcdbg_la_CPPFLAGS += -I$(top_srcdir)/lib/rpcChannel libvmrpcdbg_la_LDFLAGS = libvmrpcdbg_la_LDFLAGS += @PLUGIN_LDFLAGS@ diff --git a/open-vm-tools/tests/vmrpcdbg/Makefile.in b/open-vm-tools/tests/vmrpcdbg/Makefile.in deleted file mode 100644 index 8a4c25c71..000000000 --- a/open-vm-tools/tests/vmrpcdbg/Makefile.in +++ /dev/null @@ -1,556 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = tests/vmrpcdbg -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libvmrpcdbg_la_DEPENDENCIES = -am_libvmrpcdbg_la_OBJECTS = libvmrpcdbg_la-debugChannel.lo \ - libvmrpcdbg_la-vmrpcdbg.lo -libvmrpcdbg_la_OBJECTS = $(am_libvmrpcdbg_la_OBJECTS) -libvmrpcdbg_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libvmrpcdbg_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libvmrpcdbg_la_SOURCES) -DIST_SOURCES = $(libvmrpcdbg_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libvmrpcdbg.la -libvmrpcdbg_la_CPPFLAGS = @CUNIT_CPPFLAGS@ @GMODULE_CPPFLAGS@ \ - @VMTOOLS_CPPFLAGS@ -I$(top_builddir)/lib/rpcChannel -libvmrpcdbg_la_LDFLAGS = @PLUGIN_LDFLAGS@ -libvmrpcdbg_la_LIBADD = @CUNIT_LIBS@ @GMODULE_LIBS@ @VMTOOLS_LIBS@ \ - @XDR_LIBS@ $(am__empty) -libvmrpcdbg_la_SOURCES = debugChannel.c vmrpcdbg.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/vmrpcdbg/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu tests/vmrpcdbg/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libvmrpcdbg.la: $(libvmrpcdbg_la_OBJECTS) $(libvmrpcdbg_la_DEPENDENCIES) - $(libvmrpcdbg_la_LINK) $(libvmrpcdbg_la_OBJECTS) $(libvmrpcdbg_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvmrpcdbg_la-debugChannel.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvmrpcdbg_la-vmrpcdbg.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libvmrpcdbg_la-debugChannel.lo: debugChannel.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmrpcdbg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvmrpcdbg_la-debugChannel.lo -MD -MP -MF $(DEPDIR)/libvmrpcdbg_la-debugChannel.Tpo -c -o libvmrpcdbg_la-debugChannel.lo `test -f 'debugChannel.c' || echo '$(srcdir)/'`debugChannel.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvmrpcdbg_la-debugChannel.Tpo $(DEPDIR)/libvmrpcdbg_la-debugChannel.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='debugChannel.c' object='libvmrpcdbg_la-debugChannel.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmrpcdbg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvmrpcdbg_la-debugChannel.lo `test -f 'debugChannel.c' || echo '$(srcdir)/'`debugChannel.c - -libvmrpcdbg_la-vmrpcdbg.lo: vmrpcdbg.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmrpcdbg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvmrpcdbg_la-vmrpcdbg.lo -MD -MP -MF $(DEPDIR)/libvmrpcdbg_la-vmrpcdbg.Tpo -c -o libvmrpcdbg_la-vmrpcdbg.lo `test -f 'vmrpcdbg.c' || echo '$(srcdir)/'`vmrpcdbg.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvmrpcdbg_la-vmrpcdbg.Tpo $(DEPDIR)/libvmrpcdbg_la-vmrpcdbg.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='vmrpcdbg.c' object='libvmrpcdbg_la-vmrpcdbg.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmrpcdbg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvmrpcdbg_la-vmrpcdbg.lo `test -f 'vmrpcdbg.c' || echo '$(srcdir)/'`vmrpcdbg.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/toolbox/Makefile.am b/open-vm-tools/toolbox/Makefile.am index 5733c573c..67c467672 100644 --- a/open-vm-tools/toolbox/Makefile.am +++ b/open-vm-tools/toolbox/Makefile.am @@ -27,6 +27,7 @@ vmware_toolbox_cmd_CPPFLAGS += @VMTOOLS_CPPFLAGS@ vmware_toolbox_cmd_SOURCES = vmware_toolbox_cmd_SOURCES += toolbox-cmd.c vmware_toolbox_cmd_SOURCES += toolboxcmd-devices.c +vmware_toolbox_cmd_SOURCES += toolboxcmd-info.c vmware_toolbox_cmd_SOURCES += toolboxcmd-logging.c vmware_toolbox_cmd_SOURCES += toolboxcmd-scripts.c vmware_toolbox_cmd_SOURCES += toolboxcmd-shrink.c diff --git a/open-vm-tools/toolbox/Makefile.in b/open-vm-tools/toolbox/Makefile.in deleted file mode 100644 index 069447786..000000000 --- a/open-vm-tools/toolbox/Makefile.in +++ /dev/null @@ -1,688 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -bin_PROGRAMS = vmware-toolbox-cmd$(EXEEXT) -@HAVE_ICU_TRUE@am__append_1 = @ICU_LIBS@ -subdir = toolbox -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) -PROGRAMS = $(bin_PROGRAMS) -am_vmware_toolbox_cmd_OBJECTS = \ - vmware_toolbox_cmd-toolbox-cmd.$(OBJEXT) \ - vmware_toolbox_cmd-toolboxcmd-devices.$(OBJEXT) \ - vmware_toolbox_cmd-toolboxcmd-logging.$(OBJEXT) \ - vmware_toolbox_cmd-toolboxcmd-scripts.$(OBJEXT) \ - vmware_toolbox_cmd-toolboxcmd-shrink.$(OBJEXT) \ - vmware_toolbox_cmd-toolboxcmd-stat.$(OBJEXT) \ - vmware_toolbox_cmd-toolboxcmd-time.$(OBJEXT) -vmware_toolbox_cmd_OBJECTS = $(am_vmware_toolbox_cmd_OBJECTS) -am__DEPENDENCIES_1 = -vmware_toolbox_cmd_DEPENDENCIES = ../libguestlib/libguestlib.la \ - $(am__DEPENDENCIES_1) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(vmware_toolbox_cmd_SOURCES) -DIST_SOURCES = $(vmware_toolbox_cmd_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -vmware_toolbox_cmd_LDADD = ../libguestlib/libguestlib.la \ - @VMTOOLS_LIBS@ $(am__append_1) -vmware_toolbox_cmd_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -vmware_toolbox_cmd_SOURCES = toolbox-cmd.c toolboxcmd-devices.c \ - toolboxcmd-logging.c toolboxcmd-scripts.c toolboxcmd-shrink.c \ - toolboxcmd-stat.c toolboxcmd-time.c -@HAVE_ICU_FALSE@vmware_toolbox_cmd_LINK = $(LINK) -@HAVE_ICU_TRUE@vmware_toolbox_cmd_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ -@HAVE_ICU_TRUE@ $(LIBTOOLFLAGS) --mode=link $(CXX) \ -@HAVE_ICU_TRUE@ $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ -@HAVE_ICU_TRUE@ $(LDFLAGS) -o $@ - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu toolbox/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu toolbox/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ - else :; fi; \ - done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -vmware-toolbox-cmd$(EXEEXT): $(vmware_toolbox_cmd_OBJECTS) $(vmware_toolbox_cmd_DEPENDENCIES) - @rm -f vmware-toolbox-cmd$(EXEEXT) - $(vmware_toolbox_cmd_LINK) $(vmware_toolbox_cmd_OBJECTS) $(vmware_toolbox_cmd_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmware_toolbox_cmd-toolbox-cmd.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-devices.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-logging.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-scripts.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-shrink.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-stat.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-time.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -vmware_toolbox_cmd-toolbox-cmd.o: toolbox-cmd.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_toolbox_cmd-toolbox-cmd.o -MD -MP -MF $(DEPDIR)/vmware_toolbox_cmd-toolbox-cmd.Tpo -c -o vmware_toolbox_cmd-toolbox-cmd.o `test -f 'toolbox-cmd.c' || echo '$(srcdir)/'`toolbox-cmd.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_toolbox_cmd-toolbox-cmd.Tpo $(DEPDIR)/vmware_toolbox_cmd-toolbox-cmd.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='toolbox-cmd.c' object='vmware_toolbox_cmd-toolbox-cmd.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_toolbox_cmd-toolbox-cmd.o `test -f 'toolbox-cmd.c' || echo '$(srcdir)/'`toolbox-cmd.c - -vmware_toolbox_cmd-toolbox-cmd.obj: toolbox-cmd.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_toolbox_cmd-toolbox-cmd.obj -MD -MP -MF $(DEPDIR)/vmware_toolbox_cmd-toolbox-cmd.Tpo -c -o vmware_toolbox_cmd-toolbox-cmd.obj `if test -f 'toolbox-cmd.c'; then $(CYGPATH_W) 'toolbox-cmd.c'; else $(CYGPATH_W) '$(srcdir)/toolbox-cmd.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_toolbox_cmd-toolbox-cmd.Tpo $(DEPDIR)/vmware_toolbox_cmd-toolbox-cmd.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='toolbox-cmd.c' object='vmware_toolbox_cmd-toolbox-cmd.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_toolbox_cmd-toolbox-cmd.obj `if test -f 'toolbox-cmd.c'; then $(CYGPATH_W) 'toolbox-cmd.c'; else $(CYGPATH_W) '$(srcdir)/toolbox-cmd.c'; fi` - -vmware_toolbox_cmd-toolboxcmd-devices.o: toolboxcmd-devices.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_toolbox_cmd-toolboxcmd-devices.o -MD -MP -MF $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-devices.Tpo -c -o vmware_toolbox_cmd-toolboxcmd-devices.o `test -f 'toolboxcmd-devices.c' || echo '$(srcdir)/'`toolboxcmd-devices.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-devices.Tpo $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-devices.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='toolboxcmd-devices.c' object='vmware_toolbox_cmd-toolboxcmd-devices.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_toolbox_cmd-toolboxcmd-devices.o `test -f 'toolboxcmd-devices.c' || echo '$(srcdir)/'`toolboxcmd-devices.c - -vmware_toolbox_cmd-toolboxcmd-devices.obj: toolboxcmd-devices.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_toolbox_cmd-toolboxcmd-devices.obj -MD -MP -MF $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-devices.Tpo -c -o vmware_toolbox_cmd-toolboxcmd-devices.obj `if test -f 'toolboxcmd-devices.c'; then $(CYGPATH_W) 'toolboxcmd-devices.c'; else $(CYGPATH_W) '$(srcdir)/toolboxcmd-devices.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-devices.Tpo $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-devices.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='toolboxcmd-devices.c' object='vmware_toolbox_cmd-toolboxcmd-devices.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_toolbox_cmd-toolboxcmd-devices.obj `if test -f 'toolboxcmd-devices.c'; then $(CYGPATH_W) 'toolboxcmd-devices.c'; else $(CYGPATH_W) '$(srcdir)/toolboxcmd-devices.c'; fi` - -vmware_toolbox_cmd-toolboxcmd-logging.o: toolboxcmd-logging.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_toolbox_cmd-toolboxcmd-logging.o -MD -MP -MF $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-logging.Tpo -c -o vmware_toolbox_cmd-toolboxcmd-logging.o `test -f 'toolboxcmd-logging.c' || echo '$(srcdir)/'`toolboxcmd-logging.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-logging.Tpo $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-logging.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='toolboxcmd-logging.c' object='vmware_toolbox_cmd-toolboxcmd-logging.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_toolbox_cmd-toolboxcmd-logging.o `test -f 'toolboxcmd-logging.c' || echo '$(srcdir)/'`toolboxcmd-logging.c - -vmware_toolbox_cmd-toolboxcmd-logging.obj: toolboxcmd-logging.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_toolbox_cmd-toolboxcmd-logging.obj -MD -MP -MF $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-logging.Tpo -c -o vmware_toolbox_cmd-toolboxcmd-logging.obj `if test -f 'toolboxcmd-logging.c'; then $(CYGPATH_W) 'toolboxcmd-logging.c'; else $(CYGPATH_W) '$(srcdir)/toolboxcmd-logging.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-logging.Tpo $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-logging.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='toolboxcmd-logging.c' object='vmware_toolbox_cmd-toolboxcmd-logging.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_toolbox_cmd-toolboxcmd-logging.obj `if test -f 'toolboxcmd-logging.c'; then $(CYGPATH_W) 'toolboxcmd-logging.c'; else $(CYGPATH_W) '$(srcdir)/toolboxcmd-logging.c'; fi` - -vmware_toolbox_cmd-toolboxcmd-scripts.o: toolboxcmd-scripts.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_toolbox_cmd-toolboxcmd-scripts.o -MD -MP -MF $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-scripts.Tpo -c -o vmware_toolbox_cmd-toolboxcmd-scripts.o `test -f 'toolboxcmd-scripts.c' || echo '$(srcdir)/'`toolboxcmd-scripts.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-scripts.Tpo $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-scripts.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='toolboxcmd-scripts.c' object='vmware_toolbox_cmd-toolboxcmd-scripts.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_toolbox_cmd-toolboxcmd-scripts.o `test -f 'toolboxcmd-scripts.c' || echo '$(srcdir)/'`toolboxcmd-scripts.c - -vmware_toolbox_cmd-toolboxcmd-scripts.obj: toolboxcmd-scripts.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_toolbox_cmd-toolboxcmd-scripts.obj -MD -MP -MF $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-scripts.Tpo -c -o vmware_toolbox_cmd-toolboxcmd-scripts.obj `if test -f 'toolboxcmd-scripts.c'; then $(CYGPATH_W) 'toolboxcmd-scripts.c'; else $(CYGPATH_W) '$(srcdir)/toolboxcmd-scripts.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-scripts.Tpo $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-scripts.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='toolboxcmd-scripts.c' object='vmware_toolbox_cmd-toolboxcmd-scripts.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_toolbox_cmd-toolboxcmd-scripts.obj `if test -f 'toolboxcmd-scripts.c'; then $(CYGPATH_W) 'toolboxcmd-scripts.c'; else $(CYGPATH_W) '$(srcdir)/toolboxcmd-scripts.c'; fi` - -vmware_toolbox_cmd-toolboxcmd-shrink.o: toolboxcmd-shrink.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_toolbox_cmd-toolboxcmd-shrink.o -MD -MP -MF $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-shrink.Tpo -c -o vmware_toolbox_cmd-toolboxcmd-shrink.o `test -f 'toolboxcmd-shrink.c' || echo '$(srcdir)/'`toolboxcmd-shrink.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-shrink.Tpo $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-shrink.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='toolboxcmd-shrink.c' object='vmware_toolbox_cmd-toolboxcmd-shrink.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_toolbox_cmd-toolboxcmd-shrink.o `test -f 'toolboxcmd-shrink.c' || echo '$(srcdir)/'`toolboxcmd-shrink.c - -vmware_toolbox_cmd-toolboxcmd-shrink.obj: toolboxcmd-shrink.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_toolbox_cmd-toolboxcmd-shrink.obj -MD -MP -MF $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-shrink.Tpo -c -o vmware_toolbox_cmd-toolboxcmd-shrink.obj `if test -f 'toolboxcmd-shrink.c'; then $(CYGPATH_W) 'toolboxcmd-shrink.c'; else $(CYGPATH_W) '$(srcdir)/toolboxcmd-shrink.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-shrink.Tpo $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-shrink.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='toolboxcmd-shrink.c' object='vmware_toolbox_cmd-toolboxcmd-shrink.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_toolbox_cmd-toolboxcmd-shrink.obj `if test -f 'toolboxcmd-shrink.c'; then $(CYGPATH_W) 'toolboxcmd-shrink.c'; else $(CYGPATH_W) '$(srcdir)/toolboxcmd-shrink.c'; fi` - -vmware_toolbox_cmd-toolboxcmd-stat.o: toolboxcmd-stat.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_toolbox_cmd-toolboxcmd-stat.o -MD -MP -MF $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-stat.Tpo -c -o vmware_toolbox_cmd-toolboxcmd-stat.o `test -f 'toolboxcmd-stat.c' || echo '$(srcdir)/'`toolboxcmd-stat.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-stat.Tpo $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-stat.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='toolboxcmd-stat.c' object='vmware_toolbox_cmd-toolboxcmd-stat.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_toolbox_cmd-toolboxcmd-stat.o `test -f 'toolboxcmd-stat.c' || echo '$(srcdir)/'`toolboxcmd-stat.c - -vmware_toolbox_cmd-toolboxcmd-stat.obj: toolboxcmd-stat.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_toolbox_cmd-toolboxcmd-stat.obj -MD -MP -MF $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-stat.Tpo -c -o vmware_toolbox_cmd-toolboxcmd-stat.obj `if test -f 'toolboxcmd-stat.c'; then $(CYGPATH_W) 'toolboxcmd-stat.c'; else $(CYGPATH_W) '$(srcdir)/toolboxcmd-stat.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-stat.Tpo $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-stat.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='toolboxcmd-stat.c' object='vmware_toolbox_cmd-toolboxcmd-stat.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_toolbox_cmd-toolboxcmd-stat.obj `if test -f 'toolboxcmd-stat.c'; then $(CYGPATH_W) 'toolboxcmd-stat.c'; else $(CYGPATH_W) '$(srcdir)/toolboxcmd-stat.c'; fi` - -vmware_toolbox_cmd-toolboxcmd-time.o: toolboxcmd-time.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_toolbox_cmd-toolboxcmd-time.o -MD -MP -MF $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-time.Tpo -c -o vmware_toolbox_cmd-toolboxcmd-time.o `test -f 'toolboxcmd-time.c' || echo '$(srcdir)/'`toolboxcmd-time.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-time.Tpo $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-time.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='toolboxcmd-time.c' object='vmware_toolbox_cmd-toolboxcmd-time.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_toolbox_cmd-toolboxcmd-time.o `test -f 'toolboxcmd-time.c' || echo '$(srcdir)/'`toolboxcmd-time.c - -vmware_toolbox_cmd-toolboxcmd-time.obj: toolboxcmd-time.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_toolbox_cmd-toolboxcmd-time.obj -MD -MP -MF $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-time.Tpo -c -o vmware_toolbox_cmd-toolboxcmd-time.obj `if test -f 'toolboxcmd-time.c'; then $(CYGPATH_W) 'toolboxcmd-time.c'; else $(CYGPATH_W) '$(srcdir)/toolboxcmd-time.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-time.Tpo $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-time.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='toolboxcmd-time.c' object='vmware_toolbox_cmd-toolboxcmd-time.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_toolbox_cmd-toolboxcmd-time.obj `if test -f 'toolboxcmd-time.c'; then $(CYGPATH_W) 'toolboxcmd-time.c'; else $(CYGPATH_W) '$(srcdir)/toolboxcmd-time.c'; fi` - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: - for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook - -install-dvi: install-dvi-am - -install-exec-am: install-binPROGRAMS - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS - -.MAKE: install-am install-data-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am \ - install-data-hook install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-binPROGRAMS - - -# Message catalogs. -install-data-hook: - @INSTVMSG@ toolboxcmd $(srcdir)/l10n $(DESTDIR)$(datadir) -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/toolbox/toolbox-cmd.c b/open-vm-tools/toolbox/toolbox-cmd.c index e8b50ed2f..25e161d75 100644 --- a/open-vm-tools/toolbox/toolbox-cmd.c +++ b/open-vm-tools/toolbox/toolbox-cmd.c @@ -100,13 +100,17 @@ ToolboxCmdHelp(const char *progName, static CmdTable commands[] = { { "timesync", TimeSync_Command, TRUE, FALSE, TimeSync_Help}, { "script", Script_Command, FALSE, TRUE, Script_Help}, +#if !defined(USERWORLD) { "disk", Disk_Command, TRUE, TRUE, Disk_Help}, +#endif { "stat", Stat_Command, TRUE, FALSE, Stat_Help}, { "device", Device_Command, TRUE, FALSE, Device_Help}, -#if (defined(_WIN32) || defined(linux)) && !defined(OPEN_VM_TOOLS) +#if defined(_WIN32) || \ + (defined(linux) && !defined(OPEN_VM_TOOLS) && !defined(USERWORLD)) { "upgrade", Upgrade_Command, TRUE, TRUE, Upgrade_Help}, #endif { "logging", Logging_Command, TRUE, TRUE, Logging_Help}, + { "info", Info_Command, TRUE, TRUE, Info_Help}, { "help", HelpCommand, FALSE, FALSE, ToolboxCmdHelp}, }; @@ -294,7 +298,8 @@ ToolboxCmdHelp(const char *progName, // IN "Most commands take a subcommand.\n\n" "Available commands:\n" " device\n" - " disk\n" + " disk (not available on all operating systems)\n" + " info\n" " logging\n" " script\n" " stat\n" diff --git a/open-vm-tools/toolbox/toolboxCmdInt.h b/open-vm-tools/toolbox/toolboxCmdInt.h index d52d9e004..7ab5cf061 100644 --- a/open-vm-tools/toolbox/toolboxCmdInt.h +++ b/open-vm-tools/toolbox/toolboxCmdInt.h @@ -128,8 +128,10 @@ DECLARE_COMMAND(Script); DECLARE_COMMAND(Stat); DECLARE_COMMAND(TimeSync); DECLARE_COMMAND(Logging); +DECLARE_COMMAND(Info); -#if defined(_WIN32) || (defined(linux) && !defined(OPEN_VM_TOOLS)) +#if defined(_WIN32) || \ + (defined(linux) && !defined(OPEN_VM_TOOLS) && !defined(USERWORLD)) DECLARE_COMMAND(Upgrade); #endif diff --git a/open-vm-tools/toolbox/toolboxcmd-info.c b/open-vm-tools/toolbox/toolboxcmd-info.c new file mode 100644 index 000000000..41ac28423 --- /dev/null +++ b/open-vm-tools/toolbox/toolboxcmd-info.c @@ -0,0 +1,237 @@ +/********************************************************* + * Copyright (C) 2015 VMware, Inc. All rights reserved. + * + * This program 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 version 2.1 and no 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 Lesser GNU General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + *********************************************************/ + +/* + * toolboxcmd-info.c -- + * + * Various guest info operations for toolbox-cmd. + */ + +#include + +#include "conf.h" +#include "nicInfo.h" +#include "dynxdr.h" +#include "xdrutil.h" +#include "toolboxCmdInt.h" +#include "vmware/tools/i18n.h" +#include "vmware/tools/utils.h" +#ifdef _WIN32 +#include "netutil.h" +#endif + +/* + *----------------------------------------------------------------------------- + * + * InfoSendNetworkXdr -- + * + * Send network info to the VMX. + * + * Results: + * Returns TRUE on success. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +static Bool +InfoSendNetworkXdr(GuestNicProto *message, + GuestInfoType type) +{ + Bool status = FALSE; + XDR xdrs; + gchar *request; + char *reply = NULL; + size_t replyLen; + + /* Add the RPC preamble: message name, and type. */ + request = g_strdup_printf("%s %d ", GUEST_INFO_COMMAND, type); + + if (DynXdr_Create(&xdrs) == NULL) { + goto exit; + } + + /* Write preamble and serialized nic info to XDR stream. */ + if (!DynXdr_AppendRaw(&xdrs, request, strlen(request)) || + !xdr_GuestNicProto(&xdrs, message)) { + g_warning("Error serializing nic info v%d data.", message->ver); + } else { + status = ToolsCmd_SendRPC(DynXdr_Get(&xdrs), xdr_getpos(&xdrs), + &reply, &replyLen); + if (!status) { + g_warning("%s: update failed: request \"%s\", reply \"%s\".\n", + __FUNCTION__, request, reply); + } + vm_free(reply); + } + DynXdr_Destroy(&xdrs, TRUE); + +exit: + g_free(request); + return status; +} + + +/* + *----------------------------------------------------------------------------- + * + * InfoUpdateNetwork -- + * + * Update network info. + * + * Results: + * Returns EXIT_SUCCESS on success. + * Returns the appropriate exit codes on errors. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +int +InfoUpdateNetwork(void) +{ + int ret = EXIT_SUCCESS; + NicInfoV3 *info = NULL; + GuestNicProto msg = { 0 }; + GuestInfoType type = INFO_IPADDRESS_V3; + +#ifdef _WIN32 + DWORD dwRet = NetUtil_LoadIpHlpApiDll(); + if (dwRet != ERROR_SUCCESS) { + g_warning("NetUtil_LoadIpHlpApiDll() failed\n"); + return EXIT_FAILURE; + } +#endif + + if (!GuestInfo_GetNicInfo(&info)) { + g_warning("Failed to get nic info\n"); + ret = EXIT_FAILURE; + goto done; + } + + // Only useful for VMXs that support V3 + msg.ver = NIC_INFO_V3; + msg.GuestNicProto_u.nicInfoV3 = info; + if (!InfoSendNetworkXdr(&msg, type)) { + ret = EXIT_FAILURE; + } + + GuestInfo_FreeNicInfo(info); + +done: +#ifdef _WIN32 + NetUtil_FreeIpHlpApiDll(); +#endif + + return ret; +} + + +/* + *----------------------------------------------------------------------------- + * + * Info_Command -- + * + * Handle and parse info commands. + * + * Results: + * Returns EXIT_SUCCESS on success. + * Returns the appropriate exit codes on errors. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +int +Info_Command(char **argv, // IN: Command line arguments + int argc, // IN: Length of command line arguments + gboolean quiet) // IN +{ + char *subcommand; + char *class; + + // subcommand: 'update' + if ((optind) >= argc) { + ToolsCmd_MissingEntityError(argv[0], + SU_(arg.info.subcommand, "info operation")); + return EX_USAGE; + } + subcommand = argv[optind]; + + // info class: 'network' + if ((optind + 1) >= argc) { + ToolsCmd_MissingEntityError(argv[0], + SU_(arg.info.class, "info infoclass")); + return EX_USAGE; + } + + class = argv[optind + 1]; + + if (toolbox_strcmp(subcommand, "update") == 0) { + if (toolbox_strcmp(class, "network") == 0) { + return InfoUpdateNetwork(); + } else { + ToolsCmd_UnknownEntityError(argv[0], + SU_(arg.info.class, "info infoclass"), + class); + return EX_USAGE; + } + } else { + ToolsCmd_UnknownEntityError(argv[0], + SU_(arg.subcommand, "subcommand"), + subcommand); + return EX_USAGE; + } +} + + +/* + *----------------------------------------------------------------------------- + * + * Info_Help -- + * + * Prints the help for the info command. + * + * Results: + * None. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +void +Info_Help(const char *progName, // IN: The name of the program obtained from argv[0] + const char *cmd) // IN +{ + g_print(SU_(help.info, + "%s: update guest information on the host\n" + "Usage: %s %s update \n\n" + "Subcommands:\n" + " update : update information identified by \n" + " can be 'network'\n"), + cmd, progName, cmd); +} + diff --git a/open-vm-tools/toolbox/toolboxcmd-stat.c b/open-vm-tools/toolbox/toolboxcmd-stat.c index fe71d2ca2..0be5461ee 100644 --- a/open-vm-tools/toolbox/toolboxcmd-stat.c +++ b/open-vm-tools/toolbox/toolboxcmd-stat.c @@ -609,7 +609,13 @@ Stat_Help(const char *progName, // IN: The name of the program obtained from arg " memlimit: print memory limit information\n" " memres: print memory reservation information\n" " cpures: print CPU reservation information\n" - " cpulimit: print CPU limit information\n"), + " cpulimit: print CPU limit information\n" + " raw [ ]: print raw stat information\n" + " can be one of 'text', 'json', 'xml', 'yaml'.\n" + " includes session, host, resources, vscsi and\n" + " vnet (Some stats like vscsi are two words, e.g. 'vscsi scsi0:0').\n" + " Prints the available stats if and \n" + " arguments are not specified.\n"), cmd, progName, cmd); } diff --git a/open-vm-tools/vgauth/Makefile.in b/open-vm-tools/vgauth/Makefile.in deleted file mode 100644 index d0d39f0eb..000000000 --- a/open-vm-tools/vgauth/Makefile.in +++ /dev/null @@ -1,581 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2014-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = vgauth -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUBDIRS = lib cli service -all: all-recursive - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu vgauth/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu vgauth/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-exec-am: - -install-html: install-html-recursive - -install-info: install-info-recursive - -install-man: - -install-pdf: install-pdf-recursive - -install-ps: install-ps-recursive - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ - install-strip - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - ctags ctags-recursive distclean distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/vgauth/cli/Makefile.in b/open-vm-tools/vgauth/cli/Makefile.in deleted file mode 100644 index 97e6883db..000000000 --- a/open-vm-tools/vgauth/cli/Makefile.in +++ /dev/null @@ -1,591 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2014-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -bin_PROGRAMS = vmware-vgauth-cmd$(EXEEXT) -@HAVE_ICU_TRUE@am__append_1 = @ICU_LIBS@ -subdir = vgauth/cli -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) -PROGRAMS = $(bin_PROGRAMS) -am_vmware_vgauth_cmd_OBJECTS = vmware_vgauth_cmd-main.$(OBJEXT) -vmware_vgauth_cmd_OBJECTS = $(am_vmware_vgauth_cmd_OBJECTS) -am__DEPENDENCIES_1 = -vmware_vgauth_cmd_DEPENDENCIES = ../lib/libvgauth.la \ - $(am__DEPENDENCIES_1) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(vmware_vgauth_cmd_SOURCES) -DIST_SOURCES = $(vmware_vgauth_cmd_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -vmware_vgauth_cmd_SOURCES = main.c -vmware_vgauth_cmd_CPPFLAGS = -DVMTOOLS_USE_GLIB @GLIB2_CPPFLAGS@ \ - -I$(top_srcdir)/libvmtools -I$(top_srcdir)/vgauth/public \ - -I$(top_srcdir)/vgauth/common -vmware_vgauth_cmd_LDADD = @VMTOOLS_LIBS@ @GLIB2_LIBS@ @GTHREAD_LIBS@ \ - @SSL_LIBS@ ../lib/libvgauth.la -lssl -lcrypto $(am__append_1) -@HAVE_ICU_FALSE@vmware_vgauth_cmd_LINK = $(LINK) -@HAVE_ICU_TRUE@vmware_vgauth_cmd_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ -@HAVE_ICU_TRUE@ $(LIBTOOLFLAGS) --mode=link $(CXX) \ -@HAVE_ICU_TRUE@ $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ -@HAVE_ICU_TRUE@ $(LDFLAGS) -o $@ - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu vgauth/cli/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu vgauth/cli/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ - else :; fi; \ - done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -vmware-vgauth-cmd$(EXEEXT): $(vmware_vgauth_cmd_OBJECTS) $(vmware_vgauth_cmd_DEPENDENCIES) - @rm -f vmware-vgauth-cmd$(EXEEXT) - $(vmware_vgauth_cmd_LINK) $(vmware_vgauth_cmd_OBJECTS) $(vmware_vgauth_cmd_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmware_vgauth_cmd-main.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -vmware_vgauth_cmd-main.o: main.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_vgauth_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_vgauth_cmd-main.o -MD -MP -MF $(DEPDIR)/vmware_vgauth_cmd-main.Tpo -c -o vmware_vgauth_cmd-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_vgauth_cmd-main.Tpo $(DEPDIR)/vmware_vgauth_cmd-main.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='vmware_vgauth_cmd-main.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_vgauth_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_vgauth_cmd-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c - -vmware_vgauth_cmd-main.obj: main.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_vgauth_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_vgauth_cmd-main.obj -MD -MP -MF $(DEPDIR)/vmware_vgauth_cmd-main.Tpo -c -o vmware_vgauth_cmd-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_vgauth_cmd-main.Tpo $(DEPDIR)/vmware_vgauth_cmd-main.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='vmware_vgauth_cmd-main.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_vgauth_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_vgauth_cmd-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: - for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook - -install-dvi: install-dvi-am - -install-exec-am: install-binPROGRAMS - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS - -.MAKE: install-am install-data-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am \ - install-data-hook install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-binPROGRAMS - - -# Message catalogs. -install-data-hook: - @INSTVMSG@ vmware-vgauth-cmd $(srcdir)/l10n $(DESTDIR)$(datadir) -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/vgauth/cli/main.c b/open-vm-tools/vgauth/cli/main.c index 1efa658ad..46df9ff96 100644 --- a/open-vm-tools/vgauth/cli/main.c +++ b/open-vm-tools/vgauth/cli/main.c @@ -415,7 +415,11 @@ mainRun(int argc, const gchar *lSubject = SU_(cmdline.summary.subject, "subject"); const gchar *lPEMfile = SU_(cmdline.summary.pemfile, "PEM-file"); const gchar *lComm = SU_(cmdline.summary.comm, "comment"); +#ifdef _WIN32 + int i; +#else GError *gErr = NULL; +#endif PrefHandle prefs; gchar *msgCatalog = NULL; GOptionEntry listOptions[] = { @@ -522,33 +526,63 @@ mainRun(int argc, Usage(context); } +#ifdef _WIN32 /* - * Pull out the options. + * In Windows, g_option_context_parse() does the wrong thing for locale + * conversion of the incoming Unicode cmdline. Modern glib (2.40 or + * later) solves this with g_option_context_parse_stv(), but we're stuck + * with an older glib for now. + * + * So instead lets do it all by hand. + * + * XXX fix this when we upgrade glib. */ -#ifdef _WIN32 - { - char * val = getenv("CHARSET"); - char *saved = g_strdup_printf("CHARSET=%s", val ? val : ""); - - /* - * Force the glib parser to interpret the input as the UTF-8 - * Otherwise, glib treat the input encoding as the current code page, - * e.g. 1252 - */ - _putenv("CHARSET=UTF-8"); -#endif - - if (!g_option_context_parse(context, &argcCopy, &argvCopy, &gErr)) { - g_printerr("%s: %s: %s\n", appName, - SU_(cmdline.parse, "Command line parsing failed"), - gErr->message); - g_error_free(gErr); - exit(-1); + for (i = 2; i < argc; i++) { + if (strcmp(argv[i], "--global") == 0 || + strcmp(argv[i], "-g") == 0) { + addMapped = TRUE; + } else if (strcmp(argv[i], "--verbose") == 0 || + strcmp(argv[i], "-v") == 0) { + verbose = TRUE; + } else if (strcmp(argv[i], "--username") == 0 || + strcmp(argv[i], "-u") == 0) { + if ((i + 1) < argc) { + userName = argv[++i]; + } else { + Usage(context); + } + } else if (strcmp(argv[i], "--file") == 0 || + strcmp(argv[i], "-f") == 0) { + if ((i + 1) < argc) { + pemFilename = argv[++i]; + } else { + Usage(context); + } + } else if (strcmp(argv[i], "--comment") == 0 || + strcmp(argv[i], "-c") == 0) { + if ((i + 1) < argc) { + comment = argv[++i]; + } else { + Usage(context); + } + } else if (strcmp(argv[i], "--subject") == 0 || + strcmp(argv[i], "-s") == 0) { + if ((i + 1) < argc) { + subject = argv[++i]; + } else { + Usage(context); + } + } else { + Usage(context); } - -#ifdef _WIN32 - _putenv("CHARSET="); - g_free(saved); + } +#else + if (!g_option_context_parse(context, &argcCopy, &argvCopy, &gErr)) { + g_printerr("%s: %s: %s\n", appName, + SU_(cmdline.parse, "Command line parsing failed"), + gErr->message); + g_error_free(gErr); + exit(-1); } #endif diff --git a/open-vm-tools/vgauth/common/certverify.c b/open-vm-tools/vgauth/common/certverify.c index b4507de24..1afb84ea5 100644 --- a/open-vm-tools/vgauth/common/certverify.c +++ b/open-vm-tools/vgauth/common/certverify.c @@ -156,6 +156,8 @@ VerifyCallback(int ok, switch (certErr) { // self-signed is ok case X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT: + case X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN: + g_debug("%s: allowing error %d\n", __FUNCTION__, certErr); ret = 1; break; default: diff --git a/open-vm-tools/vgauth/lib/Makefile.in b/open-vm-tools/vgauth/lib/Makefile.in deleted file mode 100644 index 94afbb92b..000000000 --- a/open-vm-tools/vgauth/lib/Makefile.in +++ /dev/null @@ -1,727 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2014-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = vgauth/lib -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(libdir)" -libLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(lib_LTLIBRARIES) -libvgauth_la_DEPENDENCIES = -am_libvgauth_la_OBJECTS = libvgauth_la-alias.lo libvgauth_la-auth.lo \ - libvgauth_la-authPosix.lo libvgauth_la-comm.lo \ - libvgauth_la-common.lo libvgauth_la-errortext.lo \ - libvgauth_la-impersonate.lo libvgauth_la-impersonateLinux.lo \ - libvgauth_la-netPosix.lo libvgauth_la-proto.lo \ - libvgauth_la-audit.lo libvgauth_la-certverify.lo \ - libvgauth_la-i18n.lo libvgauth_la-prefs.lo \ - libvgauth_la-usercheck.lo libvgauth_la-VGAuthLog.lo \ - libvgauth_la-VGAuthUtil.lo -libvgauth_la_OBJECTS = $(am_libvgauth_la_OBJECTS) -libvgauth_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libvgauth_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libvgauth_la_SOURCES) -DIST_SOURCES = $(libvgauth_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -lib_LTLIBRARIES = libvgauth.la -libvgauth_la_LIBADD = @VGAUTH_LIBADD@ @GLIB2_LIBS@ @GTHREAD_LIBS@ \ - @VMTOOLS_LIBS@ @SSL_LIBS@ -lssl -lcrypto -libvgauth_la_SOURCES = alias.c auth.c authPosix.c comm.c common.c \ - errortext.c impersonate.c impersonateLinux.c netPosix.c \ - proto.c ../common/audit.c ../common/certverify.c \ - ../common/i18n.c ../common/prefs.c ../common/usercheck.c \ - ../common/VGAuthLog.c ../common/VGAuthUtil.c -libvgauth_la_CPPFLAGS = @GLIB2_CPPFLAGS@ -DG_LOG_DOMAIN=\"VCGA\" \ - @PAM_CPPFLAGS@ @SSL_CPPFLAGS@ -I$(top_srcdir)/libvmtools \ - -I$(top_srcdir)/vgauth/public -I$(top_srcdir)/vgauth/common -# We require GCC, so we're fine passing compiler-specific flags. -# Needed for OS's that don't link shared libraries against libc by -#default, e.g. FreeBSD -libvgauth_la_LDFLAGS = -Wl,-z,defs -Wl,-lc -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu vgauth/lib/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu vgauth/lib/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ - else :; fi; \ - done - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libvgauth.la: $(libvgauth_la_OBJECTS) $(libvgauth_la_DEPENDENCIES) - $(libvgauth_la_LINK) -rpath $(libdir) $(libvgauth_la_OBJECTS) $(libvgauth_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvgauth_la-VGAuthLog.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvgauth_la-VGAuthUtil.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvgauth_la-alias.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvgauth_la-audit.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvgauth_la-auth.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvgauth_la-authPosix.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvgauth_la-certverify.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvgauth_la-comm.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvgauth_la-common.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvgauth_la-errortext.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvgauth_la-i18n.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvgauth_la-impersonate.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvgauth_la-impersonateLinux.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvgauth_la-netPosix.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvgauth_la-prefs.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvgauth_la-proto.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvgauth_la-usercheck.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libvgauth_la-alias.lo: alias.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvgauth_la-alias.lo -MD -MP -MF $(DEPDIR)/libvgauth_la-alias.Tpo -c -o libvgauth_la-alias.lo `test -f 'alias.c' || echo '$(srcdir)/'`alias.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvgauth_la-alias.Tpo $(DEPDIR)/libvgauth_la-alias.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='alias.c' object='libvgauth_la-alias.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvgauth_la-alias.lo `test -f 'alias.c' || echo '$(srcdir)/'`alias.c - -libvgauth_la-auth.lo: auth.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvgauth_la-auth.lo -MD -MP -MF $(DEPDIR)/libvgauth_la-auth.Tpo -c -o libvgauth_la-auth.lo `test -f 'auth.c' || echo '$(srcdir)/'`auth.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvgauth_la-auth.Tpo $(DEPDIR)/libvgauth_la-auth.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='auth.c' object='libvgauth_la-auth.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvgauth_la-auth.lo `test -f 'auth.c' || echo '$(srcdir)/'`auth.c - -libvgauth_la-authPosix.lo: authPosix.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvgauth_la-authPosix.lo -MD -MP -MF $(DEPDIR)/libvgauth_la-authPosix.Tpo -c -o libvgauth_la-authPosix.lo `test -f 'authPosix.c' || echo '$(srcdir)/'`authPosix.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvgauth_la-authPosix.Tpo $(DEPDIR)/libvgauth_la-authPosix.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='authPosix.c' object='libvgauth_la-authPosix.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvgauth_la-authPosix.lo `test -f 'authPosix.c' || echo '$(srcdir)/'`authPosix.c - -libvgauth_la-comm.lo: comm.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvgauth_la-comm.lo -MD -MP -MF $(DEPDIR)/libvgauth_la-comm.Tpo -c -o libvgauth_la-comm.lo `test -f 'comm.c' || echo '$(srcdir)/'`comm.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvgauth_la-comm.Tpo $(DEPDIR)/libvgauth_la-comm.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='comm.c' object='libvgauth_la-comm.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvgauth_la-comm.lo `test -f 'comm.c' || echo '$(srcdir)/'`comm.c - -libvgauth_la-common.lo: common.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvgauth_la-common.lo -MD -MP -MF $(DEPDIR)/libvgauth_la-common.Tpo -c -o libvgauth_la-common.lo `test -f 'common.c' || echo '$(srcdir)/'`common.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvgauth_la-common.Tpo $(DEPDIR)/libvgauth_la-common.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='common.c' object='libvgauth_la-common.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvgauth_la-common.lo `test -f 'common.c' || echo '$(srcdir)/'`common.c - -libvgauth_la-errortext.lo: errortext.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvgauth_la-errortext.lo -MD -MP -MF $(DEPDIR)/libvgauth_la-errortext.Tpo -c -o libvgauth_la-errortext.lo `test -f 'errortext.c' || echo '$(srcdir)/'`errortext.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvgauth_la-errortext.Tpo $(DEPDIR)/libvgauth_la-errortext.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='errortext.c' object='libvgauth_la-errortext.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvgauth_la-errortext.lo `test -f 'errortext.c' || echo '$(srcdir)/'`errortext.c - -libvgauth_la-impersonate.lo: impersonate.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvgauth_la-impersonate.lo -MD -MP -MF $(DEPDIR)/libvgauth_la-impersonate.Tpo -c -o libvgauth_la-impersonate.lo `test -f 'impersonate.c' || echo '$(srcdir)/'`impersonate.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvgauth_la-impersonate.Tpo $(DEPDIR)/libvgauth_la-impersonate.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='impersonate.c' object='libvgauth_la-impersonate.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvgauth_la-impersonate.lo `test -f 'impersonate.c' || echo '$(srcdir)/'`impersonate.c - -libvgauth_la-impersonateLinux.lo: impersonateLinux.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvgauth_la-impersonateLinux.lo -MD -MP -MF $(DEPDIR)/libvgauth_la-impersonateLinux.Tpo -c -o libvgauth_la-impersonateLinux.lo `test -f 'impersonateLinux.c' || echo '$(srcdir)/'`impersonateLinux.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvgauth_la-impersonateLinux.Tpo $(DEPDIR)/libvgauth_la-impersonateLinux.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='impersonateLinux.c' object='libvgauth_la-impersonateLinux.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvgauth_la-impersonateLinux.lo `test -f 'impersonateLinux.c' || echo '$(srcdir)/'`impersonateLinux.c - -libvgauth_la-netPosix.lo: netPosix.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvgauth_la-netPosix.lo -MD -MP -MF $(DEPDIR)/libvgauth_la-netPosix.Tpo -c -o libvgauth_la-netPosix.lo `test -f 'netPosix.c' || echo '$(srcdir)/'`netPosix.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvgauth_la-netPosix.Tpo $(DEPDIR)/libvgauth_la-netPosix.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='netPosix.c' object='libvgauth_la-netPosix.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvgauth_la-netPosix.lo `test -f 'netPosix.c' || echo '$(srcdir)/'`netPosix.c - -libvgauth_la-proto.lo: proto.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvgauth_la-proto.lo -MD -MP -MF $(DEPDIR)/libvgauth_la-proto.Tpo -c -o libvgauth_la-proto.lo `test -f 'proto.c' || echo '$(srcdir)/'`proto.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvgauth_la-proto.Tpo $(DEPDIR)/libvgauth_la-proto.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='proto.c' object='libvgauth_la-proto.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvgauth_la-proto.lo `test -f 'proto.c' || echo '$(srcdir)/'`proto.c - -libvgauth_la-audit.lo: ../common/audit.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvgauth_la-audit.lo -MD -MP -MF $(DEPDIR)/libvgauth_la-audit.Tpo -c -o libvgauth_la-audit.lo `test -f '../common/audit.c' || echo '$(srcdir)/'`../common/audit.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvgauth_la-audit.Tpo $(DEPDIR)/libvgauth_la-audit.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../common/audit.c' object='libvgauth_la-audit.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvgauth_la-audit.lo `test -f '../common/audit.c' || echo '$(srcdir)/'`../common/audit.c - -libvgauth_la-certverify.lo: ../common/certverify.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvgauth_la-certverify.lo -MD -MP -MF $(DEPDIR)/libvgauth_la-certverify.Tpo -c -o libvgauth_la-certverify.lo `test -f '../common/certverify.c' || echo '$(srcdir)/'`../common/certverify.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvgauth_la-certverify.Tpo $(DEPDIR)/libvgauth_la-certverify.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../common/certverify.c' object='libvgauth_la-certverify.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvgauth_la-certverify.lo `test -f '../common/certverify.c' || echo '$(srcdir)/'`../common/certverify.c - -libvgauth_la-i18n.lo: ../common/i18n.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvgauth_la-i18n.lo -MD -MP -MF $(DEPDIR)/libvgauth_la-i18n.Tpo -c -o libvgauth_la-i18n.lo `test -f '../common/i18n.c' || echo '$(srcdir)/'`../common/i18n.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvgauth_la-i18n.Tpo $(DEPDIR)/libvgauth_la-i18n.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../common/i18n.c' object='libvgauth_la-i18n.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvgauth_la-i18n.lo `test -f '../common/i18n.c' || echo '$(srcdir)/'`../common/i18n.c - -libvgauth_la-prefs.lo: ../common/prefs.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvgauth_la-prefs.lo -MD -MP -MF $(DEPDIR)/libvgauth_la-prefs.Tpo -c -o libvgauth_la-prefs.lo `test -f '../common/prefs.c' || echo '$(srcdir)/'`../common/prefs.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvgauth_la-prefs.Tpo $(DEPDIR)/libvgauth_la-prefs.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../common/prefs.c' object='libvgauth_la-prefs.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvgauth_la-prefs.lo `test -f '../common/prefs.c' || echo '$(srcdir)/'`../common/prefs.c - -libvgauth_la-usercheck.lo: ../common/usercheck.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvgauth_la-usercheck.lo -MD -MP -MF $(DEPDIR)/libvgauth_la-usercheck.Tpo -c -o libvgauth_la-usercheck.lo `test -f '../common/usercheck.c' || echo '$(srcdir)/'`../common/usercheck.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvgauth_la-usercheck.Tpo $(DEPDIR)/libvgauth_la-usercheck.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../common/usercheck.c' object='libvgauth_la-usercheck.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvgauth_la-usercheck.lo `test -f '../common/usercheck.c' || echo '$(srcdir)/'`../common/usercheck.c - -libvgauth_la-VGAuthLog.lo: ../common/VGAuthLog.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvgauth_la-VGAuthLog.lo -MD -MP -MF $(DEPDIR)/libvgauth_la-VGAuthLog.Tpo -c -o libvgauth_la-VGAuthLog.lo `test -f '../common/VGAuthLog.c' || echo '$(srcdir)/'`../common/VGAuthLog.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvgauth_la-VGAuthLog.Tpo $(DEPDIR)/libvgauth_la-VGAuthLog.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../common/VGAuthLog.c' object='libvgauth_la-VGAuthLog.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvgauth_la-VGAuthLog.lo `test -f '../common/VGAuthLog.c' || echo '$(srcdir)/'`../common/VGAuthLog.c - -libvgauth_la-VGAuthUtil.lo: ../common/VGAuthUtil.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvgauth_la-VGAuthUtil.lo -MD -MP -MF $(DEPDIR)/libvgauth_la-VGAuthUtil.Tpo -c -o libvgauth_la-VGAuthUtil.lo `test -f '../common/VGAuthUtil.c' || echo '$(srcdir)/'`../common/VGAuthUtil.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvgauth_la-VGAuthUtil.Tpo $(DEPDIR)/libvgauth_la-VGAuthUtil.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../common/VGAuthUtil.c' object='libvgauth_la-VGAuthUtil.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvgauth_la-VGAuthUtil.lo `test -f '../common/VGAuthUtil.c' || echo '$(srcdir)/'`../common/VGAuthUtil.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: - for dir in "$(DESTDIR)$(libdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook - -install-dvi: install-dvi-am - -install-exec-am: install-libLTLIBRARIES - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-libLTLIBRARIES - -.MAKE: install-am install-data-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am \ - install-data-hook install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-libLTLIBRARIES install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-libLTLIBRARIES - - -# Message catalogs. -install-data-hook: - @INSTVMSG@ libvgauth.la $(srcdir)/l10n $(DESTDIR)$(datadir) -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/vgauth/service/Makefile.in b/open-vm-tools/vgauth/service/Makefile.in deleted file mode 100644 index 257f18b0a..000000000 --- a/open-vm-tools/vgauth/service/Makefile.in +++ /dev/null @@ -1,900 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2014-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -bin_PROGRAMS = VGAuthService$(EXEEXT) -@HAVE_ICU_TRUE@am__append_1 = @ICU_LIBS@ -subdir = vgauth/service -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" \ - "$(DESTDIR)$(VGAuthServicedir)" -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) -PROGRAMS = $(bin_PROGRAMS) -am_VGAuthService_OBJECTS = VGAuthService-main.$(OBJEXT) \ - VGAuthService-fileLogger.$(OBJEXT) VGAuthService-gio.$(OBJEXT) \ - VGAuthService-log.$(OBJEXT) \ - VGAuthService-servicePosix.$(OBJEXT) \ - VGAuthService-signalSource.$(OBJEXT) \ - VGAuthService-alias.$(OBJEXT) VGAuthService-file.$(OBJEXT) \ - VGAuthService-filePosix.$(OBJEXT) \ - VGAuthService-netPosix.$(OBJEXT) VGAuthService-proto.$(OBJEXT) \ - VGAuthService-random.$(OBJEXT) VGAuthService-saml.$(OBJEXT) \ - VGAuthService-service.$(OBJEXT) VGAuthService-ticket.$(OBJEXT) \ - VGAuthService-verify.$(OBJEXT) -VGAuthService_OBJECTS = $(am_VGAuthService_OBJECTS) -am__DEPENDENCIES_1 = -VGAuthService_DEPENDENCIES = ../lib/libvgauth.la $(am__DEPENDENCIES_1) -VGAuthServiceSCRIPT_INSTALL = $(INSTALL_SCRIPT) -SCRIPTS = $(VGAuthService_SCRIPTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(VGAuthService_SOURCES) -DIST_SOURCES = $(VGAuthService_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -VGAuthService_SOURCES = main.c fileLogger.c gio.c log.c servicePosix.c \ - signalSource.c ../serviceImpl/alias.c ../serviceImpl/file.c \ - ../serviceImpl/filePosix.c ../serviceImpl/netPosix.c \ - ../serviceImpl/proto.c ../serviceImpl/random.c \ - ../serviceImpl/saml.cpp ../serviceImpl/service.c \ - ../serviceImpl/ticket.c ../serviceImpl/verify.c -VGAuthServicedir = /etc/vmware-tools/vgauth/schemas -VGAuthService_SCRIPTS = ../serviceImpl/schemas/datatypes.dtd \ - ../serviceImpl/schemas/saml-schema-assertion-2.0.xsd \ - ../serviceImpl/schemas/xenc-schema.xsd \ - ../serviceImpl/schemas/xmldsig-core-schema.xsd \ - ../serviceImpl/schemas/XMLSchema.dtd \ - ../serviceImpl/schemas/XMLSchema-hasFacetAndProperty.xsd \ - ../serviceImpl/schemas/XMLSchema-instance.xsd \ - ../serviceImpl/schemas/XMLSchema.xsd \ - ../serviceImpl/schemas/xml.xsd -VGAuthService_CPPFLAGS = -DVMTOOLS_USE_GLIB @GLIB2_CPPFLAGS@ \ - @XERCES_CPPFLAGS@ @XMLSECURITY_CPPFLAGS@ @SSL_CPPFLAGS@ \ - -I$(top_srcdir)/libvmtools -I$(top_srcdir)/vgauth/public \ - -I$(top_srcdir)/vgauth/common \ - -I$(top_srcdir)/vgauth/serviceImpl -VGAuthService_LDADD = @VMTOOLS_LIBS@ @GLIB2_LIBS@ @GTHREAD_LIBS@ \ - ../lib/libvgauth.la @XERCES_LIBS@ @XMLSECURITY_LIBS@ \ - @SSL_LIBS@ -lxerces-c -lxml-security-c -lssl -lcrypto \ - $(am__append_1) -@HAVE_ICU_FALSE@VGAuthService_LINK = $(LINK) -@HAVE_ICU_TRUE@VGAuthService_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ -@HAVE_ICU_TRUE@ $(LIBTOOLFLAGS) --mode=link $(CXX) \ -@HAVE_ICU_TRUE@ $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ -@HAVE_ICU_TRUE@ $(LDFLAGS) -o $@ - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .cpp .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu vgauth/service/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu vgauth/service/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ - else :; fi; \ - done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -VGAuthService$(EXEEXT): $(VGAuthService_OBJECTS) $(VGAuthService_DEPENDENCIES) - @rm -f VGAuthService$(EXEEXT) - $(VGAuthService_LINK) $(VGAuthService_OBJECTS) $(VGAuthService_LDADD) $(LIBS) -install-VGAuthServiceSCRIPTS: $(VGAuthService_SCRIPTS) - @$(NORMAL_INSTALL) - test -z "$(VGAuthServicedir)" || $(MKDIR_P) "$(DESTDIR)$(VGAuthServicedir)" - @list='$(VGAuthService_SCRIPTS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - if test -f $$d$$p; then \ - f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " $(VGAuthServiceSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(VGAuthServicedir)/$$f'"; \ - $(VGAuthServiceSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(VGAuthServicedir)/$$f"; \ - else :; fi; \ - done - -uninstall-VGAuthServiceSCRIPTS: - @$(NORMAL_UNINSTALL) - @list='$(VGAuthService_SCRIPTS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " rm -f '$(DESTDIR)$(VGAuthServicedir)/$$f'"; \ - rm -f "$(DESTDIR)$(VGAuthServicedir)/$$f"; \ - done - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VGAuthService-alias.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VGAuthService-file.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VGAuthService-fileLogger.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VGAuthService-filePosix.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VGAuthService-gio.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VGAuthService-log.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VGAuthService-main.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VGAuthService-netPosix.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VGAuthService-proto.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VGAuthService-random.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VGAuthService-saml.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VGAuthService-service.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VGAuthService-servicePosix.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VGAuthService-signalSource.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VGAuthService-ticket.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VGAuthService-verify.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -VGAuthService-main.o: main.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-main.o -MD -MP -MF $(DEPDIR)/VGAuthService-main.Tpo -c -o VGAuthService-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-main.Tpo $(DEPDIR)/VGAuthService-main.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='VGAuthService-main.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c - -VGAuthService-main.obj: main.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-main.obj -MD -MP -MF $(DEPDIR)/VGAuthService-main.Tpo -c -o VGAuthService-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-main.Tpo $(DEPDIR)/VGAuthService-main.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='VGAuthService-main.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` - -VGAuthService-fileLogger.o: fileLogger.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-fileLogger.o -MD -MP -MF $(DEPDIR)/VGAuthService-fileLogger.Tpo -c -o VGAuthService-fileLogger.o `test -f 'fileLogger.c' || echo '$(srcdir)/'`fileLogger.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-fileLogger.Tpo $(DEPDIR)/VGAuthService-fileLogger.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fileLogger.c' object='VGAuthService-fileLogger.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-fileLogger.o `test -f 'fileLogger.c' || echo '$(srcdir)/'`fileLogger.c - -VGAuthService-fileLogger.obj: fileLogger.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-fileLogger.obj -MD -MP -MF $(DEPDIR)/VGAuthService-fileLogger.Tpo -c -o VGAuthService-fileLogger.obj `if test -f 'fileLogger.c'; then $(CYGPATH_W) 'fileLogger.c'; else $(CYGPATH_W) '$(srcdir)/fileLogger.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-fileLogger.Tpo $(DEPDIR)/VGAuthService-fileLogger.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fileLogger.c' object='VGAuthService-fileLogger.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-fileLogger.obj `if test -f 'fileLogger.c'; then $(CYGPATH_W) 'fileLogger.c'; else $(CYGPATH_W) '$(srcdir)/fileLogger.c'; fi` - -VGAuthService-gio.o: gio.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-gio.o -MD -MP -MF $(DEPDIR)/VGAuthService-gio.Tpo -c -o VGAuthService-gio.o `test -f 'gio.c' || echo '$(srcdir)/'`gio.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-gio.Tpo $(DEPDIR)/VGAuthService-gio.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gio.c' object='VGAuthService-gio.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-gio.o `test -f 'gio.c' || echo '$(srcdir)/'`gio.c - -VGAuthService-gio.obj: gio.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-gio.obj -MD -MP -MF $(DEPDIR)/VGAuthService-gio.Tpo -c -o VGAuthService-gio.obj `if test -f 'gio.c'; then $(CYGPATH_W) 'gio.c'; else $(CYGPATH_W) '$(srcdir)/gio.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-gio.Tpo $(DEPDIR)/VGAuthService-gio.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gio.c' object='VGAuthService-gio.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-gio.obj `if test -f 'gio.c'; then $(CYGPATH_W) 'gio.c'; else $(CYGPATH_W) '$(srcdir)/gio.c'; fi` - -VGAuthService-log.o: log.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-log.o -MD -MP -MF $(DEPDIR)/VGAuthService-log.Tpo -c -o VGAuthService-log.o `test -f 'log.c' || echo '$(srcdir)/'`log.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-log.Tpo $(DEPDIR)/VGAuthService-log.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='log.c' object='VGAuthService-log.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-log.o `test -f 'log.c' || echo '$(srcdir)/'`log.c - -VGAuthService-log.obj: log.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-log.obj -MD -MP -MF $(DEPDIR)/VGAuthService-log.Tpo -c -o VGAuthService-log.obj `if test -f 'log.c'; then $(CYGPATH_W) 'log.c'; else $(CYGPATH_W) '$(srcdir)/log.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-log.Tpo $(DEPDIR)/VGAuthService-log.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='log.c' object='VGAuthService-log.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-log.obj `if test -f 'log.c'; then $(CYGPATH_W) 'log.c'; else $(CYGPATH_W) '$(srcdir)/log.c'; fi` - -VGAuthService-servicePosix.o: servicePosix.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-servicePosix.o -MD -MP -MF $(DEPDIR)/VGAuthService-servicePosix.Tpo -c -o VGAuthService-servicePosix.o `test -f 'servicePosix.c' || echo '$(srcdir)/'`servicePosix.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-servicePosix.Tpo $(DEPDIR)/VGAuthService-servicePosix.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='servicePosix.c' object='VGAuthService-servicePosix.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-servicePosix.o `test -f 'servicePosix.c' || echo '$(srcdir)/'`servicePosix.c - -VGAuthService-servicePosix.obj: servicePosix.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-servicePosix.obj -MD -MP -MF $(DEPDIR)/VGAuthService-servicePosix.Tpo -c -o VGAuthService-servicePosix.obj `if test -f 'servicePosix.c'; then $(CYGPATH_W) 'servicePosix.c'; else $(CYGPATH_W) '$(srcdir)/servicePosix.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-servicePosix.Tpo $(DEPDIR)/VGAuthService-servicePosix.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='servicePosix.c' object='VGAuthService-servicePosix.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-servicePosix.obj `if test -f 'servicePosix.c'; then $(CYGPATH_W) 'servicePosix.c'; else $(CYGPATH_W) '$(srcdir)/servicePosix.c'; fi` - -VGAuthService-signalSource.o: signalSource.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-signalSource.o -MD -MP -MF $(DEPDIR)/VGAuthService-signalSource.Tpo -c -o VGAuthService-signalSource.o `test -f 'signalSource.c' || echo '$(srcdir)/'`signalSource.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-signalSource.Tpo $(DEPDIR)/VGAuthService-signalSource.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='signalSource.c' object='VGAuthService-signalSource.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-signalSource.o `test -f 'signalSource.c' || echo '$(srcdir)/'`signalSource.c - -VGAuthService-signalSource.obj: signalSource.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-signalSource.obj -MD -MP -MF $(DEPDIR)/VGAuthService-signalSource.Tpo -c -o VGAuthService-signalSource.obj `if test -f 'signalSource.c'; then $(CYGPATH_W) 'signalSource.c'; else $(CYGPATH_W) '$(srcdir)/signalSource.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-signalSource.Tpo $(DEPDIR)/VGAuthService-signalSource.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='signalSource.c' object='VGAuthService-signalSource.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-signalSource.obj `if test -f 'signalSource.c'; then $(CYGPATH_W) 'signalSource.c'; else $(CYGPATH_W) '$(srcdir)/signalSource.c'; fi` - -VGAuthService-alias.o: ../serviceImpl/alias.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-alias.o -MD -MP -MF $(DEPDIR)/VGAuthService-alias.Tpo -c -o VGAuthService-alias.o `test -f '../serviceImpl/alias.c' || echo '$(srcdir)/'`../serviceImpl/alias.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-alias.Tpo $(DEPDIR)/VGAuthService-alias.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../serviceImpl/alias.c' object='VGAuthService-alias.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-alias.o `test -f '../serviceImpl/alias.c' || echo '$(srcdir)/'`../serviceImpl/alias.c - -VGAuthService-alias.obj: ../serviceImpl/alias.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-alias.obj -MD -MP -MF $(DEPDIR)/VGAuthService-alias.Tpo -c -o VGAuthService-alias.obj `if test -f '../serviceImpl/alias.c'; then $(CYGPATH_W) '../serviceImpl/alias.c'; else $(CYGPATH_W) '$(srcdir)/../serviceImpl/alias.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-alias.Tpo $(DEPDIR)/VGAuthService-alias.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../serviceImpl/alias.c' object='VGAuthService-alias.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-alias.obj `if test -f '../serviceImpl/alias.c'; then $(CYGPATH_W) '../serviceImpl/alias.c'; else $(CYGPATH_W) '$(srcdir)/../serviceImpl/alias.c'; fi` - -VGAuthService-file.o: ../serviceImpl/file.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-file.o -MD -MP -MF $(DEPDIR)/VGAuthService-file.Tpo -c -o VGAuthService-file.o `test -f '../serviceImpl/file.c' || echo '$(srcdir)/'`../serviceImpl/file.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-file.Tpo $(DEPDIR)/VGAuthService-file.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../serviceImpl/file.c' object='VGAuthService-file.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-file.o `test -f '../serviceImpl/file.c' || echo '$(srcdir)/'`../serviceImpl/file.c - -VGAuthService-file.obj: ../serviceImpl/file.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-file.obj -MD -MP -MF $(DEPDIR)/VGAuthService-file.Tpo -c -o VGAuthService-file.obj `if test -f '../serviceImpl/file.c'; then $(CYGPATH_W) '../serviceImpl/file.c'; else $(CYGPATH_W) '$(srcdir)/../serviceImpl/file.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-file.Tpo $(DEPDIR)/VGAuthService-file.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../serviceImpl/file.c' object='VGAuthService-file.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-file.obj `if test -f '../serviceImpl/file.c'; then $(CYGPATH_W) '../serviceImpl/file.c'; else $(CYGPATH_W) '$(srcdir)/../serviceImpl/file.c'; fi` - -VGAuthService-filePosix.o: ../serviceImpl/filePosix.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-filePosix.o -MD -MP -MF $(DEPDIR)/VGAuthService-filePosix.Tpo -c -o VGAuthService-filePosix.o `test -f '../serviceImpl/filePosix.c' || echo '$(srcdir)/'`../serviceImpl/filePosix.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-filePosix.Tpo $(DEPDIR)/VGAuthService-filePosix.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../serviceImpl/filePosix.c' object='VGAuthService-filePosix.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-filePosix.o `test -f '../serviceImpl/filePosix.c' || echo '$(srcdir)/'`../serviceImpl/filePosix.c - -VGAuthService-filePosix.obj: ../serviceImpl/filePosix.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-filePosix.obj -MD -MP -MF $(DEPDIR)/VGAuthService-filePosix.Tpo -c -o VGAuthService-filePosix.obj `if test -f '../serviceImpl/filePosix.c'; then $(CYGPATH_W) '../serviceImpl/filePosix.c'; else $(CYGPATH_W) '$(srcdir)/../serviceImpl/filePosix.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-filePosix.Tpo $(DEPDIR)/VGAuthService-filePosix.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../serviceImpl/filePosix.c' object='VGAuthService-filePosix.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-filePosix.obj `if test -f '../serviceImpl/filePosix.c'; then $(CYGPATH_W) '../serviceImpl/filePosix.c'; else $(CYGPATH_W) '$(srcdir)/../serviceImpl/filePosix.c'; fi` - -VGAuthService-netPosix.o: ../serviceImpl/netPosix.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-netPosix.o -MD -MP -MF $(DEPDIR)/VGAuthService-netPosix.Tpo -c -o VGAuthService-netPosix.o `test -f '../serviceImpl/netPosix.c' || echo '$(srcdir)/'`../serviceImpl/netPosix.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-netPosix.Tpo $(DEPDIR)/VGAuthService-netPosix.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../serviceImpl/netPosix.c' object='VGAuthService-netPosix.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-netPosix.o `test -f '../serviceImpl/netPosix.c' || echo '$(srcdir)/'`../serviceImpl/netPosix.c - -VGAuthService-netPosix.obj: ../serviceImpl/netPosix.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-netPosix.obj -MD -MP -MF $(DEPDIR)/VGAuthService-netPosix.Tpo -c -o VGAuthService-netPosix.obj `if test -f '../serviceImpl/netPosix.c'; then $(CYGPATH_W) '../serviceImpl/netPosix.c'; else $(CYGPATH_W) '$(srcdir)/../serviceImpl/netPosix.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-netPosix.Tpo $(DEPDIR)/VGAuthService-netPosix.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../serviceImpl/netPosix.c' object='VGAuthService-netPosix.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-netPosix.obj `if test -f '../serviceImpl/netPosix.c'; then $(CYGPATH_W) '../serviceImpl/netPosix.c'; else $(CYGPATH_W) '$(srcdir)/../serviceImpl/netPosix.c'; fi` - -VGAuthService-proto.o: ../serviceImpl/proto.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-proto.o -MD -MP -MF $(DEPDIR)/VGAuthService-proto.Tpo -c -o VGAuthService-proto.o `test -f '../serviceImpl/proto.c' || echo '$(srcdir)/'`../serviceImpl/proto.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-proto.Tpo $(DEPDIR)/VGAuthService-proto.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../serviceImpl/proto.c' object='VGAuthService-proto.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-proto.o `test -f '../serviceImpl/proto.c' || echo '$(srcdir)/'`../serviceImpl/proto.c - -VGAuthService-proto.obj: ../serviceImpl/proto.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-proto.obj -MD -MP -MF $(DEPDIR)/VGAuthService-proto.Tpo -c -o VGAuthService-proto.obj `if test -f '../serviceImpl/proto.c'; then $(CYGPATH_W) '../serviceImpl/proto.c'; else $(CYGPATH_W) '$(srcdir)/../serviceImpl/proto.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-proto.Tpo $(DEPDIR)/VGAuthService-proto.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../serviceImpl/proto.c' object='VGAuthService-proto.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-proto.obj `if test -f '../serviceImpl/proto.c'; then $(CYGPATH_W) '../serviceImpl/proto.c'; else $(CYGPATH_W) '$(srcdir)/../serviceImpl/proto.c'; fi` - -VGAuthService-random.o: ../serviceImpl/random.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-random.o -MD -MP -MF $(DEPDIR)/VGAuthService-random.Tpo -c -o VGAuthService-random.o `test -f '../serviceImpl/random.c' || echo '$(srcdir)/'`../serviceImpl/random.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-random.Tpo $(DEPDIR)/VGAuthService-random.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../serviceImpl/random.c' object='VGAuthService-random.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-random.o `test -f '../serviceImpl/random.c' || echo '$(srcdir)/'`../serviceImpl/random.c - -VGAuthService-random.obj: ../serviceImpl/random.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-random.obj -MD -MP -MF $(DEPDIR)/VGAuthService-random.Tpo -c -o VGAuthService-random.obj `if test -f '../serviceImpl/random.c'; then $(CYGPATH_W) '../serviceImpl/random.c'; else $(CYGPATH_W) '$(srcdir)/../serviceImpl/random.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-random.Tpo $(DEPDIR)/VGAuthService-random.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../serviceImpl/random.c' object='VGAuthService-random.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-random.obj `if test -f '../serviceImpl/random.c'; then $(CYGPATH_W) '../serviceImpl/random.c'; else $(CYGPATH_W) '$(srcdir)/../serviceImpl/random.c'; fi` - -VGAuthService-service.o: ../serviceImpl/service.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-service.o -MD -MP -MF $(DEPDIR)/VGAuthService-service.Tpo -c -o VGAuthService-service.o `test -f '../serviceImpl/service.c' || echo '$(srcdir)/'`../serviceImpl/service.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-service.Tpo $(DEPDIR)/VGAuthService-service.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../serviceImpl/service.c' object='VGAuthService-service.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-service.o `test -f '../serviceImpl/service.c' || echo '$(srcdir)/'`../serviceImpl/service.c - -VGAuthService-service.obj: ../serviceImpl/service.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-service.obj -MD -MP -MF $(DEPDIR)/VGAuthService-service.Tpo -c -o VGAuthService-service.obj `if test -f '../serviceImpl/service.c'; then $(CYGPATH_W) '../serviceImpl/service.c'; else $(CYGPATH_W) '$(srcdir)/../serviceImpl/service.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-service.Tpo $(DEPDIR)/VGAuthService-service.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../serviceImpl/service.c' object='VGAuthService-service.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-service.obj `if test -f '../serviceImpl/service.c'; then $(CYGPATH_W) '../serviceImpl/service.c'; else $(CYGPATH_W) '$(srcdir)/../serviceImpl/service.c'; fi` - -VGAuthService-ticket.o: ../serviceImpl/ticket.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-ticket.o -MD -MP -MF $(DEPDIR)/VGAuthService-ticket.Tpo -c -o VGAuthService-ticket.o `test -f '../serviceImpl/ticket.c' || echo '$(srcdir)/'`../serviceImpl/ticket.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-ticket.Tpo $(DEPDIR)/VGAuthService-ticket.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../serviceImpl/ticket.c' object='VGAuthService-ticket.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-ticket.o `test -f '../serviceImpl/ticket.c' || echo '$(srcdir)/'`../serviceImpl/ticket.c - -VGAuthService-ticket.obj: ../serviceImpl/ticket.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-ticket.obj -MD -MP -MF $(DEPDIR)/VGAuthService-ticket.Tpo -c -o VGAuthService-ticket.obj `if test -f '../serviceImpl/ticket.c'; then $(CYGPATH_W) '../serviceImpl/ticket.c'; else $(CYGPATH_W) '$(srcdir)/../serviceImpl/ticket.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-ticket.Tpo $(DEPDIR)/VGAuthService-ticket.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../serviceImpl/ticket.c' object='VGAuthService-ticket.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-ticket.obj `if test -f '../serviceImpl/ticket.c'; then $(CYGPATH_W) '../serviceImpl/ticket.c'; else $(CYGPATH_W) '$(srcdir)/../serviceImpl/ticket.c'; fi` - -VGAuthService-verify.o: ../serviceImpl/verify.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-verify.o -MD -MP -MF $(DEPDIR)/VGAuthService-verify.Tpo -c -o VGAuthService-verify.o `test -f '../serviceImpl/verify.c' || echo '$(srcdir)/'`../serviceImpl/verify.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-verify.Tpo $(DEPDIR)/VGAuthService-verify.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../serviceImpl/verify.c' object='VGAuthService-verify.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-verify.o `test -f '../serviceImpl/verify.c' || echo '$(srcdir)/'`../serviceImpl/verify.c - -VGAuthService-verify.obj: ../serviceImpl/verify.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-verify.obj -MD -MP -MF $(DEPDIR)/VGAuthService-verify.Tpo -c -o VGAuthService-verify.obj `if test -f '../serviceImpl/verify.c'; then $(CYGPATH_W) '../serviceImpl/verify.c'; else $(CYGPATH_W) '$(srcdir)/../serviceImpl/verify.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-verify.Tpo $(DEPDIR)/VGAuthService-verify.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../serviceImpl/verify.c' object='VGAuthService-verify.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-verify.obj `if test -f '../serviceImpl/verify.c'; then $(CYGPATH_W) '../serviceImpl/verify.c'; else $(CYGPATH_W) '$(srcdir)/../serviceImpl/verify.c'; fi` - -.cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< - -.cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< - -VGAuthService-saml.o: ../serviceImpl/saml.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT VGAuthService-saml.o -MD -MP -MF $(DEPDIR)/VGAuthService-saml.Tpo -c -o VGAuthService-saml.o `test -f '../serviceImpl/saml.cpp' || echo '$(srcdir)/'`../serviceImpl/saml.cpp -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/VGAuthService-saml.Tpo $(DEPDIR)/VGAuthService-saml.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../serviceImpl/saml.cpp' object='VGAuthService-saml.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o VGAuthService-saml.o `test -f '../serviceImpl/saml.cpp' || echo '$(srcdir)/'`../serviceImpl/saml.cpp - -VGAuthService-saml.obj: ../serviceImpl/saml.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT VGAuthService-saml.obj -MD -MP -MF $(DEPDIR)/VGAuthService-saml.Tpo -c -o VGAuthService-saml.obj `if test -f '../serviceImpl/saml.cpp'; then $(CYGPATH_W) '../serviceImpl/saml.cpp'; else $(CYGPATH_W) '$(srcdir)/../serviceImpl/saml.cpp'; fi` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/VGAuthService-saml.Tpo $(DEPDIR)/VGAuthService-saml.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../serviceImpl/saml.cpp' object='VGAuthService-saml.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o VGAuthService-saml.obj `if test -f '../serviceImpl/saml.cpp'; then $(CYGPATH_W) '../serviceImpl/saml.cpp'; else $(CYGPATH_W) '$(srcdir)/../serviceImpl/saml.cpp'; fi` - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) $(SCRIPTS) -installdirs: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(VGAuthServicedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-VGAuthServiceSCRIPTS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook - -install-dvi: install-dvi-am - -install-exec-am: install-binPROGRAMS - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-VGAuthServiceSCRIPTS uninstall-binPROGRAMS - -.MAKE: install-am install-data-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install \ - install-VGAuthServiceSCRIPTS install-am install-binPROGRAMS \ - install-data install-data-am install-data-hook install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall \ - uninstall-VGAuthServiceSCRIPTS uninstall-am \ - uninstall-binPROGRAMS - - -# Message catalogs. -install-data-hook: - @INSTVMSG@ VGAuthService $(srcdir)/l10n $(DESTDIR)$(datadir) - cat vgauth.conf | sed -e"s!@@VGAUTHSCHEMADIR@@!$(VGAuthServicedir)!" > $(DESTDIR)/etc/vmware-tools/vgauth.conf -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/vgauth/service/service.h b/open-vm-tools/vgauth/service/service.h index 5a22f89b6..57ac39be8 100644 --- a/open-vm-tools/vgauth/service/service.h +++ b/open-vm-tools/vgauth/service/service.h @@ -88,7 +88,7 @@ gboolean ServiceSuicide(const char *pidPath); #define LOGFILENAME_DEFAULT "vgauthsvclog.txt" #define LOGFILENAME_PATH_DEFAULT "c:\\temp\\" LOGFILENAME_DEFAULT #else -#define LOGFILENAME_PATH_DEFAULT "/tmp/vgauthsvclog.txt" +#define LOGFILENAME_PATH_DEFAULT "/var/log/vmware-vgauthsvc.log" #endif void Service_SetLogOnStdout(gboolean flag); diff --git a/open-vm-tools/vgauth/serviceImpl/alias.c b/open-vm-tools/vgauth/serviceImpl/alias.c index 0f4d516ad..c6df7cc50 100644 --- a/open-vm-tools/vgauth/serviceImpl/alias.c +++ b/open-vm-tools/vgauth/serviceImpl/alias.c @@ -57,10 +57,8 @@ #define ALIAS_STORE_REL_DIRECTORY "VMware\\VGAuth\\aliasStore" #define DEFAULT_ALIASSTORE_ROOT_DIR "C:\\Documents and Settings\\All Users\\Application Data\\" ALIAS_STORE_REL_DIRECTORY #endif -#define DIRSEP "\\" #else #define DEFAULT_ALIASSTORE_ROOT_DIR "/var/lib/vmware/VGAuth/aliasStore" -#define DIRSEP "/" #endif #define ALIASSTORE_MAPFILE_NAME "mapping.xml" @@ -2768,6 +2766,7 @@ ServiceAliasRemoveAlias(const gchar *reqUserName, ServiceSubject *subj) { VGAuthError err; + VGAuthError savedErr = VGAUTH_E_OK; int numIds; ServiceAlias *aList = NULL; gboolean removeAll = (subj->type == SUBJECT_TYPE_UNSET); @@ -2855,13 +2854,17 @@ ServiceAliasRemoveAlias(const gchar *reqUserName, } } if (-1 == userIdIdx) { - err = VGAUTH_E_INVALID_ARGUMENT; - goto done; + /* + * No match, but continue on through the mapped code + * in case we have a orphaned mapped alias from a buggy + * earlier version. + */ + savedErr = VGAUTH_E_INVALID_ARGUMENT; } } /* - * Load mapping. + * Now clear out any mapped alias. This may fail to find a match. */ err = AliasLoadMapped(&numMapped, &maList); if (VGAUTH_E_OK != err) { @@ -2918,21 +2921,17 @@ ServiceAliasRemoveAlias(const gchar *reqUserName, memset(&(maList[userIdIdx].subjects[maList[userIdIdx].num]), '\0', sizeof(ServiceSubject)); #endif + // if all the subjects are gone, toss the whole thing + if (maList[i].num == 0) { + numMapped--; + ServiceAliasFreeMappedAliasListContents(&(maList[i])); + AliasShrinkMapList(maList, numMapped, userIdIdx); + } + updateMap = TRUE; + break; } - // if all the subjects are gone, toss the whole thing - if (maList[i].num == 0) { - numMapped--; - ServiceAliasFreeMappedAliasListContents(&(maList[i])); - AliasShrinkMapList(maList, numMapped, userIdIdx); - } - updateMap = TRUE; - break; } } - if (-1 == userIdIdx) { - err = VGAUTH_E_INVALID_ARGUMENT; - goto done; - } } update: @@ -2951,7 +2950,15 @@ done: ServiceAliasFreeAliasList(numIds, aList); ServiceAliasFreeMappedAliasList(numMapped, maList); - return err; + /* + * If we couldn't find the alias, but dropped though to the mapped + * code anyways to catch orphans, return that error. + */ + if (savedErr != VGAUTH_E_OK) { + return savedErr; + } else { + return err; + } } @@ -3042,7 +3049,7 @@ ServiceAliasQueryMappedAliases(int *num, * ServiceIDVerifyStoreContents -- */ /** * * Looks at every file in the alias store, validating ownership and permissions. - * If a file faisl the validation check, its renamed to file.bad. + * If a file fails the validation check, its renamed to file.bad. * * If we fail to rename a bad file, the function returns an error. * @@ -3137,6 +3144,101 @@ ServiceIDVerifyStoreContents(void) } +/* + ****************************************************************************** + * ServiceValidateAliases -- */ /** + * + * Looks at the alias store, and flags any orphaned mapped alias (have no + * associated per-user alias) that could have been left by bugs in + * previous releases. + * + * @return VGAUTH_E_OK on success, VGAuthError on failure + * + ****************************************************************************** + */ + +static VGAuthError +ServiceValidateAliases(void) +{ + VGAuthError err; + int numMapped = 0; + ServiceMappedAlias *maList = NULL; + int numIds; + ServiceAlias *aList = NULL; + ServiceSubject *mappedSubj; + ServiceSubject *badSubj; + ServiceAliasInfo *ai; + int i; + int j; + int k; + int l; + gboolean foundMatch; + + err = AliasLoadMapped(&numMapped, &maList); + if (VGAUTH_E_OK != err) { + goto done; + } + + if (numMapped == 0) { + err = VGAUTH_E_OK; + goto done; + } + + for (i = 0; i < numMapped; i++) { + foundMatch = FALSE; + badSubj = NULL; + err = AliasLoadAliases(maList[i].userName, &numIds, &aList); + if (err != VGAUTH_E_OK) { + Warning("%s: Failed to load alias for user '%s'\n", + __FUNCTION__, maList[i].userName); + continue; + } + + // iterate over subjects + for (j = 0; j < maList[i].num; j++) { + mappedSubj = &(maList[i].subjects[j]); + badSubj = mappedSubj; + for (k = 0; k < numIds; k++) { + if (ServiceComparePEMCerts(maList[i].pemCert, aList[k].pemCert)) { + for (l = 0; l < aList[k].num; l++) { + ai = &(aList[k].infos[l]); + if (ServiceAliasIsSubjectEqual(mappedSubj->type, ai->type, + mappedSubj->name, ai->name)) { + foundMatch = TRUE; + badSubj = NULL; + goto next; + } + } + } + } + } +next: + ServiceAliasFreeAliasList(numIds, aList); + if (!foundMatch) { + Warning("%s: orphaned mapped alias: user %s subj %s cert %s\n", + __FUNCTION__, maList[i].userName, + (badSubj->type == SUBJECT_TYPE_NAMED ? badSubj->name : "ANY"), + maList[i].pemCert); +#if 0 + /* + * This could clear the orphaned alias, but a) that could + * confuse a user and b) if its buggy, its made things worse. + */ + err = ServiceAliasRemoveAlias("SERVICE-SANITY-CHECK", + maList[i].userName, + maList[i].pemCert, + badSubj); +#endif + } + } + +done: + ServiceAliasFreeMappedAliasList(numMapped, maList); + + return err; +} + + /* ****************************************************************************** * ServiceAliasInitAliasStore -- */ /** @@ -3255,6 +3357,11 @@ ServiceAliasInitAliasStore(void) aliasStoreRootDir); saveBadDir = TRUE; } + + /* + * Sanity check the alias store. + */ + err = ServiceValidateAliases(); } if (saveBadDir) { diff --git a/open-vm-tools/vgauth/serviceImpl/service.c b/open-vm-tools/vgauth/serviceImpl/service.c index 605deef50..ced804681 100644 --- a/open-vm-tools/vgauth/serviceImpl/service.c +++ b/open-vm-tools/vgauth/serviceImpl/service.c @@ -250,7 +250,7 @@ ServiceDecodeUserName(const char *userName) ASSERT(ok); if (domain) { - result = g_strdup_printf("%sDIRSEP%s", domain, user); + result = g_strdup_printf("%s"DIRSEP"%s", domain, user); } else { result = g_strdup(userName); } diff --git a/open-vm-tools/vgauth/serviceImpl/serviceInt.h b/open-vm-tools/vgauth/serviceImpl/serviceInt.h index 63fbe2d7b..cb783148c 100644 --- a/open-vm-tools/vgauth/serviceImpl/serviceInt.h +++ b/open-vm-tools/vgauth/serviceImpl/serviceInt.h @@ -52,6 +52,11 @@ enum { BUFSIZE = 4096 }; #include "userAccessControl.h" #endif +#ifdef _WIN32 +#define DIRSEP "\\" +#else +#define DIRSEP "/" +#endif /* * Use this for any informational messages, eg "service started". diff --git a/open-vm-tools/vmblock-fuse/Makefile.in b/open-vm-tools/vmblock-fuse/Makefile.in deleted file mode 100644 index c77fa9c87..000000000 --- a/open-vm-tools/vmblock-fuse/Makefile.in +++ /dev/null @@ -1,609 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2008-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -bin_PROGRAMS = vmware-vmblock-fuse$(EXEEXT) -@HAVE_ICU_TRUE@am__append_1 = @ICU_LIBS@ -subdir = vmblock-fuse -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) -PROGRAMS = $(bin_PROGRAMS) -am_vmware_vmblock_fuse_OBJECTS = util.$(OBJEXT) fsops.$(OBJEXT) \ - main.$(OBJEXT) block.$(OBJEXT) stubs.$(OBJEXT) -vmware_vmblock_fuse_OBJECTS = $(am_vmware_vmblock_fuse_OBJECTS) -am__DEPENDENCIES_1 = -vmware_vmblock_fuse_DEPENDENCIES = $(am__DEPENDENCIES_1) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(vmware_vmblock_fuse_SOURCES) -DIST_SOURCES = $(vmware_vmblock_fuse_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ - -# _XOPEN_SOURCE needs to be defined to at least 600 when compiling -# vmblock-fuse; it's needed by os.h to get pthread_rwlock_t and by fsops.c to -# get lstat. -# -D_FILE_OFFSET_BITS=64 required for fuse. -AM_CFLAGS = -Dvmblock_fuse -U_XOPEN_SOURCE -D_XOPEN_SOURCE=600 \ - -DUSERLEVEL -D_FILE_OFFSET_BITS=64 @FUSE_CPPFLAGS@ \ - @GLIB2_CPPFLAGS@ -I$(top_srcdir)/modules/shared/vmblock \ - -I$(srcdir) -vmware_vmblock_fuse_LDADD = @FUSE_LIBS@ @GLIB2_LIBS@ $(am__append_1) -vmware_vmblock_fuse_SOURCES = util.c fsops.c main.c \ - $(top_srcdir)/modules/shared/vmblock/block.c \ - $(top_srcdir)/modules/shared/vmblock/stubs.c -@HAVE_ICU_FALSE@vmware_vmblock_fuse_LINK = $(LINK) -@HAVE_ICU_TRUE@vmware_vmblock_fuse_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ -@HAVE_ICU_TRUE@ $(LIBTOOLFLAGS) --mode=link $(CXX) $(AM_CXXFLAGS) \ -@HAVE_ICU_TRUE@ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu vmblock-fuse/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu vmblock-fuse/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ - else :; fi; \ - done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -vmware-vmblock-fuse$(EXEEXT): $(vmware_vmblock_fuse_OBJECTS) $(vmware_vmblock_fuse_DEPENDENCIES) - @rm -f vmware-vmblock-fuse$(EXEEXT) - $(vmware_vmblock_fuse_LINK) $(vmware_vmblock_fuse_OBJECTS) $(vmware_vmblock_fuse_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/block.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsops.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stubs.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -block.o: $(top_srcdir)/modules/shared/vmblock/block.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT block.o -MD -MP -MF $(DEPDIR)/block.Tpo -c -o block.o `test -f '$(top_srcdir)/modules/shared/vmblock/block.c' || echo '$(srcdir)/'`$(top_srcdir)/modules/shared/vmblock/block.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/block.Tpo $(DEPDIR)/block.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/modules/shared/vmblock/block.c' object='block.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o block.o `test -f '$(top_srcdir)/modules/shared/vmblock/block.c' || echo '$(srcdir)/'`$(top_srcdir)/modules/shared/vmblock/block.c - -block.obj: $(top_srcdir)/modules/shared/vmblock/block.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT block.obj -MD -MP -MF $(DEPDIR)/block.Tpo -c -o block.obj `if test -f '$(top_srcdir)/modules/shared/vmblock/block.c'; then $(CYGPATH_W) '$(top_srcdir)/modules/shared/vmblock/block.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/modules/shared/vmblock/block.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/block.Tpo $(DEPDIR)/block.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/modules/shared/vmblock/block.c' object='block.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o block.obj `if test -f '$(top_srcdir)/modules/shared/vmblock/block.c'; then $(CYGPATH_W) '$(top_srcdir)/modules/shared/vmblock/block.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/modules/shared/vmblock/block.c'; fi` - -stubs.o: $(top_srcdir)/modules/shared/vmblock/stubs.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stubs.o -MD -MP -MF $(DEPDIR)/stubs.Tpo -c -o stubs.o `test -f '$(top_srcdir)/modules/shared/vmblock/stubs.c' || echo '$(srcdir)/'`$(top_srcdir)/modules/shared/vmblock/stubs.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/stubs.Tpo $(DEPDIR)/stubs.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/modules/shared/vmblock/stubs.c' object='stubs.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stubs.o `test -f '$(top_srcdir)/modules/shared/vmblock/stubs.c' || echo '$(srcdir)/'`$(top_srcdir)/modules/shared/vmblock/stubs.c - -stubs.obj: $(top_srcdir)/modules/shared/vmblock/stubs.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stubs.obj -MD -MP -MF $(DEPDIR)/stubs.Tpo -c -o stubs.obj `if test -f '$(top_srcdir)/modules/shared/vmblock/stubs.c'; then $(CYGPATH_W) '$(top_srcdir)/modules/shared/vmblock/stubs.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/modules/shared/vmblock/stubs.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/stubs.Tpo $(DEPDIR)/stubs.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/modules/shared/vmblock/stubs.c' object='stubs.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stubs.obj `if test -f '$(top_srcdir)/modules/shared/vmblock/stubs.c'; then $(CYGPATH_W) '$(top_srcdir)/modules/shared/vmblock/stubs.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/modules/shared/vmblock/stubs.c'; fi` - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: - for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: install-binPROGRAMS - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-binPROGRAMS - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/vmblockmounter/Makefile.in b/open-vm-tools/vmblockmounter/Makefile.in deleted file mode 100644 index 79e376e32..000000000 --- a/open-vm-tools/vmblockmounter/Makefile.in +++ /dev/null @@ -1,579 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2011-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -sbin_PROGRAMS = mount.vmblock$(EXEEXT) -subdir = vmblockmounter -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__installdirs = "$(DESTDIR)$(sbindir)" -sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM) -PROGRAMS = $(sbin_PROGRAMS) -am_mount_vmblock_OBJECTS = vmblockmounter.$(OBJEXT) -mount_vmblock_OBJECTS = $(am_mount_vmblock_OBJECTS) -mount_vmblock_DEPENDENCIES = ../lib/stubs/libStubs.la -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(mount_vmblock_SOURCES) -DIST_SOURCES = $(mount_vmblock_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -mount_vmblock_LDADD = ../lib/stubs/libStubs.la -mount_vmblock_SOURCES = vmblockmounter.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu vmblockmounter/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu vmblockmounter/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-sbinPROGRAMS: $(sbin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)" - @list='$(sbin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(sbinPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(sbindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(sbinPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(sbindir)/$$f" || exit 1; \ - else :; fi; \ - done - -uninstall-sbinPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(sbin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(sbindir)/$$f'"; \ - rm -f "$(DESTDIR)$(sbindir)/$$f"; \ - done - -clean-sbinPROGRAMS: - @list='$(sbin_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -mount.vmblock$(EXEEXT): $(mount_vmblock_OBJECTS) $(mount_vmblock_DEPENDENCIES) - @rm -f mount.vmblock$(EXEEXT) - $(LINK) $(mount_vmblock_OBJECTS) $(mount_vmblock_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmblockmounter.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: - for dir in "$(DESTDIR)$(sbindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: install-sbinPROGRAMS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-sbinPROGRAMS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook - -.MAKE: install-am install-exec-am install-strip uninstall-am - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-sbinPROGRAMS ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-exec-hook \ - install-html install-html-am install-info install-info-am \ - install-man install-pdf install-pdf-am install-ps \ - install-ps-am install-sbinPROGRAMS install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-hook \ - uninstall-sbinPROGRAMS - - -@FREEBSD_TRUE@install-exec-hook: -@FREEBSD_TRUE@ mv $(DESTDIR)$(sbindir)/mount.vmblock \ -@FREEBSD_TRUE@ $(DESTDIR)$(sbindir)/mount_vmblock -@FREEBSD_TRUE@ -$(MKDIR_P) $(DESTDIR)/sbin -@FREEBSD_TRUE@ -$(LN_S) $(DESTDIR)$(sbindir)/mount_vmblock \ -@FREEBSD_TRUE@ $(DESTDIR)/sbin/mount_vmblock &> /dev/null -@FREEBSD_TRUE@uninstall-hook: -@FREEBSD_TRUE@ rm -f $(DESTDIR)$(sbindir)/mount_vmblock -@FREEBSD_FALSE@install-exec-hook: -@FREEBSD_FALSE@ -$(MKDIR_P) $(DESTDIR)/sbin -@FREEBSD_FALSE@ -$(LN_S) $(DESTDIR)$(sbindir)/mount.vmblock \ -@FREEBSD_FALSE@ $(DESTDIR)/sbin/mount.vmblock &> /dev/null -@FREEBSD_FALSE@uninstall-hook: -@FREEBSD_FALSE@ rm -f $(DESTDIR)/sbin/mount.vmblock -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/vmhgfs-fuse/Makefile.am b/open-vm-tools/vmhgfs-fuse/Makefile.am index 1e076f396..7d10bf3d4 100644 --- a/open-vm-tools/vmhgfs-fuse/Makefile.am +++ b/open-vm-tools/vmhgfs-fuse/Makefile.am @@ -24,6 +24,7 @@ AM_CFLAGS += @GLIB2_CPPFLAGS@ vmhgfs_fuse_LDADD = vmhgfs_fuse_LDADD += @FUSE_LIBS@ vmhgfs_fuse_LDADD += @GLIB2_LIBS@ +vmhgfs_fuse_LDADD += @VMTOOLS_LIBS@ # The linker processes the libraries in sequence, and order matters here. vmhgfs_fuse_LDADD += ../lib/hgfs/libHgfs.la diff --git a/open-vm-tools/vmhgfs-fuse/config.c b/open-vm-tools/vmhgfs-fuse/config.c index 241c66c64..1bacc0ded 100644 --- a/open-vm-tools/vmhgfs-fuse/config.c +++ b/open-vm-tools/vmhgfs-fuse/config.c @@ -490,6 +490,9 @@ vmhgfsPreprocessArgs(struct fuse_args *outargs) // IN/OUT gState->basePath = NULL; gState->basePathLen = 0; + VMTools_LoadConfig(NULL, G_KEY_FILE_NONE, &gState->conf, NULL); + VMTools_ConfigLogging(G_LOG_DOMAIN, gState->conf, FALSE, FALSE); + #ifdef VMX86_DEVEL config.logLevel = LOGLEVEL_THRESHOLD; #endif diff --git a/open-vm-tools/vmhgfs-fuse/filesystem.h b/open-vm-tools/vmhgfs-fuse/filesystem.h index 97fdc507b..48af9376d 100644 --- a/open-vm-tools/vmhgfs-fuse/filesystem.h +++ b/open-vm-tools/vmhgfs-fuse/filesystem.h @@ -26,8 +26,12 @@ #ifndef _HGFS_DRIVER_FILESYSTEM_H_ #define _HGFS_DRIVER_FILESYSTEM_H_ +#define G_LOG_DOMAIN "vmhgfs-fuse" + #include "vm_basic_types.h" #include +#include "vmware/tools/utils.h" +#include "vmware/tools/log.h" typedef struct HgfsFuseState { Bool sessionEnabled; @@ -41,6 +45,8 @@ typedef struct HgfsFuseState { char *basePath; size_t basePathLen; + GKeyFile *conf; + } HgfsFuseState; /* Public functions (with respect to the entire module). */ diff --git a/open-vm-tools/vmhgfs-fuse/main.c b/open-vm-tools/vmhgfs-fuse/main.c index fa7457807..db899ca21 100644 --- a/open-vm-tools/vmhgfs-fuse/main.c +++ b/open-vm-tools/vmhgfs-fuse/main.c @@ -1292,12 +1292,19 @@ hgfs_destroy(void *data) // IN: unused LOG(4, ("Entry()\n")); res = HgfsDestroySession(); - free(gState->basePath); - if (res < 0) { LOG(4, ("Destroy session failed. error = %d\n", res)); } + HgfsTransportExit(); + + free(gState->basePath); + + if (gState->conf != NULL) { + g_key_file_free(gState->conf); + gState->conf = NULL; + } + LOG(4, ("Exit()\n")); } diff --git a/open-vm-tools/vmware-user-suid-wrapper/Makefile.in b/open-vm-tools/vmware-user-suid-wrapper/Makefile.in deleted file mode 100644 index 8870b3a85..000000000 --- a/open-vm-tools/vmware-user-suid-wrapper/Makefile.in +++ /dev/null @@ -1,599 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -bin_PROGRAMS = vmware-user-suid-wrapper$(EXEEXT) -subdir = vmware-user-suid-wrapper -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(autostartdir)" -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) -PROGRAMS = $(bin_PROGRAMS) -am_vmware_user_suid_wrapper_OBJECTS = main.$(OBJEXT) \ - wrapper-@TARGET_OS@.$(OBJEXT) -vmware_user_suid_wrapper_OBJECTS = \ - $(am_vmware_user_suid_wrapper_OBJECTS) -vmware_user_suid_wrapper_DEPENDENCIES = \ - ../lib/vmSignal/libVmSignal.la -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(vmware_user_suid_wrapper_SOURCES) -DIST_SOURCES = $(vmware_user_suid_wrapper_SOURCES) -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -autostartDATA_INSTALL = $(INSTALL_DATA) -DATA = $(autostart_DATA) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -AM_CPPFLAGS = -DVMTOOLSD_PATH=\"$(bindir)/vmtoolsd\" -vmware_user_suid_wrapper_SOURCES = main.c wrapper-@TARGET_OS@.c -vmware_user_suid_wrapper_LDADD = ../lib/vmSignal/libVmSignal.la -desktopfile = vmware-user.desktop -desktopfilesrc = $(top_srcdir)/vmware-user-suid-wrapper/vmware-user.desktop.in -autostartdir = $(sysconfdir)/xdg/autostart -autostart_DATA = $(desktopfile) -CLEANFILES = $(desktopfile) -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu vmware-user-suid-wrapper/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu vmware-user-suid-wrapper/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ - else :; fi; \ - done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -vmware-user-suid-wrapper$(EXEEXT): $(vmware_user_suid_wrapper_OBJECTS) $(vmware_user_suid_wrapper_DEPENDENCIES) - @rm -f vmware-user-suid-wrapper$(EXEEXT) - $(LINK) $(vmware_user_suid_wrapper_OBJECTS) $(vmware_user_suid_wrapper_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wrapper-@TARGET_OS@.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-autostartDATA: $(autostart_DATA) - @$(NORMAL_INSTALL) - test -z "$(autostartdir)" || $(MKDIR_P) "$(DESTDIR)$(autostartdir)" - @list='$(autostart_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(autostartDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(autostartdir)/$$f'"; \ - $(autostartDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(autostartdir)/$$f"; \ - done - -uninstall-autostartDATA: - @$(NORMAL_UNINSTALL) - @list='$(autostart_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(autostartdir)/$$f'"; \ - rm -f "$(DESTDIR)$(autostartdir)/$$f"; \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) $(DATA) -installdirs: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(autostartdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-autostartDATA - -install-dvi: install-dvi-am - -install-exec-am: install-binPROGRAMS - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-autostartDATA uninstall-binPROGRAMS - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-autostartDATA install-binPROGRAMS install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-autostartDATA \ - uninstall-binPROGRAMS - - -$(desktopfile): $(desktopfilesrc) - sed 's,_bindir_,$(bindir),' $(desktopfilesrc) > $(desktopfile) -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/xferlogs/Makefile.in b/open-vm-tools/xferlogs/Makefile.in deleted file mode 100644 index f23201923..000000000 --- a/open-vm-tools/xferlogs/Makefile.in +++ /dev/null @@ -1,565 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -bin_PROGRAMS = vmware-xferlogs$(EXEEXT) -@HAVE_ICU_TRUE@am__append_1 = @ICU_LIBS@ -subdir = xferlogs -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) -PROGRAMS = $(bin_PROGRAMS) -am_vmware_xferlogs_OBJECTS = xferlogs.$(OBJEXT) -vmware_xferlogs_OBJECTS = $(am_vmware_xferlogs_OBJECTS) -am__DEPENDENCIES_1 = -vmware_xferlogs_DEPENDENCIES = $(am__DEPENDENCIES_1) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(vmware_xferlogs_SOURCES) -DIST_SOURCES = $(vmware_xferlogs_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -vmware_xferlogs_LDADD = @VMTOOLS_LIBS@ $(am__append_1) -vmware_xferlogs_SOURCES = xferlogs.c -@HAVE_ICU_FALSE@vmware_xferlogs_LINK = $(LINK) -@HAVE_ICU_TRUE@vmware_xferlogs_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ -@HAVE_ICU_TRUE@ $(LIBTOOLFLAGS) --mode=link $(CXX) $(AM_CXXFLAGS) \ -@HAVE_ICU_TRUE@ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu xferlogs/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu xferlogs/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ - else :; fi; \ - done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -vmware-xferlogs$(EXEEXT): $(vmware_xferlogs_OBJECTS) $(vmware_xferlogs_DEPENDENCIES) - @rm -f vmware-xferlogs$(EXEEXT) - $(vmware_xferlogs_LINK) $(vmware_xferlogs_OBJECTS) $(vmware_xferlogs_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xferlogs.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: - for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: install-binPROGRAMS - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-binPROGRAMS - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: